diff options
| author | Keith Vetter <keithv@fusion.com> | 1995-07-06 01:39:47 +0000 |
|---|---|---|
| committer | Keith Vetter <keithv@fusion.com> | 1995-07-06 01:39:47 +0000 |
| commit | ad04b0224f8ba5209ca25ad3d94a24d0cf3dae06 (patch) | |
| tree | 6ac5e2e057c1c05f099d6c4eedefc732a6aaa95b /src/util | |
| parent | c2e72b506ff5ea2b92f026be2bfaff1851c87432 (diff) | |
Changes for Macintosh implementation
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6229 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/util')
| -rw-r--r-- | src/util/et/ChangeLog | 4 | ||||
| -rw-r--r-- | src/util/et/com_err.c | 2 | ||||
| -rw-r--r-- | src/util/et/com_err.h | 2 | ||||
| -rw-r--r-- | src/util/et/vfprintf.c | 5 | ||||
| -rw-r--r-- | src/util/profile/ChangeLog | 6 | ||||
| -rw-r--r-- | src/util/profile/prof_file.c | 13 | ||||
| -rw-r--r-- | src/util/profile/prof_int.h | 5 | ||||
| -rw-r--r-- | src/util/profile/test_parse.c | 3 |
8 files changed, 35 insertions, 5 deletions
diff --git a/src/util/et/ChangeLog b/src/util/et/ChangeLog index ea8ce7a0b..903429b6c 100644 --- a/src/util/et/ChangeLog +++ b/src/util/et/ChangeLog @@ -1,3 +1,7 @@ +Wed July 5 15:52:31 1995 James Mattly <mattly@fusion.com> + * com_err.[ch] added _MACINTOSH conditional + * vsprintf.h added inclusion of stdarg.h for _MACINTSOH + Fri Jun 23 20:08:16 1995 Tom Yu (tlyu@dragons-lair) * configure.in: fix typo; appended "all" rule needs two colons to diff --git a/src/util/et/com_err.c b/src/util/et/com_err.c index 7a39966b7..5b4940947 100644 --- a/src/util/et/com_err.c +++ b/src/util/et/com_err.c @@ -8,7 +8,7 @@ #include <string.h> #include "mit-sipb-copyright.h" -#if defined(HAVE_STDARG_H) || defined(_WINDOWS) +#if defined(HAVE_STDARG_H) || defined(_WINDOWS) || defined (_MACINTOSH) #include <stdarg.h> #else #include <varargs.h> diff --git a/src/util/et/com_err.h b/src/util/et/com_err.h index 461558876..05f0d04dc 100644 --- a/src/util/et/com_err.h +++ b/src/util/et/com_err.h @@ -14,7 +14,7 @@ #ifndef HAVE_STDARG_H /* End-user programs may need this -- oh well */ -#if defined(__STDC__) || defined(_WINDOWS) +#if defined(__STDC__) || defined(_WINDOWS) || defined(_MACINTOSH) #define HAVE_STDARG_H 1 #endif #endif diff --git a/src/util/et/vfprintf.c b/src/util/et/vfprintf.c index 65589923e..d397e9ede 100644 --- a/src/util/et/vfprintf.c +++ b/src/util/et/vfprintf.c @@ -18,7 +18,12 @@ /* based on @(#)vfprintf.c 5.2 (Berkeley) 6/27/88 */ #include <stdio.h> +#if defined(HAVE_STDARG_H) || defined(_WINDOWS) || defined (_MACINTOSH) +#include <stdarg.h> +#else #include <varargs.h> +#define VARARGS +#endif int vfprintf(iop, fmt, ap) diff --git a/src/util/profile/ChangeLog b/src/util/profile/ChangeLog index 3329ddef7..d81db6bac 100644 --- a/src/util/profile/ChangeLog +++ b/src/util/profile/ChangeLog @@ -1,3 +1,9 @@ +Wed July 5 15:52:31 1995 James Mattly <mattly@fusion.com> + * prof_file.c added conditionals for sys/*.h include files + * prof_int.h added _MACINTOSH conditional + * test_parse.c added _MACINTOSH conditional + +======= Fri Jun 9 19:00:19 1995 <tytso@rsx-11.mit.edu> * configure.in: Remove standardized set of autoconf macros, which diff --git a/src/util/profile/prof_file.c b/src/util/profile/prof_file.c index b4b305e18..24a0b3c0b 100644 --- a/src/util/profile/prof_file.c +++ b/src/util/profile/prof_file.c @@ -2,14 +2,19 @@ * prof_file.c ---- routines that manipulate an individual profile file. */ +#include "prof_int.h" + #include <stdio.h> #include <stdlib.h> #include <string.h> +#ifndef NO_SYS_TYPES_H #include <sys/types.h> +#endif +#ifndef NO_SYS_STAT_H #include <sys/stat.h> +#endif #include <errno.h> -#include "prof_int.h" #ifdef _WINDOWS #define stat _stat @@ -47,13 +52,17 @@ errcode_t profile_update_file(prf) prf_file_t prf; { errcode_t retval; +#ifdef HAS_STAT struct stat st; +#endif FILE *f; +#ifdef HAS_STAT if (stat(prf->filename, &st)) return errno; if (st.st_mtime == prf->timestamp) return 0; +#endif if (prf->root) profile_free_node(prf->root); f = fopen(prf->filename, "r"); @@ -63,7 +72,9 @@ errcode_t profile_update_file(prf) fclose(f); if (retval) return retval; +#ifdef HAS_STAT prf->timestamp = st.st_mtime; +#endif return 0; } diff --git a/src/util/profile/prof_int.h b/src/util/profile/prof_int.h index 940e2ac9a..8327da498 100644 --- a/src/util/profile/prof_int.h +++ b/src/util/profile/prof_int.h @@ -11,6 +11,11 @@ #define PROTOTYPE(x) () #endif +#if defined(_MACINTOSH) +#define NO_SYS_TYPES_H +#define NO_SYS_STAT_H +#endif + typedef long errcode_t; /* diff --git a/src/util/profile/test_parse.c b/src/util/profile/test_parse.c index ad1956657..0e92fdaeb 100644 --- a/src/util/profile/test_parse.c +++ b/src/util/profile/test_parse.c @@ -6,11 +6,10 @@ #include "prof_int.h" -#ifndef _MSDOS +#if !defined(_MSDOS) && !defined(_MACINTOSH) #include "com_err.h" #else -#include "prof_int.h" #define initialize_prof_error_table() char *error_message (long err) { static char buf[50]; |
