]> pd.if.org Git - pdclib.old/commitdiff
Bring example platform up to date
authorOwen Shepherd <owen.shepherd@e43.eu>
Sun, 1 Sep 2013 22:18:08 +0000 (23:18 +0100)
committerOwen Shepherd <owen.shepherd@e43.eu>
Sun, 1 Sep 2013 22:18:08 +0000 (23:18 +0100)
14 files changed:
platform/example/Config.jam
platform/example/Jamfile [new file with mode: 0644]
platform/example/functions/_PDCLIB/_PDCLIB_fileops.c [new file with mode: 0644]
platform/example/functions/_PDCLIB/_PDCLIB_open.c [moved from platform/example/functions/_PDCLIB/open.c with 71% similarity]
platform/example/functions/_PDCLIB/allocpages.c
platform/example/functions/_PDCLIB/close.c [deleted file]
platform/example/functions/_PDCLIB/fillbuffer.c [deleted file]
platform/example/functions/_PDCLIB/flushbuffer.c [deleted file]
platform/example/functions/_PDCLIB/seek.c [deleted file]
platform/example/functions/_PDCLIB/stdinit.c
platform/example/functions/signal/signal.c
platform/example/functions/stdio/tmpfile.c
platform/example/internals/_PDCLIB_config.h
platform/win32/internals/_PDCLIB_config.h

index 1eda6e8e305826fd084c73dc98789265a76f45c1..98e9c6c21c2f251cd0a48926b2ccc36944555a2b 100644 (file)
@@ -9,4 +9,11 @@ if $(PDCLIB_TOOLCHAIN) = "gcc" {
     PDCLIB_TEST_LINKLIBS += -lgcc ;\r
 }\r
 \r
-PDCLIB_OPTIONS = nothread notime dlmalloc ;
\ No newline at end of file
+PDCLIB_OPTIONS = \r
+       nothread \r
+       notime \r
+       dlmalloc \r
+       tss_errno \r
+       basecodecs \r
+    c_locale \r
+    ;
\ No newline at end of file
diff --git a/platform/example/Jamfile b/platform/example/Jamfile
new file mode 100644 (file)
index 0000000..444f44a
--- /dev/null
@@ -0,0 +1,2 @@
+SubDir PDCLIB_TOP platform example ;\r
+PDCLibConfig ;
\ No newline at end of file
diff --git a/platform/example/functions/_PDCLIB/_PDCLIB_fileops.c b/platform/example/functions/_PDCLIB/_PDCLIB_fileops.c
new file mode 100644 (file)
index 0000000..59ff45d
--- /dev/null
@@ -0,0 +1,56 @@
+/* _PDCLIB_fileops\r
+\r
+   This file is part of the Public Domain C Library (PDCLib).\r
+   Permission is granted to use, modify, and / or redistribute at will.\r
+*/\r
+\r
+#ifndef REGTEST\r
+#include <stdio.h>\r
+#include <stdint.h>\r
+#include <_PDCLIB_glue.h>\r
+#include <errno.h>\r
+\r
+static bool readf( _PDCLIB_fd_t self, void * buf, size_t length, \r
+                   size_t * numBytesRead )\r
+{\r
+    errno = ENOTSUP;\r
+    return false;\r
+}\r
+\r
+static bool writef( _PDCLIB_fd_t self, const void * buf, size_t length, \r
+                   size_t * numBytesWritten )\r
+{\r
+    errno = ENOTSUP;\r
+    return false;\r
+}\r
+static bool seekf( _PDCLIB_fd_t self, int_fast64_t offset, int whence,\r
+    int_fast64_t* newPos )\r
+{\r
+    errno = ENOTSUP;\r
+    return false;\r
+}\r
+\r
+static void closef( _PDCLIB_fd_t self )\r
+{\r
+    errno = ENOTSUP;\r
+}\r
+\r
+const _PDCLIB_fileops_t _PDCLIB_fileops = {\r
+    .read  = readf,\r
+    .write = writef,\r
+    .seek  = seekf,\r
+    .close = closef,\r
+};\r
+\r
+#endif\r
+\r
+#ifdef TEST\r
+#include <_PDCLIB_test.h>\r
+\r
+int main( void )\r
+{\r
+    // Tested by stdio test cases\r
+    return TEST_RESULTS;\r
+}\r
+\r
+#endif\r
similarity index 71%
rename from platform/example/functions/_PDCLIB/open.c
rename to platform/example/functions/_PDCLIB/_PDCLIB_open.c
index 1d292f6e3c15892fa8e46eee4fc599994569ae8e..b7b64fec366bd2586d5ec6849637e309258c0eea 100644 (file)
@@ -1,38 +1,39 @@
-/* $Id$ */
-
-/* _PDCLIB_open( char const * const, int )
-
-   This file is part of the Public Domain C Library (PDCLib).
-   Permission is granted to use, modify, and / or redistribute at will.
-*/
-
-/* This is a stub implementation of open.
-*/
-
-#include <stdio.h>
-#include <errno.h>
-
-#ifndef REGTEST
-#include <_PDCLIB_glue.h>
-
-int _PDCLIB_open( char const * const filename, unsigned int mode )
-{
-    errno = ENOTSUP;
-    return 1;
-}
-
-#endif
-
-#ifdef TEST
-#include <_PDCLIB_test.h>
-
-#include <stdlib.h>
-#include <string.h>
-
-int main( void )
-{
-    return TEST_RESULTS;
-}
-
-#endif
-
+/* $Id$ */\r
+\r
+/* _PDCLIB_open( char const * const, int )\r
+\r
+   This file is part of the Public Domain C Library (PDCLib).\r
+   Permission is granted to use, modify, and / or redistribute at will.\r
+*/\r
+\r
+/* This is a stub implementation of open.\r
+*/\r
+\r
+#include <stdio.h>\r
+#include <errno.h>\r
+\r
+#ifndef REGTEST\r
+#include <_PDCLIB_glue.h>\r
+\r
+bool _PDCLIB_open( _PDCLIB_fd_t * pFd, const _PDCLIB_fileops_t ** pOps,\r
+                   char const * const filename, unsigned int mode )\r
+{\r
+    errno = ENOTSUP;\r
+    return false;\r
+}\r
+\r
+#endif\r
+\r
+#ifdef TEST\r
+#include <_PDCLIB_test.h>\r
+\r
+#include <stdlib.h>\r
+#include <string.h>\r
+\r
+int main( void )\r
+{\r
+    return TEST_RESULTS;\r
+}\r
+\r
+#endif\r
+\r
index aa997f67338237a15ef37f2ebe3f6020e65ec24c..bdcd525ca3ece71ab92d2e63829c357113eb58b2 100644 (file)
@@ -14,8 +14,6 @@
 #include <_PDCLIB_glue.h>
 #include <errno.h>
 
-static void * membreak = NULL;
-
 void * _PDCLIB_allocpages( size_t n )
 {
     errno = ENOTSUP;
diff --git a/platform/example/functions/_PDCLIB/close.c b/platform/example/functions/_PDCLIB/close.c
deleted file mode 100644 (file)
index 1b030c9..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/* $Id$ */
-
-/* _PDCLIB_close( _PDCLIB_fd_t fd )
-
-   This file is part of the Public Domain C Library (PDCLib).
-   Permission is granted to use, modify, and / or redistribute at will.
-*/
-
-/* This is a stub example implementation of _PDCLIB_close()
-*/
-
-#include <stdio.h>
-
-#ifndef REGTEST
-#include <_PDCLIB_glue.h>
-#include <errno.h>
-
-int _PDCLIB_close( int fd )
-{
-    errno = ENOTSUP;
-    return 1;
-}
-
-#endif
-
-#ifdef TEST
-#include <_PDCLIB_test.h>
-
-int main( void )
-{
-    /* No testdriver; tested in driver for _PDCLIB_open(). */
-    return TEST_RESULTS;
-}
-
-#endif
diff --git a/platform/example/functions/_PDCLIB/fillbuffer.c b/platform/example/functions/_PDCLIB/fillbuffer.c
deleted file mode 100644 (file)
index c961f48..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/* $Id$ */
-
-/* _PDCLIB_fillbuffer( struct _PDCLIB_file_t * stream )
-
-   This file is part of the Public Domain C Library (PDCLib).
-   Permission is granted to use, modify, and / or redistribute at will.
-*/
-
-/* This is a stub version of _PDCLIB_fillbuffer
-*/
-
-#include <stdio.h>
-
-#ifndef REGTEST
-#include <_PDCLIB_glue.h>
-#include <errno.h>
-
-int _PDCLIB_fillbuffer( struct _PDCLIB_file_t * stream )
-{
-    errno = ENOTSUP; 
-    stream->status |= _PDCLIB_EOFFLAG;
-    return EOF;
-}
-
-#endif
-
-#ifdef TEST
-#include <_PDCLIB_test.h>
-
-int main( void )
-{
-    /* Testing covered by ftell.c */
-    return TEST_RESULTS;
-}
-
-#endif
-
diff --git a/platform/example/functions/_PDCLIB/flushbuffer.c b/platform/example/functions/_PDCLIB/flushbuffer.c
deleted file mode 100644 (file)
index 6dc1164..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/* $Id$ */
-
-/* _PDCLIB_flushbuffer( struct _PDCLIB_file_t * )
-
-   This file is part of the Public Domain C Library (PDCLib).
-   Permission is granted to use, modify, and / or redistribute at will.
-*/
-
-/* This is a stub implementation of _PDCLIB_flushbuffer
-*/
-
-#include <stdio.h>
-#include <string.h>
-
-#ifndef REGTEST
-#include <_PDCLIB_glue.h>
-#include <errno.h>
-
-int _PDCLIB_flushbuffer( struct _PDCLIB_file_t * stream )
-{
-    errno = ENOTSUP;
-    return EOF;
-}
-
-#endif
-
-
-#ifdef TEST
-#include <_PDCLIB_test.h>
-
-int main( void )
-{
-    /* Testing covered by ftell.c */
-    return TEST_RESULTS;
-}
-
-#endif
-
diff --git a/platform/example/functions/_PDCLIB/seek.c b/platform/example/functions/_PDCLIB/seek.c
deleted file mode 100644 (file)
index 381baef..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/* $Id$ */
-
-/* int64_t _PDCLIB_seek( FILE *, int64_t, int )
-
-   This file is part of the Public Domain C Library (PDCLib).
-   Permission is granted to use, modify, and / or redistribute at will.
-*/
-
-#include <stdio.h>
-#include <errno.h>
-#include <_PDCLIB_glue.h>
-
-_PDCLIB_int64_t _PDCLIB_seek( struct _PDCLIB_file_t * stream, _PDCLIB_int64_t offset, int whence )
-{
-    errno = ENOTSUP;
-    return EOF;
-}
-
-#ifdef TEST
-#include <_PDCLIB_test.h>
-
-int main( void )
-{
-    /* Testing covered by ftell.c */
-    return TEST_RESULTS;
-}
-
-#endif
-
index 2554e9fe8c702df81ef0806765ebc6e43ce3255a..48259a86c888ce0ca26a700ce9a815835cee94ac 100644 (file)
 #include <limits.h>
 
 #ifndef REGTEST
+#include <_PDCLIB_io.h>
+#include <_PDCLIB_locale.h>
+#include <_PDCLIB_encoding.h>
+
+extern const _PDCLIB_fileops_t _PDCLIB_fileops;
 
 /* In a POSIX system, stdin / stdout / stderr are equivalent to the (int) file
    descriptors 0, 1, and 2 respectively.
@@ -29,22 +34,55 @@ static unsigned char _PDCLIB_sin_ungetbuf[_PDCLIB_UNGETCBUFSIZE];
 static unsigned char _PDCLIB_sout_ungetbuf[_PDCLIB_UNGETCBUFSIZE];
 static unsigned char _PDCLIB_serr_ungetbuf[_PDCLIB_UNGETCBUFSIZE];
 
-static struct _PDCLIB_file_t _PDCLIB_serr = { 2, _PDCLIB_serr_buffer, BUFSIZ, 0, 0, { 0, 0 }, 0, _PDCLIB_serr_ungetbuf, _IONBF | _PDCLIB_FWRITE | _PDCLIB_STATIC, NULL, NULL };
-static struct _PDCLIB_file_t _PDCLIB_sout = { 1, _PDCLIB_sout_buffer, BUFSIZ, 0, 0, { 0, 0 }, 0, _PDCLIB_sout_ungetbuf, _IOLBF | _PDCLIB_FWRITE | _PDCLIB_STATIC, NULL, &_PDCLIB_serr };
-static struct _PDCLIB_file_t _PDCLIB_sin  = { 0, _PDCLIB_sin_buffer, BUFSIZ, 0, 0, { 0, 0 }, 0, _PDCLIB_sin_ungetbuf, _IOLBF | _PDCLIB_FREAD | _PDCLIB_STATIC, NULL, &_PDCLIB_sout };
 
-struct _PDCLIB_file_t * stdin  = &_PDCLIB_sin;
-struct _PDCLIB_file_t * stdout = &_PDCLIB_sout;
-struct _PDCLIB_file_t * stderr = &_PDCLIB_serr;
+static FILE _PDCLIB_serr = { 
+    .ops        = &_PDCLIB_fileops, 
+    .buffer     = _PDCLIB_serr_buffer, 
+    .bufsize    = BUFSIZ, 
+    .bufidx     = 0, 
+    .bufend     = 0, 
+    .ungetidx   = 0, 
+    .ungetbuf   = _PDCLIB_serr_ungetbuf, 
+    .status     = _IONBF | _PDCLIB_FWRITE | _PDCLIB_STATIC, 
+    .filename   = NULL, 
+    .next       = NULL,
+};
+static FILE _PDCLIB_sout = { 
+    .ops        = &_PDCLIB_fileops, 
+    .buffer     = _PDCLIB_sout_buffer, 
+    .bufsize    = BUFSIZ, 
+    .bufidx     = 0, 
+    .bufend     = 0, 
+    .ungetidx   = 0, 
+    .ungetbuf   = _PDCLIB_sout_ungetbuf, 
+    .status     = _IOLBF | _PDCLIB_FWRITE | _PDCLIB_STATIC, 
+    .filename   = NULL, 
+    .next       = &_PDCLIB_serr 
+};
+static FILE _PDCLIB_sin  = { 
+    .ops        = &_PDCLIB_fileops, 
+    .buffer     = _PDCLIB_sin_buffer, 
+    .bufsize    = BUFSIZ, 
+    .bufidx     = 0, 
+    .bufend     = 0, 
+    .ungetidx   = 0, 
+    .ungetbuf   = _PDCLIB_sin_ungetbuf, 
+    .status     = _IOLBF | _PDCLIB_FREAD | _PDCLIB_STATIC, 
+    .filename   = NULL, 
+    .next       = &_PDCLIB_sout 
+};
+
+FILE *stdin  = &_PDCLIB_sin;
+FILE *stdout = &_PDCLIB_sout;
+FILE *stderr = &_PDCLIB_serr;
 
-/* FIXME: This approach is a possible attack vector. */
-struct _PDCLIB_file_t * _PDCLIB_filelist = &_PDCLIB_sin;
+FILE *_PDCLIB_filelist = &_PDCLIB_sin;
 
 /* "C" locale - defaulting to ASCII-7.
    1 kByte (+ 4 byte) of <ctype.h> data.
    Each line: flags, lowercase, uppercase, collation.
 */
-static struct _PDCLIB_ctype_t _ctype[] = {
+static const _PDCLIB_ctype_t global_ctype[] = {
     { /* EOF */    0,    0,    0,    0 },
     { /* NUL */ _PDCLIB_CTYPE_CNTRL,                                             0x00, 0x00, 0x00 },
     { /* SOH */ _PDCLIB_CTYPE_CNTRL,                                             0x01, 0x01, 0x01 },
@@ -304,39 +342,42 @@ static struct _PDCLIB_ctype_t _ctype[] = {
     { 0x00, 0xFF, 0xFF, 0xFF }
 };
 
-struct lconv _PDCLIB_lconv = { 
-    /* _PDCLIB_ctype      */ _ctype + 1,
-    /* _PDCLIB_errno_texts */
-    {
+extern const struct _PDCLIB_charcodec _PDCLIB_ascii_codec;
+struct _PDCLIB_locale _PDCLIB_global_locale = {
+    ._Codec = &_PDCLIB_ascii_codec,
+    ._Conv  = { 
+        /* decimal_point      */ (char *)".",
+        /* thousands_sep      */ (char *)"",
+        /* grouping           */ (char *)"",
+        /* mon_decimal_point  */ (char *)"",
+        /* mon_thousands_sep  */ (char *)"",
+        /* mon_grouping       */ (char *)"",
+        /* positive_sign      */ (char *)"",
+        /* negative_sign      */ (char *)"",
+        /* currency_symbol    */ (char *)"",
+        /* int_curr_symbol    */ (char *)"",
+        /* frac_digits        */ CHAR_MAX,
+        /* p_cs_precedes      */ CHAR_MAX,
+        /* n_cs_precedes      */ CHAR_MAX,
+        /* p_sep_by_space     */ CHAR_MAX,
+        /* n_sep_by_space     */ CHAR_MAX,
+        /* p_sign_posn        */ CHAR_MAX,
+        /* n_sign_posn        */ CHAR_MAX,
+        /* int_frac_digits    */ CHAR_MAX,
+        /* int_p_cs_precedes  */ CHAR_MAX,
+        /* int_n_cs_precedes  */ CHAR_MAX,
+        /* int_p_sep_by_space */ CHAR_MAX,
+        /* int_n_sep_by_space */ CHAR_MAX,
+        /* int_p_sign_posn    */ CHAR_MAX,
+        /* int_n_sign_posn    */ CHAR_MAX,
+    },
+    ._CType = &global_ctype[1],
+    ._ErrnoStr = {
         /* no error */ (char *)"",
         /* ERANGE   */ (char *)"ERANGE (Range error)",
         /* EDOM     */ (char *)"EDOM (Domain error)",
         /* EILSEQ   */ (char *)"EILSEQ (Illegal sequence)"
     },
-    /* decimal_point      */ (char *)".",
-    /* thousands_sep      */ (char *)"",
-    /* grouping           */ (char *)"",
-    /* mon_decimal_point  */ (char *)"",
-    /* mon_thousands_sep  */ (char *)"",
-    /* mon_grouping       */ (char *)"",
-    /* positive_sign      */ (char *)"",
-    /* negative_sign      */ (char *)"",
-    /* currency_symbol    */ (char *)"",
-    /* int_curr_symbol    */ (char *)"",
-    /* frac_digits        */ CHAR_MAX,
-    /* p_cs_precedes      */ CHAR_MAX,
-    /* n_cs_precedes      */ CHAR_MAX,
-    /* p_sep_by_space     */ CHAR_MAX,
-    /* n_sep_by_space     */ CHAR_MAX,
-    /* p_sign_posn        */ CHAR_MAX,
-    /* n_sign_posn        */ CHAR_MAX,
-    /* int_frac_digits    */ CHAR_MAX,
-    /* int_p_cs_precedes  */ CHAR_MAX,
-    /* int_n_cs_precedes  */ CHAR_MAX,
-    /* int_p_sep_by_space */ CHAR_MAX,
-    /* int_n_sep_by_space */ CHAR_MAX,
-    /* int_p_sign_posn    */ CHAR_MAX,
-    /* int_n_sign_posn    */ CHAR_MAX,
 };
 
 #endif
index e07877d248f49e579d491121d220c8860bd0ded7..aae95a95bc1558f1a923bcc4ae56d3eeecee2136 100644 (file)
@@ -11,6 +11,7 @@
 #ifndef REGTEST
 
 #include <stdlib.h>
+#include <errno.h>
 
 void (*_PDCLIB_sigabrt)( int ) = SIG_DFL;
 void (*_PDCLIB_sigfpe)( int )  = SIG_DFL;
@@ -53,10 +54,7 @@ void (*signal( int sig, void (*func)( int ) ) )( int )
             _PDCLIB_sigterm = func;
             break;
         default:
-            /* The standard calls for an unspecified "positive value". You
-               will probably want to define a specific value for this.
-            */
-            _PDCLIB_errno = 1;
+            errno = EINVAL;
             return SIG_ERR;
     }
     return oldhandler;
index 3f384e7d6ef44431ebbba5a473feb764e19cafe4..94351caad147da0ce6bf2c498906f5dd9eeb5fb2 100644 (file)
 #include <errno.h>
 #include <_PDCLIB_glue.h>
 
-extern struct _PDCLIB_file_t * _PDCLIB_filelist;
-
 /* This is a stub implementation of tmpfile
 */
-struct _PDCLIB_file_t * tmpfile( void )
+FILE* tmpfile( void )
 {
     errno = ENOTSUP;
     return NULL;
index 00dbc241b5f1ab477e3511d8b9568c8caf00b565..047fd94a17d320f1532559d7f54f53f43d63189c 100644 (file)
 /* compiler manuals.                                                          */
 #define _PDCLIB_SHRT_BYTES  2
 #define _PDCLIB_INT_BYTES   4
-#define _PDCLIB_LONG_BYTES  4
+#if defined(__LP64__) || defined(_LP64)
+#  define _PDCLIB_LONG_BYTES 8
+#else
+#  define _PDCLIB_LONG_BYTES  4
+#endif
 #define _PDCLIB_LLONG_BYTES 8
 
 /* <stdlib.h> defines the div() function family that allows taking quotient   */
@@ -125,8 +129,8 @@ struct _PDCLIB_lldiv_t
 /* -------------------------------------------------------------------------- */
 
 /* The result type of substracting two pointers */
-#define _PDCLIB_ptrdiff int
-#define _PDCLIB_PTRDIFF INT
+#define _PDCLIB_ptrdiff long
+#define _PDCLIB_PTRDIFF LONG
 #define _PDCLIB_PTR_CONV
 
 /* An integer type that can be accessed as atomic entity (think asynchronous
@@ -137,8 +141,8 @@ struct _PDCLIB_lldiv_t
 #define _PDCLIB_SIG_ATOMIC INT
 
 /* Result type of the 'sizeof' operator (must be unsigned) */
-#define _PDCLIB_size unsigned int
-#define _PDCLIB_SIZE UINT
+#define _PDCLIB_size unsigned long
+#define _PDCLIB_SIZE ULONG
 
 /* Large enough an integer to hold all character codes of the largest supported
    locale.
@@ -147,8 +151,8 @@ struct _PDCLIB_lldiv_t
 #define _PDCLIB_wchar unsigned int
 #define _PDCLIB_WCHAR UINT
 
-#define _PDCLIB_intptr int
-#define _PDCLIB_INTPTR INT
+#define _PDCLIB_intptr long
+#define _PDCLIB_INTPTR LONG
 
 /* Largest supported integer type. Implementation note: see _PDCLIB_atomax(). */
 #define _PDCLIB_intmax long long int
@@ -236,6 +240,22 @@ struct _PDCLIB_imaxdiv_t
 */
 #define _PDCLIB_DECIMAL_DIG 17
 
+/* Floating point types
+ *
+ * PDCLib (at present) assumes IEEE 754 floating point formats
+ * The following names are used:
+ *    SINGLE:   IEEE 754 single precision (32-bit)
+ *    DOUBLE:   IEEE 754 double precision (64-bit)
+ *    EXTENDED: IEEE 754 extended precision (80-bit, as x87)
+ */
+#define _PDCLIB_FLOAT_TYPE   SINGLE
+#define _PDCLIB_DOUBLE_TYPE  DOUBLE
+#if defined(__i386__) || defined(__amd64__)
+  #define _PDCLIB_LDOUBLE_TYPE EXTENDED
+#else
+  #define _PDCLIB_LDOUBLE_TYPE DOUBLE
+#endif
+
 /* -------------------------------------------------------------------------- */
 /* Platform-dependent macros defined by the standard headers.                 */
 /* -------------------------------------------------------------------------- */
@@ -291,15 +311,15 @@ typedef char * _PDCLIB_va_list;
 
 /* TODO: Better document these */
 
-/* I/O ---------------------------------------------------------------------- */
+/* Locale --------------------------------------------------------------------*/
 
-/* The type of the file descriptor returned by _PDCLIB_open(). */
-typedef int _PDCLIB_fd_t;
+/* Locale method. See _PDCLIB_locale.h */
+/* #define _PDCLIB_LOCALE_METHOD _PDCLIB_LOCALE_METHOD_TSS */
 
-/* The value (of type _PDCLIB_fd_t) returned by _PDCLIB_open() if the operation
-   failed.
-*/
-#define _PDCLIB_NOHANDLE ( (_PDCLIB_fd_t) -1 )
+/* wchar_t encoding */
+#define _PDCLIB_WCHAR_ENCODING _PDCLIB_WCHAR_ENCODING_UCS4
+
+/* I/O ---------------------------------------------------------------------- */
 
 /* The default size for file buffers. Must be at least 256. */
 #define _PDCLIB_BUFSIZ 1024
index 9e69353827cf0dad6cae9d21c2e90d40a55dd68d..ea5ef4743e397546f26f24406d9e46eab83f18cc 100644 (file)
@@ -335,7 +335,9 @@ struct _PDCLIB_imaxdiv_t
 
 /* Locale --------------------------------------------------------------------*/
 
-/* Locale method. See _PDCLIB_locale.h */
+/* Locale method. See _PDCLIB_locale.h. If undefined, POSIX per-thread locales
+ * will be disabled
+ */
 #define _PDCLIB_LOCALE_METHOD _PDCLIB_LOCALE_METHOD_TSS
 
 /* wchar_t encoding */