emulate-vsyslog-20071213

LICENSE IPL10

aix 5.3 lacks vsyslog. the fixed buffer is poor, but...
This commit is contained in:
Derrick Brashear 2007-12-13 22:41:11 +00:00
parent af3a4e7852
commit ea3d49eaea
2 changed files with 11 additions and 1 deletions

View File

@ -1210,7 +1210,7 @@ AC_SUBST(BUILD_LOGIN)
AC_CHECK_FUNCS(utimes random srandom getdtablesize snprintf strlcat strlcpy re_comp re_exec flock)
AC_CHECK_FUNCS(setprogname getprogname sigaction mkstemp vsnprintf strerror strcasestr)
AC_CHECK_FUNCS(setvbuf)
AC_CHECK_FUNCS(setvbuf vsyslog)
AC_FUNC_SETVBUF_REVERSED
AC_CHECK_FUNCS(regcomp regexec regerror)
AC_MSG_CHECKING([for POSIX regex library])

View File

@ -521,6 +521,16 @@ vsnprintf(char *p, unsigned int avail, char *fmt, va_list ap)
}
#endif /* AFS_OSF20_ENV || AFS_AIX32_ENV */
#ifndef HAVE_VSYSLOG
void
vsyslog(int priority, const char *format, va_list args)
{
char buf[1024];
vsnprintf(buf, sizeof(buf), format, args);
syslog(priority, "%s", buf);
}
#endif
#ifndef AFS_NT40_ENV
#if defined(AFS_OSF20_ENV) && !defined(AFS_DUX50_ENV) || defined(AFS_AIX32_ENV) || (defined(AFS_SUN55_ENV) && !defined(AFS_SUN56_ENV)) || !defined(HAVE_SNPRINTF)