89
89
# undef ITIMER_REALPROF
90
90
#endif
91
91
92
+ /* special type used by croak("unimplemented") XSUBs to neutralize */
93
+ typedef NV NV_DIE ; /* unused dXSTARG/sv_newmortal() calls */
94
+
92
95
#ifndef TIME_HIRES_CLOCKID_T
93
96
typedef int clockid_t ;
94
97
#endif
@@ -1010,12 +1013,12 @@ nanosleep(nsec)
1010
1013
1011
1014
# else /* #if defined(TIME_HIRES_NANOSLEEP) */
1012
1015
1013
- NV
1016
+ NV_DIE
1014
1017
nanosleep (nsec )
1015
1018
NV nsec
1016
1019
CODE :
1017
1020
PERL_UNUSED_ARG (nsec );
1018
- croak ("Time::HiRes::nanosleep (): unimplemented in this platform" );
1021
+ croak ("%s (): unimplemented in this platform" , "Time::HiRes::nanosleep " );
1019
1022
RETVAL = 0.0 ;
1020
1023
OUTPUT :
1021
1024
RETVAL
@@ -1066,12 +1069,12 @@ sleep(...)
1066
1069
1067
1070
#else /* #if defined(HAS_USLEEP) && defined(HAS_GETTIMEOFDAY) */
1068
1071
1069
- NV
1072
+ NV_DIE
1070
1073
usleep (useconds )
1071
1074
NV useconds
1072
1075
CODE :
1073
1076
PERL_UNUSED_ARG (useconds );
1074
- croak ("Time::HiRes::usleep (): unimplemented in this platform" );
1077
+ croak ("%s (): unimplemented in this platform" , "Time::HiRes::usleep " );
1075
1078
RETVAL = 0.0 ;
1076
1079
OUTPUT :
1077
1080
RETVAL
@@ -1169,19 +1172,19 @@ ualarm(useconds,interval=0)
1169
1172
CODE :
1170
1173
PERL_UNUSED_ARG (useconds );
1171
1174
PERL_UNUSED_ARG (interval );
1172
- croak ("Time::HiRes::ualarm (): unimplemented in this platform" );
1175
+ croak ("%s (): unimplemented in this platform" , "Time::HiRes::ualarm " );
1173
1176
RETVAL = -1 ;
1174
1177
OUTPUT :
1175
1178
RETVAL
1176
1179
1177
- NV
1180
+ NV_DIE
1178
1181
alarm (seconds ,interval = 0 )
1179
1182
NV seconds
1180
1183
NV interval
1181
1184
CODE :
1182
1185
PERL_UNUSED_ARG (seconds );
1183
1186
PERL_UNUSED_ARG (interval );
1184
- croak ("Time::HiRes::alarm (): unimplemented in this platform" );
1187
+ croak ("%s (): unimplemented in this platform" , "Time::HiRes::alarm " );
1185
1188
RETVAL = 0.0 ;
1186
1189
OUTPUT :
1187
1190
RETVAL
@@ -1338,10 +1341,10 @@ PROTOTYPE: $$@
1338
1341
tot ++ ;
1339
1342
}
1340
1343
} else {
1341
- croak ("futimens unimplemented in this platform" );
1344
+ croak ("%s unimplemented in this platform" , "futimens " );
1342
1345
}
1343
1346
# else /* HAS_FUTIMENS */
1344
- croak ("futimens unimplemented in this platform" );
1347
+ croak ("%s unimplemented in this platform" , "futimens " );
1345
1348
# endif /* HAS_FUTIMENS */
1346
1349
}
1347
1350
}
@@ -1356,10 +1359,10 @@ PROTOTYPE: $$@
1356
1359
tot ++ ;
1357
1360
}
1358
1361
} else {
1359
- croak ("utimensat unimplemented in this platform" );
1362
+ croak ("%s unimplemented in this platform" , "utimensat " );
1360
1363
}
1361
1364
# else /* HAS_UTIMENSAT */
1362
- croak ("utimensat unimplemented in this platform" );
1365
+ croak ("%s unimplemented in this platform" , "utimensat " );
1363
1366
# endif /* HAS_UTIMENSAT */
1364
1367
}
1365
1368
} /* while items */
@@ -1373,7 +1376,7 @@ PROTOTYPE: $$@
1373
1376
I32
1374
1377
utime (accessed , modified , ...)
1375
1378
CODE :
1376
- croak ("Time::HiRes::utime (): unimplemented in this platform" );
1379
+ croak ("%s (): unimplemented in this platform" , "Time::HiRes::utime " );
1377
1380
RETVAL = 0 ;
1378
1381
OUTPUT :
1379
1382
RETVAL
@@ -1401,12 +1404,12 @@ clock_gettime(clock_id = CLOCK_REALTIME)
1401
1404
1402
1405
#else /* if defined(TIME_HIRES_CLOCK_GETTIME) */
1403
1406
1404
- NV
1407
+ NV_DIE
1405
1408
clock_gettime (clock_id = 0 )
1406
1409
clockid_t clock_id
1407
1410
CODE :
1408
1411
PERL_UNUSED_ARG (clock_id );
1409
- croak ("Time::HiRes::clock_gettime (): unimplemented in this platform" );
1412
+ croak ("%s (): unimplemented in this platform" , "Time::HiRes::clock_gettime " );
1410
1413
RETVAL = 0.0 ;
1411
1414
OUTPUT :
1412
1415
RETVAL
@@ -1434,12 +1437,12 @@ clock_getres(clock_id = CLOCK_REALTIME)
1434
1437
1435
1438
#else /* if defined(TIME_HIRES_CLOCK_GETRES) */
1436
1439
1437
- NV
1440
+ NV_DIE
1438
1441
clock_getres (clock_id = 0 )
1439
1442
clockid_t clock_id
1440
1443
CODE :
1441
1444
PERL_UNUSED_ARG (clock_id );
1442
- croak ("Time::HiRes::clock_getres (): unimplemented in this platform" );
1445
+ croak ("%s (): unimplemented in this platform" , "Time::HiRes::clock_getres " );
1443
1446
RETVAL = 0.0 ;
1444
1447
OUTPUT :
1445
1448
RETVAL
@@ -1470,7 +1473,7 @@ clock_nanosleep(clock_id, nsec, flags = 0)
1470
1473
1471
1474
#else /* if defined(TIME_HIRES_CLOCK_NANOSLEEP) && defined(TIMER_ABSTIME) */
1472
1475
1473
- NV
1476
+ NV_DIE
1474
1477
clock_nanosleep (clock_id , nsec , flags = 0 )
1475
1478
clockid_t clock_id
1476
1479
NV nsec
@@ -1479,7 +1482,7 @@ clock_nanosleep(clock_id, nsec, flags = 0)
1479
1482
PERL_UNUSED_ARG (clock_id );
1480
1483
PERL_UNUSED_ARG (nsec );
1481
1484
PERL_UNUSED_ARG (flags );
1482
- croak ("Time::HiRes::clock_nanosleep (): unimplemented in this platform" );
1485
+ croak ("%s (): unimplemented in this platform" , "Time::HiRes::clock_nanosleep " );
1483
1486
RETVAL = 0.0 ;
1484
1487
OUTPUT :
1485
1488
RETVAL
@@ -1501,10 +1504,10 @@ clock()
1501
1504
1502
1505
#else /* if defined(TIME_HIRES_CLOCK) && defined(CLOCKS_PER_SEC) */
1503
1506
1504
- NV
1507
+ NV_DIE
1505
1508
clock ()
1506
1509
CODE :
1507
- croak ("Time::HiRes::clock (): unimplemented in this platform" );
1510
+ croak ("%s (): unimplemented in this platform" , "Time::HiRes::clock " );
1508
1511
RETVAL = 0.0 ;
1509
1512
OUTPUT :
1510
1513
RETVAL
0 commit comments