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