diff options
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | MANIFEST | 1 | ||||
-rw-r--r-- | ext/Time/Piece/Piece.pm | 2 | ||||
-rw-r--r-- | ext/Time/Piece/Piece.xs | 6 | ||||
-rw-r--r-- | ext/Time/Piece/t/02core.t | 11 | ||||
-rw-r--r-- | hints/qnx.sh | 12 | ||||
-rw-r--r-- | qnx/qnx.c | 11 |
7 files changed, 37 insertions, 7 deletions
@@ -35,7 +35,6 @@ Albert Dvornik <bert@genscan.com> Alessandro Forghieri <alf@orion.it> Alexei Alexandrov <alexei.alexandrov@gmail.com> Alex Davies <adavies@ptc.com> -Alex Gough <alex@rcon.rog> Alex Vandiver <alexmv@mit.edu> Alex Waugh <alex@alexwaugh.com> Alexander Gough <alex-p5p@earth.li> @@ -3260,6 +3260,7 @@ pp_sys.c Push/Pop code for system interaction proto.h Prototypes qnx/ar QNX implementation of "ar" utility qnx/cpp QNX implementation of preprocessor filter +qnx/qnx.c QNX silent matherr callback README The Instructions README.aix Perl notes for AIX README.amiga Perl notes for AmigaOS diff --git a/ext/Time/Piece/Piece.pm b/ext/Time/Piece/Piece.pm index 59b9976bc2..f198156c6e 100644 --- a/ext/Time/Piece/Piece.pm +++ b/ext/Time/Piece/Piece.pm @@ -22,7 +22,7 @@ our %EXPORT_TAGS = ( ':override' => 'internal', ); -our $VERSION = '1.11_02'; +our $VERSION = '1.11_03'; bootstrap Time::Piece $VERSION; diff --git a/ext/Time/Piece/Piece.xs b/ext/Time/Piece/Piece.xs index 4ab97900f0..dc3a73e888 100644 --- a/ext/Time/Piece/Piece.xs +++ b/ext/Time/Piece/Piece.xs @@ -241,9 +241,13 @@ my_mini_mktime(struct tm *ptm) ptm->tm_wday = (jday + WEEKDAY_BIAS) % 7; } -#if defined(WIN32) /* No strptime on Win32 */ +#if defined(WIN32) || (defined(__QNX__) && defined(__WATCOMC__)) /* No strptime on Win32 or QNX4 */ #define strncasecmp(x,y,n) strnicmp(x,y,n) + +#if defined(WIN32) #define alloca _alloca +#endif + #include <time.h> #include <ctype.h> #include <string.h> diff --git a/ext/Time/Piece/t/02core.t b/ext/Time/Piece/t/02core.t index 68639d0ac5..d02055833d 100644 --- a/ext/Time/Piece/t/02core.t +++ b/ext/Time/Piece/t/02core.t @@ -1,6 +1,7 @@ use Test::More tests => 93; my $is_win32 = ($^O =~ /Win32/); +my $is_qnx = ($^O eq 'qnx'); BEGIN { use_ok('Time::Piece'); } ok(1); @@ -60,8 +61,12 @@ cmp_ok($t->week, '==', 9); cmp_ok($t->strftime('%d'), '==', 29); SKIP: { - skip "can't strftime %D, %R, %T or %e on Win32", 2 if $is_win32; + skip "can't strftime %D, %R, %T or %e on Win32", 1 if $is_win32; cmp_ok($t->strftime('%D'), 'eq', '02/29/00'); # Yech! +} +SKIP:{ + skip "can't strftime %D, %R, %T or %e on Win32", 1 if $is_win32; + skip "can't strftime %e on QNX", 1 if $is_qnx; cmp_ok($t->strftime('%e'), 'eq', '29'); # should test with < 10 } @@ -76,7 +81,7 @@ cmp_ok($t->strftime('%M'), 'eq', '34'); # should test with < 10 # and are possibly unportable (am or AM or a.m., and so on) SKIP: { - skip "can't strftime %R on Win32", 1 if $is_win32; + skip "can't strftime %R on Win32 or QNX", 1 if $is_win32 or $is_qnx; cmp_ok($t->strftime('%R'), 'eq', '12:34'); # should test with > 12 } @@ -94,7 +99,7 @@ SKIP: { cmp_ok($t->strftime('%U'), 'eq', '09'); # Sun cmp Mon SKIP: { - skip "can't strftime %V on Win32", 1 if $is_win32; + skip "can't strftime %V on Win32 or QNX", 1 if $is_win32 or $is_qnx; # is this test really broken on Mac OS? -- rjbs, 2006-02-08 cmp_ok($t->strftime('%V'), 'eq', '09'); # Sun cmp Mon } diff --git a/hints/qnx.sh b/hints/qnx.sh index 482c8ab0e5..e4469a176a 100644 --- a/hints/qnx.sh +++ b/hints/qnx.sh @@ -9,7 +9,12 @@ # socket3r.lib Nov21 1996. # perl-5.7.3 fails 2 known tests under QNX6.1.0 # -# As with many unix ports, this one depends on a few "standard" +# perl-5.10.0-tobe compiles with Watcom C 10.6 +# and QNX 4.25 patch G w/TCPSDK installed +# Some tests still fail, mostly to do with dynamic/static +# or unsuported features in QNX. +# +## As with many unix ports, this one depends on a few "standard" # unix utilities which are not necessarily standard for QNX4. # # /bin/sh This is used heavily by Configure and then by @@ -229,6 +234,11 @@ if [ "$osname" = "qnx" ]; then /usr/local/bin or some other suitable location. EOF fi + + # includes a matherr() to silence noise from watcom libc + archobjs="qnx.o" + test -f qnx.c || cp qnx/qnx.c . + else # $^O eq nto diff --git a/qnx/qnx.c b/qnx/qnx.c new file mode 100644 index 0000000000..6c819e3209 --- /dev/null +++ b/qnx/qnx.c @@ -0,0 +1,11 @@ +/* If we're compiling with watcom, we want to silence domain errors */ +#if defined(__QNX__) && defined(__WATCOMC__) +#include <math.h> + +/* Return default value and print no error message */ +int matherr( struct exception *err ) + { + return 1; + } + +#endif |