* prof_int.h (SIZEOF_INT, SIZEOF_SHORT, SIZEOF_LONG)[_WIN32]: Don't define
authorKen Raeburn <raeburn@mit.edu>
Fri, 31 Mar 2006 02:03:25 +0000 (02:03 +0000)
committerKen Raeburn <raeburn@mit.edu>
Fri, 31 Mar 2006 02:03:25 +0000 (02:03 +0000)
* configure.in: Don't test sizes of types.

* prof_init.c: Include stdint.h and inttypes.h if available.
(prof_int32): Always define as int32_t.

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

src/util/profile/ChangeLog
src/util/profile/configure.in
src/util/profile/prof_init.c
src/util/profile/prof_int.h

index d687008ee02cb8498989b50ea89784b601411472..c3e074baa191624d5f665493da52ff1afeb321a1 100644 (file)
@@ -1,3 +1,13 @@
+2006-03-30  Ken Raeburn  <raeburn@mit.edu>
+
+       * prof_int.h (SIZEOF_INT, SIZEOF_SHORT, SIZEOF_LONG)[_WIN32]:
+       Don't define.
+
+       * configure.in: Don't test sizes of types.
+
+       * prof_init.c: Include stdint.h and inttypes.h if available.
+       (prof_int32): Always define as int32_t.
+
 2006-03-10  Ken Raeburn  <raeburn@mit.edu>
 
        * Makefile.in (generate-files-mac): Depend on profile.h.
index 44f59088f32ffba1f22c2296b0760c3e9f184a20..8003c28ec4d9c222b965e6e420e64b02eb531a9d 100644 (file)
@@ -1,9 +1,6 @@
 K5_AC_INIT(prof_parse.c)
 CONFIG_RULES
 AC_C_CONST
-AC_CHECK_SIZEOF(short)
-AC_CHECK_SIZEOF(int)
-AC_CHECK_SIZEOF(long)
 AC_CHECK_HEADERS(unistd.h stdlib.h pwd.h)
 AC_CHECK_FUNCS(stat access strdup)
 AC_CHECK_MEMBERS([struct stat.st_mtimensec,struct stat.st_mtimespec.tv_nsec,struct stat.st_mtim.tv_nsec],,,[#include <sys/types.h>
index 9aafb3c63a05770c7169e149bcb3da360fa306a5..888d46d0a61ac72db3f639c91166517cc3378cbb 100644 (file)
 #endif
 #include <errno.h>
 
-/* Find a 4-byte integer type */
-#if    (SIZEOF_SHORT == 4)
-typedef short  prof_int32;
-#elif  (SIZEOF_INT == 4)
-typedef int    prof_int32;
-#elif  (SIZEOF_LONG == 4)
-typedef long   prof_int32;
-#else  /* SIZEOF_LONG == 4 */
-error(do not have a 4-byte integer type)
-#endif /* SIZEOF_LONG == 4 */
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+typedef int32_t prof_int32;
 
 errcode_t KRB5_CALLCONV
 profile_init(const_profile_filespec_t *files, profile_t *ret_profile)
index 3ff2b0f5161168a892532fad3ed212b98a290adf..70a8dd920853a7f5cb56551a6059b9f114473644 100644 (file)
 #include "com_err.h"
 #include "profile.h"
 
-#if defined(_WIN32)
-#define SIZEOF_INT      4
-#define SIZEOF_SHORT    2
-#define SIZEOF_LONG     4
-#endif
-
 typedef long prf_magic_t;
 
 /*