Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nadezhda Ivanova
OpenLDAP
Commits
9f3b0d60
Commit
9f3b0d60
authored
Feb 03, 2004
by
Howard Chu
Browse files
Fix EBCDIC conversion for syslog()
parent
253f70e0
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/ldap_log.h
View file @
9f3b0d60
...
...
@@ -114,6 +114,12 @@ LDAP_BEGIN_DECL
# 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 */
...
...
libraries/liblber/debug.c
View file @
9f3b0d60
...
...
@@ -302,3 +302,19 @@ void (lutil_debug)( int debug, int level, const char *fmt, ... )
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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment