Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Macros (Was: fdtable)



Peter Stephenson <pws@xxxxxx> writes:
  
> + /* Define to nothing if compiler does not handle `signed' keyword */
> + #undef signed
> + 

There's already another fix by Zoltan, so the following remark no
longer applies to this case, but I'd like to make a general remark
here:

When reading other people's code, I've regularly been bitten by the
fact that the code was not what it looked like, due to a #define in
one of the so many header files that was (directly or indirectly)
included.  The potential for errors is much less if one keeps all
macros uppercase.  So create a SIGNED macro that is either defined to
signed or to nothing, like EXTERN.

The same is true of things like

#define dirent direct
#define setpgrp setpgid

which are currently used.

Bas.




Messages sorted by: Reverse Date, Date, Thread, Author