This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

1.10.0 include/machine/types.h patch


I have attached a patch to ensure that intXX_t is explictly 
marked as signed for RTEMS.  There is similar code in another
file but that is not for RTEMS targets so I did not modify
it.  Based upon my understanding of the relevant standards,
it would be prudent to do the same thing on other targets.

Could you apply this please?


2003-01-13      Joel Sherrill <joel@OARcorp.com>

        * libc/include/machine/types.h: Explicitly specify signed on
intXX_t
        types to ensure they are signed.


diff -uNr
/usr1/rtems/work-tools/original/newlib-1.11.0/newlib/libc/include/machine/types.h
newlib-1.11.0/newlib/libc/include/machine/types.h
---
/usr1/rtems/work-tools/original/newlib-1.11.0/newlib/libc/include/machine/types.h  
Thu Nov  7 13:27:36 2002
+++ newlib-1.11.0/newlib/libc/include/machine/types.h   Thu Jan  9
08:46:36 2003@@ -8,14 +8,14 @@
  */

 #if defined(__rtems__)
-typedef long long          int64_t;
+typedef signed long long   int64_t;
 #if defined( __h8300__)
-typedef long               int32_t;
+typedef signed long        int32_t;
 #else
-typedef int                int32_t;
+typedef signed int         int32_t;
 #endif
-typedef short              int16_t;
-typedef char               int8_t;
+typedef signed short       int16_t;
+typedef signed char        int8_t;

 typedef unsigned long long u_int64_t;
 #if defined( __h8300__)


-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel@OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985
2003-01-13	Joel Sherrill <joel@OARcorp.com>

	* libc/include/machine/types.h: Explicitly specify signed on intXX_t
	types to ensure they are signed.

diff -uNr /usr1/rtems/work-tools/original/newlib-1.11.0/newlib/libc/include/machine/types.h newlib-1.11.0/newlib/libc/include/machine/types.h
--- /usr1/rtems/work-tools/original/newlib-1.11.0/newlib/libc/include/machine/types.h	Thu Nov  7 13:27:36 2002
+++ newlib-1.11.0/newlib/libc/include/machine/types.h	Thu Jan  9 08:46:36 2003
@@ -8,14 +8,14 @@
  */
 
 #if defined(__rtems__)
-typedef long long          int64_t;
+typedef signed long long   int64_t;
 #if defined( __h8300__)
-typedef long               int32_t;
+typedef signed long        int32_t;
 #else
-typedef int                int32_t;
+typedef signed int         int32_t;
 #endif
-typedef short              int16_t;
-typedef char               int8_t;
+typedef signed short       int16_t;
+typedef signed char        int8_t;
 
 typedef unsigned long long u_int64_t;
 #if defined( __h8300__)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]