[Orca-checkins] rev 238 - in trunk/orca: . packages/Time-HiRes-1.47 packages/Time-HiRes-1.48 packages/Time-HiRes-1.48/t
Blair Zajac
blair at orcaware.com
Thu Jun 12 23:10:41 PDT 2003
Author: blair
Date: Thu Jun 12 23:10:35 2003
New Revision: 238
Added:
trunk/orca/packages/Time-HiRes-1.48/
- copied from rev 237, trunk/orca/packages/Time-HiRes-1.47/
Removed:
trunk/orca/packages/Time-HiRes-1.47/
Modified:
trunk/orca/INSTALL
trunk/orca/configure.in
trunk/orca/packages/Time-HiRes-1.48/Changes
trunk/orca/packages/Time-HiRes-1.48/HiRes.pm
trunk/orca/packages/Time-HiRes-1.48/HiRes.xs
trunk/orca/packages/Time-HiRes-1.48/t/HiRes.t
Log:
Upgrade Time::HiRes from 1.47 to 1.48.
* INSTALL (Determine which Perl modules need compiling and installing):
Update all references to Time::HiRes's version number from 1.47 to
1.48.
* configure.in:
Bump Time::HiRes's version number to 1.48.
* packages/Time-HiRes-1.48:
Renamed from packages/Time-HiRes-1.47. Directory contents updated
from Time-HiRes-1.48.tar.gz.
Modified: trunk/orca/INSTALL
==============================================================================
--- trunk/orca/INSTALL (original)
+++ trunk/orca/INSTALL Thu Jun 12 23:10:35 2003
@@ -176,7 +176,7 @@
Math::IntervalSearch >= 1.05 >= 1.05 1.05
RRDs >= 1.000421 >= 1.0.42 1.0.42
Storable >= 2.07 >= 2.07 2.07
- Time::HiRes Not required by Orca 1.47
+ Time::HiRes Not required by Orca 1.48
All seven of these modules are included with the Orca distribution
in the packages directory. When you configure Orca in step 3),
@@ -277,10 +277,10 @@
Time::HiRes
- http://www.perl.com/CPAN/authors/id/J/JH/JHI/Time-HiRes-1.47.tar.gz
+ http://www.perl.com/CPAN/authors/id/J/JH/JHI/Time-HiRes-1.48.tar.gz
- % gunzip -c Time-HiRes-1.47.tar.gz | tar xvf -
- % cd Time-HiRes-1.47
+ % gunzip -c Time-HiRes-1.48.tar.gz | tar xvf -
+ % cd Time-HiRes-1.48
% perl Makefile.PL
% make
% make test
Modified: trunk/orca/configure.in
==============================================================================
--- trunk/orca/configure.in (original)
+++ trunk/orca/configure.in Thu Jun 12 23:10:35 2003
@@ -41,8 +41,8 @@
RRDTOOL_VER=1.000421
STORABLE_DIR=Storable-2.07
STORABLE_VER=2.07
-TIME_HIRES_DIR=Time-HiRes-1.47
-TIME_HIRES_VER=1.47
+TIME_HIRES_DIR=Time-HiRes-1.48
+TIME_HIRES_VER=1.48
AC_SUBST(COMPRESS_ZLIB_DIR)
AC_SUBST(DATA_DUMPER_DIR)
Modified: trunk/orca/packages/Time-HiRes-1.48/Changes
==============================================================================
--- trunk/orca/packages/Time-HiRes-1.47/Changes (original)
+++ trunk/orca/packages/Time-HiRes-1.48/Changes Thu Jun 12 23:10:35 2003
@@ -1,7 +1,11 @@
Revision history for Perl extension Time::HiRes.
+1.48
+ - workaround for buggy gcc 2.95.3 in openbsd/sparc64
+ (perl change #19592)
+
1.47
- - do not use -lrt in Linux (from March Lehmann)
+ - 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)
Modified: trunk/orca/packages/Time-HiRes-1.48/HiRes.pm
==============================================================================
--- trunk/orca/packages/Time-HiRes-1.47/HiRes.pm (original)
+++ trunk/orca/packages/Time-HiRes-1.48/HiRes.pm Thu Jun 12 23:10:35 2003
@@ -15,7 +15,7 @@
d_usleep d_ualarm d_gettimeofday d_getitimer d_setitimer
d_nanosleep);
-$VERSION = '1.47';
+$VERSION = '1.48';
$XS_VERSION = $VERSION;
$VERSION = eval $VERSION;
@@ -317,6 +317,17 @@
myNVtime = INT2PTR(double(*)(), SvIV(*svp));
printf("The current time is: %f\n", (*myNVtime)());
+=head1 DIAGNOSTICS
+
+=head2 negative time not invented yet
+
+You tried to use a negative time argument.
+
+=head2 internal error: useconds < 0 (unsigned ... signed ...)
+
+Something went horribly wrong-- the number of microseconds that cannot
+become negative just became negative. Maybe your compiler is broken?
+
=head1 CAVEATS
Notice that the core time() maybe rounding rather than truncating.
Modified: trunk/orca/packages/Time-HiRes-1.48/HiRes.xs
==============================================================================
--- trunk/orca/packages/Time-HiRes-1.47/HiRes.xs (original)
+++ trunk/orca/packages/Time-HiRes-1.48/HiRes.xs Thu Jun 12 23:10:35 2003
@@ -36,9 +36,11 @@
# ifdef IVSIZE
# if IVSIZE == LONGSIZE
# define IVdf "ld"
+# define UVuf "lu"
# else
# if IVSIZE == INTSIZE
# define IVdf "d"
+# define UVuf "u"
# endif
# endif
# else
@@ -683,6 +685,17 @@
UV useconds = (UV)(1E6 * (seconds - (UV)seconds));
if (seconds >= 1.0)
sleep((U32)seconds);
+ if ((IV)useconds < 0) {
+#if defined(__sparc64__) && defined(__GNUC__)
+ /* Sparc64 gcc 2.95.3 (e.g. on NetBSD) has a bug
+ * where (0.5 - (UV)(0.5)) will under certain
+ * circumstances (if the double is cast to UV more
+ * than once?) evaluate to -0.5, instead of 0.5. */
+ useconds = -(IV)useconds;
+#endif
+ if ((IV)useconds < 0)
+ croak("Time::HiRes::sleep(%"NVgf"): internal error: useconds < 0 (unsigned %"UVuf" signed %"IVdf")", seconds, useconds, (IV)useconds);
+ }
usleep(useconds);
} else
croak("Time::HiRes::sleep(%"NVgf"): negative time not invented yet", seconds);
Modified: trunk/orca/packages/Time-HiRes-1.48/t/HiRes.t
==============================================================================
--- trunk/orca/packages/Time-HiRes-1.47/t/HiRes.t (original)
+++ trunk/orca/packages/Time-HiRes-1.48/t/HiRes.t Thu Jun 12 23:10:35 2003
@@ -126,7 +126,6 @@
}
else {
my $r = [gettimeofday()];
- #jTime::HiRes::sleep 0.5;
Time::HiRes::sleep( 0.5 );
my $f = tv_interval $r;
ok 11, $f > 0.4 && $f < 0.9, "slept $f instead of 0.5 secs.";
More information about the Orca-checkins
mailing list