void fnGetPerlScreenName(char *sPerlScreenName);
-
+void fnGetPerlScreenName(char *sPerlScreenName);
+void fnSetupNamespace(void);
+char *getcwd(char [], int);
+void fnRunScript(ScriptData* psdata);
+void nw_freeenviron();
/*============================================================================================
// Ensure that we have a "temp" directory
fnSetupNamespace();
- if (access(DEFTEMP, 0) != 0)
- mkdir(DEFTEMP);
+ 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.
{
char sNUL[MAX_DN_BYTES] = {'\0'};
- strcpy(sNUL, DEFPERLROOT);
- strcat(sNUL, "\\nul");
+ strcpy(sNUL, NWDEFPERLROOT);
+ strcat(sNUL, "\\nwnul");
if (access((const char *)sNUL, 0) != 0)
{
// The file, "nul" is not found and so create the file.
//
while (!fnTerminateThreadInfo() && k < 5)
{
- sleep(1);
+ nw_sleep(1);
k++;
}
}
{
char sNUL[MAX_DN_BYTES] = {'\0'};
- strcpy(sNUL, DEFPERLROOT);
- strcat(sNUL, "\\nul");
+ strcpy(sNUL, NWDEFPERLROOT);
+ strcat(sNUL, "\\nwnul");
if (access((const char *)sNUL, 0) == 0)
{
// The file, "nul" is found and so delete it.
{
// get the default working directory name
//
- defaultDir = fnNwGetEnvironmentStr("PERL_ROOT", DEFPERLROOT);
+ defaultDir = fnNwGetEnvironmentStr("PERL_ROOT", NWDEFPERLROOT);
}
else
defaultDir = getcwd(curdir, sizeof(curdir)-1);
nw_getenviron()
{
if (genviron)
- // This (and not the next line) is the correct operation since it matches with the return type.
- // But it is leaking memory upto 11736 bytes!! So it is commented.
-// return (&genviron);
- return genviron;
+ return (&genviron); // This might leak memory upto 11736 bytes on some versions of NetWare.
+// return genviron; // Abending on some versions of NetWare.
else
fnSetUpEnvBlock(&genviron);