|
1 /* |
|
2 * bsdjail.h - Header for the bsdjail extension |
|
3 * $Id$ |
|
4 * |
|
5 * Authors: |
|
6 * * Michael Granger <ged@FaerieMUD.org> |
|
7 * * Mahlon E. Smith <mahlon@martini.nu> |
|
8 * |
|
9 * Copyright (c) 2008, Michael Granger and Mahlon Smith |
|
10 * All rights reserved. |
|
11 * |
|
12 * Redistribution and use in source and binary forms, with or without |
|
13 * modification, are permitted provided that the following conditions are met: |
|
14 * |
|
15 * * Redistributions of source code must retain the above copyright notice, |
|
16 * this list of conditions and the following disclaimer. |
|
17 * |
|
18 * * Redistributions in binary form must reproduce the above copyright notice, |
|
19 * this list of conditions and the following disclaimer in the documentation |
|
20 * and/or other materials provided with the distribution. |
|
21 * |
|
22 * * Neither the name of the author/s, nor the names of the project's |
|
23 * contributors may be used to endorse or promote products derived from this |
|
24 * software without specific prior written permission. |
|
25 * |
|
26 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
|
27 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
|
28 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
|
29 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE |
|
30 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
|
31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
|
32 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
|
33 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
|
34 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
|
35 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|
36 * |
|
37 */ |
|
38 |
|
39 #ifndef _BSDJAIL_H_ |
|
40 #define _BSDJAIL_H_ |
|
41 |
|
42 |
|
43 #include <stdio.h> |
|
44 #include <sys/param.h> |
|
45 #include <sys/jail.h> |
|
46 #include <sys/types.h> |
|
47 #include <unistd.h> |
|
48 |
|
49 #include <ruby.h> |
|
50 #include <intern.h> /* For rb_dbl2big() */ |
|
51 |
|
52 |
|
53 /* Debugging functions/macros */ |
|
54 #ifdef HAVE_STDARG_PROTOTYPES |
|
55 #include <stdarg.h> |
|
56 #define va_init_list(a,b) va_start(a,b) |
|
57 extern void rbjail_debug(const char *fmt, ...); |
|
58 #else |
|
59 #include <varargs.h> |
|
60 #define va_init_list(a,b) va_start(a) |
|
61 extern void rbjail_debug(fmt, va_alist); |
|
62 #endif |
|
63 |
|
64 |
|
65 /* Debugging macro */ |
|
66 #if DEBUG |
|
67 # define debugMsg(f) rbjail_debug f |
|
68 #else /* ! DEBUG */ |
|
69 # define debugMsg(f) |
|
70 #endif /* DEBUG */ |
|
71 |
|
72 |
|
73 #endif /* _BSDJAIL_H_ */ |
|
74 |