]> rtime.felk.cvut.cz Git - orte.git/blob - orte/include/orte_headers.h
93afa1458b0b69c204d7efa86be4c49523ef39ff
[orte.git] / orte / include / orte_headers.h
1 /*
2  *  $Id: orte_headers.h,v 0.0.0.1       2003/08/21 
3  *
4  *  AUTHOR: Petr Smolik                 petr.smolik@wo.cz
5  *
6  *  ORTE - OCERA Real-Time Ethernet     http://www.ocera.org/
7  *  --------------------------------------------------------------------
8  *
9  *  This program is free software; you can redistribute it and/or modify
10  *  it under the terms of the GNU General Public License as published by
11  *  the Free Software Foundation; either version 2 of the License, or
12  *  (at your option) any later version.
13  *  
14  *  This program is distributed in the hope that it will be useful,
15  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  *  GNU General Public License for more details.
18  *  
19  */
20
21 #ifndef _ORTE_ALL_H
22 #define _ORTE_ALL_H
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27
28 #if defined _MSC_VER
29   #include "orte/ew_types.h"
30 #elif defined(HAVE_CONFIG_H) || defined(OMK_FOR_USER)  || defined(OMK_FOR_KERNEL)
31   #include "orte/orte_config.h"
32 #else
33   #error ""
34   #error "You don't have file 'orte/orte_config.h'."
35   #error "Please make sure that this file exists!."
36   #error ""
37 #endif
38
39 #ifdef HAVE_ARPA_INET_H
40   #include <arpa/inet.h>
41 #endif
42 #ifdef HAVE_FCNTL_H
43   #include <fcntl.h>
44 #endif
45 #ifdef HAVE_STDIO_H
46   #include <stdio.h>
47 #endif
48 #ifdef HAVE_NETDB_H
49   #include <netdb.h>
50 #endif
51 #ifdef HAVE_STDLIB_H
52   #include <stdlib.h>
53 #endif
54 #ifdef HAVE_STRING_H
55   #include <string.h>
56 #endif
57 #ifdef HAVE_SYS_IOCTL_H
58   #include <sys/ioctl.h>
59 #endif
60 #ifdef HAVE_SYS_TIME_H
61   #include <sys/time.h>
62 #endif
63 #ifdef HAVE_UNISTD_H
64   #include <unistd.h>
65 #endif
66 #ifdef HAVE_PTHREAD_H
67   #include <pthread.h>
68 #endif
69 #ifdef HAVE_SYS_TYPES_H
70   #include <sys/types.h>
71 #endif
72 #ifdef HAVE_SYS_SOCKIO_H
73   #include <sys/sockio.h>
74 #endif
75 #ifdef HAVE_STDARG_H
76   #include <stdarg.h>
77 #endif
78 #ifdef HAVE_BYTESWAP_H
79   #include <byteswap.h>
80 #endif
81 #ifdef HAVE_GETOPT_H
82   #include <getopt.h>
83 #endif
84 #ifdef HAVE_CTYPE_H
85   #include <ctype.h>
86 #endif
87 #ifdef HAVE_SIGNAL_H
88   #include <signal.h>
89 #endif
90 #ifdef HAVE_STDINT_H
91   #include <stdint.h>
92 #endif
93 #ifdef HAVE_SYS_SOCKET_H
94   #include <sys/socket.h>
95 #endif
96 #ifdef HAVE_NETINET_IN_H
97   #include <netinet/in.h>
98 #endif
99 #ifdef HAVE_NET_IF_H
100   #include <net/if.h>
101 #endif
102 #ifdef HAVE_ERRNO_H
103   #include <errno.h>
104 #endif
105 //win32 headers
106 #if defined HAVE_WINSOCK2_H && !HAVE_SYS_SOCKET_H
107   #include <winsock2.h>
108 #endif
109 #if defined HAVE_WS2TCPIP_H && !HAVE_SYS_SOCKET_H
110   #include <ws2tcpip.h>
111 #endif
112 #ifdef HAVE_WINDOWS_H
113   #include <windows.h>
114 #endif
115 #ifdef HAVE_W32API_WINDOWS_H
116   #include <w32api/windows.h>
117 #endif
118 #ifdef HAVE_ERRNO_H
119   #include <errno.h>
120 #endif
121 //kernel headers
122 #ifdef HAVE_ASM_BYTEORDER_H
123   #include <asm/byteorder.h>
124 #endif
125 #ifdef HAVE_LINUX_CTYPE_H
126   #include <linux/ctype.h>
127 #endif
128 #ifdef HAVE_LINUX_STRING_H
129   #include <linux/string.h>
130 #endif
131 #ifdef HAVE_LINUX_MODULE_H
132   #include <linux/module.h>
133 #endif
134 #ifdef HAVE_LINUX_IF_H
135   #include <linux/if.h>
136 #endif
137 #ifdef HAVE_LINUX_SOCKET_H
138   #include <linux/socket.h>
139 #endif
140 #ifdef HAVE_LINUX_TIME_H
141   #include <linux/time.h>
142 #endif
143 #ifdef HAVE_LINUX_TYPES_H
144   #include <linux/types.h>
145 #endif
146 #ifdef HAVE_LINUX_IN_H
147   #include <linux/in.h>
148 #endif
149 //RTL headers
150 #ifdef HAVE_RTL_H
151   #include <rtl.h>
152 #endif
153 #ifdef HAVE_RTL_MALLOC_H
154   #include <rtl_malloc.h>
155 #endif
156 #ifdef HAVE_UDP_H
157   #include <udp.h>
158 #endif
159 #ifdef HAVE_NIC_H
160   #include <nic.h>
161 #endif
162 #ifdef HAVE_NICTAB_H
163   #include <nictab.h>
164 #endif
165 #ifdef HAVE_TIME_H
166   #include <time.h>
167 #endif
168 #ifdef HAVE_ONETD_H
169   #include <onetd.h>
170 #endif
171 //RTAI headers
172 #ifdef HAVE_RTNET_H
173   #include <rtnet.h>
174 #endif
175
176 #ifdef CONFIG_ORTE_UNIX
177   #define SOCK_BSD       
178 #elif CONFIG_ORTE_CYGWIN
179   #define SOCK_BSD         
180 #elif CONFIG_ORTE_MINGW
181   #define SOCK_WIN
182   #ifndef HAVE_PTHREAD_H
183     #include <win32/pthread.h>
184   #endif
185   #ifndef __GETOPT_H__  //mingw
186     #include <win32/getopt.h>
187   #endif
188   #include <win32/timeval.h>
189   #include <orte/ew_types.h>
190   #define ioctl ioctlsocket
191 #elif defined CONFIG_ORTE_RTL
192   #include <rtl/rwlock.h>
193   #ifdef CONFIG_ORTE_RTL_ONETD
194     #define SOCK_BSD         
195     #include <rtl/compat_onetd.h>
196   #elif CONFIG_ORTE_RTL_WIP
197     #define SOCK_RTLWIP
198     #include <rtl/compat_rtlwip.h>
199   #else
200     #error "no UDP stack for RTLinux"
201   #endif
202 #elif defined CONFIG_ORTE_RTAI
203   #define SOCK_BSD  
204   #include <rtai/compat.h>
205 #elif defined _MSC_VER
206   #define SOCK_WIN
207   #ifdef __PHARLAP
208     #define SOCK_WIN_PHARLAP
209     #define IFF_UP 0x1
210     #define IN_CLASSD(i) (((long)(i) & 0xf0000000) == 0xe0000000)
211     #define IN_MULTICAST(i) IN_CLASSD(i)
212     #include <embtcpip.h>
213   #else
214     #include <winsock2.h>
215     #include <ws2tcpip.h>
216   #endif
217   #ifndef inline
218     #define inline _inline
219   #endif
220   #include <stdio.h>
221   #include <stdlib.h>
222   #include <stdarg.h>
223   #include <string.h>
224   #include <windows.h>
225   #ifdef __PHARLAP
226     #include <win32/pharlap/pthread.h>
227   #else
228     #include <win32/pthread.h>
229   #endif
230   #include <win32/timeval.h>
231   #include <win32/getopt.h>
232   #define ioctl ioctlsocket
233   #define ORTE_PACKAGE_STRING "orte 0.3.0"
234   #define CONFIG_ORTE_WIN
235 #endif
236
237 #ifdef __cplusplus
238 } /* extern "C"*/
239 #endif
240
241 #endif /* _ORTE_ALL_H */