4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-18 20:39:33 +08:00

* libc/include/stdint.h (WCHAR_MIN): Copy definition from wchar.h.

(WCHAR_MAX): Ditto.
	* libc/include/wchar.h (WCHAR_MIN): Add comment.
	(WCHAR_MAX): Ditto.
This commit is contained in:
Corinna Vinschen 2014-05-12 17:02:11 +00:00
parent 3ad50ff74a
commit c57ccec649
3 changed files with 27 additions and 3 deletions

View File

@ -1,3 +1,10 @@
2014-05-12 Corinna Vinschen <vinschen@redhat.com>
* libc/include/stdint.h (WCHAR_MIN): Copy definition from wchar.h.
(WCHAR_MAX): Ditto.
* libc/include/wchar.h (WCHAR_MIN): Add comment.
(WCHAR_MAX): Ditto.
2014-05-09 Corinna Vinschen <vinschen@redhat.com>
* libc/include/stdio.h (tempnam): Declare as __BSD_VISIBLE or

View File

@ -423,11 +423,26 @@ typedef __uintptr_t uintptr_t;
#endif
#define PTRDIFF_MIN (-PTRDIFF_MAX - 1)
#ifdef __WCHAR_MAX__
#define WCHAR_MAX __WCHAR_MAX__
#endif
/* This must match definition in <wchar.h> */
#ifndef WCHAR_MIN
#ifdef __WCHAR_MIN__
#define WCHAR_MIN __WCHAR_MIN__
#elif defined(__WCHAR_UNSIGNED__) || (L'\0' - 1 > 0)
#define WCHAR_MIN (0 + L'\0')
#else
#define WCHAR_MIN (-0x7fffffff - 1 + L'\0')
#endif
#endif
/* This must match definition in <wchar.h> */
#ifndef WCHAR_MAX
#ifdef __WCHAR_MAX__
#define WCHAR_MAX __WCHAR_MAX__
#elif defined(__WCHAR_UNSIGNED__) || (L'\0' - 1 > 0)
#define WCHAR_MAX (0xffffffffu + L'\0')
#else
#define WCHAR_MAX (0x7fffffff + L'\0')
#endif
#endif
/* wint_t is unsigned int on almost all GCC targets. */

View File

@ -24,6 +24,7 @@
# define WEOF ((wint_t)-1)
#endif
/* This must match definition in <stdint.h> */
#ifndef WCHAR_MIN
#ifdef __WCHAR_MIN__
#define WCHAR_MIN __WCHAR_MIN__
@ -34,6 +35,7 @@
#endif
#endif
/* This must match definition in <stdint.h> */
#ifndef WCHAR_MAX
#ifdef __WCHAR_MAX__
#define WCHAR_MAX __WCHAR_MAX__