Cray FP strikes again: things like 1.1 + 0.1 are easily
[p5sagit/p5-mst-13.2.git] / NetWare / Nwmain.c
index a01fa5e..9fb2e50 100644 (file)
@@ -160,8 +160,8 @@ void main(int argc, char *argv[])
 
 //     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.
@@ -176,7 +176,7 @@ void main(int argc, char *argv[])
        {
                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 @@ void fnSigTermHandler(int sig)
        {
                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 @@ void fnLaunchPerl(void* context)
        {
                // get the default working directory name
                //
-               defaultDir = fnNwGetEnvironmentStr("PERL_ROOT", DEFPERLROOT);
+               defaultDir = fnNwGetEnvironmentStr("PERL_ROOT", NWDEFPERLROOT);
        }
        else
                defaultDir = getcwd(curdir, sizeof(curdir)-1);
@@ -1386,10 +1386,8 @@ char ***
 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);