1 /* @(#)errno.h 1.7 10/08/24 Copyright 2006-2010 J. Schilling */ 2 /* 3 * Error number related definitions 4 * 5 * Copyright (c) 2006-2010 J. Schilling 6 */ 7 /* 8 * The contents of this file are subject to the terms of the 9 * Common Development and Distribution License, Version 1.0 only 10 * (the "License"). You may not use this file except in compliance 11 * with the License. 12 * 13 * See the file CDDL.Schily.txt in this distribution for details. 14 * A copy of the CDDL is also available via the Internet at 15 * http://www.opensource.org/licenses/cddl1.txt 16 * 17 * When distributing Covered Code, include this CDDL HEADER in each 18 * file and include the License file CDDL.Schily.txt from this distribution. 19 */ 20 21 #ifndef _SCHILY_ERRNO_H 22 #define _SCHILY_ERRNO_H 23 24 #ifndef _SCHILY_MCONFIG_H 25 #include <schily/mconfig.h> 26 #endif 27 28 #ifdef JOS 29 #include <error.h> 30 31 #define ENOEXEC EBADHEADER 32 #define EACCES EACCESS 33 #define ENOENT ENOFILE 34 #define EEXIST EEXISTS 35 #else 36 #include <errno.h> 37 38 #define EMISSDIR ENOENT 39 #define ENDOFFILE EFBIG 40 #endif 41 42 #ifndef HAVE_ERRNO_DEF 43 extern int errno; 44 #endif 45 46 #ifndef HAVE_STRERROR 47 extern char *sys_errlist[]; 48 extern int sys_nerr; 49 #endif 50 51 #ifdef __cplusplus 52 extern "C" { 53 #endif 54 55 #ifndef seterrno 56 extern int seterrno __PR((int)); 57 #endif 58 extern int geterrno __PR((void)); 59 60 #ifdef __cplusplus 61 } 62 #endif 63 64 #endif /* _SCHILY_ERRNO_H */ 65