mingw-hosted xgcc
Kai Ruottu
karuottu@freenet.hut.fi
Sat Feb 20 04:48:00 GMT 1999
I wrote:
> So the simplest way would to remove these from specs and move them
> to some 'always included' header, or to a header which is included
> in this... Could <sys/types.h> be the proper one? I moved them
> somewhere, but cannot find where, perhaps I have written them over...
This kind of 'always included' header is the '_ansi.h', and the
'sys/config.h' is #include'd from it, and already contains all kind
of machine-dependent things...
So, here is my temporary patch for the 'sys/config.h' for mingw32 host,
where the SIZE_TYPE and PTRDIFF_TYPE definitions must be removed from the
CPP_SPEC in specs (until they will pass ok through pexecute and the MS
spawn()) :
*** config.h.orig Wed Oct 07 14:11:52 1998
--- config.h Sat Feb 20 13:53:09 1999
***************
*** 3,19 ****
/* exceptions first */
/* ??? Why is much of this stuff duplicated with machine/ieeefp.h? */
! #if defined(__H8300__) || defined(__H8500__) || defined (__H8300H__) ||
defined(__W65__) || defined (__H8300S__)
#define _FLOAT_ARG float
- #define __SMALL_BITFIELDS
#define _DOUBLE_IS_32BITS
#define __IEEE_BIG_ENDIAN
/* ??? This conditional is true for the h8500 and the w65, defining H8300
in those cases probably isn't the right thing to do. */
#define H8300 1
#endif
#ifdef __W65__
#define _DOUBLE_IS_32BITS
#define __SMALL_BITFIELDS
#define __IEEE_BIG_ENDIAN
--- 3,27 ----
/* exceptions first */
/* ??? Why is much of this stuff duplicated with machine/ieeefp.h? */
! #if defined (__H8300__) || defined (__H8300H__) || defined (__H8300S__) ||
defined (__H8500__)
#define _FLOAT_ARG float
#define _DOUBLE_IS_32BITS
+ #define __SMALL_BITFIELDS
#define __IEEE_BIG_ENDIAN
+ #if defined (__H8300H__) || defined (__H8300S__)
+ #define __SIZE_TYPE__ long unsigned int
+ #define __PTRDIFF_TYPE__ long int
+ #else
+ #define __SIZE_TYPE__ unsigned int
+ #define __PTRDIFF_TYPE__ int
+ #endif
/* ??? This conditional is true for the h8500 and the w65, defining H8300
in those cases probably isn't the right thing to do. */
#define H8300 1
#endif
#ifdef __W65__
+ #define _FLOAT_ARG float
#define _DOUBLE_IS_32BITS
#define __SMALL_BITFIELDS
#define __IEEE_BIG_ENDIAN
***************
*** 21,27 ****
--- 29,44 ----
#undef UINT_MAX
#define INT_MAX 32767
#define UINT_MAX 65535
+ #endif
+ #ifdef __mips__
+ #ifdef __LONG_64_BIT__
+ #define __SIZE_TYPE__ long unsigned int
+ #define __PTRDIFF_TYPE__ long int
+ #else
+ #define __SIZE_TYPE__ unsigned int
+ #define __PTRDIFF_TYPE__ int
+ #endif
#endif
/* 16 bit integer machines */
--------------- clip --------------------------
For the MIPS case, there aren't anything like '__H8300H__' for '-mh'
etc., just those '-D__SIZE_TYPE__=...' for '-mlong64' or not, so that
'__LONG_64_BIT__' is my addition for the '-mlong64' case to the specs
(my replacement for the '%{mlong64:-D__SIZE_TYPE=....}' is the
'%{mlong64:-D__LONG_64_BIT__}'). The '__H8500__' case is unchecked, is
it a '__H8300__' or a '__H8300H__' alike ?
Cheers, Kai
_______________________________________________
New CrossGCC FAQ: http://www.objsw.com/CrossGCC
_______________________________________________
To remove yourself from the crossgcc list, send
mail to crossgcc-request@cygnus.com with the
text 'unsubscribe' (without the quotes) in the
body of the message.
More information about the crossgcc
mailing list