Go to the documentation of this file.00001 #ifndef _LINUX_FOR_WIN_H
00002 #define _LINUX_FOR_WIN_H
00003
00004 #ifdef WIN32
00005 #include "Windows.h"
00006 #include "winbase.h"
00007
00008 typedef HANDLE shm_key_t;
00009
00010 #define usleep(ST) Sleep(ST / 1000)
00011 #define shmat(H, A, F) MapViewOfFile(H, FILE_MAP_ALL_ACCESS, 0, 0, 0)
00012 #define shmdt(ADDR) UnmapViewOfFile(ADDR)
00013
00014 #define shmget(H, S, F) shmget_win(H, S)
00015
00016 #ifdef __cplusplus
00017 extern "C" {
00018 #endif
00019 shm_key_t shmget_win(int key, size_t size);
00020 #ifdef __cplusplus
00021 }
00022 #endif
00023
00024 #else
00025
00026 typedef int shm_key_t;
00027 #endif
00028 #endif