Remove unnecessary headers

This commit is contained in:
Michal Sieron 2021-07-28 12:04:43 +02:00
parent 10927691c5
commit 8a38a79967
15 changed files with 0 additions and 998 deletions

View file

@ -1,6 +0,0 @@
#ifndef __ASSERT_H
#define __ASSERT_H
#define assert(x)
#endif /* __ASSERT_H */

View file

@ -1,30 +0,0 @@
#ifndef __ENDIAN_H
#define __ENDIAN_H
#ifdef __cplusplus
extern "C" {
#endif
#define __LITTLE_ENDIAN 0
#define __BIG_ENDIAN 1
#define __BYTE_ORDER __BIG_ENDIAN
static inline unsigned int le32toh(unsigned int val)
{
return (val & 0xff) << 24 |
(val & 0xff00) << 8 |
(val & 0xff0000) >> 8 |
(val & 0xff000000) >> 24;
}
static inline unsigned short le16toh(unsigned short val)
{
return (val & 0xff) << 8 |
(val & 0xff00) >> 8;
}
#ifdef __cplusplus
}
#endif
#endif /* __ENDIAN_H */

View file

@ -1,261 +0,0 @@
#ifndef __ERRNO_H
#define __ERRNO_H
#ifdef __cplusplus
extern "C" {
#endif
extern int errno;
#define EPERM 1
#define EPERM_STR "Operation not permitted"
#define ENOENT 2
#define ENOENT_STR "No such file or directory"
#define ESRCH 3
#define ESRCH_STR "No such process"
#define EINTR 4
#define EINTR_STR "Interrupted system call"
#define EIO 5
#define EIO_STR "I/O error"
#define ENXIO 6
#define ENXIO_STR "No such device or address"
#define E2BIG 7
#define E2BIG_STR "Arg list too long"
#define ENOEXEC 8
#define ENOEXEC_STR "Exec format error"
#define EBADF 9
#define EBADF_STR "Bad file number"
#define ECHILD 10
#define ECHILD_STR "No child processes"
#define EAGAIN 11
#define EWOULDBLOCK EAGAIN
#define EAGAIN_STR "Try again"
#define ENOMEM 12
#define ENOMEM_STR "Out of memory"
#define EACCES 13
#define EACCES_STR "Permission denied"
#define EFAULT 14
#define EFAULT_STR "Bad address"
#define ENOTBLK 15
#define ENOTBLK_STR "Block device required"
#define EBUSY 16
#define EBUSY_STR "Device or resource busy"
#define EEXIST 17
#define EEXIST_STR "File exists"
#define EXDEV 18
#define EXDEV_STR "Cross-device link"
#define ENODEV 19
#define ENODEV_STR "No such device"
#define ENOTDIR 20
#define ENOTDIR_STR "Not a directory"
#define EISDIR 21
#define EISDIR_STR "Is a directory"
#define EINVAL 22
#define EINVAL_STR "Invalid argument"
#define ENFILE 23
#define ENFILE_STR "File table overflow"
#define EMFILE 24
#define EMFILE_STR "Too many open files"
#define ENOTTY 25
#define ENOTTY_STR "Not a typewriter"
#define ETXTBSY 26
#define ETXTBSY_STR "Text file busy"
#define EFBIG 27
#define EFBIG_STR "File too large"
#define ENOSPC 28
#define ENOSPC_STR "No space left on device"
#define ESPIPE 29
#define ESPIPE_STR "Illegal seek"
#define EROFS 30
#define EROFS_STR "Read-only file system"
#define EMLINK 31
#define EMLINK_STR "Too many links"
#define EPIPE 32
#define EPIPE_STR "Broken pipe"
#define EDOM 33
#define EDOM_STR "Math argument out of domain of func"
#define ERANGE 34
#define ERANGE_STR "Math result not representable"
#define EDEADLK 35
#define EDEADLOCK EDEADLK
#define EDEADLK_STR "Resource deadlock would occur"
#define ENAMETOOLONG 36
#define ENAMETOOLONG_STR "File name too long"
#define ENOLCK 37
#define ENOLCK_STR "No record locks available"
#define ENOSYS 38
#define ENOSYS_STR "Function not implemented"
#define ENOTEMPTY 39
#define ENOTEMPTY_STR "Directory not empty"
#define ELOOP 40
#define ELOOP_STR "Too many symbolic links encountered"
#define ENOMSG 42
#define ENOMSG_STR "No message of desired type"
#define EIDRM 43
#define EIDRM_STR "Identifier removed"
#define ECHRNG 44
#define ECHRNG_STR "Channel number out of range"
#define EL2NSYNC 45
#define EL2NSYNC_STR "Level 2 not synchronized"
#define EL3HLT 46
#define EL3HLT_STR "Level 3 halted"
#define EL3RST 47
#define EL3RST_STR "Level 3 reset"
#define ELNRNG 48
#define ELNRNG_STR "Link number out of range"
#define EUNATCH 49
#define EUNATCH_STR "Protocol driver not attached"
#define ENOCSI 50
#define ENOCSI_STR "No CSI structure available"
#define EL2HLT 51
#define EL2HLT_STR "Level 2 halted"
#define EBADE 52
#define EBADE_STR "Invalid exchange"
#define EBADR 53
#define EBADR_STR "Invalid request descriptor"
#define EXFULL 54
#define EXFULL_STR "Exchange full"
#define ENOANO 55
#define ENOANO_STR "No anode"
#define EBADRQC 56
#define EBADRQC_STR "Invalid request code"
#define EBADSLT 57
#define EBADSLT_STR "Invalid slot"
#define EBFONT 59
#define EBFONT_STR "Bad font file format"
#define ENOSTR 60
#define ENOSTR_STR "Device not a stream"
#define ENODATA 61
#define ENODATA_STR "No data available"
#define ETIME 62
#define ETIME_STR "Timer expired"
#define ENOSR 63
#define ENOSR_STR "Out of streams resources"
#define ENONET 64
#define ENONET_STR "Machine is not on the network"
#define ENOPKG 65
#define ENOPKG_STR "Package not installed"
#define EREMOTE 66
#define EREMOTE_STR "Object is remote"
#define ENOLINK 67
#define ENOLINK_STR "Link has been severed"
#define EADV 68
#define EADV_STR "Advertise error"
#define ESRMNT 69
#define ESRMNT_STR "Srmount error"
#define ECOMM 70
#define ECOMM_STR "Communication error on send"
#define EPROTO 71
#define EPROTO_STR "Protocol error"
#define EMULTIHOP 72
#define EMULTIHOP_STR "Multihop attempted"
#define EDOTDOT 73
#define EDOTDOT_STR "RFS specific error"
#define EBADMSG 74
#define EBADMSG_STR "Not a data message"
#define EOVERFLOW 75
#define EOVERFLOW_STR "Value too large for defined data type"
#define ENOTUNIQ 76
#define ENOTUNIQ_STR "Name not unique on network"
#define EBADFD 77
#define EBADFD_STR "File descriptor in bad state"
#define EREMCHG 78
#define EREMCHG_STR "Remote address changed"
#define ELIBACC 79
#define ELIBACC_STR "Can not access a needed shared library"
#define ELIBBAD 80
#define ELIBBAD_STR "Accessing a corrupted shared library"
#define ELIBSCN 81
#define ELIBSCN_STR ".lib section in a.out corrupted"
#define ELIBMAX 82
#define ELIBMAX_STR "Attempting to link in too many shared libraries"
#define ELIBEXEC 83
#define ELIBEXEC_STR "Cannot exec a shared library directly"
#define EILSEQ 84
#define EILSEQ_STR "Illegal byte sequence"
#define ERESTART 85
#define ERESTART_STR "Interrupted system call should be restarted"
#define ESTRPIPE 86
#define ESTRPIPE_STR "Streams pipe error"
#define EUSERS 87
#define EUSERS_STR "Too many users"
#define ENOTSOCK 88
#define ENOTSOCK_STR "Socket operation on non-socket"
#define EDESTADDRREQ 89
#define EDESTADDRREQ_STR "Destination address required"
#define EMSGSIZE 90
#define EMSGSIZE_STR "Message too long"
#define EPROTOTYPE 91
#define EPROTOTYPE_STR "Protocol wrong type for socket"
#define ENOPROTOOPT 92
#define ENOPROTOOPT_STR "Protocol not available"
#define EPROTONOSUPPORT 93
#define EPROTONOSUPPORT_STR "Protocol not supported"
#define ESOCKTNOSUPPORT 94
#define ESOCKTNOSUPPORT_STR "Socket type not supported"
#define EOPNOTSUPP 95
#define EOPNOTSUPP_STR "Operation not supported on transport endpoint"
#define EPFNOSUPPORT 96
#define EPFNOSUPPORT_STR "Protocol family not supported"
#define EAFNOSUPPORT 97
#define EAFNOSUPPORT_STR "Address family not supported by protocol"
#define EADDRINUSE 98
#define EADDRINUSE_STR "Address already in use"
#define EADDRNOTAVAIL 99
#define EADDRNOTAVAIL_STR "Cannot assign requested address"
#define ENETDOWN 100
#define ENETDOWN_STR "Network is down"
#define ENETUNREACH 101
#define ENETUNREACH_STR "Network is unreachable"
#define ENETRESET 102
#define ENETRESET_STR "Network dropped connection because of reset"
#define ECONNABORTED 103
#define ECONNABORTED_STR "Software caused connection abort"
#define ECONNRESET 104
#define ECONNRESET_STR "Connection reset by peer"
#define ENOBUFS 105
#define ENOBUFS_STR "No buffer space available"
#define EISCONN 106
#define EISCONN_STR "Transport endpoint is already connected"
#define ENOTCONN 107
#define ENOTCONN_STR "Transport endpoint is not connected"
#define ESHUTDOWN 108
#define ESHUTDOWN_STR "Cannot send after transport endpoint shutdown"
#define ETOOMANYREFS 109
#define ETOOMANYREFS_STR "Too many references: cannot splice"
#define ETIMEDOUT 110
#define ETIMEDOUT_STR "Connection timed out"
#define ECONNREFUSED 111
#define ECONNREFUSED_STR "Connection refused"
#define EHOSTDOWN 112
#define EHOSTDOWN_STR "Host is down"
#define EHOSTUNREACH 113
#define EHOSTUNREACH_STR "No route to host"
#define EALREADY 114
#define EALREADY_STR "Operation already in progress"
#define EINPROGRESS 115
#define EINPROGRESS_STR "Operation now in progress"
#define ESTALE 116
#define ESTALE_STR "Stale NFS file handle"
#define EUCLEAN 117
#define EUCLEAN_STR "Structure needs cleaning"
#define ENOTNAM 118
#define ENOTNAM_STR "Not a XENIX named type file"
#define ENAVAIL 119
#define ENAVAIL_STR "No XENIX semaphores available"
#define EISNAM 120
#define EISNAM_STR "Is a named type file"
#define EREMOTEIO 121
#define EREMOTEIO_STR "Remote I/O error"
#define EDQUOT 122
#define EDQUOT_STR "Quota exceeded"
#define ENOMEDIUM 123
#define ENOMEDIUM_STR "No medium found"
#define EMEDIUMTYPE 124
#define EMEDIUMTYPE_STR "Wrong medium type"
#ifdef __cplusplus
}
#endif
#endif /* __ERRNO_H */

View file

@ -1,58 +0,0 @@
#ifndef __FLOAT_H
#define __FLOAT_H
#ifdef __cplusplus
extern "C" {
#endif
#define FLT_EVAL_METHOD __FLT_EVAL_METHOD__
#define FLT_ROUNDS (__builtin_flt_rounds())
#define FLT_RADIX __FLT_RADIX__
#define FLT_MANT_DIG __FLT_MANT_DIG__
#define DBL_MANT_DIG __DBL_MANT_DIG__
#define LDBL_MANT_DIG __LDBL_MANT_DIG__
#define DECIMAL_DIG __DECIMAL_DIG__
#define FLT_DIG __FLT_DIG__
#define DBL_DIG __DBL_DIG__
#define LDBL_DIG __LDBL_DIG__
#define FLT_MIN_EXP __FLT_MIN_EXP__
#define DBL_MIN_EXP __DBL_MIN_EXP__
#define LDBL_MIN_EXP __LDBL_MIN_EXP__
#define FLT_MIN_10_EXP __FLT_MIN_10_EXP__
#define DBL_MIN_10_EXP __DBL_MIN_10_EXP__
#define LDBL_MIN_10_EXP __LDBL_MIN_10_EXP__
#define FLT_MAX_EXP __FLT_MAX_EXP__
#define DBL_MAX_EXP __DBL_MAX_EXP__
#define LDBL_MAX_EXP __LDBL_MAX_EXP__
#define FLT_MAX_10_EXP __FLT_MAX_10_EXP__
#define DBL_MAX_10_EXP __DBL_MAX_10_EXP__
#define LDBL_MAX_10_EXP __LDBL_MAX_10_EXP__
#define FLT_MAX __FLT_MAX__
#define DBL_MAX __DBL_MAX__
#define LDBL_MAX __LDBL_MAX__
#define FLT_EPSILON __FLT_EPSILON__
#define DBL_EPSILON __DBL_EPSILON__
#define LDBL_EPSILON __LDBL_EPSILON__
#define FLT_MIN __FLT_MIN__
#define DBL_MIN __DBL_MIN__
#define LDBL_MIN __LDBL_MIN__
#define FLT_TRUE_MIN __FLT_DENORM_MIN__
#define DBL_TRUE_MIN __DBL_DENORM_MIN__
#define LDBL_TRUE_MIN __LDBL_DENORM_MIN__
#ifdef __cplusplus
}
#endif
#endif /* __FLOAT_H */

View file

@ -1,231 +0,0 @@
/* Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
/*
* ISO C99: 7.8 Format conversion of integer types <inttypes.h>
*/
#ifndef __INTTYPES_H
#define __INTTYPES_H
#include <stdint.h>
# ifdef __LP64__
# define __PRI64_PREFIX "l"
# define __PRIPTR_PREFIX "l"
# else
# define __PRI64_PREFIX "ll"
# define __PRIPTR_PREFIX
# endif
/* Macros for printing format specifiers. */
/* Decimal notation. */
# define PRId8 "d"
# define PRId16 "d"
# define PRId32 "d"
# define PRId64 __PRI64_PREFIX "d"
# define PRIdLEAST8 "d"
# define PRIdLEAST16 "d"
# define PRIdLEAST32 "d"
# define PRIdLEAST64 __PRI64_PREFIX "d"
# define PRIdFAST8 "d"
# define PRIdFAST16 __PRIPTR_PREFIX "d"
# define PRIdFAST32 __PRIPTR_PREFIX "d"
# define PRIdFAST64 __PRI64_PREFIX "d"
# define PRIi8 "i"
# define PRIi16 "i"
# define PRIi32 "i"
# define PRIi64 __PRI64_PREFIX "i"
# define PRIiLEAST8 "i"
# define PRIiLEAST16 "i"
# define PRIiLEAST32 "i"
# define PRIiLEAST64 __PRI64_PREFIX "i"
# define PRIiFAST8 "i"
# define PRIiFAST16 __PRIPTR_PREFIX "i"
# define PRIiFAST32 __PRIPTR_PREFIX "i"
# define PRIiFAST64 __PRI64_PREFIX "i"
/* Octal notation. */
# define PRIo8 "o"
# define PRIo16 "o"
# define PRIo32 "o"
# define PRIo64 __PRI64_PREFIX "o"
# define PRIoLEAST8 "o"
# define PRIoLEAST16 "o"
# define PRIoLEAST32 "o"
# define PRIoLEAST64 __PRI64_PREFIX "o"
# define PRIoFAST8 "o"
# define PRIoFAST16 __PRIPTR_PREFIX "o"
# define PRIoFAST32 __PRIPTR_PREFIX "o"
# define PRIoFAST64 __PRI64_PREFIX "o"
/* Unsigned integers. */
# define PRIu8 "u"
# define PRIu16 "u"
# define PRIu32 "u"
# define PRIu64 __PRI64_PREFIX "u"
# define PRIuLEAST8 "u"
# define PRIuLEAST16 "u"
# define PRIuLEAST32 "u"
# define PRIuLEAST64 __PRI64_PREFIX "u"
# define PRIuFAST8 "u"
# define PRIuFAST16 __PRIPTR_PREFIX "u"
# define PRIuFAST32 __PRIPTR_PREFIX "u"
# define PRIuFAST64 __PRI64_PREFIX "u"
/* lowercase hexadecimal notation. */
# define PRIx8 "x"
# define PRIx16 "x"
# define PRIx32 "x"
# define PRIx64 __PRI64_PREFIX "x"
# define PRIxLEAST8 "x"
# define PRIxLEAST16 "x"
# define PRIxLEAST32 "x"
# define PRIxLEAST64 __PRI64_PREFIX "x"
# define PRIxFAST8 "x"
# define PRIxFAST16 __PRIPTR_PREFIX "x"
# define PRIxFAST32 __PRIPTR_PREFIX "x"
# define PRIxFAST64 __PRI64_PREFIX "x"
/* UPPERCASE hexadecimal notation. */
# define PRIX8 "X"
# define PRIX16 "X"
# define PRIX32 "X"
# define PRIX64 __PRI64_PREFIX "X"
# define PRIXLEAST8 "X"
# define PRIXLEAST16 "X"
# define PRIXLEAST32 "X"
# define PRIXLEAST64 __PRI64_PREFIX "X"
# define PRIXFAST8 "X"
# define PRIXFAST16 __PRIPTR_PREFIX "X"
# define PRIXFAST32 __PRIPTR_PREFIX "X"
# define PRIXFAST64 __PRI64_PREFIX "X"
/* Macros for printing `intmax_t' and `uintmax_t'. */
# define PRIdMAX __PRI64_PREFIX "d"
# define PRIiMAX __PRI64_PREFIX "i"
# define PRIoMAX __PRI64_PREFIX "o"
# define PRIuMAX __PRI64_PREFIX "u"
# define PRIxMAX __PRI64_PREFIX "x"
# define PRIXMAX __PRI64_PREFIX "X"
/* Macros for printing `intptr_t' and `uintptr_t'. */
# define PRIdPTR __PRIPTR_PREFIX "d"
# define PRIiPTR __PRIPTR_PREFIX "i"
# define PRIoPTR __PRIPTR_PREFIX "o"
# define PRIuPTR __PRIPTR_PREFIX "u"
# define PRIxPTR __PRIPTR_PREFIX "x"
# define PRIXPTR __PRIPTR_PREFIX "X"
/* Macros for scanning format specifiers. */
/* Signed decimal notation. */
# define SCNd8 "hhd"
# define SCNd16 "hd"
# define SCNd32 "d"
# define SCNd64 __PRI64_PREFIX "d"
# define SCNdLEAST8 "hhd"
# define SCNdLEAST16 "hd"
# define SCNdLEAST32 "d"
# define SCNdLEAST64 __PRI64_PREFIX "d"
# define SCNdFAST8 "hhd"
# define SCNdFAST16 __PRIPTR_PREFIX "d"
# define SCNdFAST32 __PRIPTR_PREFIX "d"
# define SCNdFAST64 __PRI64_PREFIX "d"
/* Unsigned decimal notation. */
# define SCNu8 "hhu"
# define SCNu16 "hu"
# define SCNu32 "u"
# define SCNu64 __PRI64_PREFIX "u"
# define SCNuLEAST8 "hhu"
# define SCNuLEAST16 "hu"
# define SCNuLEAST32 "u"
# define SCNuLEAST64 __PRI64_PREFIX "u"
# define SCNuFAST8 "hhu"
# define SCNuFAST16 __PRIPTR_PREFIX "u"
# define SCNuFAST32 __PRIPTR_PREFIX "u"
# define SCNuFAST64 __PRI64_PREFIX "u"
/* Octal notation. */
# define SCNo8 "hho"
# define SCNo16 "ho"
# define SCNo32 "o"
# define SCNo64 __PRI64_PREFIX "o"
# define SCNoLEAST8 "hho"
# define SCNoLEAST16 "ho"
# define SCNoLEAST32 "o"
# define SCNoLEAST64 __PRI64_PREFIX "o"
# define SCNoFAST8 "hho"
# define SCNoFAST16 __PRIPTR_PREFIX "o"
# define SCNoFAST32 __PRIPTR_PREFIX "o"
# define SCNoFAST64 __PRI64_PREFIX "o"
/* Hexadecimal notation. */
# define SCNx8 "hhx"
# define SCNx16 "hx"
# define SCNx32 "x"
# define SCNx64 __PRI64_PREFIX "x"
# define SCNxLEAST8 "hhx"
# define SCNxLEAST16 "hx"
# define SCNxLEAST32 "x"
# define SCNxLEAST64 __PRI64_PREFIX "x"
# define SCNxFAST8 "hhx"
# define SCNxFAST16 __PRIPTR_PREFIX "x"
# define SCNxFAST32 __PRIPTR_PREFIX "x"
# define SCNxFAST64 __PRI64_PREFIX "x"
/* Macros for scanning `intmax_t' and `uintmax_t'. */
# define SCNdMAX __PRI64_PREFIX "d"
# define SCNiMAX __PRI64_PREFIX "i"
# define SCNoMAX __PRI64_PREFIX "o"
# define SCNuMAX __PRI64_PREFIX "u"
# define SCNxMAX __PRI64_PREFIX "x"
/* Macros for scaning `intptr_t' and `uintptr_t'. */
# define SCNdPTR __PRIPTR_PREFIX "d"
# define SCNiPTR __PRIPTR_PREFIX "i"
# define SCNoPTR __PRIPTR_PREFIX "o"
# define SCNuPTR __PRIPTR_PREFIX "u"
# define SCNxPTR __PRIPTR_PREFIX "x"
#endif /* __INTTYPES_H */

View file

@ -1,30 +0,0 @@
#ifndef __LIMITS_H
#define __LIMITS_H
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __LP64__
#define ULONG_MAX 18446744073709551615UL
#else
#define ULONG_MAX 4294967295UL
#endif
#define UINT_MAX 4294967295U
#define INT_MIN (-INT_MAX - 1)
#define INT_MAX 2147483647
#define USHRT_MAX 65535
#define SHRT_MIN (-32768)
#define SHRT_MAX 32767
#define UCHAR_MAX 255
#define CHAR_BIT 8
#ifdef __cplusplus
}
#endif
#endif /* __LIMITS_H */

View file

@ -1,14 +0,0 @@
#ifndef __MATH_H
#define __MATH_H
#ifdef __cplusplus
extern "C" {
#endif
#include "../fdlibm/fdlibm.h"
#ifdef __cplusplus
}
#endif
#endif /* __MATH_H */

View file

@ -1,27 +0,0 @@
#ifndef __PTHREAD_H
#define __PTHREAD_H
typedef int pthread_rwlock_t;
#define PTHREAD_RWLOCK_INITIALIZER 0
#ifdef __cplusplus
extern "C" {
#endif
inline int pthread_rwlock_rdlock(pthread_rwlock_t *rwlock)
{ return 0; }
inline int pthread_rwlock_tryrdlock(pthread_rwlock_t *rwlock)
{ return 0; }
inline int pthread_rwlock_wrlock(pthread_rwlock_t *rwlock)
{ return 0; }
inline int pthread_rwlock_trywrlock(pthread_rwlock_t *rwlock)
{ return 0; }
int pthread_rwlock_unlock(pthread_rwlock_t *rwlock)
{ return 0; }
#ifdef __cplusplus
}
#endif
#endif /* __PTHREAD_H */

View file

@ -1,25 +0,0 @@
#ifndef __STDARG_H
#define __STDARG_H
#include <stdlib.h>
#ifdef __cplusplus
extern "C" {
#endif
#define va_start(v, l) __builtin_va_start((v), l)
#define va_arg(ap, type) __builtin_va_arg((ap), type)
#define va_copy(aq, ap) __builtin_va_copy((aq), (ap))
#define va_end(ap) __builtin_va_end(ap)
#define va_list __builtin_va_list
int vsnprintf(char *buf, size_t size, const char *fmt, va_list args);
int vscnprintf(char *buf, size_t size, const char *fmt, va_list args);
int vsprintf(char *buf, const char *fmt, va_list args);
int vprintf(const char *format, va_list ap);
#ifdef __cplusplus
}
#endif
#endif /* __STDARG_H */

View file

@ -1,8 +0,0 @@
#ifndef __STDBOOL_H
#define __STDBOOL_H
#define bool _Bool
#define true 1
#define false 0
#endif /* __STDBOOL_H */

View file

@ -1,28 +0,0 @@
#ifndef __STDDEF_H
#define __STDDEF_H
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void *)0)
#endif
#ifdef __LP64__
typedef unsigned long size_t;
typedef long ptrdiff_t;
#else
typedef unsigned int size_t;
typedef int ptrdiff_t;
#endif
#define offsetof(type, member) __builtin_offsetof(type, member)
#ifdef __cplusplus
}
#endif
#endif /* __STDDEF_H */

View file

@ -1,63 +0,0 @@
#ifndef __STDINT_H
#define __STDINT_H
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __LP64__
typedef long intptr_t;
typedef unsigned long uintptr_t;
#else
typedef int intptr_t;
typedef unsigned int uintptr_t;
#endif
typedef unsigned long long uint64_t;
typedef unsigned int uint32_t;
typedef unsigned short uint16_t;
typedef unsigned char uint8_t;
typedef long long int64_t;
typedef int int32_t;
typedef short int16_t;
typedef signed char int8_t;
typedef signed char int_least8_t;
typedef unsigned char uint_least8_t;
typedef signed short int_least16_t;
typedef unsigned short uint_least16_t;
typedef signed int int_least32_t;
typedef unsigned int uint_least32_t;
typedef signed long long int_least64_t;
typedef unsigned long long uint_least64_t;
#define INT8_MAX 127
#define INT16_MAX 32767
#define INT32_MAX 2147483647
#define INT64_MAX 9223372036854775807LL
#define INT8_MIN -128
#define INT16_MIN -32768
#define INT32_MIN (-INT32_MAX - 1)
#define INT64_MIN (-INT64_MAX - 1LL)
#define UINT8_MAX 255
#define UINT16_MAX 65535
#define UINT32_MAX 4294967295U
#define UINT64_MAX 18446744073709551615ULL
#define __int_c_join(a, b) a ## b
#define __int_c(v, suffix) __int_c_join(v, suffix)
#define __uint_c(v, suffix) __int_c_join(v##U, suffix)
#define INT64_C(v) __int_c(v, LL)
#define UINT64_C(v) __uint_c(v, LL)
#define INT32_C(v) v
#define UINT32_C(v) v##U
#ifdef __cplusplus
}
#endif
#endif /* __STDINT_H */

View file

@ -1,77 +0,0 @@
#ifndef __STDIO_H
#define __STDIO_H
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
int putchar(int c);
int puts(const char *s);
int snprintf(char *buf, size_t size, const char *fmt, ...) __attribute__((format(printf, 3, 4)));
int scnprintf(char *buf, size_t size, const char *fmt, ...) __attribute__((format(printf, 3, 4)));
int sprintf(char *buf, const char *fmt, ...) __attribute__((format(printf, 2, 3)));
int printf(const char *fmt, ...) __attribute__((format(printf, 1, 2)));
/* Not sure this belongs here... */
typedef long long loff_t;
typedef long off_t;
typedef int mode_t;
typedef int dev_t;
/*
* Note: this library does not provide FILE operations.
* User code must implement them.
*/
#ifndef BUFSIZ
#define BUFSIZ 1024
#endif
#ifndef EOF
#define EOF -1
#endif
#ifndef SEEK_SET
#define SEEK_SET 0
#endif
#ifndef SEEK_CUR
#define SEEK_CUR 1
#endif
#ifndef SEEK_END
#define SEEK_END 2
#endif
typedef int FILE;
extern FILE *stdin;
extern FILE *stdout;
extern FILE *stderr;
int fprintf(FILE *stream, const char *format, ...) __attribute__((format(printf, 2, 3)));
int fflush(FILE *stream);
FILE *fopen(const char *path, const char *mode);
FILE *freopen(const char *path, const char *mode, FILE *stream);
char *fgets(char *s, int size, FILE *stream);
size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream);
size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream);
int getc(FILE *stream);
int fputc(int c, FILE *stream);
int ferror(FILE *stream);
int feof(FILE *stream);
int fclose(FILE *fp);
int fseek(FILE *stream, long offset, int whence);
long ftell(FILE *stream);
#ifdef __cplusplus
}
#endif
#endif /* __STDIO_H */

View file

@ -1,85 +0,0 @@
/*
* MiSoC
* Copyright (C) 2007, 2008, 2009, 2011 Sebastien Bourdeauducq
* Copyright (C) Linux kernel developers
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __STDLIB_H
#define __STDLIB_H
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
#define PRINTF_ZEROPAD 1 /* pad with zero */
#define PRINTF_SIGN 2 /* unsigned/signed long */
#define PRINTF_PLUS 4 /* show plus */
#define PRINTF_SPACE 8 /* space if plus */
#define PRINTF_LEFT 16 /* left justified */
#define PRINTF_SPECIAL 32 /* 0x */
#define PRINTF_LARGE 64 /* use 'ABCDEF' instead of 'abcdef' */
#define likely(x) x
#define unlikely(x) x
static inline int abs(int x)
{
return x > 0 ? x : -x;
}
static inline long int labs(long int x)
{
return x > 0 ? x : -x;
}
unsigned long strtoul(const char *nptr, char **endptr, unsigned int base);
long strtol(const char *nptr, char **endptr, int base);
double strtod(const char *str, char **endptr);
int skip_atoi(const char **s);
static inline int atoi(const char *nptr) {
return strtol(nptr, NULL, 10);
}
static inline long atol(const char *nptr) {
return (long)atoi(nptr);
}
char *number(char *buf, char *end, unsigned long num, int base, int size, int precision, int type);
#define RAND_MAX 2147483647
unsigned int rand(void);
void srand(unsigned int seed);
void abort(void) __attribute__((noreturn));
void qsort(void *base, size_t nmemb, size_t size, int(*compar)(const void *, const void *));
/*
* The following functions are not provided by this library.
*/
char *getenv(const char *name);
void *malloc(size_t size);
void *calloc(size_t nmemb, size_t size);
void free(void *ptr);
void *realloc(void *ptr, size_t size);
#ifdef __cplusplus
}
#endif
#endif /* __STDLIB_H */

View file

@ -1,55 +0,0 @@
/*
* MiSoC
* Copyright (C) 2007, 2008, 2009, 2010 Sebastien Bourdeauducq
* Copyright (C) Linus Torvalds and Linux kernel developers
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __STRING_H
#define __STRING_H
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
char *strchr(const char *s, int c);
char *strpbrk(const char *,const char *);
char *strrchr(const char *s, int c);
char *strnchr(const char *s, size_t count, int c);
char *strcpy(char *dest, const char *src);
char *strncpy(char *dest, const char *src, size_t count);
int strcmp(const char *cs, const char *ct);
int strncmp(const char *cs, const char *ct, size_t count);
int strcasecmp(const char *cs, const char *ct);
char *strcat(char *dest, const char *src);
char *strncat(char *dest, const char *src, size_t n);
size_t strlen(const char *s);
size_t strnlen(const char *s, size_t count);
size_t strspn(const char *s, const char *accept);
int memcmp(const void *cs, const void *ct, size_t count);
void *memset(void *s, int c, size_t count);
void *memcpy(void *to, const void *from, size_t n);
void *memmove(void *dest, const void *src, size_t count);
char *strstr(const char *s1, const char *s2);
void *memchr(const void *s, int c, size_t n);
char *strerror(int errnum);
#ifdef __cplusplus
}
#endif
#endif /* __STRING_H */