diff options
| author | Ken Raeburn <raeburn@mit.edu> | 2006-03-31 02:03:25 +0000 |
|---|---|---|
| committer | Ken Raeburn <raeburn@mit.edu> | 2006-03-31 02:03:25 +0000 |
| commit | afd5eb7ee761696dc499a0532df7483d95d68a47 (patch) | |
| tree | 20802b7f4f84405bf71c354b302c32c8c7e4eda7 /src/util | |
| parent | df7b8fbe4f34b29b1340e4998bc5827f1f1a4fbc (diff) | |
| download | krb5-afd5eb7ee761696dc499a0532df7483d95d68a47.tar.gz krb5-afd5eb7ee761696dc499a0532df7483d95d68a47.tar.xz krb5-afd5eb7ee761696dc499a0532df7483d95d68a47.zip | |
* 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
Diffstat (limited to 'src/util')
| -rw-r--r-- | src/util/profile/ChangeLog | 10 | ||||
| -rw-r--r-- | src/util/profile/configure.in | 3 | ||||
| -rw-r--r-- | src/util/profile/prof_init.c | 17 | ||||
| -rw-r--r-- | src/util/profile/prof_int.h | 6 |
4 files changed, 17 insertions, 19 deletions
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 <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. 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 <sys/types.h> 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 <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) 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; /* |
