Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Question--EXTERN: good or bad (or neutral)?
@ 2001-08-01 15:37 Elena Zannoni
  2001-08-01 15:58 ` Kevin Buettner
       [not found] ` <3B688CCC.1040702@cygnus.com>
  0 siblings, 2 replies; 4+ messages in thread
From: Elena Zannoni @ 2001-08-01 15:37 UTC (permalink / raw)
  To: gdb

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-08-01 18:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-01 15:37 Question--EXTERN: good or bad (or neutral)? Elena Zannoni
2001-08-01 15:58 ` Kevin Buettner
2001-08-01 18:26   ` Elena Zannoni
     [not found] ` <3B688CCC.1040702@cygnus.com>
2001-08-01 18:56   ` Elena Zannoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox