X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=includes%2Ferrno.h;h=2795fdf6c727128b247a0c742471e23a0f228ff6;hb=393020b6e48719d27699dea6b29e53025bbd5123;hp=873166aab68a4c18d074dbd4ac2e2bdb5ae58e67;hpb=1e221deb9ee725a14b3656f94e2763f8faeb18dc;p=pdclib diff --git a/includes/errno.h b/includes/errno.h index 873166a..2795fdf 100644 --- a/includes/errno.h +++ b/includes/errno.h @@ -1,25 +1,23 @@ -// ---------------------------------------------------------------------------- -// $Id$ -// ---------------------------------------------------------------------------- -// Public Domain C Library - http://pdclib.sourceforge.net -// This code is Public Domain. Use, modify, and redistribute at will. -// ---------------------------------------------------------------------------- -// Provides 'errno', the auxiliary error handling of the standard library. -// ---------------------------------------------------------------------------- +/* $Id$ */ -#ifndef __ERRNO_H -#define __ERRNO_H __ERRNO_H +/* Errors -// ---------------------------------------------------------------------------- -// DECLARATIONS + This file is part of the Public Domain C Library (PDCLib). + Permission is granted to use, modify, and / or redistribute at will. +*/ -extern int errno; +#ifndef _PDCLIB_ERRNO_H +#define _PDCLIB_ERRNO_H _PDCLIB_ERRNO_H -// ---------------------------------------------------------------------------- -// DEFINES +#ifndef _PDCLIB_INT_H +#define _PDCLIB_INT_H _PDCLIB_INT_H +#include <_PDCLIB_int.h> +#endif -#define EDOM 1 // domain error -#define EILSEQ 2 // illegal (multibyte) sequence -#define ERANGE 3 // range error +#define errno (*_PDCLIB_errno_func()) + +#define ERANGE _PDCLIB_ERANGE +#define EDOM _PDCLIB_EDOM + +#endif -#endif // __ERRNO_H