Index: /trunk/src/emx/include/InnoTekLIBC/libc.h
===================================================================
--- /trunk/src/emx/include/InnoTekLIBC/libc.h	(revision 1508)
+++ /trunk/src/emx/include/InnoTekLIBC/libc.h	(revision 1508)
@@ -0,0 +1,45 @@
+/* $Id$ */
+/** @file
+ *
+ * Global LIBC stuff.
+ *
+ * Copyright (c) 2004 knut st. osmundsen <bird-srcspam@anduin.net>
+ *
+ *
+ * This file is part of InnoTek LIBC.
+ *
+ * InnoTek LIBC is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * InnoTek LIBC is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with InnoTek LIBC; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#ifndef __InnoTekLIBC_libc_h__
+#define __InnoTekLIBC_libc_h__
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+/** Disable (some) unix imitation features.
+ *
+ * If non-zero, '\\' is prefered over '/', and a bunch of other unix
+ * imitations are dropped.
+ *
+ * Initiated by __init_dll().
+ */
+extern int __libc_gfNoUnix;
+
+__END_DECLS
+
+#endif
Index: /trunk/src/emx/include/direct.h
===================================================================
--- /trunk/src/emx/include/direct.h	(revision 1508)
+++ /trunk/src/emx/include/direct.h	(revision 1508)
@@ -0,0 +1,63 @@
+/* $Id$ */
+/** @file
+ *
+ * direct.h - VAC/MSC legacy.
+ *
+ * Copyright (c) 2004 knut st. osmundsen <bird-srcspam@anduin.net>
+ *
+ *
+ * This file is part of InnoTek LIBC.
+ *
+ * InnoTek LIBC is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * InnoTek LIBC is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with InnoTek LIBC; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#ifndef _DIRECT_H_
+#define _DIRECT_H_
+
+#include <sys/cdefs.h>
+#include <sys/_types.h>
+
+#if !defined(_MODE_T_DECLARED) && !defined(_MODE_T)
+typedef	__mode_t	mode_t;
+#define	_MODE_T_DECLARED
+#define _MODE_T
+#endif
+
+#if !defined(_SIZE_T_DECLARED) && !defined(_SIZE_T)
+typedef	__size_t	size_t;
+#define	_SIZE_T_DECLARED
+#define	_SIZE_T
+#endif
+
+__BEGIN_DECLS
+
+int _chdir (__const__ char *);
+char *_getcwd (char *, size_t);
+int _mkdir (__const__ char *, long);
+int _rmdir (__const__ char *);
+
+int chdir (const char *);
+char *getcwd (char *, size_t);
+int mkdir(const char *, mode_t);
+int rmdir (const char *);
+
+int _chdrive(char);
+char * _getdcwd(int, char *, int);
+char _getdrive(void);
+
+__END_DECLS
+
+#endif
Index: /trunk/src/emx/src/lib/libc.def
===================================================================
--- /trunk/src/emx/src/lib/libc.def	(revision 1507)
+++ /trunk/src/emx/src/lib/libc.def	(revision 1508)
@@ -1176,2 +1176,3 @@
     "___libc_OS2ErrorPush" @1196
     "___libc_OS2ErrorSet" @1197
+    "__getdcwd" @1198
Index: /trunk/src/emx/src/lib/misc/_getdcwd.c
===================================================================
--- /trunk/src/emx/src/lib/misc/_getdcwd.c	(revision 1508)
+++ /trunk/src/emx/src/lib/misc/_getdcwd.c	(revision 1508)
@@ -0,0 +1,92 @@
+/* $Id$ */
+/** @file
+ *
+ * VAC/MSC interface.
+ *
+ * Copyright (c) 2004 knut st. osmundsen <bird-srcspam@anduin.net>
+ *
+ *
+ * This file is part of InnoTek LIBC.
+ *
+ * InnoTek LIBC is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * InnoTek LIBC is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with InnoTek LIBC; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+/*******************************************************************************
+*   Header Files                                                               *
+*******************************************************************************/
+#include "libc-alias.h"
+#include <direct.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <sys/param.h>
+#include <emx/syscalls.h>
+#include <InnoTekLIBC/libc.h>
+#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_MISC
+#include <InnoTekLIBC/logstrict.h>
+
+
+char * _getdcwd(int chDrive, char *pszBuffer, int cchBuffer)
+{
+    LIBCLOG_ENTER("chDrive=%d pszBuffer=%p cchBuffer=%d\n", chDrive, (void *)pszBuffer, cchBuffer);
+    char szTmp[MAXPATHLEN+1];
+    int len;
+
+    if (pszBuffer != NULL && cchBuffer <= 0)
+    {
+        errno = EINVAL;
+        LIBCLOG_RETURN_P(NULL);
+    }
+    if (__getcwd(szTmp, chDrive + 'A' - 1) < 0)
+        return NULL;
+    len = strlen(szTmp) + 4;
+    if (pszBuffer != NULL)
+    {
+        if (len > cchBuffer)
+        {
+            errno = ERANGE;
+            LIBCLOG_RETURN_P(NULL);
+        }
+    }
+    else
+    {
+        if (len > cchBuffer)
+            cchBuffer = len;
+        pszBuffer = malloc(cchBuffer);
+        if (pszBuffer == NULL)
+        {
+            errno = ENOMEM;
+            LIBCLOG_RETURN_P(NULL);
+        }
+    }
+    if (!__libc_gfNoUnix)
+    {
+        _fnslashify(szTmp);
+        pszBuffer[0] = chDrive ? chDrive + 'A' - 1: _getdrive();
+        pszBuffer[1] = ':';
+        pszBuffer[2] = '/';
+        memcpy(pszBuffer+3, szTmp, len - 3);
+    }
+    else
+    {
+        pszBuffer[0] = chDrive ? chDrive + 'A' - 1: _getdrive();
+        pszBuffer[1] = ':';
+        pszBuffer[2] = '\\';
+        memcpy(pszBuffer+3, szTmp, len - 3);
+    }
+    LIBCLOG_RETURN_MSG(pszBuffer, "ret %p:{%s}\n", (void *)pszBuffer, pszBuffer);
+}
+
Index: /trunk/src/emx/src/lib/misc/abspath.c
===================================================================
--- /trunk/src/emx/src/lib/misc/abspath.c	(revision 1507)
+++ /trunk/src/emx/src/lib/misc/abspath.c	(revision 1508)
@@ -8,4 +8,5 @@
 #include <sys/param.h>
 #include <emx/syscalls.h>
+#include <InnoTekLIBC/libc.h>
 #include <InnoTekLIBC/locale.h>
 
@@ -18,4 +19,5 @@
   char drive, dir[MAXPATHLEN+1], src_drive, *s, *p;
   int i, j, rel, server, trail, mbcl;
+  char chSlash = !__libc_gfNoUnix ? '/' : '\\';
 
   s = alloca (strlen (src) + 1);
@@ -39,5 +41,8 @@
     }
   else if (__getcwd (dir, drive) == 0)
-    _fnslashify (dir);
+    {
+      if (!__libc_gfNoUnix)
+        _fnslashify (dir);
+    }
   else
     {
@@ -45,9 +50,10 @@
       rel = TRUE;
     }
+
   while (*s != 0)
     {
       if (s[0] == '.' && (IS_PATH_DELIM (s[1]) || s[1] == 0))
         ++s;
-      else if (s[0] == '.' && s[1] == '.' && (IS_PATH_DELIM (s[2]) || 
+      else if (s[0] == '.' && s[1] == '.' && (IS_PATH_DELIM (s[2]) ||
                                               s[2] == 0))
         {
@@ -68,5 +74,5 @@
           i = strlen (dir);
           if (i < sizeof (dir) - 1)
-            dir[i++] = '/';
+            dir[i++] = chSlash;
           while (*s != 0)
             {
@@ -105,14 +111,14 @@
     }
   if (i < size && server && src_drive == 0)
-    dst[i++] = '/';
-  if (i < size && !rel && dir[0] != '/')
-    dst[i++] = '/';
+    dst[i++] = chSlash;
+  if (i < size && !rel && dir[0] != chSlash)
+    dst[i++] = chSlash;
   j = 0;
-  if (rel && dir[j] == '/')
+  if (rel && dir[j] == chSlash)
     ++j;
   while (i < size && dir[j] != 0)
     dst[i++] = dir[j++];
-  if (trail && i < size && (i == 0 || dst[i-1] != '/'))
-    dst[i++] = '/';
+  if (trail && i < size && (i == 0 || dst[i-1] != chSlash))
+    dst[i++] = chSlash;
   if (i >= size)
     {
Index: /trunk/src/emx/src/lib/misc/fullpath.c
===================================================================
--- /trunk/src/emx/src/lib/misc/fullpath.c	(revision 1507)
+++ /trunk/src/emx/src/lib/misc/fullpath.c	(revision 1508)
@@ -9,4 +9,5 @@
 #include <emx/syscalls.h>
 #include <emx/io.h>
+#include <InnoTekLIBC/libc.h>
 
 int _fullpath (char *dst, const char *src, int size)
@@ -27,5 +28,5 @@
   cwd1[0] = cwd2[0] = drive;
   cwd1[1] = cwd2[1] = ':';
-  cwd1[2] = cwd2[2] = '/';
+  cwd1[2] = cwd2[2] = !__libc_gfNoUnix ? '/' : '\\';
   if (__getcwd (cwd1+3, drive) != 0)
     goto failure;
@@ -67,8 +68,9 @@
         }
       if (!_trslash (dst, j, 0))
-        dst[j++] = '/';
+        dst[j++] = !__libc_gfNoUnix ? '/' : '\\';
       strcpy (dst+j, temp+k);
     }
-  _fnslashify (dst);
+  if (!__libc_gfNoUnix)
+    _fnslashify (dst);
   return 0;
 
Index: /trunk/src/emx/src/lib/misc/getcwd.c
===================================================================
--- /trunk/src/emx/src/lib/misc/getcwd.c	(revision 1507)
+++ /trunk/src/emx/src/lib/misc/getcwd.c	(revision 1508)
@@ -7,40 +7,52 @@
 #include <sys/param.h>
 #include <emx/syscalls.h>
+#include <InnoTekLIBC/libc.h>
+#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_MISC
+#include <InnoTekLIBC/logstrict.h>
 
-char *_STD(getcwd) (char *buffer, size_t size)
+char *_STD(getcwd)(char *buffer, size_t size)
 {
-  char tmp[MAXPATHLEN+1];
-  size_t len;
+    LIBCLOG_ENTER("buffer=%p size=%d\n", buffer, size);
+    if (!__libc_gfNoUnix)
+    {
+        char tmp[MAXPATHLEN+1];
+        size_t len;
 
-  if (buffer != NULL && size == 0)
+        if (buffer != NULL && size == 0)
+        {
+            errno = EINVAL;
+            LIBCLOG_RETURN_P(NULL);
+        }
+        if (__getcwd(tmp, 0) < 0)
+            return NULL;
+        len = strlen(tmp) + 2;
+        if (buffer != NULL)
+        {
+            if (len > size)
+            {
+                errno = ERANGE;
+                LIBCLOG_RETURN_P(NULL);
+            }
+        }
+        else
+        {
+            if (len > size)
+                size = len;
+            buffer = malloc(size);
+            if (buffer == NULL)
+            {
+                errno = ENOMEM;
+                LIBCLOG_RETURN_P(NULL);
+            }
+        }
+        _fnslashify(tmp);
+        buffer[0] = '/';
+        memcpy(buffer + 1, tmp, len - 1);
+        LIBCLOG_RETURN_MSG(buffer, "ret %p:{%s}\n", (void *)buffer, buffer);
+    }
+    else
     {
-      errno = EINVAL;
-      return NULL;
+        char *pszRet = _getcwd2(buffer, size);
+        LIBCLOG_RETURN_P(pszRet);
     }
-  if (__getcwd (tmp, 0) < 0)
-    return NULL;
-  len = strlen (tmp) + 2;
-  if (buffer != NULL)
-    {
-      if (len > size)
-        {
-          errno = ERANGE;
-          return NULL;
-        }
-    }
-  else
-    {
-      if (len > size)
-        size = len;
-      buffer = malloc (size);
-      if (buffer == NULL)
-        {
-          errno = ENOMEM;
-          return NULL;
-        }
-    }
-  _fnslashify (tmp);
-  buffer[0] = '/';
-  strcpy (buffer+1, tmp);
-  return buffer;
 }
Index: /trunk/src/emx/src/lib/misc/getcwd1.c
===================================================================
--- /trunk/src/emx/src/lib/misc/getcwd1.c	(revision 1507)
+++ /trunk/src/emx/src/lib/misc/getcwd1.c	(revision 1508)
@@ -4,11 +4,20 @@
 #include <stdlib.h>
 #include <emx/syscalls.h>
+#include <InnoTekLIBC/libc.h>
+#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_MISC
+#include <InnoTekLIBC/logstrict.h>
 
 int _getcwd1 (char *buffer, char drive)
 {
-  if (__getcwd (buffer+1, drive) < 0)
-    return -1;
-  _fnslashify (buffer+1);
-  buffer[0] = '/';
-  return 0;
+    LIBCLOG_ENTER("buffer=%p drive=%c\n", (void *)buffer, drive);
+    if (__getcwd (buffer+1, drive) < 0)
+        LIBCLOG_RETURN_INT(-1);
+    if (!__libc_gfNoUnix)
+    {
+        _fnslashify(buffer+1);
+        buffer[0] = '/';
+    }
+    else
+        buffer[1] = '\\';
+    LIBCLOG_RETURN_MSG(0, "ret 0 buffer=:{%s}\n", buffer);
 }
Index: /trunk/src/emx/src/lib/misc/getcwd2.c
===================================================================
--- /trunk/src/emx/src/lib/misc/getcwd2.c	(revision 1507)
+++ /trunk/src/emx/src/lib/misc/getcwd2.c	(revision 1508)
@@ -7,42 +7,56 @@
 #include <sys/param.h>
 #include <emx/syscalls.h>
+#include <InnoTekLIBC/libc.h>
+#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_MISC
+#include <InnoTekLIBC/logstrict.h>
 
 char *_getcwd2 (char *buffer, int size)
 {
-  char tmp[MAXPATHLEN+1];
-  int len;
+    LIBCLOG_ENTER("buffer=%p size=%d\n", (void *)buffer, size);
+    char tmp[MAXPATHLEN+1];
+    int len;
 
-  if (buffer != NULL && size <= 0)
+    if (buffer != NULL && size <= 0)
     {
-      errno = EINVAL;
-      return NULL;
+        errno = EINVAL;
+        LIBCLOG_RETURN_P(NULL);
     }
-  if (__getcwd (tmp, 0) < 0)
-    return NULL;
-  len = strlen (tmp) + 4;
-  if (buffer != NULL)
+    if (__getcwd (tmp, 0) < 0)
+        return NULL;
+    len = strlen (tmp) + 4;
+    if (buffer != NULL)
     {
-      if (len > size)
+        if (len > size)
         {
-          errno = ERANGE;
-          return NULL;
+            errno = ERANGE;
+            LIBCLOG_RETURN_P(NULL);
         }
     }
-  else
+    else
     {
-      if (len > size)
-        size = len;
-      buffer = malloc (size);
-      if (buffer == NULL)
+        if (len > size)
+            size = len;
+        buffer = malloc(size);
+        if (buffer == NULL)
         {
-          errno = ENOMEM;
-          return NULL;
+            errno = ENOMEM;
+            LIBCLOG_RETURN_P(NULL);
         }
     }
-  _fnslashify (tmp);
-  buffer[0] = _getdrive();
-  buffer[1] = ':';
-  buffer[2] = '/';
-  strcpy (buffer+3, tmp);
-  return buffer;
+    if (!__libc_gfNoUnix)
+    {
+        _fnslashify(tmp);
+        buffer[0] = _getdrive();
+        buffer[1] = ':';
+        buffer[2] = '/';
+        memcpy(buffer+3, tmp, len - 3);
+    }
+    else
+    {
+        buffer[0] = _getdrive();
+        buffer[1] = ':';
+        buffer[2] = '\\';
+        memcpy(buffer+3, tmp, len - 3);
+    }
+    LIBCLOG_RETURN_MSG(buffer, "ret %p:{%s}\n", (void *)buffer, buffer);
 }
Index: /trunk/src/emx/src/lib/misc/getwd.c
===================================================================
--- /trunk/src/emx/src/lib/misc/getwd.c	(revision 1507)
+++ /trunk/src/emx/src/lib/misc/getwd.c	(revision 1508)
@@ -7,4 +7,5 @@
 #include <sys/param.h>
 #include <emx/syscalls.h>
+#include <InnoTekLIBC/libc.h>
 
 char *_STD(getwd) (char *buffer)
@@ -20,6 +21,12 @@
       return NULL;
     }
-  _fnslashify (buffer+1);
-  buffer[0] = '/';
+  if (!__libc_gfNoUnix)
+    {
+      _fnslashify (buffer+1);
+      buffer[0] = '/';
+    }
+  else
+    buffer[0] = '\\';
+
   return buffer;
 }
Index: /trunk/src/emx/src/lib/startup/386/crt0.s
===================================================================
--- /trunk/src/emx/src/lib/startup/386/crt0.s	(revision 1507)
+++ /trunk/src/emx/src/lib/startup/386/crt0.s	(revision 1508)
@@ -46,8 +46,12 @@
     addl    $8, %esp
 #endif
-#if defined (HIGHMEM)
-    pushl    $1     /* vote for high mem for default stack */
+#if defined(HIGHMEM) && defined(NOUNIX)
+    pushl    $3     /* vote for high mem for default heap; & less unixness. */
+#elif defined(HIGHMEM)
+    pushl    $1     /* vote for high mem for default heap */
+#elif defined(NOUNIX)
+    pushl    $2     /* vote against high memory for deault heap; lexx unixness */
 #else
-    pushl    $0     /* veto agains high mem for default stack */
+    pushl    $0     /* veto against high mem for default heap. */
 #endif
     call    ___init_app
Index: /trunk/src/emx/src/lib/startup/386/dll0.s
===================================================================
--- /trunk/src/emx/src/lib/startup/386/dll0.s	(revision 1507)
+++ /trunk/src/emx/src/lib/startup/386/dll0.s	(revision 1508)
@@ -66,8 +66,12 @@
 do_init:
 #endif
-#if defined (HIGHMEM)
-    pushl    $1     /* vote for high mem for default stack */
+#if defined(HIGHMEM) && defined(NOUNIX)
+    pushl    $3     /* vote for high mem for default heap; & less unixness. */
+#elif defined(HIGHMEM)
+    pushl    $1     /* vote for high mem for default heap */
+#elif defined(NOUNIX)
+    pushl    $2     /* vote against high memory for deault heap; lexx unixness */
 #else
-    pushl    $0     /* veto against high mem for default stack */
+    pushl    $0     /* veto against high mem for default heap. */
 #endif
     call    ___init_dll
Index: /trunk/src/emx/src/lib/startup/startup.smak
===================================================================
--- /trunk/src/emx/src/lib/startup/startup.smak	(revision 1507)
+++ /trunk/src/emx/src/lib/startup/startup.smak	(revision 1508)
@@ -9,9 +9,31 @@
 include common.smak
 
-.OBJS += $(addprefix $.$(.TKIND.DIR)src/lib/startup/,mcrt0.o gcrt0.o crt0fork.o dll0fork.o crt0hi.o dll0hi.o crt0hifork.o dll0hifork.o) \
-  $(addprefix $.omf/src/lib/startup/,mcrt0.obj gcrt0.obj \
-  $(CPU)/crt0.obj $(CPU)/dll0.obj crt0fork.obj dll0fork.obj crt0hi.obj dll0hi.obj crt0hifork.obj dll0hifork.obj)
+.OBJS += $(addprefix $.$(.TKIND.DIR)src/lib/startup/,mcrt0.o gcrt0.o) \
+  $(addprefix $.omf/src/lib/startup/,mcrt0.obj gcrt0.obj $(CPU)/crt0.obj $(CPU)/dll0.obj )
 .DIRS := $(sort $(dir $(.OBJS)))
 TARGDIRS += $(.DIRS)
+
+# define to do 	
+define def_startup
+$(eval .OBJS += $.aout/src/lib/startup/crt0$(i).o)
+$$.aout/src/lib/startup/crt0$(i).o: src/lib/startup/386/crt0.s
+	$$(call DO.COMPILE.s, $(subst noux, -DNOUNIX,$(subst fork, -DFORK,$(subst hi, -DHIGHMEM, $i))))
+
+$(eval .OBJS += $.aout/src/lib/startup/dll0$(i).o)
+$$.aout/src/lib/startup/dll0$(i).o: src/lib/startup/386/dll0.s
+	$$(call DO.COMPILE.s, $(subst noux, -DNOUNIX,$(subst fork, -DFORK,$(subst hi, -DHIGHMEM, $i))))
+	
+$(eval .OBJS += $.omf/src/lib/startup/crt0$(i).obj)
+$$.omf/src/lib/startup/crt0$(i).obj: $$.aout/src/lib/startup/crt0$(i).o
+	$$(call DO.EMXOMF,-m__text)
+	
+$(eval .OBJS += $.omf/src/lib/startup/dll0$(i).obj)
+$$.omf/src/lib/startup/dll0$(i).obj: $$.aout/src/lib/startup/dll0$(i).o
+	$$(call DO.EMXOMF,-l__text)
+endef
+
+# generate
+$(foreach i,hi hifork hinoux hiforknoux fork forknoux noux,$(eval $(def_startup)))
+
 
 libc: emxomf ld $(.DIRS) $(.OBJS)
@@ -21,23 +43,4 @@
 	$(call CP,$^,$(dir $@))
 
-$.aout/src/lib/startup/crt0fork.o: src/lib/startup/386/crt0.s
-	$(call DO.COMPILE.s, -DFORK)
-	
-$.aout/src/lib/startup/dll0fork.o: src/lib/startup/386/dll0.s
-	$(call DO.COMPILE.s, -DFORK)
-
-$.aout/src/lib/startup/crt0hi.o: src/lib/startup/386/crt0.s
-	$(call DO.COMPILE.s, -DHIGHMEM)
-	
-$.aout/src/lib/startup/dll0hi.o: src/lib/startup/386/dll0.s
-	$(call DO.COMPILE.s, -DHIGHMEM)
-
-$.aout/src/lib/startup/crt0hifork.o: src/lib/startup/386/crt0.s
-	$(call DO.COMPILE.s, -DHIGHMEM -DFORK)
-	
-$.aout/src/lib/startup/dll0hifork.o: src/lib/startup/386/dll0.s
-	$(call DO.COMPILE.s, -DHIGHMEM -DFORK)
-
-				
 $.aout/src/lib/startup/mcrt0.o: src/lib/startup/386/crt0.s
 	$(call DO.COMPILE.s, -DMCRT0)
@@ -59,16 +62,4 @@
 $.omf/src/lib/startup/gcrt0.obj: $.aout/src/lib/startup/gcrt0.o
 	$(call DO.EMXOMF,-m__text)
-$.omf/src/lib/startup/dll0fork.obj: $.aout/src/lib/startup/dll0fork.o
-	$(call DO.EMXOMF,-l__text)
-$.omf/src/lib/startup/crt0fork.obj: $.aout/src/lib/startup/crt0fork.o
-	$(call DO.EMXOMF,-m__text)
-$.omf/src/lib/startup/dll0hi.obj: $.aout/src/lib/startup/dll0hi.o
-	$(call DO.EMXOMF,-l__text)
-$.omf/src/lib/startup/crt0hi.obj: $.aout/src/lib/startup/crt0hi.o
-	$(call DO.EMXOMF,-m__text)
-$.omf/src/lib/startup/dll0hifork.obj: $.aout/src/lib/startup/dll0hifork.o
-	$(call DO.EMXOMF,-l__text)
-$.omf/src/lib/startup/crt0hifork.obj: $.aout/src/lib/startup/crt0hifork.o
-	$(call DO.EMXOMF,-m__text)
 $.omf/src/lib/startup/386/dll0.obj: $.aout/src/lib/startup/386/dll0.o
 	$(call DO.EMXOMF,-l__text)
Index: /trunk/src/emx/src/lib/sys/__getcwd.c
===================================================================
--- /trunk/src/emx/src/lib/sys/__getcwd.c	(revision 1507)
+++ /trunk/src/emx/src/lib/sys/__getcwd.c	(revision 1508)
@@ -15,5 +15,5 @@
   if (drive != 0)
     drive -= 'A' - 1;
-  size =512;
+  size = CCHMAXPATH;
   FS_SAVE_LOAD();
   rc = DosQueryCurrentDir (drive, buffer, &size);
Index: /trunk/src/emx/src/lib/sys/__init.c
===================================================================
--- /trunk/src/emx/src/lib/sys/__init.c	(revision 1507)
+++ /trunk/src/emx/src/lib/sys/__init.c	(revision 1508)
@@ -144,15 +144,17 @@
  * Does initialization for thread 1 before main() is called.
  *
- * This function doesn't return, but leaves it stack frame on the stack by some
+ * This function doesn't return, but leaves its stack frame on the stack by some
  * magic done in sys/386/appinit.s. The top of the returned stack have a layout
  * as seen in struct stackframe below - start of struct is main() callframe.
- * @param   fDefaultHeapInHighMem   If set the application is open to put the default
- *                                  heap in high memory.
- *                                  If clear the application veto against putting the
- *                                  default heap in high memory.
- *                                  Passed on to __init_dll().
+ *
+ * @param   fFlags  Bit 0: If set the application is open to put the default heap in high memory.
+ *                         If clear the application veto against putting the default heap in high memory.
+ *                  Bit 1: If set some of the unixness of LIBC is disabled.
+ *                         If clear all unix like features are enabled.
+ *                  Passed on to __init_dll().
+ *
  * @ingroup startup
  */
-void __init(int fDefaultHeapInHighMem)
+void __init(int fFlags)
 {
     /** top of stack unpon 'return' from this function. */
@@ -181,5 +183,5 @@
      * Then end the heap voting.
      */
-    if (__init_dll(fDefaultHeapInHighMem))
+    if (__init_dll(fFlags))
         goto failure;
 
Index: /trunk/src/emx/src/lib/sys/__initdll.c
===================================================================
--- /trunk/src/emx/src/lib/sys/__initdll.c	(revision 1507)
+++ /trunk/src/emx/src/lib/sys/__initdll.c	(revision 1508)
@@ -35,4 +35,5 @@
 #include "syscalls.h"
 #include <InnoTekLIBC/thread.h>
+#include <InnoTekLIBC/libc.h>
 #define __LIBC_LOG_GROUP    __LIBC_LOG_GRP_INITTERM
 #include <InnoTekLIBC/logstrict.h>
@@ -60,4 +61,5 @@
 *   Global Variables                                                           *
 *******************************************************************************/
+int                 __libc_gfNoUnix;
 __LIBC_PPTHREAD     __libc_gpTLS;
 
@@ -77,6 +79,12 @@
  * Common init code for crt0 and dll0.
  * This should perhaps be a part of _CRT_init.
- */
-int __init_dll(int fDefaultHeapInHighMem)
+ *
+ * @param   fFlags  Bit 0: If set the application is open to put the default heap in high memory.
+ *                         If clear the application veto against putting the default heap in high memory.
+ *                  Bit 1: If set some of the unixness of LIBC is disabled.
+ *                         If clear all unix like features are enabled.
+ *                  Passed on to __init_dll().
+ */
+int __init_dll(int fFlags)
 {
     ULONG               aul[2];
@@ -89,7 +97,10 @@
 
     /*
-     * Heap voting.
-     */
-    __libc_HeapVote(fDefaultHeapInHighMem);
+     * Process flags.
+     */
+    __libc_HeapVote(fFlags & 1);
+    if (fFlags & 2)
+        __libc_gfNoUnix = 1;
+
 
     /*
Index: /trunk/src/emx/src/lib/sys/pathrewrite.c
===================================================================
--- /trunk/src/emx/src/lib/sys/pathrewrite.c	(revision 1507)
+++ /trunk/src/emx/src/lib/sys/pathrewrite.c	(revision 1508)
@@ -60,4 +60,5 @@
 *******************************************************************************/
 #include <InnoTekLIBC/pathrewrite.h>
+#include <InnoTekLIBC/libc.h>
 #define __LIBC_LOG_GROUP __LIBC_LOG_GRP_BACK_IO
 #include <InnoTekLIBC/logstrict.h>
@@ -239,5 +240,5 @@
      * Extra unix features.
      */
-    if (1)
+    if (!__libc_gfNoUnix)
     {
         /*
Index: /trunk/src/emx/src/lib/sys/syscalls.h
===================================================================
--- /trunk/src/emx/src/lib/sys/syscalls.h	(revision 1507)
+++ /trunk/src/emx/src/lib/sys/syscalls.h	(revision 1508)
@@ -64,5 +64,4 @@
  */
 EXTERN unsigned long    _sys_gcbVirtualAddressLimit;
-
 
 /* The top heap object.  This points into _sys_heap_objs[] or is NULL.
@@ -161,6 +160,6 @@
 /** @group Init Functions
  * @{ */
-extern void             __init(int fDefaultHeapInHighMem);
-extern int              __init_dll(int fDefaultHeapInHighMem);
+extern void             __init(int fFlags);
+extern int              __init_dll(int fFlags);
 extern void /*volatile*/_sys_init_ret(void *stack) __attribute__((__noreturn__));
 extern int              _sys_init_environ(const char *pszEnv);
