From 2108cc81195f30adabd926b47a62e35397ee5ab6 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Sun, 14 Dec 2003 15:31:10 +0000 Subject: [PATCH] move prof-int.h to be the first include file in order to obtain platform specific preprocessor variables used to selectively import other header files ticket: 2068 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15921 dc483132-0cff-0310-8789-dd5450dbe970 --- src/util/profile/ChangeLog | 6 ++++++ src/util/profile/argv_parse.c | 4 ++++ src/util/profile/prof_file.c | 4 ++-- src/util/profile/prof_get.c | 2 +- src/util/profile/prof_init.c | 4 ++-- src/util/profile/prof_parse.c | 4 ++-- src/util/profile/prof_set.c | 4 ++-- src/util/profile/prof_tree.c | 4 ++-- src/util/profile/test_parse.c | 4 ++-- src/util/profile/test_profile.c | 3 ++- 10 files changed, 25 insertions(+), 14 deletions(-) diff --git a/src/util/profile/ChangeLog b/src/util/profile/ChangeLog index 304c0315e..d826e3114 100644 --- a/src/util/profile/ChangeLog +++ b/src/util/profile/ChangeLog @@ -1,3 +1,9 @@ +2003-12-14 Jeffrey Altman + + * all files: move prof-int.h to be the first include file + in order to obtain platform specific config preprocessor + variables which are used to selectively include stdlib.h + 2003-07-03 Alexandra Ellwood * profile.hin: Remove leading spaces in #define and #include diff --git a/src/util/profile/argv_parse.c b/src/util/profile/argv_parse.c index 539517ad7..7740d5345 100644 --- a/src/util/profile/argv_parse.c +++ b/src/util/profile/argv_parse.c @@ -28,7 +28,11 @@ * Version 1.1, modified 2/27/1999 */ +#include "prof_int.h" + +#ifdef HAVE_STDLIB_H #include +#endif #include #include #include "argv_parse.h" diff --git a/src/util/profile/prof_file.c b/src/util/profile/prof_file.c index 04c833b45..357568def 100644 --- a/src/util/profile/prof_file.c +++ b/src/util/profile/prof_file.c @@ -2,6 +2,8 @@ * prof_file.c ---- routines that manipulate an individual profile file. */ +#include "prof_int.h" + #include #ifdef HAVE_STDLIB_H #include @@ -11,8 +13,6 @@ #endif #include -#include "prof_int.h" - #include #include #include diff --git a/src/util/profile/prof_get.c b/src/util/profile/prof_get.c index d678a25f2..80a18a1fc 100644 --- a/src/util/profile/prof_get.c +++ b/src/util/profile/prof_get.c @@ -4,6 +4,7 @@ * */ +#include "prof_int.h" #include #include #ifdef HAVE_STDLIB_H @@ -11,7 +12,6 @@ #endif #include #include -#include "prof_int.h" /* * These functions --- init_list(), end_list(), and add_to_list() are diff --git a/src/util/profile/prof_init.c b/src/util/profile/prof_init.c index 76a4943f2..2dbcd826f 100644 --- a/src/util/profile/prof_init.c +++ b/src/util/profile/prof_init.c @@ -3,6 +3,8 @@ * object. */ +#include "prof_int.h" + #include #include #ifdef HAVE_STDLIB_H @@ -10,8 +12,6 @@ #endif #include -#include "prof_int.h" - /* Find a 4-byte integer type */ #if (SIZEOF_SHORT == 4) typedef short prof_int32; diff --git a/src/util/profile/prof_parse.c b/src/util/profile/prof_parse.c index 56f1c30f0..b18b8befa 100644 --- a/src/util/profile/prof_parse.c +++ b/src/util/profile/prof_parse.c @@ -1,3 +1,5 @@ +#include "prof_int.h" + #include #include #ifdef HAVE_STDLIB_H @@ -6,8 +8,6 @@ #include #include -#include "prof_int.h" - #define SECTION_SEP_CHAR '/' #define STATE_INIT_COMMENT 1 diff --git a/src/util/profile/prof_set.c b/src/util/profile/prof_set.c index 5abf5ec9a..c121d64da 100644 --- a/src/util/profile/prof_set.c +++ b/src/util/profile/prof_set.c @@ -11,6 +11,8 @@ * */ +#include "prof_int.h" + #include #include #ifdef HAVE_STDLIB_H @@ -18,8 +20,6 @@ #endif #include -#include "prof_int.h" - static errcode_t rw_setup(profile) profile_t profile; { diff --git a/src/util/profile/prof_tree.c b/src/util/profile/prof_tree.c index 7032a34e9..38b86f368 100644 --- a/src/util/profile/prof_tree.c +++ b/src/util/profile/prof_tree.c @@ -17,6 +17,8 @@ */ +#include "prof_int.h" + #include #include #ifdef HAVE_STDLIB_H @@ -25,8 +27,6 @@ #include #include -#include "prof_int.h" - struct profile_node { errcode_t magic; char *name; diff --git a/src/util/profile/test_parse.c b/src/util/profile/test_parse.c index 7aa0eeb62..961149c80 100644 --- a/src/util/profile/test_parse.c +++ b/src/util/profile/test_parse.c @@ -1,3 +1,5 @@ +#include "prof_int.h" + #include #include #ifdef HAVE_STDLIB_H @@ -6,8 +8,6 @@ #include #include -#include "prof_int.h" - void dump_profile (struct profile_node *root, int level); int main(argc, argv) diff --git a/src/util/profile/test_profile.c b/src/util/profile/test_profile.c index 8a97dd2f7..5cdbf7689 100644 --- a/src/util/profile/test_profile.c +++ b/src/util/profile/test_profile.c @@ -2,13 +2,14 @@ * test_profile.c --- testing program for the profile routine */ +#include "prof_int.h" + #include #include #ifdef HAVE_STDLIB_H #include #endif -#include "prof_int.h" #include "argv_parse.h" #include "com_err.h" -- 2.26.2