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