1 |
cebix |
1.1 |
/* |
2 |
|
|
* sysdeps.h - System dependent definitions |
3 |
|
|
* |
4 |
cebix |
1.3 |
* cxmon (C) 1997-2002 Christian Bauer, Marc Hellwig |
5 |
cebix |
1.1 |
* |
6 |
|
|
* This program is free software; you can redistribute it and/or modify |
7 |
|
|
* it under the terms of the GNU General Public License as published by |
8 |
|
|
* the Free Software Foundation; either version 2 of the License, or |
9 |
|
|
* (at your option) any later version. |
10 |
|
|
* |
11 |
|
|
* This program is distributed in the hope that it will be useful, |
12 |
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 |
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 |
|
|
* GNU General Public License for more details. |
15 |
|
|
* |
16 |
|
|
* You should have received a copy of the GNU General Public License |
17 |
|
|
* along with this program; if not, write to the Free Software |
18 |
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 |
|
|
*/ |
20 |
|
|
|
21 |
|
|
#ifndef SYSDEPS_H |
22 |
|
|
#define SYSDEPS_H |
23 |
|
|
|
24 |
|
|
#ifndef __STDC__ |
25 |
|
|
#error "Your compiler is not ANSI. Get a real one." |
26 |
|
|
#endif |
27 |
|
|
|
28 |
|
|
#include "config.h" |
29 |
|
|
|
30 |
|
|
#ifndef STDC_HEADERS |
31 |
|
|
#error "You don't have ANSI C header files." |
32 |
|
|
#endif |
33 |
|
|
|
34 |
|
|
#ifdef HAVE_UNISTD_H |
35 |
|
|
# include <sys/types.h> |
36 |
|
|
# include <unistd.h> |
37 |
|
|
#endif |
38 |
|
|
|
39 |
|
|
#include <netinet/in.h> |
40 |
|
|
#include <string.h> |
41 |
|
|
#include <errno.h> |
42 |
|
|
|
43 |
|
|
/* Data types */ |
44 |
|
|
|
45 |
|
|
#ifdef __BEOS__ |
46 |
|
|
|
47 |
|
|
#include <support/ByteOrder.h> |
48 |
|
|
|
49 |
|
|
#else |
50 |
|
|
|
51 |
|
|
typedef unsigned char uint8; |
52 |
|
|
typedef signed char int8; |
53 |
|
|
#if SIZEOF_SHORT == 2 |
54 |
|
|
typedef unsigned short uint16; |
55 |
|
|
typedef short int16; |
56 |
|
|
#elif SIZEOF_INT == 2 |
57 |
|
|
typedef unsigned int uint16; |
58 |
|
|
typedef int int16; |
59 |
|
|
#else |
60 |
|
|
#error "No 2 byte type, you lose." |
61 |
|
|
#endif |
62 |
|
|
#if SIZEOF_INT == 4 |
63 |
|
|
typedef unsigned int uint32; |
64 |
|
|
typedef int int32; |
65 |
|
|
#elif SIZEOF_LONG == 4 |
66 |
|
|
typedef unsigned long uint32; |
67 |
|
|
typedef long int32; |
68 |
|
|
#else |
69 |
|
|
#error "No 4 byte type, you lose." |
70 |
|
|
#endif |
71 |
|
|
|
72 |
|
|
#endif // def __BEOS__ |
73 |
|
|
|
74 |
|
|
#endif |