diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-07-12 06:38:27 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-07-12 06:38:27 +0000 |
commit | 8d9b2e3c6958e5856b03a00694b8ae02817ed002 (patch) | |
tree | 6b5b5a6975f7c34b624d3d8f3e27155d400cbdbc /win32 | |
parent | 52128c7bef3f076ac01499c67c282a95011ff34a (diff) | |
download | perl-8d9b2e3c6958e5856b03a00694b8ae02817ed002.tar.gz |
various tweaks for PERL_OBJECT build & test
p4raw-id: //depot/perl@1450
Diffstat (limited to 'win32')
-rw-r--r-- | win32/GenCAPI.pl | 4 | ||||
-rw-r--r-- | win32/Makefile | 14 | ||||
-rw-r--r-- | win32/makefile.mk | 14 | ||||
-rw-r--r-- | win32/win32.c | 12 | ||||
-rw-r--r-- | win32/win32iop.h | 2 |
5 files changed, 23 insertions, 23 deletions
diff --git a/win32/GenCAPI.pl b/win32/GenCAPI.pl index 8f597a9c20..e22038425c 100644 --- a/win32/GenCAPI.pl +++ b/win32/GenCAPI.pl @@ -870,9 +870,9 @@ int _win32_stat(const char *name,struct stat *sbufptr) return pPerl->piLIO->NameStat(name, sbufptr, ErrorNo()); } -int _win32_rename(const char *oldname, const char *newname) +int _win32_rename(const char *oname, const char *newname) { - return pPerl->piLIO->Rename(oldname, newname, ErrorNo()); + return pPerl->piLIO->Rename(oname, newname, ErrorNo()); } int _win32_setmode(int fd, int mode) diff --git a/win32/Makefile b/win32/Makefile index 4db5414b3a..66d2a33b33 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -66,8 +66,8 @@ INST_VER = \5.00471 # # if you have the source for des_fcrypt(), uncomment this and make sure the -# file exists (see README.win32). File should be located at the perl -# top level directory. +# file exists (see README.win32). File should be located in the same +# directory as this file. # #CRYPT_SRC = des_fcrypt.c @@ -351,10 +351,6 @@ MICROCORE_SRC = \ ..\universal.c \ ..\util.c -!IF "$(CRYPT_SRC)" != "" -MICROCORE_SRC = $(MICROCORE_SRC) ..\$(CRYPT_SRC) -!ENDIF - !IF "$(PERL_MALLOC)" == "define" EXTRACORE_SRC = $(EXTRACORE_SRC) ..\malloc.c !ENDIF @@ -371,13 +367,17 @@ WIN32_SRC = \ WIN32_SRC = $(WIN32_SRC) .\win32thread.c !ENDIF +!IF "$(CRYPT_SRC)" != "" +WIN32_SRC = $(WIN32_SRC) .\$(CRYPT_SRC) +!ENDIF + PERL95_SRC = \ perl95.c \ win32mt.c \ win32sckmt.c !IF "$(CRYPT_SRC)" != "" -PERL95_SRC = $(PERL95_SRC) ..\$(CRYPT_SRC) +PERL95_SRC = $(PERL95_SRC) .\$(CRYPT_SRC) !ENDIF DLL_SRC = $(DYNALOADER).c diff --git a/win32/makefile.mk b/win32/makefile.mk index 89477da9a5..32f3a3dbf0 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -73,8 +73,8 @@ CCTYPE *= BORLAND # # if you have the source for des_fcrypt(), uncomment this and make sure the -# file exists (see README.win32). File should be located at the perl -# top level directory. +# file exists (see README.win32). File should be located in the same +# directory as this file. # #CRYPT_SRC *= des_fcrypt.c @@ -465,10 +465,6 @@ MICROCORE_SRC = \ ..\universal.c \ ..\util.c -.IF "$(CRYPT_SRC)" != "" -MICROCORE_SRC += ..\$(CRYPT_SRC) -.ENDIF - .IF "$(PERL_MALLOC)" == "define" EXTRACORE_SRC += ..\malloc.c .ENDIF @@ -485,13 +481,17 @@ WIN32_SRC = \ WIN32_SRC += .\win32thread.c .ENDIF +.IF "$(CRYPT_SRC)" != "" +WIN32_SRC += .\$(CRYPT_SRC) +.ENDIF + PERL95_SRC = \ perl95.c \ win32mt.c \ win32sckmt.c .IF "$(CRYPT_SRC)" != "" -PERL95_SRC += ..\$(CRYPT_SRC) +PERL95_SRC += .\$(CRYPT_SRC) .ENDIF DLL_SRC = $(DYNALOADER).c diff --git a/win32/win32.c b/win32/win32.c index 24f42f7e35..7418fcacee 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -1732,18 +1732,18 @@ win32_pclose(FILE *pf) } DllExport int -win32_rename(const char *oldname, const char *newname) +win32_rename(const char *oname, const char *newname) { char szNewWorkName[MAX_PATH+1]; WIN32_FIND_DATA fdOldFile, fdNewFile; HANDLE handle; char *ptr; - if ((strchr(oldname, '\\') || strchr(oldname, '/')) + if ((strchr(oname, '\\') || strchr(oname, '/')) && strchr(newname, '\\') == NULL && strchr(newname, '/') == NULL) { - strcpy(szNewWorkName, oldname); + strcpy(szNewWorkName, oname); if ((ptr = strrchr(szNewWorkName, '\\')) == NULL) ptr = strrchr(szNewWorkName, '/'); strcpy(++ptr, newname); @@ -1751,14 +1751,14 @@ win32_rename(const char *oldname, const char *newname) else strcpy(szNewWorkName, newname); - if (stricmp(oldname, szNewWorkName) != 0) { + if (stricmp(oname, szNewWorkName) != 0) { // check that we're not being fooled by relative paths // and only delete the new file // 1) if it exists // 2) it is not the same file as the old file // 3) old file exist // GetFullPathName does not return the long file name on some systems - handle = FindFirstFile(oldname, &fdOldFile); + handle = FindFirstFile(oname, &fdOldFile); if (handle != INVALID_HANDLE_VALUE) { FindClose(handle); @@ -1778,7 +1778,7 @@ win32_rename(const char *oldname, const char *newname) } } } - return rename(oldname, newname); + return rename(oname, newname); } DllExport int diff --git a/win32/win32iop.h b/win32/win32iop.h index a83ebd57ac..cf2bd75db5 100644 --- a/win32/win32iop.h +++ b/win32/win32iop.h @@ -74,7 +74,7 @@ DllExport int win32_stat(const char *name,struct stat *sbufptr); DllExport int win32_pipe( int *phandles, unsigned int psize, int textmode ); DllExport FILE* win32_popen( const char *command, const char *mode ); DllExport int win32_pclose( FILE *pf); -DllExport int win32_rename( const char *oldname, const char *newname); +DllExport int win32_rename( const char *oname, const char *newname); DllExport int win32_setmode( int fd, int mode); DllExport long win32_lseek( int fd, long offset, int origin); DllExport long win32_tell( int fd); |