On 14 Nov 2010, at 17:50, Carl-Daniel Hailfinger wrote: > On 14.11.2010 10:10, tlaronde@polynum.com wrote: >> Furthermore, the auto* and libtool were typically made >> for trying to do something "working" to some extend with a chaotic >> source. They typically manage to compile "things" written by >> programmers who have been encouraged to look at the finger ignoring >> the moon: to concentrate on the "GNU" tools and "GNU" libraries >> etc, and not on C89 (or C99), POSIX etc. >> > > Heh. Pure C99 code (with no GNU extensions or OS specific stuff > whatsoever) doesn't compile with pcc unless you avoid some of the really > useful features and some of the standard headers. I can quote the C99 > standard if you doubt this. Even then, many vendor compilers and linkers have many non-conformances, and outright bugs. Take a look at the number of workarounds that make their way into gnulib to cover breakage in the POSIX APIs alone. You can either try to remember what all of those are, or use something like autoconf to probe for known bugs, and gnulib to plug them, or you can link against a shim library like GNU libposix which will do all of that automatically when it is built and installed, allowing you to write to the POSIX APIs with impunity. > I have successfully avoided using autoconf and similar stuff in my > projects by adhering to strict C99, but in an ironic twist of fate, Plan > 9 will be the OS that forces me to use something like autoconf due to > the limited C99 support. And sadly, there is a good chance that your blind faith in having fully conformant APIs would come unstuck quite quickly if your code needed to work on a large selection of commercial UNIX releases (assuming you didn't code around all of those shortcomings in each of your projects that is). Plan 9 is far from alone in having limited C99 and POSIX API support. Cheers, -- Gary V. Vaughan (gary@gnu.org)