From 512ab376b650410391e5fabaf7329647d0fe72f4 Mon Sep 17 00:00:00 2001 From: kettenis <> Date: Thu, 5 Jan 2012 20:37:50 +0000 Subject: [PATCH] C99 says that both and should define WCHAR_MIN/MAX. ok beck@, guenther@, millert@, miod@ --- src/include/wchar.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/include/wchar.h b/src/include/wchar.h index a631fb0b..91b75336 100644 --- a/src/include/wchar.h +++ b/src/include/wchar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: wchar.h,v 1.21 2011/10/16 13:22:06 stsp Exp $ */ +/* $OpenBSD: wchar.h,v 1.22 2012/01/05 20:37:50 kettenis Exp $ */ /* $NetBSD: wchar.h,v 1.16 2003/03/07 07:11:35 tshiozak Exp $ */ /*- @@ -94,10 +94,17 @@ typedef __wint_t wint_t; typedef __size_t size_t; #endif -#ifndef WEOF +#ifndef WEOF #define WEOF ((wint_t)-1) #endif +#ifndef WCHAR_MIN +#define WCHAR_MIN (-0x7fffffff - 1) +#endif +#ifndef WCHAR_MAX +#define WCHAR_MAX 0x7fffffff +#endif + __BEGIN_DECLS wint_t btowc(int); size_t mbrlen(const char * __restrict, size_t, mbstate_t * __restrict);