X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=platform%2Fexample%2Finternals%2F_PDCLIB_config.h;h=843653a7c666374927cf8714c7a020048f3338ea;hb=56bacb39160e13397fde32a36329461f3ae56ec1;hp=0059a7f6d9b9c41975e43bbb7eef0d46f8215619;hpb=ce0e5d8cd76b50f239fb8e95170502b146247b35;p=pdclib diff --git a/platform/example/internals/_PDCLIB_config.h b/platform/example/internals/_PDCLIB_config.h index 0059a7f..843653a 100644 --- a/platform/example/internals/_PDCLIB_config.h +++ b/platform/example/internals/_PDCLIB_config.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* Internal PDCLib configuration <_PDCLIB_config.h> (Generic Template) @@ -7,6 +5,9 @@ Permission is granted to use, modify, and / or redistribute at will. */ +#ifndef _PDCLIB_CONFIG_H +#define _PDCLIB_CONFIG_H _PDCLIB_CONFIG_H + /* -------------------------------------------------------------------------- */ /* Misc */ /* -------------------------------------------------------------------------- */ @@ -32,14 +33,6 @@ /* to nothing. (This is to avoid warnings with the exit functions under GCC.) */ #define _PDCLIB_NORETURN __attribute__(( noreturn )) -/* The maximum value that errno can be set to. This is used to set the size */ -/* of the array in struct lconv () holding error messages for the */ -/* strerror() and perror() functions. (If you change this value because you */ -/* are using additional errno values, you *HAVE* to provide appropriate error */ -/* messages for *ALL* locales.) */ -/* Default is 2 (0, ERANGE, EDOM). */ -#define _PDCLIB_ERRNO_MAX 3 - /* -------------------------------------------------------------------------- */ /* Integers */ /* -------------------------------------------------------------------------- */ @@ -341,6 +334,9 @@ typedef int _PDCLIB_fd_t; an uppercase 'E', and there is no mechanics in to unmask that particular value (for exactly that reason). + There also is no error message available for this value through either the + strerror() or perror() functions. It is being reported as "unknown" error. + The idea is that you scan the source of PDCLib for occurrences of this macro and replace _PDCLIB_ERROR with whatever additional errno value you came up with for your platform. @@ -351,3 +347,12 @@ typedef int _PDCLIB_fd_t; */ #define _PDCLIB_ERROR 4 +/* The maximum value that errno can be set to. This is used to set the size */ +/* of the array in struct lconv () holding error messages for the */ +/* strerror() and perror() functions. (If you change this value because you */ +/* are using additional errno values, you *HAVE* to provide appropriate error */ +/* messages for *ALL* locales.) */ +/* Default is 4 (0, ERANGE, EDOM, EILSEQ). */ +#define _PDCLIB_ERRNO_MAX 4 + +#endif