]> pd.if.org Git - pdclib/blobdiff - internals/_PDCLIB_int.h
Addressed ticket #40 (non-standard errno values).
[pdclib] / internals / _PDCLIB_int.h
index b5003af51557e7fea2adc6e16dd69513940cf9ef..a46c2dc6c7f93014a58cb85a3949e976891ce821 100644 (file)
@@ -407,25 +407,17 @@ void _PDCLIB_closeall( void );
 /* errno                                                                      */
 /* -------------------------------------------------------------------------- */
 
+/* If PDCLib would call its error number "errno" directly, there would be no way
+   to catch its value from underlying system calls that also use it (i.e., POSIX
+   operating systems). That is why we use an internal name, providing a means to
+   access it through <errno.h>.
+*/
 extern int _PDCLIB_errno;
-int * _PDCLIB_errno_func( void );
 
-/* ERANGE and EDOM are specified by the standard. */
-#define _PDCLIB_ERANGE 1
-#define _PDCLIB_EDOM 2
-/* Used in the example implementation for any kind of I/O error. */
-#define _PDCLIB_EIO 3
-/* Used in the example implementation for "unknown error". */
-#define _PDCLIB_EUNKNOWN 4
-/* Used in the example implementation for "invalid parameter value". */
-#define _PDCLIB_EINVAL 5
-/* Used in the example implementation for "I/O retries exceeded". */
-#define _PDCLIB_ERETRY 6
-/* One larger than the largest used errno */
-#define _PDCLIB_EMAX 7
-
-/* TODO: Doing this via a static array is not the way to do it. */
-char const * _PDCLIB_errno_texts[ _PDCLIB_EMAX ];
+/* A mechanism for delayed evaluation. (Not sure if this is really necessary, so
+   no detailed documentation on the "why".)
+*/
+int * _PDCLIB_errno_func( void );
 
 /* -------------------------------------------------------------------------- */
 /* <ctype.h> lookup tables                                                    */
@@ -450,10 +442,3 @@ struct _PDCLIB_ctype_t
     unsigned char collation;
 };
 
-struct _PDCLIB_locale_t
-{
-    struct _PDCLIB_ctype_t * ctype;
-};
-
-struct _PDCLIB_locale_t _PDCLIB_locale_info;
-