errno.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*-------------------------------------------------------------------------
  2. errno.h: Error codes used in the math functions
  3. Copyright (C) 2001, Jesus Calvino-Fraga, jesusc@ieee.org
  4. This library is free software; you can redistribute it and/or modify it
  5. under the terms of the GNU General Public License as published by the
  6. Free Software Foundation; either version 2, or (at your option) any
  7. later version.
  8. This library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this library; see the file COPYING. If not, write to the
  14. Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
  15. MA 02110-1301, USA.
  16. As a special exception, if you link this library with other files,
  17. some of which are compiled with SDCC, to produce an executable,
  18. this library does not by itself cause the resulting executable to
  19. be covered by the GNU General Public License. This exception does
  20. not however invalidate any other reasons why the executable file
  21. might be covered by the GNU General Public License.
  22. -------------------------------------------------------------------------*/
  23. /* Version 1.0 - Initial release */
  24. #ifndef _INC_ERRNO
  25. #define _INC_ERRNO
  26. extern int errno;
  27. /* Error Codes: */
  28. #define EDOM 33 /* Math argument out of domain of functions */
  29. #define ERANGE 34 /* Math result not representable */
  30. /* Bounds-checking interfaces from annex K of the C11 standard. */
  31. #if defined (__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__
  32. #ifndef __ERRNO_T_DEFINED
  33. #define __ERRNO_T_DEFINED
  34. typedef int errno_t;
  35. #endif
  36. #endif
  37. #endif /* _INC_ERRNO */