www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/06/23/01:21:12

Sender: nate AT cartsys DOT com
Message-ID: <37706DAE.A8E76379@cartsys.com>
Date: Tue, 22 Jun 1999 22:16:30 -0700
From: Nate Eldredge <nate AT cartsys DOT com>
X-Mailer: Mozilla 4.08 [en] (X11; I; Linux 2.2.10 i586)
MIME-Version: 1.0
To: djgpp-workers AT delorie DOT com
Subject: Re: [house AT usq DOT edu DOT au: DJGPP's search.h]
References: <199906230051 DOT UAA06264 AT envy DOT delorie DOT com>
Reply-To: djgpp-workers AT delorie DOT com

DJ Delorie wrote:
> 
> Comments?

Hmm... glibc just does:

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

and dispenses with the typedef entirely.

It probably doesn't matter which we do.  After all, the bug at hand
seems to have been present since 2.00 (according to cvs log)... goes to
show how much people use it :)
 
> ------- Start of forwarded message -------
> Sender: house AT usq DOT edu DOT au
> Date: Wed, 23 Jun 1999 00:17:31 +0000
> From: Ron House <house AT usq DOT edu DOT au>
> To: dj AT delorie DOT com
> Subject: DJGPP's search.h
> Content-Type: text/plain; charset=us-ascii
> 
> To DJ Delorie
> 
> Hi, thank you for putting out such an excellent system as DJGPP.
> 
> I have found one bug. The file search.h says:
> 
> struct qelem {
>   struct qelem *q_forw;
>   struct qelem *q_back;
>   char q_data[0];
> } qelem;
> 
> 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;
> 
> I have altered my copy and it works fine.
> 
> Thanks again,
> - --
> Ron House            house AT usq DOT edu DOT au
> 
> The evils of each age always seem self-evidently right at the time.
> ------- End of forwarded message -------

-- 

Nate Eldredge
nate AT cartsys DOT com

- Raw text -


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