Linux4Win.h
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" {    /* C++で使用する場合関数修飾名が壊れないように */
00018 #endif
00019         shm_key_t shmget_win(int key, size_t size);
00020 #ifdef __cplusplus
00021 }
00022 #endif
00023 
00024 #else
00025 /* Linux */
00026 typedef int shm_key_t;
00027 #endif
00028 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


RS003
Author(s):
autogenerated on Thu Jun 27 2013 14:58:49