Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef MSQ_WIN32_H
00022 #define MSQ_WIN32_H
00023
00024 #include <sys/types.h>
00025
00026 #ifdef __MINGW32__
00027
00028
00029 #include <windows.h>
00030
00031 #include <unistd.h>
00032
00033 #define IPC_CREAT 01000
00034 #define IPC_EXCL 02000
00035 #define IPC_NOWAIT 04000
00036 #define IPC_RMID 0
00037 #define IPC_SET 1
00038 #define IPC_STAT 2
00039
00040 #ifndef __key_t_defined
00041 typedef int key_t;
00042 #define __key_t_defined
00043 #endif // __key_t_defined
00044
00045 #ifndef __uid_t_defined
00046 typedef int uid_t;
00047 #define __uid_t_defined
00048 #endif // __uid_t_defined
00049
00050 #ifndef __gid_t_defined
00051 typedef int gid_t;
00052 #define __gid_t_defined
00053 #endif // __gid_t_defined
00054
00055 typedef unsigned long int msgqnum_t;
00056 typedef unsigned long int msglen_t;
00057
00058 struct ipc_perm
00059 {
00060 key_t __key;
00061 uid_t uid;
00062 gid_t gid;
00063 uid_t cuid;
00064 gid_t cgid;
00065 unsigned short int mode;
00066 unsigned short int __pad1;
00067 unsigned short int __seq;
00068 unsigned short int __pad2;
00069 unsigned long int __unused1;
00070 unsigned long int __unused2;
00071 };
00072 struct msqid_ds
00073 {
00074 struct ipc_perm msg_perm;
00075 time_t msg_stime;
00076 unsigned long int __unused1;
00077 time_t msg_rtime;
00078 unsigned long int __unused2;
00079 time_t msg_ctime;
00080 unsigned long int __unused3;
00081 unsigned long int __msg_cbytes;
00082 msgqnum_t msg_qnum;
00083 msglen_t msg_qbytes;
00084 pid_t msg_lspid;
00085 pid_t msg_lrpid;
00086 unsigned long int __unused4;
00087 unsigned long int __unused5;
00088 };
00089
00090 int msgget(key_t key, int msgflg);
00091 int msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg);
00092 ssize_t msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg);
00093 int msgctl(int msqid, int cmd, struct msqid_ds *buf);
00094
00095 #else
00096
00097
00098 #include <sys/ipc.h>
00099 #include <sys/msg.h>
00100
00101 #endif // __MINGW32__
00102
00103 #endif // MSQ_WIN32_H