porting.h
Go to the documentation of this file.
00001 #ifndef __PORTING_H__
00002 #define __PORTING_H__
00003 
00004 #ifdef _WIN32
00005 #include <afxwin.h>         // MFC core and standard components
00006 #include <winsock2.h>
00007 #include <Mmsystem.h>
00008 #pragma message("-----------------------> Adding library: Winmm.lib") 
00009 #pragma comment(lib,"Winmm.lib")
00010 #endif /* _WIN32 */
00011 
00012 #if defined (__linux) || defined (__APPLE__)
00013 
00014 #include <sys/types.h>
00015 #include <sys/socket.h>
00016 #include <sys/stat.h>
00017 #include <sys/time.h>
00018 #include <sys/un.h>
00019 #include <netinet/in.h>
00020 #include <arpa/inet.h>
00021 #include <netdb.h>
00022 #include <fcntl.h>
00023 #include <unistd.h>
00024 #include <string.h>
00025 
00026 #endif /* __linux || __APPLE__ */
00027 
00028 #include <string>
00029 
00030 #ifdef _WIN32
00031 
00032 typedef SOCKET              _SOCKET;
00033 typedef timeval             _timeval;
00034 typedef int                 _socklen;
00035 
00036 #endif /* _WIN32 */
00037 
00038 #if defined (__linux) || defined (__APPLE__)
00039 
00040 #define LINUX_NAMED_PIPES_DIR "/tmp/"
00041 #define INVALID_SOCKET        -1
00042 #define Sleep(x) (usleep(x*1000))
00043 #define _stricmp(x,y) strcasecmp(x,y)
00044 
00045 typedef int                 _SOCKET;
00046 typedef struct timeval      _timeval;
00047 typedef socklen_t           _socklen;
00048 
00049 typedef unsigned char       BYTE;
00050 typedef unsigned short      WORD;
00051 typedef unsigned long       DWORD;
00052 typedef unsigned short      u_short;
00053 
00054 #endif /* __linux || __APPLE__ */
00055 
00056 DWORD getTimeInMs();
00057 DWORD getTimeDiffInMs(DWORD lastTime);
00058 
00059 #endif /* __PORTING_H__ */


vrep_ros_plugin
Author(s): Riccardo Spica , Giovanni Claudio
autogenerated on Sat Jun 8 2019 20:22:41