This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Upgrade to Time::HiRes 1.74
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Wed, 21 Sep 2005 11:15:43 +0000 (11:15 +0000)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Wed, 21 Sep 2005 11:15:43 +0000 (11:15 +0000)
p4raw-id: //depot/perl@25532

ext/Time/HiRes/Changes
ext/Time/HiRes/HiRes.pm
ext/Time/HiRes/HiRes.xs
ext/Time/HiRes/Makefile.PL

index 62c12fb..b034efd 100644 (file)
@@ -1,23 +1,35 @@
 Revision history for Perl extension Time::HiRes.
 
-1.73   - Time::HiRes::nanosleep support for Solaris [PATCH]
+1.74   [2005-09-19]
+       - [cpan #14608] Solaris 8 perl 5.005_03 File::Spec module does not have method rel2abs
+         (the workaround is not to use rel2abs, should not be necessary)
+       - [cpan #14642] U2time wrongly exported on the C API
+         (patch supplied by the reporter, SALVA@cpan.org)
+       - add release dates to Changes
+
+1.73   [2005-08-16]
+       - Time::HiRes::nanosleep support for Solaris [PATCH]
          (POSIX::uname() not available if building with core perl,
           from Gisle Aas, via perl5-porters, perl change #25295)
 
-1.72   - going back to the 1.68 loader setup (using DynaLoader)
+1.72   [2005-07-01]
+       - going back to the 1.68 loader setup (using DynaLoader)
          since too many weird things starting breaking
        - fix a typo in José Auguste-Etienne's name
 
-1.71   - a thinko in the nanosleep() detection
+1.71   [2005-06-28]
+       - a thinko in the nanosleep() detection
        - move more changes stuff from the README to Changes
        - add -w to the Makefile.PL
 
-1.70   - oops in 1.69 about @ISA (not affecting anything but silly)
+1.70   [2005-06-26]
+       - oops in 1.69 about @ISA (not affecting anything but silly)
        - add copyright 2005 to HiRes.pm
        - add copyright and license to HiRes.xs
        - add copyrights 2003, 2004, 2005 to README
 
-1.69   - actually run a test for nanosleep
+1.69   [2005-06-25]
+       - actually run a test for nanosleep
          (if there is no $Config{d_nanosleep}) since e.g. in AIX 4.2
          it seems that one can link in nanosleep() but then calling
          it fails instantly and sets errno to ENOSYS (Not implemented).
@@ -35,7 +47,7 @@ Revision history for Perl extension Time::HiRes.
          (from Alexey Tourbin)
        - add SEE ALSO (BSD::Resource and Time::TAI64)
 
-1.68
+1.68   [2005-05-14]
        - somehow 1.67 had a lot of doubled lines (a major cut-and-paste
          error suspected), but miraculously it still worked since the
          doubling took place below the __END__ token
@@ -44,12 +56,12 @@ Revision history for Perl extension Time::HiRes.
          (part of perl change #24271)
        - minor doc tweaks
 
-1.67
+1.67   [2005-05-04]
        - (internal) don't ignore the return value of gettimeofday()
        - (external) return undef or an empty if the C gettimeofday() fails
          (affects Time::HiRes gettimeofday() and the hires time())
 
-1.66
+1.66   [2004-12-19]
        - add nanosleep()
        - fix the 'hierachy' typo in Makefile.PL [rt.cpan.org #8492]
        - should now build in Solaris [rt.cpan.org #7165] (since 1.64)
@@ -57,7 +69,7 @@ Revision history for Perl extension Time::HiRes.
        - close also [rt.cpan.org #5933] "Time::HiRes::time does not pick up time adjustments like ntp" since ever reproducing it in the same environment
          has become rather unlikely
 
-1.65
+1.65   [2004-09-18]
        - one should not mix u?alarm and sleep (the tests modified
          by 1.65, #12 and #13, hung in Solaris), now we just busy
          loop executing an empty block
@@ -65,7 +77,7 @@ Revision history for Perl extension Time::HiRes.
          sleeps and alarms
        - small spelling fixes
 
-1.64
+1.64   [2004-09-16]
        - regenerate ppport.h with Devel::PPPort 3.03,
          now the MY_CXT_CLONE is defined in ppport.h,
          we no more need to do that.
@@ -75,11 +87,11 @@ Revision history for Perl extension Time::HiRes.
          changed to sleep(1)s, the tests still pass but no hang after
          a few hundred repeats.
 
-1.63
+1.63   [2004-09-01]
        - Win32 and any ithread build: ppport.h didn't define
          MY_CXT_CLONE, which seems to be a Time-HiResism.
 
-1.62
+1.62   [2004-08-31]
        - Skip testing if under PERL_CORE and Time::HiRes has not
          been Configured (from Marcus Holland-Moritz, core change
          #23246)
@@ -91,13 +103,13 @@ Revision history for Perl extension Time::HiRes.
        - Can't use newSVpvf for <= 5.003.
        (most of the changes from Marcus)
 
-1.61
+1.61   [2004-08-21]
        - Win32: reset reading from the performance counters every
          five minutes to better track wall clock time (thanks to
          PC timers being often quite bad), should help long-running
          programs.
 
-1.60
+1.60   [2004-08-15]
        - Win32: Patch from Steve Hay
          [PATCH] Re: [perl #30755] [Win32] Different results from Time::HiRes::gettimeofdayunder the debugger
          to [perl #30755] reported by Nigel Sandever
@@ -110,50 +122,50 @@ Revision history for Perl extension Time::HiRes.
          after that keep using -lrt, patch from Alan Burlison,
          bug reported in [cpan #7165]
 
-1.59
+1.59   [2004-04-08]
        - Change the Win32 recalibration limit to 0.5 seconds and tweak
          the documentation to blather less about the gory details of the
          Win32 implementation and more about the complications in general
          of meddling with the system clock.
 
-1.58
+1.58   [2004-04-08]
        - Document the 1.57 change better.
 
-1.57
+1.57   [2004-07-04]
        - Win32/Cygwin/MinGW: if the performance counter drifts by more
          than two seconds from the system clock (due to ntp adjustments,
          for example), recalibrate our internal counter: from Jan Dubois,
          based on [cpan #5933] by Jerry D. Hedden.
 
-1.56
+1.56   [2004-29-02]
        - Give a clearer message if the tests timeout (perl change #22253)
        - Don't use /tmp or its moral equivalents (perl bug #15036,
          perl change #22258)
 
-1.55
+1.55   [2004-01-14]
        - Windows: mingw32 patch from Mike Pomraning (use Perl's Const64()
          instead of VC-specific i64 suffix)
 
-1.54
+1.54   [2003-12-31]
        - Solaris: like Tru64 (dec_osf) also Solaris need -lrt for nanosleep
 
-1.53
+1.53   [2003-12-30]
        - Windows: higher resolution time() by using the Windows
          performance counter API, from Jan Dubois and Anton Shcherbinin.
          The exact new higher resolution depends on the hardware,
          but it should be quite a bit better than using the basic
          Windows timers.
 
-1.52
+1.52   [2003-10-28]
        - In AIX (v?) with perl 5.6.1 the HiRes.t can hang after
          the subtest 18.  No known analysis nor fix, but added
          an alarm (that requires fork() and alarm()) to the test.
 
-1.51
+1.51   [2003-09-22]
        - doc tweaks from mjd (perl change #20456)
        - NCR MP-RAS hints file added (svr4.pl) (perl change #21249)
 
-1.50
+1.50   [2003-08-02]
        - add a message (for non-core builds) to Makefile.PL about
          the LC_ALL=C workaround
        - &Time::HiRes::d_nanosleep was broken (perl change #20131)
@@ -163,47 +175,47 @@ Revision history for Perl extension Time::HiRes.
        - MPE/iX tweak (perl change #20042)
        - do not use HAS_NANOSLEEP (perl change #19898)
 
-1.49
+1.49   [2003-06-23]
        - UVuf for non-IVSIZE platforms (from Keiichiro Nagano)
        - OS/2 can always mix subsecond sleeps with signals
          (part of perl change #19789)
 
-1.48
+1.48   [2003-06-04]
        - workaround for buggy gcc 2.95.3 in openbsd/sparc64
          (perl change #19592)
 
-1.47
+1.47   [2003-05-03]
        - do not use -lrt in Linux (from March Lehmann, perl change #19449)
                - unnecessary (nanosleep is in libc anyway)
                - harmful (-lrt slows down execution)
                - incompatible (with many distributions' pthreads)
 
-1.46
+1.46   [2003-04-25]
        - do not create files in blib directories under core
          (perl change #19160, from rgs)
        - detypo s/VTLARM/VTARLM/ (perl change #19328, from mjd)
 
-1.45
+1.45   [2003-04-01]
        - guarantee that $xdefine in HiRes.t is always defined
          (perl change #19109, from IlyaZ)
        - a cleaner way to detect PERL_CORE (perl change #19111,
          from IlyaZ)
 
-1.44
+1.44   [2003-03-30]
        - add hints/irix.pl to turn off overly POSIX flags that
          cause hide struct timespec to be hidden (and compilation
          to fail) (bleadperl change #19085)
        - documentation tweaks
 
-1.43
+1.43   [2003-03-11]
        - add c:/temp to the list of temp directories to probe
          so that cygwin (and win*?) builds are happy.  This was
          needed at least in my cygwin 1.3.20/w2k setup.
 
-1.42
+1.42   [2003-01-07]
        - modernize the constants code (from Nicholas Clark)
 
-1.41
+1.41   [2003-01-03]
        - At some point the ability to figure our the correct incdir
          for EXTERN.h (either a core perl build, or an installed perl)
          had broken (which lead into all test compiles failing with
@@ -213,7 +225,7 @@ Revision history for Perl extension Time::HiRes.
          Now stole a trick from the Encode that sets $ENV{PERL_CORE}
          right, and both styles of build should work again.
 
-1.40
+1.40   [2003-01-03]
        - Nicholas Clark noticed that the my_catdir() emulation function
          was broken (which means that we didn't really work for Perls
          5.002 and 5.003)
@@ -221,16 +233,16 @@ Revision history for Perl extension Time::HiRes.
          and strict clean
        - tightened up the Makefile.PL output, less whitespace
 
-1.39
+1.39   [2003-10-20]
        - fix from Craig Berry for better building in VMS with PERL_CORE
 
-1.38
+1.38   [2003-10-13]
        - no functional changes
        - move lib/Time/HiRes.pm as Hires.pm
        - libraries scanning was slightly broken (always scanned
          for a library even when $Config{libs} already had it)
 
-1.37
+1.37   [2003-09-23]
        - Ray Zimmerman ran into a race condition in Mac OS X.
          A 0.01-second alarm fired before the test expected.
          The test first slept indefinitely (blocking for signals)
@@ -241,7 +253,7 @@ Revision history for Perl extension Time::HiRes.
          environment variable VERBOSE to a true value to see the
          details (the probing command and the possible errors)
 
-1.36
+1.36   [2003-09-12]
        - do not clear MAN3PODS in Makefile.PL (Radoslaw Zielinski)
        - INSTALLDIRS => 'perl' missing which means that Time::HiRes
          cannot be upgraded from CPAN to override the 5.8.0 version
@@ -251,19 +263,19 @@ Revision history for Perl extension Time::HiRes.
          if $ENV{PERL_CORE} (Hugo van der Sanden)
        - add documentation about the restart of select() under alarm()
 
-1.35
+1.35   [2003-08-24]
        - small documentation tweaks
 
 
-1.34
+1.34   [2003-08-22]
        - better VMS operation (Craig Berry)
 
-1.33
+1.33   [2003-08-20]
        - our time machine is accelerating: now works with Perl 5.004_01
          (tried with 5.003_07 and 5.002 but I get segmentation faults
           from running the Makefile.PL with those in Tru64 4.0D)
 
-1.32
+1.32   [2003-08-20]
        - backward compatibility (pre-5.6.0) tweaks:
          - no XSLoader in 5.00503, use DynaLoader instead
          - no SvPV_nolen, either
@@ -278,7 +290,7 @@ Revision history for Perl extension Time::HiRes.
          (since older Perl do not have them in %Config, and even
           5.8.0 does not probe for nanosleep)
 
-1.31
+1.31   [2003-08-19]
        - backward compatibility (pre-5.6.1) tweaks:
          - define NV if no NVTYPE
          - define IVdf if needed (note: the Devel::PPPort
@@ -291,7 +303,7 @@ Revision history for Perl extension Time::HiRes.
        back to Perl 5.00404), and using nanosleep() (if available) for
        subsecond sleeps.
 
-1.30
+1.30   [2003-08-16]
 
        - release 1.29_02 as 1.30
 
@@ -303,18 +315,18 @@ Revision history for Perl extension Time::HiRes.
        version.  Note also that in 1.30 Wegscheid turns over the maintenance
        to Jarkko Hietaniemi.
 
-1.29_02
+1.29_02        [2003-08-16]
 
        - fix a silly unclosed comment typo in HiRes.xs
        - document and export REALTIME_REALPROF (Solaris)
 
-1.29_01
+1.29_01        [2003-08-16]
 
        - only getitimer(ITIMER_REAL) available in Cygwin and Win32
          (need to patch this also in Perl 5.[89])
        - remove CVS revision log from HiRes.xs
 
-1.29_00
+1.29_00        [2003-08-14]
 
        The following numbered patches refer to the Perl 5.7 changes,
        you can browse them at http://public.activestate.com/cgi-bin/perlbrowse
index adc33f2..bc1d38d 100644 (file)
@@ -15,7 +15,7 @@ require DynaLoader;
                 d_usleep d_ualarm d_gettimeofday d_getitimer d_setitimer
                 d_nanosleep);
        
-$VERSION = '1.73';
+$VERSION = '1.74';
 $XS_VERSION = $VERSION;
 $VERSION = eval $VERSION;
 
@@ -324,7 +324,7 @@ modglobal hash:
   name             C prototype
   ---------------  ----------------------
   Time::NVtime     double (*)()
-  Time::U2time     void (*)(UV ret[2])
+  Time::U2time     void (*)(pTHX_ UV ret[2])
 
 Both functions return equivalent information (like C<gettimeofday>)
 but with different representations.  The names C<NVtime> and C<U2time>
index edc1720..df4ea06 100644 (file)
@@ -658,10 +658,8 @@ BOOT:
 #ifdef ATLEASTFIVEOHOHFIVE
 #ifdef HAS_GETTIMEOFDAY
   {
-    UV auv[2];
     hv_store(PL_modglobal, "Time::NVtime", 12, newSViv(PTR2IV(myNVtime)), 0);
-    if (myU2time(aTHX_ auv) == 0)
-      hv_store(PL_modglobal, "Time::U2time", 12, newSViv((IV) auv[0]), 0);
+    hv_store(PL_modglobal, "Time::U2time", 12, newSViv(PTR2IV(myU2time)), 0);
   }
 #endif
 #endif
index f7d62fd..b2caf92 100644 (file)
@@ -144,16 +144,14 @@ sub try_compile_and_link {
            $ok = defined($res) && $res==0 && -s $tmp_exe && -x _;
 
            if ( $ok && exists $args{run} && $args{run}) {
-               my $abs_tmp_exe =
-                   File::Spec->
-                       catfile(File::Spec->rel2abs(File::Spec->curdir),
-                               $tmp_exe);
-               printf "Running $abs_tmp_exe..." if $VERBOSE;
-               if (system($abs_tmp_exe) == 0) {
+               my $tmp_exe =
+                   File::Spec->catfile(File::Spec->curdir, $tmp_exe);
+               printf "Running $tmp_exe..." if $VERBOSE;
+               if (system($tmp_exe) == 0) {
                    $ok = 1;
                } else {
                    $ok = 0;
-                   print "[ system('$abs_tmp_exe') failed: status $? ] ";
+                   print "[ system('$tmp_exe') failed: status $? ] ";
                }
            }
            unlink("$tmp.c", $tmp_exe);