]> pd.if.org Git - pdclib.old/blobdiff - functions/stdio/perror.c
[gandr] s/__lp64__/__LP64__/ to match GCC define
[pdclib.old] / functions / stdio / perror.c
index 23ce68bd356cc11e997dcdabf4873b32156b2204..9fe694825a632fbaedab7e7d11915ac8aa157654 100644 (file)
@@ -9,9 +9,8 @@
 #include <stdio.h>
 
 #ifndef REGTEST
-
 #include <errno.h>
-#include <locale.h>
+#include <_PDCLIB_locale.h>
 
 /* TODO: Doing this via a static array is not the way to do it. */
 void perror( const char * s )
@@ -26,7 +25,7 @@ void perror( const char * s )
     }
     else
     {
-        fprintf( stderr, "%s\n", _PDCLIB_lconv._PDCLIB_errno_texts[errno] );
+        fprintf( stderr, "%s\n", _PDCLIB_threadlocale()->_ErrnoStr[errno] );
     }
     return;
 }