Hello there,

Trying to enable syslog support with 6.4.2 on AIX4.[12] (gcc 2.8.1), I
have added:
* in Makefile.custom:
	CFLAGS+=-DUSE_SYSLOG -D_XOPEN_EXTENDED_SOURCE
(the -D_XOPEN_EXTENDED_SOURCE is for AIX's <syslog.h>
* and in trace.c:
*** trace.c.distrib     Wed Jun  2 11:45:34 1999
--- trace.c     Wed Jun  2 10:01:18 1999
***************
*** 21,26 ****
--- 21,27 ----
  
  #ifdef USE_SYSLOG
  #include <syslog.h>
+ int openlog_done = 0;
  #endif
  
  #include "postgres.h"


Seems to work fine.
Could the -D_XOPEN_EXTENDED_SOURCE be a problem somehow ?


TIA
-- 

        Thierry Holtzer

   E-mail : Thierry.Holtzer@ceram.fr
   ----------------------------------------------------------
   Dptmt Informatique d'Entreprise
   CERAM                                Tel : +33 4 9395 4545
   Rue Dostoievski - BP 085             Fax : +33 4 9365 4524
   06 902 Sophia-Antipolis Cedex  -  France

Wed, 02 Jun 1999 11:49:58 +0200
Thierry Holtzer <Thierry.Holtzer@ceram.fr>
6.4.2/AIX: syslog support seems alright ?
> Hello there,
> 
> Trying to enable syslog support with 6.4.2 on AIX4.[12] (gcc 2.8.1), I
> have added:
> * in Makefile.custom:

Seems this is already fixed in the current tree:
	
	void
	write_syslog(int level, char *line)
	{    static int  openlog_done = 0;
	
	    if (UseSyslog >= 1)    {
	        if (!openlog_done)
	        {
	            openlog_done = 1;
	            openlog(PG_LOG_IDENT, LOG_PID | LOG_NDELAY, PG_LOG_FACILITY);
	        }
	

> 	CFLAGS+=-DUSE_SYSLOG -D_XOPEN_EXTENDED_SOURCE
> (the -D_XOPEN_EXTENDED_SOURCE is for AIX's <syslog.h>
> * and in trace.c:
> *** trace.c.distrib     Wed Jun  2 11:45:34 1999
> --- trace.c     Wed Jun  2 10:01:18 1999
> ***************
> *** 21,26 ****
> --- 21,27 ----
>   
>   #ifdef USE_SYSLOG
>   #include <syslog.h>
> + int openlog_done = 0;
>   #endif
>   
>   #include "postgres.h"
> 
> 
> Seems to work fine.
> Could the -D_XOPEN_EXTENDED_SOURCE be a problem somehow ?
> 
> 
> TIA
> -- 
> 
>         Thierry Holtzer
> 
>    E-mail : Thierry.Holtzer@ceram.fr
>    ----------------------------------------------------------
>    Dptmt Informatique d'Entreprise
>    CERAM                                Tel : +33 4 9395 4545
>    Rue Dostoievski - BP 085             Fax : +33 4 9365 4524
>    06 902 Sophia-Antipolis Cedex  -  France
> 
> 


-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Wed, 2 Jun 1999 11:31:40 -0400 (EDT)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: [HACKERS] 6.4.2/AIX: syslog support seems alright ?