Syslog.h
Tony van der Hoff
tony at mk-net.demon.co.uk
Sun May 2 12:51:29 BST 2004
Philip Ludlam <philip at philipnet.com> wrote in message
<a15235a84c.philip at philipnet.com>
> Dear All,
>
> The syslog.h file (dated "written by DefMod (Dec 30 2003) on Tue Dec 30
> 14:23:19 2003" (*)):
>
> 1) doesn't #include os.h (and I guess hdr.syslog doesn't GET Hdr.OS
> either).
>
Yes. I guess everything needs os.h (or Hdr.OS) for os_error, so the correct
place to fix it is probably in DefMod.
I'll do that on the unix-build tree. Since there have been no adverse (or
any other :-) comments against that tree, I think now is the time to merge
it back into the trunk, so I'll do that at the same time.
> 2) the official specification for 'name_or_handle' is pointer to char or
> integer (from reading the syslog docs). As this is C any chance of a
> stuct or something to help avoid casting an int to a char* ?
>
Can you give me a reference to that "official specification", please Phil? I
can't find it anywhere obvious...
As for a fix, I think maybe the best way to do this is to define a second
set of functions, so that we get something like:
syslog_log_message( char const *name, char const *message, int priority );
and
syslog_log_message_handle( int handle, char const *message, int priority );
The former is backward-compatible.
I would also favour deprecating the syslog_open_session_log() and
syslog_close_session_log() calls, which don't make a lot of sense in favour
of new syslog_open_session_log_handle() and
syslog_close_session_log_handle() calls.
>
> *: I'm guessing that this is 6.60 from the details given on the website.
>
yes.
Cheers, Tony
--
Tony van der Hoff
Buckinghamshire England
More information about the oslib-user
mailing list