2009-07-18 Gregory McGarry <gregorymcgarry@users.sourceforge.net>

* include/_mingw.h: Changes required for PCC compiler.
This commit is contained in:
Chris Sutcliffe 2009-07-18 14:56:47 +00:00
parent 52e4653d43
commit f9a5b8ea6a
2 changed files with 54 additions and 12 deletions

View File

@ -1,3 +1,7 @@
2009-07-18 Gregory McGarry <gregorymcgarry@users.sourceforge.net>
* include/_mingw.h: Changes required for PCC compiler.
2009-07-18 Jeff Lu <jll544@yahoo.com> 2009-07-18 Jeff Lu <jll544@yahoo.com>
* mingwex/usleep.c: round up to next ms * mingwex/usleep.c: round up to next ms

View File

@ -76,16 +76,46 @@
/* Try to avoid problems with outdated checks for GCC __attribute__ support. */ /* Try to avoid problems with outdated checks for GCC __attribute__ support. */
#undef __attribute__ #undef __attribute__
#ifndef __GNUC__ #if defined (__PCC__)
# undef __DECLSPEC_SUPPORTED
# ifndef __MINGW_IMPORT # ifndef __MINGW_IMPORT
# define __MINGW_IMPORT __declspec(dllimport) # define __MINGW_IMPORT extern
# endif # endif
# ifndef _CRTIMP # ifndef _CRTIMP
# define _CRTIMP __declspec(dllimport) # define _CRTIMP
# endif # endif
# define __DECLSPEC_SUPPORTED # ifndef __cdecl
# define __attribute__(x) /* nothing */ # define __cdecl _Pragma("cdecl")
#else /* __GNUC__ */ # endif
# ifndef __stdcall
# define __stdcall _Pragma("stdcall")
# endif
# ifndef __int64
# define __int64 long long
# endif
# ifndef __int32
# define __int32 long
# endif
# ifndef __int16
# define __int16 short
# endif
# ifndef __int8
# define __int8 char
# endif
# ifndef __small
# define __small char
# endif
# ifndef __hyper
# define __hyper long long
# endif
# ifndef __volatile__
# define __volatile__ volatile
# endif
# ifndef __restrict__
# define __restrict__ restrict
# endif
# define NONAMELESSUNION
#elif defined(__GNUC__)
# ifdef __declspec # ifdef __declspec
# ifndef __MINGW_IMPORT # ifndef __MINGW_IMPORT
/* Note the extern. This is needed to work around GCC's /* Note the extern. This is needed to work around GCC's
@ -107,12 +137,11 @@
# define _CRTIMP # define _CRTIMP
# endif # endif
# endif /* __declspec */ # endif /* __declspec */
/* /*
The next two defines can cause problems if user code adds the __cdecl attribute * The next two defines can cause problems if user code adds the
like so: * __cdecl attribute like so:
void __attribute__ ((__cdecl)) foo(void); * void __attribute__ ((__cdecl)) foo(void);
*/ */
# ifndef __cdecl # ifndef __cdecl
# define __cdecl __attribute__ ((__cdecl__)) # define __cdecl __attribute__ ((__cdecl__))
# endif # endif
@ -137,7 +166,16 @@
# ifndef __hyper # ifndef __hyper
# define __hyper long long # define __hyper long long
# endif # endif
#endif /* __GNUC__ */ #else /* ! __GNUC__ && ! __PCC__ */
# ifndef __MINGW_IMPORT
# define __MINGW_IMPORT __declspec(dllimport)
# endif
# ifndef _CRTIMP
# define _CRTIMP __declspec(dllimport)
# endif
# define __DECLSPEC_SUPPORTED
# define __attribute__(x) /* nothing */
#endif
#if defined (__GNUC__) && defined (__GNUC_MINOR__) #if defined (__GNUC__) && defined (__GNUC_MINOR__)
#define __MINGW_GNUC_PREREQ(major, minor) \ #define __MINGW_GNUC_PREREQ(major, minor) \