Re: GNULib Module nanosleep Breaks CVS Build On Windows
Derek Robert Price <[email protected]> Wed, 12 May 2004 15:26:47 -0400
| Newsgroups | gmane.comp.lib.gnulib.bugs,gmane.comp.version-control.cvs.bugs |
|---|---|
| Organization | Ximbiot <http://ximbiot.com> |
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jim Meyering wrote: >Hi Conrad, > >"Conrad T. Pino" <[email protected]> wrote: > >>>Regarding getting declarations for select into nanosleep.c for WOE, >>>the proper (POSIX) way would be to include <sys/select.h>. >>>Would that work on your system? >> >>Unfortunately Windows 2000 and Visual Studio C++ 6.0 don't provide >>a "select.h" header file. > > >Is Visual Studio C++ 6.0 an important (by some measure) >development platform? Isn't there a more-nearly POSIX-conforming >development environment that you can use? I hate to spend time >worrying about systems that don't even come close to providing >POSIX conformance. > >In any case, I hope we can do something cleaner than including ><winsock.h>. If I were to change nanosleep.c to do this: > >#if HAVE_SYS_SELECT_H ># include <sys/select.h> >#endif > >your system could get by with a definition like this in config.h > >#define HAVE_SYS_SELECT_H 1 > >and then a package-supplied sys/select.h file containing the >required declarations in a directory searched by the compiler, >specified via `-I dir' or whatever the equivalent is. > >That approach is more in line with the goal of keeping the >code from becoming encumbered with hacks designed solely to >accommodate non-conforming systems. Don't the GNULIB modules often work around broken & missing functions on non-conforming systems? Isn't that the point? Or is the difference that most of those platforms make at least some reasonable attempt to conform? Anyhow, I like this solution. We just started doing something similar for unistd.h & getpass(). Hrm. It looks like we could put the prototype in unistd.h using the current lib/nanosleep.c & still be compliant with earlier standards. Well, if you don't mind changing lib/nanosleep.c, Jim, we could go with the more current POSIX 1003.1-2001 spec and a sys/select.h substitute. Otherwise, we can add the prototype to our Windows unistd.h substitute. :) Thanks, Derek - -- *8^) Email: [email protected] Get CVS support at <http://ximbiot.com>! -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFAonp2LD1OTBfyMaQRAtnEAKDYovdhGV2saCAdZF9kowuidMmy+wCcDP1T t2K3T23g1RtqMPMFnPRQXdo= =3X8d -----END PGP SIGNATURE-----