From 61eb7d88387b3870ae2a8dd924b1ced4516b7846 Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Tue, 13 Feb 2001 03:46:15 +0000 Subject: [PATCH] provide-snprintf-for-irix-dux-20010212 So we can use snprintf, provide it for platforms that don't have it --- src/util/Makefile | 5 ++++- src/util/snprintf.c | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/util/Makefile b/src/util/Makefile index 9b1377012e..86eadede21 100644 --- a/src/util/Makefile +++ b/src/util/Makefile @@ -16,7 +16,7 @@ INSTALL = ${SRCDIR}bin/install objects = assert.o base64.o casestrcpy.o ktime.o volparse.o hostparse.o \ hputil.o kreltime.o isathing.o get_krbrlm.o uuid.o serverLog.o \ dirpath.o fileutil.o netutils.o flipbase64.o \ - afs_atomlist.o afs_lhash.o + afs_atomlist.o afs_lhash.o snprintf.o headers = assert.h potpourri.h itc.h errors.h afsutil.h pthread_glock.h \ dirpath.h afs_atomlist.h afs_lhash.h @@ -76,6 +76,9 @@ util.a: ${objects} AFS_component_version_number.o volparse.o: volparse.c ${CC} ${CFLAGS} -c volparse.c +snprintf.o: snprintf.c + ${CC} ${CFLAGS} -c snprintf.c + base64.o: base64.c ${CC} ${CFLAGS} -c base64.c diff --git a/src/util/snprintf.c b/src/util/snprintf.c index bad2699224..c789dc740f 100644 --- a/src/util/snprintf.c +++ b/src/util/snprintf.c @@ -1,5 +1,8 @@ /* snprintf.c - Formatted, length-limited print to a string */ +#include +#if defined(AFS_OSF20_ENV) || defined(AFS_SGI51_ENV) + #include #include #include @@ -381,3 +384,4 @@ void snprintf(char *p, unsigned int avail, char *fmt, ...) vsnprintf(p, avail, fmt, ap); va_end(ap); } +#endif /* AFS_OSF20_ENV || AFS_SGI51_ENV */