xref: /netbsd-src/external/bsd/openldap/dist/include/ac/syslog.h (revision 549b59ed3ccf0d36d3097190a0db27b770f3a839)
1 /*	$NetBSD: syslog.h,v 1.3 2021/08/14 16:14:55 christos Exp $	*/
2 
3 /* Generic syslog.h */
4 /* $OpenLDAP$ */
5 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
6  *
7  * Copyright 1998-2021 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