• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Generated by ./xlat/gen.sh from ./xlat/flockcmds.in; do not edit. */
2 
3 #include "gcc_compat.h"
4 #include "static_assert.h"
5 
6 #if defined(LOCK_SH) || (defined(HAVE_DECL_LOCK_SH) && HAVE_DECL_LOCK_SH)
7 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
8 static_assert((LOCK_SH) == (1), "LOCK_SH != 1");
9 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
10 #else
11 # define LOCK_SH 1
12 #endif
13 #if defined(LOCK_EX) || (defined(HAVE_DECL_LOCK_EX) && HAVE_DECL_LOCK_EX)
14 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
15 static_assert((LOCK_EX) == (2), "LOCK_EX != 2");
16 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
17 #else
18 # define LOCK_EX 2
19 #endif
20 #if defined(LOCK_NB) || (defined(HAVE_DECL_LOCK_NB) && HAVE_DECL_LOCK_NB)
21 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
22 static_assert((LOCK_NB) == (4), "LOCK_NB != 4");
23 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
24 #else
25 # define LOCK_NB 4
26 #endif
27 #if defined(LOCK_UN) || (defined(HAVE_DECL_LOCK_UN) && HAVE_DECL_LOCK_UN)
28 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
29 static_assert((LOCK_UN) == (8), "LOCK_UN != 8");
30 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
31 #else
32 # define LOCK_UN 8
33 #endif
34 #if defined(LOCK_MAND) || (defined(HAVE_DECL_LOCK_MAND) && HAVE_DECL_LOCK_MAND)
35 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
36 static_assert((LOCK_MAND) == (32), "LOCK_MAND != 32");
37 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
38 #else
39 # define LOCK_MAND 32
40 #endif
41 #if defined(LOCK_RW) || (defined(HAVE_DECL_LOCK_RW) && HAVE_DECL_LOCK_RW)
42 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
43 static_assert((LOCK_RW) == (192), "LOCK_RW != 192");
44 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
45 #else
46 # define LOCK_RW 192
47 #endif
48 #if defined(LOCK_READ) || (defined(HAVE_DECL_LOCK_READ) && HAVE_DECL_LOCK_READ)
49 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
50 static_assert((LOCK_READ) == (64), "LOCK_READ != 64");
51 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
52 #else
53 # define LOCK_READ 64
54 #endif
55 #if defined(LOCK_WRITE) || (defined(HAVE_DECL_LOCK_WRITE) && HAVE_DECL_LOCK_WRITE)
56 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
57 static_assert((LOCK_WRITE) == (128), "LOCK_WRITE != 128");
58 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
59 #else
60 # define LOCK_WRITE 128
61 #endif
62 
63 #ifndef XLAT_MACROS_ONLY
64 
65 # ifdef IN_MPERS
66 
67 #  error static const struct xlat flockcmds in mpers mode
68 
69 # else
70 
71 static
72 const struct xlat flockcmds[] = {
73  XLAT(LOCK_SH),
74  XLAT(LOCK_EX),
75  XLAT(LOCK_NB),
76  XLAT(LOCK_UN),
77  XLAT(LOCK_MAND),
78  XLAT(LOCK_RW),
79  XLAT(LOCK_READ),
80  XLAT(LOCK_WRITE),
81  XLAT_END
82 };
83 
84 # endif /* !IN_MPERS */
85 
86 #endif /* !XLAT_MACROS_ONLY */
87