# ifdef LDAP_SYSLOG
extern int ldap_syslog;
extern int ldap_syslog_level;
+
+# ifdef HAVE_EBCDIC
+# define syslog eb_syslog
+ extern void eb_syslog(int pri, const char *fmt, ...);
+# endif
+
# endif /* LDAP_SYSLOG */
/* this doesn't below as part of ldap.h */
fputs( buffer, stderr );
va_end( vl );
}
+
+#if defined(HAVE_EBCDIC) && defined(LDAP_SYSLOG)
+void eb_syslog( int pri, const char *fmt, ... )
+{
+ char buffer[4096];
+ va_list vl;
+
+ va_start( vl, fmt );
+ vsnprintf( buffer, sizeof(buffer), fmt, vl );
+ buffer[sizeof(buffer)-1] = '\0';
+
+ __atoe(buffer);
+ syslog( pri, "%s", buffer );
+ va_end( vl );
+}
+#endif