diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-02-28 23:11:00 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-02-28 23:11:00 +0000 |
commit | 1c1c7f20b839aeb1c04942d0884c3efb087d3e4a (patch) | |
tree | 520fab1019a7e34a8d8090c712af7aa799736d00 | |
parent | 0bfcb09dbc8a8333a31bc4ed39ebc944580fd2fe (diff) | |
download | perl-1c1c7f20b839aeb1c04942d0884c3efb087d3e4a.tar.gz |
[win32] misc small tweaks
- AutoLoader fix for long::pack::names
- d_mymalloc can be set from makefiles now
- make search.pl actually work on win32
- revert podoc about $^E on OS/2 (per Ilya's wishes)
p4raw-id: //depot/win32/perl@606
-rw-r--r-- | lib/AutoLoader.pm | 2 | ||||
-rw-r--r-- | pod/perlvar.pod | 7 | ||||
-rw-r--r-- | win32/Makefile | 21 | ||||
-rw-r--r-- | win32/bin/search.pl | 5 | ||||
-rw-r--r-- | win32/makefile.mk | 26 | ||||
-rw-r--r-- | win32/win32.c | 1 |
6 files changed, 47 insertions, 15 deletions
diff --git a/lib/AutoLoader.pm b/lib/AutoLoader.pm index 2773a90f10..46e0a4be7a 100644 --- a/lib/AutoLoader.pm +++ b/lib/AutoLoader.pm @@ -73,7 +73,7 @@ sub import { # 'auto/POSIX/autosplit.ix' (without the leading 'lib'). # - (my $calldir = $callpkg) =~ s#::#/#; + (my $calldir = $callpkg) =~ s#::#/#g; my $path = $INC{$calldir . '.pm'}; if (defined($path)) { # Try absolute path name. diff --git a/pod/perlvar.pod b/pod/perlvar.pod index 3ab11ef2ae..221947b508 100644 --- a/pod/perlvar.pod +++ b/pod/perlvar.pod @@ -453,11 +453,8 @@ system error. This is more specific information about the last system error than that provided by C<$!>. This is particularly important when C<$!> is set to B<EVMSERR>. -Under OS/2, C<$^E> is set based on the value returned by the OS/2 -call C<_syserrno()> only when a call into the OS/2 API generates -an error. In this case, C<$!> is set to a special value to -indicate that C<$^E> should be checked. Otherwise, C<$^E> is -just the same as C<$!>. +Under OS/2, C<$^E> is set to the error code of the last call to +OS/2 API either via CRT, or directly from perl. Under Win32, C<$^E> always returns the last error information reported by the Win32 call C<GetLastError()> which describes diff --git a/win32/Makefile b/win32/Makefile index 596f7f469b..b4dfd30270 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -35,6 +35,13 @@ INST_TOP=$(INST_DRV)\perl5004.5x #CRYPT_LIB=des_fcrypt.lib # +# set this if you wish to use perl's malloc +# WARNING: Turning this on/off WILL break binary compatibility with extensions +# you may have compiled with/without it. Be prepared to recompile all extensions +# if you change the default. +PERL_MALLOC *= define + +# # set the install locations of the compiler include/libraries #CCHOME = f:\msvc20 CCHOME = $(MSVCDIR) @@ -55,6 +62,10 @@ D_CRYPT=define CRYPT_FLAG=-DHAVE_DES_FCRYPT !ENDIF +!IF "$(PERL_MALLOC)" == "" +PERL_MALLOC = undef +!ENDIF + #BUILDOPT = -DMULTIPLICITY #BUILDOPT = -DPERL_GLOBAL_STRUCT -DMULTIPLICITY # -DUSE_PERLIO -D__STDC__=1 -DUSE_SFIO -DI_SFIO -I\sfio97\include @@ -188,6 +199,11 @@ NULL= CRYPT_OBJ=$(CRYPT_SRC:.c=.obj) !ENDIF +!IF "$(PERL_MALLOC)" == "define" +MALLOC_SRC = ..\malloc.c +MALLOC_OBJ = ..\malloc$(o) +!ENDIF + # # filenames given to xsubpp must have forward slashes (since it puts # full pathnames in #line strings) @@ -220,7 +236,7 @@ CORE_C= ..\av.c \ ..\toke.c \ ..\universal.c \ ..\util.c \ - ..\malloc.c \ + $(MALLOC_SRC) \ $(CRYPT_SRC) CORE_OBJ= ..\av$(o) \ @@ -250,7 +266,7 @@ CORE_OBJ= ..\av$(o) \ ..\toke$(o) \ ..\universal$(o)\ ..\util$(o) \ - ..\malloc$(o) \ + $(MALLOC_OBJ) \ $(CRYPT_OBJ) WIN32_C = perllib.c \ @@ -359,6 +375,7 @@ CFG_VARS= "INST_DRV=$(INST_DRV)" \ "ccflags=$(OPTIMIZE) $(DEFINES)" \ "cf_email=$(EMAIL)" \ "d_crypt=$(D_CRYPT)" \ + "d_mymalloc=$(PERL_MALLOC)" \ "libs=$(LIBFILES)" \ "incpath=$(CCINCDIR)" \ "libpth=$(CCLIBDIR)" \ diff --git a/win32/bin/search.pl b/win32/bin/search.pl index b63f7353af..ad74001be5 100644 --- a/win32/bin/search.pl +++ b/win32/bin/search.pl @@ -71,6 +71,7 @@ sub init { ## initialize variables that might be reset by command-line args $DOREP=0; ## set true by -dorep (redo multi-hardlink files) + $DOREP=1 if $^O eq 'MSWin32'; $DO_SORT=0; ## set by -sort (sort files in a dir before checking) $FIND_ONLY=0; ## set by -find (don't search files) $LIST_ONLY=0; ## set true by -l (list filenames only) @@ -867,7 +868,7 @@ sub dodir } ## skip things that are empty - unless (-s _) { + unless (-s _ || -d _) { warn qq/skip (empty): $file\n/ if $WHY; next; } @@ -894,7 +895,7 @@ sub dodir } ## _never_ redo a directory - if (defined $dir_done{$id}) { + if (defined $dir_done{$id} and $^O ne 'MSWin32') { warn qq/skip (did as "$dir_done{$id}"): $file\n/ if $WHY; next; } diff --git a/win32/makefile.mk b/win32/makefile.mk index 8e26351316..04e815b82f 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -17,7 +17,7 @@ INST_TOP *= $(INST_DRV)\perl5004.5x # # uncomment to enable threads-capabilities -#USE_THREADS *= define +USE_THREADS *= define # # uncomment one @@ -41,6 +41,13 @@ CCTYPE *= BORLAND #CRYPT_LIB *= des_fcrypt.lib # +# set this if you wish to use perl's malloc +# WARNING: Turning this on/off WILL break binary compatibility with extensions +# you may have compiled with/without it. Be prepared to recompile all extensions +# if you change the default. +PERL_MALLOC *= define + +# # set the install locations of the compiler include/libraries #CCHOME *= f:\msdev\vc CCHOME *= C:\bc5 @@ -67,6 +74,10 @@ D_CRYPT=define CRYPT_FLAG=-DHAVE_DES_FCRYPT .ENDIF +.IF "$(PERL_MALLOC)" == "" +PERL_MALLOC *= undef +.ENDIF + #BUILDOPT *= -DMULTIPLICITY #BUILDOPT *= -DPERL_GLOBAL_STRUCT -DMULTIPLICITY # -DUSE_PERLIO -D__STDC__=1 -DUSE_SFIO -DI_SFIO -I\sfio97\include @@ -298,6 +309,11 @@ NOOP=@echo CRYPT_OBJ=$(CRYPT_SRC:db:+$(o)) .ENDIF +.IF "$(PERL_MALLOC)" == "define" +MALLOC_SRC = ..\malloc.c +MALLOC_OBJ = ..\malloc$(o) +.ENDIF + # # filenames given to xsubpp must have forward slashes (since it puts # full pathnames in #line strings) @@ -330,7 +346,7 @@ CORE_C= ..\av.c \ ..\toke.c \ ..\universal.c \ ..\util.c \ - ..\malloc.c \ + $(MALLOC_SRC) \ $(CRYPT_SRC) CORE_OBJ= ..\av$(o) \ @@ -360,7 +376,7 @@ CORE_OBJ= ..\av$(o) \ ..\toke$(o) \ ..\universal$(o)\ ..\util$(o) \ - ..\malloc$(o) \ + $(MALLOC_OBJ) \ $(CRYPT_OBJ) WIN32_C = perllib.c \ @@ -469,6 +485,7 @@ CFG_VARS= "INST_DRV=$(INST_DRV)" \ "ccflags=$(OPTIMIZE) $(DEFINES)" \ "cf_email=$(EMAIL)" \ "d_crypt=$(D_CRYPT)" \ + "d_mymalloc=$(PERL_MALLOC)" \ "libs=$(LIBFILES:f)" \ "incpath=$(CCINCDIR)" \ "libpth=$(strip $(CCLIBDIR) $(LIBFILES:d))" \ @@ -534,8 +551,7 @@ $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl $(XCOPY) ..\*.h $(COREDIR)\*.* $(XCOPY) *.h $(COREDIR)\*.* $(RCOPY) include $(COREDIR)\*.* - $(MINIPERL) -I..\lib config_h.PL || $(MAKE) CCTYPE=$(CCTYPE) \ - CFG=$(CFG) $(CONFIGPM) + $(MINIPERL) -I..\lib config_h.PL || $(MAKE) $(MAKEMACROS) $(CONFIGPM) LKPRE = INPUT ( LKPOST = ) diff --git a/win32/win32.c b/win32/win32.c index 17029d0894..9f678f230c 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -685,6 +685,7 @@ int chown(const char *path, uid_t owner, gid_t group) { /* XXX noop */ + return 0; } int |