delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/07/17/15:05:48

Sender: bkorb AT sco DOT COM
Message-ID: <39735540.C8BD0707@sco.com>
Date: Mon, 17 Jul 2000 11:49:36 -0700
From: Bruce Korb <bkorb AT sco DOT COM>
Organization: Santa Cruz Operations
X-Mailer: Mozilla 4.7 [en] (X11; I; SCO_SV 3.2 i386)
X-Accept-Language: en
MIME-Version: 1.0
To: Laurynas Biveinis <lauras AT softhome DOT net>
CC: Mike Stump <mrs AT windriver DOT com>, gcc AT gcc DOT gnu DOT org, djgpp-workers AT delorie DOT com
Subject: Re: GCC headers and DJGPP port
References: <200007171736 DOT KAA29313 AT kankakee DOT wrs DOT com> <39734D95 DOT 6D145F00 AT softhome DOT net>
Reply-To: djgpp-workers AT delorie DOT com

Laurynas Biveinis, et al. wrote:  <<stuff>>

> Suppose we put following in GCC headers
> 
> #ifdef __DJGPP__
> #include <sys/djtypes.h>
> #undef __DJ_size_t
> #define __DJ_size_t
> /* ... normal size_t definition as usual ... */
> 
> This way we get GCC size_t definition and DJGPP headers won't redefine it.
> But everything will be OK only as long as GCC headers come first. Just do
> #include <go32.h>
> #include <stddef.h>
> and we are in trouble - GCC header is unable to detect that size_t is 
> already defined.

Suppose the GCC-supplied "stddef.h" were to do stuff like:

> #ifndef __PTRDIFF_TYPE__
> #define __PTRDIFF_TYPE__ long int
> #endif
> #if !defined(_GCC_PTRDIFF_T)
> #define _GCC_PTRDIFF_T
> typedef __PTRDIFF_TYPE__ ptrdiff_t;
> #endif
> 
> #ifndef __SIZE_TYPE__
> #define __SIZE_TYPE__ long unsigned int
> #endif
> #if !defined(_GCC_SIZE_T)
> #define _GCC_SIZE_T
> typedef __SIZE_TYPE__ size_t;
> #endif
>
> #ifndef __WCHAR_TYPE__
> #define __WCHAR_TYPE__ int
> #endif
> #if !defined(_GCC_WCHAR_T) && !defined(__cplusplus)
> #define _GCC_WCHAR_T
> typedef __WCHAR_TYPE__ wchar_t;
> #endif

and the DJGPP headers were to do the same?  :-)

> > If your header files are defining things in the wrong way in the wrong
> > places, then fixincludes is your solution.
> 
> Fixincludes won't run on DJGPP in near future - we don't have pipe(), fork(),
> etc. stuff. And shell script version has been removed.

And because the main shell script version has been removed,
I pulled the support for doing c-fixes from a command line.
But I thought you-all used "fixinc.winnt" anyway?  Since I
don't have a Windows dev box, I was never planning on touching
that mechanism.  However, I would work with anyone among the
djgpp-workers interested in making the fixincl program run
under Win*.  :-)

- Raw text -


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