Module Name:    src
Committed By:   christos
Date:           Wed Mar 28 17:04:41 UTC 2012

Modified Files:
        src/include: limits.h

Log Message:
make CHAR_{MIN,MAX} work for both -fsigned-char and -funsigned-char


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/include/limits.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/include/limits.h
diff -u src/include/limits.h:1.31 src/include/limits.h:1.32
--- src/include/limits.h:1.31	Thu Oct  6 12:02:52 2011
+++ src/include/limits.h	Wed Mar 28 13:04:41 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: limits.h,v 1.31 2011/10/06 16:02:52 christos Exp $	*/
+/*	$NetBSD: limits.h,v 1.32 2012/03/28 17:04:41 christos Exp $	*/
 
 /*
  * Copyright (c) 1988, 1993
@@ -162,6 +162,15 @@
 #endif
 
 #include <machine/limits.h>
+
+#ifdef __CHAR_UNSIGNED__
+# define CHAR_MIN     0
+# define CHAR_MAX     UCHAR_MAX
+#else
+# define CHAR_MIN     SCHAR_MIN
+# define CHAR_MAX     SCHAR_MAX
+#endif
+
 #include <sys/syslimits.h>
 
 #endif /* !_LIMITS_H_ */

Reply via email to