svn commit: trunk/uClibc: include libc/sysdeps/linux/i386/bits

vda at uclibc.org vda at uclibc.org
Sun Jun 1 21:52:47 UTC 2008


Author: vda
Date: 2008-06-01 14:52:47 -0700 (Sun, 01 Jun 2008)
New Revision: 22173

Log:
Rework smallint machinery so that it will reliably fail to compile
even if arch overrides smallint size. Makes it easier to spot bugs
on such arches.



Modified:
   trunk/uClibc/include/unistd.h
   trunk/uClibc/libc/sysdeps/linux/i386/bits/wordsize.h


Changeset:
Modified: trunk/uClibc/include/unistd.h
===================================================================
--- trunk/uClibc/include/unistd.h	2008-06-01 21:51:12 UTC (rev 22172)
+++ trunk/uClibc/include/unistd.h	2008-06-01 21:52:47 UTC (rev 22173)
@@ -1109,11 +1109,11 @@
 
 
 #ifdef UCLIBC_INTERNAL
-#ifndef smallint /* if arch didn't override it in bits/wordsize.h */
-typedef int smallint;
-typedef unsigned smalluint;
-#define smallint smallint
+#ifndef smallint_type /* if arch didn't override it in bits/wordsize.h */
+#define smallint_type int
 #endif
+typedef signed smallint_type smallint;
+typedef unsigned smallint_type smalluint;
 #endif
 
 

Modified: trunk/uClibc/libc/sysdeps/linux/i386/bits/wordsize.h
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/i386/bits/wordsize.h	2008-06-01 21:51:12 UTC (rev 22172)
+++ trunk/uClibc/libc/sysdeps/linux/i386/bits/wordsize.h	2008-06-01 21:52:47 UTC (rev 22173)
@@ -19,9 +19,7 @@
 #define __WORDSIZE	32
 
 #ifdef UCLIBC_INTERNAL
-#ifndef smallint
-typedef signed char smallint;
-typedef unsigned char smalluint;
-#define smallint smallint
+#ifndef smallint_type
+#define smallint_type char
 #endif
 #endif




More information about the uClibc-cvs mailing list