provide-snprintf-for-irix-dux-20010212

So we can use snprintf, provide it for platforms that don't have it
This commit is contained in:
Derrick Brashear 2001-02-13 03:46:15 +00:00
parent 54b2c2307a
commit 61eb7d8838
2 changed files with 8 additions and 1 deletions

View File

@ -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

View File

@ -1,5 +1,8 @@
/* snprintf.c - Formatted, length-limited print to a string */
#include <afs/param.h>
#if defined(AFS_OSF20_ENV) || defined(AFS_SGI51_ENV)
#include <sys/types.h>
#include <stdarg.h>
#include <stdio.h>
@ -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 */