* configure.in: Look for uint32_t, not int32_t, since some BSD-ish
authorTom Yu <tlyu@mit.edu>
Thu, 26 Aug 2004 23:13:46 +0000 (23:13 +0000)
committerTom Yu <tlyu@mit.edu>
Thu, 26 Aug 2004 23:13:46 +0000 (23:13 +0000)
sys/types.h headers have int32_t and u_int32_t, but only have
uint32_t in stdint.h.

* types.hin: Change int32_t checks to uint32_t checks.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16686 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/rpc/ChangeLog
src/lib/rpc/configure.in
src/lib/rpc/types.hin

index 1e90d7fdaa0dbe311ed2258f79c7f474f6bf9802..2df8c5830a23c9607ee66bebb0a3fb0d4cf925c4 100644 (file)
@@ -1,3 +1,11 @@
+2004-08-26  Tom Yu  <tlyu@mit.edu>
+
+       * configure.in: Look for uint32_t, not int32_t, since some BSD-ish
+       sys/types.h headers have int32_t and u_int32_t, but only have
+       uint32_t in stdint.h.
+
+       * types.hin: Change int32_t checks to uint32_t checks.
+
 2004-08-17  Tom Yu  <tlyu@mit.edu>
 
        * svc.c (svc_getreqset): Allocate cred and verf memory to
index 7e3170abff80aa9417f69bfff88495871d585e70..404840649f79f5016023daaf6c8c3bc4a4a3dc3b 100644 (file)
@@ -81,44 +81,44 @@ fi
 AC_SUBST(GSSRPC__SYS_PARAM_H)
 AC_SUBST(GSSRPC__NETDB_H)
 
-AC_CACHE_CHECK([for int32_t in sys/types.h],
-  [krb5_cv_header_sys_types_h_int32_t],
+AC_CACHE_CHECK([for uint32_t in sys/types.h],
+  [krb5_cv_header_sys_types_h_uint32_t],
   [AC_TRY_COMPILE([#include <sys/types.h>],
-      [int32_t i = 0;],
-      [krb5_cv_header_sys_types_h_int32_t=yes],
-      [krb5_cv_header_sys_types_h_int32_t=no])])
-AC_CACHE_CHECK([for int32_t in stdint.h],
-  [krb5_cv_header_stdint_h_int32_t],
+      [uint32_t i = 0;],
+      [krb5_cv_header_sys_types_h_uint32_t=yes],
+      [krb5_cv_header_sys_types_h_uint32_t=no])])
+AC_CACHE_CHECK([for uint32_t in stdint.h],
+  [krb5_cv_header_stdint_h_uint32_t],
   [AC_TRY_COMPILE([#include <stdint.h>],
-      [int32_t i = 0;],
-      [krb5_cv_header_stdint_h_int32_t=yes],
-      [krb5_cv_header_stdint_h_int32_t=no])])
-AC_CACHE_CHECK([for int32_t in inttypes.h],
-  [krb5_cv_header_inttypes_h_int32_t],
+      [uint32_t i = 0;],
+      [krb5_cv_header_stdint_h_uint32_t=yes],
+      [krb5_cv_header_stdint_h_uint32_t=no])])
+AC_CACHE_CHECK([for uint32_t in inttypes.h],
+  [krb5_cv_header_inttypes_h_uint32_t],
   [AC_TRY_COMPILE([#include <inttypes.h>],
-      [int32_t i = 0;],
-      [krb5_cv_header_inttypes_h_int32_t=yes],
-      [krb5_cv_header_inttypes_h_int32_t=no])])
+      [uint32_t i = 0;],
+      [krb5_cv_header_inttypes_h_uint32_t=yes],
+      [krb5_cv_header_inttypes_h_uint32_t=no])])
 GSSRPC__STDINT_H='/* #include <stdint.h> */'
 GSSRPC__INTTYPES_H='/* #include <inttypes.h> */'
-GSSRPC__FAKE_INT32='/* #undef GSSRPC__FAKE_INT32 */'
-if test $krb5_cv_header_sys_types_h_int32_t = yes; then
+GSSRPC__FAKE_UINT32='/* #undef GSSRPC__FAKE_INT32 */'
+if test $krb5_cv_header_sys_types_h_uint32_t = yes; then
   : # already included sys/types.h
 else
-  if test $krb5_cv_header_stdint_h_int32_t = yes; then
+  if test $krb5_cv_header_stdint_h_uint32_t = yes; then
     GSSRPC__STDINT_H='#include <stdint.h>'
   else
-    if test $krb5_cv_header_inttypes_h_int_32_t = yes; then
+    if test $krb5_cv_header_inttypes_h_uint32_t = yes; then
       GSSRPC__INTTYPES_H='#include <inttypes.h>'
     else
       AC_MSG_WARN([can't find a fixed-width 32-bit type anywhere; faking it])
-      GSSRPC__FAKE_INT32='#define GSSRPC__FAKE_INT32 1'
+      GSSRPC__FAKE_UINT32='#define GSSRPC__FAKE_UINT32 1'
     fi
   fi
 fi
 AC_SUBST(GSSRPC__STDINT_H)
 AC_SUBST(GSSRPC__INTTYPES_H)
-AC_SUBST(GSSRPC__FAKE_INT32)
+AC_SUBST(GSSRPC__FAKE_UINT32)
 
 AC_CACHE_CHECK([for BSD type aliases], [krb5_cv_type_bsdaliases],
   [AC_TRY_COMPILE(
index 8c10b715ad624661fa67fee05322eeddedb1b78f..ed612f1f5b54a7783b6f236c1401146e026569b2 100644 (file)
@@ -58,8 +58,8 @@
  */
 @GSSRPC__STDINT_H@
 @GSSRPC__INTTYPES_H@
-/* Define if there is no int32_t in system headers. */
-@GSSRPC__FAKE_INT32@
+/* Define if there is no uint32_t in system headers. */
+@GSSRPC__FAKE_UINT32@
 
 #include <limits.h>
 
@@ -80,12 +80,12 @@ GSSRPC__BEGIN_DECLS
 #endif
 
 /*
- * If no int32_t in system headers, fake it by looking for a 32-bit
+ * If no uint32_t in system headers, fake it by looking for a 32-bit
  * two's-complement type.  Yes, this stomps on POSIX namespace, but if
  * we get here, we're on a system that's far from being
  * POSIX-compliant anyway.
  */
-#if GSSRPC__FAKE_INT32
+#if GSSRPC__FAKE_UINT32
 #if (UINT_MAX == 0xffffffffUL) && (INT_MAX == 0x7fffffffL) \
        && (INT_MIN == -INT_MAX-1)
 typedef int            int32_t;
@@ -101,11 +101,11 @@ typedef unsigned long     uint32_t;
 typedef short          int32_t;
 typedef unsigned short uint32_t;
 #else
-#error "Can't fake up int32_t."
+#error "Can't fake up uint32_t."
 #endif
 #endif
 #endif
-#endif /* GSSRPC__FAKE_INT32 */
+#endif /* GSSRPC__FAKE_UINT32 */
 
 #if (LONG_MIN != -LONG_MAX-1) || (INT_MIN != -INT_MAX-1) \
        || (SHRT_MIN != -SHRT_MAX-1)