]> rtime.felk.cvut.cz Git - orte.git/blobdiff - orte/include/orte_headers.h
Revert "JORTE: update license headers and clean-up includes"
[orte.git] / orte / include / orte_headers.h
index 0bc4fce84b53c3845e68058b9ffc8978ac82ce44..c64577b228e11f5f7c7808ef63b9e5319007d9ac 100644 (file)
@@ -1,9 +1,18 @@
 /*
  *  $Id: orte_headers.h,v 0.0.0.1       2003/08/21 
  *
- *  AUTHOR: Petr Smolik                 petr.smolik@wo.cz
- *
- *  ORTE - OCERA Real-Time Ethernet     http://www.ocera.org/
+ *  -------------------------------------------------------------------  
+ *                                ORTE                                 
+ *                      Open Real-Time Ethernet                       
+ *                                                                    
+ *                      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.smolik@wo.cz             
+ *  Advisor:            Pavel Pisa                                   
+ *  Project Responsible: Zdenek Hanzalek                              
  *  --------------------------------------------------------------------
  *
  *  This program is free software; you can redistribute it and/or modify
 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"
+#ifdef __ANDROID__
+  #define HAVE_CONFIG_H
+#endif
+
+#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"
+#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 +112,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 +128,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,6 +178,9 @@ 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>
@@ -167,22 +192,43 @@ extern "C" {
   #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  
   #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,15 +236,17 @@ 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.3"
+  #define CONFIG_ORTE_WIN
 #endif
 
 #ifdef __cplusplus