Syslog.h

Philip Ludlam philip at philipnet.com
Sun May 2 16:47:24 BST 2004


On 2 May, in message <gemini.hx34xt04f3nzk01rp.tony at mk-net.demon.co.uk>
  Tony van der Hoff <tony at mk-net.demon.co.uk> wrote:

>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" (*)):

[snip]

>> 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...

The !Help file that accompanies !SysLog: http://www.compton.nu/syslog.html
and the InetSWIs StrongHelp file: http://sudden.recoil.org/stronghelp/index.php
detail the SysLog API.

>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.

Quite. (x)syslog_close_session_log wants a char* when the docs say it
requires an (unsigned ?) int and (x)syslog_open_session_log returns a
char* when the docs say it returns an (unsigned ?) int.

Yours,

Phil L.
-- 
http://www.philipnet.com | http://director.sourceforge.net




More information about the oslib-user mailing list