1 /*
2  * Copyright (C) 2017 The Android Open Source Project
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *  * Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions and the following disclaimer.
10  *  * Redistributions in binary form must reproduce the above copyright
11  *    notice, this list of conditions and the following disclaimer in
12  *    the documentation and/or other materials provided with the
13  *    distribution.
14  *
15  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
18  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
19  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
20  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
22  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
23  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
25  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26  * SUCH DAMAGE.
27  */
28 
29 #include <syslog.h>
30 
31 #include "header_checks.h"
32 
syslog_h()33 static void syslog_h() {
34   MACRO(LOG_PID);
35   MACRO(LOG_CONS);
36   MACRO(LOG_NDELAY);
37   MACRO(LOG_ODELAY);
38   MACRO(LOG_NOWAIT);
39 
40   MACRO(LOG_KERN);
41   MACRO(LOG_USER);
42   MACRO(LOG_MAIL);
43   MACRO(LOG_NEWS);
44   MACRO(LOG_UUCP);
45   MACRO(LOG_DAEMON);
46   MACRO(LOG_AUTH);
47   MACRO(LOG_CRON);
48   MACRO(LOG_LPR);
49   MACRO(LOG_LOCAL0);
50   MACRO(LOG_LOCAL1);
51   MACRO(LOG_LOCAL2);
52   MACRO(LOG_LOCAL3);
53   MACRO(LOG_LOCAL4);
54   MACRO(LOG_LOCAL5);
55   MACRO(LOG_LOCAL6);
56   MACRO(LOG_LOCAL7);
57 
58 #if !defined(LOG_MASK)
59 #error LOG_MASK
60 #endif
61 
62   MACRO(LOG_EMERG);
63   MACRO(LOG_ALERT);
64   MACRO(LOG_CRIT);
65   MACRO(LOG_ERR);
66   MACRO(LOG_WARNING);
67   MACRO(LOG_NOTICE);
68   MACRO(LOG_INFO);
69   MACRO(LOG_DEBUG);
70 
71   FUNCTION(closelog, void (*f)(void));
72   FUNCTION(openlog, void (*f)(const char*, int, int));
73   FUNCTION(setlogmask, int (*f)(int));
74   FUNCTION(syslog, void (*f)(int, const char*, ...));
75 }
76