* include/_mingw.h (_CRTIMP): Define for __GNUC__ if
__declspec(dllimport) supported. (__cdecl): Define if not already defined. (__stdcall): Likewise. * include/dirent.h: Qualify fuctions with __cdecl. * include/fenv.h: Likewise. * include/inttypes.h: Likewise. * include/assert.h: Qualify fuctions with __cdecl. Qualify CRT dll imports with _CRTIMP. * include/conio.h: Likewise. * include/ctype.h: Likewise. * include/direct.h: Likewise. * include/dos.h: Likewise. * include/errno.h: Likewise. * include/float.h: Likewise. * include/io.h: Likewise. * include/locale.h: Likewise. * include/malloc.h: Likewise. * include/math.h: Likewise. * include/mbctype.h: Likewise. * include/mbstring.h: Likewise. * include/process.h: Likewise. * include/setjmp.h: Likewise. * include/signal.h: Likewise. * include/stdio.h: Likewise. * include/stdlib.h: Likewise. * include/string.h: Likewise. * include/time.h: Likewise. * include/wchar.h: Likewise. * include/wctype.h: Likewise. * include/sys/stat.h: Likewise. * include/sys/timeb.h: Likewise. * include/sys/utime.h: Likewise. * include/ctype.h: Guard ctype inlines with __NO_INLINE__. * include/wctype.h: Guard wctype inlines with __NO_INLINE__. * include/stdio.h (__VALIST): Guard against prior definition.
This commit is contained in:
@ -29,6 +29,7 @@
|
||||
__DECLSPEC_SUPPORTED Defined if dllimport attribute is supported.
|
||||
__MINGW_IMPORT The attribute definition to specify imported
|
||||
variables/functions.
|
||||
_CRTIMP As above. For MS compatibility.
|
||||
__MINGW32_VERSION Runtime version.
|
||||
__MINGW32_MAJOR_VERSION Runtime major version.
|
||||
__MINGW32_MINOR_VERSION Runtime minor version.
|
||||
@ -47,6 +48,9 @@
|
||||
# ifndef __MINGW_IMPORT
|
||||
# define __MINGW_IMPORT __declspec(dllimport)
|
||||
# endif
|
||||
# ifndef _CRTIMP
|
||||
# define _CRTIMP __declspec(dllimport)
|
||||
# endif
|
||||
# define __DECLSPEC_SUPPORTED
|
||||
#else /* __GNUC__ */
|
||||
# ifdef __declspec
|
||||
@ -55,12 +59,24 @@
|
||||
/* Note the extern. This is needed to work around GCC's
|
||||
limitations in handling dllimport attribute. */
|
||||
# define __MINGW_IMPORT extern __attribute__((dllimport))
|
||||
# endif
|
||||
# endif
|
||||
# ifndef _CRTIMP
|
||||
# define _CRTIMP __attribute__((dllimport))
|
||||
# endif
|
||||
# define __DECLSPEC_SUPPORTED
|
||||
# else
|
||||
# else /* __declspec */
|
||||
# undef __DECLSPEC_SUPPORTED
|
||||
# undef __MINGW_IMPORT
|
||||
# endif
|
||||
# ifndef _CRTIMP
|
||||
# define _CRTIMP
|
||||
# endif
|
||||
# endif /* __declspec */
|
||||
# ifndef __cdecl
|
||||
# define __cdecl __attribute__((cdecl))
|
||||
# endif
|
||||
# ifndef __stdcall
|
||||
# define __stdcall __attribute__((stdcall))
|
||||
# endif
|
||||
# undef __int64
|
||||
# define __int64 long long
|
||||
#endif /* __GNUC__ */
|
||||
@ -70,4 +86,3 @@
|
||||
#define __MINGW32_MINOR_VERSION 0
|
||||
|
||||
#endif /* __MINGW_H */
|
||||
|
||||
|
Reference in New Issue
Block a user