00001 /* 00002 Copyright (c) 2001, John Lambert jlambert@jlambert.com 00003 All rights reserved. 00004 00005 Redistribution and use in source and binary forms, with or without modification, are 00006 permitted provided that the following conditions are met: 00007 00008 Redistributions of source code must retain the above copyright notice, this list of 00009 conditions and the following disclaimer. 00010 00011 Redistributions in binary form must reproduce the above copyright notice, this list 00012 of conditions and the following disclaimer in the documentation and/or other 00013 materials provided with the distribution. 00014 00015 Neither the name of the xdProf project nor the names of its contributors may be used 00016 to endorse or promote products derived from this software without specific prior 00017 written permission. 00018 00019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 00020 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 00021 OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 00022 SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 00023 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00024 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 00025 BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 00026 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY 00027 WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00028 */ 00029 /* 00030 $Header: /xdprof-dll/platform.h 4 5/07/01 12:03a Admin $ 00031 */ 00032 #ifndef _PLATFORM_H_ 00033 #define _PLATFORM_H_ 00034 00035 00036 #ifdef WIN32 00037 #include <sstream> 00038 #include <io.h> 00039 #include <winsock2.h> 00040 #include <stdlib.h> 00041 #include <process.h> 00042 #include <windows.h> 00043 #include <winbase.h> 00044 #else 00045 #include <strstream> 00046 #include <unistd.h> 00047 #include <sys/types.h> 00048 #include <sys/socket.h> 00049 #include <netdb.h> 00050 #include <netinet/in.h> 00051 #include <arpa/inet.h> 00052 #include <sys/ioctl.h> 00053 #include <stdio.h> 00054 #include <stdlib.h> 00055 #include <ctype.h> 00056 #include <signal.h> 00057 #include <sys/ipc.h> 00058 #include <sys/sem.h> 00059 #include <sys/shm.h> 00060 #include <sys/errno.h> 00061 #include <sys/time.h> 00062 #include <time.h> 00063 00064 #define _getpid getpid 00065 #define _snprintf snprintf 00066 #define ostringstream ostrstream 00067 #define closesocket close 00068 #endif 00069 00070 #endif //_PLATFORM_H_ 00071