diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2007-11-01 15:30:46 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2007-11-01 15:30:46 +0000 |
commit | 7fd6ea65f94d4a3e130dccbd51f4b3d15be0a5ae (patch) | |
tree | 919d5b58b7b3141ddf95602d96e7c00ed9191d39 /lib/pm.h | |
parent | 1eb7356380603811d191f170336e6a013eb4aee4 (diff) | |
download | netpbm-mirror-7fd6ea65f94d4a3e130dccbd51f4b3d15be0a5ae.tar.gz netpbm-mirror-7fd6ea65f94d4a3e130dccbd51f4b3d15be0a5ae.tar.xz netpbm-mirror-7fd6ea65f94d4a3e130dccbd51f4b3d15be0a5ae.zip |
replace ARGS definition
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@448 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'lib/pm.h')
-rw-r--r-- | lib/pm.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/pm.h b/lib/pm.h index 9fa061b8..28dfbb43 100644 --- a/lib/pm.h +++ b/lib/pm.h @@ -34,6 +34,30 @@ extern "C" { #endif +/* Definitions to make Netpbm programs work with either ANSI C or C + Classic. + + This is obsolete, as all compilers recognize the ANSI syntax now. + + We are slowly removing all the ARGS invocations from the programs + (and replacing them with explicit ANSI syntax), but we have a lot + of programs where we have removed ARGS from the definition but not + the prototype, and we have discovered that the Sun compiler + considers the resulting mismatch between definition and prototype + to be an error. So we make ARGS create the ANSI syntax + unconditionally to avoid having to fix all those mismatches. */ + +#if 0 +#if __STDC__ +#define ARGS(alist) alist +#else /*__STDC__*/ +#define ARGS(alist) () +#define const +#endif /*__STDC__*/ +#endif +#define ARGS(alist) alist + + /* PM_GNU_PRINTF_ATTR lets the GNU compiler check pm_message() and pm_error() calls to be sure the arguments match the format string, thus preventing runtime segmentation faults and incorrect messages. |