]> rtime.felk.cvut.cz Git - orte.git/blobdiff - orte/include/orte_headers.h
Reformat the sources with orte/uncrustify script
[orte.git] / orte / include / orte_headers.h
index 71512bdec7c5072c67a6c021baba097a4ce902ac..8160831a6b4f023d0f1eeb078509cb104ba01eff 100644 (file)
@@ -1,21 +1,30 @@
 /*
- *  $Id: orte_headers.h,v 0.0.0.1       2003/08/21 
+ *  $Id: orte_headers.h,v 0.0.0.1       2003/08/21
  *
- *  AUTHOR: Petr Smolik                 petr.smolik@wo.cz
+ *  -------------------------------------------------------------------
+ *                                ORTE
+ *                      Open Real-Time Ethernet
  *
- *  ORTE - OCERA Real-Time Ethernet     http://www.ocera.org/
+ *                      Copyright (C) 2001-2006
+ *  Department of Control Engineering FEE CTU Prague, Czech Republic
+ *                      http://dce.felk.cvut.cz
+ *                      http://www.ocera.org
+ *
+ *  Author:              Petr Smolik   petr@smoliku.cz
+ *  Advisor:             Pavel Pisa
+ *  Project Responsible: Zdenek Hanzalek
  *  --------------------------------------------------------------------
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
- *  
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *  
+ *
  */
 
 #ifndef _ORTE_ALL_H
 extern "C" {
 #endif
 
-#ifdef HAVE_CONFIG_H
-  #include "orte_config.h"
-#elif defined OMK_FOR_USER
-  #include "orte_config_omk_unix.h"
-#elif defined OMK_FOR_KERNEL
-  #include "orte_config_omk_rtl.h"
+#if defined _MSC_VER
+  #include "orte/ew_types.h"
+#elif defined(HAVE_CONFIG_H) || defined(OMK_FOR_USER)  || defined(OMK_FOR_KERNEL)
+  #include "orte/orte_config.h"
+#elif defined(__ANDROID__)
+  #include "orte/orte_config_android.h"
+#else
+  #error ""
+  #error "You don't have file 'orte/orte_config.h'."
+  #error "Please make sure that this file exists!."
+  #error ""
 #endif
 
 #ifdef HAVE_ARPA_INET_H
@@ -96,6 +110,9 @@ extern "C" {
 #ifdef HAVE_NET_IF_H
   #include <net/if.h>
 #endif
+#ifdef HAVE_ERRNO_H
+  #include <errno.h>
+#endif
 //win32 headers
 #if defined HAVE_WINSOCK2_H && !HAVE_SYS_SOCKET_H
   #include <winsock2.h>
@@ -109,6 +126,9 @@ extern "C" {
 #ifdef HAVE_W32API_WINDOWS_H
   #include <w32api/windows.h>
 #endif
+#ifdef HAVE_ERRNO_H
+  #include <errno.h>
+#endif
 //kernel headers
 #ifdef HAVE_ASM_BYTEORDER_H
   #include <asm/byteorder.h>
@@ -156,33 +176,57 @@ extern "C" {
 #ifdef HAVE_TIME_H
   #include <time.h>
 #endif
+#ifdef HAVE_ONETD_H
+  #include <onetd.h>
+#endif
 //RTAI headers
 #ifdef HAVE_RTNET_H
   #include <rtnet.h>
 #endif
 
 #ifdef CONFIG_ORTE_UNIX
-  #define SOCK_BSD       
+  #define SOCK_BSD
 #elif CONFIG_ORTE_CYGWIN
-  #define SOCK_BSD         
+  #define SOCK_BSD
 #elif CONFIG_ORTE_MINGW
   #define SOCK_WIN
-  #include <win32/pthread.h>
-  #include <win32/timeval.h>
+  #ifndef HAVE_PTHREAD_H
+    #include <win32/pthread.h>
+  #endif
   #ifndef __GETOPT_H__  //mingw
     #include <win32/getopt.h>
   #endif
+  #ifndef HAVE_TIMEVAL_H
+    #include <win32/timeval.h>
+  #endif
   #include <orte/ew_types.h>
   #define ioctl ioctlsocket
 #elif defined CONFIG_ORTE_RTL
-  #define SOCK_RTL
-  #include <rtl/compat.h>
   #include <rtl/rwlock.h>
+  #ifdef CONFIG_ORTE_RTL_ONETD
+    #define SOCK_BSD
+    #include <rtl/compat_onetd.h>
+  #elif CONFIG_ORTE_RTL_WIP
+    #define SOCK_RTLWIP
+    #include <rtl/compat_rtlwip.h>
+  #else
+    #error "no UDP stack for RTLinux"
+  #endif
 #elif defined CONFIG_ORTE_RTAI
-  #define SOCK_BSD  
+  #define SOCK_BSD
   #include <rtai/compat.h>
 #elif defined _MSC_VER
   #define SOCK_WIN
+  #ifdef __PHARLAP
+    #define SOCK_WIN_PHARLAP
+    #define IFF_UP 0x1
+    #define IN_CLASSD(i) (((long)(i) & 0xf0000000) == 0xe0000000)
+    #define IN_MULTICAST(i) IN_CLASSD(i)
+    #include <embtcpip.h>
+  #else
+    #include <winsock2.h>
+    #include <ws2tcpip.h>
+  #endif
   #ifndef inline
     #define inline _inline
   #endif
@@ -190,17 +234,18 @@ extern "C" {
   #include <stdlib.h>
   #include <stdarg.h>
   #include <string.h>
-  #include <winsock2.h>
-  #include <ws2tcpip.h>
   #include <windows.h>
-  #include <win32/pthread.h>
+  #ifdef __PHARLAP
+    #include <win32/pharlap/pthread.h>
+  #else
+    #include <win32/pthread.h>
+  #endif
   #include <win32/timeval.h>
   #include <win32/getopt.h>
-  #include <orte/ew_types.h>
   #define ioctl ioctlsocket
-  #define ORTE_PACKAGE_STRING "orte 0.2.3"
+  #define ORTE_PACKAGE_STRING "orte 0.3.4"
   #define CONFIG_ORTE_WIN
-#endif
+#endif /* ifdef CONFIG_ORTE_UNIX */
 
 #ifdef __cplusplus
 } /* extern "C"*/