summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanny Smith <dannysmith@users.sourceforge.net>2006-09-10 21:16:05 +0000
committerDanny Smith <dannysmith@users.sourceforge.net>2006-09-10 21:16:05 +0000
commit910edf4a02c73d0af14d03caff67f9fd94cb4890 (patch)
tree3f23320f3bb2c450a9338337e70b1d6e9cc13fba
parent88a815f3c0fe301bd17777620759b603bf8b9306 (diff)
downloadcygnal-910edf4a02c73d0af14d03caff67f9fd94cb4890.tar.gz
cygnal-910edf4a02c73d0af14d03caff67f9fd94cb4890.tar.bz2
cygnal-910edf4a02c73d0af14d03caff67f9fd94cb4890.zip
* include/_mingw.h (__MINGW_ATTRIB_DEPRECATED): Define.
(__MINGW_IMPORT): Ansify. * include/stdlib.h (_sleep, _beep, _seterrormode): Add __MINGW_ATTRIB_DEPRECATED.
-rw-r--r--winsup/mingw/ChangeLog7
-rw-r--r--winsup/mingw/include/_mingw.h8
-rw-r--r--winsup/mingw/include/stdlib.h8
3 files changed, 18 insertions, 5 deletions
diff --git a/winsup/mingw/ChangeLog b/winsup/mingw/ChangeLog
index c3f845307..2eedf3afe 100644
--- a/winsup/mingw/ChangeLog
+++ b/winsup/mingw/ChangeLog
@@ -1,3 +1,10 @@
+2006-09-10 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * include/_mingw.h (__MINGW_ATTRIB_DEPRECATED): Define.
+ (__MINGW_IMPORT): Ansify.
+ * include/stdlib.h (_sleep, _beep, _seterrormode): Add
+ __MINGW_ATTRIB_DEPRECATED.
+
2006-09-10 Keith Marshall <keithmarshall@users.sourceforge.net>
* aclocal.m4 (LIB_AC_PROG_CC, LIB_AC_PROG_CC_GNU, LIB_AC_PROG_CXX):
diff --git a/winsup/mingw/include/_mingw.h b/winsup/mingw/include/_mingw.h
index 59f4f39b6..c0b1ac9fa 100644
--- a/winsup/mingw/include/_mingw.h
+++ b/winsup/mingw/include/_mingw.h
@@ -61,7 +61,7 @@
# ifndef __MINGW_IMPORT
/* Note the extern. This is needed to work around GCC's
limitations in handling dllimport attribute. */
-# define __MINGW_IMPORT extern __attribute__ ((dllimport))
+# define __MINGW_IMPORT extern __attribute__ ((__dllimport__))
# endif
# ifndef _CRTIMP
# ifdef __USE_CRTIMP
@@ -153,6 +153,12 @@
#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__ 0x0600
diff --git a/winsup/mingw/include/stdlib.h b/winsup/mingw/include/stdlib.h
index 0156949f1..c69746dad 100644
--- a/winsup/mingw/include/stdlib.h
+++ b/winsup/mingw/include/stdlib.h
@@ -14,7 +14,6 @@
/* All the headers include this file. */
#include <_mingw.h>
-
#define __need_size_t
#define __need_wchar_t
#define __need_NULL
@@ -383,9 +382,10 @@ _CRTIMP ldiv_t __cdecl ldiv (long, long) __MINGW_ATTRIB_CONST;
* NOTE: Officially the three following functions are obsolete. The Win32 API
* functions SetErrorMode, Beep and Sleep are their replacements.
*/
-_CRTIMP void __cdecl _beep (unsigned int, unsigned int);
-_CRTIMP void __cdecl _seterrormode (int);
-_CRTIMP void __cdecl _sleep (unsigned long);
+_CRTIMP void __cdecl _beep (unsigned int, unsigned int) __MINGW_ATTRIB_DEPRECATED;
+/* Not to be confused with _set_error_mode (int). */
+_CRTIMP void __cdecl _seterrormode (int) __MINGW_ATTRIB_DEPRECATED;
+_CRTIMP void __cdecl _sleep (unsigned long) __MINGW_ATTRIB_DEPRECATED;
_CRTIMP void __cdecl _exit (int) __MINGW_ATTRIB_NORETURN;