1 /****************************************************************************** 2 * Copyright (c) 2004, 2008 IBM Corporation 3 * All rights reserved. 4 * This program and the accompanying materials 5 * are made available under the terms of the BSD License 6 * which accompanies this distribution, and is available at 7 * http://www.opensource.org/licenses/bsd-license.php 8 * 9 * Contributors: 10 * IBM Corporation - initial implementation 11 *****************************************************************************/ 12 13 #ifndef _ERRNO_H 14 #define _ERRNO_H 15 16 extern int errno; 17 18 /* 19 * Error number definitions 20 */ 21 #define EPERM 1 /* not permitted */ 22 #define ENOENT 2 /* file or directory not found */ 23 #define EIO 5 /* input/output error */ 24 #define EBADF 9 /* Bad file number */ 25 #define ENOMEM 12 /* not enough space */ 26 #define EACCES 13 /* permission denied */ 27 #define EFAULT 14 /* bad address */ 28 #define EBUSY 16 /* resource busy */ 29 #define EEXIST 17 /* file already exists */ 30 #define ENODEV 19 /* device not found */ 31 #define EINVAL 22 /* invalid argument */ 32 #define EDOM 33 /* math argument out of domain of func */ 33 #define ERANGE 34 /* math result not representable */ 34 #define ENOSYS 38 /* Function not implemented */ 35 36 #endif 37