[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug in AC_TYPE_UINT32_T on Solaris 2.5.1

From: Ralf Wildenhues
Subject: Re: bug in AC_TYPE_UINT32_T on Solaris 2.5.1
Date: Sun, 18 Jun 2006 10:39:21 +0200
User-agent: Mutt/1.5.11+cvs20060403

Hello Bruno,

* Bruno Haible wrote on Sat, Jun 17, 2006 at 07:37:45PM CEST:
> The types uint8_t, uint32_t, defined by autoconf-2.59d
> AC_TYPE_UINT32_T etc. collide with the types defined in <pthread.h>
> on that platform.

> pthread.h looks like this:
> #ifndef _UINT8_T
> typedef unsigned char   uint8_t;
> #define _UINT8_T
> #endif
> #ifndef _UINT32_T
> typedef unsigned long   uint32_t;
> #define _UINT32_T
> #endif
> #ifndef _UINT64_T
> typedef u_longlong_t    uint64_t;
> #define _UINT64_T
> #endif
> Therefore I'd suggest to define _UINT32_T at the same time you define
> uint32_t, and similarly for the others. Including <pthread.h> in the
> test would probably lead to trouble on some other platforms (think
> of _REENTRANT or -lc_r ...).

Thanks for the bug report.  Seems Autoconf already included a fix for
the 32 bit type, but not the 8 nor 64 bit one.  Could you check whether
this patch (against CVS Autoconf, but should work with 2.59d as well)
works for you?  Could you also please check sys/synch.h, pthread.h, and
semaphore.h on that platform for any other defines that may be necessary
(what about 16bit)?


        * lib/autoconf/types.m4 (_AC_TYPE_UNSIGNED_INT): Solaris 2.5.1
        needs _UINT8_T and _UINT64_T defines as well, to avoid clashes
        with system headers.  Report by Bruno Haible.

Index: lib/autoconf/types.m4
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/types.m4,v
retrieving revision 1.37
diff -u -r1.37 types.m4
--- lib/autoconf/types.m4       8 Apr 2006 21:46:04 -0000       1.37
+++ lib/autoconf/types.m4       18 Jun 2006 08:38:02 -0000
@@ -620,7 +620,7 @@
   case $ac_cv_c_uint$1_t in #(
   no|uint$1_t) ;; #(
-    m4_if([$1], 32,
+    m4_bmatch([$1], [^\(8\|32\|64\)$],
       [AC_DEFINE([_UINT$1_T], 1,
         [Define for Solaris 2.5.1 so the uint$1_t typedef from
          <sys/synch.h>, <pthread.h>, or <semaphore.h> is not used.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]