changeset 5389:cb65ad0582a2

(gl_AC_TYPE_UINT32_T): 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 not available. Define _UINT32_T to work around typedef of uint32_t if <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris 2.5.1.
author Paul Eggert <eggert@cs.ucla.edu>
date Wed, 03 Nov 2004 17:20:32 +0000
parents 4966ef3f0d28
children b5cb1c9cb639
files m4/uint32_t.m4
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/m4/uint32_t.m4
+++ b/m4/uint32_t.m4
@@ -27,13 +27,17 @@
        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.])