Mail Archives: cygwin/2006/01/12/15:38:12
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Christopher Faylor wrote:
> I guess more subtext that you could read into my request would be that
> we would make the headers work as closely as possible to linux when
> _POSIX_SOURCE is defined. The key here is to make things look more
> like linux so that programs port more easily.
Right now, all _POSIX_SOURCE seems to do is exclude a number of
constants and functions from being defined, supposedly because they
aren't part of the POSIX standard.
Now, newlib != glibc, but the examples I mentioned before could be
compared to their glib counterparts (see below regarding <sys/select.h>).
> So, that would imply that "we" really should actively fix up the headers
> to make sure that it is properly handled.
OK, but I think these are uncommon cases; I've built a *LOT* of packages
of all types, and this has not generally been a problem.
> I was hoping for concrete examples. Do you have any?
gmime2:
gmime-gpg-context.c: In function `gpg_ctx_op_step':
gmime-gpg-context.c:1089: error: `fd_set' undeclared (first use in this
function)
gmime-gpg-context.c:1089: error: (Each undeclared identifier is reported
only once
gmime-gpg-context.c:1089: error: for each function it appears in.)
gmime-gpg-context.c:1089: error: parse error before "rdset"
gmime-gpg-context.c:1096: error: `rdset' undeclared (first use in this
function)
gmime-gpg-context.c:1114: error: `wrset' undeclared (first use in this
function)
gmime-gpg-context.c:1124: error: `wrsetp' undeclared (first use in this
function)
fd_set is defined in <sys/types.h> (which is also called by
<sys/select.h>, but only if !defined(_POSIX_SOURCE)), but with this
condition:
/* We don't define fd_set and friends if we are compiling POSIX
source, or if we have included (or may include as indicated
by __USE_W32_SOCKETS) the W32api winsock[2].h header which
defines Windows versions of them. Note that a program which
includes the W32api winsock[2].h header must know what it is doing;
it must not call the cygwin32 select function.
*/
# if !(defined (_POSIX_SOURCE) || defined (_WINSOCK_H) || defined
(__USE_W32_SOCKETS))
AFAICS, in glibc, fd_set is (independent of _POSIX_SOURCE) defined via
<sys/select.h>.
Since _POSIX_SOURCE on Cygwin doesn't add anything, I can't remember a
case that I've had to *add* such a define.
Yaakov
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFDxrujpiWmPGlmQSMRAiZtAKCW/vRO4Ihfop9vJLdKYs0mPvNCgwCfUHh/
3ziKVCCYkJnGCTnMtgkirec=
=bUjT
-----END PGP SIGNATURE-----
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -