-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Bruno Haible on 12/24/2009 12:40 PM: > On Linux/glibc systems, I get this warning: > > test-pty.c:24: warning: initialization from incompatible pointer type > test-pty.c:26: warning: initialization from incompatible pointer type > > It's because glibc defines both forkpty and openpty with 'const' in the > last two parameters.
Sounds like we should fix our gnulib replacement to do likewise, and to provide rpl_forkpty on systems that don't have the same signature. > > And also: > > test-gettimeofday.c:23: warning: initialization from incompatible pointer type > > It's because with _GNU_SOURCE, glibc declares the second argument of > gettimeofday as a 'struct timezone *'. Yuck. About the best I can think of is a configure-time check for the type of the second parameter, and writing it as: SIGNATURE_CHECK (gettimeofday, int, (struct timeval *, GETTIMEOFDAY_TIMEZONE *)); where GETTIMEOFDAY_TIMEZONE expands to void or struct timezone as appropriate. In other words, the _GNU_SOURCE declaration is not POSIX-compatible, but it is more typesafe, so I don't want to override it. I've added these items to my list (I've run out of time to fix them today). - -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkszy3EACgkQ84KuGfSFAYBhZwCffxtO6wHbrqmw3D4XZDaWdrvm DYsAn19KHnmp04uva6fELU6hAzkD4vVh =fLIK -----END PGP SIGNATURE-----