This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Missing chunk in change #26247.
[perl5.git] / ext / Sys / Syslog / Syslog.xs
CommitLineData
8ce86de8
GS
1#include "EXTERN.h"
2#include "perl.h"
3#include "XSUB.h"
4
d76d5647
JH
5#ifdef I_SYSLOG
6#include <syslog.h>
7#endif
8ce86de8 8
1cb0fb50 9#include "const-c.inc"
8ce86de8 10
8ce86de8
GS
11MODULE = Sys::Syslog PACKAGE = Sys::Syslog
12
1cb0fb50 13INCLUDE: const-xs.inc
8ce86de8
GS
14
15int
16LOG_FAC(p)
17 INPUT:
18 int p
19 CODE:
20#ifdef LOG_FAC
21 RETVAL = LOG_FAC(p);
22#else
23 croak("Your vendor has not defined the Sys::Syslog macro LOG_FAC");
b621ec8a 24 RETVAL = -1;
8ce86de8
GS
25#endif
26 OUTPUT:
27 RETVAL
28
29int
30LOG_PRI(p)
31 INPUT:
32 int p
33 CODE:
34#ifdef LOG_PRI
35 RETVAL = LOG_PRI(p);
36#else
37 croak("Your vendor has not defined the Sys::Syslog macro LOG_PRI");
b621ec8a 38 RETVAL = -1;
8ce86de8
GS
39#endif
40 OUTPUT:
41 RETVAL
42
43int
44LOG_MAKEPRI(fac,pri)
45 INPUT:
46 int fac
47 int pri
48 CODE:
49#ifdef LOG_MAKEPRI
50 RETVAL = LOG_MAKEPRI(fac,pri);
51#else
52 croak("Your vendor has not defined the Sys::Syslog macro LOG_MAKEPRI");
b621ec8a 53 RETVAL = -1;
8ce86de8
GS
54#endif
55 OUTPUT:
56 RETVAL
57
58int
59LOG_MASK(pri)
60 INPUT:
61 int pri
62 CODE:
63#ifdef LOG_MASK
64 RETVAL = LOG_MASK(pri);
65#else
66 croak("Your vendor has not defined the Sys::Syslog macro LOG_MASK");
b621ec8a 67 RETVAL = -1;
8ce86de8
GS
68#endif
69 OUTPUT:
70 RETVAL
71
72int
73LOG_UPTO(pri)
74 INPUT:
75 int pri
76 CODE:
77#ifdef LOG_UPTO
78 RETVAL = LOG_UPTO(pri);
79#else
80 croak("Your vendor has not defined the Sys::Syslog macro LOG_UPTO");
b621ec8a 81 RETVAL = -1;
8ce86de8
GS
82#endif
83 OUTPUT:
84 RETVAL