Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Elena Zannoni <ezannoni@cygnus.com>
To: gdb@sources.redhat.com
Subject: Question--EXTERN: good or bad (or neutral)?
Date: Wed, 01 Aug 2001 15:37:00 -0000	[thread overview]
Message-ID: <15208.34467.908215.907865@krustylu.cygnus.com> (raw)

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


             reply	other threads:[~2001-08-01 15:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-01 15:37 Elena Zannoni [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=15208.34467.908215.907865@krustylu.cygnus.com \
    --to=ezannoni@cygnus.com \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox