From: Akim Demaille <[EMAIL PROTECTED]>
   Date: 06 Mar 2000 10:07:37 +0100

   I would not condition the includes by __cplusplus, since the C
   compiler will be happy too to have them.  What do other people think?

I agree with you.

   Also, ifdef and ifndef are banished from Autoconf, use only #if and
   #if !.

That should be fine.

Here is some background about this (if you don't know it already).

Some people don't like to use #if with undefined symbols, on stylistic
grounds.  I added the -Wundef option to GCC to cater to these people,
and if you compile with this option you'll get a warning for this
usage.  Furthermore, if you compile with -Werror -Wundef the compiler
will reject the program.

However, -Werror -Wundef does not conform to the C Standard, and I don't
know of anybody who turns it on by default.  So I don't think you need
to worry about it.

   #if HAVE_STDLIB_H
   # include <stdlib.h>
   #else
   char *malloc ();
   #endif

   or maybe shall we check that malloc is declared?

I wouldn't worry about that; I think it's unlikely that you'll run
across a host that declares malloc some place other than stdlib.h.

Reply via email to