diff options
Diffstat (limited to 'firmware/include')
-rw-r--r-- | firmware/include/_ansi.h | 56 | ||||
-rw-r--r-- | firmware/include/assert.h | 4 | ||||
-rw-r--r-- | firmware/include/ctype.h | 46 | ||||
-rw-r--r-- | firmware/include/errno.h | 216 | ||||
-rw-r--r-- | firmware/include/math.h | 30 | ||||
-rw-r--r-- | firmware/include/stdio.h | 14 | ||||
-rw-r--r-- | firmware/include/stdlib.h | 2 | ||||
-rw-r--r-- | firmware/include/string.h | 56 | ||||
-rw-r--r-- | firmware/include/time.h | 18 |
9 files changed, 221 insertions, 221 deletions
diff --git a/firmware/include/_ansi.h b/firmware/include/_ansi.h index 00028169c0..17d8e6f1a4 100644 --- a/firmware/include/_ansi.h +++ b/firmware/include/_ansi.h | |||
@@ -9,8 +9,8 @@ | |||
9 | "comment out" the non-ANSI parts of the ANSI header files (non-ANSI header | 9 | "comment out" the non-ANSI parts of the ANSI header files (non-ANSI header |
10 | files aren't affected). */ | 10 | files aren't affected). */ |
11 | 11 | ||
12 | #ifndef _ANSIDECL_H_ | 12 | #ifndef _ANSIDECL_H_ |
13 | #define _ANSIDECL_H_ | 13 | #define _ANSIDECL_H_ |
14 | 14 | ||
15 | /* First try to figure out whether we really are in an ANSI C environment. */ | 15 | /* First try to figure out whether we really are in an ANSI C environment. */ |
16 | /* FIXME: This probably needs some work. Perhaps sys/config.h can be | 16 | /* FIXME: This probably needs some work. Perhaps sys/config.h can be |
@@ -21,46 +21,46 @@ | |||
21 | #endif | 21 | #endif |
22 | 22 | ||
23 | #ifdef _HAVE_STDC | 23 | #ifdef _HAVE_STDC |
24 | #define _PTR void * | 24 | #define _PTR void * |
25 | #define _AND , | 25 | #define _AND , |
26 | #define _NOARGS void | 26 | #define _NOARGS void |
27 | #define _CONST const | 27 | #define _CONST const |
28 | #define _VOLATILE volatile | 28 | #define _VOLATILE volatile |
29 | #define _SIGNED signed | 29 | #define _SIGNED signed |
30 | #define _DOTS , ... | 30 | #define _DOTS , ... |
31 | #define _VOID void | 31 | #define _VOID void |
32 | #ifdef __CYGWIN__ | 32 | #ifdef __CYGWIN__ |
33 | #define _EXFUN(name, proto) __cdecl name proto | 33 | #define _EXFUN(name, proto) __cdecl name proto |
34 | #define _EXPARM(name, proto) (* __cdecl name) proto | 34 | #define _EXPARM(name, proto) (* __cdecl name) proto |
35 | #else | 35 | #else |
36 | #define _EXFUN(name, proto) name proto | 36 | #define _EXFUN(name, proto) name proto |
37 | #define _EXPARM(name, proto) (* name) proto | 37 | #define _EXPARM(name, proto) (* name) proto |
38 | #endif | 38 | #endif |
39 | #define _DEFUN(name, arglist, args) name(args) | 39 | #define _DEFUN(name, arglist, args) name(args) |
40 | #define _DEFUN_VOID(name) name(_NOARGS) | 40 | #define _DEFUN_VOID(name) name(_NOARGS) |
41 | #define _CAST_VOID (void) | 41 | #define _CAST_VOID (void) |
42 | #ifndef _LONG_DOUBLE | 42 | #ifndef _LONG_DOUBLE |
43 | #define _LONG_DOUBLE long double | 43 | #define _LONG_DOUBLE long double |
44 | #endif | 44 | #endif |
45 | #ifndef _PARAMS | 45 | #ifndef _PARAMS |
46 | #define _PARAMS(paramlist) paramlist | 46 | #define _PARAMS(paramlist) paramlist |
47 | #endif | 47 | #endif |
48 | #else | 48 | #else |
49 | #define _PTR char * | 49 | #define _PTR char * |
50 | #define _AND ; | 50 | #define _AND ; |
51 | #define _NOARGS | 51 | #define _NOARGS |
52 | #define _CONST | 52 | #define _CONST |
53 | #define _VOLATILE | 53 | #define _VOLATILE |
54 | #define _SIGNED | 54 | #define _SIGNED |
55 | #define _DOTS | 55 | #define _DOTS |
56 | #define _VOID void | 56 | #define _VOID void |
57 | #define _EXFUN(name, proto) name() | 57 | #define _EXFUN(name, proto) name() |
58 | #define _DEFUN(name, arglist, args) name arglist args; | 58 | #define _DEFUN(name, arglist, args) name arglist args; |
59 | #define _DEFUN_VOID(name) name() | 59 | #define _DEFUN_VOID(name) name() |
60 | #define _CAST_VOID | 60 | #define _CAST_VOID |
61 | #define _LONG_DOUBLE double | 61 | #define _LONG_DOUBLE double |
62 | #ifndef _PARAMS | 62 | #ifndef _PARAMS |
63 | #define _PARAMS(paramlist) () | 63 | #define _PARAMS(paramlist) () |
64 | #endif | 64 | #endif |
65 | #endif | 65 | #endif |
66 | 66 | ||
diff --git a/firmware/include/assert.h b/firmware/include/assert.h index ba22a9777b..2bf3aeb6c3 100644 --- a/firmware/include/assert.h +++ b/firmware/include/assert.h | |||
@@ -1,11 +1,11 @@ | |||
1 | /* | 1 | /* |
2 | assert.h | 2 | assert.h |
3 | */ | 3 | */ |
4 | 4 | ||
5 | #undef assert | 5 | #undef assert |
6 | 6 | ||
7 | #ifdef NDEBUG /* required by ANSI standard */ | 7 | #ifdef NDEBUG /* required by ANSI standard */ |
8 | #define assert(p) ((void)0) | 8 | #define assert(p) ((void)0) |
9 | #else | 9 | #else |
10 | 10 | ||
11 | #ifdef __STDC__ | 11 | #ifdef __STDC__ |
diff --git a/firmware/include/ctype.h b/firmware/include/ctype.h index 3a04e29ee0..648e06dc5c 100644 --- a/firmware/include/ctype.h +++ b/firmware/include/ctype.h | |||
@@ -27,14 +27,14 @@ int _EXFUN(_tolower, (int __c)); | |||
27 | int _EXFUN(_toupper, (int __c)); | 27 | int _EXFUN(_toupper, (int __c)); |
28 | #endif | 28 | #endif |
29 | 29 | ||
30 | #define _U 01 | 30 | #define _U 01 |
31 | #define _L 02 | 31 | #define _L 02 |
32 | #define _N 04 | 32 | #define _N 04 |
33 | #define _S 010 | 33 | #define _S 010 |
34 | #define _P 020 | 34 | #define _P 020 |
35 | #define _C 040 | 35 | #define _C 040 |
36 | #define _X 0100 | 36 | #define _X 0100 |
37 | #define _B 0200 | 37 | #define _B 0200 |
38 | 38 | ||
39 | #ifdef PLUGIN | 39 | #ifdef PLUGIN |
40 | #define _ctype_ (rb->_rbctype_) | 40 | #define _ctype_ (rb->_rbctype_) |
@@ -43,30 +43,30 @@ extern const unsigned char _ctype_[257]; | |||
43 | #endif | 43 | #endif |
44 | 44 | ||
45 | #ifndef __cplusplus | 45 | #ifndef __cplusplus |
46 | #define isalpha(c) ((_ctype_+1)[(unsigned char)(c)]&(_U|_L)) | 46 | #define isalpha(c) ((_ctype_+1)[(unsigned char)(c)]&(_U|_L)) |
47 | #define isupper(c) ((_ctype_+1)[(unsigned char)(c)]&_U) | 47 | #define isupper(c) ((_ctype_+1)[(unsigned char)(c)]&_U) |
48 | #define islower(c) ((_ctype_+1)[(unsigned char)(c)]&_L) | 48 | #define islower(c) ((_ctype_+1)[(unsigned char)(c)]&_L) |
49 | #define isdigit(c) ((_ctype_+1)[(unsigned char)(c)]&_N) | 49 | #define isdigit(c) ((_ctype_+1)[(unsigned char)(c)]&_N) |
50 | #define isxdigit(c) ((_ctype_+1)[(unsigned char)(c)]&(_X|_N)) | 50 | #define isxdigit(c) ((_ctype_+1)[(unsigned char)(c)]&(_X|_N)) |
51 | #define isspace(c) ((_ctype_+1)[(unsigned char)(c)]&_S) | 51 | #define isspace(c) ((_ctype_+1)[(unsigned char)(c)]&_S) |
52 | #define ispunct(c) ((_ctype_+1)[(unsigned char)(c)]&_P) | 52 | #define ispunct(c) ((_ctype_+1)[(unsigned char)(c)]&_P) |
53 | #define isalnum(c) ((_ctype_+1)[(unsigned char)(c)]&(_U|_L|_N)) | 53 | #define isalnum(c) ((_ctype_+1)[(unsigned char)(c)]&(_U|_L|_N)) |
54 | #define isprint(c) ((_ctype_+1)[(unsigned char)(c)]&(_P|_U|_L|_N|_B)) | 54 | #define isprint(c) ((_ctype_+1)[(unsigned char)(c)]&(_P|_U|_L|_N|_B)) |
55 | #define isgraph(c) ((_ctype_+1)[(unsigned char)(c)]&(_P|_U|_L|_N)) | 55 | #define isgraph(c) ((_ctype_+1)[(unsigned char)(c)]&(_P|_U|_L|_N)) |
56 | #define iscntrl(c) ((_ctype_+1)[(unsigned char)(c)]&_C) | 56 | #define iscntrl(c) ((_ctype_+1)[(unsigned char)(c)]&_C) |
57 | /* Non-gcc versions will get the library versions, and will be | 57 | /* Non-gcc versions will get the library versions, and will be |
58 | slightly slower */ | 58 | slightly slower */ |
59 | #ifdef __GNUC__ | 59 | #ifdef __GNUC__ |
60 | # define toupper(c) \ | 60 | # define toupper(c) \ |
61 | __extension__ ({ int __x = (unsigned char) (c); islower(__x) ? (__x - 'a' + 'A') : __x;}) | 61 | __extension__ ({ int __x = (unsigned char) (c); islower(__x) ? (__x - 'a' + 'A') : __x;}) |
62 | # define tolower(c) \ | 62 | # define tolower(c) \ |
63 | __extension__ ({ int __x = (unsigned char) (c); isupper(__x) ? (__x - 'A' + 'a') : __x;}) | 63 | __extension__ ({ int __x = (unsigned char) (c); isupper(__x) ? (__x - 'A' + 'a') : __x;}) |
64 | #endif | 64 | #endif |
65 | #endif /* !__cplusplus */ | 65 | #endif /* !__cplusplus */ |
66 | 66 | ||
67 | #ifndef __STRICT_ANSI__ | 67 | #ifndef __STRICT_ANSI__ |
68 | #define isascii(c) ((unsigned char)(c)<=0177) | 68 | #define isascii(c) ((unsigned char)(c)<=0177) |
69 | #define toascii(c) ((c)&0177) | 69 | #define toascii(c) ((c)&0177) |
70 | #endif | 70 | #endif |
71 | 71 | ||
72 | #ifdef __cplusplus | 72 | #ifdef __cplusplus |
diff --git a/firmware/include/errno.h b/firmware/include/errno.h index 3a923238fc..6a24a1938f 100644 --- a/firmware/include/errno.h +++ b/firmware/include/errno.h | |||
@@ -16,130 +16,130 @@ | |||
16 | extern int errno; | 16 | extern int errno; |
17 | #endif | 17 | #endif |
18 | 18 | ||
19 | #define EPERM 1 /* Not super-user */ | 19 | #define EPERM 1 /* Not super-user */ |
20 | #define ENOENT 2 /* No such file or directory */ | 20 | #define ENOENT 2 /* No such file or directory */ |
21 | #define ESRCH 3 /* No such process */ | 21 | #define ESRCH 3 /* No such process */ |
22 | #define EINTR 4 /* Interrupted system call */ | 22 | #define EINTR 4 /* Interrupted system call */ |
23 | #define EIO 5 /* I/O error */ | 23 | #define EIO 5 /* I/O error */ |
24 | #define ENXIO 6 /* No such device or address */ | 24 | #define ENXIO 6 /* No such device or address */ |
25 | #define E2BIG 7 /* Arg list too long */ | 25 | #define E2BIG 7 /* Arg list too long */ |
26 | #define ENOEXEC 8 /* Exec format error */ | 26 | #define ENOEXEC 8 /* Exec format error */ |
27 | #define EBADF 9 /* Bad file number */ | 27 | #define EBADF 9 /* Bad file number */ |
28 | #define ECHILD 10 /* No children */ | 28 | #define ECHILD 10 /* No children */ |
29 | #define EAGAIN 11 /* No more processes */ | 29 | #define EAGAIN 11 /* No more processes */ |
30 | #define ENOMEM 12 /* Not enough core */ | 30 | #define ENOMEM 12 /* Not enough core */ |
31 | #define EACCES 13 /* Permission denied */ | 31 | #define EACCES 13 /* Permission denied */ |
32 | #define EFAULT 14 /* Bad address */ | 32 | #define EFAULT 14 /* Bad address */ |
33 | #define ENOTBLK 15 /* Block device required */ | 33 | #define ENOTBLK 15 /* Block device required */ |
34 | #define EBUSY 16 /* Mount device busy */ | 34 | #define EBUSY 16 /* Mount device busy */ |
35 | #define EEXIST 17 /* File exists */ | 35 | #define EEXIST 17 /* File exists */ |
36 | #define EXDEV 18 /* Cross-device link */ | 36 | #define EXDEV 18 /* Cross-device link */ |
37 | #define ENODEV 19 /* No such device */ | 37 | #define ENODEV 19 /* No such device */ |
38 | #define ENOTDIR 20 /* Not a directory */ | 38 | #define ENOTDIR 20 /* Not a directory */ |
39 | #define EISDIR 21 /* Is a directory */ | 39 | #define EISDIR 21 /* Is a directory */ |
40 | #define EINVAL 22 /* Invalid argument */ | 40 | #define EINVAL 22 /* Invalid argument */ |
41 | #define ENFILE 23 /* Too many open files in system */ | 41 | #define ENFILE 23 /* Too many open files in system */ |
42 | #define EMFILE 24 /* Too many open files */ | 42 | #define EMFILE 24 /* Too many open files */ |
43 | #define ENOTTY 25 /* Not a typewriter */ | 43 | #define ENOTTY 25 /* Not a typewriter */ |
44 | #define ETXTBSY 26 /* Text file busy */ | 44 | #define ETXTBSY 26 /* Text file busy */ |
45 | #define EFBIG 27 /* File too large */ | 45 | #define EFBIG 27 /* File too large */ |
46 | #define ENOSPC 28 /* No space left on device */ | 46 | #define ENOSPC 28 /* No space left on device */ |
47 | #define ESPIPE 29 /* Illegal seek */ | 47 | #define ESPIPE 29 /* Illegal seek */ |
48 | #define EROFS 30 /* Read only file system */ | 48 | #define EROFS 30 /* Read only file system */ |
49 | #define EMLINK 31 /* Too many links */ | 49 | #define EMLINK 31 /* Too many links */ |
50 | #define EPIPE 32 /* Broken pipe */ | 50 | #define EPIPE 32 /* Broken pipe */ |
51 | #define EDOM 33 /* Math arg out of domain of func */ | 51 | #define EDOM 33 /* Math arg out of domain of func */ |
52 | #define ERANGE 34 /* Math result not representable */ | 52 | #define ERANGE 34 /* Math result not representable */ |
53 | #define ENOMSG 35 /* No message of desired type */ | 53 | #define ENOMSG 35 /* No message of desired type */ |
54 | #define EIDRM 36 /* Identifier removed */ | 54 | #define EIDRM 36 /* Identifier removed */ |
55 | #define ECHRNG 37 /* Channel number out of range */ | 55 | #define ECHRNG 37 /* Channel number out of range */ |
56 | #define EL2NSYNC 38 /* Level 2 not synchronized */ | 56 | #define EL2NSYNC 38 /* Level 2 not synchronized */ |
57 | #define EL3HLT 39 /* Level 3 halted */ | 57 | #define EL3HLT 39 /* Level 3 halted */ |
58 | #define EL3RST 40 /* Level 3 reset */ | 58 | #define EL3RST 40 /* Level 3 reset */ |
59 | #define ELNRNG 41 /* Link number out of range */ | 59 | #define ELNRNG 41 /* Link number out of range */ |
60 | #define EUNATCH 42 /* Protocol driver not attached */ | 60 | #define EUNATCH 42 /* Protocol driver not attached */ |
61 | #define ENOCSI 43 /* No CSI structure available */ | 61 | #define ENOCSI 43 /* No CSI structure available */ |
62 | #define EL2HLT 44 /* Level 2 halted */ | 62 | #define EL2HLT 44 /* Level 2 halted */ |
63 | #define EDEADLK 45 /* Deadlock condition */ | 63 | #define EDEADLK 45 /* Deadlock condition */ |
64 | #define ENOLCK 46 /* No record locks available */ | 64 | #define ENOLCK 46 /* No record locks available */ |
65 | #define EBADE 50 /* Invalid exchange */ | 65 | #define EBADE 50 /* Invalid exchange */ |
66 | #define EBADR 51 /* Invalid request descriptor */ | 66 | #define EBADR 51 /* Invalid request descriptor */ |
67 | #define EXFULL 52 /* Exchange full */ | 67 | #define EXFULL 52 /* Exchange full */ |
68 | #define ENOANO 53 /* No anode */ | 68 | #define ENOANO 53 /* No anode */ |
69 | #define EBADRQC 54 /* Invalid request code */ | 69 | #define EBADRQC 54 /* Invalid request code */ |
70 | #define EBADSLT 55 /* Invalid slot */ | 70 | #define EBADSLT 55 /* Invalid slot */ |
71 | #define EDEADLOCK 56 /* File locking deadlock error */ | 71 | #define EDEADLOCK 56 /* File locking deadlock error */ |
72 | #define EBFONT 57 /* Bad font file fmt */ | 72 | #define EBFONT 57 /* Bad font file fmt */ |
73 | #define ENOSTR 60 /* Device not a stream */ | 73 | #define ENOSTR 60 /* Device not a stream */ |
74 | #define ENODATA 61 /* No data (for no delay io) */ | 74 | #define ENODATA 61 /* No data (for no delay io) */ |
75 | #define ETIME 62 /* Timer expired */ | 75 | #define ETIME 62 /* Timer expired */ |
76 | #define ENOSR 63 /* Out of streams resources */ | 76 | #define ENOSR 63 /* Out of streams resources */ |
77 | #define ENONET 64 /* Machine is not on the network */ | 77 | #define ENONET 64 /* Machine is not on the network */ |
78 | #define ENOPKG 65 /* Package not installed */ | 78 | #define ENOPKG 65 /* Package not installed */ |
79 | #define EREMOTE 66 /* The object is remote */ | 79 | #define EREMOTE 66 /* The object is remote */ |
80 | #define ENOLINK 67 /* The link has been severed */ | 80 | #define ENOLINK 67 /* The link has been severed */ |
81 | #define EADV 68 /* Advertise error */ | 81 | #define EADV 68 /* Advertise error */ |
82 | #define ESRMNT 69 /* Srmount error */ | 82 | #define ESRMNT 69 /* Srmount error */ |
83 | #define ECOMM 70 /* Communication error on send */ | 83 | #define ECOMM 70 /* Communication error on send */ |
84 | #define EPROTO 71 /* Protocol error */ | 84 | #define EPROTO 71 /* Protocol error */ |
85 | #define EMULTIHOP 74 /* Multihop attempted */ | 85 | #define EMULTIHOP 74 /* Multihop attempted */ |
86 | #define ELBIN 75 /* Inode is remote (not really error) */ | 86 | #define ELBIN 75 /* Inode is remote (not really error) */ |
87 | #define EDOTDOT 76 /* Cross mount point (not really error) */ | 87 | #define EDOTDOT 76 /* Cross mount point (not really error) */ |
88 | #define EBADMSG 77 /* Trying to read unreadable message */ | 88 | #define EBADMSG 77 /* Trying to read unreadable message */ |
89 | #define ENOTUNIQ 80 /* Given log. name not unique */ | 89 | #define ENOTUNIQ 80 /* Given log. name not unique */ |
90 | #define EBADFD 81 /* f.d. invalid for this operation */ | 90 | #define EBADFD 81 /* f.d. invalid for this operation */ |
91 | #define EREMCHG 82 /* Remote address changed */ | 91 | #define EREMCHG 82 /* Remote address changed */ |
92 | #define ELIBACC 83 /* Can't access a needed shared lib */ | 92 | #define ELIBACC 83 /* Can't access a needed shared lib */ |
93 | #define ELIBBAD 84 /* Accessing a corrupted shared lib */ | 93 | #define ELIBBAD 84 /* Accessing a corrupted shared lib */ |
94 | #define ELIBSCN 85 /* .lib section in a.out corrupted */ | 94 | #define ELIBSCN 85 /* .lib section in a.out corrupted */ |
95 | #define ELIBMAX 86 /* Attempting to link in too many libs */ | 95 | #define ELIBMAX 86 /* Attempting to link in too many libs */ |
96 | #define ELIBEXEC 87 /* Attempting to exec a shared library */ | 96 | #define ELIBEXEC 87 /* Attempting to exec a shared library */ |
97 | #define ENOSYS 88 /* Function not implemented */ | 97 | #define ENOSYS 88 /* Function not implemented */ |
98 | #define ENMFILE 89 /* No more files */ | 98 | #define ENMFILE 89 /* No more files */ |
99 | #define ENOTEMPTY 90 /* Directory not empty */ | 99 | #define ENOTEMPTY 90 /* Directory not empty */ |
100 | #define ENAMETOOLONG 91 /* File or path name too long */ | 100 | #define ENAMETOOLONG 91 /* File or path name too long */ |
101 | #define ELOOP 92 /* Too many symbolic links */ | 101 | #define ELOOP 92 /* Too many symbolic links */ |
102 | #define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */ | 102 | #define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */ |
103 | #define EPFNOSUPPORT 96 /* Protocol family not supported */ | 103 | #define EPFNOSUPPORT 96 /* Protocol family not supported */ |
104 | #define ECONNRESET 104 /* Connection reset by peer */ | 104 | #define ECONNRESET 104 /* Connection reset by peer */ |
105 | #define ENOBUFS 105 /* No buffer space available */ | 105 | #define ENOBUFS 105 /* No buffer space available */ |
106 | #define EAFNOSUPPORT 106 /* Address family not supported by protocol family */ | 106 | #define EAFNOSUPPORT 106 /* Address family not supported by protocol family */ |
107 | #define EPROTOTYPE 107 /* Protocol wrong type for socket */ | 107 | #define EPROTOTYPE 107 /* Protocol wrong type for socket */ |
108 | #define ENOTSOCK 108 /* Socket operation on non-socket */ | 108 | #define ENOTSOCK 108 /* Socket operation on non-socket */ |
109 | #define ENOPROTOOPT 109 /* Protocol not available */ | 109 | #define ENOPROTOOPT 109 /* Protocol not available */ |
110 | #define ESHUTDOWN 110 /* Can't send after socket shutdown */ | 110 | #define ESHUTDOWN 110 /* Can't send after socket shutdown */ |
111 | #define ECONNREFUSED 111 /* Connection refused */ | 111 | #define ECONNREFUSED 111 /* Connection refused */ |
112 | #define EADDRINUSE 112 /* Address already in use */ | 112 | #define EADDRINUSE 112 /* Address already in use */ |
113 | #define ECONNABORTED 113 /* Connection aborted */ | 113 | #define ECONNABORTED 113 /* Connection aborted */ |
114 | #define ENETUNREACH 114 /* Network is unreachable */ | 114 | #define ENETUNREACH 114 /* Network is unreachable */ |
115 | #define ENETDOWN 115 /* Network interface is not configured */ | 115 | #define ENETDOWN 115 /* Network interface is not configured */ |
116 | #define ETIMEDOUT 116 /* Connection timed out */ | 116 | #define ETIMEDOUT 116 /* Connection timed out */ |
117 | #define EHOSTDOWN 117 /* Host is down */ | 117 | #define EHOSTDOWN 117 /* Host is down */ |
118 | #define EHOSTUNREACH 118 /* Host is unreachable */ | 118 | #define EHOSTUNREACH 118 /* Host is unreachable */ |
119 | #define EINPROGRESS 119 /* Connection already in progress */ | 119 | #define EINPROGRESS 119 /* Connection already in progress */ |
120 | #define EALREADY 120 /* Socket already connected */ | 120 | #define EALREADY 120 /* Socket already connected */ |
121 | #define EDESTADDRREQ 121 /* Destination address required */ | 121 | #define EDESTADDRREQ 121 /* Destination address required */ |
122 | #define EMSGSIZE 122 /* Message too long */ | 122 | #define EMSGSIZE 122 /* Message too long */ |
123 | #define EPROTONOSUPPORT 123 /* Unknown protocol */ | 123 | #define EPROTONOSUPPORT 123 /* Unknown protocol */ |
124 | #define ESOCKTNOSUPPORT 124 /* Socket type not supported */ | 124 | #define ESOCKTNOSUPPORT 124 /* Socket type not supported */ |
125 | #define EADDRNOTAVAIL 125 /* Address not available */ | 125 | #define EADDRNOTAVAIL 125 /* Address not available */ |
126 | #define ENETRESET 126 | 126 | #define ENETRESET 126 |
127 | #define EISCONN 127 /* Socket is already connected */ | 127 | #define EISCONN 127 /* Socket is already connected */ |
128 | #define ENOTCONN 128 /* Socket is not connected */ | 128 | #define ENOTCONN 128 /* Socket is not connected */ |
129 | #define ETOOMANYREFS 129 | 129 | #define ETOOMANYREFS 129 |
130 | #define EPROCLIM 130 | 130 | #define EPROCLIM 130 |
131 | #define EUSERS 131 | 131 | #define EUSERS 131 |
132 | #define EDQUOT 132 | 132 | #define EDQUOT 132 |
133 | #define ESTALE 133 | 133 | #define ESTALE 133 |
134 | #define ENOTSUP 134 /* Not supported */ | 134 | #define ENOTSUP 134 /* Not supported */ |
135 | #define ENOMEDIUM 135 /* No medium (in tape drive) */ | 135 | #define ENOMEDIUM 135 /* No medium (in tape drive) */ |
136 | #define ENOSHARE 136 /* No such host or network path */ | 136 | #define ENOSHARE 136 /* No such host or network path */ |
137 | #define ECASECLASH 137 /* Filename exists with different case */ | 137 | #define ECASECLASH 137 /* Filename exists with different case */ |
138 | 138 | ||
139 | /* From cygwin32. */ | 139 | /* From cygwin32. */ |
140 | #define EWOULDBLOCK EAGAIN /* Operation would block */ | 140 | #define EWOULDBLOCK EAGAIN /* Operation would block */ |
141 | 141 | ||
142 | #define __ELASTERROR 2000 /* Users can add values starting here */ | 142 | #define __ELASTERROR 2000 /* Users can add values starting here */ |
143 | 143 | ||
144 | #endif /* _SYS_ERRNO_H */ | 144 | #endif /* _SYS_ERRNO_H */ |
145 | #endif /* !SIMULATOR */ | 145 | #endif /* !SIMULATOR */ |
diff --git a/firmware/include/math.h b/firmware/include/math.h index d4b6715b3b..5415e43f86 100644 --- a/firmware/include/math.h +++ b/firmware/include/math.h | |||
@@ -23,25 +23,25 @@ extern "C" { | |||
23 | 23 | ||
24 | /* Useful constants. */ | 24 | /* Useful constants. */ |
25 | 25 | ||
26 | #define M_E 2.7182818284590452354 | 26 | #define M_E 2.7182818284590452354 |
27 | #define M_LOG2E 1.4426950408889634074 | 27 | #define M_LOG2E 1.4426950408889634074 |
28 | #define M_LOG10E 0.43429448190325182765 | 28 | #define M_LOG10E 0.43429448190325182765 |
29 | #define M_LN2 0.69314718055994530942 | 29 | #define M_LN2 0.69314718055994530942 |
30 | #define M_LN10 2.30258509299404568402 | 30 | #define M_LN10 2.30258509299404568402 |
31 | #define M_PI 3.14159265358979323846 | 31 | #define M_PI 3.14159265358979323846 |
32 | #define M_TWOPI (M_PI * 2.0) | 32 | #define M_TWOPI (M_PI * 2.0) |
33 | #define M_PI_2 1.57079632679489661923 | 33 | #define M_PI_2 1.57079632679489661923 |
34 | #define M_PI_4 0.78539816339744830962 | 34 | #define M_PI_4 0.78539816339744830962 |
35 | #define M_3PI_4 2.3561944901923448370E0 | 35 | #define M_3PI_4 2.3561944901923448370E0 |
36 | #define M_SQRTPI 1.77245385090551602792981 | 36 | #define M_SQRTPI 1.77245385090551602792981 |
37 | #define M_1_PI 0.31830988618379067154 | 37 | #define M_1_PI 0.31830988618379067154 |
38 | #define M_2_PI 0.63661977236758134308 | 38 | #define M_2_PI 0.63661977236758134308 |
39 | #define M_2_SQRTPI 1.12837916709551257390 | 39 | #define M_2_SQRTPI 1.12837916709551257390 |
40 | #define M_SQRT2 1.41421356237309504880 | 40 | #define M_SQRT2 1.41421356237309504880 |
41 | #define M_SQRT1_2 0.70710678118654752440 | 41 | #define M_SQRT1_2 0.70710678118654752440 |
42 | #define M_LN2LO 1.9082149292705877000E-10 | 42 | #define M_LN2LO 1.9082149292705877000E-10 |
43 | #define M_LN2HI 6.9314718036912381649E-1 | 43 | #define M_LN2HI 6.9314718036912381649E-1 |
44 | #define M_SQRT3 1.73205080756887719000 | 44 | #define M_SQRT3 1.73205080756887719000 |
45 | #define M_IVLN10 0.43429448190325182765 /* 1 / log(10) */ | 45 | #define M_IVLN10 0.43429448190325182765 /* 1 / log(10) */ |
46 | #define M_LOG2_E 0.693147180559945309417 | 46 | #define M_LOG2_E 0.693147180559945309417 |
47 | #define M_INVLN2 1.4426950408889633870E0 /* 1 / log(2) */ | 47 | #define M_INVLN2 1.4426950408889633870E0 /* 1 / log(2) */ |
diff --git a/firmware/include/stdio.h b/firmware/include/stdio.h index 968bd59aab..6ae2ff603a 100644 --- a/firmware/include/stdio.h +++ b/firmware/include/stdio.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _STDIO_H_ | 1 | #ifndef _STDIO_H_ |
2 | #define _STDIO_H_ | 2 | #define _STDIO_H_ |
3 | 3 | ||
4 | #include <_ansi.h> | 4 | #include <_ansi.h> |
5 | 5 | ||
@@ -10,22 +10,22 @@ | |||
10 | #include <stdarg.h> | 10 | #include <stdarg.h> |
11 | 11 | ||
12 | #ifndef NULL | 12 | #ifndef NULL |
13 | #define NULL 0 | 13 | #define NULL 0 |
14 | #endif | 14 | #endif |
15 | 15 | ||
16 | #define EOF (-1) | 16 | #define EOF (-1) |
17 | 17 | ||
18 | #ifndef SEEK_SET | 18 | #ifndef SEEK_SET |
19 | #define SEEK_SET 0 /* set file offset to offset */ | 19 | #define SEEK_SET 0 /* set file offset to offset */ |
20 | #endif | 20 | #endif |
21 | #ifndef SEEK_CUR | 21 | #ifndef SEEK_CUR |
22 | #define SEEK_CUR 1 /* set file offset to current plus offset */ | 22 | #define SEEK_CUR 1 /* set file offset to current plus offset */ |
23 | #endif | 23 | #endif |
24 | #ifndef SEEK_END | 24 | #ifndef SEEK_END |
25 | #define SEEK_END 2 /* set file offset to EOF plus offset */ | 25 | #define SEEK_END 2 /* set file offset to EOF plus offset */ |
26 | #endif | 26 | #endif |
27 | 27 | ||
28 | #define TMP_MAX 26 | 28 | #define TMP_MAX 26 |
29 | 29 | ||
30 | #ifdef __GNUC__ | 30 | #ifdef __GNUC__ |
31 | #define __VALIST __gnuc_va_list | 31 | #define __VALIST __gnuc_va_list |
diff --git a/firmware/include/stdlib.h b/firmware/include/stdlib.h index a287889c6a..6de00c816d 100644 --- a/firmware/include/stdlib.h +++ b/firmware/include/stdlib.h | |||
@@ -23,7 +23,7 @@ extern "C" { | |||
23 | #define EXIT_FAILURE 1 | 23 | #define EXIT_FAILURE 1 |
24 | #define EXIT_SUCCESS 0 | 24 | #define EXIT_SUCCESS 0 |
25 | 25 | ||
26 | _VOID _EXFUN(qsort,(_PTR __base, size_t __nmemb, size_t __size, int(*_compar)(const _PTR, const _PTR))); | 26 | _VOID _EXFUN(qsort,(_PTR __base, size_t __nmemb, size_t __size, int(*_compar)(const _PTR, const _PTR))); |
27 | 27 | ||
28 | void *malloc(size_t); | 28 | void *malloc(size_t); |
29 | void *calloc (size_t nmemb, size_t size); | 29 | void *calloc (size_t nmemb, size_t size); |
diff --git a/firmware/include/string.h b/firmware/include/string.h index c647178ffe..1a2e056717 100644 --- a/firmware/include/string.h +++ b/firmware/include/string.h | |||
@@ -5,7 +5,7 @@ | |||
5 | */ | 5 | */ |
6 | 6 | ||
7 | #ifndef _STRING_H_ | 7 | #ifndef _STRING_H_ |
8 | #define _STRING_H_ | 8 | #define _STRING_H_ |
9 | 9 | ||
10 | #ifdef __cplusplus | 10 | #ifdef __cplusplus |
11 | extern "C" { | 11 | extern "C" { |
@@ -20,45 +20,45 @@ extern "C" { | |||
20 | #define NULL ((void*)0) | 20 | #define NULL ((void*)0) |
21 | #endif | 21 | #endif |
22 | 22 | ||
23 | _PTR _EXFUN(memchr,(const _PTR, int, size_t)); | 23 | _PTR _EXFUN(memchr,(const _PTR, int, size_t)); |
24 | int _EXFUN(memcmp,(const _PTR, const _PTR, size_t)); | 24 | int _EXFUN(memcmp,(const _PTR, const _PTR, size_t)); |
25 | _PTR _EXFUN(memcpy,(_PTR, const _PTR, size_t)); | 25 | _PTR _EXFUN(memcpy,(_PTR, const _PTR, size_t)); |
26 | _PTR _EXFUN(memmove,(_PTR, const _PTR, size_t)); | 26 | _PTR _EXFUN(memmove,(_PTR, const _PTR, size_t)); |
27 | _PTR _EXFUN(memset,(_PTR, int, size_t)); | 27 | _PTR _EXFUN(memset,(_PTR, int, size_t)); |
28 | char *_EXFUN(strcat,(char *, const char *)); | 28 | char *_EXFUN(strcat,(char *, const char *)); |
29 | char *_EXFUN(strchr,(const char *, int)); | 29 | char *_EXFUN(strchr,(const char *, int)); |
30 | int _EXFUN(strcmp,(const char *, const char *)); | 30 | int _EXFUN(strcmp,(const char *, const char *)); |
31 | int _EXFUN(strcoll,(const char *, const char *)); | 31 | int _EXFUN(strcoll,(const char *, const char *)); |
32 | char *_EXFUN(strcpy,(char *, const char *)); | 32 | char *_EXFUN(strcpy,(char *, const char *)); |
33 | size_t _EXFUN(strcspn,(const char *, const char *)); | 33 | size_t _EXFUN(strcspn,(const char *, const char *)); |
34 | char *_EXFUN(strerror,(int)); | 34 | char *_EXFUN(strerror,(int)); |
35 | size_t _EXFUN(strlen,(const char *)); | 35 | size_t _EXFUN(strlen,(const char *)); |
36 | char *_EXFUN(strncat,(char *, const char *, size_t)); | 36 | char *_EXFUN(strncat,(char *, const char *, size_t)); |
37 | int _EXFUN(strncmp,(const char *, const char *, size_t)); | 37 | int _EXFUN(strncmp,(const char *, const char *, size_t)); |
38 | char *_EXFUN(strpbrk,(const char *, const char *)); | 38 | char *_EXFUN(strpbrk,(const char *, const char *)); |
39 | char *_EXFUN(strrchr,(const char *, int)); | 39 | char *_EXFUN(strrchr,(const char *, int)); |
40 | size_t _EXFUN(strspn,(const char *, const char *)); | 40 | size_t _EXFUN(strspn,(const char *, const char *)); |
41 | char *_EXFUN(strstr,(const char *, const char *)); | 41 | char *_EXFUN(strstr,(const char *, const char *)); |
42 | char *_EXFUN(strcasestr,(const char *, const char *)); | 42 | char *_EXFUN(strcasestr,(const char *, const char *)); |
43 | 43 | ||
44 | size_t strlcpy(char *dst, const char *src, size_t siz); | 44 | size_t strlcpy(char *dst, const char *src, size_t siz); |
45 | size_t strlcat(char *dst, const char *src, size_t siz); | 45 | size_t strlcat(char *dst, const char *src, size_t siz); |
46 | 46 | ||
47 | #ifndef _REENT_ONLY | 47 | #ifndef _REENT_ONLY |
48 | char *_EXFUN(strtok,(char *, const char *)); | 48 | char *_EXFUN(strtok,(char *, const char *)); |
49 | #endif | 49 | #endif |
50 | 50 | ||
51 | size_t _EXFUN(strxfrm,(char *, const char *, size_t)); | 51 | size_t _EXFUN(strxfrm,(char *, const char *, size_t)); |
52 | 52 | ||
53 | #ifndef __STRICT_ANSI__ | 53 | #ifndef __STRICT_ANSI__ |
54 | char *_EXFUN(strtok_r,(char *, const char *, char **)); | 54 | char *_EXFUN(strtok_r,(char *, const char *, char **)); |
55 | 55 | ||
56 | _PTR _EXFUN(memccpy,(_PTR, const _PTR, int, size_t)); | 56 | _PTR _EXFUN(memccpy,(_PTR, const _PTR, int, size_t)); |
57 | int _EXFUN(strcasecmp,(const char *, const char *)); | 57 | int _EXFUN(strcasecmp,(const char *, const char *)); |
58 | int _EXFUN(strncasecmp,(const char *, const char *, size_t)); | 58 | int _EXFUN(strncasecmp,(const char *, const char *, size_t)); |
59 | 59 | ||
60 | #ifdef __CYGWIN__ | 60 | #ifdef __CYGWIN__ |
61 | #ifndef DEFS_H /* Kludge to work around problem compiling in gdb */ | 61 | #ifndef DEFS_H /* Kludge to work around problem compiling in gdb */ |
62 | const char *_EXFUN(strsignal, (int __signo)); | 62 | const char *_EXFUN(strsignal, (int __signo)); |
63 | #endif | 63 | #endif |
64 | int _EXFUN(strtosigno, (const char *__name)); | 64 | int _EXFUN(strtosigno, (const char *__name)); |
diff --git a/firmware/include/time.h b/firmware/include/time.h index 9010d99cc2..28680494f9 100644 --- a/firmware/include/time.h +++ b/firmware/include/time.h | |||
@@ -14,15 +14,15 @@ | |||
14 | 14 | ||
15 | struct tm | 15 | struct tm |
16 | { | 16 | { |
17 | int tm_sec; | 17 | int tm_sec; |
18 | int tm_min; | 18 | int tm_min; |
19 | int tm_hour; | 19 | int tm_hour; |
20 | int tm_mday; | 20 | int tm_mday; |
21 | int tm_mon; | 21 | int tm_mon; |
22 | int tm_year; | 22 | int tm_year; |
23 | int tm_wday; | 23 | int tm_wday; |
24 | int tm_yday; | 24 | int tm_yday; |
25 | int tm_isdst; | 25 | int tm_isdst; |
26 | }; | 26 | }; |
27 | 27 | ||
28 | #if !defined(_TIME_T_DEFINED) && !defined(_TIME_T_DECLARED) | 28 | #if !defined(_TIME_T_DEFINED) && !defined(_TIME_T_DECLARED) |