Mail Archives: djgpp-workers/2000/07/17/15:05:48
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 -