bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnulib] GNULib Module nanosleep Breaks CVS Build On Windows


From: Derek Robert Price
Subject: Re: [Bug-gnulib] GNULib Module nanosleep Breaks CVS Build On Windows
Date: Wed, 12 May 2004 15:26:47 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jim Meyering wrote:

>Hi Conrad,
>
>"Conrad T. Pino" <Conrad@pino.com> 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: derek@ximbiot.com

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-----





reply via email to

[Prev in Thread] Current Thread [Next in Thread]