boot2

Playing with the boostrap
git clone https://git.ryansepassi.com/git/boot2.git
Log | Files | Refs | README

errno.h (1780B)


      1 /* -*-comment-start: "//";comment-end:""-*-
      2  * GNU Mes --- Maxwell Equations of Software
      3  * Copyright © 2017,2018,2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
      4  *
      5  * This file is part of GNU Mes.
      6  *
      7  * GNU Mes is free software; you can redistribute it and/or modify it
      8  * under the terms of the GNU General Public License as published by
      9  * the Free Software Foundation; either version 3 of the License, or (at
     10  * your option) any later version.
     11  *
     12  * GNU Mes is distributed in the hope that it will be useful, but
     13  * WITHOUT ANY WARRANTY; without even the implied warranty of
     14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15  * GNU General Public License for more details.
     16  *
     17  * You should have received a copy of the GNU General Public License
     18  * along with GNU Mes.  If not, see <http://www.gnu.org/licenses/>.
     19  */
     20 #ifndef __MES_ERRNO_H
     21 #define __MES_ERRNO_H 1
     22 
     23 #if SYSTEM_LIBC
     24 #ifndef _GNU_SOURCE
     25 #define _GNU_SOURCE
     26 #endif
     27 #undef __MES_ERRNO_H
     28 #include_next <errno.h>
     29 #else // ! SYSTEM_LIBC
     30 
     31 #ifndef __MES_ERRNO_T
     32 #define __MES_ERRNO_T 1
     33 typedef int error_t;
     34 #endif // !__MES_ERRNO_T
     35 
     36 extern int errno;
     37 #define ENOENT   2
     38 #define EINTR    4
     39 #define EIO      5
     40 #define ENXIO    6
     41 #define E2BIG    7
     42 #define ENOEXEC  8
     43 #define EBADF    9
     44 #define	ECHILD  10
     45 #define EAGAIN  11
     46 #define ENOMEM  12
     47 #define EACCES  13
     48 #define EEXIST  17
     49 #define EXDEV   18
     50 #define ENOTDIR 20
     51 #define EISDIR  21
     52 #define EINVAL  22
     53 #define EMFILE  24
     54 #define ENOSPC  28
     55 #define ESPIPE  29
     56 #define EPIPE   32
     57 #define ERANGE  34
     58 
     59 #define ENAMETOOLONG 36
     60 #define ENOSYS  38
     61 #define ELOOP   40
     62 
     63 #if !__MESC__ && ! __M2__
     64 //extern char const *const sys_errlist[];
     65 extern char *sys_errlist[];
     66 extern int sys_nerr;
     67 #endif // !__MESC__
     68 
     69 #endif // ! SYSTEM_LIBC
     70 
     71 #endif // __MES_ERRNO_H