vsyslog is not included in SUSv3. Add a check for platforms that do not have vsyslog
This commit was SVN r24339.
Этот коммит содержится в:
родитель
4674e62929
Коммит
3a8d251daa
@ -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,
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user