[ROOT] RE:syslog facility

From: Masaharu Goto (MXJ02154@nifty.ne.jp)
Date: Sat Nov 25 2000 - 02:40:10 MET


Hello Marc,

Cint supports 'long double' and it is handled as 'double'.

The problem you are seeing is a little different. Cint only
supports ANSI/ISO defined headers. Because <syslog.h> is not
included in ANSI, cint does not support it. <syslog.h> is taken
from the system directory which is heavily compiler dependent.
It includes many platform dependent symbols.

You need to create a DLL and a header file for syslog.h. Here
is the instruction.

  1) Create a directory, for example $CINTSYSDIR/lib/syslog
       $ mkdir $CINTSYSDIR/lib/syslog

  2) Create a dummy header for syslog. This header file has to
     include definition that you want to use in the interpreter.
     For example,  

       $ cat $CINTSYSDIR/lib/syslog/slg.h
       /* slg.h */
       #ifndef G__SYSLOG
       #define G__SYSLOG
       int openlog(char* x,int flag1,int flag2);
       int syslog(int flag1,char* fmt,char* arg1,char* arg2);
       int closelog();
       #endif

    (I notice one thing. Cint can not handle variable arguments.
     I guess syslog function takes variable arguments. This function
     is not usable from cint. This is a hard limitation. Variable
     arguments requires knowledge of stack's byte alignment. This
     makes cint platform dependent.)

   3) Create a dll
       $ makecint -mk makefile -dl syslog.dll -H slg.h
       $ make -f makefile
   
   4) Move syslog.dll as $CINTSYSDIR/include/syslog.dll

   5) Create $CINTSYSDIR/include/syslog.h as follows

#ifndef G__SYSLOG_H
#define G__SYSLOG_H

#pragma include_noerr "syslog.dll"

#ifndef G__SYSLOG /* G__SYSLOG is defined in syslog.dll */
#error syslog.dll is not ready. Do 'make' in $CINTSYSDIR/lib/syslog
#endif

#endif


I hope this information helps. 

Thank you
Masaharu Goto



>
>Hi Masa,
>
>I tried to interpret a very basic syslog program. But it does not work,
>becuase of 'long double' as missing type 
>([hemberg@dino cradle]$ cint SysLog.c
>Limitation: macro handled as typedef char __ptr_t;
>FILE:/usr/include/sys/cdefs.h
> LINE:91
>Limitation: can not handle macro __long_double_t longdouble Use +P or -p
>option)
>
>And then the opnelog method is not known. Can you help me out of that?
>
>Greetings,
>
>Marc
>
>> -----------------------------------------------
>> realTech system consulting GmbH
>> Dr. Marc Hemberger   Tel.: (+49)6227/837-315
>> Development          Fax: (+49)6227/837-291
>> Industriestrasse 39c mailto:hemberger@realTech.de
>> 69190 Walldorf, Germany      http://www.realTech.de
>> 
>> 



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:37 MET