Change 12002 by jhi@alpha on 2001/09/11 11:50:48
NetWare update from Ananth Kesari.
Affected files ...
... //depot/perl/NetWare/NWUtil.c#2 edit
... //depot/perl/NetWare/Nwmain.c#3 edit
... //depot/perl/NetWare/Nwpipe.c#2 edit
... //depot/perl/NetWare/config.wc#10 edit
... //depot/perl/NetWare/config_H.wc#8 edit
... //depot/perl/NetWare/nwutil.h#2 edit
Differences ...
==== //depot/perl/NetWare/NWUtil.c#2 (text) ====
Index: perl/NetWare/NWUtil.c
--- perl/NetWare/NWUtil.c.~1~ Tue Sep 11 06:00:06 2001
+++ perl/NetWare/NWUtil.c Tue Sep 11 06:00:06 2001
@@ -735,6 +735,7 @@
char termchar = '\0';
char letter = 'a';
+ char letter1 = 'a';
if (templatestr && (pXs = strstr(templatestr, (char *)"XXXXXX")))
@@ -753,6 +754,14 @@
else
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)
+**/
+
letter = 'a';
do
{
@@ -765,6 +774,23 @@
letter++;
} while (letter <= 'z');
+ letter1 = 'a';
+ do
+ {
+ letter = 'a';
+ do
+ {
+ sprintf(pXs, (char *)"%c%c%04.5s", letter1, letter,
+pPid);
+ pXs[6] = termchar;
+ if (access(templatestr, 0) != 0) // File does
+not exist
+ {
+ return templatestr;
+ }
+ letter++;
+ } while (letter <= 'z');
+ letter1++;
+ } while (letter1 <= 'z');
+
errno = ENOENT;
return NULL;
}
==== //depot/perl/NetWare/Nwmain.c#3 (text) ====
Index: perl/NetWare/Nwmain.c
--- perl/NetWare/Nwmain.c.~1~ Tue Sep 11 06:00:06 2001
+++ perl/NetWare/Nwmain.c Tue Sep 11 06:00:06 2001
@@ -160,8 +160,8 @@
// Ensure that we have a "temp" directory
fnSetupNamespace();
- if (access(DEFTEMP, 0) != 0)
- mkdir(DEFTEMP);
+ if (access(DEFPERLTEMP, 0) != 0)
+ mkdir(DEFPERLTEMP);
// Create the file NUL if not present. This is done only once per NLM load.
// This is required for -e.
==== //depot/perl/NetWare/Nwpipe.c#2 (text) ====
Index: perl/NetWare/Nwpipe.c
--- perl/NetWare/Nwpipe.c.~1~ Tue Sep 11 06:00:06 2001
+++ perl/NetWare/Nwpipe.c Tue Sep 11 06:00:06 2001
@@ -344,7 +344,7 @@
// Create a temporary file name
//
- strncpy ( tempName, fnNwGetEnvironmentStr((char *)"TEMP", DEFTEMP), (_MAX_PATH
- 20) );
+ strncpy ( tempName, fnNwGetEnvironmentStr((char *)"TEMP", DEFPERLTEMP),
+(_MAX_PATH - 20) );
tempName[_MAX_PATH-20] = '\0';
strcat(tempName, (char *)"\\plXXXXXX.tmp");
if (!fnMy_MkTemp(tempName))
==== //depot/perl/NetWare/config.wc#10 (text) ====
Index: perl/NetWare/config.wc
--- perl/NetWare/config.wc.~1~ Tue Sep 11 06:00:06 2001
+++ perl/NetWare/config.wc Tue Sep 11 06:00:06 2001
@@ -157,7 +157,7 @@
d_fstatvfs='undef'
d_ftello='undef'
d_ftime='define'
-d_getcwd='undef'
+d_getcwd='define'
d_getfsstat='undef'
d_getgrent='undef'
d_getgrps='undef'
==== //depot/perl/NetWare/config_H.wc#8 (text) ====
Index: perl/NetWare/config_H.wc
--- perl/NetWare/config_H.wc.~1~ Tue Sep 11 06:00:06 2001
+++ perl/NetWare/config_H.wc Tue Sep 11 06:00:06 2001
@@ -1370,7 +1370,7 @@
* This symbol, if defined, indicates that the getcwd routine is
* available to get the current working directory.
*/
-/*#define HAS_GETCWD /**/
+#define HAS_GETCWD /**/
/* HAS_GETESPWNAM:
* This symbol, if defined, indicates that the getespwnam system call is
==== //depot/perl/NetWare/nwutil.h#2 (text) ====
Index: perl/NetWare/nwutil.h
--- perl/NetWare/nwutil.h.~1~ Tue Sep 11 06:00:06 2001
+++ perl/NetWare/nwutil.h Tue Sep 11 06:00:06 2001
@@ -89,10 +89,10 @@
*/
#define DEFPERLROOT "sys:\\perl\\scripts"
-/* DEFTEMP:
+/* DEFPERLTEMP:
* This symbol contains the name of the default temp files directory.
*/
-#define DEFTEMP "sys:\\perl\\temp"
+#define DEFPERLTEMP "sys:\\perl\\temp"
#endif // __NWUtil_H__
End of Patch.