From: Ken Raeburn Date: Fri, 31 Mar 2006 02:03:25 +0000 (+0000) Subject: * prof_int.h (SIZEOF_INT, SIZEOF_SHORT, SIZEOF_LONG)[_WIN32]: Don't define X-Git-Tag: krb5-1.5-alpha1~125 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=afd5eb7ee761696dc499a0532df7483d95d68a47;p=krb5.git * 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. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17815 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/util/profile/ChangeLog b/src/util/profile/ChangeLog index d687008ee..c3e074baa 100644 --- a/src/util/profile/ChangeLog +++ b/src/util/profile/ChangeLog @@ -1,3 +1,13 @@ +2006-03-30 Ken Raeburn + + * 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 * Makefile.in (generate-files-mac): Depend on profile.h. diff --git a/src/util/profile/configure.in b/src/util/profile/configure.in index 44f59088f..8003c28ec 100644 --- a/src/util/profile/configure.in +++ b/src/util/profile/configure.in @@ -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 diff --git a/src/util/profile/prof_init.c b/src/util/profile/prof_init.c index 9aafb3c63..888d46d0a 100644 --- a/src/util/profile/prof_init.c +++ b/src/util/profile/prof_init.c @@ -12,16 +12,13 @@ #endif #include -/* 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 +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +typedef int32_t prof_int32; errcode_t KRB5_CALLCONV profile_init(const_profile_filespec_t *files, profile_t *ret_profile) diff --git a/src/util/profile/prof_int.h b/src/util/profile/prof_int.h index 3ff2b0f51..70a8dd920 100644 --- a/src/util/profile/prof_int.h +++ b/src/util/profile/prof_int.h @@ -15,12 +15,6 @@ #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; /*