delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/06/23/04:51:40

Date: Wed, 23 Jun 1999 11:48:39 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: djgpp-workers AT delorie DOT com
cc: Ron House <house AT usq DOT edu DOT au>
Subject: Re: [house AT usq DOT edu DOT au: DJGPP's search.h]
In-Reply-To: <199906230051.UAA06264@envy.delorie.com>
Message-ID: <Pine.SUN.3.91.990623114605.13893a-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Tue, 22 Jun 1999, DJ Delorie wrote:

> This produces linkage errors because it creates an actual variable
> called qelem in every file it is included in. I believe the line should
> read:
> 
> typedef struct qelem {
>   struct qelem *q_forw;
>   struct qelem *q_back;
>   char q_data[0];
> } qelem;

IMHO even the typedef is wrong (unless some implementation has it),
since it also pollutes the namespace.  Simply removing the variable
name should do the trick:

    struct qelem {
      struct qelem *q_forw;
      struct qelem *q_back;
      char q_data[0];
    };

At least the man page on the nearest Unix box defines only the struct,
not the typedef or the variable.

Should I check in a change that fixes it?

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019