1
1

vsyslog is not included in SUSv3. Add a check for platforms that do not have vsyslog

This commit was SVN r24339.
This commit is contained in:
Nysal Jan 2011-02-02 10:05:57 +00:00
parent 4674e62929
commit 3a8d251daa
2 changed files with 8 additions and 1 deletions

View File

@ -699,7 +699,7 @@ OMPI_CHECK_FUNC_LIB([dirname], [gen])
# Darwin doesn't need -lm, as it's a symlink to libSystem.dylib
OMPI_CHECK_FUNC_LIB([ceil], [m])
AC_CHECK_FUNCS([asprintf snprintf vasprintf vsnprintf openpty isatty getpwuid fork waitpid execve pipe ptsname setsid mmap tcgetpgrp posix_memalign strsignal sysconf syslog regcmp regexec regfree _NSGetEnviron socketpair strncpy_s _strdup usleep mkfifo dbopen dbm_open])
AC_CHECK_FUNCS([asprintf snprintf vasprintf vsnprintf openpty isatty getpwuid fork waitpid execve pipe ptsname setsid mmap tcgetpgrp posix_memalign strsignal sysconf syslog vsyslog regcmp regexec regfree _NSGetEnviron socketpair strncpy_s _strdup usleep mkfifo dbopen dbm_open])
# On some hosts, htonl is a define, so the AC_CHECK_FUNC will get
# confused. On others, it's in the standard library, but stubbed with

View File

@ -82,7 +82,14 @@ static void mylog(orte_notifier_base_severity_t severity, int errcode,
const char *msg, va_list ap)
{
/* If there was a message, output it */
#if defined(HAVE_VSYSLOG)
vsyslog(severity, msg, ap);
#else
char *output;
vasprintf(&output, msg, ap);
syslog(severity, output);
free(output);
#endif
}
static void myhelplog(orte_notifier_base_severity_t severity, int errcode,