From mboxrd@z Thu Jan 1 00:00:00 1970 From: Elena Zannoni To: gdb@sources.redhat.com Subject: Question--EXTERN: good or bad (or neutral)? Date: Wed, 01 Aug 2001 15:37:00 -0000 Message-id: <15208.34467.908215.907865@krustylu.cygnus.com> X-SW-Source: 2001-08/msg00011.html 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