From: Peter J. Farley III Date: Sun, 19 Nov 2000 01:42:58 +0000 (-0500) Subject: [ID 20001118.006] [PATCH] perl@7707 djgpp/config.over, hints/dos_djgpp.sh and Storable.pm X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7a9d114548a2fe90e007e5a25357ee26935c8752;p=p5sagit%2Fp5-mst-13.2.git [ID 20001118.006] [PATCH] perl@7707 djgpp/config.over, hints/dos_djgpp.sh and Storable.pm Message-Id: <5.0.1.4.0.20001119011855.00a55ec0@pop5.banet.net> p4raw-id: //depot/perl@7749 --- diff --git a/djgpp/config.over b/djgpp/config.over index b48774f..f9c167e 100644 --- a/djgpp/config.over +++ b/djgpp/config.over @@ -1,5 +1,5 @@ ln='cp' -pager='less' +pager='${DJDIR}/bin/less.exe' # fix extension names under DOS repair() diff --git a/ext/Storable/Storable.pm b/ext/Storable/Storable.pm index 7b46317..d2a631c 100644 --- a/ext/Storable/Storable.pm +++ b/ext/Storable/Storable.pm @@ -135,7 +135,10 @@ sub _store { open(FILE, ">$file") || logcroak "can't create $file: $!"; binmode FILE; # Archaic systems... if ($use_locking) { - if ($^O eq 'dos') { + require Config; import Config; + if (!$Config{'d_flock'} && + !$Config{'d_fcntl_can_lock'} && + !$Config{'d_lockf'}) { logcarp "Storable::lock_store: fcntl/flock emulation broken on $^O"; return undef; } @@ -255,11 +258,15 @@ sub _retrieve { my $self; my $da = $@; # Could be from exception handler if ($use_locking) { - if ($^O eq 'dos') { - logcarp "Storable::lock_store: fcntl/flock emulation broken on $^O"; + require Config; import Config; + if (!$Config{'d_flock'} && + !$Config{'d_fcntl_can_lock'} && + !$Config{'d_lockf'}) { + logcarp "Storable::lock_retrieve: fcntl/flock emulation broken on $^O"; return undef; } - flock(FILE, LOCK_SH) || logcroak "can't get shared lock on $file: $!"; + flock(FILE, LOCK_SH) || + logcroak "can't get shared lock on $file: $!"; # Unlocking will happen when FILE is closed } eval { $self = pretrieve(*FILE) }; # Call C routine diff --git a/hints/dos_djgpp.sh b/hints/dos_djgpp.sh index d50bca4..ebbd786 100644 --- a/hints/dos_djgpp.sh +++ b/hints/dos_djgpp.sh @@ -41,10 +41,13 @@ startperl='#!perl' case "X$optimize" in X) optimize="-O2 -malign-loops=2 -malign-jumps=2 -malign-functions=2" + ldflags='-s' + ;; + X*) + ldflags=' ' ;; esac ccflags="$ccflags -DPERL_EXTERNAL_GLOB" -ldflags='-s' usemymalloc='n' timetype='time_t'