* Stefan Reinauer stepan@suse.de [020617 17:07]:
I played a bit with the paflof sources and made them compile cleanly using gcc -ansi. I had to remove the C99 specific *restricted stuff (which did not change performance at all) Second issue was to replace C++ style comments as they are not allowed in ANSI C. The patch changes any occurence to either #ifdefs if it's code or C style comments in case of real comments. I checked it against the hayes test and got the same output as with mainstream paflof.
After fiddling a bit more I changed the patch so it does not necessarily disable *restrict and other (not-used-yet) features from C99 as the upcoming gcc HEAD will probably change the fact that these are more or less noops. There was some discussion on this list on probing compiler features before actually using them instead of making vague assumptions on what version supports which feature. Instead of using a vast amount of autoconf/automake magic, I wrote a small perl script that calls the compiler with simple code fragments and analyzes these afterwards using nm. This way it is also usable when cross compiling. Basically the patch removes types.h as it will be autogenerated plus the already known ANSI fixes (mostly applying a regexp to change comment style) The configuration script conf.pl also checks for available data types and chooses the needed ones to set up the internal structures. gcc's TI mode is probed and, if available and needed, it is used.
Any comments? ;)
Stefan