diff options
Diffstat (limited to 'newlib/libc/sys/linux/include')
-rw-r--r-- | newlib/libc/sys/linux/include/argp.h | 570 | ||||
-rw-r--r-- | newlib/libc/sys/linux/include/bp-sym.h | 6 | ||||
-rw-r--r-- | newlib/libc/sys/linux/include/cmathcalls.h | 158 | ||||
-rw-r--r-- | newlib/libc/sys/linux/include/complex.h | 108 | ||||
-rw-r--r-- | newlib/libc/sys/linux/include/getopt.h | 27 | ||||
-rw-r--r-- | newlib/libc/sys/linux/include/limits.h | 153 | ||||
-rw-r--r-- | newlib/libc/sys/linux/include/malloc.h | 266 | ||||
-rw-r--r-- | newlib/libc/sys/linux/include/mcheck.h | 62 | ||||
-rw-r--r-- | newlib/libc/sys/linux/include/mqueue.h | 34 | ||||
-rw-r--r-- | newlib/libc/sys/linux/include/paths.h | 74 | ||||
-rw-r--r-- | newlib/libc/sys/linux/include/pthread.h | 682 | ||||
-rw-r--r-- | newlib/libc/sys/linux/include/setjmp.h | 41 | ||||
-rw-r--r-- | newlib/libc/sys/linux/include/stdint.h | 18 | ||||
-rw-r--r-- | newlib/libc/sys/linux/include/time.h | 228 | ||||
-rw-r--r-- | newlib/libc/sys/linux/include/unistd.h | 20 |
15 files changed, 0 insertions, 2447 deletions
diff --git a/newlib/libc/sys/linux/include/argp.h b/newlib/libc/sys/linux/include/argp.h deleted file mode 100644 index e58258a3c..000000000 --- a/newlib/libc/sys/linux/include/argp.h +++ /dev/null @@ -1,570 +0,0 @@ -/* Hierarchial argument parsing, layered over getopt. - Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Written by Miles Bader <miles@gnu.ai.mit.edu>. - - 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _ARGP_H -#define _ARGP_H - -#include <stdio.h> -#include <ctype.h> -#include <getopt.h> - -#define __need_error_t -#include <errno.h> - -char *program_invocation_name; -char *program_invocation_short_name; - -#ifndef __const -# define __const const -#endif - -#ifndef __error_t_defined -typedef int error_t; -# define __error_t_defined -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* A description of a particular option. A pointer to an array of - these is passed in the OPTIONS field of an argp structure. Each option - entry can correspond to one long option and/or one short option; more - names for the same option can be added by following an entry in an option - array with options having the OPTION_ALIAS flag set. */ -struct argp_option -{ - /* The long option name. For more than one name for the same option, you - can use following options with the OPTION_ALIAS flag set. */ - __const char *name; - - /* What key is returned for this option. If > 0 and printable, then it's - also accepted as a short option. */ - int key; - - /* If non-NULL, this is the name of the argument associated with this - option, which is required unless the OPTION_ARG_OPTIONAL flag is set. */ - __const char *arg; - - /* OPTION_ flags. */ - int flags; - - /* The doc string for this option. If both NAME and KEY are 0, This string - will be printed outdented from the normal option column, making it - useful as a group header (it will be the first thing printed in its - group); in this usage, it's conventional to end the string with a `:'. */ - __const char *doc; - - /* The group this option is in. In a long help message, options are sorted - alphabetically within each group, and the groups presented in the order - 0, 1, 2, ..., n, -m, ..., -2, -1. Every entry in an options array with - if this field 0 will inherit the group number of the previous entry, or - zero if it's the first one, unless its a group header (NAME and KEY both - 0), in which case, the previous entry + 1 is the default. Automagic - options such as --help are put into group -1. */ - int group; -}; - -/* The argument associated with this option is optional. */ -#define OPTION_ARG_OPTIONAL 0x1 - -/* This option isn't displayed in any help messages. */ -#define OPTION_HIDDEN 0x2 - -/* This option is an alias for the closest previous non-alias option. This - means that it will be displayed in the same help entry, and will inherit - fields other than NAME and KEY from the aliased option. */ -#define OPTION_ALIAS 0x4 - -/* This option isn't actually an option (and so should be ignored by the - actual option parser), but rather an arbitrary piece of documentation that - should be displayed in much the same manner as the options. If this flag - is set, then the option NAME field is displayed unmodified (e.g., no `--' - prefix is added) at the left-margin (where a *short* option would normally - be displayed), and the documentation string in the normal place. For - purposes of sorting, any leading whitespace and puncuation is ignored, - except that if the first non-whitespace character is not `-', this entry - is displayed after all options (and OPTION_DOC entries with a leading `-') - in the same group. */ -#define OPTION_DOC 0x8 - -/* This option shouldn't be included in `long' usage messages (but is still - included in help messages). This is mainly intended for options that are - completely documented in an argp's ARGS_DOC field, in which case including - the option in the generic usage list would be redundant. For instance, - if ARGS_DOC is "FOO BAR\n-x BLAH", and the `-x' option's purpose is to - distinguish these two cases, -x should probably be marked - OPTION_NO_USAGE. */ -#define OPTION_NO_USAGE 0x10 - -struct argp; /* fwd declare this type */ -struct argp_state; /* " */ -struct argp_child; /* " */ - -/* The type of a pointer to an argp parsing function. */ -typedef error_t (*argp_parser_t) (int key, char *arg, - struct argp_state *state); - -/* What to return for unrecognized keys. For special ARGP_KEY_ keys, such - returns will simply be ignored. For user keys, this error will be turned - into EINVAL (if the call to argp_parse is such that errors are propagated - back to the user instead of exiting); returning EINVAL itself would result - in an immediate stop to parsing in *all* cases. */ -#define ARGP_ERR_UNKNOWN E2BIG /* Hurd should never need E2BIG. XXX */ - -/* Special values for the KEY argument to an argument parsing function. - ARGP_ERR_UNKNOWN should be returned if they aren't understood. - - The sequence of keys to a parsing function is either (where each - uppercased word should be prefixed by `ARGP_KEY_' and opt is a user key): - - INIT opt... NO_ARGS END SUCCESS -- No non-option arguments at all - or INIT (opt | ARG)... END SUCCESS -- All non-option args parsed - or INIT (opt | ARG)... SUCCESS -- Some non-option arg unrecognized - - The third case is where every parser returned ARGP_KEY_UNKNOWN for an - argument, in which case parsing stops at that argument (returning the - unparsed arguments to the caller of argp_parse if requested, or stopping - with an error message if not). - - If an error occurs (either detected by argp, or because the parsing - function returned an error value), then the parser is called with - ARGP_KEY_ERROR, and no further calls are made. */ - -/* This is not an option at all, but rather a command line argument. If a - parser receiving this key returns success, the fact is recorded, and the - ARGP_KEY_NO_ARGS case won't be used. HOWEVER, if while processing the - argument, a parser function decrements the NEXT field of the state it's - passed, the option won't be considered processed; this is to allow you to - actually modify the argument (perhaps into an option), and have it - processed again. */ -#define ARGP_KEY_ARG 0 -/* There are remaining arguments not parsed by any parser, which may be found - starting at (STATE->argv + STATE->next). If success is returned, but - STATE->next left untouched, it's assumed that all arguments were consume, - otherwise, the parser should adjust STATE->next to reflect any arguments - consumed. */ -#define ARGP_KEY_ARGS 0x1000006 -/* There are no more command line arguments at all. */ -#define ARGP_KEY_END 0x1000001 -/* Because it's common to want to do some special processing if there aren't - any non-option args, user parsers are called with this key if they didn't - successfully process any non-option arguments. Called just before - ARGP_KEY_END (where more general validity checks on previously parsed - arguments can take place). */ -#define ARGP_KEY_NO_ARGS 0x1000002 -/* Passed in before any parsing is done. Afterwards, the values of each - element of the CHILD_INPUT field, if any, in the state structure is - copied to each child's state to be the initial value of the INPUT field. */ -#define ARGP_KEY_INIT 0x1000003 -/* Use after all other keys, including SUCCESS & END. */ -#define ARGP_KEY_FINI 0x1000007 -/* Passed in when parsing has successfully been completed (even if there are - still arguments remaining). */ -#define ARGP_KEY_SUCCESS 0x1000004 -/* Passed in if an error occurs. */ -#define ARGP_KEY_ERROR 0x1000005 - -/* An argp structure contains a set of options declarations, a function to - deal with parsing one, documentation string, a possible vector of child - argp's, and perhaps a function to filter help output. When actually - parsing options, getopt is called with the union of all the argp - structures chained together through their CHILD pointers, with conflicts - being resolved in favor of the first occurrence in the chain. */ -struct argp -{ - /* An array of argp_option structures, terminated by an entry with both - NAME and KEY having a value of 0. */ - __const struct argp_option *options; - - /* What to do with an option from this structure. KEY is the key - associated with the option, and ARG is any associated argument (NULL if - none was supplied). If KEY isn't understood, ARGP_ERR_UNKNOWN should be - returned. If a non-zero, non-ARGP_ERR_UNKNOWN value is returned, then - parsing is stopped immediately, and that value is returned from - argp_parse(). For special (non-user-supplied) values of KEY, see the - ARGP_KEY_ definitions below. */ - argp_parser_t parser; - - /* A string describing what other arguments are wanted by this program. It - is only used by argp_usage to print the `Usage:' message. If it - contains newlines, the strings separated by them are considered - alternative usage patterns, and printed on separate lines (lines after - the first are prefix by ` or: ' instead of `Usage:'). */ - __const char *args_doc; - - /* If non-NULL, a string containing extra text to be printed before and - after the options in a long help message (separated by a vertical tab - `\v' character). */ - __const char *doc; - - /* A vector of argp_children structures, terminated by a member with a 0 - argp field, pointing to child argps should be parsed with this one. Any - conflicts are resolved in favor of this argp, or early argps in the - CHILDREN list. This field is useful if you use libraries that supply - their own argp structure, which you want to use in conjunction with your - own. */ - __const struct argp_child *children; - - /* If non-zero, this should be a function to filter the output of help - messages. KEY is either a key from an option, in which case TEXT is - that option's help text, or a special key from the ARGP_KEY_HELP_ - defines, below, describing which other help text TEXT is. The function - should return either TEXT, if it should be used as-is, a replacement - string, which should be malloced, and will be freed by argp, or NULL, - meaning `print nothing'. The value for TEXT is *after* any translation - has been done, so if any of the replacement text also needs translation, - that should be done by the filter function. INPUT is either the input - supplied to argp_parse, or NULL, if argp_help was called directly. */ - char *(*help_filter) (int __key, __const char *__text, void *__input); - - /* If non-zero the strings used in the argp library are translated using - the domain described by this string. Otherwise the currently installed - default domain is used. */ - const char *argp_domain; -}; - -/* Possible KEY arguments to a help filter function. */ -#define ARGP_KEY_HELP_PRE_DOC 0x2000001 /* Help text preceeding options. */ -#define ARGP_KEY_HELP_POST_DOC 0x2000002 /* Help text following options. */ -#define ARGP_KEY_HELP_HEADER 0x2000003 /* Option header string. */ -#define ARGP_KEY_HELP_EXTRA 0x2000004 /* After all other documentation; - TEXT is NULL for this key. */ -/* Explanatory note emitted when duplicate option arguments have been - suppressed. */ -#define ARGP_KEY_HELP_DUP_ARGS_NOTE 0x2000005 -#define ARGP_KEY_HELP_ARGS_DOC 0x2000006 /* Argument doc string. */ - -/* When an argp has a non-zero CHILDREN field, it should point to a vector of - argp_child structures, each of which describes a subsidiary argp. */ -struct argp_child -{ - /* The child parser. */ - __const struct argp *argp; - - /* Flags for this child. */ - int flags; - - /* If non-zero, an optional header to be printed in help output before the - child options. As a side-effect, a non-zero value forces the child - options to be grouped together; to achieve this effect without actually - printing a header string, use a value of "". */ - __const char *header; - - /* Where to group the child options relative to the other (`consolidated') - options in the parent argp; the values are the same as the GROUP field - in argp_option structs, but all child-groupings follow parent options at - a particular group level. If both this field and HEADER are zero, then - they aren't grouped at all, but rather merged with the parent options - (merging the child's grouping levels with the parents). */ - int group; -}; - -/* Parsing state. This is provided to parsing functions called by argp, - which may examine and, as noted, modify fields. */ -struct argp_state -{ - /* The top level ARGP being parsed. */ - __const struct argp *root_argp; - - /* The argument vector being parsed. May be modified. */ - int argc; - char **argv; - - /* The index in ARGV of the next arg that to be parsed. May be modified. */ - int next; - - /* The flags supplied to argp_parse. May be modified. */ - unsigned flags; - - /* While calling a parsing function with a key of ARGP_KEY_ARG, this is the - number of the current arg, starting at zero, and incremented after each - such call returns. At all other times, this is the number of such - arguments that have been processed. */ - unsigned arg_num; - - /* If non-zero, the index in ARGV of the first argument following a special - `--' argument (which prevents anything following being interpreted as an - option). Only set once argument parsing has proceeded past this point. */ - int quoted; - - /* An arbitrary pointer passed in from the user. */ - void *input; - /* Values to pass to child parsers. This vector will be the same length as - the number of children for the current parser. */ - void **child_inputs; - - /* For the parser's use. Initialized to 0. */ - void *hook; - - /* The name used when printing messages. This is initialized to ARGV[0], - or PROGRAM_INVOCATION_NAME if that is unavailable. */ - char *name; - - /* Streams used when argp prints something. */ - FILE *err_stream; /* For errors; initialized to stderr. */ - FILE *out_stream; /* For information; initialized to stdout. */ - - void *pstate; /* Private, for use by argp. */ -}; - -/* Flags for argp_parse (note that the defaults are those that are - convenient for program command line parsing): */ - -/* Don't ignore the first element of ARGV. Normally (and always unless - ARGP_NO_ERRS is set) the first element of the argument vector is - skipped for option parsing purposes, as it corresponds to the program name - in a command line. */ -#define ARGP_PARSE_ARGV0 0x01 - -/* Don't print error messages for unknown options to stderr; unless this flag - is set, ARGP_PARSE_ARGV0 is ignored, as ARGV[0] is used as the program - name in the error messages. This flag implies ARGP_NO_EXIT (on the - assumption that silent exiting upon errors is bad behaviour). */ -#define ARGP_NO_ERRS 0x02 - -/* Don't parse any non-option args. Normally non-option args are parsed by - calling the parse functions with a key of ARGP_KEY_ARG, and the actual arg - as the value. Since it's impossible to know which parse function wants to - handle it, each one is called in turn, until one returns 0 or an error - other than ARGP_ERR_UNKNOWN; if an argument is handled by no one, the - argp_parse returns prematurely (but with a return value of 0). If all - args have been parsed without error, all parsing functions are called one - last time with a key of ARGP_KEY_END. This flag needn't normally be set, - as the normal behavior is to stop parsing as soon as some argument can't - be handled. */ -#define ARGP_NO_ARGS 0x04 - -/* Parse options and arguments in the same order they occur on the command - line -- normally they're rearranged so that all options come first. */ -#define ARGP_IN_ORDER 0x08 - -/* Don't provide the standard long option --help, which causes usage and - option help information to be output to stdout, and exit (0) called. */ -#define ARGP_NO_HELP 0x10 - -/* Don't exit on errors (they may still result in error messages). */ -#define ARGP_NO_EXIT 0x20 - -/* Use the gnu getopt `long-only' rules for parsing arguments. */ -#define ARGP_LONG_ONLY 0x40 - -/* Turns off any message-printing/exiting options. */ -#define ARGP_SILENT (ARGP_NO_EXIT | ARGP_NO_ERRS | ARGP_NO_HELP) - -/* Parse the options strings in ARGC & ARGV according to the options in ARGP. - FLAGS is one of the ARGP_ flags above. If ARG_INDEX is non-NULL, the - index in ARGV of the first unparsed option is returned in it. If an - unknown option is present, ARGP_ERR_UNKNOWN is returned; if some parser - routine returned a non-zero value, it is returned; otherwise 0 is - returned. This function may also call exit unless the ARGP_NO_HELP flag - is set. INPUT is a pointer to a value to be passed in to the parser. */ -extern error_t argp_parse (__const struct argp *__restrict __argp, - int __argc, char **__restrict __argv, - unsigned __flags, int *__restrict __arg_index, - void *__restrict __input) __THROW; -extern error_t __argp_parse (__const struct argp *__restrict __argp, - int __argc, char **__restrict __argv, - unsigned __flags, int *__restrict __arg_index, - void *__restrict __input) __THROW; - -/* Global variables. */ - -/* If defined or set by the user program to a non-zero value, then a default - option --version is added (unless the ARGP_NO_HELP flag is used), which - will print this string followed by a newline and exit (unless the - ARGP_NO_EXIT flag is used). Overridden by ARGP_PROGRAM_VERSION_HOOK. */ -extern __const char *argp_program_version; - -/* If defined or set by the user program to a non-zero value, then a default - option --version is added (unless the ARGP_NO_HELP flag is used), which - calls this function with a stream to print the version to and a pointer to - the current parsing state, and then exits (unless the ARGP_NO_EXIT flag is - used). This variable takes precedent over ARGP_PROGRAM_VERSION. */ -extern void (*argp_program_version_hook) (FILE *__restrict __stream, - struct argp_state *__restrict - __state); - -/* If defined or set by the user program, it should point to string that is - the bug-reporting address for the program. It will be printed by - argp_help if the ARGP_HELP_BUG_ADDR flag is set (as it is by various - standard help messages), embedded in a sentence that says something like - `Report bugs to ADDR.'. */ -extern __const char *argp_program_bug_address; - -/* The exit status that argp will use when exiting due to a parsing error. - If not defined or set by the user program, this defaults to EX_USAGE from - <sysexits.h>. */ -extern error_t argp_err_exit_status; - -/* Flags for argp_help. */ -#define ARGP_HELP_USAGE 0x01 /* a Usage: message. */ -#define ARGP_HELP_SHORT_USAGE 0x02 /* " but don't actually print options. */ -#define ARGP_HELP_SEE 0x04 /* a `Try ... for more help' message. */ -#define ARGP_HELP_LONG 0x08 /* a long help message. */ -#define ARGP_HELP_PRE_DOC 0x10 /* doc string preceding long help. */ -#define ARGP_HELP_POST_DOC 0x20 /* doc string following long help. */ -#define ARGP_HELP_DOC (ARGP_HELP_PRE_DOC | ARGP_HELP_POST_DOC) -#define ARGP_HELP_BUG_ADDR 0x40 /* bug report address */ -#define ARGP_HELP_LONG_ONLY 0x80 /* modify output appropriately to - reflect ARGP_LONG_ONLY mode. */ - -/* These ARGP_HELP flags are only understood by argp_state_help. */ -#define ARGP_HELP_EXIT_ERR 0x100 /* Call exit(1) instead of returning. */ -#define ARGP_HELP_EXIT_OK 0x200 /* Call exit(0) instead of returning. */ - -/* The standard thing to do after a program command line parsing error, if an - error message has already been printed. */ -#define ARGP_HELP_STD_ERR \ - (ARGP_HELP_SEE | ARGP_HELP_EXIT_ERR) -/* The standard thing to do after a program command line parsing error, if no - more specific error message has been printed. */ -#define ARGP_HELP_STD_USAGE \ - (ARGP_HELP_SHORT_USAGE | ARGP_HELP_SEE | ARGP_HELP_EXIT_ERR) -/* The standard thing to do in response to a --help option. */ -#define ARGP_HELP_STD_HELP \ - (ARGP_HELP_SHORT_USAGE | ARGP_HELP_LONG | ARGP_HELP_EXIT_OK \ - | ARGP_HELP_DOC | ARGP_HELP_BUG_ADDR) - -/* Output a usage message for ARGP to STREAM. FLAGS are from the set - ARGP_HELP_*. */ -extern void argp_help (__const struct argp *__restrict __argp, - FILE *__restrict __stream, - unsigned __flags, char *__restrict __name) __THROW; -extern void __argp_help (__const struct argp *__restrict __argp, - FILE *__restrict __stream, unsigned __flags, - char *__name) __THROW; - -/* The following routines are intended to be called from within an argp - parsing routine (thus taking an argp_state structure as the first - argument). They may or may not print an error message and exit, depending - on the flags in STATE -- in any case, the caller should be prepared for - them *not* to exit, and should return an appropiate error after calling - them. [argp_usage & argp_error should probably be called argp_state_..., - but they're used often enough that they should be short] */ - -/* Output, if appropriate, a usage message for STATE to STREAM. FLAGS are - from the set ARGP_HELP_*. */ -extern void argp_state_help (__const struct argp_state *__restrict __state, - FILE *__restrict __stream, - unsigned int __flags) __THROW; -extern void __argp_state_help (__const struct argp_state *__restrict __state, - FILE *__restrict __stream, - unsigned int __flags) __THROW; - -/* Possibly output the standard usage message for ARGP to stderr and exit. */ -extern void argp_usage (__const struct argp_state *__state) __THROW; -extern void __argp_usage (__const struct argp_state *__state) __THROW; - -/* If appropriate, print the printf string FMT and following args, preceded - by the program name and `:', to stderr, and followed by a `Try ... --help' - message, then exit (1). */ -extern void argp_error (__const struct argp_state *__restrict __state, - __const char *__restrict __fmt, ...) __THROW - __attribute__ ((__format__ (__printf__, 2, 3))); -extern void __argp_error (__const struct argp_state *__restrict __state, - __const char *__restrict __fmt, ...) __THROW - __attribute__ ((__format__ (__printf__, 2, 3))); - -/* Similar to the standard gnu error-reporting function error(), but will - respect the ARGP_NO_EXIT and ARGP_NO_ERRS flags in STATE, and will print - to STATE->err_stream. This is useful for argument parsing code that is - shared between program startup (when exiting is desired) and runtime - option parsing (when typically an error code is returned instead). The - difference between this function and argp_error is that the latter is for - *parsing errors*, and the former is for other problems that occur during - parsing but don't reflect a (syntactic) problem with the input. */ -extern void argp_failure (__const struct argp_state *__restrict __state, - int __status, int __errnum, - __const char *__restrict __fmt, ...) __THROW - __attribute__ ((__format__ (__printf__, 4, 5))); -extern void __argp_failure (__const struct argp_state *__restrict __state, - int __status, int __errnum, - __const char *__restrict __fmt, ...) __THROW - __attribute__ ((__format__ (__printf__, 4, 5))); - -/* Returns true if the option OPT is a valid short option. */ -extern int _option_is_short (__const struct argp_option *__opt) __THROW; -extern int __option_is_short (__const struct argp_option *__opt) __THROW; - -/* Returns true if the option OPT is in fact the last (unused) entry in an - options array. */ -extern int _option_is_end (__const struct argp_option *__opt) __THROW; -extern int __option_is_end (__const struct argp_option *__opt) __THROW; - -/* Return the input field for ARGP in the parser corresponding to STATE; used - by the help routines. */ -extern void *_argp_input (__const struct argp *__restrict __argp, - __const struct argp_state *__restrict __state) - __THROW; -extern void *__argp_input (__const struct argp *__restrict __argp, - __const struct argp_state *__restrict __state) - __THROW; - -#ifdef __USE_EXTERN_INLINES - -# if !_LIBC -# define __argp_usage argp_usage -# define __argp_state_help argp_state_help -# define __option_is_short _option_is_short -# define __option_is_end _option_is_end -# endif - -# ifndef ARGP_EI -# define ARGP_EI extern __inline__ -# endif - -ARGP_EI void -__argp_usage (__const struct argp_state *__state) __THROW -{ - __argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE); -} - -ARGP_EI int -__option_is_short (__const struct argp_option *__opt) __THROW -{ - if (__opt->flags & OPTION_DOC) - return 0; - else - { - int __key = __opt->key; - return __key > 0 && isprint (__key); - } -} - -ARGP_EI int -__option_is_end (__const struct argp_option *__opt) __THROW -{ - return !__opt->key && !__opt->name && !__opt->doc && !__opt->group; -} - -# if !_LIBC -# undef __argp_usage -# undef __argp_state_help -# undef __option_is_short -# undef __option_is_end -# endif -#endif /* Use extern inlines. */ - -#ifdef __cplusplus -} -#endif - -#endif /* argp.h */ diff --git a/newlib/libc/sys/linux/include/bp-sym.h b/newlib/libc/sys/linux/include/bp-sym.h deleted file mode 100644 index 249a4bd66..000000000 --- a/newlib/libc/sys/linux/include/bp-sym.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __BP_SYM_H__ -#define __BP_SYM_H__ - -#define BP_SYM(NAME) NAME - -#endif diff --git a/newlib/libc/sys/linux/include/cmathcalls.h b/newlib/libc/sys/linux/include/cmathcalls.h deleted file mode 100644 index c680c6d8e..000000000 --- a/newlib/libc/sys/linux/include/cmathcalls.h +++ /dev/null @@ -1,158 +0,0 @@ -/* Prototype declarations for complex math functions; - helper file for <complex.h>. - Copyright (C) 1997, 1998, 2001 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* NOTE: Because of the special way this file is used by <complex.h>, this - file must NOT be protected from multiple inclusion as header files - usually are. - - This file provides prototype declarations for the math functions. - Most functions are declared using the macro: - - __MATHCALL (NAME, (ARGS...)); - - This means there is a function `NAME' returning `double' and a function - `NAMEf' returning `float'. Each place `_Mdouble_' appears in the - prototype, that is actually `double' in the prototype for `NAME' and - `float' in the prototype for `NAMEf'. Reentrant variant functions are - called `NAME_r' and `NAMEf_r'. - - Functions returning other types like `int' are declared using the macro: - - __MATHDECL (TYPE, NAME, (ARGS...)); - - This is just like __MATHCALL but for a function returning `TYPE' - instead of `_Mdouble_'. In all of these cases, there is still - both a `NAME' and a `NAMEf' that takes `float' arguments. */ - -#ifndef _COMPLEX_H -#error "Never use <bits/cmathcalls.h> directly; include <complex.h> instead." -#endif - -#define _Mdouble_complex_ _Mdouble_ _Complex - - -/* Trigonometric functions. */ - -/* Arc cosine of Z. */ -__MATHCALL (cacos, (_Mdouble_complex_ __z)); -/* Arc sine of Z. */ -__MATHCALL (casin, (_Mdouble_complex_ __z)); -/* Arc tangent of Z. */ -__MATHCALL (catan, (_Mdouble_complex_ __z)); - -/* Cosine of Z. */ -__MATHCALL (ccos, (_Mdouble_complex_ __z)); -/* Sine of Z. */ -__MATHCALL (csin, (_Mdouble_complex_ __z)); -/* Tangent of Z. */ -__MATHCALL (ctan, (_Mdouble_complex_ __z)); - - -/* Hyperbolic functions. */ - -/* Hyperbolic arc cosine of Z. */ -__MATHCALL (cacosh, (_Mdouble_complex_ __z)); -/* Hyperbolic arc sine of Z. */ -__MATHCALL (casinh, (_Mdouble_complex_ __z)); -/* Hyperbolic arc tangent of Z. */ -__MATHCALL (catanh, (_Mdouble_complex_ __z)); - -/* Hyperbolic cosine of Z. */ -__MATHCALL (ccosh, (_Mdouble_complex_ __z)); -/* Hyperbolic sine of Z. */ -__MATHCALL (csinh, (_Mdouble_complex_ __z)); -/* Hyperbolic tangent of Z. */ -__MATHCALL (ctanh, (_Mdouble_complex_ __z)); - - -/* Exponential and logarithmic functions. */ - -/* Exponential function of Z. */ -__MATHCALL (cexp, (_Mdouble_complex_ __z)); - -/* Natural logarithm of Z. */ -__MATHCALL (clog, (_Mdouble_complex_ __z)); - -#ifdef __USE_GNU -/* The base 10 logarithm is not defined by the standard but to implement - the standard C++ library it is handy. */ -__MATHCALL (clog10, (_Mdouble_complex_ __z)); -#endif - -/* Power functions. */ - -/* Return X to the Y power. */ -__MATHCALL (cpow, (_Mdouble_complex_ __x, _Mdouble_complex_ __y)); - -/* Return the square root of Z. */ -__MATHCALL (csqrt, (_Mdouble_complex_ __z)); - - -/* Absolute value, conjugates, and projection. */ - -/* Absolute value of Z. */ -__MATHDECL (_Mdouble_,cabs, (_Mdouble_complex_ __z)); - -/* Argument value of Z. */ -__MATHDECL (_Mdouble_,carg, (_Mdouble_complex_ __z)); - -/* Complex conjugate of Z. */ -__MATHCALL (conj, (_Mdouble_complex_ __z)); - -/* Projection of Z onto the Riemann sphere. */ -__MATHCALL (cproj, (_Mdouble_complex_ __z)); - - -/* Decomposing complex values. */ - -/* Imaginary part of Z. */ -__MATHDECL (_Mdouble_,cimag, (_Mdouble_complex_ __z)); - -/* Real part of Z. */ -__MATHDECL (_Mdouble_,creal, (_Mdouble_complex_ __z)); - - -/* Now some optimized versions. GCC has handy notations for these - functions. Recent GCC handles these as builtin functions so does - not need inlines. */ -#if defined __GNUC__ && !__GNUC_PREREQ (2, 97) && defined __OPTIMIZE__ - -/* Imaginary part of Z. */ -extern __inline _Mdouble_ -__MATH_PRECNAME(cimag) (_Mdouble_complex_ __z) __THROW -{ - return __imag__ __z; -} - -/* Real part of Z. */ -extern __inline _Mdouble_ -__MATH_PRECNAME(creal) (_Mdouble_complex_ __z) __THROW -{ - return __real__ __z; -} - -/* Complex conjugate of Z. */ -extern __inline _Mdouble_complex_ -__MATH_PRECNAME(conj) (_Mdouble_complex_ __z) __THROW -{ - return __extension__ ~__z; -} - -#endif diff --git a/newlib/libc/sys/linux/include/complex.h b/newlib/libc/sys/linux/include/complex.h deleted file mode 100644 index daa465674..000000000 --- a/newlib/libc/sys/linux/include/complex.h +++ /dev/null @@ -1,108 +0,0 @@ -/* Copyright (C) 1997, 1998, 1999, 2000 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* - * ISO C99: 7.3 Complex arithmetic <complex.h> - */ - -#ifndef _COMPLEX_H -#define _COMPLEX_H 1 - -#include <sys/types.h> -#include <features.h> - -__BEGIN_DECLS - -#define __CONCAT(x,y) x ## y -/* We might need to add support for more compilers here. But since ISO - C99 is out hopefully all maintained compilers will soon provide the data - types `float complex' and `double complex'. */ -#if __GNUC_PREREQ (2, 7) && !__GNUC_PREREQ (2, 97) -# define _Complex __complex__ -#endif - -#define complex _Complex - -/* Narrowest imaginary unit. This depends on the floating-point - evaluation method. - XXX This probably has to go into a gcc related file. */ -#define _Complex_I (__extension__ 1.0iF) - -/* Another more descriptive name is `I'. - XXX Once we have the imaginary support switch this to _Imaginary_I. */ -#undef I -#define I _Complex_I - -/* The file <bits/cmathcalls.h> contains the prototypes for all the - actual math functions. These macros are used for those prototypes, - so we can easily declare each function as both `name' and `__name', - and can declare the float versions `namef' and `__namef'. */ - -#define __MATHCALL(function, args) \ - __MATHDECL (_Mdouble_complex_,function, args) -#define __MATHDECL(type, function, args) \ - __MATHDECL_1(type, function, args); \ - __MATHDECL_1(type, __CONCAT(__,function), args) -#define __MATHDECL_1(type, function, args) \ - extern type __MATH_PRECNAME(function) args __THROW - -#define _Mdouble_ double -#define __MATH_PRECNAME(name) name -#include <cmathcalls.h> -#undef _Mdouble_ -#undef __MATH_PRECNAME - -/* Now the float versions. */ -#ifndef _Mfloat_ -# define _Mfloat_ float -#endif -#define _Mdouble_ _Mfloat_ -#ifdef __STDC__ -# define __MATH_PRECNAME(name) name##f -#else -# define __MATH_PRECNAME(name) name/**/f -#endif -#include <cmathcalls.h> -#undef _Mdouble_ -#undef __MATH_PRECNAME - -#if 0 -/* And the long double versions. It is non-critical to define them - here unconditionally since `long double' is required in ISO C99. */ -#if __STDC__ - 0 || __GNUC__ - 0 && !defined __NO_LONG_DOUBLE_MATH -# ifndef _Mlong_double_ -# define _Mlong_double_ long double -# endif -# define _Mdouble_ _Mlong_double_ -# ifdef __STDC__ -# define __MATH_PRECNAME(name) name##l -# else -# define __MATH_PRECNAME(name) name/**/l -# endif -# include <cmathcalls.h> -#endif -#endif -#undef _Mdouble_ -#undef __MATH_PRECNAME -#undef __MATHDECL_1 -#undef __MATHDECL -#undef __MATHCALL - -__END_DECLS - -#endif /* complex.h */ diff --git a/newlib/libc/sys/linux/include/getopt.h b/newlib/libc/sys/linux/include/getopt.h deleted file mode 100644 index 994f86001..000000000 --- a/newlib/libc/sys/linux/include/getopt.h +++ /dev/null @@ -1,27 +0,0 @@ -/* libc/sys/linux/include/getopt.h - Extended command line parsing */ - -/* Written 2000 by Werner Almesberger */ - - -#ifndef _NEWLIB_GETOPT_H -#define _NEWLIB_GETOPT_H - -#include <unistd.h> - - -enum { no_argument, required_argument, optional_argument }; - -struct option { - const char *name; - int has_arg; - int *flag; - int val; -}; - -int getopt_long(int argc,char *const argv[],const char *optstring, - const struct option *longopts,int *longindex); - -int getopt_long_only(int argc,char *const argv[],const char *optstring, - const struct option *longopts,int *longindex); - -#endif diff --git a/newlib/libc/sys/linux/include/limits.h b/newlib/libc/sys/linux/include/limits.h deleted file mode 100644 index 45cd6f253..000000000 --- a/newlib/libc/sys/linux/include/limits.h +++ /dev/null @@ -1,153 +0,0 @@ -/* Copyright (C) 1991, 92, 96, 97, 98, 99, 2000 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* - * ISO C99 Standard: 7.10/5.2.4.2.1 Sizes of integer types <limits.h> - */ - -#ifndef _LIBC_LIMITS_H_ -#define _LIBC_LIMITS_H_ 1 - -#include <features.h> - - -/* Maximum length of any multibyte character in any locale. - We define this value here since the gcc header does not define - the correct value. */ -#define MB_LEN_MAX 16 - - -/* If we are not using GNU CC we have to define all the symbols ourself. - Otherwise use gcc's definitions (see below). */ -#if !defined __GNUC__ || __GNUC__ < 2 - -/* We only protect from multiple inclusion here, because all the other - #include's protect themselves, and in GCC 2 we may #include_next through - multiple copies of this file before we get to GCC's. */ -# ifndef _LIMITS_H -# define _LIMITS_H 1 - -#include <bits/wordsize.h> - -/* We don't have #include_next. - Define ANSI <limits.h> for standard 32-bit words. */ - -/* These assume 8-bit `char's, 16-bit `short int's, - and 32-bit `int's and `long int's. */ - -/* Number of bits in a `char'. */ -# define CHAR_BIT 8 - -/* Minimum and maximum values a `signed char' can hold. */ -# define SCHAR_MIN (-128) -# define SCHAR_MAX 127 - -/* Maximum value an `unsigned char' can hold. (Minimum is 0.) */ -# define UCHAR_MAX 255 - -/* Minimum and maximum values a `char' can hold. */ -# ifdef __CHAR_UNSIGNED__ -# define CHAR_MIN 0 -# define CHAR_MAX UCHAR_MAX -# else -# define CHAR_MIN SCHAR_MIN -# define CHAR_MAX SCHAR_MAX -# endif - -/* Minimum and maximum values a `signed short int' can hold. */ -# define SHRT_MIN (-32768) -# define SHRT_MAX 32767 - -/* Maximum value an `unsigned short int' can hold. (Minimum is 0.) */ -# define USHRT_MAX 65535 - -/* Minimum and maximum values a `signed int' can hold. */ -# define INT_MIN (-INT_MAX - 1) -# define INT_MAX 2147483647 - -/* Maximum value an `unsigned int' can hold. (Minimum is 0.) */ -# define UINT_MAX 4294967295U - -/* Minimum and maximum values a `signed long int' can hold. */ -# if __WORDSIZE == 64 -# define LONG_MAX 9223372036854775807L -# else -# define LONG_MAX 2147483647L -# endif -# define LONG_MIN (-LONG_MAX - 1L) - -/* Maximum value an `unsigned long int' can hold. (Minimum is 0.) */ -# if __WORDSIZE == 64 -# define ULONG_MAX 18446744073709551615UL -# else -# define ULONG_MAX 4294967295UL -# endif - -# ifdef __USE_ISOC99 - -/* Minimum and maximum values a `signed long long int' can hold. */ -# define LLONG_MAX 9223372036854775807LL -# define LLONG_MIN (-LLONG_MAX - 1LL) - -/* Maximum value an `unsigned long long int' can hold. (Minimum is 0.) */ -# define ULLONG_MAX 18446744073709551615ULL - -# endif /* ISO C99 */ - -# endif /* limits.h */ -#endif /* GCC 2. */ - -#endif /* !_LIBC_LIMITS_H_ */ - - /* Get the compiler's limits.h, which defines almost all the ISO constants. - - We put this #include_next outside the double inclusion check because - it should be possible to include this file more than once and still get - the definitions from gcc's header. */ -#if defined __GNUC__ && !defined _GCC_LIMITS_H_ -/* `_GCC_LIMITS_H_' is what GCC's file defines. */ -# include_next <limits.h> - -/* The <limits.h> files in some gcc versions don't define LLONG_MIN, - LLONG_MAX, and ULLONG_MAX. Instead only the values gcc defined for - ages are available. */ -# ifdef __USE_ISOC99 -# ifndef LLONG_MIN -# define LLONG_MIN LONG_LONG_MIN -# endif -# ifndef LLONG_MAX -# define LLONG_MAX LONG_LONG_MAX -# endif -# ifndef ULLONG_MAX -# define ULLONG_MAX ULONG_LONG_MAX -# endif -# endif -#endif - -#ifdef __USE_POSIX -/* POSIX adds things to <limits.h>. */ -# include <bits/posix1_lim.h> -#endif - -#ifdef __USE_POSIX2 -# include <bits/posix2_lim.h> -#endif - -#ifdef __USE_XOPEN -# include <bits/xopen_lim.h> -#endif diff --git a/newlib/libc/sys/linux/include/malloc.h b/newlib/libc/sys/linux/include/malloc.h deleted file mode 100644 index 7a7bcdbde..000000000 --- a/newlib/libc/sys/linux/include/malloc.h +++ /dev/null @@ -1,266 +0,0 @@ -/* Prototypes and definition for malloc implementation. - Copyright (C) 1996, 1997, 1999, 2000 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _MALLOC_H -#define _MALLOC_H 1 - -#include <features.h> - -/* - `ptmalloc', a malloc implementation for multiple threads without - lock contention, by Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>. - See the files `ptmalloc.c' or `COPYRIGHT' for copying conditions. - - VERSION 2.6.4-pt Wed Dec 4 00:35:54 MET 1996 - - This work is mainly derived from malloc-2.6.4 by Doug Lea - <dl@cs.oswego.edu>, which is available from: - - ftp://g.oswego.edu/pub/misc/malloc.c - - This trimmed-down header file only provides function prototypes and - the exported data structures. For more detailed function - descriptions and compile-time options, see the source file - `ptmalloc.c'. -*/ - -#if defined(__STDC__) || defined (__cplusplus) -# include <stddef.h> -# define __malloc_ptr_t void * -#else -# undef size_t -# define size_t unsigned int -# undef ptrdiff_t -# define ptrdiff_t int -# define __malloc_ptr_t char * -#endif - -#ifdef _LIBC -/* Used by GNU libc internals. */ -# define __malloc_size_t size_t -# define __malloc_ptrdiff_t ptrdiff_t -#elif !defined __attribute_malloc__ -# define __attribute_malloc__ -#endif - -#ifdef __GNUC__ - -/* GCC can always grok prototypes. For C++ programs we add throw() - to help it optimize the function calls. But this works only with - gcc 2.8.x and egcs. */ -# if defined __cplusplus && (__GNUC__ >= 3 || __GNUC_MINOR__ >= 8) -# define __THROW throw () -# else -# define __THROW -# endif -# define __MALLOC_P(args) args __THROW -/* This macro will be used for functions which might take C++ callback - functions. */ -# define __MALLOC_PMT(args) args - -#else /* Not GCC. */ - -# define __THROW - -# if (defined __STDC__ && __STDC__) || defined __cplusplus - -# define __MALLOC_P(args) args -# define __MALLOC_PMT(args) args - -# else /* Not ANSI C or C++. */ - -# define __MALLOC_P(args) () /* No prototypes. */ -# define __MALLOC_PMT(args) () - -# endif /* ANSI C or C++. */ - -#endif /* GCC. */ - -#ifndef NULL -# ifdef __cplusplus -# define NULL 0 -# else -# define NULL ((__malloc_ptr_t) 0) -# endif -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -struct _reent; - -/* Nonzero if the malloc is already initialized. */ -#ifdef _LIBC -/* In the GNU libc we rename the global variable - `__malloc_initialized' to `__libc_malloc_initialized'. */ -# define __malloc_initialized __libc_malloc_initialized -#endif -extern int __malloc_initialized; - -/* Initialize global configuration. Not needed with GNU libc. */ -#ifndef __GLIBC__ -extern void ptmalloc_init __MALLOC_P ((void)); -#endif - -/* Allocate SIZE bytes of memory. */ -extern __malloc_ptr_t malloc __MALLOC_P ((size_t __size)) __attribute_malloc__; -extern __malloc_ptr_t _malloc_r __MALLOC_P ((struct _reent * __r, size_t __size)) __attribute_malloc__; - -/* Allocate NMEMB elements of SIZE bytes each, all initialized to 0. */ -extern __malloc_ptr_t calloc __MALLOC_P ((size_t __nmemb, size_t __size)) - __attribute_malloc__; -extern __malloc_ptr_t _calloc_r __MALLOC_P ((struct _reent * __r, - size_t __nmemb, size_t __size)) - __attribute_malloc__; - -/* Re-allocate the previously allocated block in __ptr, making the new - block SIZE bytes long. */ -extern __malloc_ptr_t realloc __MALLOC_P ((__malloc_ptr_t __ptr, - size_t __size)) - __attribute_malloc__; -extern __malloc_ptr_t _realloc_r __MALLOC_P ((struct _reent * __r, - __malloc_ptr_t __ptr, - size_t __size)) - __attribute_malloc__; - -/* Free a block allocated by `malloc', `realloc' or `calloc'. */ -extern void free __MALLOC_P ((__malloc_ptr_t __ptr)); -extern void _free_r __MALLOC_P ((struct _reent * __r, __malloc_ptr_t __ptr)); - -/* Free a block allocated by `calloc'. */ -extern void cfree __MALLOC_P ((__malloc_ptr_t __ptr)); - -/* Allocate SIZE bytes allocated to ALIGNMENT bytes. */ -extern __malloc_ptr_t memalign __MALLOC_P ((size_t __alignment, size_t __size)); -extern __malloc_ptr_t _memalign_r __MALLOC_P ((struct _reent *__r, - size_t __alignment, - size_t __size)); - -/* Allocate SIZE bytes on a page boundary. */ -extern __malloc_ptr_t valloc __MALLOC_P ((size_t __size)) __attribute_malloc__; -extern __malloc_ptr_t _valloc_r __MALLOC_P ((struct _reent *__r, - size_t __size)) - __attribute_malloc__; - -/* Equivalent to valloc(minimum-page-that-holds(n)), that is, round up - __size to nearest pagesize. */ -extern __malloc_ptr_t pvalloc __MALLOC_P ((size_t __size)) - __attribute_malloc__; -extern __malloc_ptr_t _pvalloc_r __MALLOC_P ((struct _reent *__r, - size_t __size)) - __attribute_malloc__; - -/* Underlying allocation function; successive calls should return - contiguous pieces of memory. */ -extern __malloc_ptr_t (*__morecore) __MALLOC_PMT ((ptrdiff_t __size)); - -/* Default value of `__morecore'. */ -extern __malloc_ptr_t __default_morecore __MALLOC_P ((ptrdiff_t __size)) - __attribute_malloc__; - -/* SVID2/XPG mallinfo structure */ -struct mallinfo { - int arena; /* total space allocated from system */ - int ordblks; /* number of non-inuse chunks */ - int smblks; /* unused -- always zero */ - int hblks; /* number of mmapped regions */ - int hblkhd; /* total space in mmapped regions */ - int usmblks; /* unused -- always zero */ - int fsmblks; /* unused -- always zero */ - int uordblks; /* total allocated space */ - int fordblks; /* total non-inuse space */ - int keepcost; /* top-most, releasable (via malloc_trim) space */ -}; - -/* Returns a copy of the updated current mallinfo. */ -extern struct mallinfo mallinfo __MALLOC_P ((void)); -extern struct mallinfo _mallinfo_r __MALLOC_P ((struct _reent *__r)); - -/* SVID2/XPG mallopt options */ -#ifndef M_MXFAST -# define M_MXFAST 1 /* UNUSED in this malloc */ -#endif -#ifndef M_NLBLKS -# define M_NLBLKS 2 /* UNUSED in this malloc */ -#endif -#ifndef M_GRAIN -# define M_GRAIN 3 /* UNUSED in this malloc */ -#endif -#ifndef M_KEEP -# define M_KEEP 4 /* UNUSED in this malloc */ -#endif - -/* mallopt options that actually do something */ -#define M_TRIM_THRESHOLD -1 -#define M_TOP_PAD -2 -#define M_MMAP_THRESHOLD -3 -#define M_MMAP_MAX -4 -#define M_CHECK_ACTION -5 - -/* General SVID/XPG interface to tunable parameters. */ -extern int mallopt __MALLOC_P ((int __param, int __val)); -extern int _mallopt_r __MALLOC_P ((struct _reent *__r, int __param, int __val)); - -/* Release all but __pad bytes of freed top-most memory back to the - system. Return 1 if successful, else 0. */ -extern int malloc_trim __MALLOC_P ((size_t __pad)); - -/* Report the number of usable allocated bytes associated with allocated - chunk __ptr. */ -extern size_t malloc_usable_size __MALLOC_P ((__malloc_ptr_t __ptr)); - -/* Prints brief summary statistics on stderr. */ -extern void malloc_stats __MALLOC_P ((void)); -extern void _malloc_stats_r __MALLOC_P ((struct _reent *__r)); - -/* Record the state of all malloc variables in an opaque data structure. */ -extern __malloc_ptr_t malloc_get_state __MALLOC_P ((void)); - -/* Restore the state of all malloc variables from data obtained with - malloc_get_state(). */ -extern int malloc_set_state __MALLOC_P ((__malloc_ptr_t __ptr)); - -#if defined __GLIBC__ || defined MALLOC_HOOKS -/* Called once when malloc is initialized; redefining this variable in - the application provides the preferred way to set up the hook - pointers. */ -extern void (*__malloc_initialize_hook) __MALLOC_PMT ((void)); -/* Hooks for debugging and user-defined versions. */ -extern void (*__free_hook) __MALLOC_PMT ((__malloc_ptr_t __ptr, - __const __malloc_ptr_t)); -extern __malloc_ptr_t (*__malloc_hook) __MALLOC_PMT ((size_t __size, - __const __malloc_ptr_t)); -extern __malloc_ptr_t (*__realloc_hook) __MALLOC_PMT ((__malloc_ptr_t __ptr, - size_t __size, - __const __malloc_ptr_t)); -extern __malloc_ptr_t (*__memalign_hook) __MALLOC_PMT ((size_t __alignment, - size_t __size, - __const __malloc_ptr_t)); -extern void (*__after_morecore_hook) __MALLOC_PMT ((void)); - -/* Activate a standard set of debugging hooks. */ -extern void __malloc_check_init __MALLOC_P ((void)); -#endif - -#ifdef __cplusplus -}; /* end of extern "C" */ -#endif - -#endif /* malloc.h */ diff --git a/newlib/libc/sys/linux/include/mcheck.h b/newlib/libc/sys/linux/include/mcheck.h deleted file mode 100644 index 39e396d38..000000000 --- a/newlib/libc/sys/linux/include/mcheck.h +++ /dev/null @@ -1,62 +0,0 @@ -/* Copyright (C) 1996, 1997, 1998, 1999, 2000 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, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* Modified for newlib, July 9, 2002 by Jeff Johnston */ - -#ifndef _MCHECK_H -#define _MCHECK_H 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/* Return values for `mprobe': these are the kinds of inconsistencies that - `mcheck' enables detection of. */ -enum mcheck_status - { - MCHECK_DISABLED = -1, /* Consistency checking is not turned on. */ - MCHECK_OK, /* Block is fine. */ - MCHECK_FREE, /* Block freed twice. */ - MCHECK_HEAD, /* Memory before the block was clobbered. */ - MCHECK_TAIL /* Memory after the block was clobbered. */ - }; - - -/* Activate a standard collection of debugging hooks. This must be called - before `malloc' is ever called. ABORTFUNC is called with an error code - (see enum above) when an inconsistency is detected. If ABORTFUNC is - null, the standard function prints on stderr and then calls `abort'. */ -extern int mcheck (void (*__abortfunc) (enum mcheck_status)); - -/* Similar to `mcheck´ but performs checks for all block whenever one of - the memory handling functions is called. This can be very slow. */ -extern int mcheck_pedantic (void (*__abortfunc) (enum mcheck_status)); - -/* Force check of all blocks now. */ -extern void mcheck_check_all (void); - -/* Check for aberrations in a particular malloc'd block. You must have - called `mcheck' already. These are the same checks that `mcheck' does - when you free or reallocate a block. */ -extern enum mcheck_status mprobe (void *__ptr); - -#ifdef __cplusplus -} -#endif - -#endif /* mcheck.h */ diff --git a/newlib/libc/sys/linux/include/mqueue.h b/newlib/libc/sys/linux/include/mqueue.h deleted file mode 100644 index 1cdc095ec..000000000 --- a/newlib/libc/sys/linux/include/mqueue.h +++ /dev/null @@ -1,34 +0,0 @@ -/* libc/sys/linux/include/mqueue.h - message queue functions */ - -/* Copyright 2002, Red Hat Inc. - all rights reserved */ - -#ifndef __MQUEUE_H -#define __MQUEUE_H - -#include <sys/types.h> -#define __need_sigevent_t 1 -#include <bits/siginfo.h> - -/* message queue types */ -typedef int mqd_t; - -struct mq_attr { - long mq_flags; /* message queue flags */ - long mq_maxmsg; /* maximum number of messages */ - long mq_msgsize; /* maximum message size */ - long mq_curmsgs; /* number of messages currently queued */ -}; - -#define MQ_PRIO_MAX 16 - -/* prototypes */ -mqd_t mq_open (const char *__name, int __oflag, ...); -int mq_close (mqd_t __msgid); -int mq_send (mqd_t __msgid, const char *__msg, size_t __msg_len, unsigned int __msg_prio); -ssize_t mq_receive (mqd_t __msgid, char *__msg, size_t __msg_len, unsigned int *__msg_prio); -int mq_notify (mqd_t __msgid, const struct sigevent *__notification); -int mq_unlink (const char *__name); -int mq_getattr (mqd_t __msgid, struct mq_attr *__mqstat); -int mq_setattr (mqd_t __msgid, const struct mq_attr *__mqstat, struct mq_attr *__omqattr); - -#endif /* __MQUEUE_H */ diff --git a/newlib/libc/sys/linux/include/paths.h b/newlib/libc/sys/linux/include/paths.h deleted file mode 100644 index a87831e74..000000000 --- a/newlib/libc/sys/linux/include/paths.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 1989, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)paths.h 8.1 (Berkeley) 6/2/93 - */ - -#ifndef _PATHS_H_ -#define _PATHS_H_ - -/* Default search path. */ -#define _PATH_DEFPATH "/usr/bin:/bin" -/* All standard utilities path. */ -#define _PATH_STDPATH \ - "/usr/bin:/bin:/usr/sbin:/sbin" - -#define _PATH_BSHELL "/bin/sh" -#define _PATH_CONSOLE "/dev/console" -#define _PATH_CSHELL "/bin/csh" -#define _PATH_DEVDB "/var/run/dev.db" -#define _PATH_DEVNULL "/dev/null" -#define _PATH_DRUM "/dev/drum" -#define _PATH_KLOG "/proc/kmsg" -#define _PATH_KMEM "/dev/kmem" -#define _PATH_LASTLOG "/var/log/lastlog" -#define _PATH_MAILDIR "/var/mail" -#define _PATH_MAN "/usr/share/man" -#define _PATH_MEM "/dev/mem" -#define _PATH_MNTTAB "/etc/fstab" -#define _PATH_MOUNTED "/etc/mtab" -#define _PATH_NOLOGIN "/etc/nologin" -#define _PATH_PRESERVE "/var/lib" -#define _PATH_RWHODIR "/var/spool/rwho" -#define _PATH_SENDMAIL "/usr/sbin/sendmail" -#define _PATH_SHADOW "/etc/shadow" -#define _PATH_SHELLS "/etc/shells" -#define _PATH_TTY "/dev/tty" -#define _PATH_UNIX "/boot/vmlinux" -#define _PATH_UTMP "/var/run/utmp" -#define _PATH_VI "/bin/vi" -#define _PATH_WTMP "/var/log/wtmp" - -/* Provide trailing slash, since mostly used for building pathnames. */ -#define _PATH_DEV "/dev/" -#define _PATH_TMP "/tmp/" -#define _PATH_VARDB "/var/db/" -#define _PATH_VARRUN "/var/run/" -#define _PATH_VARTMP "/var/tmp/" - -#endif /* !_PATHS_H_ */ diff --git a/newlib/libc/sys/linux/include/pthread.h b/newlib/libc/sys/linux/include/pthread.h deleted file mode 100644 index d7addbe46..000000000 --- a/newlib/libc/sys/linux/include/pthread.h +++ /dev/null @@ -1,682 +0,0 @@ -/* Linuxthreads - a simple clone()-based implementation of Posix */ -/* threads for Linux. */ -/* Copyright (C) 1996 Xavier Leroy (Xavier.Leroy@inria.fr) */ -/* */ -/* This program is free software; you can redistribute it and/or */ -/* modify it under the terms of the GNU Library General Public License */ -/* as published by the Free Software Foundation; either version 2 */ -/* of the License, or (at your option) any later version. */ -/* */ -/* 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 Library General Public License for more details. */ - -#ifndef _PTHREAD_H -#define _PTHREAD_H 1 - -#include <features.h> - -#include <sched.h> -#include <time.h> - -#define __need_sigset_t -#include <signal.h> -#include <bits/pthreadtypes.h> -#include <bits/initspin.h> - - -__BEGIN_DECLS - -/* Initializers. */ - -#define PTHREAD_MUTEX_INITIALIZER \ - {0, 0, 0, PTHREAD_MUTEX_TIMED_NP, __LOCK_INITIALIZER} -#ifdef __USE_GNU -# define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \ - {0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, __LOCK_INITIALIZER} -# define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \ - {0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, __LOCK_INITIALIZER} -# define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \ - {0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, __LOCK_INITIALIZER} -#endif - -#define PTHREAD_COND_INITIALIZER {__LOCK_INITIALIZER, 0} - -#ifdef __USE_UNIX98 -# define PTHREAD_RWLOCK_INITIALIZER \ - { __LOCK_INITIALIZER, 0, NULL, NULL, NULL, \ - PTHREAD_RWLOCK_DEFAULT_NP, PTHREAD_PROCESS_PRIVATE } -#endif -#ifdef __USE_GNU -# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \ - { __LOCK_INITIALIZER, 0, NULL, NULL, NULL, \ - PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, PTHREAD_PROCESS_PRIVATE } -#endif - -/* Values for attributes. */ - -enum -{ - PTHREAD_CREATE_JOINABLE, -#define PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_JOINABLE - PTHREAD_CREATE_DETACHED -#define PTHREAD_CREATE_DETACHED PTHREAD_CREATE_DETACHED -}; - -enum -{ - PTHREAD_INHERIT_SCHED, -#define PTHREAD_INHERIT_SCHED PTHREAD_INHERIT_SCHED - PTHREAD_EXPLICIT_SCHED -#define PTHREAD_EXPLICIT_SCHED PTHREAD_EXPLICIT_SCHED -}; - -enum -{ - PTHREAD_SCOPE_SYSTEM, -#define PTHREAD_SCOPE_SYSTEM PTHREAD_SCOPE_SYSTEM - PTHREAD_SCOPE_PROCESS -#define PTHREAD_SCOPE_PROCESS PTHREAD_SCOPE_PROCESS -}; - -enum -{ - PTHREAD_MUTEX_TIMED_NP, - PTHREAD_MUTEX_RECURSIVE_NP, - PTHREAD_MUTEX_ERRORCHECK_NP, - PTHREAD_MUTEX_ADAPTIVE_NP -#ifdef __USE_UNIX98 - , - PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP, - PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP, - PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP, - PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL -#endif -#ifdef __USE_GNU - /* For compatibility. */ - , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_ADAPTIVE_NP -#endif -}; - -enum -{ - PTHREAD_PROCESS_PRIVATE, -#define PTHREAD_PROCESS_PRIVATE PTHREAD_PROCESS_PRIVATE - PTHREAD_PROCESS_SHARED -#define PTHREAD_PROCESS_SHARED PTHREAD_PROCESS_SHARED -}; - -#ifdef __USE_UNIX98 -enum -{ - PTHREAD_RWLOCK_PREFER_READER_NP, - PTHREAD_RWLOCK_PREFER_WRITER_NP, - PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, - PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_WRITER_NP -}; -#endif /* Unix98 */ - -#define PTHREAD_ONCE_INIT 0 - -/* Special constants */ - -#ifdef __USE_XOPEN2K -/* -1 is distinct from 0 and all errno constants */ -# define PTHREAD_BARRIER_SERIAL_THREAD -1 -#endif - -/* Cleanup buffers */ - -struct _pthread_cleanup_buffer -{ - void (*__routine) (void *); /* Function to call. */ - void *__arg; /* Its argument. */ - int __canceltype; /* Saved cancellation type. */ - struct _pthread_cleanup_buffer *__prev; /* Chaining of cleanup functions. */ -}; - -/* Cancellation */ - -enum -{ - PTHREAD_CANCEL_ENABLE, -#define PTHREAD_CANCEL_ENABLE PTHREAD_CANCEL_ENABLE - PTHREAD_CANCEL_DISABLE -#define PTHREAD_CANCEL_DISABLE PTHREAD_CANCEL_DISABLE -}; -enum -{ - PTHREAD_CANCEL_DEFERRED, -#define PTHREAD_CANCEL_DEFERRED PTHREAD_CANCEL_DEFERRED - PTHREAD_CANCEL_ASYNCHRONOUS -#define PTHREAD_CANCEL_ASYNCHRONOUS PTHREAD_CANCEL_ASYNCHRONOUS -}; -#define PTHREAD_CANCELED ((void *) -1) - - -/* Function for handling threads. */ - -/* Create a thread with given attributes ATTR (or default attributes - if ATTR is NULL), and call function START_ROUTINE with given - arguments ARG. */ -extern int pthread_create (pthread_t *__restrict __thread1, - __const pthread_attr_t *__restrict __attr, - void *(*__start_routine) (void *), - void *__restrict __arg) __THROW; - -/* Obtain the identifier of the current thread. */ -extern pthread_t pthread_self (void) __THROW; - -/* Compare two thread identifiers. */ -extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) __THROW; - -/* Terminate calling thread. */ -extern void pthread_exit (void *__retval) - __THROW __attribute__ ((__noreturn__)); - -/* Make calling thread wait for termination of the thread TH. The - exit status of the thread is stored in *THREAD_RETURN, if THREAD_RETURN - is not NULL. */ -extern int pthread_join (pthread_t __th, void **__thread_return) __THROW; - -/* Indicate that the thread TH is never to be joined with PTHREAD_JOIN. - The resources of TH will therefore be freed immediately when it - terminates, instead of waiting for another thread to perform PTHREAD_JOIN - on it. */ -extern int pthread_detach (pthread_t __th) __THROW; - - -/* Functions for handling attributes. */ - -/* Initialize thread attribute *ATTR with default attributes - (detachstate is PTHREAD_JOINABLE, scheduling policy is SCHED_OTHER, - no user-provided stack). */ -extern int pthread_attr_init (pthread_attr_t *__attr) __THROW; - -/* Destroy thread attribute *ATTR. */ -extern int pthread_attr_destroy (pthread_attr_t *__attr) __THROW; - -/* Set the `detachstate' attribute in *ATTR according to DETACHSTATE. */ -extern int pthread_attr_setdetachstate (pthread_attr_t *__attr, - int __detachstate) __THROW; - -/* Return in *DETACHSTATE the `detachstate' attribute in *ATTR. */ -extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr, - int *__detachstate) __THROW; - -/* Set scheduling parameters (priority, etc) in *ATTR according to PARAM. */ -extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr, - __const struct sched_param *__restrict - __param) __THROW; - -/* Return in *PARAM the scheduling parameters of *ATTR. */ -extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict - __attr, - struct sched_param *__restrict __param) - __THROW; - -/* Set scheduling policy in *ATTR according to POLICY. */ -extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy) - __THROW; - -/* Return in *POLICY the scheduling policy of *ATTR. */ -extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict - __attr, int *__restrict __policy) - __THROW; - -/* Set scheduling inheritance mode in *ATTR according to INHERIT. */ -extern int pthread_attr_setinheritsched (pthread_attr_t *__attr, - int __inherit) __THROW; - -/* Return in *INHERIT the scheduling inheritance mode of *ATTR. */ -extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict - __attr, int *__restrict __inherit) - __THROW; - -/* Set scheduling contention scope in *ATTR according to SCOPE. */ -extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope) - __THROW; - -/* Return in *SCOPE the scheduling contention scope of *ATTR. */ -extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr, - int *__restrict __scope) __THROW; - -#ifdef __USE_UNIX98 -/* Set the size of the guard area at the bottom of the thread. */ -extern int pthread_attr_setguardsize (pthread_attr_t *__attr, - size_t __guardsize) __THROW; - -/* Get the size of the guard area at the bottom of the thread. */ -extern int pthread_attr_getguardsize (__const pthread_attr_t *__restrict - __attr, size_t *__restrict __guardsize) - __THROW; -#endif - -/* Set the starting address of the stack of the thread to be created. - Depending on whether the stack grows up or down the value must either - be higher or lower than all the address in the memory block. The - minimal size of the block must be PTHREAD_STACK_SIZE. */ -extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, - void *__stackaddr) __THROW; - -/* Return the previously set address for the stack. */ -extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict - __attr, void **__restrict __stackaddr) - __THROW; - -#ifdef __USE_XOPEN2K -/* The following two interfaces are intended to replace the last two. They - require setting the address as well as the size since only setting the - address will make the implementation on some architectures impossible. */ -extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, - size_t __stacksize) __THROW; - -/* Return the previously set address for the stack. */ -extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr, - void **__restrict __stackaddr, - size_t *__restrict __stacksize) __THROW; -#endif - -/* Add information about the minimum stack size needed for the thread - to be started. This size must never be less than PTHREAD_STACK_SIZE - and must also not exceed the system limits. */ -extern int pthread_attr_setstacksize (pthread_attr_t *__attr, - size_t __stacksize) __THROW; - -/* Return the currently used minimal stack size. */ -extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict - __attr, size_t *__restrict __stacksize) - __THROW; - -#ifdef __USE_GNU -/* Get thread attributes corresponding to the already running thread TH. */ -extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) __THROW; -#endif - -/* Functions for scheduling control. */ - -/* Set the scheduling parameters for TARGET_THREAD according to POLICY - and *PARAM. */ -extern int pthread_setschedparam (pthread_t __target_thread, int __policy, - __const struct sched_param *__param) - __THROW; - -/* Return in *POLICY and *PARAM the scheduling parameters for TARGET_THREAD. */ -extern int pthread_getschedparam (pthread_t __target_thread, - int *__restrict __policy, - struct sched_param *__restrict __param) - __THROW; - -#ifdef __USE_UNIX98 -/* Determine level of concurrency. */ -extern int pthread_getconcurrency (void) __THROW; - -/* Set new concurrency level to LEVEL. */ -extern int pthread_setconcurrency (int __level) __THROW; -#endif - -#ifdef __USE_GNU -/* Yield the processor to another thread or process. - This function is similar to the POSIX `sched_yield' function but - might be differently implemented in the case of a m-on-n thread - implementation. */ -extern int pthread_yield (void) __THROW; -#endif - -/* Functions for mutex handling. */ - -/* Initialize MUTEX using attributes in *MUTEX_ATTR, or use the - default values if later is NULL. */ -extern int pthread_mutex_init (pthread_mutex_t *__restrict __mutex, - __const pthread_mutexattr_t *__restrict - __mutex_attr) __THROW; - -/* Destroy MUTEX. */ -extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) __THROW; - -/* Try to lock MUTEX. */ -extern int pthread_mutex_trylock (pthread_mutex_t *__mutex) __THROW; - -/* Wait until lock for MUTEX becomes available and lock it. */ -extern int pthread_mutex_lock (pthread_mutex_t *__mutex) __THROW; - -#ifdef __USE_XOPEN2K -/* Wait until lock becomes available, or specified time passes. */ -extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, - __const struct timespec *__restrict - __abstime) __THROW; -#endif - -/* Unlock MUTEX. */ -extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) __THROW; - - -/* Functions for handling mutex attributes. */ - -/* Initialize mutex attribute object ATTR with default attributes - (kind is PTHREAD_MUTEX_TIMED_NP). */ -extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) __THROW; - -/* Destroy mutex attribute object ATTR. */ -extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) __THROW; - -/* Get the process-shared flag of the mutex attribute ATTR. */ -extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t * - __restrict __attr, - int *__restrict __pshared) __THROW; - -/* Set the process-shared flag of the mutex attribute ATTR. */ -extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr, - int __pshared) __THROW; - -#ifdef __USE_UNIX98 -/* Set the mutex kind attribute in *ATTR to KIND (either PTHREAD_MUTEX_NORMAL, - PTHREAD_MUTEX_RECURSIVE, PTHREAD_MUTEX_ERRORCHECK, or - PTHREAD_MUTEX_DEFAULT). */ -extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) - __THROW; - -/* Return in *KIND the mutex kind attribute in *ATTR. */ -extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict - __attr, int *__restrict __kind) __THROW; -#endif - - -/* Functions for handling conditional variables. */ - -/* Initialize condition variable COND using attributes ATTR, or use - the default values if later is NULL. */ -extern int pthread_cond_init (pthread_cond_t *__restrict __cond, - __const pthread_condattr_t *__restrict - __cond_attr) __THROW; - -/* Destroy condition variable COND. */ -extern int pthread_cond_destroy (pthread_cond_t *__cond) __THROW; - -/* Wake up one thread waiting for condition variable COND. */ -extern int pthread_cond_signal (pthread_cond_t *__cond) __THROW; - -/* Wake up all threads waiting for condition variables COND. */ -extern int pthread_cond_broadcast (pthread_cond_t *__cond) __THROW; - -/* Wait for condition variable COND to be signaled or broadcast. - MUTEX is assumed to be locked before. */ -extern int pthread_cond_wait (pthread_cond_t *__restrict __cond, - pthread_mutex_t *__restrict __mutex) __THROW; - -/* Wait for condition variable COND to be signaled or broadcast until - ABSTIME. MUTEX is assumed to be locked before. ABSTIME is an - absolute time specification; zero is the beginning of the epoch - (00:00:00 GMT, January 1, 1970). */ -extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond, - pthread_mutex_t *__restrict __mutex, - __const struct timespec *__restrict - __abstime) __THROW; - -/* Functions for handling condition variable attributes. */ - -/* Initialize condition variable attribute ATTR. */ -extern int pthread_condattr_init (pthread_condattr_t *__attr) __THROW; - -/* Destroy condition variable attribute ATTR. */ -extern int pthread_condattr_destroy (pthread_condattr_t *__attr) __THROW; - -/* Get the process-shared flag of the condition variable attribute ATTR. */ -extern int pthread_condattr_getpshared (__const pthread_condattr_t * - __restrict __attr, - int *__restrict __pshared) __THROW; - -/* Set the process-shared flag of the condition variable attribute ATTR. */ -extern int pthread_condattr_setpshared (pthread_condattr_t *__attr, - int __pshared) __THROW; - - -#ifdef __USE_UNIX98 -/* Functions for handling read-write locks. */ - -/* Initialize read-write lock RWLOCK using attributes ATTR, or use - the default values if later is NULL. */ -extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, - __const pthread_rwlockattr_t *__restrict - __attr) __THROW; - -/* Destroy read-write lock RWLOCK. */ -extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) __THROW; - -/* Acquire read lock for RWLOCK. */ -extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) __THROW; - -/* Try to acquire read lock for RWLOCK. */ -extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) __THROW; - -#ifdef __USE_XOPEN2K -/* Try to acquire read lock for RWLOCK or return after specfied time. */ -extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, - __const struct timespec *__restrict - __abstime) __THROW; -#endif - -/* Acquire write lock for RWLOCK. */ -extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) __THROW; - -/* Try to acquire write lock for RWLOCK. */ -extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) __THROW; - -#ifdef __USE_XOPEN2K -/* Try to acquire write lock for RWLOCK or return after specfied time. */ -extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, - __const struct timespec *__restrict - __abstime) __THROW; -#endif - -/* Unlock RWLOCK. */ -extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) __THROW; - - -/* Functions for handling read-write lock attributes. */ - -/* Initialize attribute object ATTR with default values. */ -extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) __THROW; - -/* Destroy attribute object ATTR. */ -extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) __THROW; - -/* Return current setting of process-shared attribute of ATTR in PSHARED. */ -extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t * - __restrict __attr, - int *__restrict __pshared) __THROW; - -/* Set process-shared attribute of ATTR to PSHARED. */ -extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, - int __pshared) __THROW; - -/* Return current setting of reader/writer preference. */ -extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t *__attr, - int *__pref) __THROW; - -/* Set reader/write preference. */ -extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr, - int __pref) __THROW; -#endif - -#ifdef __USE_XOPEN2K -/* The IEEE Std. 1003.1j-2000 introduces functions to implement - spinlocks. */ - -/* Initialize the spinlock LOCK. If PSHARED is nonzero the spinlock can - be shared between different processes. */ -extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared) - __THROW; - -/* Destroy the spinlock LOCK. */ -extern int pthread_spin_destroy (pthread_spinlock_t *__lock) __THROW; - -/* Wait until spinlock LOCK is retrieved. */ -extern int pthread_spin_lock (pthread_spinlock_t *__lock) __THROW; - -/* Try to lock spinlock LOCK. */ -extern int pthread_spin_trylock (pthread_spinlock_t *__lock) __THROW; - -/* Release spinlock LOCK. */ -extern int pthread_spin_unlock (pthread_spinlock_t *__lock) __THROW; - - -/* Barriers are a also a new feature in 1003.1j-2000. */ - -extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier, - __const pthread_barrierattr_t *__restrict - __attr, unsigned int __count) __THROW; - -extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) __THROW; - -extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) __THROW; - -extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) __THROW; - -extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t * - __restrict __attr, - int *__restrict __pshared) __THROW; - -extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr, - int __pshared) __THROW; - -extern int pthread_barrier_wait (pthread_barrier_t *__barrier) __THROW; -#endif - - -/* Functions for handling thread-specific data. */ - -/* Create a key value identifying a location in the thread-specific - data area. Each thread maintains a distinct thread-specific data - area. DESTR_FUNCTION, if non-NULL, is called with the value - associated to that key when the key is destroyed. - DESTR_FUNCTION is not called if the value associated is NULL when - the key is destroyed. */ -extern int pthread_key_create (pthread_key_t *__key, - void (*__destr_function) (void *)) __THROW; - -/* Destroy KEY. */ -extern int pthread_key_delete (pthread_key_t __key) __THROW; - -/* Store POINTER in the thread-specific data slot identified by KEY. */ -extern int pthread_setspecific (pthread_key_t __key, - __const void *__pointer) __THROW; - -/* Return current value of the thread-specific data slot identified by KEY. */ -extern void *pthread_getspecific (pthread_key_t __key) __THROW; - - -/* Functions for handling initialization. */ - -/* Guarantee that the initialization function INIT_ROUTINE will be called - only once, even if pthread_once is executed several times with the - same ONCE_CONTROL argument. ONCE_CONTROL must point to a static or - extern variable initialized to PTHREAD_ONCE_INIT. */ -extern int pthread_once (pthread_once_t *__once_control, - void (*__init_routine) (void)) __THROW; - - -/* Functions for handling cancellation. */ - -/* Set cancelability state of current thread to STATE, returning old - state in *OLDSTATE if OLDSTATE is not NULL. */ -extern int pthread_setcancelstate (int __state, int *__oldstate) __THROW; - -/* Set cancellation state of current thread to TYPE, returning the old - type in *OLDTYPE if OLDTYPE is not NULL. */ -extern int pthread_setcanceltype (int __type, int *__oldtype) __THROW; - -/* Cancel THREAD immediately or at the next possibility. */ -extern int pthread_cancel (pthread_t __thread1) __THROW; - -/* Test for pending cancellation for the current thread and terminate - the thread as per pthread_exit(PTHREAD_CANCELED) if it has been - cancelled. */ -extern void pthread_testcancel (void) __THROW; - - -/* Install a cleanup handler: ROUTINE will be called with arguments ARG - when the thread is cancelled or calls pthread_exit. ROUTINE will also - be called with arguments ARG when the matching pthread_cleanup_pop - is executed with non-zero EXECUTE argument. - pthread_cleanup_push and pthread_cleanup_pop are macros and must always - be used in matching pairs at the same nesting level of braces. */ - -#define pthread_cleanup_push(routine,arg) \ - { struct _pthread_cleanup_buffer _buffer; \ - _pthread_cleanup_push (&_buffer, (routine), (arg)); - -extern void _pthread_cleanup_push (struct _pthread_cleanup_buffer *__buffer, - void (*__routine) (void *), - void *__arg) __THROW; - -/* Remove a cleanup handler installed by the matching pthread_cleanup_push. - If EXECUTE is non-zero, the handler function is called. */ - -#define pthread_cleanup_pop(execute) \ - _pthread_cleanup_pop (&_buffer, (execute)); } - -extern void _pthread_cleanup_pop (struct _pthread_cleanup_buffer *__buffer, - int __execute) __THROW; - -/* Install a cleanup handler as pthread_cleanup_push does, but also - saves the current cancellation type and set it to deferred cancellation. */ - -#ifdef __USE_GNU -# define pthread_cleanup_push_defer_np(routine,arg) \ - { struct _pthread_cleanup_buffer _buffer; \ - _pthread_cleanup_push_defer (&_buffer, (routine), (arg)); - -extern void _pthread_cleanup_push_defer (struct _pthread_cleanup_buffer *__buffer, - void (*__routine) (void *), - void *__arg) __THROW; - -/* Remove a cleanup handler as pthread_cleanup_pop does, but also - restores the cancellation type that was in effect when the matching - pthread_cleanup_push_defer was called. */ - -# define pthread_cleanup_pop_restore_np(execute) \ - _pthread_cleanup_pop_restore (&_buffer, (execute)); } - -extern void _pthread_cleanup_pop_restore (struct _pthread_cleanup_buffer *__buffer, - int __execute) __THROW; -#endif - - -#ifdef __USE_XOPEN2K -/* Get ID of CPU-time clock for thread THREAD_ID. */ -extern int pthread_getcpuclockid (pthread_t __thread_id, - clockid_t *__clock_id) __THROW; -#endif - - -/* Functions for handling signals. */ -#include <bits/sigthread.h> - - -/* Functions for handling process creation and process execution. */ - -/* Install handlers to be called when a new process is created with FORK. - The PREPARE handler is called in the parent process just before performing - FORK. The PARENT handler is called in the parent process just after FORK. - The CHILD handler is called in the child process. Each of the three - handlers can be NULL, meaning that no handler needs to be called at that - point. - PTHREAD_ATFORK can be called several times, in which case the PREPARE - handlers are called in LIFO order (last added with PTHREAD_ATFORK, - first called before FORK), and the PARENT and CHILD handlers are called - in FIFO (first added, first called). */ - -extern int pthread_atfork (void (*__prepare) (void), - void (*__parent) (void), - void (*__child) (void)) __THROW; - -/* Terminate all threads in the program except the calling process. - Should be called just before invoking one of the exec*() functions. */ - -extern void pthread_kill_other_threads_np (void) __THROW; - -__END_DECLS - -#endif /* pthread.h */ diff --git a/newlib/libc/sys/linux/include/setjmp.h b/newlib/libc/sys/linux/include/setjmp.h deleted file mode 100644 index f07dbab6d..000000000 --- a/newlib/libc/sys/linux/include/setjmp.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - setjmp.h - stubs for future use. -*/ - -#ifndef _SETJMP_H_ -#ifdef __cplusplus -extern "C" { -#endif -#define _SETJMP_H_ - -#include "_ansi.h" -#include <machine/setjmp.h> -#include <signal.h> /* for sigset_t and sigprocmask */ - -typedef struct __sigjmpbuf -{ - __jmp_buf __buf; - int __is_mask_saved; - sigset_t __saved_mask; -} sigjmp_buf; - -typedef __jmp_buf jmp_buf; - -void _EXFUN(longjmp,(jmp_buf __jmpb, int __retval)); -int _EXFUN(setjmp,(jmp_buf __jmpb)); -void _EXFUN(siglongjmp,(sigjmp_buf __jmpb, int __retval)); -int _EXFUN(sigsetjmp,(sigjmp_buf __jmpb, int __savemask)); - -/* sigsetjmp is implemented as macro using setjmp */ - -#define sigsetjmp(__jmpb, __savemask) \ - ( __jmpb.__is_mask_saved = __savemask && \ - (sigprocmask (SIG_BLOCK, NULL, &__jmpb.__saved_mask) == 0), \ - setjmp (__jmpb.__buf) ) - -#ifdef __cplusplus -} -#endif -#endif /* _SETJMP_H_ */ - diff --git a/newlib/libc/sys/linux/include/stdint.h b/newlib/libc/sys/linux/include/stdint.h deleted file mode 100644 index 5c89acd22..000000000 --- a/newlib/libc/sys/linux/include/stdint.h +++ /dev/null @@ -1,18 +0,0 @@ -/* libc/sys/linux/include/stdint.h - Standard integer types */ - -/* Written 2000 by Werner Almesberger */ - - -#ifndef _NEWLIB_STDINT_H -#define _NEWLIB_STDINT_H - -/* - * FIXME: linux/types.h defines various types that rightfully belong into - * stdint.h. So we have no choice but to include linux/types.h directly, even - * if this causes name space pollution. Note: we have to go via sys/types.h - * in order to resolve some other compatibility issues. - */ - -#include <sys/types.h> - -#endif diff --git a/newlib/libc/sys/linux/include/time.h b/newlib/libc/sys/linux/include/time.h deleted file mode 100644 index 8b4b28460..000000000 --- a/newlib/libc/sys/linux/include/time.h +++ /dev/null @@ -1,228 +0,0 @@ -/* - * time.h - * - * Struct and function declarations for dealing with time. - */ - -#ifndef _TIME_H_ - -#include "_ansi.h" -#include <sys/reent.h> -#include <sys/linux_time.h> - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef NULL -#define NULL 0 -#endif - -/* Get _CLOCKS_PER_SEC_ */ -#include <machine/time.h> -#include <sys/types.h> - -/* Time Value Specification Structures, P1003.1b-1993, p. 261 */ -#ifndef _STRUCT_TIMESPEC -#define _STRUCT_TIMESPEC -struct timespec { - time_t tv_sec; /* Seconds */ - long tv_nsec; /* Nanoseconds */ -}; -#endif /* !_STRUCT_TIMESPEC */ - -#ifndef __need_timespec - -#define _TIME_H_ 1 - -#ifndef _CLOCKS_PER_SEC_ -#define _CLOCKS_PER_SEC_ 1000 -#endif - -#define CLOCKS_PER_SEC _CLOCKS_PER_SEC_ -#define CLK_TCK CLOCKS_PER_SEC -#define __need_size_t -#include <stddef.h> - -struct tm -{ - int tm_sec; - int tm_min; - int tm_hour; - int tm_mday; - int tm_mon; - int tm_year; - int tm_wday; - int tm_yday; - int tm_isdst; -}; - -#ifndef __timer_t_defined -# define __timer_t_defined 1 -typedef __timer_t timer_t; -#endif - -clock_t _EXFUN(clock, (void)); -double _EXFUN(difftime, (time_t _time2, time_t _time1)); -time_t _EXFUN(mktime, (struct tm *_timeptr)); -time_t _EXFUN(time, (time_t *_timer)); -#ifndef _REENT_ONLY -char *_EXFUN(asctime, (const struct tm *_tblock)); -char *_EXFUN(ctime, (const time_t *_time)); -struct tm *_EXFUN(gmtime, (const time_t *_timer)); -struct tm *_EXFUN(localtime,(const time_t *_timer)); -#endif -size_t _EXFUN(strftime, (char *_s, size_t _maxsize, const char *_fmt, const struct tm *_t)); - -char *_EXFUN(asctime_r, (const struct tm *, char *)); -char *_EXFUN(ctime_r, (const time_t *, char *)); -struct tm *_EXFUN(gmtime_r, (const time_t *, struct tm *)); -struct tm *_EXFUN(localtime_r, (const time_t *, struct tm *)); - -#ifndef __STRICT_ANSI__ -char *_EXFUN(strptime, (const char *, const char *, struct tm *)); -_VOID _EXFUN(tzset, (_VOID)); -_VOID _EXFUN(_tzset_r, (struct _reent *)); - -/* getdate functions */ - -#ifndef _REENT_ONLY -#define getdate_err (*__getdate_err()) -int *_EXFUN(__getdate_err,(_VOID)); - -struct tm * _EXFUN(getdate, (const char *)); -/* getdate_err is set to one of the following values to indicate the error. - 1 the DATEMSK environment variable is null or undefined, - 2 the template file cannot be opened for reading, - 3 failed to get file status information, - 4 the template file is not a regular file, - 5 an error is encountered while reading the template file, - 6 memory allication failed (not enough memory available), - 7 there is no line in the template that matches the input, - 8 invalid input specification */ -#endif /* !_REENT_ONLY */ - -/* getdate_r returns the error code as above */ -int _EXFUN(getdate_r, (const char *, struct tm *)); - -/* defines for the opengroup specifications Derived from Issue 1 of the SVID. */ -extern __IMPORT time_t _timezone; -extern __IMPORT int _daylight; -extern __IMPORT char *_tzname[2]; - -/* POSIX defines the external tzname being defined in time.h */ -#ifndef tzname -#define tzname _tzname -#endif - -#endif /* !__STRICT_ANSI__ */ - -#include <sys/features.h> - -#if defined(_POSIX_TIMERS) - -#include <signal.h> - -/* Clocks, P1003.1b-1993, p. 263 */ - -int _EXFUN(clock_settime, (clockid_t clock_id, const struct timespec *tp)); -int _EXFUN(clock_gettime, (clockid_t clock_id, struct timespec *tp)); -int _EXFUN(clock_getres, (clockid_t clock_id, struct timespec *res)); - -/* Create a Per-Process Timer, P1003.1b-1993, p. 264 */ - -int _EXFUN(timer_create, - (clockid_t clock_id, struct sigevent *evp, timer_t *timerid)); - -/* Delete a Per_process Timer, P1003.1b-1993, p. 266 */ - -int _EXFUN(timer_delete, (timer_t timerid)); - -/* Per-Process Timers, P1003.1b-1993, p. 267 */ - -int _EXFUN(timer_settime, - (timer_t timerid, int flags, const struct itimerspec *value, - struct itimerspec *ovalue)); -int _EXFUN(timer_gettime, (timer_t timerid, struct itimerspec *value)); -int _EXFUN(timer_getoverrun, (timer_t timerid)); - -/* High Resolution Sleep, P1003.1b-1993, p. 269 */ - -int _EXFUN(nanosleep, (const struct timespec *rqtp, struct timespec *rmtp)); - -#endif /* _POSIX_TIMERS */ - -/* CPU-time Clock Attributes, P1003.4b/D8, p. 54 */ - -/* values for the clock enable attribute */ - -#define CLOCK_ENABLED 1 /* clock is enabled, i.e. counting execution time */ -#define CLOCK_DISABLED 0 /* clock is disabled */ - -/* values for the pthread cputime_clock_allowed attribute */ - -#define CLOCK_ALLOWED 1 /* If a thread is created with this value a */ - /* CPU-time clock attached to that thread */ - /* shall be accessible. */ -#define CLOCK_DISALLOWED 0 /* If a thread is created with this value, the */ - /* thread shall not have a CPU-time clock */ - /* accessible. */ - -/* Manifest Constants, P1003.1b-1993, p. 262 */ - -#define CLOCK_REALTIME (clockid_t)1 - -/* Flag indicating time is "absolute" with respect to the clock - associated with a time. */ - -#define TIMER_ABSTIME 4 - -/* Manifest Constants, P1003.4b/D8, p. 55 */ - -#if defined(_POSIX_CPUTIME) - -/* When used in a clock or timer function call, this is interpreted as - the identifier of the CPU_time clock associated with the PROCESS - making the function call. */ - -#define CLOCK_PROCESS_CPUTIME_ID (clockid_t)2 - -#endif - -#if defined(_POSIX_THREAD_CPUTIME) - -/* When used in a clock or timer function call, this is interpreted as - the identifier of the CPU_time clock associated with the THREAD - making the function call. */ - -#define CLOCK_THREAD_CPUTIME_ID (clockid_t)3 - -#endif - -#if defined(_POSIX_CPUTIME) - -/* Accessing a Process CPU-time CLock, P1003.4b/D8, p. 55 */ - -int _EXFUN(clock_getcpuclockid, (pid_t pid, clockid_t *clock_id)); - -#endif /* _POSIX_CPUTIME */ - -#if defined(_POSIX_CPUTIME) || defined(_POSIX_THREAD_CPUTIME) - -/* CPU-time Clock Attribute Access, P1003.4b/D8, p. 56 */ - -int _EXFUN(clock_setenable_attr, (clockid_t clock_id, int attr)); -int _EXFUN(clock_getenable_attr, (clockid_t clock_id, int *attr)); - -#endif /* _POSIX_CPUTIME or _POSIX_THREAD_CPUTIME */ - -#ifdef __cplusplus -} -#endif - -#endif /* ! __need_timespec */ - -#undef __need_timespec - -#endif /* _TIME_H_ */ - diff --git a/newlib/libc/sys/linux/include/unistd.h b/newlib/libc/sys/linux/include/unistd.h deleted file mode 100644 index e2f562a3a..000000000 --- a/newlib/libc/sys/linux/include/unistd.h +++ /dev/null @@ -1,20 +0,0 @@ -/* libc/sys/linux/include/unistd.h - Various standard functions */ - -/* Written 2000 by Werner Almesberger */ - - -#ifndef _NEWLIB_UNISTD_H -#define _NEWLIB_UNISTD_H - -#include <sys/types.h> -#include <sys/unistd.h> - -/* Declare some missing goodies */ - -extern char *optarg; -extern int optind, opterr, optopt; - - -int readlink(const char *path, char *buf, size_t bufsiz); - -#endif |