-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Reuben Thomas on 3/18/2009 7:50 PM: > string.h uses restrict, which doesn't work if the compiler is C89 (e.g. > gcc in -std=c89 mode). > > regex.h has some code to detect this case and allow for it; should > string.h copy this code? Or should it be broken out into a module? (It > would be useful to gnulib users too.)
The code is AC_C_RESTRICT; and since it is provided by autoconf, a gnulib module just for restrict isn't really needed. However, string.in.h only uses restrict within: mempcpy, stpcpy, stpncpy, strsep, and strtok_r, all of which, in the respective m4/*.m4 file, made a point to require AC_C_RESTRICT. Therefore, I can't see any bug where gnulib uses restrict inappropriately with my glance through the code base. Did you actually encounter a compilation failure where restrict was improperly defined while using gnulib? If so, how do we reproduce it? - -- 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 iEYEARECAAYFAknBqT8ACgkQ84KuGfSFAYDN2ACgrU0o7afzUjwvHiuUSmHLuXjU TcMAoNNUo5CQvDiZmWgZ3l3wYy6DIreI =hegg -----END PGP SIGNATURE-----