xref: /netbsd-src/external/bsd/openldap/dist/include/ac/syslog.h (revision b1c86f5f087524e68db12794ee9c3e3da1ab17a0)
1 /*	$NetBSD: syslog.h,v 1.1.1.2 2010/03/08 02:14:20 lukem Exp $	*/
2 
3 /* Generic syslog.h */
4 /* OpenLDAP: pkg/ldap/include/ac/syslog.h,v 1.17.2.4 2009/01/22 00:00:52 kurt Exp */
5 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
6  *
7  * Copyright 1998-2009 The OpenLDAP Foundation.
8  * All rights reserved.
9  *
10  * Redistribution and use in source and binary forms, with or without
11  * modification, are permitted only as authorized by the OpenLDAP
12  * Public License.
13  *
14  * A copy of this license is available in file LICENSE in the
15  * top-level directory of the distribution or, alternatively, at
16  * <http://www.OpenLDAP.org/license.html>.
17  */
18 
19 #ifndef _AC_SYSLOG_H_
20 #define _AC_SYSLOG_H_
21 
22 #if defined( HAVE_SYSLOG_H )
23 #include <syslog.h>
24 #elif defined ( HAVE_SYS_SYSLOG_H )
25 #include <sys/syslog.h>
26 #endif
27 
28 #if defined( LOG_NDELAY ) && defined( LOG_NOWAIT )
29 #	define OPENLOG_OPTIONS ( LOG_PID | LOG_NDELAY | LOG_NOWAIT )
30 #elif defined( LOG_NDELAY )
31 #	define OPENLOG_OPTIONS ( LOG_PID | LOG_NDELAY )
32 #elif defined( LOG_NOWAIT )
33 #	define OPENLOG_OPTIONS ( LOG_PID | LOG_NOWAIT )
34 #elif defined( LOG_PID )
35 #	define OPENLOG_OPTIONS ( LOG_PID )
36 #else
37 #   define OPENLOG_OPTIONS ( 0 )
38 #endif
39 
40 #endif /* _AC_SYSLOG_H_ */
41