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