]> rtime.felk.cvut.cz Git - orte.git/blob - orte/include/orte_headers.h
changed name to Open Real-time Ethernet, some source header arranging
[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
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36
37 #if defined _MSC_VER
38   #include "orte/ew_types.h"
39 #elif defined(HAVE_CONFIG_H) || defined(OMK_FOR_USER)  || defined(OMK_FOR_KERNEL)
40   #include "orte/orte_config.h"
41 #else
42   #error ""
43   #error "You don't have file 'orte/orte_config.h'."
44   #error "Please make sure that this file exists!."
45   #error ""
46 #endif
47
48 #ifdef HAVE_ARPA_INET_H
49   #include <arpa/inet.h>
50 #endif
51 #ifdef HAVE_FCNTL_H
52   #include <fcntl.h>
53 #endif
54 #ifdef HAVE_STDIO_H
55   #include <stdio.h>
56 #endif
57 #ifdef HAVE_NETDB_H
58   #include <netdb.h>
59 #endif
60 #ifdef HAVE_STDLIB_H
61   #include <stdlib.h>
62 #endif
63 #ifdef HAVE_STRING_H
64   #include <string.h>
65 #endif
66 #ifdef HAVE_SYS_IOCTL_H
67   #include <sys/ioctl.h>
68 #endif
69 #ifdef HAVE_SYS_TIME_H
70   #include <sys/time.h>
71 #endif
72 #ifdef HAVE_UNISTD_H
73   #include <unistd.h>
74 #endif
75 #ifdef HAVE_PTHREAD_H
76   #include <pthread.h>
77 #endif
78 #ifdef HAVE_SYS_TYPES_H
79   #include <sys/types.h>
80 #endif
81 #ifdef HAVE_SYS_SOCKIO_H
82   #include <sys/sockio.h>
83 #endif
84 #ifdef HAVE_STDARG_H
85   #include <stdarg.h>
86 #endif
87 #ifdef HAVE_BYTESWAP_H
88   #include <byteswap.h>
89 #endif
90 #ifdef HAVE_GETOPT_H
91   #include <getopt.h>
92 #endif
93 #ifdef HAVE_CTYPE_H
94   #include <ctype.h>
95 #endif
96 #ifdef HAVE_SIGNAL_H
97   #include <signal.h>
98 #endif
99 #ifdef HAVE_STDINT_H
100   #include <stdint.h>
101 #endif
102 #ifdef HAVE_SYS_SOCKET_H
103   #include <sys/socket.h>
104 #endif
105 #ifdef HAVE_NETINET_IN_H
106   #include <netinet/in.h>
107 #endif
108 #ifdef HAVE_NET_IF_H
109   #include <net/if.h>
110 #endif
111 #ifdef HAVE_ERRNO_H
112   #include <errno.h>
113 #endif
114 //win32 headers
115 #if defined HAVE_WINSOCK2_H && !HAVE_SYS_SOCKET_H
116   #include <winsock2.h>
117 #endif
118 #if defined HAVE_WS2TCPIP_H && !HAVE_SYS_SOCKET_H
119   #include <ws2tcpip.h>
120 #endif
121 #ifdef HAVE_WINDOWS_H
122   #include <windows.h>
123 #endif
124 #ifdef HAVE_W32API_WINDOWS_H
125   #include <w32api/windows.h>
126 #endif
127 #ifdef HAVE_ERRNO_H
128   #include <errno.h>
129 #endif
130 //kernel headers
131 #ifdef HAVE_ASM_BYTEORDER_H
132   #include <asm/byteorder.h>
133 #endif
134 #ifdef HAVE_LINUX_CTYPE_H
135   #include <linux/ctype.h>
136 #endif
137 #ifdef HAVE_LINUX_STRING_H
138   #include <linux/string.h>
139 #endif
140 #ifdef HAVE_LINUX_MODULE_H
141   #include <linux/module.h>
142 #endif
143 #ifdef HAVE_LINUX_IF_H
144   #include <linux/if.h>
145 #endif
146 #ifdef HAVE_LINUX_SOCKET_H
147   #include <linux/socket.h>
148 #endif
149 #ifdef HAVE_LINUX_TIME_H
150   #include <linux/time.h>
151 #endif
152 #ifdef HAVE_LINUX_TYPES_H
153   #include <linux/types.h>
154 #endif
155 #ifdef HAVE_LINUX_IN_H
156   #include <linux/in.h>
157 #endif
158 //RTL headers
159 #ifdef HAVE_RTL_H
160   #include <rtl.h>
161 #endif
162 #ifdef HAVE_RTL_MALLOC_H
163   #include <rtl_malloc.h>
164 #endif
165 #ifdef HAVE_UDP_H
166   #include <udp.h>
167 #endif
168 #ifdef HAVE_NIC_H
169   #include <nic.h>
170 #endif
171 #ifdef HAVE_NICTAB_H
172   #include <nictab.h>
173 #endif
174 #ifdef HAVE_TIME_H
175   #include <time.h>
176 #endif
177 #ifdef HAVE_ONETD_H
178   #include <onetd.h>
179 #endif
180 //RTAI headers
181 #ifdef HAVE_RTNET_H
182   #include <rtnet.h>
183 #endif
184
185 #ifdef CONFIG_ORTE_UNIX
186   #define SOCK_BSD       
187 #elif CONFIG_ORTE_CYGWIN
188   #define SOCK_BSD         
189 #elif CONFIG_ORTE_MINGW
190   #define SOCK_WIN
191   #ifndef HAVE_PTHREAD_H
192     #include <win32/pthread.h>
193   #endif
194   #ifndef __GETOPT_H__  //mingw
195     #include <win32/getopt.h>
196   #endif
197   #include <win32/timeval.h>
198   #include <orte/ew_types.h>
199   #define ioctl ioctlsocket
200 #elif defined CONFIG_ORTE_RTL
201   #include <rtl/rwlock.h>
202   #ifdef CONFIG_ORTE_RTL_ONETD
203     #define SOCK_BSD         
204     #include <rtl/compat_onetd.h>
205   #elif CONFIG_ORTE_RTL_WIP
206     #define SOCK_RTLWIP
207     #include <rtl/compat_rtlwip.h>
208   #else
209     #error "no UDP stack for RTLinux"
210   #endif
211 #elif defined CONFIG_ORTE_RTAI
212   #define SOCK_BSD  
213   #include <rtai/compat.h>
214 #elif defined _MSC_VER
215   #define SOCK_WIN
216   #ifdef __PHARLAP
217     #define SOCK_WIN_PHARLAP
218     #define IFF_UP 0x1
219     #define IN_CLASSD(i) (((long)(i) & 0xf0000000) == 0xe0000000)
220     #define IN_MULTICAST(i) IN_CLASSD(i)
221     #include <embtcpip.h>
222   #else
223     #include <winsock2.h>
224     #include <ws2tcpip.h>
225   #endif
226   #ifndef inline
227     #define inline _inline
228   #endif
229   #include <stdio.h>
230   #include <stdlib.h>
231   #include <stdarg.h>
232   #include <string.h>
233   #include <windows.h>
234   #ifdef __PHARLAP
235     #include <win32/pharlap/pthread.h>
236   #else
237     #include <win32/pthread.h>
238   #endif
239   #include <win32/timeval.h>
240   #include <win32/getopt.h>
241   #define ioctl ioctlsocket
242   #define ORTE_PACKAGE_STRING "orte 0.3.0"
243   #define CONFIG_ORTE_WIN
244 #endif
245
246 #ifdef __cplusplus
247 } /* extern "C"*/
248 #endif
249
250 #endif /* _ORTE_ALL_H */