Back to index

openldap  2.4.31
syslog.h
Go to the documentation of this file.
00001 /* Generic syslog.h */
00002 /* $OpenLDAP$ */
00003 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
00004  *
00005  * Copyright 1998-2012 The OpenLDAP Foundation.
00006  * All rights reserved.
00007  *
00008  * Redistribution and use in source and binary forms, with or without
00009  * modification, are permitted only as authorized by the OpenLDAP
00010  * Public License.
00011  *
00012  * A copy of this license is available in file LICENSE in the
00013  * top-level directory of the distribution or, alternatively, at
00014  * <http://www.OpenLDAP.org/license.html>.
00015  */
00016 
00017 #ifndef _AC_SYSLOG_H_
00018 #define _AC_SYSLOG_H_
00019 
00020 #if defined( HAVE_SYSLOG_H )
00021 #include <syslog.h>
00022 #elif defined ( HAVE_SYS_SYSLOG_H )
00023 #include <sys/syslog.h>
00024 #endif
00025 
00026 #if defined( LOG_NDELAY ) && defined( LOG_NOWAIT )
00027 #      define OPENLOG_OPTIONS ( LOG_PID | LOG_NDELAY | LOG_NOWAIT )
00028 #elif defined( LOG_NDELAY )
00029 #      define OPENLOG_OPTIONS ( LOG_PID | LOG_NDELAY )
00030 #elif defined( LOG_NOWAIT )
00031 #      define OPENLOG_OPTIONS ( LOG_PID | LOG_NOWAIT )
00032 #elif defined( LOG_PID )
00033 #      define OPENLOG_OPTIONS ( LOG_PID )
00034 #else
00035 #   define OPENLOG_OPTIONS ( 0 )
00036 #endif
00037 
00038 #endif /* _AC_SYSLOG_H_ */