mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
Fix prev EBCDIC commit
This commit is contained in:
parent
25c9bb33c7
commit
f8d54b4e87
@ -304,6 +304,7 @@ void (lutil_debug)( int debug, int level, const char *fmt, ... )
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(HAVE_EBCDIC) && defined(LDAP_SYSLOG)
|
#if defined(HAVE_EBCDIC) && defined(LDAP_SYSLOG)
|
||||||
|
#undef syslog
|
||||||
void eb_syslog( int pri, const char *fmt, ... )
|
void eb_syslog( int pri, const char *fmt, ... )
|
||||||
{
|
{
|
||||||
char buffer[4096];
|
char buffer[4096];
|
||||||
@ -313,8 +314,11 @@ void eb_syslog( int pri, const char *fmt, ... )
|
|||||||
vsnprintf( buffer, sizeof(buffer), fmt, vl );
|
vsnprintf( buffer, sizeof(buffer), fmt, vl );
|
||||||
buffer[sizeof(buffer)-1] = '\0';
|
buffer[sizeof(buffer)-1] = '\0';
|
||||||
|
|
||||||
|
/* The syslog function appears to only work with pure EBCDIC */
|
||||||
__atoe(buffer);
|
__atoe(buffer);
|
||||||
|
#pragma convlit(suspend)
|
||||||
syslog( pri, "%s", buffer );
|
syslog( pri, "%s", buffer );
|
||||||
|
#pragma convlit(resume)
|
||||||
va_end( vl );
|
va_end( vl );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user