Question--EXTERN: good or bad (or neutral)?
Elena Zannoni
ezannoni@cygnus.com
Wed Aug 1 15:37:00 GMT 2001
How do people feel about this thing in buildsym.h?
/* [...]
Variables declared in this file can be defined by #define-ing the
name EXTERN to null. It is used to declare variables that are
normally extern, but which get defined in a single module using
this technique. */
#ifndef EXTERN
#define EXTERN extern
#endif
buildsym.c does this:
/* Ask buildsym.h to define the vars it normally declares `extern'. */
#define EXTERN
/**/
#include "buildsym.h" /* Our own declarations */
#undef EXTERN
while the other files that need those variables, simply include
buildsym.h w/o redefining EXTERN.
Same thing occurs with stabsread.h and stabsread.c.
Is there any reason for not moving the definitions into the .c files?
Elena
More information about the Gdb
mailing list