]> granicus.if.org Git - strace/blob - ipc_defs.h
rtnl_link: use internal rtnl_link_stats* and ifla_port_vsi definitions
[strace] / ipc_defs.h
1 /*
2  * Copyright (c) 2003 Roland McGrath <roland@redhat.com>
3  * Copyright (c) 2003-2018 The strace developers.
4  * All rights reserved.
5  *
6  * SPDX-License-Identifier: LGPL-2.1-or-later
7  */
8
9 #ifndef STRACE_IPC_DEFS_H
10 # define STRACE_IPC_DEFS_H
11
12 # ifdef HAVE_SYS_IPC_H
13 #  include <sys/ipc.h>
14 # elif defined HAVE_LINUX_IPC_H
15 #  include <linux/ipc.h>
16 /* While glibc uses __key, the kernel uses key. */
17 #  define __key key
18 # endif
19
20 # if !defined IPC_64
21 #  define IPC_64 0x100
22 # endif
23
24 # define PRINTCTL(flagset, arg, dflt)                           \
25         do {                                                    \
26                 if ((arg) & IPC_64) {                           \
27                         print_xlat(IPC_64);                     \
28                         tprints("|");                           \
29                 }                                               \
30                 printxval((flagset), (arg) & ~IPC_64, dflt);    \
31         } while (0)
32
33 #endif /* !STRACE_IPC_DEFS_H */