stumpless  2.1.0
option.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: Apache-2.0 */
2 
3 /*
4  * Copyright 2018-2020 Joel E. Anderson
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 
23 #ifndef __STUMPLESS_OPTION_H
24 # define __STUMPLESS_OPTION_H
25 
26 # include <stumpless/config.h>
27 
28 /* options defined in syslog.h */
29 # ifdef STUMPLESS_SYSLOG_H_COMPATIBLE
30 # include <syslog.h>
31 # endif
32 
34 # ifdef STUMPLESS_SYSLOG_H_COMPATIBLE
35 # define STUMPLESS_OPTION_PID LOG_PID
36 # else
37 # define STUMPLESS_OPTION_PID 1
38 # endif
39 
44 # ifdef STUMPLESS_SYSLOG_H_COMPATIBLE
45 # define STUMPLESS_OPTION_CONS LOG_CONS
46 # else
47 # define STUMPLESS_OPTION_CONS (1<<1)
48 # endif
49 
51 # ifdef STUMPLESS_SYSLOG_H_COMPATIBLE
52 # define STUMPLESS_OPTION_NDELAY LOG_NDELAY
53 # else
54 # define STUMPLESS_OPTION_NDELAY (1<<2)
55 # endif
56 
58 # ifdef STUMPLESS_SYSLOG_H_COMPATIBLE
59 # define STUMPLESS_OPTION_ODELAY LOG_ODELAY
60 # else
61 # define STUMPLESS_OPTION_ODELAY (1<<3)
62 # endif
63 
71 # ifdef STUMPLESS_SYSLOG_H_COMPATIBLE
72 # define STUMPLESS_OPTION_NOWAIT LOG_NOWAIT
73 # else
74 # define STUMPLESS_OPTION_NOWAIT (1<<4)
75 # endif
76 
80 # ifdef STUMPLESS_SYSLOG_H_COMPATIBLE
81 # define STUMPLESS_OPTION_PERROR LOG_PERROR
82 # else
83 # define STUMPLESS_OPTION_PERROR (1 << 5)
84 # endif
85 
87 # define STUMPLESS_OPTION_NONE 0
88 
89 #endif /* __STUMPLESS_OPTION_H */
config.h