1
1

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

This commit was SVN r24339.
Этот коммит содержится в:
Nysal Jan 2011-02-02 10:05:57 +00:00
родитель 4674e62929
Коммит 3a8d251daa
2 изменённых файлов: 8 добавлений и 1 удалений

Просмотреть файл

@ -699,7 +699,7 @@ OMPI_CHECK_FUNC_LIB([dirname], [gen])
# Darwin doesn't need -lm, as it's a symlink to libSystem.dylib # Darwin doesn't need -lm, as it's a symlink to libSystem.dylib
OMPI_CHECK_FUNC_LIB([ceil], [m]) 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 # 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 # confused. On others, it's in the standard library, but stubbed with

Просмотреть файл

@ -82,7 +82,14 @@ static void mylog(orte_notifier_base_severity_t severity, int errcode,
const char *msg, va_list ap) const char *msg, va_list ap)
{ {
/* If there was a message, output it */ /* If there was a message, output it */
#if defined(HAVE_VSYSLOG)
vsyslog(severity, msg, ap); 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, static void myhelplog(orte_notifier_base_severity_t severity, int errcode,