aboutsummaryrefslogtreecommitdiff
path: root/system/include/libc
diff options
context:
space:
mode:
Diffstat (limited to 'system/include/libc')
-rw-r--r--system/include/libc/_ansi.h133
-rw-r--r--system/include/libc/_syslist.h40
-rw-r--r--system/include/libc/alloca.h21
-rw-r--r--system/include/libc/ar.h69
-rw-r--r--system/include/libc/argz.h33
-rw-r--r--system/include/libc/assert.h46
-rw-r--r--system/include/libc/complex.h124
-rw-r--r--system/include/libc/ctype.h113
-rw-r--r--system/include/libc/dirent.h15
-rw-r--r--system/include/libc/envlock.h15
-rw-r--r--system/include/libc/envz.h16
-rw-r--r--system/include/libc/errno.h11
-rw-r--r--system/include/libc/fastmath.h13
-rw-r--r--system/include/libc/fcntl.h1
-rw-r--r--system/include/libc/fnmatch.h55
-rw-r--r--system/include/libc/getopt.h190
-rw-r--r--system/include/libc/glob.h89
-rw-r--r--system/include/libc/grp.h94
-rw-r--r--system/include/libc/iconv.h62
-rw-r--r--system/include/libc/ieeefp.h256
-rw-r--r--system/include/libc/inttypes.h290
-rw-r--r--system/include/libc/langinfo.h316
-rw-r--r--system/include/libc/libgen.h23
-rw-r--r--system/include/libc/limits.h146
-rw-r--r--system/include/libc/locale.h65
-rw-r--r--system/include/libc/machine/_default_types.h121
-rw-r--r--system/include/libc/machine/_types.h8
-rw-r--r--system/include/libc/machine/ansi.h1
-rw-r--r--system/include/libc/machine/endian.h20
-rw-r--r--system/include/libc/machine/fastmath.h100
-rw-r--r--system/include/libc/machine/ieeefp.h376
-rw-r--r--system/include/libc/machine/malloc.h8
-rw-r--r--system/include/libc/machine/param.h1
-rw-r--r--system/include/libc/machine/setjmp-dj.h43
-rw-r--r--system/include/libc/machine/setjmp.h356
-rw-r--r--system/include/libc/machine/stdlib.h8
-rw-r--r--system/include/libc/machine/termios.h1
-rw-r--r--system/include/libc/machine/time.h19
-rw-r--r--system/include/libc/machine/types.h30
-rw-r--r--system/include/libc/malloc.h169
-rw-r--r--system/include/libc/math.h580
-rw-r--r--system/include/libc/newlib.h2
-rw-r--r--system/include/libc/paths.h7
-rw-r--r--system/include/libc/process.h44
-rw-r--r--system/include/libc/pthread.h359
-rw-r--r--system/include/libc/pwd.h78
-rw-r--r--system/include/libc/readme.txt3
-rw-r--r--system/include/libc/reent.h183
-rw-r--r--system/include/libc/regdef.h7
-rw-r--r--system/include/libc/regex.h102
-rw-r--r--system/include/libc/sched.h97
-rw-r--r--system/include/libc/search.h59
-rw-r--r--system/include/libc/setjmp.h20
-rw-r--r--system/include/libc/signal.h30
-rw-r--r--system/include/libc/stdarg.h50
-rw-r--r--system/include/libc/stddef.h64
-rw-r--r--system/include/libc/stdint.h493
-rw-r--r--system/include/libc/stdio.h685
-rw-r--r--system/include/libc/stdlib.h226
-rw-r--r--system/include/libc/string.h104
-rw-r--r--system/include/libc/strings.h35
-rw-r--r--system/include/libc/sys/_default_fcntl.h204
-rw-r--r--system/include/libc/sys/_types.h87
-rw-r--r--system/include/libc/sys/cdefs.h123
-rw-r--r--system/include/libc/sys/config.h255
-rw-r--r--system/include/libc/sys/custom_file.h2
-rw-r--r--system/include/libc/sys/dir.h10
-rw-r--r--system/include/libc/sys/dirent.h13
-rw-r--r--system/include/libc/sys/errno.h190
-rw-r--r--system/include/libc/sys/fcntl.h4
-rw-r--r--system/include/libc/sys/features.h205
-rw-r--r--system/include/libc/sys/file.h2
-rw-r--r--system/include/libc/sys/iconvnls.h77
-rw-r--r--system/include/libc/sys/lock.h24
-rw-r--r--system/include/libc/sys/param.h25
-rw-r--r--system/include/libc/sys/queue.h471
-rw-r--r--system/include/libc/sys/reent.h843
-rw-r--r--system/include/libc/sys/resource.h15
-rw-r--r--system/include/libc/sys/sched.h67
-rw-r--r--system/include/libc/sys/signal.h310
-rw-r--r--system/include/libc/sys/stat.h183
-rw-r--r--system/include/libc/sys/stdio.h27
-rw-r--r--system/include/libc/sys/string.h2
-rw-r--r--system/include/libc/sys/syslimits.h65
-rw-r--r--system/include/libc/sys/time.h84
-rw-r--r--system/include/libc/sys/timeb.h39
-rw-r--r--system/include/libc/sys/times.h28
-rw-r--r--system/include/libc/sys/types.h487
-rw-r--r--system/include/libc/sys/unistd.h503
-rw-r--r--system/include/libc/sys/utime.h22
-rw-r--r--system/include/libc/sys/wait.h40
-rw-r--r--system/include/libc/tar.h39
-rw-r--r--system/include/libc/termios.h7
-rw-r--r--system/include/libc/time.h261
-rw-r--r--system/include/libc/unctrl.h46
-rw-r--r--system/include/libc/unistd.h6
-rw-r--r--system/include/libc/utime.h12
-rw-r--r--system/include/libc/utmp.h8
-rw-r--r--system/include/libc/wchar.h192
-rw-r--r--system/include/libc/wctype.h47
-rw-r--r--system/include/libc/wordexp.h53
101 files changed, 11803 insertions, 0 deletions
diff --git a/system/include/libc/_ansi.h b/system/include/libc/_ansi.h
new file mode 100644
index 00000000..e584ec38
--- /dev/null
+++ b/system/include/libc/_ansi.h
@@ -0,0 +1,133 @@
+/* Provide support for both ANSI and non-ANSI environments. */
+
+/* Some ANSI environments are "broken" in the sense that __STDC__ cannot be
+ relied upon to have it's intended meaning. Therefore we must use our own
+ concoction: _HAVE_STDC. Always use _HAVE_STDC instead of __STDC__ in newlib
+ sources!
+
+ To get a strict ANSI C environment, define macro __STRICT_ANSI__. This will
+ "comment out" the non-ANSI parts of the ANSI header files (non-ANSI header
+ files aren't affected). */
+
+#ifndef _ANSIDECL_H_
+#define _ANSIDECL_H_
+
+#include <newlib.h>
+#include <sys/config.h>
+
+/* First try to figure out whether we really are in an ANSI C environment. */
+/* FIXME: This probably needs some work. Perhaps sys/config.h can be
+ prevailed upon to give us a clue. */
+
+#ifdef __STDC__
+#define _HAVE_STDC
+#endif
+
+/* ISO C++. */
+
+#ifdef __cplusplus
+#if !(defined(_BEGIN_STD_C) && defined(_END_STD_C))
+#ifdef _HAVE_STD_CXX
+#define _BEGIN_STD_C namespace std { extern "C" {
+#define _END_STD_C } }
+#else
+#define _BEGIN_STD_C extern "C" {
+#define _END_STD_C }
+#endif
+#if defined(__GNUC__) && \
+ ( (__GNUC__ >= 4) || \
+ ( (__GNUC__ >= 3) && defined(__GNUC_MINOR__) && (__GNUC_MINOR__ >= 3) ) )
+#define _NOTHROW __attribute__ ((nothrow))
+#else
+#define _NOTHROW throw()
+#endif
+#endif
+#else
+#define _BEGIN_STD_C
+#define _END_STD_C
+#define _NOTHROW
+#endif
+
+#ifdef _HAVE_STDC
+#define _PTR void *
+#define _AND ,
+#define _NOARGS void
+#define _CONST const
+#define _VOLATILE volatile
+#define _SIGNED signed
+#define _DOTS , ...
+#define _VOID void
+#ifdef __CYGWIN__
+#define _EXFUN_NOTHROW(name, proto) __cdecl name proto _NOTHROW
+#define _EXFUN(name, proto) __cdecl name proto
+#define _EXPARM(name, proto) (* __cdecl name) proto
+#define _EXFNPTR(name, proto) (__cdecl * name) proto
+#else
+#define _EXFUN_NOTHROW(name, proto) name proto _NOTHROW
+#define _EXFUN(name, proto) name proto
+#define _EXPARM(name, proto) (* name) proto
+#define _EXFNPTR(name, proto) (* name) proto
+#endif
+#define _DEFUN(name, arglist, args) name(args)
+#define _DEFUN_VOID(name) name(_NOARGS)
+#define _CAST_VOID (void)
+#ifndef _LONG_DOUBLE
+#define _LONG_DOUBLE long double
+#endif
+#ifndef _LONG_LONG_TYPE
+#define _LONG_LONG_TYPE long long
+#endif
+#ifndef _PARAMS
+#define _PARAMS(paramlist) paramlist
+#endif
+#else
+#define _PTR char *
+#define _AND ;
+#define _NOARGS
+#define _CONST
+#define _VOLATILE
+#define _SIGNED
+#define _DOTS
+#define _VOID void
+#define _EXFUN(name, proto) name()
+#define _EXFUN_NOTHROW(name, proto) name()
+#define _DEFUN(name, arglist, args) name arglist args;
+#define _DEFUN_VOID(name) name()
+#define _CAST_VOID
+#define _LONG_DOUBLE double
+#define _LONG_LONG_TYPE long
+#ifndef _PARAMS
+#define _PARAMS(paramlist) ()
+#endif
+#endif
+
+/* Support gcc's __attribute__ facility. */
+
+#ifdef __GNUC__
+#define _ATTRIBUTE(attrs) __attribute__ (attrs)
+#else
+#define _ATTRIBUTE(attrs)
+#endif
+
+/* The traditional meaning of 'extern inline' for GCC is not
+ to emit the function body unless the address is explicitly
+ taken. However this behaviour is changing to match the C99
+ standard, which uses 'extern inline' to indicate that the
+ function body *must* be emitted. If we are using GCC, but do
+ not have the new behaviour, we need to use extern inline; if
+ we are using a new GCC with the C99-compatible behaviour, or
+ a non-GCC compiler (which we will have to hope is C99, since
+ there is no other way to achieve the effect of omitting the
+ function if it isn't referenced) we just use plain 'inline',
+ which c99 defines to mean more-or-less the same as the Gnu C
+ 'extern inline'. */
+#if defined(__GNUC__) && !defined(__GNUC_STDC_INLINE__)
+/* We're using GCC, but without the new C99-compatible behaviour. */
+#define _ELIDABLE_INLINE extern __inline__ _ATTRIBUTE ((__always_inline__))
+#else
+/* We're using GCC in C99 mode, or an unknown compiler which
+ we just have to hope obeys the C99 semantics of inline. */
+#define _ELIDABLE_INLINE __inline__
+#endif
+
+#endif /* _ANSIDECL_H_ */
diff --git a/system/include/libc/_syslist.h b/system/include/libc/_syslist.h
new file mode 100644
index 00000000..271644ef
--- /dev/null
+++ b/system/include/libc/_syslist.h
@@ -0,0 +1,40 @@
+/* internal use only -- mapping of "system calls" for libraries that lose
+ and only provide C names, so that we end up in violation of ANSI */
+#ifndef __SYSLIST_H
+#define __SYSLIST_H
+
+#ifdef MISSING_SYSCALL_NAMES
+#define _close close
+#define _execve execve
+#define _fcntl fcntl
+#define _fork fork
+#define _fstat fstat
+#define _getpid getpid
+#define _gettimeofday gettimeofday
+#define _isatty isatty
+#define _kill kill
+#define _link link
+#define _lseek lseek
+#define _mkdir mkdir
+#define _open open
+#define _read read
+#define _sbrk sbrk
+#define _stat stat
+#define _times times
+#define _unlink unlink
+#define _wait wait
+#define _write write
+#endif /* MISSING_SYSCALL_NAMES */
+
+#if defined MISSING_SYSCALL_NAMES || !defined HAVE_OPENDIR
+/* If the system call interface is missing opendir, readdir, and
+ closedir, there is an implementation of these functions in
+ libc/posix that is implemented using open, getdents, and close.
+ Note, these functions are currently not in the libc/syscalls
+ directory. */
+#define _opendir opendir
+#define _readdir readdir
+#define _closedir closedir
+#endif /* MISSING_SYSCALL_NAMES || !HAVE_OPENDIR */
+
+#endif /* !__SYSLIST_H_ */