From: Howard Chu Date: Wed, 4 Feb 2004 22:53:17 +0000 (+0000) Subject: Fix prev EBCDIC commit X-Git-Tag: OPENLDAP_REL_ENG_2_2_BP~437 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f8d54b4e87dadc0672e59e4158be8b0bb84cd59a;p=openldap Fix prev EBCDIC commit --- diff --git a/libraries/liblber/debug.c b/libraries/liblber/debug.c index 042627f56a..6a4329562a 100644 --- a/libraries/liblber/debug.c +++ b/libraries/liblber/debug.c @@ -304,6 +304,7 @@ void (lutil_debug)( int debug, int level, const char *fmt, ... ) } #if defined(HAVE_EBCDIC) && defined(LDAP_SYSLOG) +#undef syslog void eb_syslog( int pri, const char *fmt, ... ) { char buffer[4096]; @@ -313,8 +314,11 @@ void eb_syslog( int pri, const char *fmt, ... ) vsnprintf( buffer, sizeof(buffer), fmt, vl ); buffer[sizeof(buffer)-1] = '\0'; + /* The syslog function appears to only work with pure EBCDIC */ __atoe(buffer); +#pragma convlit(suspend) syslog( pri, "%s", buffer ); +#pragma convlit(resume) va_end( vl ); } #endif