Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

platform.h

Go to the documentation of this file.
00001 
00002 /*
00003  *   THIS FILE IS UNDER RCS - DO NOT MODIFY UNLESS YOU HAVE
00004  *   CHECKED IT OUT USING THE COMMAND CHECKOUT.
00005  *
00006  *    $Id: platform_8h-source.html 2161 2006-05-19 16:55:03Z paulf $
00007  *
00008  *    Revision history:
00009  *     $Log$
00009  *     Revision 1.1  2006/05/19 16:55:02  paulf
00009  *     first inclusion
00009  *
00010  *     Revision 1.3  2000/06/02 21:37:28  davidk
00011  *     Added a #define for vsnprintf on NT.  Removed comments from #define
00012  *     lines.  Comments on #define lines can be potentially diasterous if
00013  *     you comment out a section of code, and there is an end comment (* /)
00014  *     in a #define that you can't see, then you will get what seem like
00015  *     random compile errors.
00016  *
00017  *     Revision 1.2  2000/03/05 21:51:06  lombard
00018  *     Added `ifndef LONG_t' around LONG to prevent redefinition errors.
00019  *
00020  *     Revision 1.1  2000/02/14 20:05:54  lucky
00021  *     Initial revision
00022  *
00023  *
00024  */
00025 
00026 
00027               /*************************************************
00028                *                   platform.h                  *
00029                *                                               *
00030                *  System-dependent stuff.                      *
00031                *  This file is included by earthworm.h         *
00032                *************************************************/
00033 
00034 #ifndef PLATFORM_H
00035 #define PLATFORM_H
00036 
00037 #ifdef _WINNT
00038 #include <windows.h>
00039 #include <winsock.h>               /* Socket stuff */
00040 #include <process.h>               /* Required for getpid() */
00041 #include <sys\types.h>
00042 
00043 /* Thread functions return this */
00044 #define thr_ret void               
00045 
00046 #define getpid _getpid
00047 typedef int    pid_t;
00048 typedef HANDLE sema_t;
00049 typedef HANDLE mutex_t;
00050 typedef HANDLE timer_t;
00051 
00052 /* added so that logit.c can call vsnprintf for all platforms */
00053 # define vsnprintf _vsnprintf
00054 #endif  /* _WINNT */
00055 
00056 #ifdef _OS2
00057 #define INCL_DOSPROCESS
00058 #define INCL_DOSMEMMGR
00059 #define INCL_DOSSEMAPHORES
00060 #define INCL_DOSFILEMGR
00061 #include <os2.h>
00062 #include <netinet\in.h>       /* contains typedef of struct sockaddr_in */
00063 #include <process.h>               /* Required for getpid() */
00064 #include <types.h>
00065 #include <nerrno.h>
00066 #include <sys\socket.h>            /* Socket stuff */
00067 #include <netdb.h>                 /* Socket stuff */
00068 typedef void thr_ret;              /* Thread functions return this */
00069 typedef int  pid_t;
00070 typedef HEV  sema_t;
00071 typedef HMTX mutex_t;
00072 typedef long timer_t;
00073 
00074 typedef long DWORD;
00075 #endif    /* _OS2 */
00076 
00077 #ifdef _SOLARIS
00078 #include <sys/types.h>
00079 #include <netinet/in.h>            /* Socket stuff */
00080 #include <arpa/inet.h>             /* Socket stuff */
00081 #include <signal.h>
00082 #include <synch.h>                 /* for mutex's */
00083 #include <sys/ipc.h>
00084 #include <sys/shm.h>
00085 #include <wait.h>
00086 #include <thread.h>
00087 #include <unistd.h>
00088 #include <sys/socket.h>            /* Socket stuff */
00089 #include <netdb.h>                 /* Socket stuff */
00090 
00091 /* Thread functions return this */
00092 #define thr_ret void*              
00093 
00094 #ifndef LONG_t
00095 #define LONG_t
00096 typedef long LONG;
00097 //#else
00098 typedef long DWORD;
00099 #endif
00100 
00101 #endif /* _SOLARIS */
00102 
00103 #endif  /* PLATFORM_H */

Generated on Tue May 6 09:16:07 2003 for Earthworm Libs by doxygen1.3-rc3