Given the current rude health of gnulib, it seems like the GNU Coding Standards' guidance on portability should be updated.
I note two main areas: 1. Section 5.7, and similar mentions re. GNU APIs: an excellent first-line portability strategy is simply "use gnulib". This allows one to write to POSIX-1.2001, or, to a lesser and harder-to-determine extent, the subset of GNU which gnulib supports on non-GNU systems, and gnulib picks up the slack. Of course, it's not bulletproof, but at least for the POSIX case, you can assume it will work and sort out problems as they arise (preferably by patching gnulib) rather than have to worry about each case. Section 5.7 is basically out of date, as much of the advice predates even C89 (and unless one is maintaining pre-C89 code, one shouldn't be worrying about it now). 2. Section 5.6 says: "A simple way to use the Gnulib error module is to obtain the two source files ‘error.c’ and ‘error.h’ from the Gnulib library source code repository at http://git.savannah.gnu.org/gitweb/?p=gnulib.git." This should be deleted. gnulib should be used via autotools, period (at least, any other method doesn't need covering in the GNU coding standards). Anything else is just asking for pain, and there's no reason for it. Actually, much of section 5 could be thrown out and/or rewritten, but absent someone with the time to do that, at least implementing the above two suggestions would be a start. I'm willing to help with that. -- http://rrt.sc3d.org
