X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=doc%2Fgnulib.texi;h=6d62e8760b5e3682ade4a57a34d359e986b417d0;hb=4695d9d25dc1b35f8fb9777f9f1637cd161db84f;hp=a3343c28b0e7e7ca6d5c9ce45015276d517de005;hpb=ff5309c7122533ea6b9e5bd4d171d3e14ebb7d64;p=gnulib.git diff --git a/doc/gnulib.texi b/doc/gnulib.texi index a3343c28b..6d62e8760 100644 --- a/doc/gnulib.texi +++ b/doc/gnulib.texi @@ -1,5 +1,5 @@ \input texinfo @c -*-texinfo-*- -@comment $Id: gnulib.texi,v 1.19 2005-09-19 15:48:03 haible Exp $ +@comment $Id: gnulib.texi,v 1.23 2006-06-21 17:22:32 jas Exp $ @comment %**start of header @setfilename gnulib.info @settitle GNU Gnulib @@ -7,14 +7,14 @@ @syncodeindex pg cp @comment %**end of header -@set UPDATED $Date: 2005-09-19 15:48:03 $ +@set UPDATED $Date: 2006-06-21 17:22:32 $ @copying This manual is for GNU Gnulib (updated @value{UPDATED}), which is a library of common routines intended to be shared at the source level. -Copyright @copyright{} 2004, 2005 Free Software Foundation, Inc. +Copyright @copyright{} 2004, 2005, 2006 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document @@ -85,9 +85,11 @@ Getting started: * Quoting:: * ctime:: * inet_ntoa:: +* gcd:: * Out of memory handling:: * Library version handling:: * Regular expressions:: +* Windows sockets:: @end menu @@ -179,9 +181,9 @@ arbitrary order. @include quote.texi - @include ctime.texi +@include gcd.texi @include inet_ntoa.texi @@ -246,7 +248,8 @@ To avoid ELF symbol collisions with other libraries that use the AC_DEFINE something like: @example -AC_DEFINE(check_version, stringprep_check_version, [Rename check_version.]) +AC_DEFINE(check_version, stringprep_check_version, + [Rename check_version.]) @end example The @code{stringprep_check_version} function will thus be implemented @@ -292,6 +295,38 @@ generated automatically. @include regexprops-generic.texi +@node Windows sockets +@section Windows sockets + +There are several issues when building applications that should work +under Windows. The most problematic part is for applications that use +sockets. + +Hopefully, we can add helpful notes to this section that will help you +port your application to Windows using gnulib. + +@subsection Getaddrinfo and WINVER + +This was written for the getaddrinfo module, but may be applicable to +other functions too. + +The getaddrinfo function exists in ws2tcpip.h and -lws2_32 on Windows +XP. The function declaration is present if @code{WINVER >= 0x0501}. +Windows 2000 does not have getaddrinfo in its @file{WS2_32.dll}. + +Thus, if you want to assume Windows XP or later, you can add +AC_DEFINE(WINVER, 0x0501) to avoid compiling to (partial) getaddrinfo +implementation. + +If you want to support Windows 2000, don't do anything, but be aware +that gnulib will use its own (partial) getaddrinfo implementation even +on Windows XP. Currently the code does not attempt to determine if +the getaddrinfo function is available during runtime. + +Todo: Make getaddrinfo.c open the WS2_32.DLL and check for the +getaddrinfo symbol and use it if present, otherwise fall back to our +own implementation. + @include gnulib-tool.texi