| 1 |
|
| #define PERL_constant_NOTFOUND 1 |
| 2 |
|
| #define PERL_constant_NOTDEF 2 |
| 3 |
|
| #define PERL_constant_ISIV 3 |
| 4 |
|
| #define PERL_constant_ISNO 4 |
| 5 |
|
| #define PERL_constant_ISNV 5 |
| 6 |
|
| #define PERL_constant_ISPV 6 |
| 7 |
|
| #define PERL_constant_ISPVN 7 |
| 8 |
|
| #define PERL_constant_ISSV 8 |
| 9 |
|
| #define PERL_constant_ISUNDEF 9 |
| 10 |
|
| #define PERL_constant_ISUV 10 |
| 11 |
|
| #define PERL_constant_ISYES 11 |
| 12 |
|
| |
| 13 |
|
| #ifndef NVTYPE |
| 14 |
|
| typedef double NV; /* 5.6 and later define NVTYPE, and typedef NV to it. */ |
| 15 |
|
| #endif |
| 16 |
|
| #ifndef aTHX_ |
| 17 |
|
| #define aTHX_ /* 5.6 or later define this for threading support. */ |
| 18 |
|
| #endif |
| 19 |
|
| #ifndef pTHX_ |
| 20 |
|
| #define pTHX_ /* 5.6 or later define this for threading support. */ |
| 21 |
|
| #endif |
| 22 |
|
| |
| 23 |
|
| static int |
| 24 |
0 |
| constant_11 (pTHX_ const char *name, IV *iv_return) { |
| 25 |
|
| /* When generated this function returned values for the list of names given |
| 26 |
|
| here. However, subsequent manual editing may have added or removed some. |
| 27 |
|
| ITIMER_PROF ITIMER_REAL d_getitimer d_nanosleep d_setitimer d_utimensat */ |
| 28 |
|
| /* Offset 7 gives the best switch position. */ |
| 29 |
0 |
| switch (name[7]) { |
| 30 |
0 |
| case 'P': |
| 31 |
0 |
▶ | if (memEQ(name, "ITIMER_PROF", 11)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "ITIMER_PROF", 11)) { |
0 |
0 |
0 |
|
| 32 |
|
| /* ^ */ |
| 33 |
|
| #ifdef ITIMER_PROF |
| 34 |
0 |
| *iv_return = ITIMER_PROF; |
| 35 |
0 |
| return PERL_constant_ISIV; |
| 36 |
|
| #else |
| 37 |
|
| return PERL_constant_NOTDEF; |
| 38 |
|
| #endif |
| 39 |
|
| } |
| 40 |
0 |
| break; |
| 41 |
0 |
| case 'R': |
| 42 |
0 |
▶ | if (memEQ(name, "ITIMER_REAL", 11)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "ITIMER_REAL", 11)) { |
0 |
0 |
0 |
|
| 43 |
|
| /* ^ */ |
| 44 |
|
| #ifdef ITIMER_REAL |
| 45 |
0 |
| *iv_return = ITIMER_REAL; |
| 46 |
0 |
| return PERL_constant_ISIV; |
| 47 |
|
| #else |
| 48 |
|
| return PERL_constant_NOTDEF; |
| 49 |
|
| #endif |
| 50 |
|
| } |
| 51 |
0 |
| break; |
| 52 |
0 |
| case 'i': |
| 53 |
0 |
▶ | if (memEQ(name, "d_getitimer", 11)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "d_getitimer", 11)) { |
0 |
0 |
0 |
|
| 54 |
|
| /* ^ */ |
| 55 |
|
| #ifdef HAS_GETITIMER |
| 56 |
0 |
| *iv_return = 1; |
| 57 |
0 |
| return PERL_constant_ISIV; |
| 58 |
|
| #else |
| 59 |
|
| *iv_return = 0; |
| 60 |
|
| return PERL_constant_ISIV; |
| 61 |
|
| #endif |
| 62 |
|
| } |
| 63 |
0 |
▶ | if (memEQ(name, "d_setitimer", 11)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "d_setitimer", 11)) { |
0 |
0 |
0 |
|
| 64 |
|
| /* ^ */ |
| 65 |
|
| #ifdef HAS_SETITIMER |
| 66 |
0 |
| *iv_return = 1; |
| 67 |
0 |
| return PERL_constant_ISIV; |
| 68 |
|
| #else |
| 69 |
|
| *iv_return = 0; |
| 70 |
|
| return PERL_constant_ISIV; |
| 71 |
|
| #endif |
| 72 |
|
| } |
| 73 |
0 |
| break; |
| 74 |
0 |
| case 'l': |
| 75 |
0 |
▶ | if (memEQ(name, "d_nanosleep", 11)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "d_nanosleep", 11)) { |
0 |
0 |
0 |
|
| 76 |
|
| /* ^ */ |
| 77 |
|
| #ifdef TIME_HIRES_NANOSLEEP |
| 78 |
0 |
| *iv_return = 1; |
| 79 |
0 |
| return PERL_constant_ISIV; |
| 80 |
|
| #else |
| 81 |
|
| *iv_return = 0; |
| 82 |
|
| return PERL_constant_ISIV; |
| 83 |
|
| #endif |
| 84 |
|
| } |
| 85 |
0 |
| break; |
| 86 |
0 |
| case 'n': |
| 87 |
0 |
▶ | if (memEQ(name, "d_utimensat", 11)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "d_utimensat", 11)) { |
0 |
0 |
0 |
|
| 88 |
|
| /* ^ */ |
| 89 |
|
| #ifdef HAS_UTIMENSAT |
| 90 |
0 |
| *iv_return = 1; |
| 91 |
0 |
| return PERL_constant_ISIV; |
| 92 |
|
| #else |
| 93 |
|
| *iv_return = 0; |
| 94 |
|
| return PERL_constant_ISIV; |
| 95 |
|
| #endif |
| 96 |
|
| } |
| 97 |
0 |
| break; |
| 98 |
|
| } |
| 99 |
0 |
| return PERL_constant_NOTFOUND; |
| 100 |
|
| } |
| 101 |
|
| |
| 102 |
|
| static int |
| 103 |
0 |
| constant_12 (pTHX_ const char *name, IV *iv_return) { |
| 104 |
|
| /* When generated this function returned values for the list of names given |
| 105 |
|
| here. However, subsequent manual editing may have added or removed some. |
| 106 |
|
| CLOCK_SECOND CLOCK_UPTIME d_hires_stat */ |
| 107 |
|
| /* Offset 10 gives the best switch position. */ |
| 108 |
0 |
| switch (name[10]) { |
| 109 |
0 |
| case 'M': |
| 110 |
0 |
▶ | if (memEQ(name, "CLOCK_UPTIME", 12)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "CLOCK_UPTIME", 12)) { |
0 |
0 |
0 |
|
| 111 |
|
| /* ^ */ |
| 112 |
|
| #ifdef CLOCK_UPTIME |
| 113 |
|
| *iv_return = CLOCK_UPTIME; |
| 114 |
|
| return PERL_constant_ISIV; |
| 115 |
|
| #else |
| 116 |
0 |
| return PERL_constant_NOTDEF; |
| 117 |
|
| #endif |
| 118 |
|
| } |
| 119 |
0 |
| break; |
| 120 |
0 |
| case 'N': |
| 121 |
0 |
▶ | if (memEQ(name, "CLOCK_SECOND", 12)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "CLOCK_SECOND", 12)) { |
0 |
0 |
0 |
|
| 122 |
|
| /* ^ */ |
| 123 |
|
| #ifdef CLOCK_SECOND |
| 124 |
|
| *iv_return = CLOCK_SECOND; |
| 125 |
|
| return PERL_constant_ISIV; |
| 126 |
|
| #else |
| 127 |
0 |
| return PERL_constant_NOTDEF; |
| 128 |
|
| #endif |
| 129 |
|
| } |
| 130 |
0 |
| break; |
| 131 |
0 |
| case 'a': |
| 132 |
0 |
▶ | if (memEQ(name, "d_hires_stat", 12)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "d_hires_stat", 12)) { |
0 |
0 |
0 |
|
| 133 |
|
| /* ^ */ |
| 134 |
|
| #ifdef TIME_HIRES_STAT |
| 135 |
0 |
| *iv_return = 4; |
| 136 |
0 |
| return PERL_constant_ISIV; |
| 137 |
|
| #else |
| 138 |
|
| *iv_return = 0; |
| 139 |
|
| return PERL_constant_ISIV; |
| 140 |
|
| #endif |
| 141 |
|
| } |
| 142 |
0 |
| break; |
| 143 |
|
| } |
| 144 |
0 |
| return PERL_constant_NOTFOUND; |
| 145 |
|
| } |
| 146 |
|
| |
| 147 |
|
| static int |
| 148 |
0 |
| constant_13 (pTHX_ const char *name, IV *iv_return) { |
| 149 |
|
| /* When generated this function returned values for the list of names given |
| 150 |
|
| here. However, subsequent manual editing may have added or removed some. |
| 151 |
|
| CLOCK_HIGHRES CLOCK_VIRTUAL TIMER_ABSTIME d_hires_utime */ |
| 152 |
|
| /* Offset 12 gives the best switch position. */ |
| 153 |
0 |
| switch (name[12]) { |
| 154 |
0 |
| case 'E': |
| 155 |
0 |
▶ | if (memEQ(name, "TIMER_ABSTIM", 12)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "TIMER_ABSTIM", 12)) { |
0 |
0 |
0 |
|
| 156 |
|
| /* E */ |
| 157 |
|
| #ifdef TIMER_ABSTIME |
| 158 |
0 |
| *iv_return = TIMER_ABSTIME; |
| 159 |
0 |
| return PERL_constant_ISIV; |
| 160 |
|
| #else |
| 161 |
|
| return PERL_constant_NOTDEF; |
| 162 |
|
| #endif |
| 163 |
|
| } |
| 164 |
0 |
| break; |
| 165 |
0 |
| case 'L': |
| 166 |
0 |
▶ | if (memEQ(name, "CLOCK_VIRTUA", 12)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "CLOCK_VIRTUA", 12)) { |
0 |
0 |
0 |
|
| 167 |
|
| /* L */ |
| 168 |
|
| #ifdef CLOCK_VIRTUAL |
| 169 |
|
| *iv_return = CLOCK_VIRTUAL; |
| 170 |
|
| return PERL_constant_ISIV; |
| 171 |
|
| #else |
| 172 |
0 |
| return PERL_constant_NOTDEF; |
| 173 |
|
| #endif |
| 174 |
|
| } |
| 175 |
0 |
| break; |
| 176 |
0 |
| case 'S': |
| 177 |
0 |
▶ | if (memEQ(name, "CLOCK_HIGHRE", 12)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "CLOCK_HIGHRE", 12)) { |
0 |
0 |
0 |
|
| 178 |
|
| /* S */ |
| 179 |
|
| #ifdef CLOCK_HIGHRES |
| 180 |
|
| *iv_return = CLOCK_HIGHRES; |
| 181 |
|
| return PERL_constant_ISIV; |
| 182 |
|
| #else |
| 183 |
0 |
| return PERL_constant_NOTDEF; |
| 184 |
|
| #endif |
| 185 |
|
| } |
| 186 |
0 |
| break; |
| 187 |
0 |
| case 'e': |
| 188 |
0 |
▶ | if (memEQ(name, "d_hires_utim", 12)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "d_hires_utim", 12)) { |
0 |
0 |
0 |
|
| 189 |
|
| /* e */ |
| 190 |
|
| #ifdef TIME_HIRES_UTIME |
| 191 |
0 |
| *iv_return = 1; |
| 192 |
0 |
| return PERL_constant_ISIV; |
| 193 |
|
| #else |
| 194 |
|
| *iv_return = 0; |
| 195 |
|
| return PERL_constant_ISIV; |
| 196 |
|
| #endif |
| 197 |
|
| } |
| 198 |
0 |
| break; |
| 199 |
|
| } |
| 200 |
0 |
| return PERL_constant_NOTFOUND; |
| 201 |
|
| } |
| 202 |
|
| |
| 203 |
|
| static int |
| 204 |
0 |
| constant_14 (pTHX_ const char *name, IV *iv_return) { |
| 205 |
|
| /* When generated this function returned values for the list of names given |
| 206 |
|
| here. However, subsequent manual editing may have added or removed some. |
| 207 |
|
| CLOCKS_PER_SEC CLOCK_BOOTTIME CLOCK_REALTIME CLOCK_SOFTTIME ITIMER_VIRTUAL |
| 208 |
|
| d_clock_getres d_gettimeofday */ |
| 209 |
|
| /* Offset 8 gives the best switch position. */ |
| 210 |
0 |
| switch (name[8]) { |
| 211 |
0 |
| case 'A': |
| 212 |
0 |
▶ | if (memEQ(name, "CLOCK_REALTIME", 14)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "CLOCK_REALTIME", 14)) { |
0 |
0 |
0 |
|
| 213 |
|
| /* ^ */ |
| 214 |
|
| #ifdef CLOCK_REALTIME |
| 215 |
0 |
| *iv_return = CLOCK_REALTIME; |
| 216 |
0 |
| return PERL_constant_ISIV; |
| 217 |
|
| #else |
| 218 |
|
| return PERL_constant_NOTDEF; |
| 219 |
|
| #endif |
| 220 |
|
| } |
| 221 |
0 |
| break; |
| 222 |
0 |
| case 'E': |
| 223 |
0 |
▶ | if (memEQ(name, "CLOCKS_PER_SEC", 14)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "CLOCKS_PER_SEC", 14)) { |
0 |
0 |
0 |
|
| 224 |
|
| /* ^ */ |
| 225 |
|
| #ifdef CLOCKS_PER_SEC |
| 226 |
0 |
| *iv_return = CLOCKS_PER_SEC; |
| 227 |
0 |
| return PERL_constant_ISIV; |
| 228 |
|
| #else |
| 229 |
|
| return PERL_constant_NOTDEF; |
| 230 |
|
| #endif |
| 231 |
|
| } |
| 232 |
0 |
| break; |
| 233 |
0 |
| case 'F': |
| 234 |
0 |
▶ | if (memEQ(name, "CLOCK_SOFTTIME", 14)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "CLOCK_SOFTTIME", 14)) { |
0 |
0 |
0 |
|
| 235 |
|
| /* ^ */ |
| 236 |
|
| #ifdef CLOCK_SOFTTIME |
| 237 |
|
| *iv_return = CLOCK_SOFTTIME; |
| 238 |
|
| return PERL_constant_ISIV; |
| 239 |
|
| #else |
| 240 |
0 |
| return PERL_constant_NOTDEF; |
| 241 |
|
| #endif |
| 242 |
|
| } |
| 243 |
0 |
| break; |
| 244 |
0 |
| case 'I': |
| 245 |
0 |
▶ | if (memEQ(name, "ITIMER_VIRTUAL", 14)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "ITIMER_VIRTUAL", 14)) { |
0 |
0 |
0 |
|
| 246 |
|
| /* ^ */ |
| 247 |
|
| #ifdef ITIMER_VIRTUAL |
| 248 |
0 |
| *iv_return = ITIMER_VIRTUAL; |
| 249 |
0 |
| return PERL_constant_ISIV; |
| 250 |
|
| #else |
| 251 |
|
| return PERL_constant_NOTDEF; |
| 252 |
|
| #endif |
| 253 |
|
| } |
| 254 |
0 |
| break; |
| 255 |
0 |
| case 'O': |
| 256 |
0 |
▶ | if (memEQ(name, "CLOCK_BOOTTIME", 14)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "CLOCK_BOOTTIME", 14)) { |
0 |
0 |
0 |
|
| 257 |
|
| /* ^ */ |
| 258 |
|
| #ifdef CLOCK_BOOTTIME |
| 259 |
0 |
| *iv_return = CLOCK_BOOTTIME; |
| 260 |
0 |
| return PERL_constant_ISIV; |
| 261 |
|
| #else |
| 262 |
|
| return PERL_constant_NOTDEF; |
| 263 |
|
| #endif |
| 264 |
|
| } |
| 265 |
0 |
| break; |
| 266 |
0 |
| case 'e': |
| 267 |
0 |
▶ | if (memEQ(name, "d_gettimeofday", 14)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "d_gettimeofday", 14)) { |
0 |
0 |
0 |
|
| 268 |
|
| /* ^ */ |
| 269 |
|
| #ifdef HAS_GETTIMEOFDAY |
| 270 |
0 |
| *iv_return = 1; |
| 271 |
0 |
| return PERL_constant_ISIV; |
| 272 |
|
| #else |
| 273 |
|
| *iv_return = 0; |
| 274 |
|
| return PERL_constant_ISIV; |
| 275 |
|
| #endif |
| 276 |
|
| } |
| 277 |
0 |
| break; |
| 278 |
0 |
| case 'g': |
| 279 |
0 |
▶ | if (memEQ(name, "d_clock_getres", 14)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "d_clock_getres", 14)) { |
0 |
0 |
0 |
|
| 280 |
|
| /* ^ */ |
| 281 |
|
| #ifdef TIME_HIRES_CLOCK_GETRES |
| 282 |
0 |
| *iv_return = 1; |
| 283 |
0 |
| return PERL_constant_ISIV; |
| 284 |
|
| #else |
| 285 |
|
| *iv_return = 0; |
| 286 |
|
| return PERL_constant_ISIV; |
| 287 |
|
| #endif |
| 288 |
|
| } |
| 289 |
0 |
| break; |
| 290 |
|
| } |
| 291 |
0 |
| return PERL_constant_NOTFOUND; |
| 292 |
|
| } |
| 293 |
|
| |
| 294 |
|
| static int |
| 295 |
0 |
| constant_15 (pTHX_ const char *name, IV *iv_return) { |
| 296 |
|
| /* When generated this function returned values for the list of names given |
| 297 |
|
| here. However, subsequent manual editing may have added or removed some. |
| 298 |
|
| CLOCK_MONOTONIC CLOCK_TIMEOFDAY ITIMER_REALPROF d_clock_gettime */ |
| 299 |
|
| /* Offset 7 gives the best switch position. */ |
| 300 |
0 |
| switch (name[7]) { |
| 301 |
0 |
| case 'I': |
| 302 |
0 |
▶ | if (memEQ(name, "CLOCK_TIMEOFDAY", 15)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "CLOCK_TIMEOFDAY", 15)) { |
0 |
0 |
0 |
|
| 303 |
|
| /* ^ */ |
| 304 |
|
| #ifdef CLOCK_TIMEOFDAY |
| 305 |
|
| *iv_return = CLOCK_TIMEOFDAY; |
| 306 |
|
| return PERL_constant_ISIV; |
| 307 |
|
| #else |
| 308 |
0 |
| return PERL_constant_NOTDEF; |
| 309 |
|
| #endif |
| 310 |
|
| } |
| 311 |
0 |
| break; |
| 312 |
0 |
| case 'O': |
| 313 |
0 |
▶ | if (memEQ(name, "CLOCK_MONOTONIC", 15)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "CLOCK_MONOTONIC", 15)) { |
0 |
0 |
0 |
|
| 314 |
|
| /* ^ */ |
| 315 |
|
| #ifdef CLOCK_MONOTONIC |
| 316 |
0 |
| *iv_return = CLOCK_MONOTONIC; |
| 317 |
0 |
| return PERL_constant_ISIV; |
| 318 |
|
| #else |
| 319 |
|
| return PERL_constant_NOTDEF; |
| 320 |
|
| #endif |
| 321 |
|
| } |
| 322 |
0 |
| break; |
| 323 |
0 |
| case 'R': |
| 324 |
0 |
▶ | if (memEQ(name, "ITIMER_REALPROF", 15)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "ITIMER_REALPROF", 15)) { |
0 |
0 |
0 |
|
| 325 |
|
| /* ^ */ |
| 326 |
|
| #ifdef ITIMER_REALPROF |
| 327 |
|
| *iv_return = ITIMER_REALPROF; |
| 328 |
|
| return PERL_constant_ISIV; |
| 329 |
|
| #else |
| 330 |
0 |
| return PERL_constant_NOTDEF; |
| 331 |
|
| #endif |
| 332 |
|
| } |
| 333 |
0 |
| break; |
| 334 |
0 |
| case '_': |
| 335 |
0 |
▶ | if (memEQ(name, "d_clock_gettime", 15)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "d_clock_gettime", 15)) { |
0 |
0 |
0 |
|
| 336 |
|
| /* ^ */ |
| 337 |
|
| #ifdef TIME_HIRES_CLOCK_GETTIME |
| 338 |
0 |
| *iv_return = 1; |
| 339 |
0 |
| return PERL_constant_ISIV; |
| 340 |
|
| #else |
| 341 |
|
| *iv_return = 0; |
| 342 |
|
| return PERL_constant_ISIV; |
| 343 |
|
| #endif |
| 344 |
|
| } |
| 345 |
0 |
| break; |
| 346 |
|
| } |
| 347 |
0 |
| return PERL_constant_NOTFOUND; |
| 348 |
|
| } |
| 349 |
|
| |
| 350 |
|
| static int |
| 351 |
0 |
| constant_19 (pTHX_ const char *name, IV *iv_return) { |
| 352 |
|
| /* When generated this function returned values for the list of names given |
| 353 |
|
| here. However, subsequent manual editing may have added or removed some. |
| 354 |
|
| CLOCK_MONOTONIC_RAW CLOCK_REALTIME_FAST CLOCK_UPTIME_COARSE */ |
| 355 |
|
| /* Offset 9 gives the best switch position. */ |
| 356 |
0 |
| switch (name[9]) { |
| 357 |
0 |
| case 'I': |
| 358 |
0 |
▶ | if (memEQ(name, "CLOCK_UPTIME_COARSE", 19)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "CLOCK_UPTIME_COARSE", 19)) { |
0 |
0 |
0 |
|
| 359 |
|
| /* ^ */ |
| 360 |
|
| #ifdef CLOCK_UPTIME_COARSE |
| 361 |
|
| *iv_return = CLOCK_UPTIME_COARSE; |
| 362 |
|
| return PERL_constant_ISIV; |
| 363 |
|
| #else |
| 364 |
0 |
| return PERL_constant_NOTDEF; |
| 365 |
|
| #endif |
| 366 |
|
| } |
| 367 |
0 |
| break; |
| 368 |
0 |
| case 'L': |
| 369 |
0 |
▶ | if (memEQ(name, "CLOCK_REALTIME_FAST", 19)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "CLOCK_REALTIME_FAST", 19)) { |
0 |
0 |
0 |
|
| 370 |
|
| /* ^ */ |
| 371 |
|
| #ifdef CLOCK_REALTIME_FAST |
| 372 |
|
| *iv_return = CLOCK_REALTIME_FAST; |
| 373 |
|
| return PERL_constant_ISIV; |
| 374 |
|
| #else |
| 375 |
0 |
| return PERL_constant_NOTDEF; |
| 376 |
|
| #endif |
| 377 |
|
| } |
| 378 |
0 |
| break; |
| 379 |
0 |
| case 'O': |
| 380 |
0 |
▶ | if (memEQ(name, "CLOCK_MONOTONIC_RAW", 19)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "CLOCK_MONOTONIC_RAW", 19)) { |
0 |
0 |
0 |
|
| 381 |
|
| /* ^ */ |
| 382 |
|
| #ifdef CLOCK_MONOTONIC_RAW |
| 383 |
0 |
| *iv_return = CLOCK_MONOTONIC_RAW; |
| 384 |
0 |
| return PERL_constant_ISIV; |
| 385 |
|
| #else |
| 386 |
|
| return PERL_constant_NOTDEF; |
| 387 |
|
| #endif |
| 388 |
|
| } |
| 389 |
0 |
| break; |
| 390 |
|
| } |
| 391 |
0 |
| return PERL_constant_NOTFOUND; |
| 392 |
|
| } |
| 393 |
|
| |
| 394 |
|
| static int |
| 395 |
0 |
| constant (pTHX_ const char *name, STRLEN len, IV *iv_return) { |
| 396 |
|
| /* Initially switch on the length of the name. */ |
| 397 |
|
| /* When generated this function returned values for the list of names given |
| 398 |
|
| in this section of perl code. Rather than manually editing these functions |
| 399 |
|
| to add or remove constants, which would result in this comment and section |
| 400 |
|
| of code becoming inaccurate, we recommend that you edit this section of |
| 401 |
|
| code, and use it to regenerate a new set of constant functions which you |
| 402 |
|
| then use to replace the originals. |
| 403 |
|
| |
| 404 |
|
| Regenerate these constant functions by feeding this entire source file to |
| 405 |
|
| perl -x |
| 406 |
|
| |
| 407 |
|
| #!/usr/local/bin/perl -w |
| 408 |
|
| use ExtUtils::Constant qw (constant_types C_constant XS_constant); |
| 409 |
|
| |
| 410 |
|
| my $types = {map {($_, 1)} qw(IV)}; |
| 411 |
|
| my @names = (qw(CLOCKS_PER_SEC CLOCK_BOOTTIME CLOCK_HIGHRES CLOCK_MONOTONIC |
| 412 |
|
| CLOCK_MONOTONIC_COARSE CLOCK_MONOTONIC_FAST |
| 413 |
|
| CLOCK_MONOTONIC_PRECISE CLOCK_MONOTONIC_RAW |
| 414 |
|
| CLOCK_PROCESS_CPUTIME_ID CLOCK_PROF CLOCK_REALTIME |
| 415 |
|
| CLOCK_REALTIME_COARSE CLOCK_REALTIME_FAST CLOCK_REALTIME_PRECISE |
| 416 |
|
| CLOCK_REALTIME_RAW CLOCK_SECOND CLOCK_SOFTTIME |
| 417 |
|
| CLOCK_THREAD_CPUTIME_ID CLOCK_TIMEOFDAY CLOCK_UPTIME |
| 418 |
|
| CLOCK_UPTIME_COARSE CLOCK_UPTIME_FAST CLOCK_UPTIME_PRECISE |
| 419 |
|
| CLOCK_UPTIME_RAW CLOCK_VIRTUAL ITIMER_PROF ITIMER_REAL |
| 420 |
|
| ITIMER_REALPROF ITIMER_VIRTUAL TIMER_ABSTIME), |
| 421 |
|
| {name=>"d_clock", type=>"IV", macro=>"TIME_HIRES_CLOCK", value=>"1", default=>["IV", "0"]}, |
| 422 |
|
| {name=>"d_clock_getres", type=>"IV", macro=>"TIME_HIRES_CLOCK_GETRES", value=>"1", default=>["IV", "0"]}, |
| 423 |
|
| {name=>"d_clock_gettime", type=>"IV", macro=>"TIME_HIRES_CLOCK_GETTIME", value=>"1", default=>["IV", "0"]}, |
| 424 |
|
| {name=>"d_clock_nanosleep", type=>"IV", macro=>"TIME_HIRES_CLOCK_NANOSLEEP", value=>"1", default=>["IV", "0"]}, |
| 425 |
|
| {name=>"d_futimens", type=>"IV", macro=>"HAS_FUTIMENS", value=>"1", default=>["IV", "0"]}, |
| 426 |
|
| {name=>"d_getitimer", type=>"IV", macro=>"HAS_GETITIMER", value=>"1", default=>["IV", "0"]}, |
| 427 |
|
| {name=>"d_gettimeofday", type=>"IV", macro=>"HAS_GETTIMEOFDAY", value=>"1", default=>["IV", "0"]}, |
| 428 |
|
| {name=>"d_hires_stat", type=>"IV", macro=>"TIME_HIRES_STAT", value=>"4", default=>["IV", "0"]}, |
| 429 |
|
| {name=>"d_hires_utime", type=>"IV", macro=>"TIME_HIRES_UTIME", value=>"1", default=>["IV", "0"]}, |
| 430 |
|
| {name=>"d_nanosleep", type=>"IV", macro=>"TIME_HIRES_NANOSLEEP", value=>"1", default=>["IV", "0"]}, |
| 431 |
|
| {name=>"d_setitimer", type=>"IV", macro=>"HAS_SETITIMER", value=>"1", default=>["IV", "0"]}, |
| 432 |
|
| {name=>"d_ualarm", type=>"IV", macro=>"HAS_UALARM", value=>"1", default=>["IV", "0"]}, |
| 433 |
|
| {name=>"d_usleep", type=>"IV", macro=>"HAS_USLEEP", value=>"1", default=>["IV", "0"]}, |
| 434 |
|
| {name=>"d_utimensat", type=>"IV", macro=>"HAS_UTIMENSAT", value=>"1", default=>["IV", "0"]}); |
| 435 |
|
| |
| 436 |
|
| print constant_types(), "\n"; # macro defs |
| 437 |
|
| foreach (C_constant ("Time::HiRes", 'constant', 'IV', $types, undef, 3, @names) ) { |
| 438 |
|
| print $_, "\n"; # C constant subs |
| 439 |
|
| } |
| 440 |
|
| print "\n#### XS Section:\n"; |
| 441 |
|
| print XS_constant ("Time::HiRes", $types); |
| 442 |
|
| __END__ |