1.10.0 include/machine/types.h patch

J. Johnston jjohnstn@redhat.com
Thu Jan 16 22:41:00 GMT 2003


Patch checked in.

-- Jeff J.

Joel Sherrill wrote:
> 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__)
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> 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__)




More information about the Newlib mailing list