www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/10/17/07:15:17

Date: Tue, 17 Oct 1995 10:59:47 --100
From: sulyokp AT dragon DOT klte DOT hu (Sulyok Peter)
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: Beta 3 bug
Cc: sulyokp AT dragon DOT klte DOT hu

> Marc Singer (nbn.nbn.com!sapien!elf) wrote:
>
> : According to Davide Rossi:
> : > 
> : > OK guys, 
> : > so, who's the genius that used a C++ reserved keyword (guess which
> : > one) on line 197 of dos.h (or was it dir.h ???) ? ;)
> : > OK, you guessed it: a structure's field name is "class" and, of course, if
>
> : Don't forget to say, "please".  We're all overworked and underpaid.
>
> : I, too, noticed this problem.  I just renamed the field in the directory
> : structure so I could compile.  
> 
> The funny thing here is that BC4 has that same structure with the same 
> member (class).

I'm the "genius" and sorry for this bug. I think I need to say some
word about this. I made this extension of DOS.H to grow compatibility
of DJGPP with other DOS C compilers. Originally this structure DOSERROR
came from Microsoft C 6.00 and this is the source of this bug (Microsoft
C 6.00 is not a C++ compiler !) and my carelessness. The other DOS C
compilers took this structure and at this moment a lot of DOS C compiler
use it because of compatibility: 

Borland C\C++ 3.1, 4.0, 4.5
Microsoft C\C++ 6.0, 7.0, 8.0
Symantec C\C++ 6.0 6.11, 7.0
Watcom C\C++ 9.5, 10.0, 10.5

There is two way to correct this bug now.
1. If you don't use this structure please comment it out in DOS.H.
2. If you want to use it then change it to the next form:

struct DOSERROR {
	int	exterror;
        #ifdef __cplusplus
        char    errclass;
        #else
	char	class;
	#endif
	char	action;
	char	locus;
};

Sorry again. 

Peter Sulyok
Computer Graphics Department
Intitute of Mathemathics and Informatics
University of Debrecen, Hungary

- Raw text -


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