Update to 3.11, deprecate 3 functions
git-svn-id: svn+ssh://svn.code.sf.net/p/mingw-w64/code/trunk@385 4407c894-4637-0410-b4f5-ada5f102cad1
diff --git a/mingw-w64-headers/include/_mingw.h b/mingw-w64-headers/include/_mingw.h
index e484980..c15c12e 100644
--- a/mingw-w64-headers/include/_mingw.h
+++ b/mingw-w64-headers/include/_mingw.h
@@ -57,8 +57,8 @@
#ifdef __cplusplus
# define __CRT_INLINE inline
#else
-# if __GNUC_STDC_INLINE__
-# define __CRT_INLINE extern __inline __attribute__((__gnu_inline__))
+# if ( __MINGW_GNUC_PREREQ(4, 3) && __STDC_VERSION__ >= 199901L)
+# define __CRT_INLINE extern __attribute__((__gnu__inline__)) inline
# else
# define __CRT_INLINE extern __inline__
# endif
@@ -82,6 +82,35 @@
#define __MINGW_ATTRIB_CONST
#endif
+#if __MINGW_GNUC_PREREQ (3, 0)
+#define __MINGW_ATTRIB_MALLOC __attribute__ ((__malloc__))
+#define __MINGW_ATTRIB_PURE __attribute__ ((__pure__))
+#else
+#define __MINGW_ATTRIB_MALLOC
+#define __MINGW_ATTRIB_PURE
+#endif
+
+/* Attribute `nonnull' was valid as of gcc 3.3. We don't use GCC's
+ variadiac macro facility, because variadic macros cause syntax
+ errors with --traditional-cpp. */
+#if __MINGW_GNUC_PREREQ (3, 3)
+#define __MINGW_ATTRIB_NONNULL(arg) __attribute__ ((__nonnull__ (arg)))
+#else
+#define __MINGW_ATTRIB_NONNULL(arg)
+#endif /* GNUC >= 3.3 */
+
+#if __MINGW_GNUC_PREREQ (3, 1)
+#define __MINGW_ATTRIB_DEPRECATED __attribute__ ((__deprecated__))
+#else
+#define __MINGW_ATTRIB_DEPRECATED
+#endif /* GNUC >= 3.1 */
+
+#ifndef __MSVCRT_VERSION__
+/* High byte is the major version, low byte is the minor. */
+# define __MSVCRT_VERSION__ 0x0700
+#endif
+
+
#ifndef WINVER
#define WINVER 0x0502
#endif
diff --git a/mingw-w64-headers/include/stdlib.h b/mingw-w64-headers/include/stdlib.h
index c3ad0a9..2e708e3 100644
--- a/mingw-w64-headers/include/stdlib.h
+++ b/mingw-w64-headers/include/stdlib.h
@@ -427,9 +427,10 @@
_CRTIMP void __cdecl _wsplitpath(const wchar_t *_FullPath,wchar_t *_Drive,wchar_t *_Dir,wchar_t *_Filename,wchar_t *_Ext);
#endif
- _CRTIMP void __cdecl _beep(unsigned _Frequency,unsigned _Duration);
- _CRTIMP void __cdecl _seterrormode(int _Mode);
- _CRTIMP void __cdecl _sleep(unsigned long _Duration);
+ _CRTIMP void __cdecl _beep(unsigned _Frequency,unsigned _Duration) __MINGW_ATTRIB_DEPRECATED;
+ /* Not to be confused with _set_error_mode (int). */
+ _CRTIMP void __cdecl _seterrormode(int _Mode) __MINGW_ATTRIB_DEPRECATED;
+ _CRTIMP void __cdecl _sleep(unsigned long _Duration) __MINGW_ATTRIB_DEPRECATED;
#endif
#ifndef NO_OLDNAMES