Home | History | Annotate | Download | only in xlat
      1 /* Generated by ./xlat/gen.sh from ./xlat/advise.in; do not edit. */
      2 
      3 #include "gcc_compat.h"
      4 #include "static_assert.h"
      5 
      6 #if defined(POSIX_FADV_NORMAL) || (defined(HAVE_DECL_POSIX_FADV_NORMAL) && HAVE_DECL_POSIX_FADV_NORMAL)
      7 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
      8 static_assert((POSIX_FADV_NORMAL) == (0), "POSIX_FADV_NORMAL != 0");
      9 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
     10 #else
     11 # define POSIX_FADV_NORMAL 0
     12 #endif
     13 #if defined(POSIX_FADV_RANDOM) || (defined(HAVE_DECL_POSIX_FADV_RANDOM) && HAVE_DECL_POSIX_FADV_RANDOM)
     14 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
     15 static_assert((POSIX_FADV_RANDOM) == (1), "POSIX_FADV_RANDOM != 1");
     16 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
     17 #else
     18 # define POSIX_FADV_RANDOM 1
     19 #endif
     20 #if defined(POSIX_FADV_SEQUENTIAL) || (defined(HAVE_DECL_POSIX_FADV_SEQUENTIAL) && HAVE_DECL_POSIX_FADV_SEQUENTIAL)
     21 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
     22 static_assert((POSIX_FADV_SEQUENTIAL) == (2), "POSIX_FADV_SEQUENTIAL != 2");
     23 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
     24 #else
     25 # define POSIX_FADV_SEQUENTIAL 2
     26 #endif
     27 #if defined(POSIX_FADV_WILLNEED) || (defined(HAVE_DECL_POSIX_FADV_WILLNEED) && HAVE_DECL_POSIX_FADV_WILLNEED)
     28 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
     29 static_assert((POSIX_FADV_WILLNEED) == (3), "POSIX_FADV_WILLNEED != 3");
     30 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
     31 #else
     32 # define POSIX_FADV_WILLNEED 3
     33 #endif
     34 #if defined __s390x__
     35 #if defined(POSIX_FADV_DONTNEED) || (defined(HAVE_DECL_POSIX_FADV_DONTNEED) && HAVE_DECL_POSIX_FADV_DONTNEED)
     36 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
     37 static_assert((POSIX_FADV_DONTNEED) == (6), "POSIX_FADV_DONTNEED != 6");
     38 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
     39 #else
     40 # define POSIX_FADV_DONTNEED 6
     41 #endif
     42 #if defined(POSIX_FADV_NOREUSE) || (defined(HAVE_DECL_POSIX_FADV_NOREUSE) && HAVE_DECL_POSIX_FADV_NOREUSE)
     43 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
     44 static_assert((POSIX_FADV_NOREUSE) == (7), "POSIX_FADV_NOREUSE != 7");
     45 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
     46 #else
     47 # define POSIX_FADV_NOREUSE 7
     48 #endif
     49 #else
     50 #if defined(POSIX_FADV_DONTNEED) || (defined(HAVE_DECL_POSIX_FADV_DONTNEED) && HAVE_DECL_POSIX_FADV_DONTNEED)
     51 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
     52 static_assert((POSIX_FADV_DONTNEED) == (4), "POSIX_FADV_DONTNEED != 4");
     53 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
     54 #else
     55 # define POSIX_FADV_DONTNEED 4
     56 #endif
     57 #if defined(POSIX_FADV_NOREUSE) || (defined(HAVE_DECL_POSIX_FADV_NOREUSE) && HAVE_DECL_POSIX_FADV_NOREUSE)
     58 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
     59 static_assert((POSIX_FADV_NOREUSE) == (5), "POSIX_FADV_NOREUSE != 5");
     60 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
     61 #else
     62 # define POSIX_FADV_NOREUSE 5
     63 #endif
     64 #endif
     65 
     66 #ifndef XLAT_MACROS_ONLY
     67 
     68 # ifdef IN_MPERS
     69 
     70 #  error static const struct xlat advise in mpers mode
     71 
     72 # else
     73 
     74 static
     75 const struct xlat advise[] = {
     76  XLAT(POSIX_FADV_NORMAL),
     77  XLAT(POSIX_FADV_RANDOM),
     78  XLAT(POSIX_FADV_SEQUENTIAL),
     79  XLAT(POSIX_FADV_WILLNEED),
     80 #if defined __s390x__
     81  XLAT(POSIX_FADV_DONTNEED),
     82  XLAT(POSIX_FADV_NOREUSE),
     83 #else
     84  XLAT(POSIX_FADV_DONTNEED),
     85  XLAT(POSIX_FADV_NOREUSE),
     86 #endif
     87  XLAT_END
     88 };
     89 
     90 # endif /* !IN_MPERS */
     91 
     92 #endif /* !XLAT_MACROS_ONLY */
     93