Index: trunk/src/emx/src/lib/locale/locale_collate.c
===================================================================
--- trunk/src/emx/src/lib/locale/locale_collate.c	(revision 1003)
+++ trunk/src/emx/src/lib/locale/locale_collate.c	(revision 1004)
@@ -14,18 +14,47 @@
 struct __locale_collate __locale_collate =
 {
-  /* Nothing here; just to make sure ILINK can export it from the DLL */
-  /*@@@ to be removed when emxomfar is fixed @@@*/
+  weight:
+  {
+  0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
+  10, 11, 13, 12, 14, 15, 16, 17, 18, 19,
+  20, 21, 23, 22, 24, 25, 26, 27, 28, 29,
+  30, 31, 33, 32, 34, 35, 36, 37, 38, 39,
+  40, 41, 43, 42, 44, 45, 46, 47, 48, 49,
+  50, 51, 53, 52, 54, 55, 56, 57, 58, 59,
+  60, 61, 63, 62, 64, 65, 66, 67, 68, 69,
+  70, 71, 73, 72, 74, 75, 76, 77, 78, 79,
+  80, 81, 83, 82, 84, 85, 86, 87, 88, 89,
+  90, 91, 93, 92, 94, 95, 96, 97, 98, 99,
+  100, 101, 103, 102, 104, 105, 106, 107, 108, 109,
+  110, 111, 113, 112, 114, 115, 116, 117, 118, 119,
+  120, 121, 123, 122, 124, 125, 126, 127, 128, 129,
+  130, 131, 133, 132, 134, 135, 136, 137, 138, 139,
+  140, 141, 143, 142, 144, 145, 146, 147, 148, 149,
+  150, 151, 153, 152, 154, 155, 156, 157, 158, 159,
+  160, 161, 163, 162, 164, 165, 166, 167, 168, 169,
+  170, 171, 173, 172, 174, 175, 176, 177, 178, 179,
+  180, 181, 183, 182, 184, 185, 186, 187, 188, 189,
+  190, 191, 193, 192, 194, 195, 196, 197, 198, 199,
+  200, 201, 203, 202, 204, 205, 206, 207, 208, 209,
+  210, 211, 213, 212, 214, 215, 216, 217, 218, 219,
+  220, 221, 223, 222, 224, 225, 226, 227, 228, 229,
+  230, 231, 233, 232, 234, 235, 236, 237, 238, 239,
+  240, 241, 243, 242, 244, 245, 246, 247, 248, 249,
+  250, 251, 253, 252, 254, 255
+  },
+  mbcsprefix:
+  {
+    0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
+    0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
+    0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
+    0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
+    0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
+    0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
+    0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
+    0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
+  },
+  uconv: 0,
+  locale: 0,
+  mbcs: 0
 };
 
-static void __attribute__((constructor)) __locale_collate_init ()
-{
-  int i;
-
-  memset (&__locale_collate, 0, sizeof (__locale_collate));
-
-  /* There are no prefix MBCS codes */
-  memset (&__locale_collate.mbcsprefix, 0x55, sizeof (__locale_collate.mbcsprefix));
-
-  for (i = 0; i < 256; i++)
-    __locale_collate.weight [i] = i;
-}
Index: trunk/src/emx/src/lib/locale/locale_ctype.c
===================================================================
--- trunk/src/emx/src/lib/locale/locale_ctype.c	(revision 1003)
+++ trunk/src/emx/src/lib/locale/locale_ctype.c	(revision 1004)
@@ -109,5 +109,5 @@
     int i;
     setlocale(LC_CTYPE, "en_US");
-    /*setlocale(LC_CTYPE, "ASCII"); - doesn't work in OS/2 */
+    setlocale(LC_CTYPE, "C");
     printf("/*\n"
            "    Locale support implementation through OS/2 Unicode API.\n"
Index: trunk/src/emx/src/lib/locale/locale_glob.c
===================================================================
--- trunk/src/emx/src/lib/locale/locale_glob.c	(revision 1003)
+++ trunk/src/emx/src/lib/locale/locale_glob.c	(revision 1004)
@@ -11,21 +11,20 @@
 #include <sys/locale.h>
 
-const char *__locale_C = "C";
+const char __locale_C[2] = "C";
 
 /* This is the global variable containing basic information
-   about current locale. If there is at least one reference to it,
-   the application will also pull in the __locale_init() function
-   which will automatically run at application start time and will
-   initialize this variable to default "C" locale. */
+   about current locale. */
 struct __locale_global __locale =
 {
-  lock: 0
+  lock: 0,
+  name:
+  {
+    (char*)__locale_C,    /* LC_ALL      */
+    (char*)__locale_C,    /* LC_COLLATE  */
+    (char*)__locale_C,    /* LC_CTYPE    */
+    (char*)__locale_C,    /* LC_NUMERIC  */
+    (char*)__locale_C,    /* LC_MONETARY */
+    (char*)__locale_C,    /* LC_TIME     */
+    (char*)__locale_C,    /* LC_MESSAGES */
+  }
 };
-
-static void __attribute__((constructor)) __locale_init ()
-{
-  int i;
-
-  for (i = LC_ALL; i < __LC_COUNT; i++)
-    __locale.name [i + 1] = (char *)__locale_C;
-}
Index: trunk/src/emx/src/lib/locale/locale_time.c
===================================================================
--- trunk/src/emx/src/lib/locale/locale_time.c	(revision 1003)
+++ trunk/src/emx/src/lib/locale/locale_time.c	(revision 1004)
@@ -10,38 +10,16 @@
 #define __INTERNAL_DEFS
 #include <sys/locale.h>
-#include <string.h>
 
 struct __locale_time __locale_time =
 {
+  smonths: { "Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"},
+  lmonths: { "January","February","March","April","May","June","July","August","September","October","November","December" },
+  swdays:  { "Sun","Mon","Tue","Wed","Thu","Fri","Sat" },
+  lwdays:  { "Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday" },
   date_time_fmt: "%a %b %d %H:%M:%S %Y",
   date_fmt: "%m/%d/%y",
   time_fmt: "%H:%M:%S",
-  am: "AM",
-  pm: "PM"
+  am:       "AM",
+  pm:       "PM"
 };
 
-static void init_charptr_array (int count, const char *str, char **array)
-{
-  int idx = 0;
-  while (count--)
-  {
-    array [idx++] = (char *)str;
-    str = strchr (str, 0) + 1;
-  } /* endwhile */
-}
-
-static void __attribute__((constructor)) __locale_time_init ()
-{
-  init_charptr_array (12,
-    "Jan\0Feb\0Mar\0Apr\0May\0Jun\0Jul\0Aug\0Sep\0Oct\0Nov\0Dec",
-    __locale_time.smonths);
-  init_charptr_array (12,
-    "January\0February\0March\0April\0May\0June\0July\0August\0September\0October\0November\0December",
-    __locale_time.lmonths);
-  init_charptr_array (7,
-    "Sun\0Mon\0Tue\0Wed\0Thu\0Fri\0Sat",
-    __locale_time.swdays);
-  init_charptr_array (7,
-    "Sunday\0Monday\0Tuesday\0Wednesday\0Thursday\0Friday\0Saturday",
-    __locale_time.lwdays);
-}
