musl/include/sys/ipc.h
Rich Felker 006a75a997 move IPC_STAT definition to a new bits/ipcstat.h file
otherwise, 32-bit archs that could otherwise share the generic
bits/ipc.h would need to duplicate the struct ipc_perm definition,
obscuring the fact that it's the same. sysvipc is not widely used and
these headers are not commonly included, so there is no performance
gain to be had by limiting the number of indirectly included files
here.

files with the existing time32 definition of IPC_STAT are added to all
current 32-bit archs now, so that when it's changed the change will
show up as a change rather than addition of a new file where it's less
obvious that the value is changing vs the generic one that was used
before.
2019-08-02 00:08:23 -04:00

43 lines
651 B
C

#ifndef _SYS_IPC_H
#define _SYS_IPC_H
#ifdef __cplusplus
extern "C" {
#endif
#include <features.h>
#define __NEED_uid_t
#define __NEED_gid_t
#define __NEED_mode_t
#define __NEED_key_t
#include <bits/alltypes.h>
#define __ipc_perm_key __key
#define __ipc_perm_seq __seq
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#define __key key
#define __seq seq
#endif
#include <bits/ipc.h>
#include <bits/ipcstat.h>
#define IPC_CREAT 01000
#define IPC_EXCL 02000
#define IPC_NOWAIT 04000
#define IPC_RMID 0
#define IPC_SET 1
#define IPC_INFO 3
#define IPC_PRIVATE ((key_t) 0)
key_t ftok (const char *, int);
#ifdef __cplusplus
}
#endif
#endif