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 + + * 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 * 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;