This is the mail archive of the newlib@sourceware.org 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]

Re: UINT32_C redefined [PATCH]


Ping?

newlib/libc/include/stdint.h (UINT32_C) is redefined in
libc/sys/linux/linuxthreads/config.h.

--- newlib/libc/sys/linux/linuxthreads/config.h	28 May 2003 22:04:37 -0000	1.1
+++ newlib/libc/sys/linux/linuxthreads/config.h	17 Mar 2006 20:26:23 -0000
@@ -11,4 +11,4 @@
        while (__result == -1L && errno == EINTR);                             \
        __result; }))

-#define UINT32_C(c)    c ## U
+#define UINT32_C(x)	x##U

-- sdj

On 11/17/05, Shaun Jackman <sjackman@gmail.com> wrote:
> linuxthreads/config.h redefines UINT32_C. A few possible solutions come to mind:
>   * Remove this line and include stdint.h in the file that includes config.h.
>   * #ifndef UINT32_C / #define UINT32_C ... / #endif
>   * #include <stdint.h>
>   * #define UINT32_C(x) x##U
>
> The patch below takes the last approach, because it's the least
> invasive. One of the alternatives may be the `better' solution.
>
> Cheers,
> Shaun
>
> 2005-11-17  Shaun Jackman  <sjackman@gmail.com>
>
>         * libc/sys/linux/linuxthreads/config.h (UINT32_C): Use the same
>         definition as stdint.h.
>
> Index: newlib/libc/sys/linux/linuxthreads/config.h
> ===================================================================
> RCS file: /cvs/src/src/newlib/libc/sys/linux/linuxthreads/config.h,v
> retrieving revision 1.1
> diff -u -r1.1 config.h
> --- newlib/libc/sys/linux/linuxthreads/config.h 28 May 2003 22:04:37 -0000      1.1
> +++ newlib/libc/sys/linux/linuxthreads/config.h 17 Nov 2005 23:32:12 -0000
> @@ -11,4 +11,4 @@
>         while (__result == -1L && errno == EINTR);                             \
>         __result; }))
>
> -#define UINT32_C(c)    c ## U
> +#define UINT32_C(x)    x##U

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