-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hrvoje Niksic wrote: > Micah Cowan <[EMAIL PROTECTED]> writes: > >> Is there any reason we can't move the contents of config-post.h into >> sysdep.h, and have the .c files #include "wget.h" at the top, before any >> system headers? > > wget.h *needs* stuff from the system headers, such as various system > types. If you take into account that it includes sysdep.h, it needs > much more.
Could you be more specific? AFAICT, wget.h #includes the system headers it needs. Considering the config-post.h stuff went at the top of the sysdep.h, sysdep.h is already at the top of wget.h, and wget.h is now at the top of each .c file, where's the issue? Note that it's currently working fine on my system (passes "make distcheck", which is _quite_ rigorous) after having made these changes, so I'd like to get specific examples of things that might break on other systems. > I don't see the problem with config-post.h, other than gnulib > brokenness. It does exactly what it was designed to do. It's not gnulib that's broken. Anything that depends on config.h (which configure will place in $BUILDDIR/src) that doesn't normally need anything from $SOURCEDIR/src would be broken. Simply adding - -I$SOURCEDIR/src for any code in other directories just because config-post.h is in the wrong place is the wrong fix; config-post.h, if it has to exist, ought to be in the same directory as config.h; I see no reason to the contrary. Which is why I mentioned having configure copy it to the build directory. However, its mere existence, as far as I can tell, is kludgy. They are system dependencies (according to its own description), and provided the code is properly organized, they belong with the other sysdeps. I see no reason why they can't all go to the same file, and measures taken to ensure that they end up at the top, before system header inclusion. - -- Micah J. Cowan Programmer, musician, typesetting enthusiast, gamer... http://micah.cowan.name/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHGGBH7M8hyUobTrERCO/lAJ4urjaA8DLQSyqordTIkZKiirv/CQCfREvU 5GT3Bj4tdhDSGg6Zqw11AyQ= =Pkuj -----END PGP SIGNATURE-----