summaryrefslogtreecommitdiff
path: root/win32/win32.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-07-12 06:38:27 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-07-12 06:38:27 +0000
commit8d9b2e3c6958e5856b03a00694b8ae02817ed002 (patch)
tree6b5b5a6975f7c34b624d3d8f3e27155d400cbdbc /win32/win32.c
parent52128c7bef3f076ac01499c67c282a95011ff34a (diff)
downloadperl-8d9b2e3c6958e5856b03a00694b8ae02817ed002.tar.gz
various tweaks for PERL_OBJECT build & test
p4raw-id: //depot/perl@1450
Diffstat (limited to 'win32/win32.c')
-rw-r--r--win32/win32.c12
1 files changed, 6 insertions, 6 deletions
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