4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-23 07:27:21 +08:00
Corinna Vinschen 6e623e9320 Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option
Bump GPLv2+ to GPLv3+ for some files, clarify BSD 2-clause.

Everything else stays under GPLv3+.

New Linking Exception exempts resulting executables from LGPLv3 section 4.

Add CONTRIBUTORS file to keep track of licensing.

Remove 'Copyright Red Hat Inc' comments.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-06-23 10:09:17 +02:00

71 lines
1.7 KiB
C

/* sys/ipc.h
Written by Robert Collins <rbtcollins@hotmail.com>
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
#ifndef _CYGWIN_IPC_H
#define _CYGWIN_IPC_H
#include <sys/types.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C"
{
#endif
struct ipc_perm
{
uid_t uid; /* Owner's user ID. */
gid_t gid; /* Owner's group ID. */
uid_t cuid; /* Creator's user ID. */
gid_t cgid; /* Creator's group ID. */
mode_t mode; /* Read/write permission. */
key_t key;
unsigned short seq;
};
/* Mode bits:
*/
#define IPC_CREAT 0x0200 /* Create entry if key does not exist. */
#define IPC_EXCL 0x0400 /* Fail if key exists. */
#define IPC_NOWAIT 0x0800 /* Error if request must wait. */
#ifdef _KERNEL
#define IPC_KEY_IS_SHMID 0x1000 /* Used in shmget when called from shmat. */
#endif
/* Keys:
*/
#define IPC_PRIVATE ((key_t) 0) /* Private key. */
/* Control commands:
*/
#define IPC_RMID 0x1000 /* Remove identifier. */
#define IPC_SET 0x1001 /* Set options. */
#define IPC_STAT 0x1002 /* Get options. */
#ifdef _KERNEL
#define IPC_INFO 0x1003 /* For ipcs(8). */
#endif
#ifdef _KERNEL
#define IPCID_TO_IX(id) ((id) & 0xffff)
#define IPCID_TO_SEQ(id) (((id) >> 16) & 0xffff)
#define IXSEQ_TO_IPCID(ix,perm) (((perm.seq) << 16) | (ix & 0xffff))
#define IPC_R 000400 /* read permission */
#define IPC_W 000200 /* write/alter permission */
#define IPC_M 010000 /* permission to change control info */
#endif
key_t ftok (const char *path, int id);
#ifdef __cplusplus
}
#endif
#endif /* _CYGWIN_IPC_H */