Relicense Sortix to the ISC license.
I hereby relicense all my work on Sortix under the ISC license as below.
All Sortix contributions by other people are already under this license,
are not substantial enough to be copyrightable, or have been removed.
All imported code from other projects is compatible with this license.
All GPL licensed code from other projects had previously been removed.
Copyright 2011-2016 Jonas 'Sortie' Termansen and contributors.
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2016-03-02 17:38:16 -05:00
|
|
|
/*
|
2016-04-30 12:10:49 -04:00
|
|
|
* Copyright (c) 2011, 2012, 2013, 2014, 2015, 2016 Jonas 'Sortie' Termansen.
|
Relicense Sortix to the ISC license.
I hereby relicense all my work on Sortix under the ISC license as below.
All Sortix contributions by other people are already under this license,
are not substantial enough to be copyrightable, or have been removed.
All imported code from other projects is compatible with this license.
All GPL licensed code from other projects had previously been removed.
Copyright 2011-2016 Jonas 'Sortie' Termansen and contributors.
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2016-03-02 17:38:16 -05:00
|
|
|
*
|
|
|
|
* Permission to use, copy, modify, and distribute this software for any
|
|
|
|
* purpose with or without fee is hereby granted, provided that the above
|
|
|
|
* copyright notice and this permission notice appear in all copies.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
|
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
|
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
|
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
|
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
|
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
|
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
*
|
|
|
|
* errno.h
|
|
|
|
* System error numbers.
|
|
|
|
*/
|
2011-11-22 11:26:47 -05:00
|
|
|
|
2013-09-23 10:43:15 -04:00
|
|
|
#ifndef INCLUDE_ERRNO_H
|
|
|
|
#define INCLUDE_ERRNO_H
|
2011-11-22 11:26:47 -05:00
|
|
|
|
2013-10-13 07:04:27 -04:00
|
|
|
#include <sys/cdefs.h>
|
2011-11-22 11:26:47 -05:00
|
|
|
|
2013-09-23 10:43:15 -04:00
|
|
|
#define ENOTBLK 12
|
|
|
|
#define ENODEV 13
|
|
|
|
#define EWOULDBLOCK 14
|
|
|
|
#define EBADF 15
|
|
|
|
#define EOVERFLOW 16
|
|
|
|
#define ENOENT 17
|
|
|
|
#define ENOSPC 18
|
|
|
|
#define EEXIST 19
|
|
|
|
#define EROFS 20
|
|
|
|
#define EINVAL 21
|
|
|
|
#define ENOTDIR 22
|
|
|
|
#define ENOMEM 23
|
|
|
|
#define ERANGE 24
|
|
|
|
#define EISDIR 25
|
|
|
|
#define EPERM 26
|
|
|
|
#define EIO 27
|
|
|
|
#define ENOEXEC 28
|
|
|
|
#define EACCES 29
|
|
|
|
#define ESRCH 30
|
|
|
|
#define ENOTTY 31
|
|
|
|
#define ECHILD 32
|
|
|
|
#define ENOSYS 33
|
|
|
|
#define ENOTSUP 34
|
|
|
|
#define EBLOCKING 35
|
|
|
|
#define EINTR 36
|
|
|
|
#define ENOTEMPTY 37
|
|
|
|
#define EBUSY 38
|
|
|
|
#define EPIPE 39
|
|
|
|
#define EILSEQ 40
|
|
|
|
#define ELAKE 41
|
|
|
|
#define EMFILE 42
|
|
|
|
#define EAGAIN 43
|
|
|
|
#define EEOF 44
|
|
|
|
#define EBOUND 45
|
|
|
|
#define EINIT 46
|
|
|
|
#define ENODRV 47
|
|
|
|
#define E2BIG 48
|
|
|
|
#define EFBIG 49
|
|
|
|
#define EXDEV 50
|
|
|
|
#define ESPIPE 51
|
|
|
|
#define ENAMETOOLONG 52
|
|
|
|
#define ELOOP 53
|
|
|
|
#define EMLINK 54
|
|
|
|
#define ENXIO 55
|
|
|
|
#define EPROTONOSUPPORT 56
|
|
|
|
#define EAFNOSUPPORT 57
|
|
|
|
#define ENOTSOCK 58
|
|
|
|
#define EADDRINUSE 59
|
|
|
|
#define ETIMEDOUT 60
|
|
|
|
#define ECONNREFUSED 61
|
|
|
|
#define EDOM 62
|
|
|
|
#define EINPROGRESS 63
|
|
|
|
#define EALREADY 64
|
|
|
|
#define ESHUTDOWN 65
|
|
|
|
#define ECONNABORTED 66
|
|
|
|
#define ECONNRESET 67
|
|
|
|
#define EADDRNOTAVAIL 68
|
|
|
|
#define EISCONN 69
|
|
|
|
#define EFAULT 70
|
|
|
|
#define EDESTADDRREQ 71
|
|
|
|
#define EHOSTUNREACH 72
|
|
|
|
#define EMSGSIZE 73
|
|
|
|
#define ENETDOWN 74
|
|
|
|
#define ENETRESET 75
|
|
|
|
#define ENETUNREACH 76
|
|
|
|
#define ENOBUFS 77
|
|
|
|
#define ENOMSG 78
|
|
|
|
#define ENOPROTOOPT 79
|
|
|
|
#define ENOTCONN 80
|
|
|
|
#define EDEADLK 81
|
|
|
|
#define ENFILE 82
|
|
|
|
#define EPROTOTYPE 83
|
|
|
|
#define ENOLCK 84
|
2013-10-02 17:54:13 -04:00
|
|
|
#define ENOUSER 85
|
2013-10-02 17:55:39 -04:00
|
|
|
#define ENOGROUP 86
|
2014-01-30 09:07:27 -05:00
|
|
|
#define ESIGPENDING 87
|
2014-06-23 13:06:43 -04:00
|
|
|
#define ESTALE 88
|
2014-08-18 13:17:11 -04:00
|
|
|
#define EBADMSG 89
|
|
|
|
#define ECANCELED 90
|
|
|
|
#define EDQUOT 91
|
|
|
|
#define EIDRM 92
|
|
|
|
#define EMULTIHOP 93
|
|
|
|
#define ENOLINK 94
|
|
|
|
#define ENOTRECOVERABLE 95
|
|
|
|
#define EOWNERDEAD 96
|
|
|
|
#define EPROTO 97
|
|
|
|
#define ETXTBSY 98
|
2015-07-29 19:17:36 -04:00
|
|
|
#define ENOMOUNT 99
|
2013-09-23 10:43:15 -04:00
|
|
|
|
|
|
|
#define EOPNOTSUPP ENOTSUP
|
|
|
|
|
2016-05-02 12:19:11 -04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2016-04-30 12:10:49 -04:00
|
|
|
#if !defined(__is_sortix_libk) && !defined(__is_sortix_kernel)
|
2014-02-18 10:51:48 -05:00
|
|
|
|
|
|
|
extern __thread int errno;
|
|
|
|
#define errno errno
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
2016-05-02 12:19:11 -04:00
|
|
|
int* libk_get_errno_location(void);
|
|
|
|
#define errno (*libk_get_errno_location())
|
2011-11-22 11:26:47 -05:00
|
|
|
|
2014-02-18 10:51:48 -05:00
|
|
|
#endif
|
|
|
|
|
2016-05-02 12:19:11 -04:00
|
|
|
#if __USE_SORTIX
|
2011-11-26 05:00:45 -05:00
|
|
|
extern char* program_invocation_name;
|
2013-01-06 15:38:05 -05:00
|
|
|
extern char* program_invocation_short_name;
|
2016-05-02 12:19:11 -04:00
|
|
|
#endif
|
2013-01-12 20:55:36 -05:00
|
|
|
|
2015-05-13 12:11:02 -04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
} /* extern "C" */
|
|
|
|
#endif
|
2011-11-22 11:26:47 -05:00
|
|
|
|
|
|
|
#endif
|