File: sys_include.h

package info (click to toggle)
snort 1.8.4beta1-3.1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 6,964 kB
  • ctags: 8,040
  • sloc: ansic: 42,597; sh: 3,115; perl: 1,198; php: 322; sql: 219; makefile: 201; xml: 154
file content (103 lines) | stat: -rw-r--r-- 3,911 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#ifndef SYS_INCLUDE_H
#define SYS_INCLUDE_H
/* ========================================================================== **
 *                               sys_include.h
 *
 *  Copyright (C) 1998 by Christopher R. Hertel
 *
 *  Email: crh@ubiqx.mn.org
 * -------------------------------------------------------------------------- **
 *  This header provides system declarations and data types used internally
 *  by the ubiqx modules.
 * -------------------------------------------------------------------------- **
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Library General Public
 *  License as published by the Free Software Foundation; either
 *  version 2 of the License, or (at your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Library General Public License for more details.
 *
 *  You should have received a copy of the GNU Library General Public
 *  License along with this library; if not, write to the Free
 *  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 * -------------------------------------------------------------------------- **
 *
 *  You may want to replace this file with your own system specific header,
 *  or you may find that this default header has everything you need.  In
 *  most cases, I expect the latter to be the case.  The ubi_* modules were
 *  written to be as clean as possible.  On purpose.  There are limits,
 *  though.  Variations in compilers, and competing standards have made it
 *  difficult to write code that just compiles.  In particular, the location
 *  of a definition of NULL seems to be less than consistant.
 *
 *  This header makes a good attempt to find NULL.  If you find that you
 *  need something more on your system make sure that you keep a copy of
 *  your version so that it won't be overwritten by updates of the ubiqx
 *  code.
 *
 * -------------------------------------------------------------------------- **
 *
 * $Log: sys_include.h,v $
 * Revision 1.1  2001/06/26 02:19:48  roesch
 * * oops, forgot a file...
 *
 * Revision 0.0  1998/06/02 02:20:49  crh
 * Initial Revision.
 *
 * ========================================================================== **
 */

/* -------------------------------------------------------------------------- **
 *  Looking for NULL.
 *
 *  The core ubiqx modules (all those beginning with 'ubi_') rely on very
 *  little from the outside world.  One exception is that we need a
 *  defintion for NULL.  This has turned out to be something of a problem,
 *  as NULL is NOT always defined in the same place on different systems.
 *
 *  Ahh... standards...
 *
 *  K&R 2nd Ed. (pg 102) says NULL should be in <stdio.h>.  I've heard
 *  that it is in <locale.h> on some systems.  I've also seen it in
 *  <stddef.h> and <stdlib.h>.  In most cases it's defined in multiple
 *  places.  We'll try several of them.  If none of these work on your
 *  system, please send E'mail and let me know where you get your NULL!
 *
 *  The purpose of the mess below, then, is simply to supply a definition
 *  of NULL to the ubi_*.c files.  Keep in mind that C compilers (all
 *  those of which I'm aware) will allow you to define a constant on the
 *  command line, eg.: -DNULL=((void *)0).
 *
 *  Also, 99.9% of the time, NULL is zero.  I have been informed of at
 *  least one exception.
 *
 *  crh; may 1998
 */

#ifndef NULL
#include <stddef.h>
#endif

#ifndef NULL
#include <stdlib.h>
#endif

#ifndef NULL
#include <stdio.h>
#endif

#ifndef NULL
#include <locale.h>
#endif

#ifndef NULL
#define NULL ((void *)0)
#endif

/* ================================ The End ================================= */
#endif /* SYS_INCLUDE_H */