Change 12018 by jhi@alpha on 2001/09/14 13:55:56
NetWare tweaks from Ananth Kesari.
Affected files ...
... //depot/perl/NetWare/NWUtil.c#3 edit
... //depot/perl/NetWare/Nwmain.c#4 edit
... //depot/perl/NetWare/Nwpipe.c#3 edit
... //depot/perl/NetWare/nwutil.h#3 edit
Differences ...
==== //depot/perl/NetWare/NWUtil.c#3 (text) ====
Index: perl/NetWare/NWUtil.c
--- perl/NetWare/NWUtil.c.~1~ Fri Sep 14 08:00:05 2001
+++ perl/NetWare/NWUtil.c Fri Sep 14 08:00:05 2001
@@ -755,11 +755,16 @@
pPid = numbuf;
/**
- Backtick operation uses temp files that are stored under DEFPERLTEMP
directory.
- They are temporarily used and then cleaned up after usage.
- In the process of operation to allow for more temp files, the below
logic is used.
- This allows 26 files (like, pla00015.tmp through plz00015.tmp) plus
- 26x26=676 (like, plaa0015.tmp through plzz0015.tmp)
+ Backtick operation uses temp files that are stored under NWDEFPERLTEMP
+ directory. They are temporarily used and then cleaned up after usage.
+ In cases where multiple backtick operations are used that call some
+ complex scripts, new temp files will be created before the old ones are
+ deleted. So, we need to have a provision to create many temp files.
+ Hence the below logic. It is found that provision for 26 files may
+ not be enough in some cases.
+
+ This below logic allows 26 files (like, pla00015.tmp through
+plz00015.tmp)
+ plus 6x26=676 (like, plaa0015.tmp through plzz0015.tmp)
**/
letter = 'a';
==== //depot/perl/NetWare/Nwmain.c#4 (text) ====
Index: perl/NetWare/Nwmain.c
--- perl/NetWare/Nwmain.c.~1~ Fri Sep 14 08:00:05 2001
+++ perl/NetWare/Nwmain.c Fri Sep 14 08:00:05 2001
@@ -160,8 +160,8 @@
// Ensure that we have a "temp" directory
fnSetupNamespace();
- if (access(DEFPERLTEMP, 0) != 0)
- mkdir(DEFPERLTEMP);
+ if (access(NWDEFPERLTEMP, 0) != 0)
+ mkdir(NWDEFPERLTEMP);
// Create the file NUL if not present. This is done only once per NLM load.
// This is required for -e.
@@ -176,7 +176,7 @@
{
char sNUL[MAX_DN_BYTES] = {'\0'};
- strcpy(sNUL, DEFPERLROOT);
+ strcpy(sNUL, NWDEFPERLROOT);
strcat(sNUL, "\\nul");
if (access((const char *)sNUL, 0) != 0)
{
@@ -308,7 +308,7 @@
{
char sNUL[MAX_DN_BYTES] = {'\0'};
- strcpy(sNUL, DEFPERLROOT);
+ strcpy(sNUL, NWDEFPERLROOT);
strcat(sNUL, "\\nul");
if (access((const char *)sNUL, 0) == 0)
{
@@ -530,7 +530,7 @@
{
// get the default working directory name
//
- defaultDir = fnNwGetEnvironmentStr("PERL_ROOT", DEFPERLROOT);
+ defaultDir = fnNwGetEnvironmentStr("PERL_ROOT", NWDEFPERLROOT);
}
else
defaultDir = getcwd(curdir, sizeof(curdir)-1);
==== //depot/perl/NetWare/Nwpipe.c#3 (text) ====
Index: perl/NetWare/Nwpipe.c
--- perl/NetWare/Nwpipe.c.~1~ Fri Sep 14 08:00:05 2001
+++ perl/NetWare/Nwpipe.c Fri Sep 14 08:00:05 2001
@@ -344,7 +344,7 @@
// Create a temporary file name
//
- strncpy ( tempName, fnNwGetEnvironmentStr((char *)"TEMP", DEFPERLTEMP),
(_MAX_PATH - 20) );
+ strncpy ( tempName, fnNwGetEnvironmentStr((char *)"TEMP", NWDEFPERLTEMP),
+(_MAX_PATH - 20) );
tempName[_MAX_PATH-20] = '\0';
strcat(tempName, (char *)"\\plXXXXXX.tmp");
if (!fnMy_MkTemp(tempName))
==== //depot/perl/NetWare/nwutil.h#3 (text) ====
Index: perl/NetWare/nwutil.h
--- perl/NetWare/nwutil.h.~1~ Fri Sep 14 08:00:05 2001
+++ perl/NetWare/nwutil.h Fri Sep 14 08:00:05 2001
@@ -83,16 +83,16 @@
char* fnMy_MkTemp(char* templatestr);
-/* DEFPERLROOT:
+/* NWDEFPERLROOT:
* This symbol contains the name of the starting default directory to search
* for scripts to run.
*/
-#define DEFPERLROOT "sys:\\perl\\scripts"
+#define NWDEFPERLROOT "sys:\\perl\\scripts"
-/* DEFPERLTEMP:
+/* NWDEFPERLTEMP:
* This symbol contains the name of the default temp files directory.
*/
-#define DEFPERLTEMP "sys:\\perl\\temp"
+#define NWDEFPERLTEMP "sys:\\perl\\temp"
#endif // __NWUtil_H__
End of Patch.