summaryrefslogtreecommitdiff
path: root/cpan/Time-HiRes
diff options
context:
space:
mode:
authorZefram <zefram@fysh.org>2011-05-18 21:49:45 +0100
committerZefram <zefram@fysh.org>2011-05-18 22:31:50 +0100
commit91a2e9f615c98c7be7adf43d6a8a7482eb59811f (patch)
tree3b7c71a073ec04b7356f92279c71c9655914d1c9 /cpan/Time-HiRes
parent6aac7955575f46b396a8806c260a6b1e11f3f931 (diff)
downloadperl-91a2e9f615c98c7be7adf43d6a8a7482eb59811f.tar.gz
update Time-HiRes to CPAN version 1.9722
- Fix broken linkage on Windows with gcc 3.4 seen with ActivePerl, report from Christian Walde [rt.cpan.org #61648], fix derived from Vincent Pit. - Jump through hoops to avoid compiler warnings.
Diffstat (limited to 'cpan/Time-HiRes')
-rw-r--r--cpan/Time-HiRes/Changes9
-rw-r--r--cpan/Time-HiRes/HiRes.pm4
-rw-r--r--cpan/Time-HiRes/HiRes.xs36
-rw-r--r--cpan/Time-HiRes/Makefile.PL21
4 files changed, 50 insertions, 20 deletions
diff --git a/cpan/Time-HiRes/Changes b/cpan/Time-HiRes/Changes
index c365e9924f..0515b8fa6f 100644
--- a/cpan/Time-HiRes/Changes
+++ b/cpan/Time-HiRes/Changes
@@ -1,5 +1,14 @@
Revision history for the Perl extension Time::HiRes.
+1.9722 [2011-05-18]
+ - Update for changes in build process in the core, patches
+ from BinGOs [rt.cpan.org #58858] and Craig Berry [rt.cpan.org
+ #63363].
+ - Fix broken linkage on Windows with gcc 3.4 seen with ActivePerl,
+ report from Christian Walde [rt.cpan.org #61648], fix derived
+ from Vincent Pit.
+ - Jump through hoops to avoid compiler warnings.
+
1.9721 [2010-03-17]
- Address [rt.cpan.org #54196] alarm and ularm return values are bogus,
additional fix from Gisle Aas
diff --git a/cpan/Time-HiRes/HiRes.pm b/cpan/Time-HiRes/HiRes.pm
index 8f2ec21331..e6295a8085 100644
--- a/cpan/Time-HiRes/HiRes.pm
+++ b/cpan/Time-HiRes/HiRes.pm
@@ -23,7 +23,7 @@ require DynaLoader;
stat
);
-$VERSION = '1.9721_01';
+$VERSION = '1.9722';
$XS_VERSION = $VERSION;
$VERSION = eval $VERSION;
@@ -585,6 +585,8 @@ Copyright (c) 1996-2002 Douglas E. Wegscheid. All rights reserved.
Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Jarkko Hietaniemi.
All rights reserved.
+Copyright (C) 2011 Andrew Main (Zefram) <zefram@fysh.org>
+
This program is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
diff --git a/cpan/Time-HiRes/HiRes.xs b/cpan/Time-HiRes/HiRes.xs
index 1dc2a6829b..970baa1bfa 100644
--- a/cpan/Time-HiRes/HiRes.xs
+++ b/cpan/Time-HiRes/HiRes.xs
@@ -4,6 +4,8 @@
*
* Copyright (c) 2002-2010 Jarkko Hietaniemi.
* All rights reserved.
+ *
+ * Copyright (C) 2011 Andrew Main (Zefram) <zefram@fysh.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the same terms as Perl itself.
@@ -716,39 +718,34 @@ myNVtime()
#endif /* #ifdef HAS_GETTIMEOFDAY */
static void
-hrstatns(UV atime, UV mtime, UV ctime, UV *atime_nsec, UV *mtime_nsec, UV *ctime_nsec)
+hrstatns(UV *atime_nsec, UV *mtime_nsec, UV *ctime_nsec)
{
dTHXR;
- *atime_nsec = 0;
- *mtime_nsec = 0;
- *ctime_nsec = 0;
-#ifdef TIME_HIRES_STAT
#if TIME_HIRES_STAT == 1
*atime_nsec = PL_statcache.st_atimespec.tv_nsec;
*mtime_nsec = PL_statcache.st_mtimespec.tv_nsec;
*ctime_nsec = PL_statcache.st_ctimespec.tv_nsec;
-#endif
-#if TIME_HIRES_STAT == 2
+#elif TIME_HIRES_STAT == 2
*atime_nsec = PL_statcache.st_atimensec;
*mtime_nsec = PL_statcache.st_mtimensec;
*ctime_nsec = PL_statcache.st_ctimensec;
-#endif
-#if TIME_HIRES_STAT == 3
+#elif TIME_HIRES_STAT == 3
*atime_nsec = PL_statcache.st_atime_n;
*mtime_nsec = PL_statcache.st_mtime_n;
*ctime_nsec = PL_statcache.st_ctime_n;
-#endif
-#if TIME_HIRES_STAT == 4
+#elif TIME_HIRES_STAT == 4
*atime_nsec = PL_statcache.st_atim.tv_nsec;
*mtime_nsec = PL_statcache.st_mtim.tv_nsec;
*ctime_nsec = PL_statcache.st_ctim.tv_nsec;
-#endif
-#if TIME_HIRES_STAT == 5
+#elif TIME_HIRES_STAT == 5
*atime_nsec = PL_statcache.st_uatime * 1000;
*mtime_nsec = PL_statcache.st_umtime * 1000;
*ctime_nsec = PL_statcache.st_uctime * 1000;
-#endif
-#endif
+#else /* !TIME_HIRES_STAT */
+ *atime_nsec = 0;
+ *mtime_nsec = 0;
+ *ctime_nsec = 0;
+#endif /* !TIME_HIRES_STAT */
}
#include "const-c.inc"
@@ -765,8 +762,10 @@ BOOT:
#ifdef ATLEASTFIVEOHOHFIVE
# ifdef HAS_GETTIMEOFDAY
{
- hv_store(PL_modglobal, "Time::NVtime", 12, newSViv(PTR2IV(myNVtime)), 0);
- hv_store(PL_modglobal, "Time::U2time", 12, newSViv(PTR2IV(myU2time)), 0);
+ (void) hv_store(PL_modglobal, "Time::NVtime", 12,
+ newSViv(PTR2IV(myNVtime)), 0);
+ (void) hv_store(PL_modglobal, "Time::U2time", 12,
+ newSViv(PTR2IV(myU2time)), 0);
}
# endif
#endif
@@ -1248,8 +1247,7 @@ PROTOTYPE: ;$
UV atime_nsec;
UV mtime_nsec;
UV ctime_nsec;
- hrstatns(atime, mtime, ctime,
- &atime_nsec, &mtime_nsec, &ctime_nsec);
+ hrstatns(&atime_nsec, &mtime_nsec, &ctime_nsec);
if (atime_nsec)
ST( 8) = sv_2mortal(newSVnv(atime + 1e-9 * (NV) atime_nsec));
if (mtime_nsec)
diff --git a/cpan/Time-HiRes/Makefile.PL b/cpan/Time-HiRes/Makefile.PL
index 9436f0cabe..7766f29b2b 100644
--- a/cpan/Time-HiRes/Makefile.PL
+++ b/cpan/Time-HiRes/Makefile.PL
@@ -768,6 +768,27 @@ sub doMakefile {
realclean => { FILES=> 'const-c.inc const-xs.inc' },
);
+ if ($^O eq "MSWin32" && !(grep { /\ALD[A-Z]*=/ } @ARGV)) {
+ my $libperl = $Config{libperl} || "";
+ my $gccversion = $Config{gccversion} || "";
+ if ($gccversion =~ /\A3\.4\.[0-9]+/ and $libperl =~ /\.lib\z/) {
+ # Avoid broken linkage with ActivePerl, by linking directly
+ # against the Perl DLL rather than the import library.
+ (my $llibperl = "-l$libperl") =~ s/\.lib\z//;
+ my $lddlflags = $Config{lddlflags} || "";
+ my $ldflags = $Config{ldflags} || "";
+ s/-L(?:".*?"|\S+)//g foreach $lddlflags, $ldflags;
+ my $libdirs = join ' ',
+ map { s/(?<!\\)((?:\\\\)*")/\\$1/g; qq[-L"$_"] }
+ @Config{qw/bin sitebin/};
+ push @makefileopts, macro => {
+ LDDLFLAGS => "$lddlflags $libdirs $llibperl",
+ LDFLAGS => "$ldflags $libdirs $llibperl",
+ PERL_ARCHIVE => "",
+ };
+ }
+ }
+
if ($ENV{PERL_CORE}) {
push @makefileopts, MAN3PODS => {};
}