[Orca-checkins] rev 246 - in trunk/orca: . packages/Time-HiRes-1.49 packages/Time-HiRes-1.50 packages/Time-HiRes-1.50/hints

Blair Zajac blair at orcaware.com
Sat Aug 2 09:56:41 PDT 2003


Author: blair
Date: Sat Aug  2 09:55:53 2003
New Revision: 246

Added:
   trunk/orca/packages/Time-HiRes-1.50/
      - copied from rev 244, trunk/orca/packages/Time-HiRes-1.49/
   trunk/orca/packages/Time-HiRes-1.50/hints/dec_osf.pl
Removed:
   trunk/orca/packages/Time-HiRes-1.49/
Modified:
   trunk/orca/INSTALL
   trunk/orca/configure.in
   trunk/orca/packages/Time-HiRes-1.50/Changes
   trunk/orca/packages/Time-HiRes-1.50/HiRes.pm
   trunk/orca/packages/Time-HiRes-1.50/HiRes.xs
   trunk/orca/packages/Time-HiRes-1.50/MANIFEST
   trunk/orca/packages/Time-HiRes-1.50/Makefile.PL
   trunk/orca/packages/Time-HiRes-1.50/hints/sco.pl
Log:
Upgrade Time::HiRes from 1.49 to 1.50.

* INSTALL (Determine which Perl modules need compiling and installing):
  Update all references to Time::HiRes's version number from 1.49 to
  1.50.

* configure.in:
  Bump Time::HiRes's version number to 1.50.

* packages/Time-HiRes-1.50:
  Renamed from packages/Time-HiRes-1.49.  Directory contents updated
  from Time-HiRes-1.50.tar.gz.


Modified: trunk/orca/INSTALL
==============================================================================
--- trunk/orca/INSTALL	(original)
+++ trunk/orca/INSTALL	Sat Aug  2 09:55:53 2003
@@ -177,7 +177,7 @@
     Math::IntervalSearch    >= 1.05        >= 1.05      1.05
     RRDs                    >= 1.000431    >= 1.0.43    1.0.43
     Storable                >= 2.07        >= 2.07      2.07
-    Time::HiRes             Not required by Orca        1.49
+    Time::HiRes             Not required by Orca        1.50
 
     All seven of these modules are included with the Orca distribution
     in the packages directory.  When you configure Orca in step 3),
@@ -278,10 +278,10 @@
 
     Time::HiRes
 
-      http://www.perl.com/CPAN/authors/id/J/JH/JHI/Time-HiRes-1.49.tar.gz
+      http://www.perl.com/CPAN/authors/id/J/JH/JHI/Time-HiRes-1.50.tar.gz
 
-      % gunzip -c Time-HiRes-1.49.tar.gz | tar xvf -
-      % cd Time-HiRes-1.49
+      % gunzip -c Time-HiRes-1.50.tar.gz | tar xvf -
+      % cd Time-HiRes-1.50
       % perl Makefile.PL
       % make
       % make test

Modified: trunk/orca/configure.in
==============================================================================
--- trunk/orca/configure.in	(original)
+++ trunk/orca/configure.in	Sat Aug  2 09:55:53 2003
@@ -41,8 +41,8 @@
 RRDTOOL_VER=1.000431
 STORABLE_DIR=Storable-2.07
 STORABLE_VER=2.07
-TIME_HIRES_DIR=Time-HiRes-1.49
-TIME_HIRES_VER=1.49
+TIME_HIRES_DIR=Time-HiRes-1.50
+TIME_HIRES_VER=1.50
 
 AC_SUBST(COMPRESS_ZLIB_DIR)
 AC_SUBST(DATA_DUMPER_DIR)

Modified: trunk/orca/packages/Time-HiRes-1.50/Changes
==============================================================================
--- trunk/orca/packages/Time-HiRes-1.49/Changes	(original)
+++ trunk/orca/packages/Time-HiRes-1.50/Changes	Sat Aug  2 09:55:53 2003
@@ -1,5 +1,15 @@
 Revision history for Perl extension Time::HiRes.
 
+1.50
+	- 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)
+	- the nanosleep() probe was broken (perl change #20061)
+	- use existence instead of definedness for feature probes
+	  (perl change #20043)
+	- MPE/iX tweak (perl change #20042)
+	- do not use HAS_NANOSLEEP (perl change #19898)
+
 1.49
 	- UVuf for non-IVSIZE platforms (from Keiichiro Nagano)
 	- OS/2 can always mix subsecond sleeps with signals

Modified: trunk/orca/packages/Time-HiRes-1.50/HiRes.pm
==============================================================================
--- trunk/orca/packages/Time-HiRes-1.49/HiRes.pm	(original)
+++ trunk/orca/packages/Time-HiRes-1.50/HiRes.pm	Sat Aug  2 09:55:53 2003
@@ -15,7 +15,7 @@
 		 d_usleep d_ualarm d_gettimeofday d_getitimer d_setitimer
 		 d_nanosleep);
 	
-$VERSION = '1.49';
+$VERSION = '1.50';
 $XS_VERSION = $VERSION;
 $VERSION = eval $VERSION;
 

Modified: trunk/orca/packages/Time-HiRes-1.50/HiRes.xs
==============================================================================
--- trunk/orca/packages/Time-HiRes-1.49/HiRes.xs	(original)
+++ trunk/orca/packages/Time-HiRes-1.50/HiRes.xs	Sat Aug  2 09:55:53 2003
@@ -340,7 +340,10 @@
 #endif
 
 
-#if !defined(HAS_USLEEP) && defined(HAS_NANOSLEEP)
+ /* Do not use H A S _ N A N O S L E E P
+  * so that Perl Configure doesn't scan for it.
+  * The TIME_HIRES_NANOSLEEP is set by Makefile.PL. */
+#if !defined(HAS_USLEEP) && defined(TIME_HIRES_NANOSLEEP)
 #define HAS_USLEEP
 #define usleep hrt_nanosleep  /* could conflict with ncurses for static build */
 

Modified: trunk/orca/packages/Time-HiRes-1.50/MANIFEST
==============================================================================
--- trunk/orca/packages/Time-HiRes-1.49/MANIFEST	(original)
+++ trunk/orca/packages/Time-HiRes-1.50/MANIFEST	Sat Aug  2 09:55:53 2003
@@ -1,6 +1,7 @@
 Changes			Time::HiRes extension
 fallback/const-c.inc	Fallback code for constants
 fallback/const-xs.inc	Fallback code for constants
+hints/dec_osf.pl	Hints for Time::HiRes for named architecture
 hints/dynixptx.pl	Hints for Time::HiRes for named architecture
 hints/irix.pl		Hints for Time::HiRes for named architecture
 hints/sco.pl		Hints for Time::HiRes for named architecture

Modified: trunk/orca/packages/Time-HiRes-1.50/Makefile.PL
==============================================================================
--- trunk/orca/packages/Time-HiRes-1.49/Makefile.PL	(original)
+++ trunk/orca/packages/Time-HiRes-1.50/Makefile.PL	Sat Aug  2 09:55:53 2003
@@ -11,9 +11,11 @@
 
 my $VERBOSE = $ENV{VERBOSE};
 my $DEFINE;
-my $LIBS;
+my $LIBS = [];
 my $XSOPT;
 
+use vars qw($self); # Used in 'sourcing' the hints.
+
 my $ld_exeext = ($^O eq 'os2' and $Config{ldflags} =~ /-Zexe\b/) ? '.exe' : '';
 
 unless($ENV{PERL_CORE}) {
@@ -64,9 +66,9 @@
 # if you have 5.004_03 (and some slightly older versions?), xsubpp
 # tries to generate line numbers in the C code generated from the .xs.
 # unfortunately, it is a little buggy around #ifdef'd code.
-# my choice is leave it in and have people with old perls complain 
+# my choice is leave it in and have people with old perls complain
 # about the "Usage" bug, or leave it out and be unable to compile myself
-# without changing it, and then I'd always forget to change it before a 
+# without changing it, and then I'd always forget to change it before a
 # release. Sorry, Edward :)
 
 sub TMPDIR {
@@ -127,7 +129,7 @@
         $cccmd = "$Config{'cc'} -o $tmp $ccflags $tmp.c @$LIBS $errornull"
 	    unless defined $cccmd;
 
-	if ($^O eq 'VMS') {
+       if ($^O eq 'VMS') {
 	    open( CMDFILE, ">$tmp.com" );
 	    print CMDFILE "\$ SET MESSAGE/NOFACILITY/NOSEVERITY/NOIDENT/NOTEXT\n";
 	    print CMDFILE "\$ $cccmd\n";
@@ -135,7 +137,7 @@
 	    close CMDFILE;
 	    system("\@ $tmp.com");
 	    $ok = $?==0;
-	    for ("$tmp.c", "$tmp$obj_ext", "$tmp.com", "$tmp$Config{exe_ext}") { 
+	    for ("$tmp.c", "$tmp$obj_ext", "$tmp.com", "$tmp$Config{exe_ext}") {
 		1 while unlink $_;
 	    }
         }
@@ -148,18 +150,18 @@
 	    unlink("$tmp.c", $tmp_exe);
         }
     }
-    
+
     $ok;
 }
 
 sub has_gettimeofday {
     # confusing but true (if condition true ==> -DHAS_GETTIMEOFDAY already)
-    return 0 if $Config{'d_gettimeod'} eq 'define';
+    return 0 if $Config{d_gettimeod} eq 'define';
     return 1 if try_compile_and_link(<<EOM);
-#include "EXTERN.h" 
-#include "perl.h" 
-#include "XSUB.h" 
-#ifdef I_SYS_TYPES 
+#include "EXTERN.h"
+#include "perl.h"
+#include "XSUB.h"
+#ifdef I_SYS_TYPES
 #   include <sys/types.h>
 #endif
 
@@ -212,51 +214,24 @@
     return 0;
 }
 
-sub unixinit {
-    $DEFINE = '';
-
-    $LIBS = [];
-
-    # this might break the link, try it if it can't find some things you 
-    # honestly think should be in there...
-    # $LIBS = ['-lucb -lbsd'];
-
-    # ... but ucb is poison for Solaris, and probably Linux. honest.
-    $LIBS = [] if $Config{'osname'} eq 'solaris';
-    $LIBS = [] if $Config{'osname'} eq 'linux';
-    $LIBS = ['-lm'] if $Config{'osname'} =~ /sco/i;
-    $LIBS = ['-lc'] if $Config{'osname'} =~ /dynixptx/i;
-
-    # For nanosleep
-    push @$LIBS, '-lrt' unless $Config{'osname'} =~ /^(?:irix|linux)$/;
-    push @$LIBS, '-lposix4';
-
-    my @goodlibs;
-
-    select(STDOUT);
-    $| = 1;
-
-    print "Checking for libraries...\n";
-    my $lib;
-    for $lib (@$LIBS) {
-	print "Checking for $lib... ";
-	$LIBS = [ $lib ];
-	if ($Config{libs} =~ /\b$lib\b/ || has_x("time(0)")) {
-	    push @goodlibs, $lib;
-	    print "found.\n";
-	} else {
-	    print "NOT found.\n";
+sub init {
+    my $hints = File::Spec->catfile("hints", "$^O.pl");
+    if (-f $hints) {
+	print "Using hints $hints...\n";
+	local $self;
+	do $hints;
+	if (exists $self->{LIBS}) {
+	    $LIBS = $self->{LIBS};
+	    print "Extra libraries: @$LIBS...\n";
 	}
     }
-    $LIBS = [ @goodlibs ];
-    print @$LIBS ?
-	  "You have extra libraries: @$LIBS.\n" :
-          "You have no applicable extra libraries.\n";
+
+    $DEFINE = '';
 
     print "Looking for gettimeofday()... ";
     my $has_gettimeofday;
-    if ($Config{'d_gettimeod'}) {
-	$has_gettimeofday++;
+    if (exists $Config{d_gettimeod}) {
+	$has_gettimeofday++ if $Config{d_gettimeod};
     } elsif (has_gettimeofday()) {
 	$DEFINE .= ' -DHAS_GETTIMEOFDAY';
 	$has_gettimeofday++;
@@ -280,8 +255,8 @@
 
     print "Looking for setitimer()... ";
     my $has_setitimer;
-    if ($Config{d_setitimer}) {
-        $has_setitimer++;
+    if (exists $Config{d_setitimer}) {
+        $has_setitimer++ if $Config{d_setitimer};
     } elsif (has_x("setitimer(ITIMER_REAL, 0, 0)")) {
         $has_setitimer++;
         $DEFINE .= ' -DHAS_SETITIMER';
@@ -295,8 +270,8 @@
 
     print "Looking for getitimer()... ";
     my $has_getitimer;
-    if ($Config{d_getitimer}) {
-        $has_getitimer++;
+    if (exists $Config{'d_getitimer'}) {
+        $has_getitimer++ if $Config{'d_getitimer'};
     } elsif (has_x("getitimer(ITIMER_REAL, 0)")) {
         $has_getitimer++;
         $DEFINE .= ' -DHAS_GETITIMER';
@@ -316,8 +291,8 @@
 
     print "Looking for ualarm()... ";
     my $has_ualarm;
-    if ($Config{d_ualarm}) {
-        $has_ualarm++;
+    if (exists $Config{d_ualarm}) {
+        $has_ualarm++ if $Config{d_ualarm};
     } elsif (has_x ("ualarm (0, 0)")) {
         $has_ualarm++;
 	$DEFINE .= ' -DHAS_UALARM';
@@ -335,8 +310,8 @@
 
     print "Looking for usleep()... ";
     my $has_usleep;
-    if ($Config{d_usleep}) {
-	$has_usleep++;
+    if (exists $Config{d_usleep}) {
+	$has_usleep++ if $Config{d_usleep};
     } elsif (has_x ("usleep (0)")) {
 	$has_usleep++;
 	$DEFINE .= ' -DHAS_USLEEP';
@@ -358,11 +333,14 @@
 
     print "Looking for nanosleep()... ";
     my $has_nanosleep;
-    if ($Config{d_nanosleep}) {
-	$has_nanosleep++;
+    if (exists $Config{d_nanosleep}) {
+	if ($Config{d_nanosleep}) {
+	    $has_nanosleep++;
+	    $DEFINE .= ' -DTIME_HIRES_NANOSLEEP';
+	}
     } elsif (has_x ("nanosleep (NULL, NULL)")) {
 	$has_nanosleep++;
-	$DEFINE .= ' -DHAS_NANOSLEEP';
+	$DEFINE .= ' -DTIME_HIRES_NANOSLEEP';
     }
 
     if ($has_nanosleep) {
@@ -397,15 +375,15 @@
     push (@makefileopts,
 	'NAME'	=> 'Time::HiRes',
 	'VERSION_FROM' => 'HiRes.pm', # finds $VERSION
-	'LIBS'	=> $LIBS,   # e.g., '-lm' 
-	'DEFINE'	=> $DEFINE,     # e.g., '-DHAS_SOMETHING' 
+	'LIBS'	=> $LIBS,   # e.g., '-lm'
+	'DEFINE'	=> $DEFINE,     # e.g., '-DHAS_SOMETHING'
 	'XSOPT'	=> $XSOPT,
     # do not even think about 'INC' => '-I/usr/ucbinclude', Solaris will avenge.
-	'INC'	=> '',     # e.g., '-I/usr/include/other' 
+	'INC'	=> '',     # e.g., '-I/usr/include/other'
 	'INSTALLDIRS' => 'perl',
 	'dist'      => {
 	    'CI'       => 'ci -l',
-	    'COMPRESS' => 'gzip -9f', 
+	    'COMPRESS' => 'gzip -9f',
 	    'SUFFIX'   => 'gz',
 	},
         clean => { FILES => "xdefine" },
@@ -426,7 +404,11 @@
 	foreach (qw (d_usleep d_ualarm d_gettimeofday d_getitimer d_setitimer
 		     d_nanosleep)) {
 	    my $macro = $_;
-	    $macro =~ s/d_(.*)/HAS_\U$1/;
+	    if ($macro eq 'd_nanosleep') {
+		$macro =~ s/d_(.*)/TIME_HIRES_\U$1/;
+	    } else {
+		$macro =~ s/d_(.*)/HAS_\U$1/;
+	    }
 	    push @names, {name => $_, macro => $macro, value => 1,
 			  default => ["IV", "0"]};
 	}
@@ -452,9 +434,9 @@
 
     if ($^O =~ /Win32/i) {
       $DEFINE = '-DSELECT_IS_BROKEN';
-      $LIBS = [''];
+      $LIBS = [];
     } else {
-      unixinit();
+      init();
     }
     doMakefile;
     doConstants;
@@ -462,7 +444,18 @@
     unless ($ENV{PERL_CORE}) {
 	print  <<EOM;
 Now you may issue '$make'.  Do not forget also '$make test'.
+
 EOM
+       if ($ENV{LC_ALL}   =~ /utf-?8/i ||
+           $ENV{LC_CTYPE} =~ /utf-?8/i ||
+           $ENV{LANG}     =~ /utf-?8/i) {
+            print  <<EOM;
+NOTE: if you get an error like this (the line number may vary):
+Makefile:91: *** missing separator
+then set the environment variable LC_ALL to "C" and retry.
+
+EOM
+        }
     }
 }
 

Added: trunk/orca/packages/Time-HiRes-1.50/hints/dec_osf.pl
==============================================================================
--- (empty file)
+++ trunk/orca/packages/Time-HiRes-1.50/hints/dec_osf.pl	Sat Aug  2 09:55:53 2003
@@ -0,0 +1,3 @@
+# needs to explicitly link against librt to pull in nanosleep
+$self->{LIBS} = ['-lrt'];
+

Modified: trunk/orca/packages/Time-HiRes-1.50/hints/sco.pl
==============================================================================
--- trunk/orca/packages/Time-HiRes-1.49/hints/sco.pl	(original)
+++ trunk/orca/packages/Time-HiRes-1.50/hints/sco.pl	Sat Aug  2 09:55:53 2003
@@ -1,3 +1,4 @@
 # osr5 needs to explicitly link against libc to pull in usleep
-$self->{LIBS} = ['-lc'];
+# what's the reason for -lm?
+$self->{LIBS} = ['-lm', '-lc'];
 



More information about the Orca-checkins mailing list