bug-gnulib
[Top][All Lists]
Advanced

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

Re: [Bug-gnulib] gl_AC_TYPE_UINT32_T broken


From: Albert Chin
Subject: Re: [Bug-gnulib] gl_AC_TYPE_UINT32_T broken
Date: Wed, 3 Nov 2004 07:47:32 -0600
User-agent: Mutt/1.5.6i

On Tue, Nov 02, 2004 at 10:33:13PM -0600, Albert Chin wrote:
> gl_AC_TYPE_UINT32_T doesn't correctly define uint32_t on Solaris
> 2.5.1/SPARC. It should be obvious why after looking at the patch
> below.

Updated patch with Paul's suggestions from the bug-coreutils mailing
list.

-- 
albert chin (address@hidden)

-- snip snip
        * m4/uint32_t.m4: When determining uint32_t equivalent,
        substitute $ac_type for equivalent type rather than
        blindly using uint32_t *always* which won't work if
        uint32_t is unavailable.

Index: m4/uint32_t.m4
===================================================================
RCS file: /cvsroot/coreutils/coreutils/m4/uint32_t.m4,v
retrieving revision 1.2
diff -u -3 -p -r1.2 uint32_t.m4
--- m4/uint32_t.m4      4 Aug 2004 22:30:38 -0000       1.2
+++ m4/uint32_t.m4      3 Nov 2004 13:49:08 -0000
@@ -27,13 +27,17 @@ AC_DEFUN([gl_AC_TYPE_UINT32_T],
        AC_COMPILE_IFELSE(
         [AC_LANG_BOOL_COMPILE_TRY(
            [AC_INCLUDES_DEFAULT],
-           [[(uint32_t) -1 == 4294967295U]])],
+           [[($ac_type) -1 == 4294967295U]])],
         [gl_cv_c_uint32_t=$ac_type])
-       test $gl_cv_c_uint32_t != no && break
+       test "$gl_cv_c_uint32_t" != no && break
      done])
-  case $gl_cv_c_uint32_t in
+  case "$gl_cv_c_uint32_t" in
   no|uint32_t) ;;
   *)
+    AC_DEFINE(_UINT32_T, 1,
+      [Define for Solaris 2.5.1 so uint32_t typedef from <sys/synch.h>,
+       <pthread.h>, or <semaphore.h> is not used. If the typedef was
+       allowed, the #define below would cause a syntax error.])
     AC_DEFINE_UNQUOTED(uint32_t, $gl_cv_c_uint32_t,
       [Define to the type of a unsigned integer type of width exactly 32 bits
        if such a type exists and the standard includes do not define it.])




reply via email to

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