diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-03-01 20:46:26 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-03-01 20:46:26 +0000 |
commit | 9cee42f10dbc5b33866ff137b926a74abd7c1a5b (patch) | |
tree | 5211131bde7212ae06d98e9779197cece9b552cc | |
parent | 5b470cfcc321c5d50b951fa93a769a4a193ccece (diff) |
Major rework of the include files to eliminate redundancy
and to better support each arch. This is a really big patch...
-Erik
571 files changed, 2583 insertions, 57415 deletions
diff --git a/include/.cvsignore b/include/.cvsignore new file mode 100644 index 000000000..528976346 --- /dev/null +++ b/include/.cvsignore @@ -0,0 +1 @@ +bits diff --git a/include/signal.h b/include/signal.h index f217349d0..f0a24dbcf 100644 --- a/include/signal.h +++ b/include/signal.h @@ -352,7 +352,7 @@ extern int sigignore (int __sig) __THROW; extern __sighandler_t sigset (int __sig, __sighandler_t __disp) __THROW; #endif -#if defined _POSIX_THREADS && (defined __USE_POSIX199506 || defined __USE_UNIX98) +#if defined __UCLIBC_HAS_THREADS__ && (defined __USE_POSIX199506 || defined __USE_UNIX98) /* Some of the functions for handling signals in threaded programs must be defined here. */ # include <bits/sigthread.h> diff --git a/libc/sysdeps/linux/arm/bits/byteswap.h b/libc/sysdeps/linux/arm/bits/byteswap.h deleted file mode 100644 index 7866abe9c..000000000 --- a/libc/sysdeps/linux/arm/bits/byteswap.h +++ /dev/null @@ -1,79 +0,0 @@ -/* Macros to swap the order of bytes in integer values. - Copyright (C) 1997, 1998, 2000, 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. */ - -#if !defined _BYTESWAP_H && !defined _NETINET_IN_H -# error "Never use <bits/byteswap.h> directly; include <byteswap.h> instead." -#endif - -/* Swap bytes in 16 bit value. */ -#ifdef __GNUC__ -# define __bswap_16(x) \ - (__extension__ \ - ({ unsigned short int __bsx = (x); \ - ((((__bsx) >> 8) & 0xff) | (((__bsx) & 0xff) << 8)); })) -#else -static __inline unsigned short int -__bswap_16 (unsigned short int __bsx) -{ - return ((((__bsx) >> 8) & 0xff) | (((__bsx) & 0xff) << 8)); -} -#endif - -/* Swap bytes in 32 bit value. */ -#ifdef __GNUC__ -# define __bswap_32(x) \ - (__extension__ \ - ({ unsigned int __bsx = (x); \ - ((((__bsx) & 0xff000000) >> 24) | (((__bsx) & 0x00ff0000) >> 8) | \ - (((__bsx) & 0x0000ff00) << 8) | (((__bsx) & 0x000000ff) << 24)); })) -#else -static __inline unsigned int -__bswap_32 (unsigned int __bsx) -{ - return ((((__bsx) & 0xff000000) >> 24) | (((__bsx) & 0x00ff0000) >> 8) | - (((__bsx) & 0x0000ff00) << 8) | (((__bsx) & 0x000000ff) << 24)); -} -#endif - -#if defined __GNUC__ && __GNUC__ >= 2 -/* Swap bytes in 64 bit value. */ -# define __bswap_constant_64(x) \ - ((((x) & 0xff00000000000000ull) >> 56) \ - | (((x) & 0x00ff000000000000ull) >> 40) \ - | (((x) & 0x0000ff0000000000ull) >> 24) \ - | (((x) & 0x000000ff00000000ull) >> 8) \ - | (((x) & 0x00000000ff000000ull) << 8) \ - | (((x) & 0x0000000000ff0000ull) << 24) \ - | (((x) & 0x000000000000ff00ull) << 40) \ - | (((x) & 0x00000000000000ffull) << 56)) - -# define __bswap_64(x) \ - (__extension__ \ - ({ union { __extension__ unsigned long long int __ll; \ - unsigned int __l[2]; } __w, __r; \ - if (__builtin_constant_p (x)) \ - __r.__ll = __bswap_constant_64 (x); \ - else \ - { \ - __w.__ll = (x); \ - __r.__l[0] = __bswap_32 (__w.__l[1]); \ - __r.__l[1] = __bswap_32 (__w.__l[0]); \ - } \ - __r.__ll; })) -#endif diff --git a/libc/sysdeps/linux/arm/bits/dirent.h b/libc/sysdeps/linux/arm/bits/dirent.h deleted file mode 100644 index 7e3769a48..000000000 --- a/libc/sysdeps/linux/arm/bits/dirent.h +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright (C) 1996, 1997 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 _DIRENT_H -# error "Never use <bits/dirent.h> directly; include <dirent.h> instead." -#endif - -struct dirent - { -#ifndef __USE_FILE_OFFSET64 - __ino_t d_ino; - __off_t d_off; -#else - __ino64_t d_ino; - __off64_t d_off; -#endif - unsigned short int d_reclen; -#ifdef __USE_FILE_OFFSET64 - unsigned char d_type; -#endif - char d_name[256]; /* We must not include limits.h! */ - }; - -#ifdef __USE_LARGEFILE64 -struct dirent64 - { - __ino64_t d_ino; - __off64_t d_off; - unsigned short int d_reclen; - unsigned char d_type; - char d_name[256]; /* We must not include limits.h! */ - }; -#endif - -#define d_fileno d_ino /* Backwards compatibility. */ - -#undef _DIRENT_HAVE_D_NAMLEN -#define _DIRENT_HAVE_D_RECLEN -#define _DIRENT_HAVE_D_OFF -#define _DIRENT_HAVE_D_TYPE diff --git a/libc/sysdeps/linux/arm/bits/dlfcn.h b/libc/sysdeps/linux/arm/bits/dlfcn.h deleted file mode 100644 index 2525fa3d9..000000000 --- a/libc/sysdeps/linux/arm/bits/dlfcn.h +++ /dev/null @@ -1,59 +0,0 @@ -/* System dependent definitions for run-time dynamic loading. - 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. */ - -#ifndef _DLFCN_H -# error "Never use <bits/dlfcn.h> directly; include <dlfcn.h> instead." -#endif - -/* The MODE argument to `dlopen' contains one of the following: */ -#define RTLD_LAZY 0x00001 /* Lazy function call binding. */ -#define RTLD_NOW 0x00002 /* Immediate function call binding. */ -#define RTLD_BINDING_MASK 0x3 /* Mask of binding time value. */ -#define RTLD_NOLOAD 0x00004 /* Do not load the object. */ - -/* If the following bit is set in the MODE argument to `dlopen', - the symbols of the loaded object and its dependencies are made - visible as if the object were linked directly into the program. */ -#define RTLD_GLOBAL 0x00100 - -/* Unix98 demands the following flag which is the inverse to RTLD_GLOBAL. - The implementation does this by default and so we can define the - value to zero. */ -#define RTLD_LOCAL 0 - -/* Do not delete object when closed. */ -#define RTLD_NODELETE 0x01000 - -#ifdef __USE_GNU -/* To support profiling of shared objects it is a good idea to call - the function found using `dlsym' using the following macro since - these calls do not use the PLT. But this would mean the dynamic - loader has no chance to find out when the function is called. The - macro applies the necessary magic so that profiling is possible. - Rewrite - foo = (*fctp) (arg1, arg2); - into - foo = DL_CALL_FCT (fctp, (arg1, arg2)); -*/ -# define DL_CALL_FCT(fctp, args) \ - (_dl_mcount_wrapper_check (fctp), (*(fctp)) args) - -/* This function calls the profiling functions. */ -extern void _dl_mcount_wrapper_check (void *__selfpc) __THROW; -#endif diff --git a/libc/sysdeps/linux/arm/bits/libc-lock.h b/libc/sysdeps/linux/arm/bits/libc-lock.h deleted file mode 100644 index dbd9cc14f..000000000 --- a/libc/sysdeps/linux/arm/bits/libc-lock.h +++ /dev/null @@ -1,317 +0,0 @@ -/* libc-internal interface for mutex locks. LinuxThreads version. - Copyright (C) 1996,1997,1998,1999,2000,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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _BITS_LIBC_LOCK_H -#define _BITS_LIBC_LOCK_H 1 - -#include <pthread.h> - -/* Mutex type. */ -#ifdef _LIBC -typedef pthread_mutex_t __libc_lock_t; -typedef pthread_rwlock_t __libc_rwlock_t; -#else -typedef struct __libc_lock_opaque__ __libc_lock_t; -typedef struct __libc_rwlock_opaque__ __libc_rwlock_t; -#endif - -/* Type for key to thread-specific data. */ -typedef pthread_key_t __libc_key_t; - -/* Define a lock variable NAME with storage class CLASS. The lock must be - initialized with __libc_lock_init before it can be used (or define it - with __libc_lock_define_initialized, below). Use `extern' for CLASS to - declare a lock defined in another module. In public structure - definitions you must use a pointer to the lock structure (i.e., NAME - begins with a `*'), because its storage size will not be known outside - of libc. */ -#define __libc_lock_define(CLASS,NAME) \ - CLASS __libc_lock_t NAME; -#define __libc_rwlock_define(CLASS,NAME) \ - CLASS __libc_rwlock_t NAME; - -/* Define an initialized lock variable NAME with storage class CLASS. - - For the C library we take a deeper look at the initializer. For - this implementation all fields are initialized to zero. Therefore - we don't initialize the variable which allows putting it into the - BSS section. (Except on PA-RISC and other odd architectures, where - initialized locks must be set to one due to the lack of normal - atomic operations.) */ - -#if __LT_SPINLOCK_INIT == 0 -# define __libc_lock_define_initialized(CLASS,NAME) \ - CLASS __libc_lock_t NAME; -#else -# define __libc_lock_define_initialized(CLASS,NAME) \ - CLASS __libc_lock_t NAME = PTHREAD_MUTEX_INITIALIZER; -#endif - -#define __libc_rwlock_define_initialized(CLASS,NAME) \ - CLASS __libc_rwlock_t NAME = PTHREAD_RWLOCK_INITIALIZER; - -/* Define an initialized recursive lock variable NAME with storage - class CLASS. */ -#define __libc_lock_define_initialized_recursive(CLASS,NAME) \ - CLASS __libc_lock_t NAME = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; - -/* Initialize the named lock variable, leaving it in a consistent, unlocked - state. */ -#define __libc_lock_init(NAME) \ - (__pthread_mutex_init != NULL ? __pthread_mutex_init (&(NAME), NULL) : 0); -#define __libc_rwlock_init(NAME) \ - (__pthread_rwlock_init != NULL ? __pthread_rwlock_init (&(NAME), NULL) : 0); - -/* Same as last but this time we initialize a recursive mutex. */ -#define __libc_lock_init_recursive(NAME) \ - do { \ - if (__pthread_mutex_init != NULL) \ - { \ - pthread_mutexattr_t __attr; \ - __pthread_mutexattr_init (&__attr); \ - __pthread_mutexattr_settype (&__attr, PTHREAD_MUTEX_RECURSIVE_NP); \ - __pthread_mutex_init (&(NAME), &__attr); \ - __pthread_mutexattr_destroy (&__attr); \ - } \ - } while (0); - -/* Finalize the named lock variable, which must be locked. It cannot be - used again until __libc_lock_init is called again on it. This must be - called on a lock variable before the containing storage is reused. */ -#define __libc_lock_fini(NAME) \ - (__pthread_mutex_destroy != NULL ? __pthread_mutex_destroy (&(NAME)) : 0); -#define __libc_rwlock_fini(NAME) \ - (__pthread_rwlock_destroy != NULL ? __pthread_rwlock_destroy (&(NAME)) : 0); - -/* Finalize recursive named lock. */ -#define __libc_lock_fini_recursive(NAME) __libc_lock_fini (NAME) - -/* Lock the named lock variable. */ -#define __libc_lock_lock(NAME) \ - (__pthread_mutex_lock != NULL ? __pthread_mutex_lock (&(NAME)) : 0); -#define __libc_rwlock_rdlock(NAME) \ - (__pthread_rwlock_rdlock != NULL ? __pthread_rwlock_rdlock (&(NAME)) : 0); -#define __libc_rwlock_wrlock(NAME) \ - (__pthread_rwlock_wrlock != NULL ? __pthread_rwlock_wrlock (&(NAME)) : 0); - -/* Lock the recursive named lock variable. */ -#define __libc_lock_lock_recursive(NAME) __libc_lock_lock (NAME) - -/* Try to lock the named lock variable. */ -#define __libc_lock_trylock(NAME) \ - (__pthread_mutex_trylock != NULL ? __pthread_mutex_trylock (&(NAME)) : 0) -#define __libc_rwlock_tryrdlock(NAME) \ - (__pthread_rwlock_tryrdlock != NULL \ - ? __pthread_rwlock_tryrdlock (&(NAME)) : 0) -#define __libc_rwlock_trywrlock(NAME) \ - (__pthread_rwlock_trywrlock != NULL \ - ? __pthread_rwlock_trywrlock (&(NAME)) : 0) - -/* Try to lock the recursive named lock variable. */ -#define __libc_lock_trylock_recursive(NAME) __libc_lock_trylock (NAME) - -/* Unlock the named lock variable. */ -#define __libc_lock_unlock(NAME) \ - (__pthread_mutex_unlock != NULL ? __pthread_mutex_unlock (&(NAME)) : 0); -#define __libc_rwlock_unlock(NAME) \ - (__pthread_rwlock_unlock != NULL ? __pthread_rwlock_unlock (&(NAME)) : 0); - -/* Unlock the recursive named lock variable. */ -#define __libc_lock_unlock_recursive(NAME) __libc_lock_unlock (NAME) - - -/* Define once control variable. */ -#if PTHREAD_ONCE_INIT == 0 -/* Special case for static variables where we can avoid the initialization - if it is zero. */ -# define __libc_once_define(CLASS, NAME) \ - CLASS pthread_once_t NAME -#else -# define __libc_once_define(CLASS, NAME) \ - CLASS pthread_once_t NAME = PTHREAD_ONCE_INIT -#endif - -/* Call handler iff the first call. */ -#define __libc_once(ONCE_CONTROL, INIT_FUNCTION) \ - do { \ - if (__pthread_once != NULL) \ - __pthread_once (&(ONCE_CONTROL), (INIT_FUNCTION)); \ - else if ((ONCE_CONTROL) == PTHREAD_ONCE_INIT) { \ - INIT_FUNCTION (); \ - (ONCE_CONTROL) = !PTHREAD_ONCE_INIT; \ - } \ - } while (0) - - -/* Start critical region with cleanup. */ -#define __libc_cleanup_region_start(FCT, ARG) \ - { struct _pthread_cleanup_buffer _buffer; \ - int _avail = _pthread_cleanup_push_defer != NULL; \ - if (_avail) { \ - _pthread_cleanup_push_defer (&_buffer, (FCT), (ARG)); \ - } - -/* End critical region with cleanup. */ -#define __libc_cleanup_region_end(DOIT) \ - if (_avail) { \ - _pthread_cleanup_pop_restore (&_buffer, (DOIT)); \ - } \ - } - -/* Sometimes we have to exit the block in the middle. */ -#define __libc_cleanup_end(DOIT) \ - if (_avail) { \ - _pthread_cleanup_pop_restore (&_buffer, (DOIT)); \ - } - -/* Create thread-specific key. */ -#define __libc_key_create(KEY, DESTRUCTOR) \ - (__pthread_key_create != NULL ? __pthread_key_create (KEY, DESTRUCTOR) : 1) - -/* Get thread-specific data. */ -#define __libc_getspecific(KEY) \ - (__pthread_getspecific != NULL ? __pthread_getspecific (KEY) : NULL) - -/* Set thread-specific data. */ -#define __libc_setspecific(KEY, VALUE) \ - (__pthread_setspecific != NULL ? __pthread_setspecific (KEY, VALUE) : 0) - - -/* Register handlers to execute before and after `fork'. */ -#define __libc_atfork(PREPARE, PARENT, CHILD) \ - (__pthread_atfork != NULL ? __pthread_atfork (PREPARE, PARENT, CHILD) : 0) - -/* Functions that are used by this file and are internal to the GNU C - library. */ - -extern int __pthread_mutex_init (pthread_mutex_t *__mutex, - __const pthread_mutexattr_t *__mutex_attr); - -extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex); - -extern int __pthread_mutex_trylock (pthread_mutex_t *__mutex); - -extern int __pthread_mutex_lock (pthread_mutex_t *__mutex); - -extern int __pthread_mutex_unlock (pthread_mutex_t *__mutex); - -extern int __pthread_mutexattr_init (pthread_mutexattr_t *__attr); - -extern int __pthread_mutexattr_destroy (pthread_mutexattr_t *__attr); - -extern int __pthread_mutexattr_settype (pthread_mutexattr_t *__attr, - int __kind); - -#ifdef __USE_UNIX98 -extern int __pthread_rwlock_init (pthread_rwlock_t *__rwlock, - __const pthread_rwlockattr_t *__attr); - -extern int __pthread_rwlock_destroy (pthread_rwlock_t *__rwlock); - -extern int __pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock); - -extern int __pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock); - -extern int __pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock); - -extern int __pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock); - -extern int __pthread_rwlock_unlock (pthread_rwlock_t *__rwlock); -#endif - -extern int __pthread_key_create (pthread_key_t *__key, - void (*__destr_function) (void *)); - -extern int __pthread_setspecific (pthread_key_t __key, - __const void *__pointer); - -extern void *__pthread_getspecific (pthread_key_t __key); - -extern int __pthread_once (pthread_once_t *__once_control, - void (*__init_routine) (void)); - -extern int __pthread_atfork (void (*__prepare) (void), - void (*__parent) (void), - void (*__child) (void)); - - - -/* Make the pthread functions weak so that we can elide them from - single-threaded processes. */ -#ifndef __NO_WEAK_PTHREAD_ALIASES -# ifdef weak_extern -# if _LIBC -# include <bp-sym.h> -# else -# define BP_SYM (sym) sym -# endif -weak_extern (BP_SYM (__pthread_mutex_init)) -weak_extern (BP_SYM (__pthread_mutex_destroy)) -weak_extern (BP_SYM (__pthread_mutex_lock)) -weak_extern (BP_SYM (__pthread_mutex_trylock)) -weak_extern (BP_SYM (__pthread_mutex_unlock)) -weak_extern (BP_SYM (__pthread_mutexattr_init)) -weak_extern (BP_SYM (__pthread_mutexattr_destroy)) -weak_extern (BP_SYM (__pthread_mutexattr_settype)) -weak_extern (BP_SYM (__pthread_rwlock_init)) -weak_extern (BP_SYM (__pthread_rwlock_destroy)) -weak_extern (BP_SYM (__pthread_rwlock_rdlock)) -weak_extern (BP_SYM (__pthread_rwlock_tryrdlock)) -weak_extern (BP_SYM (__pthread_rwlock_wrlock)) -weak_extern (BP_SYM (__pthread_rwlock_trywrlock)) -weak_extern (BP_SYM (__pthread_rwlock_unlock)) -weak_extern (BP_SYM (__pthread_key_create)) -weak_extern (BP_SYM (__pthread_setspecific)) -weak_extern (BP_SYM (__pthread_getspecific)) -weak_extern (BP_SYM (__pthread_once)) -weak_extern (__pthread_initialize) -weak_extern (__pthread_atfork) -weak_extern (BP_SYM (_pthread_cleanup_push_defer)) -weak_extern (BP_SYM (_pthread_cleanup_pop_restore)) -# else -# pragma weak __pthread_mutex_init -# pragma weak __pthread_mutex_destroy -# pragma weak __pthread_mutex_lock -# pragma weak __pthread_mutex_trylock -# pragma weak __pthread_mutex_unlock -# pragma weak __pthread_mutexattr_init -# pragma weak __pthread_mutexattr_destroy -# pragma weak __pthread_mutexattr_settype -# pragma weak __pthread_rwlock_destroy -# pragma weak __pthread_rwlock_rdlock -# pragma weak __pthread_rwlock_tryrdlock -# pragma weak __pthread_rwlock_wrlock -# pragma weak __pthread_rwlock_trywrlock -# pragma weak __pthread_rwlock_unlock -# pragma weak __pthread_key_create -# pragma weak __pthread_setspecific -# pragma weak __pthread_getspecific -# pragma weak __pthread_once -# pragma weak __pthread_initialize -# pragma weak __pthread_atfork -# pragma weak _pthread_cleanup_push_defer -# pragma weak _pthread_cleanup_pop_restore -# endif -#endif - -/* We need portable names for some functions. E.g., when they are - used as argument to __libc_cleanup_region_start. */ -#define __libc_mutex_unlock __pthread_mutex_unlock - -#endif /* bits/libc-lock.h */ diff --git a/libc/sysdeps/linux/arm/bits/posix_opt.h b/libc/sysdeps/linux/arm/bits/posix_opt.h deleted file mode 100644 index 9e39d8d21..000000000 --- a/libc/sysdeps/linux/arm/bits/posix_opt.h +++ /dev/null @@ -1,141 +0,0 @@ -/* Define POSIX options for Linux. - Copyright (C) 1996,1997,1998,1999,2000,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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _POSIX_OPT_H -#define _POSIX_OPT_H 1 - -/* Job control is supported. */ -#define _POSIX_JOB_CONTROL 1 - -/* Processes have a saved set-user-ID and a saved set-group-ID. */ -#define _POSIX_SAVED_IDS 1 - -/* Priority scheduling is supported. */ -#define _POSIX_PRIORITY_SCHEDULING 1 - -/* Synchronizing file data is supported. */ -#define _POSIX_SYNCHRONIZED_IO 1 - -/* The fsync function is present. */ -#define _POSIX_FSYNC 1 - -/* Mapping of files to memory is supported. */ -#define _POSIX_MAPPED_FILES 1 - -/* Locking of all memory is supported. */ -#define _POSIX_MEMLOCK 1 - -/* Locking of ranges of memory is supported. */ -#define _POSIX_MEMLOCK_RANGE 1 - -/* Setting of memory protections is supported. */ -#define _POSIX_MEMORY_PROTECTION 1 - -/* Implementation supports `poll' function. */ -#define _POSIX_POLL 1 - -/* Implementation supports `select' and `pselect' functions. */ -#define _POSIX_SELECT 1 - -/* Only root can change owner of file. */ -#define _POSIX_CHOWN_RESTRICTED 1 - -/* `c_cc' member of 'struct termios' structure can be disabled by - using the value _POSIX_VDISABLE. */ -#define _POSIX_VDISABLE '\0' - -/* Filenames are not silently truncated. */ -#define _POSIX_NO_TRUNC 1 - -/* X/Open realtime support is available. */ -#define _XOPEN_REALTIME 1 - -/* X/Open realtime thread support is available. */ -#undef _XOPEN_REALTIME_THREADS - -/* XPG4.2 shared memory is supported. */ -#define _XOPEN_SHM 1 - -/* Tell we have POSIX threads. */ -#undef _POSIX_THREADS - -/* We have the reentrant functions described in POSIX. */ -#define _POSIX_REENTRANT_FUNCTIONS 1 -#define _POSIX_THREAD_SAFE_FUNCTIONS 1 - -/* We provide priority scheduling for threads. */ -#define _POSIX_THREAD_PRIORITY_SCHEDULING 1 - -/* We support user-defined stack sizes. */ -#define _POSIX_THREAD_ATTR_STACKSIZE 1 - -/* We support user-defined stacks. */ -#define _POSIX_THREAD_ATTR_STACKADDR 1 - -/* We support POSIX.1b semaphores, but only the non-shared form for now. */ -#define _POSIX_SEMAPHORES 1 - -/* Real-time signals are supported. */ -#define _POSIX_REALTIME_SIGNALS 1 - -/* We support asynchronous I/O. */ -#define _POSIX_ASYNCHRONOUS_IO 1 -#define _POSIX_ASYNC_IO 1 -/* Alternative name for Unix98. */ -#define _LFS_ASYNCHRONOUS_IO 1 - -/* The LFS support in asynchronous I/O is also available. */ -#define _LFS64_ASYNCHRONOUS_IO 1 - -/* The rest of the LFS is also available. */ -#define _LFS_LARGEFILE 1 -#define _LFS64_LARGEFILE 1 -#define _LFS64_STDIO 1 - -/* POSIX shared memory objects are implemented. */ -#define _POSIX_SHARED_MEMORY_OBJECTS 1 - -/* GNU libc provides regular expression handling. */ -#define _POSIX_REGEXP 1 - -/* Reader/Writer locks are available. */ -#define _POSIX_READER_WRITER_LOCKS 200912L - -/* We have a POSIX shell. */ -#define _POSIX_SHELL 1 - -/* We support the Timeouts option. */ -#define _POSIX_TIMEOUTS 200912L - -/* We support spinlocks. */ -#define _POSIX_SPIN_LOCKS 200912L - -/* The `spawn' function family is supported. */ -#define _POSIX_SPAWN 200912L - -/* We have POSIX timers. */ -#define _POSIX_TIMERS 1 - -/* The barrier functions are available. */ -#define _POSIX_BARRIERS 200912L - -/* POSIX message queues are not yet supported. */ -#undef _POSIX_MESSAGE_PASSING - -#endif /* posix_opt.h */ diff --git a/libc/sysdeps/linux/arm/bits/pthreadtypes.h b/libc/sysdeps/linux/arm/bits/pthreadtypes.h deleted file mode 100644 index 3ee5c4813..000000000 --- a/libc/sysdeps/linux/arm/bits/pthreadtypes.h +++ /dev/null @@ -1,142 +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. */ - -#if !defined _BITS_TYPES_H && !defined _PTHREAD_H -# error "Never include <bits/pthreadtypes.h> directly; use <sys/types.h> instead." -#endif - -#ifndef _BITS_PTHREADTYPES_H -#define _BITS_PTHREADTYPES_H 1 - -#define __need_schedparam -#include <bits/sched.h> - -/* Fast locks (not abstract because mutexes and conditions aren't abstract). */ -struct _pthread_fastlock -{ - long int __status; /* "Free" or "taken" or head of waiting list */ - int __spinlock; /* Used by compare_and_swap emulation. Also, - adaptive SMP lock stores spin count here. */ -}; - -#ifndef _PTHREAD_DESCR_DEFINED -/* Thread descriptors */ -typedef struct _pthread_descr_struct *_pthread_descr; -# define _PTHREAD_DESCR_DEFINED -#endif - - -/* Attributes for threads. */ -typedef struct __pthread_attr_s -{ - int __detachstate; - int __schedpolicy; - struct __sched_param __schedparam; - int __inheritsched; - int __scope; - size_t __guardsize; - int __stackaddr_set; - void *__stackaddr; - size_t __stacksize; -} pthread_attr_t; - - -/* Conditions (not abstract because of PTHREAD_COND_INITIALIZER */ -typedef struct -{ - struct _pthread_fastlock __c_lock; /* Protect against concurrent access */ - _pthread_descr __c_waiting; /* Threads waiting on this condition */ -} pthread_cond_t; - - -/* Attribute for conditionally variables. */ -typedef struct -{ - int __dummy; -} pthread_condattr_t; - -/* Keys for thread-specific data */ -typedef unsigned int pthread_key_t; - - -/* Mutexes (not abstract because of PTHREAD_MUTEX_INITIALIZER). */ -/* (The layout is unnatural to maintain binary compatibility - with earlier releases of LinuxThreads.) */ -typedef struct -{ - int __m_reserved; /* Reserved for future use */ - int __m_count; /* Depth of recursive locking */ - _pthread_descr __m_owner; /* Owner thread (if recursive or errcheck) */ - int __m_kind; /* Mutex kind: fast, recursive or errcheck */ - struct _pthread_fastlock __m_lock; /* Underlying fast lock */ -} pthread_mutex_t; - - -/* Attribute for mutex. */ -typedef struct -{ - int __mutexkind; -} pthread_mutexattr_t; - - -/* Once-only execution */ -typedef int pthread_once_t; - - -#ifdef __USE_UNIX98 -/* Read-write locks. */ -typedef struct _pthread_rwlock_t -{ - struct _pthread_fastlock __rw_lock; /* Lock to guarantee mutual exclusion */ - int __rw_readers; /* Number of readers */ - _pthread_descr __rw_writer; /* Identity of writer, or NULL if none */ - _pthread_descr __rw_read_waiting; /* Threads waiting for reading */ - _pthread_descr __rw_write_waiting; /* Threads waiting for writing */ - int __rw_kind; /* Reader/Writer preference selection */ - int __rw_pshared; /* Shared between processes or not */ -} pthread_rwlock_t; - - -/* Attribute for read-write locks. */ -typedef struct -{ - int __lockkind; - int __pshared; -} pthread_rwlockattr_t; -#endif - -#ifdef __USE_XOPEN2K -/* POSIX spinlock data type. */ -typedef volatile int pthread_spinlock_t; - -/* POSIX barrier. */ -typedef struct { - struct _pthread_fastlock __ba_lock; /* Lock to guarantee mutual exclusion */ - int __ba_required; /* Threads needed for completion */ - int __ba_present; /* Threads waiting */ - _pthread_descr __ba_waiting; /* Queue of waiting threads */ -} pthread_barrier_t; - -/* barrier attribute */ -typedef struct { - int __pshared; -} pthread_barrierattr_t; - -#endif - - -/* Thread identifiers */ -typedef unsigned long int pthread_t; - -#endif /* bits/pthreadtypes.h */ diff --git a/libc/sysdeps/linux/arm/bits/stdio-lock.h b/libc/sysdeps/linux/arm/bits/stdio-lock.h deleted file mode 100644 index a1893c8bd..000000000 --- a/libc/sysdeps/linux/arm/bits/stdio-lock.h +++ /dev/null @@ -1,50 +0,0 @@ -/* Thread package specific definitions of stream lock type. - Copyright (C) 1996, 1997, 1998, 2000, 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include <pthread.h> - -typedef pthread_mutex_t _IO_lock_t; - -/* We need recursive (counting) mutexes. */ -#define _IO_lock_initializer PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP - - -#define _IO_cleanup_region_start(_fct, _fp) \ - { struct _pthread_cleanup_buffer _buffer; \ - int _avail = (((_fp)->_flags & _IO_USER_LOCK) == 0 \ - && _pthread_cleanup_push_defer != NULL); \ - if (_avail) { \ - _pthread_cleanup_push_defer (&_buffer, (_fct), (_fp)); \ - } -#define _IO_cleanup_region_start_noarg(_fct) \ - { struct _pthread_cleanup_buffer _buffer; \ - int _avail = _pthread_cleanup_push_defer != NULL; \ - if (_avail) { \ - _pthread_cleanup_push_defer (&_buffer, (_fct), NULL); \ - } -#define _IO_cleanup_region_end(_doit) \ - __libc_cleanup_region_end (_doit) -#define _IO_lock_init(_name) \ - __libc_lock_init_recursive (_name) -#define _IO_lock_fini(_name) \ - __libc_lock_fini_recursive (_name) -#define _IO_lock_lock(_name) \ - __libc_lock_lock (_name) -#define _IO_lock_unlock(_name) \ - __libc_lock_unlock (_name) diff --git a/libc/sysdeps/linux/arm/bits/stdio.h b/libc/sysdeps/linux/arm/bits/stdio.h deleted file mode 100644 index 36346f714..000000000 --- a/libc/sysdeps/linux/arm/bits/stdio.h +++ /dev/null @@ -1,24 +0,0 @@ -/* Optimizing macros and inline functions for stdio functions. - Copyright (C) 1998, 2000, 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. */ - -#ifndef _STDIO_H -# error "Never include <bits/stdio.h> directly; use <stdio.h> instead." -#endif - -/* Nothing to do here. Move right along */ diff --git a/libc/sysdeps/linux/arm/bits/string2.h b/libc/sysdeps/linux/arm/bits/string2.h deleted file mode 100644 index 4bd481787..000000000 --- a/libc/sysdeps/linux/arm/bits/string2.h +++ /dev/null @@ -1,1239 +0,0 @@ -/* Machine-independant string function optimizations. - Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. - - 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 _STRING_H -# error "Never use <bits/string2.h> directly; include <string.h> instead." -#endif - -#if !defined __NO_STRING_INLINES && !defined __BOUNDED_POINTERS__ - -/* Unlike the definitions in the header <bits/string.h> the - definitions contained here are not optimized down to assembler - level. Those optimizations are not always a good idea since this - means the code size increases a lot. Instead the definitions here - optimize some functions in a way which do not dramatically - increase the code size and which do not use assembler. The main - trick is to use GNU CC's `__builtin_constant_p' function. - - Every function XXX which has a defined version in - <bits/string.h> must be accompanied by a symbol _HAVE_STRING_ARCH_XXX - to make sure we don't get redefinitions. - - We must use here macros instead of inline functions since the - trick won't work with the latter. */ - -#ifndef __STRING_INLINE -# ifdef __cplusplus -# define __STRING_INLINE inline -# else -# define __STRING_INLINE extern __inline -# endif -#endif - -#if _STRING_ARCH_unaligned -/* If we can do unaligned memory accesses we must know the endianess. */ -# include <endian.h> -# include <bits/types.h> - -# if __BYTE_ORDER == __LITTLE_ENDIAN -# define __STRING2_SMALL_GET16(src, idx) \ - (((__const unsigned char *) (__const char *) (src))[idx + 1] << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx]) -# define __STRING2_SMALL_GET32(src, idx) \ - (((((__const unsigned char *) (__const char *) (src))[idx + 3] << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 2]) << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 1]) << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx]) -# else -# define __STRING2_SMALL_GET16(src, idx) \ - (((__const unsigned char *) (__const char *) (src))[idx] << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 1]) -# define __STRING2_SMALL_GET32(src, idx) \ - (((((__const unsigned char *) (__const char *) (src))[idx] << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 1]) << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 2]) << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 3]) -# endif -#else -/* These are a few types we need for the optimizations if we cannot - use unaligned memory accesses. */ -# define __STRING2_COPY_TYPE(N) \ - typedef struct { unsigned char __arr[N]; } \ - __STRING2_COPY_ARR##N __attribute__ ((packed)) -__STRING2_COPY_TYPE (2); -__STRING2_COPY_TYPE (3); -__STRING2_COPY_TYPE (4); -__STRING2_COPY_TYPE (5); -__STRING2_COPY_TYPE (6); -__STRING2_COPY_TYPE (7); -__STRING2_COPY_TYPE (8); -# undef __STRING2_COPY_TYPE -#endif - -/* Dereferencing a pointer arg to run sizeof on it fails for the void - pointer case, so we use this instead. - Note that __x is evaluated twice. */ -#define __string2_1bptr_p(__x) \ - ((size_t)(const void *)((__x) + 1) - (size_t)(const void *)(__x) == 1) - -/* Set N bytes of S to C. */ -#ifndef _HAVE_STRING_ARCH_memset -# if _STRING_ARCH_unaligned -# define memset(s, c, n) \ - (__extension__ (__builtin_constant_p (n) && (n) <= 16 \ - ? ((n) == 1 \ - ? __memset_1 (s, c) \ - : __memset_gc (s, c, n)) \ - : (__builtin_constant_p (c) && (c) == '\0' \ - ? ({ void *__s = (s); __bzero (__s, n); __s; }) \ - : memset (s, c, n)))) - -# define __memset_1(s, c) ({ void *__s = (s); \ - *((__uint8_t *) __s) = (__uint8_t) c; __s; }) - -# define __memset_gc(s, c, n) \ - ({ void *__s = (s); \ - union { \ - unsigned int __ui; \ - unsigned short int __usi; \ - unsigned char __uc; \ - } *__u = __s; \ - __uint8_t __c = (__uint8_t) (c); \ - \ - /* This `switch' statement will be removed at compile-time. */ \ - switch ((unsigned int) (n)) \ - { \ - case 15: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 11: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 7: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 3: \ - __u->__usi = (unsigned short int) __c * 0x0101; \ - __u = __extension__ (void *)((char *) __u + 2); \ - __u->__uc = (unsigned char) __c; \ - break; \ - \ - case 14: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 10: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 6: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 2: \ - __u->__usi = (unsigned short int) __c * 0x0101; \ - break; \ - \ - case 13: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 9: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 5: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 1: \ - __u->__uc = (unsigned char) __c; \ - break; \ - \ - case 16: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 12: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 8: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 4: \ - __u->__ui = __c * 0x01010101; \ - case 0: \ - break; \ - } \ - \ - __s; }) -# else -# define memset(s, c, n) \ - (__extension__ (__builtin_constant_p (c) && (c) == '\0' \ - ? ({ void *__s = (s); __bzero (__s, n); __s; }) \ - : memset (s, c, n))) -# endif - -/* GCC optimizes memset(s, 0, n) but not bzero(s, n). - The optimization is broken before EGCS 1.1. */ -# if __GNUC_PREREQ (2, 91) -# define __bzero(s, n) __builtin_memset (s, '\0', n) -# endif - -#endif - - -/* Copy N bytes from SRC to DEST, returning pointer to byte following the - last copied. */ -#ifdef __USE_GNU -# if !defined _HAVE_STRING_ARCH_mempcpy || defined _FORCE_INLINES -# ifndef _HAVE_STRING_ARCH_mempcpy -# define __mempcpy(dest, src, n) \ - (__extension__ (__builtin_constant_p (src) && __builtin_constant_p (n) \ - && __string2_1bptr_p (src) && n <= 8 \ - ? __mempcpy_small (dest, __mempcpy_args (src), n) \ - : __mempcpy (dest, src, n))) -/* In glibc we use this function frequently but for namespace reasons - we have to use the name `__mempcpy'. */ -# define mempcpy(dest, src, n) __mempcpy (dest, src, n) -# endif - -# if _STRING_ARCH_unaligned -# ifndef _FORCE_INLINES -# define __mempcpy_args(src) \ - ((__const char *) (src))[0], ((__const char *) (src))[2], \ - ((__const char *) (src))[4], ((__const char *) (src))[6], \ - __extension__ __STRING2_SMALL_GET16 (src, 0), \ - __extension__ __STRING2_SMALL_GET16 (src, 4), \ - __extension__ __STRING2_SMALL_GET32 (src, 0), \ - __extension__ __STRING2_SMALL_GET32 (src, 4) -# endif -__STRING_INLINE void *__mempcpy_small (void *, char, char, char, char, - __uint16_t, __uint16_t, __uint32_t, - __uint32_t, size_t); -__STRING_INLINE void * -__mempcpy_small (void *__dest1, - char __src0_1, char __src2_1, char __src4_1, char __src6_1, - __uint16_t __src0_2, __uint16_t __src4_2, - __uint32_t __src0_4, __uint32_t __src4_4, - size_t __srclen) -{ - union { - __uint32_t __ui; - __uint16_t __usi; - unsigned char __uc; - unsigned char __c; - } *__u = __dest1; - switch ((unsigned int) __srclen) - { - case 1: - __u->__c = __src0_1; - __u = __extension__ (void *)((char *) __u + 1); - break; - case 2: - __u->__usi = __src0_2; - __u = __extension__ (void *)((char *) __u + 2); - break; - case 3: - __u->__usi = __src0_2; - __u = __extension__ (void *)((char *) __u + 2); - __u->__c = __src2_1; - __u = __extension__ (void *)((char *) __u + 1); - break; - case 4: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - break; - case 5: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__c = __src4_1; - __u = __extension__ (void *)((char *) __u + 1); - break; - case 6: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__usi = __src4_2; - __u = __extension__ (void *)((char *) __u + 2); - break; - case 7: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__usi = __src4_2; - __u = __extension__ (void *)((char *) __u + 2); - __u->__c = __src6_1; - __u = __extension__ (void *)((char *) __u + 1); - break; - case 8: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__ui = __src4_4; - __u = __extension__ (void *)((char *) __u + 4); - break; - } - return (void *) __u; -} -# else -# ifndef _FORCE_INLINES -# define __mempcpy_args(src) \ - ((__const char *) (src))[0], \ - __extension__ ((__STRING2_COPY_ARR2) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1] } }), \ - __extension__ ((__STRING2_COPY_ARR3) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2] } }), \ - __extension__ ((__STRING2_COPY_ARR4) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3] } }), \ - __extension__ ((__STRING2_COPY_ARR5) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4] } }), \ - __extension__ ((__STRING2_COPY_ARR6) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5] } }), \ - __extension__ ((__STRING2_COPY_ARR7) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - ((__const char *) (src))[6] } }), \ - __extension__ ((__STRING2_COPY_ARR8) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - ((__const char *) (src))[6], ((__const char *) (src))[7] } }) -# endif -__STRING_INLINE void *__mempcpy_small (void *, char, __STRING2_COPY_ARR2, - __STRING2_COPY_ARR3, - __STRING2_COPY_ARR4, - __STRING2_COPY_ARR5, - __STRING2_COPY_ARR6, - __STRING2_COPY_ARR7, - __STRING2_COPY_ARR8, size_t); -__STRING_INLINE void * -__mempcpy_small (void *__dest, char __src1, - __STRING2_COPY_ARR2 __src2, __STRING2_COPY_ARR3 __src3, - __STRING2_COPY_ARR4 __src4, __STRING2_COPY_ARR5 __src5, - __STRING2_COPY_ARR6 __src6, __STRING2_COPY_ARR7 __src7, - __STRING2_COPY_ARR8 __src8, size_t __srclen) -{ - union { - char __c; - __STRING2_COPY_ARR2 __sca2; - __STRING2_COPY_ARR3 __sca3; - __STRING2_COPY_ARR4 __sca4; - __STRING2_COPY_ARR5 __sca5; - __STRING2_COPY_ARR6 __sca6; - __STRING2_COPY_ARR7 __sca7; - __STRING2_COPY_ARR8 __sca8; - } *__u = __dest; - switch ((unsigned int) __srclen) - { - case 1: - __u->__c = __src1; - break; - case 2: - __extension__ __u->__sca2 = __src2; - break; - case 3: - __extension__ __u->__sca3 = __src3; - break; - case 4: - __extension__ __u->__sca4 = __src4; - break; - case 5: - __extension__ __u->__sca5 = __src5; - break; - case 6: - __extension__ __u->__sca6 = __src6; - break; - case 7: - __extension__ __u->__sca7 = __src7; - break; - case 8: - __extension__ __u->__sca8 = __src8; - break; - } - return __extension__ (void *)((char *) __u + __srclen); -} -# endif -# endif -#endif - - -/* Return pointer to C in S. */ -#ifndef _HAVE_STRING_ARCH_strchr -extern void *__rawmemchr (const void *__s, int __c); -# define strchr(s, c) \ - (__extension__ (__builtin_constant_p (c) && (c) == '\0' \ - ? (char *) __rawmemchr (s, c) \ - : strchr (s, c))) -#endif - - -/* Copy SRC to DEST. */ -#if !defined _HAVE_STRING_ARCH_strcpy || defined _FORCE_INLINES -# ifndef _HAVE_STRING_ARCH_strcpy -# define strcpy(dest, src) \ - (__extension__ (__builtin_constant_p (src) \ - ? (__string2_1bptr_p (src) && strlen (src) + 1 <= 8 \ - ? __strcpy_small (dest, __strcpy_args (src), \ - strlen (src) + 1) \ - : (char *) memcpy (dest, src, strlen (src) + 1)) \ - : strcpy (dest, src))) -# endif - -# if _STRING_ARCH_unaligned -# ifndef _FORCE_INLINES -# define __strcpy_args(src) \ - __extension__ __STRING2_SMALL_GET16 (src, 0), \ - __extension__ __STRING2_SMALL_GET16 (src, 4), \ - __extension__ __STRING2_SMALL_GET32 (src, 0), \ - __extension__ __STRING2_SMALL_GET32 (src, 4) -# endif -__STRING_INLINE char *__strcpy_small (char *, __uint16_t, __uint16_t, - __uint32_t, __uint32_t, size_t); -__STRING_INLINE char * -__strcpy_small (char *__dest, - __uint16_t __src0_2, __uint16_t __src4_2, - __uint32_t __src0_4, __uint32_t __src4_4, - size_t __srclen) -{ - union { - __uint32_t __ui; - __uint16_t __usi; - unsigned char __uc; - } *__u = (void *) __dest; - switch ((unsigned int) __srclen) - { - case 1: - __u->__uc = '\0'; - break; - case 2: - __u->__usi = __src0_2; - break; - case 3: - __u->__usi = __src0_2; - __u = __extension__ (void *)((char *) __u + 2); - __u->__uc = '\0'; - break; - case 4: - __u->__ui = __src0_4; - break; - case 5: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__uc = '\0'; - break; - case 6: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__usi = __src4_2; - break; - case 7: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__usi = __src4_2; - __u = __extension__ (void *)((char *) __u + 2); - __u->__uc = '\0'; - break; - case 8: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__ui = __src4_4; - break; - } - return __dest; -} -# else -# ifndef _FORCE_INLINES -# define __strcpy_args(src) \ - __extension__ ((__STRING2_COPY_ARR2) \ - { { ((__const char *) (src))[0], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR3) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR4) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR5) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR6) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR7) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR8) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - ((__const char *) (src))[6], '\0' } }) -# endif -__STRING_INLINE char *__strcpy_small (char *, __STRING2_COPY_ARR2, - __STRING2_COPY_ARR3, - __STRING2_COPY_ARR4, - __STRING2_COPY_ARR5, - __STRING2_COPY_ARR6, - __STRING2_COPY_ARR7, - __STRING2_COPY_ARR8, size_t); -__STRING_INLINE char * -__strcpy_small (char *__dest, - __STRING2_COPY_ARR2 __src2, __STRING2_COPY_ARR3 __src3, - __STRING2_COPY_ARR4 __src4, __STRING2_COPY_ARR5 __src5, - __STRING2_COPY_ARR6 __src6, __STRING2_COPY_ARR7 __src7, - __STRING2_COPY_ARR8 __src8, size_t __srclen) -{ - union { - char __c; - __STRING2_COPY_ARR2 __sca2; - __STRING2_COPY_ARR3 __sca3; - __STRING2_COPY_ARR4 __sca4; - __STRING2_COPY_ARR5 __sca5; - __STRING2_COPY_ARR6 __sca6; - __STRING2_COPY_ARR7 __sca7; - __STRING2_COPY_ARR8 __sca8; - } *__u = (void *) __dest; - switch ((unsigned int) __srclen) - { - case 1: - __u->__c = '\0'; - break; - case 2: - __extension__ __u->__sca2 = __src2; - break; - case 3: - __extension__ __u->__sca3 = __src3; - break; - case 4: - __extension__ __u->__sca4 = __src4; - break; - case 5: - __extension__ __u->__sca5 = __src5; - break; - case 6: - __extension__ __u->__sca6 = __src6; - break; - case 7: - __extension__ __u->__sca7 = __src7; - break; - case 8: - __extension__ __u->__sca8 = __src8; - break; - } - return __dest; -} -# endif -#endif - - -/* Copy SRC to DEST, returning pointer to final NUL byte. */ -#ifdef __USE_GNU -# if !defined _HAVE_STRING_ARCH_stpcpy || defined _FORCE_INLINES -# ifndef _HAVE_STRING_ARCH_stpcpy -# define __stpcpy(dest, src) \ - (__extension__ (__builtin_constant_p (src) \ - ? (__string2_1bptr_p (src) && strlen (src) + 1 <= 8 \ - ? __stpcpy_small (dest, __stpcpy_args (src), \ - strlen (src) + 1) \ - : ((char *) __mempcpy (dest, src, strlen (src) + 1) - 1))\ - : __stpcpy (dest, src))) -/* In glibc we use this function frequently but for namespace reasons - we have to use the name `__stpcpy'. */ -# define stpcpy(dest, src) __stpcpy (dest, src) -# endif - -# if _STRING_ARCH_unaligned -# ifndef _FORCE_INLINES -# define __stpcpy_args(src) \ - __extension__ __STRING2_SMALL_GET16 (src, 0), \ - __extension__ __STRING2_SMALL_GET16 (src, 4), \ - __extension__ __STRING2_SMALL_GET32 (src, 0), \ - __extension__ __STRING2_SMALL_GET32 (src, 4) -# endif -__STRING_INLINE char *__stpcpy_small (char *, __uint16_t, __uint16_t, - __uint32_t, __uint32_t, size_t); -__STRING_INLINE char * -__stpcpy_small (char *__dest, - __uint16_t __src0_2, __uint16_t __src4_2, - __uint32_t __src0_4, __uint32_t __src4_4, - size_t __srclen) -{ - union { - unsigned int __ui; - unsigned short int __usi; - unsigned char __uc; - char __c; - } *__u = (void *) __dest; - switch ((unsigned int) __srclen) - { - case 1: - __u->__uc = '\0'; - break; - case 2: - __u->__usi = __src0_2; - __u = __extension__ (void *)((char *) __u + 1); - break; - case 3: - __u->__usi = __src0_2; - __u = __extension__ (void *)((char *) __u + 2); - __u->__uc = '\0'; - break; - case 4: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 3); - break; - case 5: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__uc = '\0'; - break; - case 6: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__usi = __src4_2; - __u = __extension__ (void *)((char *) __u + 1); - break; - case 7: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__usi = __src4_2; - __u = __extension__ (void *)((char *) __u + 2); - __u->__uc = '\0'; - break; - case 8: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__ui = __src4_4; - __u = __extension__ (void *)((char *) __u + 3); - break; - } - return &__u->__c; -} -# else -# ifndef _FORCE_INLINES -# define __stpcpy_args(src) \ - __extension__ ((__STRING2_COPY_ARR2) \ - { { ((__const char *) (src))[0], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR3) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR4) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR5) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR6) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR7) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR8) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - ((__const char *) (src))[6], '\0' } }) -# endif -__STRING_INLINE char *__stpcpy_small (char *, __STRING2_COPY_ARR2, - __STRING2_COPY_ARR3, - __STRING2_COPY_ARR4, - __STRING2_COPY_ARR5, - __STRING2_COPY_ARR6, - __STRING2_COPY_ARR7, - __STRING2_COPY_ARR8, size_t); -__STRING_INLINE char * -__stpcpy_small (char *__dest, - __STRING2_COPY_ARR2 __src2, __STRING2_COPY_ARR3 __src3, - __STRING2_COPY_ARR4 __src4, __STRING2_COPY_ARR5 __src5, - __STRING2_COPY_ARR6 __src6, __STRING2_COPY_ARR7 __src7, - __STRING2_COPY_ARR8 __src8, size_t __srclen) -{ - union { - char __c; - __STRING2_COPY_ARR2 __sca2; - __STRING2_COPY_ARR3 __sca3; - __STRING2_COPY_ARR4 __sca4; - __STRING2_COPY_ARR5 __sca5; - __STRING2_COPY_ARR6 __sca6; - __STRING2_COPY_ARR7 __sca7; - __STRING2_COPY_ARR8 __sca8; - } *__u = (void *) __dest; - switch ((unsigned int) __srclen) - { - case 1: - __u->__c = '\0'; - break; - case 2: - __extension__ __u->__sca2 = __src2; - break; - case 3: - __extension__ __u->__sca3 = __src3; - break; - case 4: - __extension__ __u->__sca4 = __src4; - break; - case 5: - __extension__ __u->__sca5 = __src5; - break; - case 6: - __extension__ __u->__sca6 = __src6; - break; - case 7: - __extension__ __u->__sca7 = __src7; - break; - case 8: - __extension__ __u->__sca8 = __src8; - break; - } - return __dest + __srclen - 1; -} -# endif -# endif -#endif - - -/* Copy no more than N characters of SRC to DEST. */ -#ifndef _HAVE_STRING_ARCH_strncpy -# if defined _USE_STRING_ARCH_memset && defined _USE_STRING_ARCH_mempcpy -# define strncpy(dest, src, n) \ - (__extension__ ({ char *__dest = (dest); \ - __builtin_constant_p (src) && __builtin_constant_p (n) \ - ? (strlen (src) + 1 >= ((size_t) (n)) \ - ? (char *) memcpy (__dest, src, n) \ - : (memset (__mempcpy (__dest, src, strlen (src)), \ - '\0', n - strlen (src)), \ - __dest)) \ - : strncpy (__dest, src, n); })) -# else -# define strncpy(dest, src, n) \ - (__extension__ (__builtin_constant_p (src) && __builtin_constant_p (n) \ - ? (strlen (src) + 1 >= ((size_t) (n)) \ - ? (char *) memcpy (dest, src, n) \ - : strncpy (dest, src, n)) \ - : strncpy (dest, src, n))) -# endif -#endif - - -/* Append no more than N characters from SRC onto DEST. */ -#ifndef _HAVE_STRING_ARCH_strncat -# ifdef _USE_STRING_ARCH_strchr -# define strncat(dest, src, n) \ - (__extension__ ({ char *__dest = (dest); \ - __builtin_constant_p (src) && __builtin_constant_p (n) \ - ? (strlen (src) < ((size_t) (n)) \ - ? strcat (__dest, src) \ - : (*((char *) __mempcpy (strchr (__dest, '\0'), \ - src, n)) = '\0', __dest)) \ - : strncat (dest, src, n); })) -# else -# define strncat(dest, src, n) \ - (__extension__ (__builtin_constant_p (src) && __builtin_constant_p (n) \ - ? (strlen (src) < ((size_t) (n)) \ - ? strcat (dest, src) \ - : strncat (dest, src, n)) \ - : strncat (dest, src, n))) -# endif -#endif - - -/* Compare characters of S1 and S2. */ -#ifndef _HAVE_STRING_ARCH_strcmp -# define strcmp(s1, s2) \ - __extension__ \ - ({ size_t __s1_len, __s2_len; \ - (__builtin_constant_p (s1) && __builtin_constant_p (s2) \ - && (__s1_len = strlen (s1), __s2_len = strlen (s2), \ - (!__string2_1bptr_p (s1) || __s1_len >= 4) \ - && (!__string2_1bptr_p (s2) || __s2_len >= 4)) \ - ? memcmp ((__const char *) (s1), (__const char *) (s2), \ - (__s1_len < __s2_len ? __s1_len : __s2_len) + 1) \ - : (__builtin_constant_p (s1) && __string2_1bptr_p (s1) \ - && (__s1_len = strlen (s1), __s1_len < 4) \ - ? (__builtin_constant_p (s2) && __string2_1bptr_p (s2) \ - ? __strcmp_cc (s1, s2, __s1_len) \ - : __strcmp_cg (s1, s2, __s1_len)) \ - : (__builtin_constant_p (s2) && __string2_1bptr_p (s2) \ - && (__s2_len = strlen (s2), __s2_len < 4) \ - ? (__builtin_constant_p (s1) && __string2_1bptr_p (s1) \ - ? __strcmp_cc (s1, s2, __s2_len) \ - : __strcmp_gc (s1, s2, __s2_len)) \ - : strcmp (s1, s2)))); }) - -# define __strcmp_cc(s1, s2, l) \ - (__extension__ ({ register int __result = \ - (((__const unsigned char *) (__const char *) (s1))[0] \ - - ((__const unsigned char *) (__const char *)(s2))[0]);\ - if (l > 0 && __result == 0) \ - { \ - __result = (((__const unsigned char *) \ - (__const char *) (s1))[1] \ - - ((__const unsigned char *) \ - (__const char *) (s2))[1]); \ - if (l > 1 && __result == 0) \ - { \ - __result = \ - (((__const unsigned char *) \ - (__const char *) (s1))[2] \ - - ((__const unsigned char *) \ - (__const char *) (s2))[2]); \ - if (l > 2 && __result == 0) \ - __result = \ - (((__const unsigned char *) \ - (__const char *) (s1))[3] \ - - ((__const unsigned char *) \ - (__const char *) (s2))[3]); \ - } \ - } \ - __result; })) - -# define __strcmp_cg(s1, s2, l1) \ - (__extension__ ({ __const unsigned char *__s2 = \ - (__const unsigned char *) (__const char *) (s2); \ - register int __result = \ - (((__const unsigned char *) (__const char *) (s1))[0] \ - - __s2[0]); \ - if (l1 > 0 && __result == 0) \ - { \ - __result = (((__const unsigned char *) \ - (__const char *) (s1))[1] - __s2[1]); \ - if (l1 > 1 && __result == 0) \ - { \ - __result = (((__const unsigned char *) \ - (__const char *) (s1))[2] - __s2[2]);\ - if (l1 > 2 && __result == 0) \ - __result = (((__const unsigned char *) \ - (__const char *) (s1))[3] \ - - __s2[3]); \ - } \ - } \ - __result; })) - -# define __strcmp_gc(s1, s2, l2) \ - (__extension__ ({ __const unsigned char *__s1 = \ - (__const unsigned char *) (__const char *) (s1); \ - register int __result = \ - __s1[0] - ((__const unsigned char *) \ - (__const char *) (s2))[0]; \ - if (l2 > 0 && __result == 0) \ - { \ - __result = (__s1[1] \ - - ((__const unsigned char *) \ - (__const char *) (s2))[1]); \ - if (l2 > 1 && __result == 0) \ - { \ - __result = \ - (__s1[2] - ((__const unsigned char *) \ - (__const char *) (s2))[2]); \ - if (l2 > 2 && __result == 0) \ - __result = \ - (__s1[3] \ - - ((__const unsigned char *) \ - (__const char *) (s2))[3]); \ - } \ - } \ - __result; })) -#endif - - -/* Compare N characters of S1 and S2. */ -#ifndef _HAVE_STRING_ARCH_strncmp -# define strncmp(s1, s2, n) \ - (__extension__ (__builtin_constant_p (n) \ - && ((__builtin_constant_p (s1) \ - && strlen (s1) < ((size_t) (n))) \ - || (__builtin_constant_p (s2) \ - && strlen (s2) < ((size_t) (n)))) \ - ? strcmp (s1, s2) : strncmp (s1, s2, n))) -#endif - - -/* Return the length of the initial segment of S which - consists entirely of characters not in REJECT. */ -#if !defined _HAVE_STRING_ARCH_strcspn || defined _FORCE_INLINES -# ifndef _HAVE_STRING_ARCH_strcspn -# define strcspn(s, reject) \ - __extension__ \ - ({ char __r0, __r1, __r2; \ - (__builtin_constant_p (reject) && __string2_1bptr_p (reject) \ - ? ((__r0 = ((__const char *) (reject))[0], __r0 == '\0') \ - ? strlen (s) \ - : ((__r1 = ((__const char *) (reject))[1], __r1 == '\0') \ - ? __strcspn_c1 (s, __r0) \ - : ((__r2 = ((__const char *) (reject))[2], __r2 == '\0') \ - ? __strcspn_c2 (s, __r0, __r1) \ - : (((__const char *) (reject))[3] == '\0' \ - ? __strcspn_c3 (s, __r0, __r1, __r2) \ - : strcspn (s, reject))))) \ - : strcspn (s, reject)); }) -# endif - -__STRING_INLINE size_t __strcspn_c1 (__const char *__s, int __reject); -__STRING_INLINE size_t -__strcspn_c1 (__const char *__s, int __reject) -{ - register size_t __result = 0; - while (__s[__result] != '\0' && __s[__result] != __reject) - ++__result; - return __result; -} - -__STRING_INLINE size_t __strcspn_c2 (__const char *__s, int __reject1, - int __reject2); -__STRING_INLINE size_t -__strcspn_c2 (__const char *__s, int __reject1, int __reject2) -{ - register size_t __result = 0; - while (__s[__result] != '\0' && __s[__result] != __reject1 - && __s[__result] != __reject2) - ++__result; - return __result; -} - -__STRING_INLINE size_t __strcspn_c3 (__const char *__s, int __reject1, - int __reject2, int __reject3); -__STRING_INLINE size_t -__strcspn_c3 (__const char *__s, int __reject1, int __reject2, - int __reject3) -{ - register size_t __result = 0; - while (__s[__result] != '\0' && __s[__result] != __reject1 - && __s[__result] != __reject2 && __s[__result] != __reject3) - ++__result; - return __result; -} -#endif - - -/* Return the length of the initial segment of S which - consists entirely of characters in ACCEPT. */ -#if !defined _HAVE_STRING_ARCH_strspn || defined _FORCE_INLINES -# ifndef _HAVE_STRING_ARCH_strspn -# define strspn(s, accept) \ - __extension__ \ - ({ char __a0, __a1, __a2; \ - (__builtin_constant_p (accept) && __string2_1bptr_p (accept) \ - ? ((__a0 = ((__const char *) (accept))[0], __a0 == '\0') \ - ? ((void) (s), 0) \ - : ((__a1 = ((__const char *) (accept))[1], __a1 == '\0') \ - ? __strspn_c1 (s, __a0) \ - : ((__a2 = ((__const char *) (accept))[2], __a2 == '\0') \ - ? __strspn_c2 (s, __a0, __a1) \ - : (((__const char *) (accept))[3] == '\0' \ - ? __strspn_c3 (s, __a0, __a1, __a2) \ - : strspn (s, accept))))) \ - : strspn (s, accept)); }) -# endif - -__STRING_INLINE size_t __strspn_c1 (__const char *__s, int __accept); -__STRING_INLINE size_t -__strspn_c1 (__const char *__s, int __accept) -{ - register size_t __result = 0; - /* Please note that __accept never can be '\0'. */ - while (__s[__result] == __accept) - ++__result; - return __result; -} - -__STRING_INLINE size_t __strspn_c2 (__const char *__s, int __accept1, - int __accept2); -__STRING_INLINE size_t -__strspn_c2 (__const char *__s, int __accept1, int __accept2) -{ - register size_t __result = 0; - /* Please note that __accept1 and __accept2 never can be '\0'. */ - while (__s[__result] == __accept1 || __s[__result] == __accept2) - ++__result; - return __result; -} - -__STRING_INLINE size_t __strspn_c3 (__const char *__s, int __accept1, - int __accept2, int __accept3); -__STRING_INLINE size_t -__strspn_c3 (__const char *__s, int __accept1, int __accept2, int __accept3) -{ - register size_t __result = 0; - /* Please note that __accept1 to __accept3 never can be '\0'. */ - while (__s[__result] == __accept1 || __s[__result] == __accept2 - || __s[__result] == __accept3) - ++__result; - return __result; -} -#endif - - -/* Find the first occurrence in S of any character in ACCEPT. */ -#if !defined _HAVE_STRING_ARCH_strpbrk || defined _FORCE_INLINES -# ifndef _HAVE_STRING_ARCH_strpbrk -# define strpbrk(s, accept) \ - __extension__ \ - ({ char __a0, __a1, __a2; \ - (__builtin_constant_p (accept) && __string2_1bptr_p (accept) \ - ? ((__a0 = ((__const char *) (accept))[0], __a0 == '\0') \ - ? ((void) (s), NULL) \ - : ((__a1 = ((__const char *) (accept))[1], __a1 == '\0') \ - ? strchr (s, __a0) \ - : ((__a2 = ((__const char *) (accept))[2], __a2 == '\0') \ - ? __strpbrk_c2 (s, __a0, __a1) \ - : (((__const char *) (accept))[3] == '\0' \ - ? __strpbrk_c3 (s, __a0, __a1, __a2) \ - : strpbrk (s, accept))))) \ - : strpbrk (s, accept)); }) -# endif - -__STRING_INLINE char *__strpbrk_c2 (__const char *__s, int __accept1, - int __accept2); -__STRING_INLINE char * -__strpbrk_c2 (__const char *__s, int __accept1, int __accept2) -{ - /* Please note that __accept1 and __accept2 never can be '\0'. */ - while (*__s != '\0' && *__s != __accept1 && *__s != __accept2) - ++__s; - return *__s == '\0' ? NULL : (char *) (size_t) __s; -} - -__STRING_INLINE char *__strpbrk_c3 (__const char *__s, int __accept1, - int __accept2, int __accept3); -__STRING_INLINE char * -__strpbrk_c3 (__const char *__s, int __accept1, int __accept2, - int __accept3) -{ - /* Please note that __accept1 to __accept3 never can be '\0'. */ - while (*__s != '\0' && *__s != __accept1 && *__s != __accept2 - && *__s != __accept3) - ++__s; - return *__s == '\0' ? NULL : (char *) (size_t) __s; -} -#endif - - -/* Find the first occurrence of NEEDLE in HAYSTACK. Newer gcc versions - do this itself. */ -#if !defined _HAVE_STRING_ARCH_strstr && !__GNUC_PREREQ (2, 97) -# define strstr(haystack, needle) \ - (__extension__ (__builtin_constant_p (needle) && __string2_1bptr_p (needle) \ - ? (((__const char *) (needle))[0] == '\0' \ - ? (char *) (size_t) (haystack) \ - : (((__const char *) (needle))[1] == '\0' \ - ? strchr (haystack, \ - ((__const char *) (needle))[0]) \ - : strstr (haystack, needle))) \ - : strstr (haystack, needle))) -#endif - - -#if !defined _HAVE_STRING_ARCH_strtok_r || defined _FORCE_INLINES -# ifndef _HAVE_STRING_ARCH_strtok_r -# define __strtok_r(s, sep, nextp) \ - (__extension__ (__builtin_constant_p (sep) && __string2_1bptr_p (sep) \ - ? (((__const char *) (sep))[0] != '\0' \ - && ((__const char *) (sep))[1] == '\0' \ - ? __strtok_r_1c (s, ((__const char *) (sep))[0], nextp) \ - : __strtok_r (s, sep, nextp)) \ - : __strtok_r (s, sep, nextp))) -# endif - -__STRING_INLINE char *__strtok_r_1c (char *__s, char __sep, char **__nextp); -__STRING_INLINE char * -__strtok_r_1c (char *__s, char __sep, char **__nextp) -{ - char *__result; - if (__s == NULL) - __s = *__nextp; - while (*__s == __sep) - ++__s; - __result = NULL; - if (*__s != '\0') - { - __result = __s++; - while (*__s != '\0') - if (*__s++ == __sep) - { - __s[-1] = '\0'; - break; - } - *__nextp = __s; - } - return __result; -} -# if defined __USE_POSIX || defined __USE_MISC -# define strtok_r(s, sep, nextp) __strtok_r (s, sep, nextp) -# endif -#endif - - -#if !defined _HAVE_STRING_ARCH_strsep || defined _FORCE_INLINES -# ifndef _HAVE_STRING_ARCH_strsep -# define __strsep(s, reject) \ - __extension__ \ - ({ char __r0, __r1, __r2; \ - (__builtin_constant_p (reject) && __string2_1bptr_p (reject) \ - && (__r0 = ((__const char *) (reject))[0], \ - ((__const char *) (reject))[0] != '\0') \ - ? ((__r1 = ((__const char *) (reject))[1], \ - ((__const char *) (reject))[1] == '\0') \ - ? __strsep_1c (s, __r0) \ - : ((__r2 = ((__const char *) (reject))[2], __r2 == '\0') \ - ? __strsep_2c (s, __r0, __r1) \ - : (((__const char *) (reject))[3] == '\0' \ - ? __strsep_3c (s, __r0, __r1, __r2) \ - : __strsep (s, reject)))) \ - : __strsep (s, reject)); }) -# endif - -__STRING_INLINE char *__strsep_1c (char **__s, char __reject); -__STRING_INLINE char * -__strsep_1c (char **__s, char __reject) -{ - register char *__retval = *__s; - if (__retval != NULL && (*__s = strchr (__retval, __reject)) != NULL) - *(*__s)++ = '\0'; - return __retval; -} - -__STRING_INLINE char *__strsep_2c (char **__s, char __reject1, char __reject2); -__STRING_INLINE char * -__strsep_2c (char **__s, char __reject1, char __reject2) -{ - register char *__retval = *__s; - if (__retval != NULL) - { - register char *__cp = __retval; - while (1) - { - if (*__cp == '\0') - { - __cp = NULL; - break; - } - if (*__cp == __reject1 || *__cp == __reject2) - { - *__cp++ = '\0'; - break; - } - ++__cp; - } - *__s = __cp; - } - return __retval; -} - -__STRING_INLINE char *__strsep_3c (char **__s, char __reject1, char __reject2, - char __reject3); -__STRING_INLINE char * -__strsep_3c (char **__s, char __reject1, char __reject2, char __reject3) -{ - register char *__retval = *__s; - if (__retval != NULL) - { - register char *__cp = __retval; - while (1) - { - if (*__cp == '\0') - { - __cp = NULL; - break; - } - if (*__cp == __reject1 || *__cp == __reject2 || *__cp == __reject3) - { - *__cp++ = '\0'; - break; - } - ++__cp; - } - *__s = __cp; - } - return __retval; -} -# ifdef __USE_BSD -# define strsep(s, reject) __strsep (s, reject) -# endif -#endif - -/* We need the memory allocation functions for inline strdup(). - Referring to stdlib.h (even minimally) is not allowed - in any of the tight standards compliant modes. */ -#ifdef __USE_MISC - -# if !defined _HAVE_STRING_ARCH_strdup || !defined _HAVE_STRING_ARCH_strndup -# define __need_malloc_and_calloc -# include <stdlib.h> -# endif - -# ifndef _HAVE_STRING_ARCH_strdup - -extern char *__strdup (__const char *__string) __THROW __attribute_malloc__; -# define __strdup(s) \ - (__extension__ (__builtin_constant_p (s) && __string2_1bptr_p (s) \ - ? (((__const char *) (s))[0] == '\0' \ - ? (char *) calloc (1, 1) \ - : ({ size_t __len = strlen (s) + 1; \ - char *__retval = (char *) malloc (__len); \ - if (__retval != NULL) \ - __retval = (char *) memcpy (__retval, s, __len); \ - __retval; })) \ - : __strdup (s))) - -# if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN_EXTENDED -# define strdup(s) __strdup (s) -# endif -# endif - -# ifndef _HAVE_STRING_ARCH_strndup - -extern char *__strndup (__const char *__string, size_t __n) - __THROW __attribute_malloc__; -# define __strndup(s, n) \ - (__extension__ (__builtin_constant_p (s) && __string2_1bptr_p (s) \ - ? (((__const char *) (s))[0] == '\0' \ - ? (char *) calloc (1, 1) \ - : ({ size_t __len = strlen (s) + 1; \ - size_t __n = (n); \ - char *__retval; \ - if (__n < __len) \ - __len = __n; \ - __retval = (char *) malloc (__len); \ - if (__retval != NULL) \ - { \ - __retval[__len - 1] = '\0'; \ - __retval = (char *) memcpy (__retval, s, \ - __len - 1); \ - } \ - __retval; })) \ - : __strndup (s, n))) - -# ifdef __USE_GNU -# define strndup(s, n) __strndup (s, n) -# endif -# endif - -#endif /* Use misc. or use GNU. */ - -#ifndef _FORCE_INLINES -# undef __STRING_INLINE -#endif - -#endif /* No string inlines. */ diff --git a/libc/sysdeps/linux/arm/bits/types.h b/libc/sysdeps/linux/arm/bits/types.h deleted file mode 100644 index bdda9388a..000000000 --- a/libc/sysdeps/linux/arm/bits/types.h +++ /dev/null @@ -1,146 +0,0 @@ -/* Copyright (C) 1991,92,1994-1999,2000,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. */ - -/* - * Never include this file directly; use <sys/types.h> instead. - */ - -#ifndef _BITS_TYPES_H -#define _BITS_TYPES_H 1 - -#include <features.h> - -#define __need_size_t -#include <stddef.h> - -/* Convenience types. */ -typedef unsigned char __u_char; -typedef unsigned short __u_short; -typedef unsigned int __u_int; -typedef unsigned long __u_long; -#ifdef __GNUC__ -__extension__ typedef unsigned long long int __u_quad_t; -__extension__ typedef long long int __quad_t; -#else -typedef struct - { - long int __val[2]; - } __quad_t; -typedef struct - { - __u_long __val[2]; - } __u_quad_t; -#endif -typedef signed char __int8_t; -typedef unsigned char __uint8_t; -typedef signed short int __int16_t; -typedef unsigned short int __uint16_t; -typedef signed int __int32_t; -typedef unsigned int __uint32_t; -#ifdef __GNUC__ -__extension__ typedef signed long long int __int64_t; -__extension__ typedef unsigned long long int __uint64_t; -#endif -typedef __quad_t *__qaddr_t; - -typedef __u_quad_t __dev_t; /* Type of device numbers. */ -typedef __u_int __uid_t; /* Type of user identifications. */ -typedef __u_int __gid_t; /* Type of group identifications. */ -typedef __u_long __ino_t; /* Type of file serial numbers. */ -typedef __u_int __mode_t; /* Type of file attribute bitmasks. */ -typedef __u_int __nlink_t; /* Type of file link counts. */ -typedef long int __off_t; /* Type of file sizes and offsets. */ -typedef __quad_t __loff_t; /* Type of file sizes and offsets. */ -typedef int __pid_t; /* Type of process identifications. */ -typedef int __ssize_t; /* Type of a byte count, or error. */ -typedef __u_long __rlim_t; /* Type of resource counts. */ -typedef __u_quad_t __rlim64_t; /* Type of resource counts (LFS). */ -typedef __u_int __id_t; /* General type for ID. */ - -typedef struct - { - int __val[2]; - } __fsid_t; /* Type of file system IDs. */ - -/* Everythin' else. */ -typedef int __daddr_t; /* The type of a disk address. */ -typedef char *__caddr_t; -typedef long int __time_t; -typedef unsigned int __useconds_t; -typedef long int __suseconds_t; -typedef long int __swblk_t; /* Type of a swap block maybe? */ - -typedef long int __clock_t; - -/* Clock ID used in clock and timer functions. */ -typedef int __clockid_t; - -/* Timer ID returned by `timer_create'. */ -typedef int __timer_t; - - -/* Number of descriptors that can fit in an `fd_set'. */ -#define __FD_SETSIZE 1024 - - -typedef int __key_t; - -/* Used in `struct shmid_ds'. */ -typedef unsigned short int __ipc_pid_t; - - -/* Type to represent block size. */ -typedef long int __blksize_t; - -/* Types from the Large File Support interface. */ - -/* Type to count number os disk blocks. */ -typedef long int __blkcnt_t; -typedef __quad_t __blkcnt64_t; - -/* Type to count file system blocks. */ -typedef __u_long __fsblkcnt_t; -typedef __u_quad_t __fsblkcnt64_t; - -/* Type to count file system inodes. */ -typedef __u_long __fsfilcnt_t; -typedef __u_quad_t __fsfilcnt64_t; - -/* Type of file serial numbers. */ -typedef __u_quad_t __ino64_t; - -/* Type of file sizes and offsets. */ -typedef __loff_t __off64_t; - -/* Used in XTI. */ -typedef long int __t_scalar_t; -typedef unsigned long int __t_uscalar_t; - -/* Duplicates info from stdint.h but this is used in unistd.h. */ -typedef int __intptr_t; - -/* Duplicate info from sys/socket.h. */ -typedef unsigned int __socklen_t; - - -/* Now add the thread types. */ -#if defined __USE_POSIX199506 || defined __USE_UNIX98 -# include <bits/pthreadtypes.h> -#endif - -#endif /* bits/types.h */ diff --git a/libc/sysdeps/linux/mips/bits/ustat.h b/libc/sysdeps/linux/arm/sys/elf.h index aeafc22a5..faa731068 100644 --- a/libc/sysdeps/linux/mips/bits/ustat.h +++ b/libc/sysdeps/linux/arm/sys/elf.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1999, 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 @@ -16,12 +16,11 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include <sys/types.h> +#ifndef _SYS_ELF_H +#define _SYS_ELF_H 1 -struct ustat - { - __daddr_t f_tfree; - __ino_t f_tinode; - char f_fname[6]; - char f_fpack[6]; - }; +#warning "This header is obsolete; use <sys/procfs.h> instead." + +#include <sys/procfs.h> + +#endif /* sys/elf.h */ diff --git a/include/sys/io.h b/libc/sysdeps/linux/arm/sys/io.h index 9ea033a01..68639902c 100644 --- a/include/sys/io.h +++ b/libc/sysdeps/linux/arm/sys/io.h @@ -34,17 +34,6 @@ extern int ioperm (unsigned long int __from, unsigned long int __num, root privileges. */ extern int iopl (int __level) __THROW; - -#ifdef __i386__ -/* - * For i386, glibc defines the in* and out* functions as static inlines - * in this header file. For a number of other archs, these appear to be - * external functions. Since uClibc shares this header amongst archs, - * stash the i386 stuff in bits/io_i386.h for now to cut down on clutter - * and still give expected behavior. - */ -#include <bits/io_i386.h> -#else /* The functions that actually perform reads and writes. */ extern unsigned char inb (unsigned long int port) __THROW; extern unsigned short int inw (unsigned long int port) __THROW; @@ -53,7 +42,6 @@ extern unsigned long int inl (unsigned long int port) __THROW; extern void outb (unsigned char value, unsigned long int port) __THROW; extern void outw (unsigned short value, unsigned long int port) __THROW; extern void outl (unsigned long value, unsigned long int port) __THROW; -#endif /* __i386__ */ __END_DECLS diff --git a/include/sys/procfs.h b/libc/sysdeps/linux/arm/sys/procfs.h index 3b3736324..3b3736324 100644 --- a/include/sys/procfs.h +++ b/libc/sysdeps/linux/arm/sys/procfs.h diff --git a/include/sys/ucontext.h b/libc/sysdeps/linux/arm/sys/ucontext.h index 6d6c8e399..6d6c8e399 100644 --- a/include/sys/ucontext.h +++ b/libc/sysdeps/linux/arm/sys/ucontext.h diff --git a/include/sys/user.h b/libc/sysdeps/linux/arm/sys/user.h index 3fae43f83..3fae43f83 100644 --- a/include/sys/user.h +++ b/libc/sysdeps/linux/arm/sys/user.h diff --git a/libc/sysdeps/linux/mips/bits/byteswap.h b/libc/sysdeps/linux/common/bits/byteswap.h index 7866abe9c..38d854013 100644 --- a/libc/sysdeps/linux/mips/bits/byteswap.h +++ b/libc/sysdeps/linux/common/bits/byteswap.h @@ -1,5 +1,5 @@ /* Macros to swap the order of bytes in integer values. - Copyright (C) 1997, 1998, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 2000, 2001, 2002 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 @@ -21,6 +21,9 @@ # error "Never use <bits/byteswap.h> directly; include <byteswap.h> instead." #endif +#ifndef _BITS_BYTESWAP_H +#define _BITS_BYTESWAP_H 1 + /* Swap bytes in 16 bit value. */ #ifdef __GNUC__ # define __bswap_16(x) \ @@ -77,3 +80,5 @@ __bswap_32 (unsigned int __bsx) } \ __r.__ll; })) #endif + +#endif /* _BITS_BYTESWAP_H */ diff --git a/libc/sysdeps/linux/arm/bits/cmathcalls.h b/libc/sysdeps/linux/common/bits/cmathcalls.h index c680c6d8e..c680c6d8e 100644 --- a/libc/sysdeps/linux/arm/bits/cmathcalls.h +++ b/libc/sysdeps/linux/common/bits/cmathcalls.h diff --git a/libc/sysdeps/linux/arm/bits/confname.h b/libc/sysdeps/linux/common/bits/confname.h index ba8868af4..ba8868af4 100644 --- a/libc/sysdeps/linux/arm/bits/confname.h +++ b/libc/sysdeps/linux/common/bits/confname.h diff --git a/libc/sysdeps/linux/m68k/bits/dirent.h b/libc/sysdeps/linux/common/bits/dirent.h index 82d8663f2..fb40e99cb 100644 --- a/libc/sysdeps/linux/m68k/bits/dirent.h +++ b/libc/sysdeps/linux/common/bits/dirent.h @@ -52,4 +52,8 @@ struct dirent64 #undef _DIRENT_HAVE_D_NAMLEN #define _DIRENT_HAVE_D_RECLEN #define _DIRENT_HAVE_D_OFF -#undef _DIRENT_HAVE_D_TYPE +#ifdef __USE_FILE_OFFSET64 +# define _DIRENT_HAVE_D_TYPE +#else +# undef _DIRENT_HAVE_D_TYPE +#endif diff --git a/libc/sysdeps/linux/sparc/bits/dlfcn.h b/libc/sysdeps/linux/common/bits/dlfcn.h index e96b5c17a..e96b5c17a 100644 --- a/libc/sysdeps/linux/sparc/bits/dlfcn.h +++ b/libc/sysdeps/linux/common/bits/dlfcn.h diff --git a/libc/sysdeps/linux/arm/bits/elfclass.h b/libc/sysdeps/linux/common/bits/elfclass.h index 180227d9e..180227d9e 100644 --- a/libc/sysdeps/linux/arm/bits/elfclass.h +++ b/libc/sysdeps/linux/common/bits/elfclass.h diff --git a/libc/sysdeps/linux/common/bits/endian.h b/libc/sysdeps/linux/common/bits/endian.h new file mode 100644 index 000000000..45afd4ae4 --- /dev/null +++ b/libc/sysdeps/linux/common/bits/endian.h @@ -0,0 +1,13 @@ +/* This file should define __BYTE_ORDER as appropriate for the machine + in question. See string/endian.h for how to define it. + + If only the stub bits/endian.h applies to a particular configuration, + bytesex.h is generated by running a program on the host machine. + So if cross-compiling to a machine with a different byte order, + the bits/endian.h file for that machine must exist. */ + +#ifndef _ENDIAN_H +# error "Never use <bits/endian.h> directly; include <endian.h> instead." +#endif + +#error Machine byte order unknown. diff --git a/libc/sysdeps/linux/arm/bits/environments.h b/libc/sysdeps/linux/common/bits/environments.h index c3829927b..c3829927b 100644 --- a/libc/sysdeps/linux/arm/bits/environments.h +++ b/libc/sysdeps/linux/common/bits/environments.h diff --git a/libc/sysdeps/linux/arm/bits/errno.h b/libc/sysdeps/linux/common/bits/errno.h index ac59d4c9d..ac59d4c9d 100644 --- a/libc/sysdeps/linux/arm/bits/errno.h +++ b/libc/sysdeps/linux/common/bits/errno.h diff --git a/libc/sysdeps/linux/common/bits/fcntl.h b/libc/sysdeps/linux/common/bits/fcntl.h new file mode 100644 index 000000000..be40350e8 --- /dev/null +++ b/libc/sysdeps/linux/common/bits/fcntl.h @@ -0,0 +1,3 @@ +/* bits/fcntl.h is architecture specific. */ +#error "This file must be supplied by every Linux architecture." + diff --git a/libc/sysdeps/linux/v850/bits/fenv.h b/libc/sysdeps/linux/common/bits/fenv.h index 045957c23..a9cb53b40 100644 --- a/libc/sysdeps/linux/v850/bits/fenv.h +++ b/libc/sysdeps/linux/common/bits/fenv.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999, 2000, 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 @@ -40,13 +40,8 @@ We define no macro which signals no rounding mode is selectable. */ -/* Type representing exception flags. - XXX Probably we should also include the signal handler here. */ -typedef struct - { - unsigned int __flags; - } -fexcept_t; +/* Type representing exception flags. */ +typedef unsigned int fexcept_t; /* Type representing floating-point environment. */ @@ -58,4 +53,4 @@ typedef struct fenv_t; /* If the default argument is used we use this value. */ -#define FE_DFL_ENV ((fenv_t *) -1l) +#define FE_DFL_ENV ((__const fenv_t *) -1l) diff --git a/libc/sysdeps/linux/arm/bits/fenvinline.h b/libc/sysdeps/linux/common/bits/fenvinline.h index 42f77b561..42f77b561 100644 --- a/libc/sysdeps/linux/arm/bits/fenvinline.h +++ b/libc/sysdeps/linux/common/bits/fenvinline.h diff --git a/libc/sysdeps/linux/mips/bits/huge_val.h b/libc/sysdeps/linux/common/bits/huge_val.h index b33974364..b33974364 100644 --- a/libc/sysdeps/linux/mips/bits/huge_val.h +++ b/libc/sysdeps/linux/common/bits/huge_val.h diff --git a/libc/sysdeps/linux/arm/bits/in.h b/libc/sysdeps/linux/common/bits/in.h index e6cf57574..e6cf57574 100644 --- a/libc/sysdeps/linux/arm/bits/in.h +++ b/libc/sysdeps/linux/common/bits/in.h diff --git a/libc/sysdeps/linux/arm/bits/initspin.h b/libc/sysdeps/linux/common/bits/initspin.h index af19d44e6..257fed3c5 100644 --- a/libc/sysdeps/linux/arm/bits/initspin.h +++ b/libc/sysdeps/linux/common/bits/initspin.h @@ -20,9 +20,8 @@ /* Initial value of a spinlock. Most platforms should use zero, unless they only implement a "test and clear" operation instead of the usual "test and set". */ -#define __LT_SPINLOCK_INIT 0 +#define __ATOMIC_LOCK_INIT 0 /* Macros for lock initializers, using the above definition. */ -#define __LOCK_INITIALIZER { 0, __LT_SPINLOCK_INIT } -#define __ALT_LOCK_INITIALIZER { 0, __LT_SPINLOCK_INIT } -#define __ATOMIC_INITIALIZER { 0, __LT_SPINLOCK_INIT } +#define __LOCK_INITIALIZER { 0, 0 } +#define __ATOMIC_INITIALIZER { 0, 0 } diff --git a/libc/sysdeps/linux/arm/bits/ioctl-types.h b/libc/sysdeps/linux/common/bits/ioctl-types.h index e856a04b4..e856a04b4 100644 --- a/libc/sysdeps/linux/arm/bits/ioctl-types.h +++ b/libc/sysdeps/linux/common/bits/ioctl-types.h diff --git a/libc/sysdeps/linux/arm/bits/ioctls.h b/libc/sysdeps/linux/common/bits/ioctls.h index b49ca2076..b49ca2076 100644 --- a/libc/sysdeps/linux/arm/bits/ioctls.h +++ b/libc/sysdeps/linux/common/bits/ioctls.h diff --git a/libc/sysdeps/linux/arm/bits/ipc.h b/libc/sysdeps/linux/common/bits/ipc.h index f1a043fe5..f1a043fe5 100644 --- a/libc/sysdeps/linux/arm/bits/ipc.h +++ b/libc/sysdeps/linux/common/bits/ipc.h diff --git a/libc/sysdeps/linux/m68k/bits/libc-lock.h b/libc/sysdeps/linux/common/bits/libc-lock.h index 2c1d16277..f913903c5 100644 --- a/libc/sysdeps/linux/m68k/bits/libc-lock.h +++ b/libc/sysdeps/linux/common/bits/libc-lock.h @@ -63,12 +63,12 @@ typedef pthread_key_t __libc_key_t; initialized locks must be set to one due to the lack of normal atomic operations.) */ -#if __LT_SPINLOCK_INIT == 0 +#ifdef __LOCK_INITIALISER_NOT_ZERO # define __libc_lock_define_initialized(CLASS,NAME) \ - CLASS __libc_lock_t NAME; + CLASS __libc_lock_t NAME = PTHREAD_MUTEX_INITIALIZER; #else # define __libc_lock_define_initialized(CLASS,NAME) \ - CLASS __libc_lock_t NAME = PTHREAD_MUTEX_INITIALIZER; + CLASS __libc_lock_t NAME; #endif #define __libc_rwlock_define_initialized(CLASS,NAME) \ diff --git a/libc/sysdeps/linux/arm/bits/local_lim.h b/libc/sysdeps/linux/common/bits/local_lim.h index 0a7c83706..0a7c83706 100644 --- a/libc/sysdeps/linux/arm/bits/local_lim.h +++ b/libc/sysdeps/linux/common/bits/local_lim.h diff --git a/libc/sysdeps/linux/arm/bits/locale.h b/libc/sysdeps/linux/common/bits/locale.h index 50064b53e..50064b53e 100644 --- a/libc/sysdeps/linux/arm/bits/locale.h +++ b/libc/sysdeps/linux/common/bits/locale.h diff --git a/libc/sysdeps/linux/arm/bits/mathcalls.h b/libc/sysdeps/linux/common/bits/mathcalls.h index c1181f737..c1181f737 100644 --- a/libc/sysdeps/linux/arm/bits/mathcalls.h +++ b/libc/sysdeps/linux/common/bits/mathcalls.h diff --git a/libc/sysdeps/linux/mips/bits/mathdef.h b/libc/sysdeps/linux/common/bits/mathdef.h index d08dc3820..d08dc3820 100644 --- a/libc/sysdeps/linux/mips/bits/mathdef.h +++ b/libc/sysdeps/linux/common/bits/mathdef.h diff --git a/libc/sysdeps/linux/arm/bits/mathinline.h b/libc/sysdeps/linux/common/bits/mathinline.h index 5498af6b6..5498af6b6 100644 --- a/libc/sysdeps/linux/arm/bits/mathinline.h +++ b/libc/sysdeps/linux/common/bits/mathinline.h diff --git a/libc/sysdeps/linux/common/bits/mman.h b/libc/sysdeps/linux/common/bits/mman.h new file mode 100644 index 000000000..f567b9baa --- /dev/null +++ b/libc/sysdeps/linux/common/bits/mman.h @@ -0,0 +1,87 @@ +/* Definitions for BSD-style memory management. + Copyright (C) 1994-1998,2000,01 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. */ + +/* These are the bits used by 4.4 BSD and its derivatives. On systems + (such as GNU) where these facilities are not system services but can be + emulated in the C library, these are the definitions we emulate. */ + +#ifndef _SYS_MMAN_H +# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead." +#endif + +/* Protections are chosen from these bits, OR'd together. The + implementation does not necessarily support PROT_EXEC or PROT_WRITE + without PROT_READ. The only guarantees are that no writing will be + allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ + +#define PROT_NONE 0x00 /* No access. */ +#define PROT_READ 0x04 /* Pages can be read. */ +#define PROT_WRITE 0x02 /* Pages can be written. */ +#define PROT_EXEC 0x01 /* Pages can be executed. */ + +/* Flags contain mapping type, sharing type and options. */ + +/* Mapping type (must choose one and only one of these). */ +#ifdef __USE_BSD +# define MAP_FILE 0x0001 /* Mapped from a file or device. */ +# define MAP_ANON 0x0002 /* Allocated from anonymous virtual memory. */ +# define MAP_TYPE 0x000f /* Mask for type field. */ +# ifdef __USE_MISC +# define MAP_ANONYMOUS MAP_ANON /* Linux name. */ +# endif +#endif + +/* Sharing types (must choose one and only one of these). */ +#ifdef __USE_BSD +# define MAP_COPY 0x0020 /* Virtual copy of region at mapping time. */ +#endif +#define MAP_SHARED 0x0010 /* Share changes. */ +#define MAP_PRIVATE 0x0000 /* Changes private; copy pages on write. */ + +/* Other flags. */ +#define MAP_FIXED 0x0100 /* Map address must be exactly as requested. */ +#ifdef __USE_BSD +# define MAP_NOEXTEND 0x0200 /* For MAP_FILE, don't change file size. */ +# define MAP_HASSEMPHORE 0x0400 /* Region may contain semaphores. */ +# define MAP_INHERIT 0x0800 /* Region is retained after exec. */ +#endif + +/* Advice to `madvise'. */ +#ifdef __USE_BSD +# define MADV_NORMAL 0 /* No further special treatment. */ +# define MADV_RANDOM 1 /* Expect random page references. */ +# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define MADV_WILLNEED 3 /* Will need these pages. */ +# define MADV_DONTNEED 4 /* Don't need these pages. */ +#endif + +/* The POSIX people had to invent similar names for the same things. */ +#ifdef __USE_XOPEN2K +# define POSIX_MADV_NORMAL 0 /* No further special treatment. */ +# define POSIX_MADV_RANDOM 1 /* Expect random page references. */ +# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */ +# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */ +#endif + + +/* Flags for `mlockall' (can be OR'd together). */ +#define MCL_CURRENT 1 /* Lock all currently mapped pages. */ +#define MCL_FUTURE 2 /* Lock all additions to address + space. */ diff --git a/libc/sysdeps/linux/arm/bits/msq.h b/libc/sysdeps/linux/common/bits/msq.h index 32a49b592..32a49b592 100644 --- a/libc/sysdeps/linux/arm/bits/msq.h +++ b/libc/sysdeps/linux/common/bits/msq.h diff --git a/libc/sysdeps/linux/arm/bits/nan.h b/libc/sysdeps/linux/common/bits/nan.h index 6d88b551b..6d88b551b 100644 --- a/libc/sysdeps/linux/arm/bits/nan.h +++ b/libc/sysdeps/linux/common/bits/nan.h diff --git a/libc/sysdeps/linux/arm/bits/netdb.h b/libc/sysdeps/linux/common/bits/netdb.h index 41dc73193..41dc73193 100644 --- a/libc/sysdeps/linux/arm/bits/netdb.h +++ b/libc/sysdeps/linux/common/bits/netdb.h diff --git a/libc/sysdeps/linux/arm/bits/poll.h b/libc/sysdeps/linux/common/bits/poll.h index dccb8b666..dccb8b666 100644 --- a/libc/sysdeps/linux/arm/bits/poll.h +++ b/libc/sysdeps/linux/common/bits/poll.h diff --git a/libc/sysdeps/linux/arm/bits/posix1_lim.h b/libc/sysdeps/linux/common/bits/posix1_lim.h index e16f4674d..e16f4674d 100644 --- a/libc/sysdeps/linux/arm/bits/posix1_lim.h +++ b/libc/sysdeps/linux/common/bits/posix1_lim.h diff --git a/libc/sysdeps/linux/arm/bits/posix2_lim.h b/libc/sysdeps/linux/common/bits/posix2_lim.h index 24483a09d..24483a09d 100644 --- a/libc/sysdeps/linux/arm/bits/posix2_lim.h +++ b/libc/sysdeps/linux/common/bits/posix2_lim.h diff --git a/libc/sysdeps/linux/i386/bits/posix_opt.h b/libc/sysdeps/linux/common/bits/posix_opt.h index 38203b41d..4f7d78eb9 100644 --- a/libc/sysdeps/linux/i386/bits/posix_opt.h +++ b/libc/sysdeps/linux/common/bits/posix_opt.h @@ -1,4 +1,4 @@ -/* Define POSIX options for Linux/ix86. +/* Define POSIX options for Linux. Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -39,13 +39,25 @@ #define _POSIX_MAPPED_FILES 1 /* Locking of all memory is supported. */ -#define _POSIX_MEMLOCK 1 +#ifdef __UCLIBC_HAS_MMU__ +# define _POSIX_MEMLOCK 1 +#else +# undef _POSIX_MEMLOCK +#endif /* Locking of ranges of memory is supported. */ -#define _POSIX_MEMLOCK_RANGE 1 +#ifdef __UCLIBC_HAS_MMU__ +# define _POSIX_MEMLOCK_RANGE 1 +#else +# define _POSIX_MEMLOCK_RANGE +#endif /* Setting of memory protections is supported. */ -#define _POSIX_MEMORY_PROTECTION 1 +#ifdef __UCLIBC_HAS_MMU__ +# define _POSIX_MEMORY_PROTECTION 1 +#else +# undef _POSIX_MEMORY_PROTECTION +#endif /* Implementation supports `poll' function. */ #define _POSIX_POLL 1 @@ -67,17 +79,30 @@ #define _XOPEN_REALTIME 1 /* X/Open realtime thread support is available. */ -#undef _XOPEN_REALTIME_THREADS +#ifdef __UCLIBC_HAS_THREADS__ +# define _XOPEN_REALTIME_THREADS 1 +#else +# undef _XOPEN_REALTIME_THREADS +#endif /* XPG4.2 shared memory is supported. */ #define _XOPEN_SHM 1 /* Tell we have POSIX threads. */ -#undef _POSIX_THREADS +#ifdef __UCLIBC_HAS_THREADS__ +# define _POSIX_THREADS 1 +#else +# undef _POSIX_THREADS +#endif /* We have the reentrant functions described in POSIX. */ -#define _POSIX_REENTRANT_FUNCTIONS 1 -#define _POSIX_THREAD_SAFE_FUNCTIONS 1 +#ifdef __UCLIBC_HAS_THREADS__ +# define _POSIX_REENTRANT_FUNCTIONS 1 +# define _POSIX_THREAD_SAFE_FUNCTIONS 1 +#else +# undef _POSIX_REENTRANT_FUNCTIONS +# undef _POSIX_THREAD_SAFE_FUNCTIONS +#endif /* We provide priority scheduling for threads. */ #define _POSIX_THREAD_PRIORITY_SCHEDULING 1 @@ -89,7 +114,11 @@ #define _POSIX_THREAD_ATTR_STACKADDR 1 /* We support POSIX.1b semaphores, but only the non-shared form for now. */ -#define _POSIX_SEMAPHORES 1 +#ifdef __UCLIBC_HAS_THREADS__ +# define _POSIX_SEMAPHORES 1 +#else +# undef _POSIX_SEMAPHORES +#endif /* Real-time signals are supported. */ #define _POSIX_REALTIME_SIGNALS 1 @@ -101,24 +130,40 @@ #define _LFS_ASYNCHRONOUS_IO 1 /* The LFS support in asynchronous I/O is also available. */ -#define _LFS64_ASYNCHRONOUS_IO 1 +#ifdef __UCLIBC_HAVE_LFS__ +# define _LFS64_ASYNCHRONOUS_IO 1 +#else +# undef _LFS64_ASYNCHRONOUS_IO +#endif /* The rest of the LFS is also available. */ -#define _LFS_LARGEFILE 1 -#define _LFS64_LARGEFILE 1 -#define _LFS64_STDIO 1 +#ifdef __UCLIBC_HAVE_LFS__ +# define _LFS_LARGEFILE 1 +# define _LFS64_LARGEFILE 1 +# define _LFS64_STDIO 1 +#else +# undef _LFS_LARGEFILE +# undef _LFS64_LARGEFILE +# undef _LFS64_STDIO +#endif /* POSIX shared memory objects are implemented. */ #define _POSIX_SHARED_MEMORY_OBJECTS 1 +/* GNU libc provides regular expression handling. */ +#ifdef __UCLIBC_HAS_REGEX__ +# define _POSIX_REGEXP 1 +#else +# undef _POSIX_REGEXP +#endif + +#if defined(__i386__) /* CPU-time clocks supported. */ -#define _POSIX_CPUTIME 200912L +#define _POSIX_CPUTIME 200912L /* We support the clock also in threads. */ -#define _POSIX_THREAD_CPUTIME 200912L - -/* GNU libc provides regular expression handling. */ -#define _POSIX_REGEXP 1 +#define _POSIX_THREAD_CPUTIME 200912L +#endif /* Reader/Writer locks are available. */ #define _POSIX_READER_WRITER_LOCKS 200912L diff --git a/libc/sysdeps/linux/m68k/bits/pthreadtypes.h b/libc/sysdeps/linux/common/bits/pthreadtypes.h index 3ee5c4813..441734c9d 100644 --- a/libc/sysdeps/linux/m68k/bits/pthreadtypes.h +++ b/libc/sysdeps/linux/common/bits/pthreadtypes.h @@ -22,11 +22,13 @@ #define __need_schedparam #include <bits/sched.h> +typedef int __atomic_lock_t; + /* Fast locks (not abstract because mutexes and conditions aren't abstract). */ struct _pthread_fastlock { long int __status; /* "Free" or "taken" or head of waiting list */ - int __spinlock; /* Used by compare_and_swap emulation. Also, + __atomic_lock_t __spinlock; /* Used by compare_and_swap emulation. Also, adaptive SMP lock stores spin count here. */ }; diff --git a/libc/sysdeps/linux/v850/bits/resource.h b/libc/sysdeps/linux/common/bits/resource.h index 30825c2e0..30825c2e0 100644 --- a/libc/sysdeps/linux/v850/bits/resource.h +++ b/libc/sysdeps/linux/common/bits/resource.h diff --git a/libc/sysdeps/linux/arm/bits/sched.h b/libc/sysdeps/linux/common/bits/sched.h index 5c10d85d4..5c10d85d4 100644 --- a/libc/sysdeps/linux/arm/bits/sched.h +++ b/libc/sysdeps/linux/common/bits/sched.h diff --git a/libc/sysdeps/linux/arm/bits/select.h b/libc/sysdeps/linux/common/bits/select.h index 47e7dedc3..47e7dedc3 100644 --- a/libc/sysdeps/linux/arm/bits/select.h +++ b/libc/sysdeps/linux/common/bits/select.h diff --git a/libc/sysdeps/linux/arm/bits/sem.h b/libc/sysdeps/linux/common/bits/sem.h index 6193501e2..6193501e2 100644 --- a/libc/sysdeps/linux/arm/bits/sem.h +++ b/libc/sysdeps/linux/common/bits/sem.h diff --git a/libc/sysdeps/linux/common/bits/setjmp.h b/libc/sysdeps/linux/common/bits/setjmp.h new file mode 100644 index 000000000..9150d8d76 --- /dev/null +++ b/libc/sysdeps/linux/common/bits/setjmp.h @@ -0,0 +1,7 @@ +/* Define the machine-dependent type `jmp_buf'. Stub version. */ + +#ifndef _SETJMP_H +# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead." +#endif + +typedef int __jmp_buf[1]; diff --git a/libc/sysdeps/linux/arm/bits/shm.h b/libc/sysdeps/linux/common/bits/shm.h index 18246c3bd..18246c3bd 100644 --- a/libc/sysdeps/linux/arm/bits/shm.h +++ b/libc/sysdeps/linux/common/bits/shm.h diff --git a/libc/sysdeps/linux/arm/bits/sigaction.h b/libc/sysdeps/linux/common/bits/sigaction.h index 48cc5312f..48cc5312f 100644 --- a/libc/sysdeps/linux/arm/bits/sigaction.h +++ b/libc/sysdeps/linux/common/bits/sigaction.h diff --git a/libc/sysdeps/linux/arm/bits/sigcontext.h b/libc/sysdeps/linux/common/bits/sigcontext.h index 67dcf9498..67dcf9498 100644 --- a/libc/sysdeps/linux/arm/bits/sigcontext.h +++ b/libc/sysdeps/linux/common/bits/sigcontext.h diff --git a/libc/sysdeps/linux/arm/bits/siginfo.h b/libc/sysdeps/linux/common/bits/siginfo.h index 70a8c217e..70a8c217e 100644 --- a/libc/sysdeps/linux/arm/bits/siginfo.h +++ b/libc/sysdeps/linux/common/bits/siginfo.h diff --git a/libc/sysdeps/linux/arm/bits/signum.h b/libc/sysdeps/linux/common/bits/signum.h index 74259b492..74259b492 100644 --- a/libc/sysdeps/linux/arm/bits/signum.h +++ b/libc/sysdeps/linux/common/bits/signum.h diff --git a/libc/sysdeps/linux/arm/bits/sigset.h b/libc/sysdeps/linux/common/bits/sigset.h index 7ccadda45..7ccadda45 100644 --- a/libc/sysdeps/linux/arm/bits/sigset.h +++ b/libc/sysdeps/linux/common/bits/sigset.h diff --git a/libc/sysdeps/linux/arm/bits/sigstack.h b/libc/sysdeps/linux/common/bits/sigstack.h index 7f260367b..7f260367b 100644 --- a/libc/sysdeps/linux/arm/bits/sigstack.h +++ b/libc/sysdeps/linux/common/bits/sigstack.h diff --git a/libc/sysdeps/linux/arm/bits/sigthread.h b/libc/sysdeps/linux/common/bits/sigthread.h index b86e75f20..b86e75f20 100644 --- a/libc/sysdeps/linux/arm/bits/sigthread.h +++ b/libc/sysdeps/linux/common/bits/sigthread.h diff --git a/libc/sysdeps/linux/arm/bits/sockaddr.h b/libc/sysdeps/linux/common/bits/sockaddr.h index 3e1d1312d..3e1d1312d 100644 --- a/libc/sysdeps/linux/arm/bits/sockaddr.h +++ b/libc/sysdeps/linux/common/bits/sockaddr.h diff --git a/libc/sysdeps/linux/arm/bits/socket.h b/libc/sysdeps/linux/common/bits/socket.h index 61644073b..61644073b 100644 --- a/libc/sysdeps/linux/arm/bits/socket.h +++ b/libc/sysdeps/linux/common/bits/socket.h diff --git a/libc/sysdeps/linux/arm/bits/stab.def b/libc/sysdeps/linux/common/bits/stab.def index 3d54774cf..3d54774cf 100644 --- a/libc/sysdeps/linux/arm/bits/stab.def +++ b/libc/sysdeps/linux/common/bits/stab.def diff --git a/libc/sysdeps/linux/arm/bits/stat.h b/libc/sysdeps/linux/common/bits/stat.h index f446a91db..f446a91db 100644 --- a/libc/sysdeps/linux/arm/bits/stat.h +++ b/libc/sysdeps/linux/common/bits/stat.h diff --git a/libc/sysdeps/linux/arm/bits/statfs.h b/libc/sysdeps/linux/common/bits/statfs.h index 78c9bdbbc..78c9bdbbc 100644 --- a/libc/sysdeps/linux/arm/bits/statfs.h +++ b/libc/sysdeps/linux/common/bits/statfs.h diff --git a/libc/sysdeps/linux/arm/bits/statvfs.h b/libc/sysdeps/linux/common/bits/statvfs.h index 32e03f31e..32e03f31e 100644 --- a/libc/sysdeps/linux/arm/bits/statvfs.h +++ b/libc/sysdeps/linux/common/bits/statvfs.h diff --git a/libc/sysdeps/linux/m68k/bits/stdio-lock.h b/libc/sysdeps/linux/common/bits/stdio-lock.h index 5b1c1b082..5b1c1b082 100644 --- a/libc/sysdeps/linux/m68k/bits/stdio-lock.h +++ b/libc/sysdeps/linux/common/bits/stdio-lock.h diff --git a/libc/sysdeps/linux/i386/bits/stdio.h b/libc/sysdeps/linux/common/bits/stdio.h index 36346f714..d0ba46308 100644 --- a/libc/sysdeps/linux/i386/bits/stdio.h +++ b/libc/sysdeps/linux/common/bits/stdio.h @@ -21,4 +21,3 @@ # error "Never include <bits/stdio.h> directly; use <stdio.h> instead." #endif -/* Nothing to do here. Move right along */ diff --git a/libc/sysdeps/linux/arm/bits/stdio_lim.h b/libc/sysdeps/linux/common/bits/stdio_lim.h index ea6d693f5..ea6d693f5 100644 --- a/libc/sysdeps/linux/arm/bits/stdio_lim.h +++ b/libc/sysdeps/linux/common/bits/stdio_lim.h diff --git a/libc/sysdeps/linux/mips/bits/string.h b/libc/sysdeps/linux/common/bits/string.h index ad68b038b..ad68b038b 100644 --- a/libc/sysdeps/linux/mips/bits/string.h +++ b/libc/sysdeps/linux/common/bits/string.h diff --git a/libc/sysdeps/linux/mips/bits/string2.h b/libc/sysdeps/linux/common/bits/string2.h index 9e522cedf..8f9fbd120 100644 --- a/libc/sysdeps/linux/mips/bits/string2.h +++ b/libc/sysdeps/linux/common/bits/string2.h @@ -1,5 +1,5 @@ /* Machine-independant string function optimizations. - Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1997,1998,1999,2000,2001,2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. @@ -198,26 +198,35 @@ __STRING2_COPY_TYPE (8); #ifdef __USE_GNU # if !defined _HAVE_STRING_ARCH_mempcpy || defined _FORCE_INLINES # ifndef _HAVE_STRING_ARCH_mempcpy -# define __mempcpy(dest, src, n) \ +# if __GNUC_PREREQ (3, 0) +# define __mempcpy(dest, src, n) \ + (__extension__ (__builtin_constant_p (src) && __builtin_constant_p (n) \ + && __string2_1bptr_p (src) && n <= 8 \ + ? __builtin_memcpy (dest, src, n) + (n) \ + : __mempcpy (dest, src, n))) +# else +# define __mempcpy(dest, src, n) \ (__extension__ (__builtin_constant_p (src) && __builtin_constant_p (n) \ && __string2_1bptr_p (src) && n <= 8 \ ? __mempcpy_small (dest, __mempcpy_args (src), n) \ : __mempcpy (dest, src, n))) +# endif /* In glibc we use this function frequently but for namespace reasons we have to use the name `__mempcpy'. */ # define mempcpy(dest, src, n) __mempcpy (dest, src, n) # endif -# if _STRING_ARCH_unaligned -# ifndef _FORCE_INLINES -# define __mempcpy_args(src) \ +# if !__GNUC_PREREQ (3, 0) || defined _FORCE_INLINES +# if _STRING_ARCH_unaligned +# ifndef _FORCE_INLINES +# define __mempcpy_args(src) \ ((__const char *) (src))[0], ((__const char *) (src))[2], \ ((__const char *) (src))[4], ((__const char *) (src))[6], \ __extension__ __STRING2_SMALL_GET16 (src, 0), \ __extension__ __STRING2_SMALL_GET16 (src, 4), \ __extension__ __STRING2_SMALL_GET32 (src, 0), \ __extension__ __STRING2_SMALL_GET32 (src, 4) -# endif +# endif __STRING_INLINE void *__mempcpy_small (void *, char, char, char, char, __uint16_t, __uint16_t, __uint32_t, __uint32_t, size_t); @@ -283,9 +292,9 @@ __mempcpy_small (void *__dest1, } return (void *) __u; } -# else -# ifndef _FORCE_INLINES -# define __mempcpy_args(src) \ +# else +# ifndef _FORCE_INLINES +# define __mempcpy_args(src) \ ((__const char *) (src))[0], \ __extension__ ((__STRING2_COPY_ARR2) \ { { ((__const char *) (src))[0], ((__const char *) (src))[1] } }), \ @@ -313,7 +322,7 @@ __mempcpy_small (void *__dest1, ((__const char *) (src))[2], ((__const char *) (src))[3], \ ((__const char *) (src))[4], ((__const char *) (src))[5], \ ((__const char *) (src))[6], ((__const char *) (src))[7] } }) -# endif +# endif __STRING_INLINE void *__mempcpy_small (void *, char, __STRING2_COPY_ARR2, __STRING2_COPY_ARR3, __STRING2_COPY_ARR4, @@ -367,6 +376,7 @@ __mempcpy_small (void *__dest, char __src1, } return __extension__ (void *)((char *) __u + __srclen); } +# endif # endif # endif #endif @@ -383,8 +393,9 @@ extern void *__rawmemchr (const void *__s, int __c); /* Copy SRC to DEST. */ -#if !defined _HAVE_STRING_ARCH_strcpy || defined _FORCE_INLINES -# ifndef _HAVE_STRING_ARCH_strcpy +#if (!defined _HAVE_STRING_ARCH_strcpy && !__GNUC_PREREQ (3, 0)) \ + || defined _FORCE_INLINES +# if !defined _HAVE_STRING_ARCH_strcpy && !__GNUC_PREREQ (3, 0) # define strcpy(dest, src) \ (__extension__ (__builtin_constant_p (src) \ ? (__string2_1bptr_p (src) && strlen (src) + 1 <= 8 \ @@ -547,26 +558,38 @@ __strcpy_small (char *__dest, #ifdef __USE_GNU # if !defined _HAVE_STRING_ARCH_stpcpy || defined _FORCE_INLINES # ifndef _HAVE_STRING_ARCH_stpcpy -# define __stpcpy(dest, src) \ +# if __GNUC_PREREQ (3, 0) +# define __stpcpy(dest, src) \ + (__extension__ (__builtin_constant_p (src) \ + ? (__string2_1bptr_p (src) && strlen (src) + 1 <= 8 \ + ? __builtin_strcpy (dest, src) + strlen (src) \ + : ((char *) (__mempcpy) (dest, src, strlen (src) + 1) \ + - 1)) \ + : __stpcpy (dest, src))) +# else +# define __stpcpy(dest, src) \ (__extension__ (__builtin_constant_p (src) \ ? (__string2_1bptr_p (src) && strlen (src) + 1 <= 8 \ ? __stpcpy_small (dest, __stpcpy_args (src), \ strlen (src) + 1) \ - : ((char *) __mempcpy (dest, src, strlen (src) + 1) - 1))\ + : ((char *) (__mempcpy) (dest, src, strlen (src) + 1) \ + - 1)) \ : __stpcpy (dest, src))) +# endif /* In glibc we use this function frequently but for namespace reasons we have to use the name `__stpcpy'. */ # define stpcpy(dest, src) __stpcpy (dest, src) # endif -# if _STRING_ARCH_unaligned -# ifndef _FORCE_INLINES -# define __stpcpy_args(src) \ +# if !__GNUC_PREREQ (3, 0) || defined _FORCE_INLINES +# if _STRING_ARCH_unaligned +# ifndef _FORCE_INLINES +# define __stpcpy_args(src) \ __extension__ __STRING2_SMALL_GET16 (src, 0), \ __extension__ __STRING2_SMALL_GET16 (src, 4), \ __extension__ __STRING2_SMALL_GET32 (src, 0), \ __extension__ __STRING2_SMALL_GET32 (src, 4) -# endif +# endif __STRING_INLINE char *__stpcpy_small (char *, __uint16_t, __uint16_t, __uint32_t, __uint32_t, size_t); __STRING_INLINE char * @@ -626,9 +649,9 @@ __stpcpy_small (char *__dest, } return &__u->__c; } -# else -# ifndef _FORCE_INLINES -# define __stpcpy_args(src) \ +# else +# ifndef _FORCE_INLINES +# define __stpcpy_args(src) \ __extension__ ((__STRING2_COPY_ARR2) \ { { ((__const char *) (src))[0], '\0' } }), \ __extension__ ((__STRING2_COPY_ARR3) \ @@ -655,7 +678,7 @@ __stpcpy_small (char *__dest, ((__const char *) (src))[2], ((__const char *) (src))[3], \ ((__const char *) (src))[4], ((__const char *) (src))[5], \ ((__const char *) (src))[6], '\0' } }) -# endif +# endif __STRING_INLINE char *__stpcpy_small (char *, __STRING2_COPY_ARR2, __STRING2_COPY_ARR3, __STRING2_COPY_ARR4, @@ -709,6 +732,7 @@ __stpcpy_small (char *__dest, } return __dest + __srclen - 1; } +# endif # endif # endif #endif @@ -1216,7 +1240,7 @@ extern char *__strndup (__const char *__string, size_t __n) size_t __n = (n); \ char *__retval; \ if (__n < __len) \ - __len = __n; \ + __len = __n + 1; \ __retval = (char *) malloc (__len); \ if (__retval != NULL) \ { \ diff --git a/libc/sysdeps/linux/arm/bits/stropts.h b/libc/sysdeps/linux/common/bits/stropts.h index 21538c31d..21538c31d 100644 --- a/libc/sysdeps/linux/arm/bits/stropts.h +++ b/libc/sysdeps/linux/common/bits/stropts.h diff --git a/libc/sysdeps/linux/arm/bits/termios.h b/libc/sysdeps/linux/common/bits/termios.h index 887b309ad..887b309ad 100644 --- a/libc/sysdeps/linux/arm/bits/termios.h +++ b/libc/sysdeps/linux/common/bits/termios.h diff --git a/libc/sysdeps/linux/arm/bits/time.h b/libc/sysdeps/linux/common/bits/time.h index 2a6873f00..2a6873f00 100644 --- a/libc/sysdeps/linux/arm/bits/time.h +++ b/libc/sysdeps/linux/common/bits/time.h diff --git a/libc/sysdeps/linux/i386/bits/types.h b/libc/sysdeps/linux/common/bits/types.h index 2b0c6ba56..839455392 100644 --- a/libc/sysdeps/linux/i386/bits/types.h +++ b/libc/sysdeps/linux/common/bits/types.h @@ -139,7 +139,7 @@ typedef unsigned int __socklen_t; /* Now add the thread types. */ -#if defined _POSIX_THREADS && (defined __USE_POSIX199506 || defined __USE_UNIX98) +#if defined __UCLIBC_HAS_THREADS__ && (defined __USE_POSIX199506 || defined __USE_UNIX98) # include <bits/pthreadtypes.h> #endif diff --git a/libc/sysdeps/linux/arm/bits/uio.h b/libc/sysdeps/linux/common/bits/uio.h index 84b4805fe..84b4805fe 100644 --- a/libc/sysdeps/linux/arm/bits/uio.h +++ b/libc/sysdeps/linux/common/bits/uio.h diff --git a/libc/sysdeps/linux/arm/bits/ustat.h b/libc/sysdeps/linux/common/bits/ustat.h index aeafc22a5..aeafc22a5 100644 --- a/libc/sysdeps/linux/arm/bits/ustat.h +++ b/libc/sysdeps/linux/common/bits/ustat.h diff --git a/libc/sysdeps/linux/arm/bits/utmp.h b/libc/sysdeps/linux/common/bits/utmp.h index 2ed29bbb4..2ed29bbb4 100644 --- a/libc/sysdeps/linux/arm/bits/utmp.h +++ b/libc/sysdeps/linux/common/bits/utmp.h diff --git a/libc/sysdeps/linux/arm/bits/utmpx.h b/libc/sysdeps/linux/common/bits/utmpx.h index 99735370b..99735370b 100644 --- a/libc/sysdeps/linux/arm/bits/utmpx.h +++ b/libc/sysdeps/linux/common/bits/utmpx.h diff --git a/libc/sysdeps/linux/arm/bits/utsname.h b/libc/sysdeps/linux/common/bits/utsname.h index 35e71e3ba..35e71e3ba 100644 --- a/libc/sysdeps/linux/arm/bits/utsname.h +++ b/libc/sysdeps/linux/common/bits/utsname.h diff --git a/libc/sysdeps/linux/arm/bits/waitflags.h b/libc/sysdeps/linux/common/bits/waitflags.h index 1303c6c36..1303c6c36 100644 --- a/libc/sysdeps/linux/arm/bits/waitflags.h +++ b/libc/sysdeps/linux/common/bits/waitflags.h diff --git a/libc/sysdeps/linux/arm/bits/waitstatus.h b/libc/sysdeps/linux/common/bits/waitstatus.h index 982c9dbb2..982c9dbb2 100644 --- a/libc/sysdeps/linux/arm/bits/waitstatus.h +++ b/libc/sysdeps/linux/common/bits/waitstatus.h diff --git a/libc/sysdeps/linux/arm/bits/wchar.h b/libc/sysdeps/linux/common/bits/wchar.h index ef1f56363..ef1f56363 100644 --- a/libc/sysdeps/linux/arm/bits/wchar.h +++ b/libc/sysdeps/linux/common/bits/wchar.h diff --git a/libc/sysdeps/linux/common/bits/wordsize.h b/libc/sysdeps/linux/common/bits/wordsize.h new file mode 100644 index 000000000..9ef0e8526 --- /dev/null +++ b/libc/sysdeps/linux/common/bits/wordsize.h @@ -0,0 +1 @@ +#error "This file must be written based on the data type sizes of the target" diff --git a/libc/sysdeps/linux/arm/bits/xopen_lim.h b/libc/sysdeps/linux/common/bits/xopen_lim.h index 7f3611860..7f3611860 100644 --- a/libc/sysdeps/linux/arm/bits/xopen_lim.h +++ b/libc/sysdeps/linux/common/bits/xopen_lim.h diff --git a/include/sys/ptrace.h b/libc/sysdeps/linux/common/sys/ptrace.h index b4aec4f20..b4aec4f20 100644 --- a/include/sys/ptrace.h +++ b/libc/sysdeps/linux/common/sys/ptrace.h diff --git a/libc/sysdeps/linux/common/sys/user.h b/libc/sysdeps/linux/common/sys/user.h new file mode 100644 index 000000000..30e9b57ab --- /dev/null +++ b/libc/sysdeps/linux/common/sys/user.h @@ -0,0 +1 @@ +#include <linux/user.h> diff --git a/libc/sysdeps/linux/h8300/Makefile b/libc/sysdeps/linux/h8300/Makefile index c9186e2a9..9ccba8b19 100644 --- a/libc/sysdeps/linux/h8300/Makefile +++ b/libc/sysdeps/linux/h8300/Makefile @@ -61,11 +61,6 @@ $(COBJS): %.o : %.c headers: @(TOPDIR=$(TOPDIR) CC=$(CC) /bin/sh $(TOPDIR)/extra/scripts/gen_bits_syscall_h.sh > bits/syscall.h ) -ifeq ($(strip $(HAVE_ELF)),false) - echo "Working around compiler bug in the m68k-pic-coff toolchain" - cd $(TOPDIR)/include;ln -fs ../libc/sysdeps/linux/m68k/float.h . -endif - clean: rm -f *.[oa] *~ core diff --git a/libc/sysdeps/linux/h8300/bits/byteswap.h b/libc/sysdeps/linux/h8300/bits/byteswap.h deleted file mode 100644 index 56909f5c0..000000000 --- a/libc/sysdeps/linux/h8300/bits/byteswap.h +++ /dev/null @@ -1,67 +0,0 @@ -/* Macros to swap the order of bytes in integer values. m68k version. - Copyright (C) 1997 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#if !defined _BYTESWAP_H && !defined _NETINET_IN_H -# error "Never use <bits/byteswap.h> directly; include <byteswap.h> instead." -#endif - -/* Swap bytes in 16 bit value. We don't provide an assembler version - because GCC is smart enough to generate optimal assembler output, and - this allows for better cse. */ -#define __bswap_16(x) \ - ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)) - -/* Swap bytes in 32 bit value. */ -#define __bswap_constant_32(x) \ - ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \ - (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24)) - -#if defined __GNUC__ && __GNUC__ >= 2 -# define __bswap_32(x) \ - __extension__ \ - ({ unsigned int __v; \ - if (__builtin_constant_p (x)) \ - __v = __bswap_constant_32 (x); \ - else \ - __asm__ __volatile__ ("mov.l %0,er0\n\t" \ - "mov.b r0l,r1h\n\t" \ - "mov.b r0h,r1l\n\t" \ - "mov.w r1,e1\n\t" \ - "mov.w e0,r0\n\t" \ - "mov.b r0l,r1h\n\t" \ - "mov.b r0h,r1l\n\t" \ - "mov.l er1,%0" \ - : "=d" (__v) \ - : "0" (x): "er0","er1"); \ - __v; }) -#else -# define __bswap_32(x) __bswap_constant_32 (x) -#endif - -#if defined __GNUC__ && __GNUC__ >= 2 -/* Swap bytes in 64 bit value. */ -# define __bswap_64(x) \ - __extension__ \ - ({ union { unsigned long long int __ll; \ - unsigned long int __l[2]; } __v, __r; \ - __v.__ll = (x); \ - __r.__l[0] = __bswap_32 (__v.__l[1]); \ - __r.__l[1] = __bswap_32 (__v.__l[0]); \ - __r.__ll; }) -#endif diff --git a/libc/sysdeps/linux/h8300/bits/cmathcalls.h b/libc/sysdeps/linux/h8300/bits/cmathcalls.h deleted file mode 100644 index 842d2c135..000000000 --- a/libc/sysdeps/linux/h8300/bits/cmathcalls.h +++ /dev/null @@ -1,159 +0,0 @@ -/* Prototype declarations for complex math functions; - helper file for <complex.h>. - Copyright (C) 1997, 1998 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. 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 - -__BEGIN_DECLS - -/* 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. */ -#if defined __GNUC__ && defined __OPTIMIZE__ - -/* Imaginary part of Z. */ -extern __inline _Mdouble_ -__MATH_PRECNAME(cimag) (_Mdouble_complex_ __z) -{ - return __imag__ __z; -} - -/* Real part of Z. */ -extern __inline _Mdouble_ -__MATH_PRECNAME(creal) (_Mdouble_complex_ __z) -{ - return __real__ __z; -} - -/* Complex conjugate of Z. */ -extern __inline _Mdouble_complex_ -__MATH_PRECNAME(conj) (_Mdouble_complex_ __z) -{ - return ~__z; -} -#endif - -__END_DECLS diff --git a/libc/sysdeps/linux/h8300/bits/confname.h b/libc/sysdeps/linux/h8300/bits/confname.h deleted file mode 100644 index ba8868af4..000000000 --- a/libc/sysdeps/linux/h8300/bits/confname.h +++ /dev/null @@ -1,566 +0,0 @@ -/* `sysconf', `pathconf', and `confstr' NAME values. Generic version. - Copyright (C) 1993, 1995-1998, 2000, 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. */ - -#ifndef _UNISTD_H -# error "Never use <bits/confname.h> directly; include <unistd.h> instead." -#endif - -/* Values for the NAME argument to `pathconf' and `fpathconf'. */ -enum - { - _PC_LINK_MAX, -#define _PC_LINK_MAX _PC_LINK_MAX - _PC_MAX_CANON, -#define _PC_MAX_CANON _PC_MAX_CANON - _PC_MAX_INPUT, -#define _PC_MAX_INPUT _PC_MAX_INPUT - _PC_NAME_MAX, -#define _PC_NAME_MAX _PC_NAME_MAX - _PC_PATH_MAX, -#define _PC_PATH_MAX _PC_PATH_MAX - _PC_PIPE_BUF, -#define _PC_PIPE_BUF _PC_PIPE_BUF - _PC_CHOWN_RESTRICTED, -#define _PC_CHOWN_RESTRICTED _PC_CHOWN_RESTRICTED - _PC_NO_TRUNC, -#define _PC_NO_TRUNC _PC_NO_TRUNC - _PC_VDISABLE, -#define _PC_VDISABLE _PC_VDISABLE - _PC_SYNC_IO, -#define _PC_SYNC_IO _PC_SYNC_IO - _PC_ASYNC_IO, -#define _PC_ASYNC_IO _PC_ASYNC_IO - _PC_PRIO_IO, -#define _PC_PRIO_IO _PC_PRIO_IO - _PC_SOCK_MAXBUF, -#define _PC_SOCK_MAXBUF _PC_SOCK_MAXBUF - _PC_FILESIZEBITS, -#define _PC_FILESIZEBITS _PC_FILESIZEBITS - _PC_REC_INCR_XFER_SIZE, -#define _PC_REC_INCR_XFER_SIZE _PC_REC_INCR_XFER_SIZE - _PC_REC_MAX_XFER_SIZE, -#define _PC_REC_MAX_XFER_SIZE _PC_REC_MAX_XFER_SIZE - _PC_REC_MIN_XFER_SIZE, -#define _PC_REC_MIN_XFER_SIZE _PC_REC_MIN_XFER_SIZE - _PC_REC_XFER_ALIGN, -#define _PC_REC_XFER_ALIGN _PC_REC_XFER_ALIGN - _PC_ALLOC_SIZE_MIN, -#define _PC_ALLOC_SIZE_MIN _PC_ALLOC_SIZE_MIN - _PC_SYMLINK_MAX -#define _PC_SYMLINK_MAX _PC_SYMLINK_MAX - }; - -/* Values for the argument to `sysconf'. */ -enum - { - _SC_ARG_MAX, -#define _SC_ARG_MAX _SC_ARG_MAX - _SC_CHILD_MAX, -#define _SC_CHILD_MAX _SC_CHILD_MAX - _SC_CLK_TCK, -#define _SC_CLK_TCK _SC_CLK_TCK - _SC_NGROUPS_MAX, -#define _SC_NGROUPS_MAX _SC_NGROUPS_MAX - _SC_OPEN_MAX, -#define _SC_OPEN_MAX _SC_OPEN_MAX - _SC_STREAM_MAX, -#define _SC_STREAM_MAX _SC_STREAM_MAX - _SC_TZNAME_MAX, -#define _SC_TZNAME_MAX _SC_TZNAME_MAX - _SC_JOB_CONTROL, -#define _SC_JOB_CONTROL _SC_JOB_CONTROL - _SC_SAVED_IDS, -#define _SC_SAVED_IDS _SC_SAVED_IDS - _SC_REALTIME_SIGNALS, -#define _SC_REALTIME_SIGNALS _SC_REALTIME_SIGNALS - _SC_PRIORITY_SCHEDULING, -#define _SC_PRIORITY_SCHEDULING _SC_PRIORITY_SCHEDULING - _SC_TIMERS, -#define _SC_TIMERS _SC_TIMERS - _SC_ASYNCHRONOUS_IO, -#define _SC_ASYNCHRONOUS_IO _SC_ASYNCHRONOUS_IO - _SC_PRIORITIZED_IO, -#define _SC_PRIORITIZED_IO _SC_PRIORITIZED_IO - _SC_SYNCHRONIZED_IO, -#define _SC_SYNCHRONIZED_IO _SC_SYNCHRONIZED_IO - _SC_FSYNC, -#define _SC_FSYNC _SC_FSYNC - _SC_MAPPED_FILES, -#define _SC_MAPPED_FILES _SC_MAPPED_FILES - _SC_MEMLOCK, -#define _SC_MEMLOCK _SC_MEMLOCK - _SC_MEMLOCK_RANGE, -#define _SC_MEMLOCK_RANGE _SC_MEMLOCK_RANGE - _SC_MEMORY_PROTECTION, -#define _SC_MEMORY_PROTECTION _SC_MEMORY_PROTECTION - _SC_MESSAGE_PASSING, -#define _SC_MESSAGE_PASSING _SC_MESSAGE_PASSING - _SC_SEMAPHORES, -#define _SC_SEMAPHORES _SC_SEMAPHORES - _SC_SHARED_MEMORY_OBJECTS, -#define _SC_SHARED_MEMORY_OBJECTS _SC_SHARED_MEMORY_OBJECTS - _SC_AIO_LISTIO_MAX, -#define _SC_AIO_LISTIO_MAX _SC_AIO_LISTIO_MAX - _SC_AIO_MAX, -#define _SC_AIO_MAX _SC_AIO_MAX - _SC_AIO_PRIO_DELTA_MAX, -#define _SC_AIO_PRIO_DELTA_MAX _SC_AIO_PRIO_DELTA_MAX - _SC_DELAYTIMER_MAX, -#define _SC_DELAYTIMER_MAX _SC_DELAYTIMER_MAX - _SC_MQ_OPEN_MAX, -#define _SC_MQ_OPEN_MAX _SC_MQ_OPEN_MAX - _SC_MQ_PRIO_MAX, -#define _SC_MQ_PRIO_MAX _SC_MQ_PRIO_MAX - _SC_VERSION, -#define _SC_VERSION _SC_VERSION - _SC_PAGESIZE, -#define _SC_PAGESIZE _SC_PAGESIZE -#define _SC_PAGE_SIZE _SC_PAGESIZE - _SC_RTSIG_MAX, -#define _SC_RTSIG_MAX _SC_RTSIG_MAX - _SC_SEM_NSEMS_MAX, -#define _SC_SEM_NSEMS_MAX _SC_SEM_NSEMS_MAX - _SC_SEM_VALUE_MAX, -#define _SC_SEM_VALUE_MAX _SC_SEM_VALUE_MAX - _SC_SIGQUEUE_MAX, -#define _SC_SIGQUEUE_MAX _SC_SIGQUEUE_MAX - _SC_TIMER_MAX, -#define _SC_TIMER_MAX _SC_TIMER_MAX - - /* Values for the argument to `sysconf' - corresponding to _POSIX2_* symbols. */ - _SC_BC_BASE_MAX, -#define _SC_BC_BASE_MAX _SC_BC_BASE_MAX - _SC_BC_DIM_MAX, -#define _SC_BC_DIM_MAX _SC_BC_DIM_MAX - _SC_BC_SCALE_MAX, -#define _SC_BC_SCALE_MAX _SC_BC_SCALE_MAX - _SC_BC_STRING_MAX, -#define _SC_BC_STRING_MAX _SC_BC_STRING_MAX - _SC_COLL_WEIGHTS_MAX, -#define _SC_COLL_WEIGHTS_MAX _SC_COLL_WEIGHTS_MAX - _SC_EQUIV_CLASS_MAX, -#define _SC_EQUIV_CLASS_MAX _SC_EQUIV_CLASS_MAX - _SC_EXPR_NEST_MAX, -#define _SC_EXPR_NEST_MAX _SC_EXPR_NEST_MAX - _SC_LINE_MAX, -#define _SC_LINE_MAX _SC_LINE_MAX - _SC_RE_DUP_MAX, -#define _SC_RE_DUP_MAX _SC_RE_DUP_MAX - _SC_CHARCLASS_NAME_MAX, -#define _SC_CHARCLASS_NAME_MAX _SC_CHARCLASS_NAME_MAX - - _SC_2_VERSION, -#define _SC_2_VERSION _SC_2_VERSION - _SC_2_C_BIND, -#define _SC_2_C_BIND _SC_2_C_BIND - _SC_2_C_DEV, -#define _SC_2_C_DEV _SC_2_C_DEV - _SC_2_FORT_DEV, -#define _SC_2_FORT_DEV _SC_2_FORT_DEV - _SC_2_FORT_RUN, -#define _SC_2_FORT_RUN _SC_2_FORT_RUN - _SC_2_SW_DEV, -#define _SC_2_SW_DEV _SC_2_SW_DEV - _SC_2_LOCALEDEF, -#define _SC_2_LOCALEDEF _SC_2_LOCALEDEF - - _SC_PII, -#define _SC_PII _SC_PII - _SC_PII_XTI, -#define _SC_PII_XTI _SC_PII_XTI - _SC_PII_SOCKET, -#define _SC_PII_SOCKET _SC_PII_SOCKET - _SC_PII_INTERNET, -#define _SC_PII_INTERNET _SC_PII_INTERNET - _SC_PII_OSI, -#define _SC_PII_OSI _SC_PII_OSI - _SC_POLL, -#define _SC_POLL _SC_POLL - _SC_SELECT, -#define _SC_SELECT _SC_SELECT - _SC_UIO_MAXIOV, -#define _SC_UIO_MAXIOV _SC_UIO_MAXIOV - _SC_IOV_MAX = _SC_UIO_MAXIOV, -#define _SC_IOV_MAX _SC_IOV_MAX - _SC_PII_INTERNET_STREAM, -#define _SC_PII_INTERNET_STREAM _SC_PII_INTERNET_STREAM - _SC_PII_INTERNET_DGRAM, -#define _SC_PII_INTERNET_DGRAM _SC_PII_INTERNET_DGRAM - _SC_PII_OSI_COTS, -#define _SC_PII_OSI_COTS _SC_PII_OSI_COTS - _SC_PII_OSI_CLTS, -#define _SC_PII_OSI_CLTS _SC_PII_OSI_CLTS - _SC_PII_OSI_M, -#define _SC_PII_OSI_M _SC_PII_OSI_M - _SC_T_IOV_MAX, -#define _SC_T_IOV_MAX _SC_T_IOV_MAX - - /* Values according to POSIX 1003.1c (POSIX threads). */ - _SC_THREADS, -#define _SC_THREADS _SC_THREADS - _SC_THREAD_SAFE_FUNCTIONS, -#define _SC_THREAD_SAFE_FUNCTIONS _SC_THREAD_SAFE_FUNCTIONS - _SC_GETGR_R_SIZE_MAX, -#define _SC_GETGR_R_SIZE_MAX _SC_GETGR_R_SIZE_MAX - _SC_GETPW_R_SIZE_MAX, -#define _SC_GETPW_R_SIZE_MAX _SC_GETPW_R_SIZE_MAX - _SC_LOGIN_NAME_MAX, -#define _SC_LOGIN_NAME_MAX _SC_LOGIN_NAME_MAX - _SC_TTY_NAME_MAX, -#define _SC_TTY_NAME_MAX _SC_TTY_NAME_MAX - _SC_THREAD_DESTRUCTOR_ITERATIONS, -#define _SC_THREAD_DESTRUCTOR_ITERATIONS _SC_THREAD_DESTRUCTOR_ITERATIONS - _SC_THREAD_KEYS_MAX, -#define _SC_THREAD_KEYS_MAX _SC_THREAD_KEYS_MAX - _SC_THREAD_STACK_MIN, -#define _SC_THREAD_STACK_MIN _SC_THREAD_STACK_MIN - _SC_THREAD_THREADS_MAX, -#define _SC_THREAD_THREADS_MAX _SC_THREAD_THREADS_MAX - _SC_THREAD_ATTR_STACKADDR, -#define _SC_THREAD_ATTR_STACKADDR _SC_THREAD_ATTR_STACKADDR - _SC_THREAD_ATTR_STACKSIZE, -#define _SC_THREAD_ATTR_STACKSIZE _SC_THREAD_ATTR_STACKSIZE - _SC_THREAD_PRIORITY_SCHEDULING, -#define _SC_THREAD_PRIORITY_SCHEDULING _SC_THREAD_PRIORITY_SCHEDULING - _SC_THREAD_PRIO_INHERIT, -#define _SC_THREAD_PRIO_INHERIT _SC_THREAD_PRIO_INHERIT - _SC_THREAD_PRIO_PROTECT, -#define _SC_THREAD_PRIO_PROTECT _SC_THREAD_PRIO_PROTECT - _SC_THREAD_PROCESS_SHARED, -#define _SC_THREAD_PROCESS_SHARED _SC_THREAD_PROCESS_SHARED - - _SC_NPROCESSORS_CONF, -#define _SC_NPROCESSORS_CONF _SC_NPROCESSORS_CONF - _SC_NPROCESSORS_ONLN, -#define _SC_NPROCESSORS_ONLN _SC_NPROCESSORS_ONLN - _SC_PHYS_PAGES, -#define _SC_PHYS_PAGES _SC_PHYS_PAGES - _SC_AVPHYS_PAGES, -#define _SC_AVPHYS_PAGES _SC_AVPHYS_PAGES - _SC_ATEXIT_MAX, -#define _SC_ATEXIT_MAX _SC_ATEXIT_MAX - _SC_PASS_MAX, -#define _SC_PASS_MAX _SC_PASS_MAX - - _SC_XOPEN_VERSION, -#define _SC_XOPEN_VERSION _SC_XOPEN_VERSION - _SC_XOPEN_XCU_VERSION, -#define _SC_XOPEN_XCU_VERSION _SC_XOPEN_XCU_VERSION - _SC_XOPEN_UNIX, -#define _SC_XOPEN_UNIX _SC_XOPEN_UNIX - _SC_XOPEN_CRYPT, -#define _SC_XOPEN_CRYPT _SC_XOPEN_CRYPT - _SC_XOPEN_ENH_I18N, -#define _SC_XOPEN_ENH_I18N _SC_XOPEN_ENH_I18N - _SC_XOPEN_SHM, -#define _SC_XOPEN_SHM _SC_XOPEN_SHM - - _SC_2_CHAR_TERM, -#define _SC_2_CHAR_TERM _SC_2_CHAR_TERM - _SC_2_C_VERSION, -#define _SC_2_C_VERSION _SC_2_C_VERSION - _SC_2_UPE, -#define _SC_2_UPE _SC_2_UPE - - _SC_XOPEN_XPG2, -#define _SC_XOPEN_XPG2 _SC_XOPEN_XPG2 - _SC_XOPEN_XPG3, -#define _SC_XOPEN_XPG3 _SC_XOPEN_XPG3 - _SC_XOPEN_XPG4, -#define _SC_XOPEN_XPG4 _SC_XOPEN_XPG4 - - _SC_CHAR_BIT, -#define _SC_CHAR_BIT _SC_CHAR_BIT - _SC_CHAR_MAX, -#define _SC_CHAR_MAX _SC_CHAR_MAX - _SC_CHAR_MIN, -#define _SC_CHAR_MIN _SC_CHAR_MIN - _SC_INT_MAX, -#define _SC_INT_MAX _SC_INT_MAX - _SC_INT_MIN, -#define _SC_INT_MIN _SC_INT_MIN - _SC_LONG_BIT, -#define _SC_LONG_BIT _SC_LONG_BIT - _SC_WORD_BIT, -#define _SC_WORD_BIT _SC_WORD_BIT - _SC_MB_LEN_MAX, -#define _SC_MB_LEN_MAX _SC_MB_LEN_MAX - _SC_NZERO, -#define _SC_NZERO _SC_NZERO - _SC_SSIZE_MAX, -#define _SC_SSIZE_MAX _SC_SSIZE_MAX - _SC_SCHAR_MAX, -#define _SC_SCHAR_MAX _SC_SCHAR_MAX - _SC_SCHAR_MIN, -#define _SC_SCHAR_MIN _SC_SCHAR_MIN - _SC_SHRT_MAX, -#define _SC_SHRT_MAX _SC_SHRT_MAX - _SC_SHRT_MIN, -#define _SC_SHRT_MIN _SC_SHRT_MIN - _SC_UCHAR_MAX, -#define _SC_UCHAR_MAX _SC_UCHAR_MAX - _SC_UINT_MAX, -#define _SC_UINT_MAX _SC_UINT_MAX - _SC_ULONG_MAX, -#define _SC_ULONG_MAX _SC_ULONG_MAX - _SC_USHRT_MAX, -#define _SC_USHRT_MAX _SC_USHRT_MAX - - _SC_NL_ARGMAX, -#define _SC_NL_ARGMAX _SC_NL_ARGMAX - _SC_NL_LANGMAX, -#define _SC_NL_LANGMAX _SC_NL_LANGMAX - _SC_NL_MSGMAX, -#define _SC_NL_MSGMAX _SC_NL_MSGMAX - _SC_NL_NMAX, -#define _SC_NL_NMAX _SC_NL_NMAX - _SC_NL_SETMAX, -#define _SC_NL_SETMAX _SC_NL_SETMAX - _SC_NL_TEXTMAX, -#define _SC_NL_TEXTMAX _SC_NL_TEXTMAX - - _SC_XBS5_ILP32_OFF32, -#define _SC_XBS5_ILP32_OFF32 _SC_XBS5_ILP32_OFF32 - _SC_XBS5_ILP32_OFFBIG, -#define _SC_XBS5_ILP32_OFFBIG _SC_XBS5_ILP32_OFFBIG - _SC_XBS5_LP64_OFF64, -#define _SC_XBS5_LP64_OFF64 _SC_XBS5_LP64_OFF64 - _SC_XBS5_LPBIG_OFFBIG, -#define _SC_XBS5_LPBIG_OFFBIG _SC_XBS5_LPBIG_OFFBIG - - _SC_XOPEN_LEGACY, -#define _SC_XOPEN_LEGACY _SC_XOPEN_LEGACY - _SC_XOPEN_REALTIME, -#define _SC_XOPEN_REALTIME _SC_XOPEN_REALTIME - _SC_XOPEN_REALTIME_THREADS, -#define _SC_XOPEN_REALTIME_THREADS _SC_XOPEN_REALTIME_THREADS - - _SC_ADVISORY_INFO, -#define _SC_ADVISORY_INFO _SC_ADVISORY_INFO - _SC_BARRIERS, -#define _SC_BARRIERS _SC_BARRIERS - _SC_BASE, -#define _SC_BASE _SC_BASE - _SC_C_LANG_SUPPORT, -#define _SC_C_LANG_SUPPORT _SC_C_LANG_SUPPORT - _SC_C_LANG_SUPPORT_R, -#define _SC_C_LANG_SUPPORT_R _SC_C_LANG_SUPPORT_R - _SC_CLOCK_SELECTION, -#define _SC_CLOCK_SELECTION _SC_CLOCK_SELECTION - _SC_CPUTIME, -#define _SC_CPUTIME _SC_CPUTIME - _SC_THREAD_CPUTIME, -#define _SC_THREAD_CPUTIME _SC_THREAD_CPUTIME - _SC_DEVICE_IO, -#define _SC_DEVICE_IO _SC_DEVICE_IO - _SC_DEVICE_SPECIFIC, -#define _SC_DEVICE_SPECIFIC _SC_DEVICE_SPECIFIC - _SC_DEVICE_SPECIFIC_R, -#define _SC_DEVICE_SPECIFIC_R _SC_DEVICE_SPECIFIC_R - _SC_FD_MGMT, -#define _SC_FD_MGMT _SC_FD_MGMT - _SC_FIFO, -#define _SC_FIFO _SC_FIFO - _SC_PIPE, -#define _SC_PIPE _SC_PIPE - _SC_FILE_ATTRIBUTES, -#define _SC_FILE_ATTRIBUTES _SC_FILE_ATTRIBUTES - _SC_FILE_LOCKING, -#define _SC_FILE_LOCKING _SC_FILE_LOCKING - _SC_FILE_SYSTEM, -#define _SC_FILE_SYSTEM _SC_FILE_SYSTEM - _SC_MONOTONIC_CLOCK, -#define _SC_MONOTONIC_CLOCK _SC_MONOTONIC_CLOCK - _SC_MULTI_PROCESS, -#define _SC_MULTI_PROCESS _SC_MULTI_PROCESS - _SC_SINGLE_PROCESS, -#define _SC_SINGLE_PROCESS _SC_SINGLE_PROCESS - _SC_NETWORKING, -#define _SC_NETWORKING _SC_NETWORKING - _SC_READER_WRITER_LOCKS, -#define _SC_READER_WRITER_LOCKS _SC_READER_WRITER_LOCKS - _SC_SPIN_LOCKS, -#define _SC_SPIN_LOCKS _SC_SPIN_LOCKS - _SC_REGEXP, -#define _SC_REGEXP _SC_REGEXP - _SC_REGEX_VERSION, -#define _SC_REGEX_VERSION _SC_REGEX_VERSION - _SC_SHELL, -#define _SC_SHELL _SC_SHELL - _SC_SIGNALS, -#define _SC_SIGNALS _SC_SIGNALS - _SC_SPAWN, -#define _SC_SPAWN _SC_SPAWN - _SC_SPORADIC_SERVER, -#define _SC_SPORADIC_SERVER _SC_SPORADIC_SERVER - _SC_THREAD_SPORADIC_SERVER, -#define _SC_THREAD_SPORADIC_SERVER _SC_THREAD_SPORADIC_SERVER - _SC_SYSTEM_DATABASE, -#define _SC_SYSTEM_DATABASE _SC_SYSTEM_DATABASE - _SC_SYSTEM_DATABASE_R, -#define _SC_SYSTEM_DATABASE_R _SC_SYSTEM_DATABASE_R - _SC_TIMEOUTS, -#define _SC_TIMEOUTS _SC_TIMEOUTS - _SC_TYPED_MEMORY_OBJECTS, -#define _SC_TYPED_MEMORY_OBJECTS _SC_TYPED_MEMORY_OBJECTS - _SC_USER_GROUPS, -#define _SC_USER_GROUPS _SC_USER_GROUPS - _SC_USER_GROUPS_R, -#define _SC_USER_GROUPS_R _SC_USER_GROUPS_R - _SC_2_PBS, -#define _SC_2_PBS _SC_2_PBS - _SC_2_PBS_ACCOUNTING, -#define _SC_2_PBS_ACCOUNTING _SC_2_PBS_ACCOUNTING - _SC_2_PBS_LOCATE, -#define _SC_2_PBS_LOCATE _SC_2_PBS_LOCATE - _SC_2_PBS_MESSAGE, -#define _SC_2_PBS_MESSAGE _SC_2_PBS_MESSAGE - _SC_2_PBS_TRACK, -#define _SC_2_PBS_TRACK _SC_2_PBS_TRACK - _SC_SYMLOOP_MAX, -#define _SC_SYMLOOP_MAX _SC_SYMLOOP_MAX - _SC_STREAMS, -#define _SC_STREAMS _SC_STREAMS - _SC_2_PBS_CHECKPOINT, -#define _SC_2_PBS_CHECKPOINT _SC_2_PBS_CHECKPOINT - - _SC_V6_ILP32_OFF32, -#define _SC_V6_ILP32_OFF32 _SC_V6_ILP32_OFF32 - _SC_V6_ILP32_OFFBIG, -#define _SC_V6_ILP32_OFFBIG _SC_V6_ILP32_OFFBIG - _SC_V6_LP64_OFF64, -#define _SC_V6_LP64_OFF64 _SC_V6_LP64_OFF64 - _SC_V6_LPBIG_OFFBIG, -#define _SC_V6_LPBIG_OFFBIG _SC_V6_LPBIG_OFFBIG - - _SC_HOST_NAME_MAX, -#define _SC_HOST_NAME_MAX _SC_HOST_NAME_MAX - _SC_TRACE, -#define _SC_TRACE _SC_TRACE - _SC_TRACE_EVENT_FILTER, -#define _SC_TRACE_EVENT_FILTER _SC_TRACE_EVENT_FILTER - _SC_TRACE_INHERIT, -#define _SC_TRACE_INHERIT _SC_TRACE_INHERIT - _SC_TRACE_LOG -#define _SC_TRACE_LOG _SC_TRACE_LOG - }; - -#if (defined __USE_POSIX2 || defined __USE_UNIX98 \ - || defined __USE_FILE_OFFSET64 || defined __USE_LARGEFILE64 \ - || defined __USE_LARGEFILE) -/* Values for the NAME argument to `confstr'. */ -enum - { - _CS_PATH, /* The default search path. */ -#define _CS_PATH _CS_PATH - -# if (defined __USE_FILE_OFFSET64 || defined __USE_LARGEFILE64 \ - || defined __USE_LARGEFILE) - _CS_LFS_CFLAGS = 1000, -# define _CS_LFS_CFLAGS _CS_LFS_CFLAGS - _CS_LFS_LDFLAGS, -# define _CS_LFS_LDFLAGS _CS_LFS_LDFLAGS - _CS_LFS_LIBS, -# define _CS_LFS_LIBS _CS_LFS_LIBS - _CS_LFS_LINTFLAGS, -# define _CS_LFS_LINTFLAGS _CS_LFS_LINTFLAGS - _CS_LFS64_CFLAGS, -# define _CS_LFS64_CFLAGS _CS_LFS64_CFLAGS - _CS_LFS64_LDFLAGS, -# define _CS_LFS64_LDFLAGS _CS_LFS64_LDFLAGS - _CS_LFS64_LIBS, -# define _CS_LFS64_LIBS _CS_LFS64_LIBS - _CS_LFS64_LINTFLAGS, -# define _CS_LFS64_LINTFLAGS _CS_LFS64_LINTFLAGS -# endif - -# ifdef __USE_UNIX98 - _CS_XBS5_ILP32_OFF32_CFLAGS = 1100, -# define _CS_XBS5_ILP32_OFF32_CFLAGS _CS_XBS5_ILP32_OFF32_CFLAGS - _CS_XBS5_ILP32_OFF32_LDFLAGS, -# define _CS_XBS5_ILP32_OFF32_LDFLAGS _CS_XBS5_ILP32_OFF32_LDFLAGS - _CS_XBS5_ILP32_OFF32_LIBS, -# define _CS_XBS5_ILP32_OFF32_LIBS _CS_XBS5_ILP32_OFF32_LIBS - _CS_XBS5_ILP32_OFF32_LINTFLAGS, -# define _CS_XBS5_ILP32_OFF32_LINTFLAGS _CS_XBS5_ILP32_OFF32_LINTFLAGS - _CS_XBS5_ILP32_OFFBIG_CFLAGS, -# define _CS_XBS5_ILP32_OFFBIG_CFLAGS _CS_XBS5_ILP32_OFFBIG_CFLAGS - _CS_XBS5_ILP32_OFFBIG_LDFLAGS, -# define _CS_XBS5_ILP32_OFFBIG_LDFLAGS _CS_XBS5_ILP32_OFFBIG_LDFLAGS - _CS_XBS5_ILP32_OFFBIG_LIBS, -# define _CS_XBS5_ILP32_OFFBIG_LIBS _CS_XBS5_ILP32_OFFBIG_LIBS - _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, -# define _CS_XBS5_ILP32_OFFBIG_LINTFLAGS _CS_XBS5_ILP32_OFFBIG_LINTFLAGS - _CS_XBS5_LP64_OFF64_CFLAGS, -# define _CS_XBS5_LP64_OFF64_CFLAGS _CS_XBS5_LP64_OFF64_CFLAGS - _CS_XBS5_LP64_OFF64_LDFLAGS, -# define _CS_XBS5_LP64_OFF64_LDFLAGS _CS_XBS5_LP64_OFF64_LDFLAGS - _CS_XBS5_LP64_OFF64_LIBS, -# define _CS_XBS5_LP64_OFF64_LIBS _CS_XBS5_LP64_OFF64_LIBS - _CS_XBS5_LP64_OFF64_LINTFLAGS, -# define _CS_XBS5_LP64_OFF64_LINTFLAGS _CS_XBS5_LP64_OFF64_LINTFLAGS - _CS_XBS5_LPBIG_OFFBIG_CFLAGS, -# define _CS_XBS5_LPBIG_OFFBIG_CFLAGS _CS_XBS5_LPBIG_OFFBIG_CFLAGS - _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, -# define _CS_XBS5_LPBIG_OFFBIG_LDFLAGS _CS_XBS5_LPBIG_OFFBIG_LDFLAGS - _CS_XBS5_LPBIG_OFFBIG_LIBS, -# define _CS_XBS5_LPBIG_OFFBIG_LIBS _CS_XBS5_LPBIG_OFFBIG_LIBS - _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, -# define _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS -# endif -# ifdef __USE_XOPEN2K - _CS_POSIX_V6_ILP32_OFF32_CFLAGS, -# define _CS_POSIX_V6_ILP32_OFF32_CFLAGS _CS_POSIX_V6_ILP32_OFF32_CFLAGS - _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, -# define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS _CS_POSIX_V6_ILP32_OFF32_LDFLAGS - _CS_POSIX_V6_ILP32_OFF32_LIBS, -# define _CS_POSIX_V6_ILP32_OFF32_LIBS _CS_POSIX_V6_ILP32_OFF32_LIBS - _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, -# define _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS - _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, -# define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS - _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, -# define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS - _CS_POSIX_V6_ILP32_OFFBIG_LIBS, -# define _CS_POSIX_V6_ILP32_OFFBIG_LIBS _CS_POSIX_V6_ILP32_OFFBIG_LIBS - _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, -# define _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS - _CS_POSIX_V6_LP64_OFF64_CFLAGS, -# define _CS_POSIX_V6_LP64_OFF64_CFLAGS _CS_POSIX_V6_LP64_OFF64_CFLAGS - _CS_POSIX_V6_LP64_OFF64_LDFLAGS, -# define _CS_POSIX_V6_LP64_OFF64_LDFLAGS _CS_POSIX_V6_LP64_OFF64_LDFLAGS - _CS_POSIX_V6_LP64_OFF64_LIBS, -# define _CS_POSIX_V6_LP64_OFF64_LIBS _CS_POSIX_V6_LP64_OFF64_LIBS - _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, -# define _CS_POSIX_V6_LP64_OFF64_LINTFLAGS _CS_POSIX_V6_LP64_OFF64_LINTFLAGS - _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, -# define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS - _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, -# define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS - _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, -# define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS _CS_POSIX_V6_LPBIG_OFFBIG_LIBS - _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS, -# define _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS -# endif - - _CS_V6_WIDTH_RESTRICTED_ENVS -# define _CS_V6_WIDTH_RESTRICTED_ENVS _CS_V6_WIDTH_RESTRICTED_ENVS - }; -#endif diff --git a/libc/sysdeps/linux/h8300/bits/dirent.h b/libc/sysdeps/linux/h8300/bits/dirent.h deleted file mode 100644 index 1754c7cbe..000000000 --- a/libc/sysdeps/linux/h8300/bits/dirent.h +++ /dev/null @@ -1,62 +0,0 @@ -/* Copyright (C) 1996, 1997 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* - * June 25, 2001 - * - * Removed d_type support for dirent and undefined _DIRENT_HAVE_D_TYPE; - * i.e. match the kernel structs and avoid any translation for now. - * Note: glibc fakes d_type for the dirent case. - * Note: dirent64 still has the d_type field. - */ - - -#ifndef _DIRENT_H -# error "Never use <bits/dirent.h> directly; include <dirent.h> instead." -#endif - -struct dirent - { -#ifndef __USE_FILE_OFFSET64 - __ino_t d_ino; - __off_t d_off; -#else - __ino64_t d_ino; - __off64_t d_off; -#endif - unsigned short int d_reclen; - char d_name[256]; /* We must not include limits.h! */ - }; - -#ifdef __USE_LARGEFILE64 -struct dirent64 - { - __ino64_t d_ino; - __off64_t d_off; - unsigned short int d_reclen; - unsigned char d_type; - char d_name[256]; /* We must not include limits.h! */ - }; -#endif - -#define d_fileno d_ino /* Backwards compatibility. */ - -#undef _DIRENT_HAVE_D_NAMLEN -#define _DIRENT_HAVE_D_RECLEN -#define _DIRENT_HAVE_D_OFF -#undef _DIRENT_HAVE_D_TYPE diff --git a/libc/sysdeps/linux/h8300/bits/dlfcn.h b/libc/sysdeps/linux/h8300/bits/dlfcn.h deleted file mode 100644 index f5983d706..000000000 --- a/libc/sysdeps/linux/h8300/bits/dlfcn.h +++ /dev/null @@ -1,37 +0,0 @@ -/* System dependent definitions for run-time dynamic loading. - Copyright (C) 1996, 1997, 1998, 1999 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _DLFCN_H -# error "Never use <bits/dlfcn.h> directly; include <dlfcn.h> instead." -#endif - -/* The MODE argument to `dlopen' contains one of the following: */ -#define RTLD_LAZY 0x001 /* Lazy function call binding. */ -#define RTLD_NOW 0x002 /* Immediate function call binding. */ -#define RTLD_BINDING_MASK 0x3 /* Mask of binding time value. */ - -/* If the following bit is set in the MODE argument to `dlopen', - the symbols of the loaded object and its dependencies are made - visible as if the object were linked directly into the program. */ -#define RTLD_GLOBAL 0x100 - -/* Unix98 demands the following flag which is the inverse to RTLD_GLOBAL. - The implementation does this by default and so we can define the - value to zero. */ -#define RTLD_LOCAL 0 diff --git a/libc/sysdeps/linux/h8300/bits/elfclass.h b/libc/sysdeps/linux/h8300/bits/elfclass.h deleted file mode 100644 index bb4dd545c..000000000 --- a/libc/sysdeps/linux/h8300/bits/elfclass.h +++ /dev/null @@ -1,11 +0,0 @@ -/* This file specifies the native word size of the machine, which indicates - the ELF file class used for executables and shared objects on this - machine. */ - -#ifndef _LINK_H -# error "Never use <bits/elfclass.h> directly; include <link.h> instead." -#endif - -#include <bits/wordsize.h> - -#define __ELF_NATIVE_CLASS __WORDSIZE diff --git a/libc/sysdeps/linux/h8300/bits/endian.h b/libc/sysdeps/linux/h8300/bits/endian.h deleted file mode 100644 index bf4ecb60a..000000000 --- a/libc/sysdeps/linux/h8300/bits/endian.h +++ /dev/null @@ -1,7 +0,0 @@ -/* m68k is big-endian. */ - -#ifndef _ENDIAN_H -# error "Never use <bits/endian.h> directly; include <endian.h> instead." -#endif - -#define __BYTE_ORDER __BIG_ENDIAN diff --git a/libc/sysdeps/linux/h8300/bits/environments.h b/libc/sysdeps/linux/h8300/bits/environments.h deleted file mode 100644 index f3af20655..000000000 --- a/libc/sysdeps/linux/h8300/bits/environments.h +++ /dev/null @@ -1,59 +0,0 @@ -/* Copyright (C) 1999 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _UNISTD_H -# error "Never include this file directly. Use <unistd.h> instead" -#endif - -#include <bits/wordsize.h> - -/* This header should define the following symbols under the described - situations. A value `1' means that the model is always supported, - `-1' means it is never supported. Undefined means it cannot be - statically decided. - - _XBS5_ILP32_OFF32 32bit int, long, pointers, and off_t type - _XBS5_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type - - _XBS5_LP64_OFF32 64bit long and pointers and 32bit off_t type - _XBS5_LPBIG_OFFBIG 64bit long and pointers and large off_t type -*/ - -#if __WORDSIZE == 64 - -/* We can never provide environments with 32-bit wide pointers. */ -# define _XBS5_ILP32_OFF32 -1 -# define _XBS5_ILP32_OFFBIG -1 - -/* By default we have 64-bit wide `long int', pointers and `off_t'. */ -# define _XBS5_LP64_OFF32 1 -# define _XBS5_LPBIG_OFFBIG 1 - -#else /* __WORDSIZE == 32 */ - -/* By default we have 32-bit wide `int', `long int', pointers and `off_t'. */ -# define _XBS5_ILP32_OFF32 1 - -/* We optionally provide an environment with the above size but an 64-bit - side `off_t'. Therefore we don't define _XBS5_ILP32_OFFBIG. */ - -/* We can never provide environments with 64-bit wide pointers. */ -# define _XBS5_LP64_OFF64 -1 -# define _XBS5_LPBIG_OFFBIG -1 - -#endif /* __WORDSIZE == 32 */ diff --git a/libc/sysdeps/linux/h8300/bits/errno.h b/libc/sysdeps/linux/h8300/bits/errno.h deleted file mode 100644 index 7a0bd8150..000000000 --- a/libc/sysdeps/linux/h8300/bits/errno.h +++ /dev/null @@ -1,64 +0,0 @@ -/* Error constants. Linux specific version. - Copyright (C) 1996, 1997, 1998 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifdef _ERRNO_H - -# undef EDOM -# undef EILSEQ -# undef ERANGE -# include <linux/errno.h> - -__BEGIN_DECLS - -/* Linux has no ENOTSUP error code. */ -# define ENOTSUP EOPNOTSUPP - -/* Linux also has no ECANCELED error code. Since it is not used here - we define it to an invalid value. */ -# define ECANCELED 125 - -# ifndef __ASSEMBLER__ -/* We now need a declaration of the `errno' variable. */ -extern int errno; - -/* Function to get address of global `errno' variable. */ -extern int *__errno_location __P ((void)) __attribute__ ((__const__)); - -# if defined _LIBC -/* We wouldn't need a special macro anymore but it is history. */ -# define __set_errno(val) (*__errno_location ()) = (val) -# endif /* _LIBC */ - -# if !defined _LIBC || defined _LIBC_REENTRANT -/* When using threads, errno is a per-thread value. */ -# define errno (*__errno_location ()) -# endif -# endif /* !__ASSEMBLER__ */ -#endif /* _ERRNO_H */ - -#if !defined _ERRNO_H && defined __need_Emath -/* This is ugly but the kernel header is not clean enough. We must - define only the values EDOM and ERANGE in case __need_Emath is - defined. The value is the same for all Linux ports. */ -# define EDOM 33 /* Math argument out of domain of function. */ -# define EILSEQ 84 /* Illegal byte sequence. */ -# define ERANGE 34 /* Math result not representable. */ -#endif /* !_ERRNO_H && __need_Emath */ - -__END_DECLS diff --git a/libc/sysdeps/linux/h8300/bits/fcntl.h b/libc/sysdeps/linux/h8300/bits/fcntl.h deleted file mode 100644 index 0c94c6b9a..000000000 --- a/libc/sysdeps/linux/h8300/bits/fcntl.h +++ /dev/null @@ -1,141 +0,0 @@ -/* O_*, F_*, FD_* bit values for Linux. - Copyright (C) 1995, 1996, 1997, 1998 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _FCNTL_H -# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead." -#endif - - -#include <sys/types.h> - -/* open/fcntl - O_SYNC is only implemented on blocks devices and on files - located on an ext2 file system */ -#define O_ACCMODE 0003 -#define O_RDONLY 00 -#define O_WRONLY 01 -#define O_RDWR 02 -#define O_CREAT 0100 /* not fcntl */ -#define O_EXCL 0200 /* not fcntl */ -#define O_NOCTTY 0400 /* not fcntl */ -#define O_TRUNC 01000 /* not fcntl */ -#define O_APPEND 02000 -#define O_NONBLOCK 04000 -#define O_NDELAY O_NONBLOCK -#define O_SYNC 010000 -#define O_FSYNC O_SYNC -#define O_ASYNC 020000 - -#ifdef __USE_GNU -# define O_DIRECTORY 040000 /* Must be a directory. */ -# define O_NOFOLLOW 0100000 /* Do not follow links. */ -#endif - -/* XXX missing */ -#ifdef __USE_LARGEFILE64 -# define O_LARGEFILE 0 -#endif - -/* For now Linux has synchronisity options for data and read operations. - We define the symbols here but let them do the same as O_SYNC since - this is a superset. */ -#if defined __USE_POSIX199309 || defined __USE_UNIX98 -# define O_DSYNC O_SYNC /* Synchronize data. */ -# define O_RSYNC O_SYNC /* Synchronize read operations. */ -#endif - -/* Values for the second argument to `fcntl'. */ -#define F_DUPFD 0 /* Duplicate file descriptor. */ -#define F_GETFD 1 /* Get file descriptor flags. */ -#define F_SETFD 2 /* Set file descriptor flags. */ -#define F_GETFL 3 /* Get file status flags. */ -#define F_SETFL 4 /* Set file status flags. */ -#define F_GETLK 5 /* Get record locking info. */ -#define F_SETLK 6 /* Set record locking info (non-blocking). */ -#define F_SETLKW 7 /* Set record locking info (blocking). */ - -/* XXX missing */ -#define F_GETLK64 5 /* Get record locking info. */ -#define F_SETLK64 6 /* Set record locking info (non-blocking). */ -#define F_SETLKW64 7 /* Set record locking info (blocking). */ - -#ifdef __USE_BSD -# define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */ -# define F_GETOWN 9 /* Set owner of socket (receiver of SIGIO). */ -#endif - -#ifdef __USE_GNU -# define F_SETSIG 10 /* Set number of signal to be sent. */ -# define F_GETSIG 11 /* Get number of signal to be sent. */ -#endif - -/* For F_[GET|SET]FL. */ -#define FD_CLOEXEC 1 /* actually anything with low bit set goes */ - -/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */ -#define F_RDLCK 0 /* Read lock. */ -#define F_WRLCK 1 /* Write lock. */ -#define F_UNLCK 2 /* Remove lock. */ - -/* for old implementation of bsd flock () */ -#define F_EXLCK 4 /* or 3 */ -#define F_SHLCK 8 /* or 4 */ - -#ifdef __USE_BSD -/* Operations for bsd flock(), also used by the kernel implementation */ -# define LOCK_SH 1 /* shared lock */ -# define LOCK_EX 2 /* exclusive lock */ -# define LOCK_NB 4 /* or'd with one of the above to prevent - blocking */ -# define LOCK_UN 8 /* remove lock */ -#endif - -struct flock - { - short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ - short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ -#ifndef __USE_FILE_OFFSET64 - __off_t l_start; /* Offset where the lock begins. */ - __off_t l_len; /* Size of the locked area; zero means until EOF. */ -#else - __off64_t l_start; /* Offset where the lock begins. */ - __off64_t l_len; /* Size of the locked area; zero means until EOF. */ -#endif - __pid_t l_pid; /* Process holding the lock. */ - }; - -#ifdef __USE_LARGEFILE64 -struct flock64 - { - short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ - short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ - __off64_t l_start; /* Offset where the lock begins. */ - __off64_t l_len; /* Size of the locked area; zero means until EOF. */ - __pid_t l_pid; /* Process holding the lock. */ - }; -#endif - -/* Define some more compatibility macros to be backward compatible with - BSD systems which did not managed to hide these kernel macros. */ -#ifdef __USE_BSD -# define FAPPEND O_APPEND -# define FFSYNC O_FSYNC -# define FASYNC O_ASYNC -# define FNONBLOCK O_NONBLOCK -# define FNDELAY O_NDELAY -#endif /* Use BSD. */ diff --git a/libc/sysdeps/linux/h8300/bits/fenv.h b/libc/sysdeps/linux/h8300/bits/fenv.h deleted file mode 100644 index 3138fefe6..000000000 --- a/libc/sysdeps/linux/h8300/bits/fenv.h +++ /dev/null @@ -1,79 +0,0 @@ -/* Copyright (C) 1997, 1998, 1999 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _FENV_H -# error "Never use <bits/fenv.h> directly; include <fenv.h> instead." -#endif - - -/* Define bits representing the exception. We use the bit positions of - the appropriate bits in the FPSR Accrued Exception Byte. */ -enum - { - FE_INEXACT = 1 << 3, -#define FE_INEXACT FE_INEXACT - FE_DIVBYZERO = 1 << 4, -#define FE_DIVBYZERO FE_DIVBYZERO - FE_UNDERFLOW = 1 << 5, -#define FE_UNDERFLOW FE_UNDERFLOW - FE_OVERFLOW = 1 << 6, -#define FE_OVERFLOW FE_OVERFLOW - FE_INVALID = 1 << 7 -#define FE_INVALID FE_INVALID - }; - -#define FE_ALL_EXCEPT \ - (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID) - -/* The m68k FPU supports all of the four defined rounding modes. We use - the bit positions in the FPCR Mode Control Byte as the values for the - appropriate macros. */ -enum - { - FE_TONEAREST = 0, -#define FE_TONEAREST FE_TONEAREST - FE_TOWARDZERO = 1 << 4, -#define FE_TOWARDZERO FE_TOWARDZERO - FE_DOWNWARD = 2 << 4, -#define FE_DOWNWARD FE_DOWNWARD - FE_UPWARD = 3 << 4 -#define FE_UPWARD FE_UPWARD - }; - - -/* Type representing exception flags. */ -typedef unsigned int fexcept_t; - - -/* Type representing floating-point environment. This structure - corresponds to the layout of the block written by `fmovem'. */ -typedef struct - { - unsigned int __control_register; - unsigned int __status_register; - unsigned int __instruction_address; - } -fenv_t; - -/* If the default argument is used we use this value. */ -#define FE_DFL_ENV ((fenv_t *) -1) - -#ifdef __USE_GNU -/* Floating-point environment where none of the exceptions are masked. */ -# define FE_NOMASK_ENV ((fenv_t *) -2) -#endif diff --git a/libc/sysdeps/linux/h8300/bits/fenvinline.h b/libc/sysdeps/linux/h8300/bits/fenvinline.h deleted file mode 100644 index 42f77b561..000000000 --- a/libc/sysdeps/linux/h8300/bits/fenvinline.h +++ /dev/null @@ -1,8 +0,0 @@ -/* This file provides inline versions of floating-pint environment - handling functions. If there were any. */ - -#ifndef __NO_MATH_INLINES - -/* Here is where the code would go. */ - -#endif diff --git a/libc/sysdeps/linux/h8300/bits/huge_val.h b/libc/sysdeps/linux/h8300/bits/huge_val.h deleted file mode 100644 index 822b82930..000000000 --- a/libc/sysdeps/linux/h8300/bits/huge_val.h +++ /dev/null @@ -1,75 +0,0 @@ -/* `HUGE_VAL' constants for m68k (where it is infinity). - Used by <stdlib.h> and <math.h> functions for overflow. - Copyright (C) 1992, 1995, 1996, 1997 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _MATH_H -# error "Never use <bits/huge_val.h> directly; include <math.h> instead." -#endif - - -#include <features.h> -#include <sys/cdefs.h> - -/* IEEE positive infinity (-HUGE_VAL is negative infinity). */ - -#ifdef __GNUC__ - -# define HUGE_VAL \ - (__extension__ \ - ((union { unsigned long long __l; double __d; }) \ - { __l: 0x7ff0000000000000ULL }).__d) - -#else /* not GCC */ - -static union { unsigned char __c[8]; double __d; } __huge_val = - { { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 } }; -# define HUGE_VAL (__huge_val.__d) - -#endif /* GCC. */ - - -/* ISO C 9X extensions: (float) HUGE_VALF and (long double) HUGE_VALL. */ - -#ifdef __USE_ISOC9X - -# ifdef __GNUC__ - -# define HUGE_VALF \ - (__extension__ \ - ((union { unsigned long __l; float __f; }) \ - { __l: 0x7f800000UL }).__f) - -# define HUGE_VALL \ - (__extension__ \ - ((union { unsigned long __l[3]; long double __ld; }) \ - { __l: { 0x7fff0000UL, 0x80000000UL, 0UL } }).__ld) - -# else /* not GCC */ - -static union { unsigned char __c[4]; float __f; } __huge_valf = - { { 0x7f, 0x80, 0, 0 } }; -# define HUGE_VALF (__huge_valf.__f) - -static union { unsigned char __c[12]; long double __ld; } __huge_vall = - { { 0x7f, 0xff, 0, 0, 0x80, 0, 0, 0, 0, 0, 0, 0 } }; -# define HUGE_VALL (__huge_vall.__ld) - -# endif /* GCC. */ - -#endif /* __USE_ISOC9X. */ diff --git a/libc/sysdeps/linux/h8300/bits/in.h b/libc/sysdeps/linux/h8300/bits/in.h deleted file mode 100644 index 38e2a2e00..000000000 --- a/libc/sysdeps/linux/h8300/bits/in.h +++ /dev/null @@ -1,128 +0,0 @@ -/* Copyright (C) 1991,92,93,94,95,96,97,98,99 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* Linux version. */ - -#ifndef _NETINET_IN_H -# error "Never use <bits/in.h> directly; include <netinet/in.h> instead." -#endif - -/* Options for use with `getsockopt' and `setsockopt' at the IP level. - The first word in the comment at the right is the data type used; - "bool" means a boolean value stored in an `int'. */ -#define IP_TOS 1 /* int; IP type of service and precedence. */ -#define IP_TTL 2 /* int; IP time to live. */ -#define IP_HDRINCL 3 /* int; Header is included with data. */ -#define IP_OPTIONS 4 /* ip_opts; IP per-packet options. */ -#define IP_ROUTER_ALERT 5 /* bool */ -#define IP_RECVOPTS 6 /* bool */ -#define IP_RETOPTS 7 /* bool */ -#define IP_PKTINFO 8 /* bool */ -#define IP_PKTOPTIONS 9 -#define IP_PMTUDISC 10 /* obsolete name? */ -#define IP_MTU_DISCOVER 10 /* int; see below */ -#define IP_RECVERR 11 /* bool */ -#define IP_RECVTTL 12 /* bool */ -#define IP_RECVTOS 13 /* bool */ -#define IP_MULTICAST_IF 32 /* in_addr; set/get IP multicast i/f */ -#define IP_MULTICAST_TTL 33 /* u_char; set/get IP multicast ttl */ -#define IP_MULTICAST_LOOP 34 /* i_char; set/get IP multicast loopback */ -#define IP_ADD_MEMBERSHIP 35 /* ip_mreq; add an IP group membership */ -#define IP_DROP_MEMBERSHIP 36 /* ip_mreq; drop an IP group membership */ - -/* For BSD compatibility. */ -#define IP_RECVRETOPTS IP_RETOPTS - -/* IP_MTU_DISCOVER arguments. */ -#define IP_PMTUDISC_DONT 0 /* Never send DF frames. */ -#define IP_PMTUDISC_WANT 1 /* Use per route hints. */ -#define IP_PMTUDISC_DO 2 /* Always DF. */ - -/* To select the IP level. */ -#define SOL_IP 0 - -#define IP_DEFAULT_MULTICAST_TTL 1 -#define IP_DEFAULT_MULTICAST_LOOP 1 -#define IP_MAX_MEMBERSHIPS 20 - -/* Structure used to describe IP options for IP_OPTIONS. The `ip_dst' - field is used for the first-hop gateway when using a source route - (this gets put into the header proper). */ -struct ip_opts - { - struct in_addr ip_dst; /* First hop; zero without source route. */ - char ip_opts[40]; /* Actually variable in size. */ - }; - -/* Structure used for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP. */ -struct ip_mreq - { - struct in_addr imr_multiaddr; /* IP multicast address of group */ - struct in_addr imr_interface; /* local IP address of interface */ - }; - -/* As above but including interface specification by index. */ -struct ip_mreqn - { - struct in_addr imr_multiaddr; /* IP multicast address of group */ - struct in_addr imr_address; /* local IP address of interface */ - int imr_ifindex; /* Interface index */ - }; - -/* Structure used for IP_PKTINFO. */ -struct in_pktinfo - { - int ipi_ifindex; /* Interface index */ - struct in_addr ipi_spec_dst; /* Routing destination address */ - struct in_addr ipi_addr; /* Header destination address */ - }; - -/* Options for use with `getsockopt' and `setsockopt' at the IPv6 level. - The first word in the comment at the right is the data type used; - "bool" means a boolean value stored in an `int'. */ -#define IPV6_ADDRFORM 1 -#define IPV6_PKTINFO 2 -#define IPV6_HOPOPTS 3 -#define IPV6_DSTOPTS 4 -#define IPV6_RXSRCRT 5 -#define IPV6_PKTOPTIONS 6 -#define IPV6_CHECKSUM 7 -#define IPV6_HOPLIMIT 8 -#define IPV6_NEXTHOP 9 -#define IPV6_AUTHHDR 10 -#define IPV6_UNICAST_HOPS 16 -#define IPV6_MULTICAST_IF 17 -#define IPV6_MULTICAST_HOPS 18 -#define IPV6_MULTICAST_LOOP 19 -#define IPV6_ADD_MEMBERSHIP 20 -#define IPV6_DROP_MEMBERSHIP 21 -#define IPV6_ROUTER_ALERT 22 - -#define SCM_SRCRT IPV6_RXSRCRT - -#define IPV6_RXHOPOPTS IPV6_HOPOPTS /* obsolete name */ -#define IPV6_RXDSTOPTS IPV6_DSTOPTS /* obsolete name */ - -/* IPV6_MTU_DISCOVER values. */ -#define IPV6_PMTUDISC_DONT 0 /* Never send DF frames. */ -#define IPV6_PMTUDISC_WANT 1 /* Use per route hints. */ -#define IPV6_PMTUDISC_DO 2 /* Always DF. */ - -/* Socket level values for IPv6. */ -#define SOL_IPV6 41 -#define SOL_ICMPV6 58 diff --git a/libc/sysdeps/linux/h8300/bits/initspin.h b/libc/sysdeps/linux/h8300/bits/initspin.h deleted file mode 100644 index af19d44e6..000000000 --- a/libc/sysdeps/linux/h8300/bits/initspin.h +++ /dev/null @@ -1,28 +0,0 @@ -/* Generic definitions for spinlock initializers. - Copyright (C) 2000, 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* Initial value of a spinlock. Most platforms should use zero, - unless they only implement a "test and clear" operation instead of - the usual "test and set". */ -#define __LT_SPINLOCK_INIT 0 - -/* Macros for lock initializers, using the above definition. */ -#define __LOCK_INITIALIZER { 0, __LT_SPINLOCK_INIT } -#define __ALT_LOCK_INITIALIZER { 0, __LT_SPINLOCK_INIT } -#define __ATOMIC_INITIALIZER { 0, __LT_SPINLOCK_INIT } diff --git a/libc/sysdeps/linux/h8300/bits/ioctl-types.h b/libc/sysdeps/linux/h8300/bits/ioctl-types.h deleted file mode 100644 index 59c79df81..000000000 --- a/libc/sysdeps/linux/h8300/bits/ioctl-types.h +++ /dev/null @@ -1,77 +0,0 @@ -/* Structure types for pre-termios terminal ioctls. Linux version. - Copyright (C) 1996, 1997, 1999 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _SYS_IOCTL_H -# error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead." -#endif - -/* Get definition of constants for use with `ioctl'. */ -#include <asm/ioctls.h> - - -struct winsize - { - unsigned short int ws_row; - unsigned short int ws_col; - unsigned short int ws_xpixel; - unsigned short int ws_ypixel; - }; - -#define NCC 8 -struct termio - { - unsigned short int c_iflag; /* input mode flags */ - unsigned short int c_oflag; /* output mode flags */ - unsigned short int c_cflag; /* control mode flags */ - unsigned short int c_lflag; /* local mode flags */ - unsigned char c_line; /* line discipline */ - unsigned char c_cc[NCC]; /* control characters */ -}; - -/* modem lines */ -#define TIOCM_LE 0x001 -#define TIOCM_DTR 0x002 -#define TIOCM_RTS 0x004 -#define TIOCM_ST 0x008 -#define TIOCM_SR 0x010 -#define TIOCM_CTS 0x020 -#define TIOCM_CAR 0x040 -#define TIOCM_RNG 0x080 -#define TIOCM_DSR 0x100 -#define TIOCM_CD TIOCM_CAR -#define TIOCM_RI TIOCM_RNG - -/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ - -/* line disciplines */ -#define N_TTY 0 -#define N_SLIP 1 -#define N_MOUSE 2 -#define N_PPP 3 -#define N_STRIP 4 -#define N_AX25 5 -#define N_X25 6 /* X.25 async */ -#define N_6PACK 7 -#define N_MASC 8 /* Mobitex module */ -#define N_R3964 9 /* Simatic R3964 module */ -#define N_PROFIBUS_FDL 10 /* Profibus */ -#define N_IRDA 11 /* Linux IR */ -#define N_SMSBLOCK 12 /* SMS block mode */ -#define N_HDLC 13 /* synchronous HDLC */ -#define N_SYNC_PPP 14 /* synchronous PPP */ diff --git a/libc/sysdeps/linux/h8300/bits/ioctls.h b/libc/sysdeps/linux/h8300/bits/ioctls.h deleted file mode 100644 index c103645f6..000000000 --- a/libc/sysdeps/linux/h8300/bits/ioctls.h +++ /dev/null @@ -1,108 +0,0 @@ -/* Copyright (C) 1996, 1997, 1998 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _SYS_IOCTL_H -# error "Never use <bits/ioctls.h> directly; include <sys/ioctl.h> instead." -#endif - -/* Use the definitions from the kernel header files. */ -#include <asm/ioctls.h> - -/* Routing table calls. */ -#define SIOCADDRT 0x890B /* add routing table entry */ -#define SIOCDELRT 0x890C /* delete routing table entry */ -#define SIOCRTMSG 0x890D /* call to routing system */ - -/* Socket configuration controls. */ -#define SIOCGIFNAME 0x8910 /* get iface name */ -#define SIOCSIFLINK 0x8911 /* set iface channel */ -#define SIOCGIFCONF 0x8912 /* get iface list */ -#define SIOCGIFFLAGS 0x8913 /* get flags */ -#define SIOCSIFFLAGS 0x8914 /* set flags */ -#define SIOCGIFADDR 0x8915 /* get PA address */ -#define SIOCSIFADDR 0x8916 /* set PA address */ -#define SIOCGIFDSTADDR 0x8917 /* get remote PA address */ -#define SIOCSIFDSTADDR 0x8918 /* set remote PA address */ -#define SIOCGIFBRDADDR 0x8919 /* get broadcast PA address */ -#define SIOCSIFBRDADDR 0x891a /* set broadcast PA address */ -#define SIOCGIFNETMASK 0x891b /* get network PA mask */ -#define SIOCSIFNETMASK 0x891c /* set network PA mask */ -#define SIOCGIFMETRIC 0x891d /* get metric */ -#define SIOCSIFMETRIC 0x891e /* set metric */ -#define SIOCGIFMEM 0x891f /* get memory address (BSD) */ -#define SIOCSIFMEM 0x8920 /* set memory address (BSD) */ -#define SIOCGIFMTU 0x8921 /* get MTU size */ -#define SIOCSIFMTU 0x8922 /* set MTU size */ -#define SIOCSIFHWADDR 0x8924 /* set hardware address */ -#define SIOCGIFENCAP 0x8925 /* get/set encapsulations */ -#define SIOCSIFENCAP 0x8926 -#define SIOCGIFHWADDR 0x8927 /* Get hardware address */ -#define SIOCGIFSLAVE 0x8929 /* Driver slaving support */ -#define SIOCSIFSLAVE 0x8930 -#define SIOCADDMULTI 0x8931 /* Multicast address lists */ -#define SIOCDELMULTI 0x8932 -#define SIOCGIFINDEX 0x8933 /* name -> if_index mapping */ -#define SIOGIFINDEX SIOCGIFINDEX /* misprint compatibility :-) */ -#define SIOCSIFPFLAGS 0x8934 /* set/get extended flags set */ -#define SIOCGIFPFLAGS 0x8935 -#define SIOCDIFADDR 0x8936 /* delete PA address */ -#define SIOCSIFHWBROADCAST 0x8937 /* set hardware broadcast addr */ -#define SIOCGIFCOUNT 0x8938 /* get number of devices */ - -#define SIOCGIFBR 0x8940 /* Bridging support */ -#define SIOCSIFBR 0x8941 /* Set bridging options */ - -#define SIOCGIFTXQLEN 0x8942 /* Get the tx queue length */ -#define SIOCSIFTXQLEN 0x8943 /* Set the tx queue length */ - - -/* ARP cache control calls. */ - /* 0x8950 - 0x8952 * obsolete calls, don't re-use */ -#define SIOCDARP 0x8953 /* delete ARP table entry */ -#define SIOCGARP 0x8954 /* get ARP table entry */ -#define SIOCSARP 0x8955 /* set ARP table entry */ - -/* RARP cache control calls. */ -#define SIOCDRARP 0x8960 /* delete RARP table entry */ -#define SIOCGRARP 0x8961 /* get RARP table entry */ -#define SIOCSRARP 0x8962 /* set RARP table entry */ - -/* Driver configuration calls */ - -#define SIOCGIFMAP 0x8970 /* Get device parameters */ -#define SIOCSIFMAP 0x8971 /* Set device parameters */ - -/* DLCI configuration calls */ - -#define SIOCADDDLCI 0x8980 /* Create new DLCI device */ -#define SIOCDELDLCI 0x8981 /* Delete DLCI device */ - -/* Device private ioctl calls. */ - -/* These 16 ioctls are available to devices via the do_ioctl() device - vector. Each device should include this file and redefine these - names as their own. Because these are device dependent it is a good - idea _NOT_ to issue them to random objects and hope. */ - -#define SIOCDEVPRIVATE 0x89F0 /* to 89FF */ - -/* - * These 16 ioctl calls are protocol private - */ - -#define SIOCPROTOPRIVATE 0x89E0 /* to 89EF */ diff --git a/libc/sysdeps/linux/h8300/bits/ipc.h b/libc/sysdeps/linux/h8300/bits/ipc.h deleted file mode 100644 index c4e37358e..000000000 --- a/libc/sysdeps/linux/h8300/bits/ipc.h +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright (C) 1995, 1996, 1997, 1998 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _SYS_IPC_H -# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead." -#endif - -#include <sys/types.h> - -/* Mode bits for `msgget', `semget', and `shmget'. */ -#define IPC_CREAT 01000 /* Create key if key does not exist. */ -#define IPC_EXCL 02000 /* Fail if key exists. */ -#define IPC_NOWAIT 04000 /* Return error on wait. */ - -/* Control commands for `msgctl', `semctl', and `shmctl'. */ -#define IPC_RMID 0 /* Remove identifier. */ -#define IPC_SET 1 /* Set `ipc_perm' options. */ -#define IPC_STAT 2 /* Get `ipc_perm' options. */ -#define IPC_INFO 3 /* See ipcs. */ - -/* Special key values. */ -#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ - - -/* Data structure used to pass permission information to IPC operations. */ -struct ipc_perm - { - __key_t __key; /* Key. */ - unsigned short int uid; /* Owner's user ID. */ - unsigned short int gid; /* Owner's group ID. */ - unsigned short int cuid; /* Creator's user ID. */ - unsigned short int cgid; /* Creator's group ID. */ - unsigned short int mode; /* Read/write permission. */ - unsigned short int __seq; /* Sequence number. */ - }; diff --git a/libc/sysdeps/linux/h8300/bits/libc-lock.h b/libc/sysdeps/linux/h8300/bits/libc-lock.h deleted file mode 100644 index a14cea1aa..000000000 --- a/libc/sysdeps/linux/h8300/bits/libc-lock.h +++ /dev/null @@ -1,214 +0,0 @@ -/* libc-internal interface for mutex locks. LinuxThreads version. - Copyright (C) 1996, 1997, 1998, 1999 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _BITS_LIBC_LOCK_H -#define _BITS_LIBC_LOCK_H 1 - -#include <pthread.h> - -/* Mutex type. */ -#ifdef _LIBC -typedef pthread_mutex_t __libc_lock_t; -#else -typedef struct __libc_lock_opaque__ __libc_lock_t; -#endif - -/* Type for key to thread-specific data. */ -typedef pthread_key_t __libc_key_t; - -/* Define a lock variable NAME with storage class CLASS. The lock must be - initialized with __libc_lock_init before it can be used (or define it - with __libc_lock_define_initialized, below). Use `extern' for CLASS to - declare a lock defined in another module. In public structure - definitions you must use a pointer to the lock structure (i.e., NAME - begins with a `*'), because its storage size will not be known outside - of libc. */ -#define __libc_lock_define(CLASS,NAME) \ - CLASS __libc_lock_t NAME; - -/* Define an initialized lock variable NAME with storage class CLASS. - - For the C library we take a deeper look at the initializer. For this - implementation all fields are initialized to zero. Therefore we - don't initialize the variable which allows putting it into the BSS - section. */ -#define __libc_lock_define_initialized(CLASS,NAME) \ - CLASS __libc_lock_t NAME; - -/* Define an initialized recursive lock variable NAME with storage - class CLASS. */ -#define __libc_lock_define_initialized_recursive(CLASS,NAME) \ - CLASS __libc_lock_t NAME = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; - -/* Initialize the named lock variable, leaving it in a consistent, unlocked - state. */ -#define __libc_lock_init(NAME) \ - (__pthread_mutex_init != NULL ? __pthread_mutex_init (&(NAME), NULL) : 0); - -/* Same as last but this time we initialize a recursive mutex. */ -#define __libc_lock_init_recursive(NAME) \ - do { \ - if (__pthread_mutex_init != NULL) \ - { \ - pthread_mutexattr_t __attr; \ - __pthread_mutexattr_init (&__attr); \ - __pthread_mutexattr_settype (&__attr, PTHREAD_MUTEX_RECURSIVE_NP); \ - __pthread_mutex_init (&(NAME), &__attr); \ - __pthread_mutexattr_destroy (&__attr); \ - } \ - } while (0); - -/* Finalize the named lock variable, which must be locked. It cannot be - used again until __libc_lock_init is called again on it. This must be - called on a lock variable before the containing storage is reused. */ -#define __libc_lock_fini(NAME) \ - (__pthread_mutex_destroy != NULL ? __pthread_mutex_destroy (&(NAME)) : 0); - -/* Finalize recursive named lock. */ -#define __libc_lock_fini_recursive(NAME) __libc_lock_fini (NAME) - -/* Lock the named lock variable. */ -#define __libc_lock_lock(NAME) \ - (__pthread_mutex_lock != NULL ? __pthread_mutex_lock (&(NAME)) : 0); - -/* Lock the recursive named lock variable. */ -#define __libc_lock_lock_recursive(NAME) __libc_lock_lock (NAME) - -/* Try to lock the named lock variable. */ -#define __libc_lock_trylock(NAME) \ - (__pthread_mutex_trylock != NULL ? __pthread_mutex_trylock (&(NAME)) : 0) - -/* Try to lock the recursive named lock variable. */ -#define __libc_lock_trylock_recursive(NAME) __libc_lock_trylock (NAME) - -/* Unlock the named lock variable. */ -#define __libc_lock_unlock(NAME) \ - (__pthread_mutex_unlock != NULL ? __pthread_mutex_unlock (&(NAME)) : 0); - -/* Unlock the recursive named lock variable. */ -#define __libc_lock_unlock_recursive(NAME) __libc_lock_unlock (NAME) - - -/* Define once control variable. */ -#if PTHREAD_ONCE_INIT == 0 -/* Special case for static variables where we can avoid the initialization - if it is zero. */ -# define __libc_once_define(CLASS, NAME) \ - CLASS pthread_once_t NAME -#else -# define __libc_once_define(CLASS, NAME) \ - CLASS pthread_once_t NAME = PTHREAD_ONCE_INIT -#endif - -/* Call handler iff the first call. */ -#define __libc_once(ONCE_CONTROL, INIT_FUNCTION) \ - do { \ - if (__pthread_once != NULL) \ - __pthread_once (&(ONCE_CONTROL), (INIT_FUNCTION)); \ - else if ((ONCE_CONTROL) == 0) { \ - INIT_FUNCTION (); \ - (ONCE_CONTROL) = 1; \ - } \ - } while (0) - - -/* Start critical region with cleanup. */ -#define __libc_cleanup_region_start(FCT, ARG) \ - { struct _pthread_cleanup_buffer _buffer; \ - int _avail = _pthread_cleanup_push_defer != NULL; \ - if (_avail) { \ - _pthread_cleanup_push_defer (&_buffer, (FCT), (ARG)); \ - } - -/* End critical region with cleanup. */ -#define __libc_cleanup_region_end(DOIT) \ - if (_avail) { \ - _pthread_cleanup_pop_restore (&_buffer, (DOIT)); \ - } \ - } - -/* Sometimes we have to exit the block in the middle. */ -#define __libc_cleanup_end(DOIT) \ - if (_avail) { \ - _pthread_cleanup_pop_restore (&_buffer, (DOIT)); \ - } - -/* Create thread-specific key. */ -#define __libc_key_create(KEY, DESTRUCTOR) \ - (__pthread_key_create != NULL ? __pthread_key_create (KEY, DESTRUCTOR) : 1) - -/* Get thread-specific data. */ -#define __libc_getspecific(KEY) \ - (__pthread_getspecific != NULL ? __pthread_getspecific (KEY) : NULL) - -/* Set thread-specific data. */ -#define __libc_setspecific(KEY, VALUE) \ - (__pthread_setspecific != NULL ? __pthread_setspecific (KEY, VALUE) : 0) - - -/* Register handlers to execute before and after `fork'. */ -#define __libc_atfork(PREPARE, PARENT, CHILD) \ - (__pthread_atfork != NULL ? __pthread_atfork (PREPARE, PARENT, CHILD) : 0) - - -/* Make the pthread functions weak so that we can elide them from - single-threaded processes. */ -#ifndef __NO_WEAK_PTHREAD_ALIASES -# ifdef weak_extern -weak_extern (__pthread_mutex_init) -weak_extern (__pthread_mutex_destroy) -weak_extern (__pthread_mutex_lock) -weak_extern (__pthread_mutex_trylock) -weak_extern (__pthread_mutex_unlock) -weak_extern (__pthread_mutexattr_init) -weak_extern (__pthread_mutexattr_destroy) -weak_extern (__pthread_mutexattr_settype) -weak_extern (__pthread_key_create) -weak_extern (__pthread_setspecific) -weak_extern (__pthread_getspecific) -weak_extern (__pthread_once) -weak_extern (__pthread_initialize) -weak_extern (__pthread_atfork) -weak_extern (_pthread_cleanup_push_defer) -weak_extern (_pthread_cleanup_pop_restore) -# else -# pragma weak __pthread_mutex_init -# pragma weak __pthread_mutex_destroy -# pragma weak __pthread_mutex_lock -# pragma weak __pthread_mutex_trylock -# pragma weak __pthread_mutex_unlock -# pragma weak __pthread_mutexattr_init -# pragma weak __pthread_mutexattr_destroy -# pragma weak __pthread_mutexattr_settype -# pragma weak __pthread_key_create -# pragma weak __pthread_setspecific -# pragma weak __pthread_getspecific -# pragma weak __pthread_once -# pragma weak __pthread_initialize -# pragma weak __pthread_atfork -# pragma weak _pthread_cleanup_push_defer -# pragma weak _pthread_cleanup_pop_restore -# endif -#endif - -/* We need portable names for some functions. E.g., when they are - used as argument to __libc_cleanup_region_start. */ -#define __libc_mutex_unlock __pthread_mutex_unlock - -#endif /* bits/libc-lock.h */ diff --git a/libc/sysdeps/linux/h8300/bits/local_lim.h b/libc/sysdeps/linux/h8300/bits/local_lim.h deleted file mode 100644 index 545a90b2e..000000000 --- a/libc/sysdeps/linux/h8300/bits/local_lim.h +++ /dev/null @@ -1,55 +0,0 @@ -/* Minimum guaranteed maximum values for system limits. Linux version. - Copyright (C) 1993, 94, 95, 96, 97, 98 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* The kernel header pollutes the namespace with the NR_OPEN symbol. - Remove this after including the header if necessary. */ -#ifndef NR_OPEN -# define __undef_NR_OPEN -#endif - -/* The kernel sources contain a file with all the needed information. */ -#include <linux/limits.h> - -/* Have to remove NR_OPEN? */ -#ifdef __undef_NR_OPEN -# undef NR_OPEN -# undef __undef_NR_OPEN -#endif - -/* The number of data keys per process. */ -#define _POSIX_THREAD_KEYS_MAX 128 -/* This is the value this implementation supports. */ -#define PTHREAD_KEYS_MAX 1024 - -/* Controlling the iterations of destructors for thread-specific data. */ -#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 -/* Number of iterations this implementation does. */ -#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS - -/* The number of threads per process. */ -#define _POSIX_THREAD_THREADS_MAX 64 -/* This is the value this implementation supports. */ -#define PTHREAD_THREADS_MAX 1024 - -/* Maximum amount by which a process can descrease its asynchronous I/O - priority level. */ -#define AIO_PRIO_DELTA_MAX 20 - -/* Minimum size for a thread. We are free to choose a reasonable value. */ -#define PTHREAD_STACK_MIN 16384 diff --git a/libc/sysdeps/linux/h8300/bits/locale.h b/libc/sysdeps/linux/h8300/bits/locale.h deleted file mode 100644 index 50064b53e..000000000 --- a/libc/sysdeps/linux/h8300/bits/locale.h +++ /dev/null @@ -1,44 +0,0 @@ -/* Definition of locale category symbol values. - Copyright (C) 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. */ - -#if !defined _LOCALE_H && !defined _LANGINFO_H -# error "Never use <bits/locale.h> directly; include <locale.h> instead." -#endif - -#ifndef _BITS_LOCALE_H -#define _BITS_LOCALE_H 1 - -enum -{ - __LC_CTYPE = 0, - __LC_NUMERIC = 1, - __LC_TIME = 2, - __LC_COLLATE = 3, - __LC_MONETARY = 4, - __LC_MESSAGES = 5, - __LC_ALL = 6, - __LC_PAPER = 7, - __LC_NAME = 8, - __LC_ADDRESS = 9, - __LC_TELEPHONE = 10, - __LC_MEASUREMENT = 11, - __LC_IDENTIFICATION = 12 -}; - -#endif /* bits/locale.h */ diff --git a/libc/sysdeps/linux/h8300/bits/mathcalls.h b/libc/sysdeps/linux/h8300/bits/mathcalls.h deleted file mode 100644 index 97bda451a..000000000 --- a/libc/sysdeps/linux/h8300/bits/mathcalls.h +++ /dev/null @@ -1,336 +0,0 @@ -/* Prototype declarations for math functions; helper file for <math.h>. - Copyright (C) 1996, 1997, 1998, 1999 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. 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 <math.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,[_r], (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,[_r], (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. - - Note that there must be no whitespace before the argument passed for - NAME, to make token pasting work with -traditional. */ - -#ifndef _MATH_H - #error "Never include <bits/mathcalls.h> directly; include <math.h> instead." -#endif - - -/* Trigonometric functions. */ - -/* Arc cosine of X. */ -__MATHCALL (acos,, (_Mdouble_ __x)); -/* Arc sine of X. */ -__MATHCALL (asin,, (_Mdouble_ __x)); -/* Arc tangent of X. */ -__MATHCALL (atan,, (_Mdouble_ __x)); -/* Arc tangent of Y/X. */ -__MATHCALL (atan2,, (_Mdouble_ __y, _Mdouble_ __x)); - -/* Cosine of X. */ -__MATHCALL (cos,, (_Mdouble_ __x)); -/* Sine of X. */ -__MATHCALL (sin,, (_Mdouble_ __x)); -/* Tangent of X. */ -__MATHCALL (tan,, (_Mdouble_ __x)); - -#ifdef __USE_GNU -/* Cosine and sine of X. */ -__MATHDECL (void,sincos,, - (_Mdouble_ __x, _Mdouble_ *__sinx, _Mdouble_ *__cosx)); -#endif - -/* Hyperbolic functions. */ - -/* Hyperbolic cosine of X. */ -__MATHCALL (cosh,, (_Mdouble_ __x)); -/* Hyperbolic sine of X. */ -__MATHCALL (sinh,, (_Mdouble_ __x)); -/* Hyperbolic tangent of X. */ -__MATHCALL (tanh,, (_Mdouble_ __x)); - -#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC9X -/* Hyperbolic arc cosine of X. */ -__MATHCALL (acosh,, (_Mdouble_ __x)); -/* Hyperbolic arc sine of X. */ -__MATHCALL (asinh,, (_Mdouble_ __x)); -/* Hyperbolic arc tangent of X. */ -__MATHCALL (atanh,, (_Mdouble_ __x)); -#endif - -/* Exponential and logarithmic functions. */ - -/* Exponential function of X. */ -__MATHCALL (exp,, (_Mdouble_ __x)); - -#ifdef __USE_GNU -/* A function missing in all standards: compute exponent to base ten. */ -__MATHCALL (exp10,, (_Mdouble_ __x)); -/* Another name occasionally used. */ -__MATHCALL (pow10,, (_Mdouble_ __x)); -#endif - -/* Break VALUE into a normalized fraction and an integral power of 2. */ -__MATHCALL (frexp,, (_Mdouble_ __x, int *__exponent)); - -/* X times (two to the EXP power). */ -__MATHCALL (ldexp,, (_Mdouble_ __x, int __exponent)); - -/* Natural logarithm of X. */ -__MATHCALL (log,, (_Mdouble_ __x)); - -/* Base-ten logarithm of X. */ -__MATHCALL (log10,, (_Mdouble_ __x)); - -/* Break VALUE into integral and fractional parts. */ -__MATHCALL (modf,, (_Mdouble_ __x, _Mdouble_ *__iptr)); - -#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC9X -/* Return exp(X) - 1. */ -__MATHCALL (expm1,, (_Mdouble_ __x)); - -/* Return log(1 + X). */ -__MATHCALL (log1p,, (_Mdouble_ __x)); - -/* Return the base 2 signed integral exponent of X. */ -__MATHCALL (logb,, (_Mdouble_ __x)); -#endif - -#ifdef __USE_ISOC9X -/* Compute base-2 exponential of X. */ -__MATHCALL (exp2,, (_Mdouble_ __x)); - -/* Compute base-2 logarithm of X. */ -__MATHCALL (log2,, (_Mdouble_ __x)); -#endif - - -/* Power functions. */ - -/* Return X to the Y power. */ -__MATHCALL (pow,, (_Mdouble_ __x, _Mdouble_ __y)); - -/* Return the square root of X. */ -__MATHCALL (sqrt,, (_Mdouble_ __x)); - -#if defined __USE_MISC || defined __USE_XOPEN || defined __USE_ISOC9X -/* Return `sqrt(X*X + Y*Y)'. */ -__MATHCALL (hypot,, (_Mdouble_ __x, _Mdouble_ __y)); -#endif - -#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC9X -/* Return the cube root of X. */ -__MATHCALL (cbrt,, (_Mdouble_ __x)); -#endif - - -/* Nearest integer, absolute value, and remainder functions. */ - -/* Smallest integral value not less than X. */ -__MATHCALL (ceil,, (_Mdouble_ __x)); - -/* Absolute value of X. */ -__MATHCALLX (fabs,, (_Mdouble_ __x), (__const__)); - -/* Largest integer not greater than X. */ -__MATHCALL (floor,, (_Mdouble_ __x)); - -/* Floating-point modulo remainder of X/Y. */ -__MATHCALL (fmod,, (_Mdouble_ __x, _Mdouble_ __y)); - - -/* Return 0 if VALUE is finite or NaN, +1 if it - is +Infinity, -1 if it is -Infinity. */ -__MATHDECL_1 (int,__isinf,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -/* Return nonzero if VALUE is finite and not NaN. */ -__MATHDECL_1 (int,__finite,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -#ifdef __USE_MISC -/* Return 0 if VALUE is finite or NaN, +1 if it - is +Infinity, -1 if it is -Infinity. */ -__MATHDECL_1 (int,isinf,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -/* Return nonzero if VALUE is finite and not NaN. */ -__MATHDECL_1 (int,finite,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -/* Deal with an infinite or NaN result. - If ERROR is ERANGE, result is +Inf; - if ERROR is - ERANGE, result is -Inf; - otherwise result is NaN. - This will set `errno' to either ERANGE or EDOM, - and may return an infinity or NaN, or may do something else. */ -__MATHCALLX (infnan,, (int __error), (__const__)); - -/* Return the remainder of X/Y. */ -__MATHCALL (drem,, (_Mdouble_ __x, _Mdouble_ __y)); - - -/* Return the fractional part of X after dividing out `ilogb (X)'. */ -__MATHCALL (significand,, (_Mdouble_ __x)); -#endif /* Use misc. */ - -#if defined __USE_MISC || defined __USE_ISOC9X -/* Return X with its signed changed to Y's. */ -__MATHCALLX (copysign,, (_Mdouble_ __x, _Mdouble_ __y), (__const__)); -#endif - -#ifdef __USE_ISOC9X -/* Return representation of NaN for double type. */ -__MATHCALLX (nan,, (__const char *__tagb), (__const__)); -#endif - - -/* Return nonzero if VALUE is not a number. */ -__MATHDECL_1 (int,__isnan,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -#if defined __USE_MISC || defined __USE_XOPEN -/* Return nonzero if VALUE is not a number. */ -__MATHDECL_1 (int,isnan,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -/* Bessel functions. */ -__MATHCALL (j0,, (_Mdouble_)); -__MATHCALL (j1,, (_Mdouble_)); -__MATHCALL (jn,, (int, _Mdouble_)); -__MATHCALL (y0,, (_Mdouble_)); -__MATHCALL (y1,, (_Mdouble_)); -__MATHCALL (yn,, (int, _Mdouble_)); -#endif - - -#if defined __USE_MISC || defined __USE_XOPEN || defined __USE_ISOC9X -/* Error and gamma functions. */ -__MATHCALL (erf,, (_Mdouble_)); -__MATHCALL (erfc,, (_Mdouble_)); -__MATHCALL (lgamma,, (_Mdouble_)); -__MATHCALL (tgamma,, (_Mdouble_)); -#endif - -#if defined __USE_MISC || defined __USE_XOPEN -/* Obsolete alias for `lgamma'. */ -__MATHCALL (gamma,, (_Mdouble_)); -#endif - -#ifdef __USE_MISC -/* Reentrant version of lgamma. This function uses the global variable - `signgam'. The reentrant version instead takes a pointer and stores - the value through it. */ -__MATHCALL (lgamma,_r, (_Mdouble_, int *__signgamp)); -#endif - - -#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC9X -/* Return the integer nearest X in the direction of the - prevailing rounding mode. */ -__MATHCALL (rint,, (_Mdouble_ __x)); - -/* Return X + epsilon if X < Y, X - epsilon if X > Y. */ -__MATHCALLX (nextafter,, (_Mdouble_ __x, _Mdouble_ __y), (__const__)); -# ifdef __USE_ISOC9X -__MATHCALLX (nexttoward,, (_Mdouble_ __x, long double __y), (__const__)); -# endif - -/* Return the remainder of integer divison X / Y with infinite precision. */ -__MATHCALL (remainder,, (_Mdouble_ __x, _Mdouble_ __y)); - -# if defined __USE_MISC || defined __USE_XOPEN_EXTENDED -/* Return X times (2 to the Nth power). */ -__MATHCALL (scalb,, (_Mdouble_ __x, _Mdouble_ __n)); -# endif - -/* Return X times (2 to the Nth power). */ -__MATHCALL (scalbn,, (_Mdouble_ __x, int __n)); - -/* Return the binary exponent of X, which must be nonzero. */ -__MATHDECL (int,ilogb,, (_Mdouble_ __x)); -#endif - -#ifdef __USE_ISOC9X -/* Return X times (2 to the Nth power). */ -__MATHCALL (scalbln,, (_Mdouble_ __x, long int __n)); - -/* Round X to integral value in floating-point format using current - rounding direction, but do not raise inexact exception. */ -__MATHCALL (nearbyint,, (_Mdouble_ __x)); - -/* Round X to nearest integral value, rounding halfway cases away from - zero. */ -__MATHCALL (round,, (_Mdouble_ __x)); - -/* Round X to the integral value in floating-point format nearest but - not larger in magnitude. */ -__MATHCALLX (trunc,, (_Mdouble_ __x), (__const__)); - -/* Compute remainder of X and Y and put in *QUO a value with sign of x/y - and magnitude congruent `mod 2^n' to the magnitude of the integral - quotient x/y, with n >= 3. */ -__MATHCALL (remquo,, (_Mdouble_ __x, _Mdouble_ __y, int *__quo)); - - -/* Conversion functions. */ - -/* Round X to nearest integral value according to current rounding - direction. */ -__MATHDECL (long int,lrint,, (_Mdouble_ __x)); -__MATHDECL (long long int,llrint,, (_Mdouble_ __x)); - -/* Round X to nearest integral value, rounding halfway cases away from - zero. */ -__MATHDECL (long int,lround,, (_Mdouble_ __x)); -__MATHDECL (long long int,llround,, (_Mdouble_ __x)); - - -/* Return positive difference between X and Y. */ -__MATHCALL (fdim,, (_Mdouble_ __x, _Mdouble_ __y)); - -/* Return maximum numeric value from X and Y. */ -__MATHCALL (fmax,, (_Mdouble_ __x, _Mdouble_ __y)); - -/* Return minimum numeric value from X and Y. */ -__MATHCALL (fmin,, (_Mdouble_ __x, _Mdouble_ __y)); - - -/* Classify given number. */ -__MATHDECL_1 (int, __fpclassify,, (_Mdouble_ __value)) - __attribute__ ((__const__)); - -/* Test for negative number. */ -__MATHDECL_1 (int, __signbit,, (_Mdouble_ __value)) - __attribute__ ((__const__)); - - -/* Multiply-add function computed as a ternary operation. */ -__MATHCALL (fma,, (_Mdouble_ __x, _Mdouble_ __y, _Mdouble_ __z)); -#endif /* Use ISO C 9X. */ diff --git a/libc/sysdeps/linux/h8300/bits/mathdef.h b/libc/sysdeps/linux/h8300/bits/mathdef.h deleted file mode 100644 index a933ac445..000000000 --- a/libc/sysdeps/linux/h8300/bits/mathdef.h +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (C) 1997, 1998, 1999 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#if !defined _MATH_H && !defined _COMPLEX_H -# error "Never use <bits/mathdef.h> directly; include <math.h> instead" -#endif - -#if defined __USE_ISOC9X && defined _MATH_H && !defined _MATH_H_MATHDEF -# define _MATH_H_MATHDEF 1 - -/* The m68k FPUs evaluate all values in the 96 bit floating-point format - which is also available for the user as `long double'. Therefore we - define: */ -typedef long double float_t; /* `float' expressions are evaluated as - `long double'. */ -typedef long double double_t; /* `double' expressions are evaluated as - `long double'. */ - -/* Signal that both types are `long double'. */ -# define FLT_EVAL_METHOD 2 - -/* Define `INFINITY' as value of type `float'. */ -# define INFINITY HUGE_VALF - -/* The values returned by `ilogb' for 0 and NaN respectively. */ -# define FP_ILOGB0 0x80000000 -# define FP_ILOGBNAN 0x7fffffff - -/* Number of decimal digits for the `long double' type. */ -# define DECIMAL_DIG 18 - -#endif /* ISO C99 */ diff --git a/libc/sysdeps/linux/h8300/bits/mathinline.h b/libc/sysdeps/linux/h8300/bits/mathinline.h deleted file mode 100644 index b1e2a75f1..000000000 --- a/libc/sysdeps/linux/h8300/bits/mathinline.h +++ /dev/null @@ -1,525 +0,0 @@ -/* Definitions of inline math functions implemented by the m68881/2. - Copyright (C) 1991, 92, 93, 94, 96, 97, 98 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifdef __GNUC__ - -#ifdef __USE_ISOC9X - -/* ISO C 9X defines some macros to perform unordered comparisons. The - m68k FPU supports this with special opcodes and we should use them. - These must not be inline functions since we have to be able to handle - all floating-point types. */ -# define isgreater(x, y) \ - __extension__ \ - ({ char __result; \ - __asm__ ("fcmp%.x %2,%1; fsogt %0" \ - : "=dm" (__result) : "f" (x), "f" (y)); \ - __result != 0; }) - -# define isgreaterequal(x, y) \ - __extension__ \ - ({ char __result; \ - __asm__ ("fcmp%.x %2,%1; fsoge %0" \ - : "=dm" (__result) : "f" (x), "f" (y)); \ - __result != 0; }) - -# define isless(x, y) \ - __extension__ \ - ({ char __result; \ - __asm__ ("fcmp%.x %2,%1; fsolt %0" \ - : "=dm" (__result) : "f" (x), "f" (y)); \ - __result != 0; }) - -# define islessequal(x, y) \ - __extension__ \ - ({ char __result; \ - __asm__ ("fcmp%.x %2,%1; fsole %0" \ - : "=dm" (__result) : "f" (x), "f" (y)); \ - __result != 0; }) - -# define islessgreater(x, y) \ - __extension__ \ - ({ char __result; \ - __asm__ ("fcmp%.x %2,%1; fsogl %0" \ - : "=dm" (__result) : "f" (x), "f" (y)); \ - __result != 0; }) - -# define isunordered(x, y) \ - __extension__ \ - ({ char __result; \ - __asm__ ("fcmp%.x %2,%1; fsun %0" \ - : "=dm" (__result) : "f" (x), "f" (y)); \ - __result != 0; }) -#endif - - -#if (!defined __NO_MATH_INLINES && defined __OPTIMIZE__) \ - || defined __LIBC_INTERNAL_MATH_INLINES - -#ifdef __LIBC_INTERNAL_MATH_INLINES -/* This is used when defining the functions themselves. Define them with - __ names, and with `static inline' instead of `extern inline' so the - bodies will always be used, never an external function call. */ -# define __m81_u(x) __CONCAT(__,x) -# define __m81_inline static __inline -#else -# define __m81_u(x) x -# ifdef __cplusplus -# define __m81_inline __inline -# else -# define __m81_inline extern __inline -# endif -# define __M81_MATH_INLINES 1 -#endif - -/* Define a const math function. */ -#define __m81_defun(rettype, func, args) \ - __m81_inline rettype __attribute__((__const__)) \ - __m81_u(func) args - -/* Define the three variants of a math function that has a direct - implementation in the m68k fpu. FUNC is the name for C (which will be - suffixed with f and l for the float and long double version, resp). OP - is the name of the fpu operation (without leading f). */ - -#if defined __USE_MISC || defined __USE_ISOC9X -# define __inline_mathop(func, op) \ - __inline_mathop1(double, func, op) \ - __inline_mathop1(float, __CONCAT(func,f), op) \ - __inline_mathop1(long double, __CONCAT(func,l), op) -#else -# define __inline_mathop(func, op) \ - __inline_mathop1(double, func, op) -#endif - -#define __inline_mathop1(float_type,func, op) \ - __m81_defun (float_type, func, (float_type __mathop_x)) \ - { \ - float_type __result; \ - __asm("f" __STRING(op) "%.x %1, %0" : "=f" (__result) : "f" (__mathop_x));\ - return __result; \ - } - -#ifdef __LIBC_INTERNAL_MATH_INLINES -/* ieee style elementary functions */ -/* These are internal to the implementation of libm. */ -__inline_mathop(__ieee754_acos, acos) -__inline_mathop(__ieee754_asin, asin) -__inline_mathop(__ieee754_cosh, cosh) -__inline_mathop(__ieee754_sinh, sinh) -__inline_mathop(__ieee754_exp, etox) -__inline_mathop(__ieee754_exp2, twotox) -__inline_mathop(__ieee754_exp10, tentox) -__inline_mathop(__ieee754_log10, log10) -__inline_mathop(__ieee754_log, logn) -__inline_mathop(__ieee754_sqrt, sqrt) -__inline_mathop(__ieee754_atanh, atanh) -#endif - -__inline_mathop(__atan, atan) -__inline_mathop(__cos, cos) -__inline_mathop(__sin, sin) -__inline_mathop(__tan, tan) -__inline_mathop(__tanh, tanh) -__inline_mathop(__fabs, abs) - -#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC9X -__inline_mathop(__rint, int) -__inline_mathop(__expm1, etoxm1) -__inline_mathop(__log1p, lognp1) -#endif - -#ifdef __USE_MISC -__inline_mathop(__significand, getman) -#endif - -#ifdef __USE_ISOC9X -__inline_mathop(__log2, log2) -__inline_mathop(__trunc, intrz) -#endif - -#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__ - -__inline_mathop(atan, atan) -__inline_mathop(cos, cos) -__inline_mathop(sin, sin) -__inline_mathop(tan, tan) -__inline_mathop(tanh, tanh) - -# if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC9X -__inline_mathop(rint, int) -__inline_mathop(expm1, etoxm1) -__inline_mathop(log1p, lognp1) -# endif - -# ifdef __USE_MISC -__inline_mathop(significand, getman) -# endif - -# ifdef __USE_ISOC9X -__inline_mathop(log2, log2) -__inline_mathop(trunc, intrz) -# endif - -#endif /* !__NO_MATH_INLINES && __OPTIMIZE__ */ - -/* This macro contains the definition for the rest of the inline - functions, using __FLOAT_TYPE as the domain type and __S as the suffix - for the function names. */ - -#ifdef __LIBC_INTERNAL_MATH_INLINES -/* Internally used functions. */ -# define __internal_inline_functions(float_type, s) \ -__m81_defun (float_type, __CONCAT(__ieee754_remainder,s), \ - (float_type __x, float_type __y)) \ -{ \ - float_type __result; \ - __asm("frem%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); \ - return __result; \ -} \ - \ -__m81_defun (float_type, __CONCAT(__ieee754_fmod,s), \ - (float_type __x, float_type __y)) \ -{ \ - float_type __result; \ - __asm("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); \ - return __result; \ -} - -__internal_inline_functions (double,) -__internal_inline_functions (float,f) -__internal_inline_functions (long double,l) -# undef __internal_inline_functions - -/* Get the m68881 condition codes, to quickly check multiple conditions. */ -static __inline__ unsigned long -__m81_test (long double __val) -{ - unsigned long __fpsr; - __asm ("ftst%.x %1; fmove%.l %/fpsr,%0" : "=dm" (__fpsr) : "f" (__val)); - return __fpsr; -} - -/* Bit values returned by __m81_test. */ -# define __M81_COND_NAN (1 << 24) -# define __M81_COND_INF (2 << 24) -# define __M81_COND_ZERO (4 << 24) -# define __M81_COND_NEG (8 << 24) - -#endif /* __LIBC_INTENRAL_MATH_INLINES */ - -/* The rest of the functions are available to the user. */ - -#define __inline_functions(float_type, s) \ -__m81_inline float_type \ -__m81_u(__CONCAT(__frexp,s))(float_type __value, int *__expptr) \ -{ \ - float_type __mantissa, __exponent; \ - int __iexponent; \ - unsigned long __fpsr; \ - __asm("ftst%.x %1\n" \ - "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \ - if (__fpsr & (7 << 24)) \ - { \ - /* Not finite or zero. */ \ - *__expptr = 0; \ - return __value; \ - } \ - __asm("fgetexp%.x %1, %0" : "=f" (__exponent) : "f" (__value)); \ - __iexponent = (int) __exponent + 1; \ - *__expptr = __iexponent; \ - __asm("fscale%.l %2, %0" : "=f" (__mantissa) \ - : "0" (__value), "dmi" (-__iexponent)); \ - return __mantissa; \ -} \ - \ -__m81_defun (float_type, __CONCAT(__floor,s), (float_type __x)) \ -{ \ - float_type __result; \ - unsigned long int __ctrl_reg; \ - __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); \ - /* Set rounding towards negative infinity. */ \ - __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \ - : "dmi" ((__ctrl_reg & ~0x10) | 0x20)); \ - /* Convert X to an integer, using -Inf rounding. */ \ - __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); \ - /* Restore the previous rounding mode. */ \ - __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \ - : "dmi" (__ctrl_reg)); \ - return __result; \ -} \ - \ -__m81_defun (float_type, __CONCAT(__ceil,s), (float_type __x)) \ -{ \ - float_type __result; \ - unsigned long int __ctrl_reg; \ - __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); \ - /* Set rounding towards positive infinity. */ \ - __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \ - : "dmi" (__ctrl_reg | 0x30)); \ - /* Convert X to an integer, using +Inf rounding. */ \ - __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); \ - /* Restore the previous rounding mode. */ \ - __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \ - : "dmi" (__ctrl_reg)); \ - return __result; \ -} - -__inline_functions(double,) -#if defined __USE_MISC || defined __USE_ISOC9X -__inline_functions(float,f) -__inline_functions(long double,l) -#endif -#undef __inline_functions - -#ifdef __USE_MISC - -# define __inline_functions(float_type, s) \ -__m81_defun (int, __CONCAT(__isinf,s), (float_type __value)) \ -{ \ - /* There is no branch-condition for infinity, \ - so we must extract and examine the condition codes manually. */ \ - unsigned long int __fpsr; \ - __asm("ftst%.x %1\n" \ - "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \ - return (__fpsr & (2 << 24)) ? (__fpsr & (8 << 24) ? -1 : 1) : 0; \ -} \ - \ -__m81_defun (int, __CONCAT(__finite,s), (float_type __value)) \ -{ \ - /* There is no branch-condition for infinity, so we must extract and \ - examine the condition codes manually. */ \ - unsigned long int __fpsr; \ - __asm ("ftst%.x %1\n" \ - "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \ - return (__fpsr & (3 << 24)) == 0; \ -} \ - \ -__m81_defun (float_type, __CONCAT(__scalbn,s), \ - (float_type __x, int __n)) \ -{ \ - float_type __result; \ - __asm ("fscale%.l %1, %0" : "=f" (__result) : "dmi" (__n), "0" (__x)); \ - return __result; \ -} - -__inline_functions(double,) -__inline_functions(float,f) -__inline_functions(long double,l) -# undef __inline_functions - -#endif /* Use misc. */ - -#if defined __USE_MISC || defined __USE_XOPEN - -# define __inline_functions(float_type, s) \ -__m81_defun (int, __CONCAT(__isnan,s), (float_type __value)) \ -{ \ - char __result; \ - __asm("ftst%.x %1\n" \ - "fsun %0" : "=dm" (__result) : "f" (__value)); \ - return __result; \ -} - -__inline_functions(double,) -# ifdef __USE_MISC -__inline_functions(float,f) -__inline_functions(long double,l) -# endif -# undef __inline_functions - -#endif - -#ifdef __USE_ISOC9X - -# define __inline_functions(float_type, s) \ -__m81_defun (int, __CONCAT(__signbit,s), (float_type __value)) \ -{ \ - /* There is no branch-condition for the sign bit, so we must extract \ - and examine the condition codes manually. */ \ - unsigned long int __fpsr; \ - __asm ("ftst%.x %1\n" \ - "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \ - return (__fpsr >> 27) & 1; \ -} \ - \ -__m81_defun (float_type, __CONCAT(__scalbln,s), \ - (float_type __x, long int __n)) \ -{ \ - return __CONCAT(__scalbn,s) (__x, __n); \ -} \ - \ -__m81_defun (float_type, __CONCAT(__nearbyint,s), (float_type __x)) \ -{ \ - float_type __result; \ - unsigned long int __ctrl_reg; \ - __asm __volatile__ ("fmove%.l %!, %0" : "=dm" (__ctrl_reg)); \ - /* Temporarily disable the inexact exception. */ \ - __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \ - : "dmi" (__ctrl_reg & ~0x200)); \ - __asm __volatile__ ("fint%.x %1, %0" : "=f" (__result) : "f" (__x)); \ - __asm __volatile__ ("fmove%.l %0, %!" : /* No outputs. */ \ - : "dmi" (__ctrl_reg)); \ - return __result; \ -} \ - \ -__m81_defun (long int, __CONCAT(__lrint,s), (float_type __x)) \ -{ \ - long int __result; \ - __asm ("fmove%.l %1, %0" : "=dm" (__result) : "f" (__x)); \ - return __result; \ -} \ - \ -__m81_inline float_type \ -__m81_u(__CONCAT(__fma,s))(float_type __x, float_type __y, \ - float_type __z) \ -{ \ - return (__x * __y) + __z; \ -} - -__inline_functions (double,) -__inline_functions (float,f) -__inline_functions (long double,l) -# undef __inline_functions - -#endif /* Use ISO C9x */ - -#ifdef __USE_GNU - -# define __inline_functions(float_type, s) \ -__m81_inline void \ -__m81_u(__CONCAT(__sincos,s))(float_type __x, float_type *__sinx, \ - float_type *__cosx) \ -{ \ - __asm ("fsincos%.x %2,%1:%0" \ - : "=f" (*__sinx), "=f" (*__cosx) : "f" (__x)); \ -} - -__inline_functions (double,) -__inline_functions (float,f) -__inline_functions (long double,l) -# undef __inline_functions - -#endif - -#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__ - -/* Define inline versions of the user visible functions. */ - -/* Note that there must be no whitespace before the argument passed for - NAME, to make token pasting work correctly with -traditional. */ -# define __inline_forward_c(rettype, name, args1, args2) \ -extern __inline rettype __attribute__((__const__)) \ -name args1 \ -{ \ - return __CONCAT(__,name) args2; \ -} - -# define __inline_forward(rettype, name, args1, args2) \ -extern __inline rettype name args1 \ -{ \ - return __CONCAT(__,name) args2; \ -} - -__inline_forward(double,frexp, (double __value, int *__expptr), - (__value, __expptr)) -__inline_forward_c(double,floor, (double __x), (__x)) -__inline_forward_c(double,ceil, (double __x), (__x)) -# ifdef __USE_MISC -# ifndef __USE_ISOC9X /* Conflict with macro of same name. */ -__inline_forward_c(int,isinf, (double __value), (__value)) -# endif -__inline_forward_c(int,finite, (double __value), (__value)) -__inline_forward_c(double,scalbn, (double __x, int __n), (__x, __n)) -# endif -# if defined __USE_MISC || defined __USE_XOPEN -# ifndef __USE_ISOC9X /* Conflict with macro of same name. */ -__inline_forward_c(int,isnan, (double __value), (__value)) -# endif -# endif -# ifdef __USE_ISOC9X -__inline_forward_c(double,scalbln, (double __x, long int __n), (__x, __n)) -__inline_forward_c(double,nearbyint, (double __value), (__value)) -__inline_forward_c(long int,lrint, (double __value), (__value)) -__inline_forward_c(double,fma, (double __x, double __y, double __z), - (__x, __y, __z)) -# endif -# ifdef __USE_GNU -__inline_forward(void,sincos, (double __x, double *__sinx, double *__cosx), - (__x, __sinx, __cosx)) -# endif - -# if defined __USE_MISC || defined __USE_ISOC9X - -__inline_forward(float,frexpf, (float __value, int *__expptr), - (__value, __expptr)) -__inline_forward_c(float,floorf, (float __x), (__x)) -__inline_forward_c(float,ceilf, (float __x), (__x)) -# ifdef __USE_MISC -__inline_forward_c(int,isinff, (float __value), (__value)) -__inline_forward_c(int,finitef, (float __value), (__value)) -__inline_forward_c(float,scalbnf, (float __x, int __n), (__x, __n)) -__inline_forward_c(int,isnanf, (float __value), (__value)) -# endif -# ifdef __USE_ISOC9X -__inline_forward_c(float,scalblnf, (float __x, long int __n), (__x, __n)) -__inline_forward_c(float,nearbyintf, (float __value), (__value)) -__inline_forward_c(long int,lrintf, (float __value), (__value)) -__inline_forward_c(float,fmaf, (float __x, float __y, float __z), - (__x, __y, __z)) -# endif -# ifdef __USE_GNU -__inline_forward(void,sincosf, (float __x, float *__sinx, float *__cosx), - (__x, __sinx, __cosx)) -# endif - -__inline_forward(long double,frexpl, (long double __value, int *__expptr), - (__value, __expptr)) -__inline_forward_c(long double,floorl, (long double __x), (__x)) -__inline_forward_c(long double,ceill, (long double __x), (__x)) -# ifdef __USE_MISC -__inline_forward_c(int,isinfl, (long double __value), (__value)) -__inline_forward_c(int,finitel, (long double __value), (__value)) -__inline_forward_c(long double,scalbnl, (long double __x, int __n), (__x, __n)) -__inline_forward_c(int,isnanl, (long double __value), (__value)) -# endif -# ifdef __USE_ISOC9X -__inline_forward_c(long double,scalblnl, (long double __x, long int __n), - (__x, __n)) -__inline_forward_c(long double,nearbyintl, (long double __value), (__value)) -__inline_forward_c(long int,lrintl, (long double __value), (__value)) -__inline_forward_c(long double,fmal, - (long double __x, long double __y, long double __z), - (__x, __y, __z)) -# endif -# ifdef __USE_GNU -__inline_forward(void,sincosl, - (long double __x, long double *__sinx, long double *__cosx), - (__x, __sinx, __cosx)) -# endif - -#endif /* Use misc or ISO C9X */ - -#undef __inline_forward -#undef __inline_forward_c - -#endif /* !__NO_MATH_INLINES && __OPTIMIZE__ */ - -#endif -#endif /* GCC. */ diff --git a/libc/sysdeps/linux/h8300/bits/mman.h b/libc/sysdeps/linux/h8300/bits/mman.h deleted file mode 100644 index bca1dae96..000000000 --- a/libc/sysdeps/linux/h8300/bits/mman.h +++ /dev/null @@ -1,75 +0,0 @@ -/* Definitions for POSIX memory map interface. Linux/m68k version. - Copyright (C) 1997 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _SYS_MMAN_H -# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead." -#endif - -/* The following definitions basically come from the kernel headers. - But the kernel header is not namespace clean. */ - - -/* Protections are chosen from these bits, OR'd together. The - implementation does not necessarily support PROT_EXEC or PROT_WRITE - without PROT_READ. The only guarantees are that no writing will be - allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ - -#define PROT_READ 0x1 /* Page can be read. */ -#define PROT_WRITE 0x2 /* Page can be written. */ -#define PROT_EXEC 0x4 /* Page can be executed. */ -#define PROT_NONE 0x0 /* Page can not be accessed. */ - -/* Sharing types (must choose one and only one of these). */ -#define MAP_SHARED 0x01 /* Share changes. */ -#define MAP_PRIVATE 0x02 /* Changes are private. */ -#ifdef __USE_MISC -# define MAP_TYPE 0x0f /* Mask for type of mapping. */ -#endif - -/* Other flags. */ -#define MAP_FIXED 0x10 /* Interpret addr exactly. */ -#ifdef __USE_MISC -# define MAP_FILE 0 -# define MAP_ANONYMOUS 0x20 /* Don't use a file. */ -# define MAP_ANON MAP_ANONYMOUS -#endif - -/* These are Linux-specific. */ -#ifdef __USE_MISC -# define MAP_GROWSDOWN 0x0100 /* Stack-like segment. */ -# define MAP_DENYWRITE 0x0800 /* ETXTBSY */ -# define MAP_EXECUTABLE 0x1000 /* Mark it as an executable. */ -# define MAP_LOCKED 0x2000 /* Lock the mapping. */ -# define MAP_NORESERVE 0x4000 /* Don't check for reservations. */ -#endif - -/* Flags to `msync'. */ -#define MS_ASYNC 1 /* Sync memory asynchronously. */ -#define MS_SYNC 4 /* Synchronous memory sync. */ -#define MS_INVALIDATE 2 /* Invalidate the caches. */ - -/* Flags for `mlockall'. */ -#define MCL_CURRENT 1 /* Lock all currently mapped pages. */ -#define MCL_FUTURE 2 /* Lock all additions to address - space. */ - -/* Flags for `mremap'. */ -#ifdef __USE_GNU -# define MREMAP_MAYMOVE 1 -#endif diff --git a/libc/sysdeps/linux/h8300/bits/msq.h b/libc/sysdeps/linux/h8300/bits/msq.h deleted file mode 100644 index d7a8e5ee0..000000000 --- a/libc/sysdeps/linux/h8300/bits/msq.h +++ /dev/null @@ -1,70 +0,0 @@ -/* Copyright (C) 1995, 1996, 1997 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _SYS_MSG_H -# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead." -#endif - -#include <sys/types.h> - -/* Define options for message queue functions. */ -#define MSG_NOERROR 010000 /* no error if message is too big */ -#define MSG_EXCEPT 020000 /* recv any msg except of specified type */ - - -/* Structure of record for one message inside the kernel. - The type `struct msg' is opaque. */ -struct msqid_ds -{ - struct ipc_perm msg_perm; /* structure describing operation permission */ - struct msg *__msg_first; /* pointer to first message on queue */ - struct msg *__msg_last; /* pointer to last message on queue */ - __time_t msg_stime; /* time of last msgsnd command */ - __time_t msg_rtime; /* time of last msgrcv command */ - __time_t msg_ctime; /* time of last change */ - struct wait_queue *__wwait; /* ??? */ - struct wait_queue *__rwait; /* ??? */ - unsigned short int __msg_cbytes;/* current number of bytes on queue */ - unsigned short int msg_qnum; /* number of messages currently on queue */ - unsigned short int msg_qbytes;/* max number of bytes allowed on queue */ - __ipc_pid_t msg_lspid; /* pid of last msgsnd() */ - __ipc_pid_t msg_lrpid; /* pid of last msgrcv() */ -}; - -#ifdef __USE_MISC - -# define msg_cbytes __msg_cbytes - -/* ipcs ctl commands */ -# define MSG_STAT 11 -# define MSG_INFO 12 - -/* buffer for msgctl calls IPC_INFO, MSG_INFO */ -struct msginfo - { - int msgpool; - int msgmap; - int msgmax; - int msgmnb; - int msgmni; - int msgssz; - int msgtql; - unsigned short int msgseg; - }; - -#endif /* __USE_MISC */ diff --git a/libc/sysdeps/linux/h8300/bits/nan.h b/libc/sysdeps/linux/h8300/bits/nan.h deleted file mode 100644 index fbabd7e29..000000000 --- a/libc/sysdeps/linux/h8300/bits/nan.h +++ /dev/null @@ -1,48 +0,0 @@ -/* `NAN' constant for IEEE 754 machines. - Copyright (C) 1992, 1996, 1997, 1999 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _MATH_H -# error "Never use <bits/nan.h> directly; include <math.h> instead." -#endif - - -/* IEEE Not A Number. */ - -#ifdef __GNUC__ - -# define NAN \ - (__extension__ \ - ((union { unsigned __l __attribute__((__mode__(__SI__))); float __d; }) \ - { __l: 0x7fc00000UL }).__d) - -#else - -# include <endian.h> - -# if __BYTE_ORDER == __BIG_ENDIAN -# define __nan_bytes { 0x7f, 0xc0, 0, 0 } -# endif -# if __BYTE_ORDER == __LITTLE_ENDIAN -# define __nan_bytes { 0, 0, 0xc0, 0x7f } -# endif - -static union { unsigned char __c[4]; float __d; } __nan_union = { __nan_bytes }; -# define NAN (__nan_union.__d) - -#endif /* GCC. */ diff --git a/libc/sysdeps/linux/h8300/bits/netdb.h b/libc/sysdeps/linux/h8300/bits/netdb.h deleted file mode 100644 index 41dc73193..000000000 --- a/libc/sysdeps/linux/h8300/bits/netdb.h +++ /dev/null @@ -1,33 +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. */ - -#ifndef _NETDB_H -# error "Never include <bits/netdb.h> directly; use <netdb.h> instead." -#endif - - -/* Description of data base entry for a single network. NOTE: here a - poor assumption is made. The network number is expected to fit - into an unsigned long int variable. */ -struct netent -{ - char *n_name; /* Official name of network. */ - char **n_aliases; /* Alias list. */ - int n_addrtype; /* Net address type. */ - uint32_t n_net; /* Network number. */ -}; diff --git a/libc/sysdeps/linux/h8300/bits/poll.h b/libc/sysdeps/linux/h8300/bits/poll.h deleted file mode 100644 index 4aec021fe..000000000 --- a/libc/sysdeps/linux/h8300/bits/poll.h +++ /dev/null @@ -1,51 +0,0 @@ -/* Copyright (C) 1997 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _SYS_POLL_H -# error "Never use <bits/poll.h> directly; include <sys/poll.h> instead." -#endif - -/* Event types that can be polled for. These bits may be set in `events' - to indicate the interesting event types; they will appear in `revents' - to indicate the status of the file descriptor. */ -#define POLLIN 0x001 /* There is data to read. */ -#define POLLPRI 0x002 /* There is urgent data to read. */ -#define POLLOUT 0x004 /* Writing now will not block. */ - -#ifdef __USE_XOPEN -/* These values are defined in XPG4.2. */ -# define POLLRDNORM 0x040 /* Normal data may be read. */ -# define POLLRDBAND 0x080 /* Priority data may be read. */ -# define POLLWRNORM 0x100 /* Writing now will not block. */ -# define POLLWRBAND 0x200 /* Priority data may be written. */ -#endif - -#ifdef __USE_GNU -/* This is an extension for Linux. */ -# define POLLMSG 0x400 -#endif - -/* Event types always implicitly polled for. These bits need not be set in - `events', but they will appear in `revents' to indicate the status of - the file descriptor. */ -#define POLLERR 0x008 /* Error condition. */ -#define POLLHUP 0x010 /* Hung up. */ -#define POLLNVAL 0x020 /* Invalid polling request. */ - -/* Canonical number of polling requests to read in at a time in poll. */ -#define NPOLLFILE 30 diff --git a/libc/sysdeps/linux/h8300/bits/posix1_lim.h b/libc/sysdeps/linux/h8300/bits/posix1_lim.h deleted file mode 100644 index ee84b94a7..000000000 --- a/libc/sysdeps/linux/h8300/bits/posix1_lim.h +++ /dev/null @@ -1,141 +0,0 @@ -/* Copyright (C) 1991, 1992, 1993, 1996, 1998 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* - * POSIX Standard: 2.9.2 Minimum Values Added to <limits.h> - * - * Never include this file directly; use <limits.h> instead. - */ - -#ifndef _BITS_POSIX1_LIM_H -#define _BITS_POSIX1_LIM_H 1 - - -/* These are the standard-mandated minimum values. */ - -/* Minimum number of operations in one list I/O call. */ -#define _POSIX_AIO_LISTIO_MAX 2 - -/* Minimal number of outstanding asynchronous I/O operations. */ -#define _POSIX_AIO_MAX 1 - -/* Maximum length of arguments to `execve', including environment. */ -#define _POSIX_ARG_MAX 4096 - -/* Maximum simultaneous processes per real user ID. */ -#define _POSIX_CHILD_MAX 6 - -/* Minimal number of timer expiration overruns. */ -#define _POSIX_DELAYTIMER_MAX 32 - -/* Maximum link count of a file. */ -#define _POSIX_LINK_MAX 8 - -/* Number of bytes in a terminal canonical input queue. */ -#define _POSIX_MAX_CANON 255 - -/* Number of bytes for which space will be - available in a terminal input queue. */ -#define _POSIX_MAX_INPUT 255 - -/* Maximum number of message queues open for a process. */ -#define _POSIX_MQ_OPEN_MAX 8 - -/* Maximum number of supported message priorities. */ -#define _POSIX_MQ_PRIO_MAX 32 - -/* Number of simultaneous supplementary group IDs per process. */ -#define _POSIX_NGROUPS_MAX 0 - -/* Number of files one process can have open at once. */ -#define _POSIX_OPEN_MAX 16 - -/* Number of descriptors that a process may examine with `pselect' or - `select'. */ -#define _POSIX_FD_SETSIZE _POSIX_OPEN_MAX - -/* Number of bytes in a filename. */ -#define _POSIX_NAME_MAX 14 - -/* Number of bytes in a pathname. */ -#define _POSIX_PATH_MAX 255 - -/* Number of bytes than can be written atomically to a pipe. */ -#define _POSIX_PIPE_BUF 512 - -/* Minimal number of realtime signals reserved for the application. */ -#define _POSIX_RTSIG_MAX 8 - -/* Number of semaphores a process can have. */ -#define _POSIX_SEM_NSEMS_MAX 256 - -/* Maximal value of a semaphore. */ -#define _POSIX_SEM_VALUE_MAX 32767 - -/* Number of pending realtime signals. */ -#define _POSIX_SIGQUEUE_MAX 32 - -/* Largest value of a `ssize_t'. */ -#define _POSIX_SSIZE_MAX 32767 - -/* Number of streams a process can have open at once. */ -#define _POSIX_STREAM_MAX 8 - -/* Maximum length of a timezone name (element of `tzname'). */ -#define _POSIX_TZNAME_MAX 3 - -/* Maximum number of connections that can be queued on a socket. */ -#define _POSIX_QLIMIT 1 - -/* Maximum number of bytes that can be buffered on a socket for send - or receive. */ -#define _POSIX_HIWAT _POSIX_PIPE_BUF - -/* Maximum number of elements in an `iovec' array. */ -#define _POSIX_UIO_MAXIOV 16 - -/* Maximum number of characters in a tty name. */ -#define _POSIX_TTY_NAME_MAX 9 - -/* Number of timer for a process. */ -#define _POSIX_TIMER_MAX 32 - -/* Maximum length of login name. */ -#define _POSIX_LOGIN_NAME_MAX 9 - -/* Maximum clock resolution in nanoseconds. */ -#define _POSIX_CLOCKRES_MIN 20000000 - - -/* Get the implementation-specific values for the above. */ -#include <bits/local_lim.h> - - -#ifndef SSIZE_MAX -# define SSIZE_MAX INT_MAX -#endif - - -/* This value is a guaranteed minimum maximum. - The current maximum can be got from `sysconf'. */ - -#ifndef NGROUPS_MAX -# define NGROUPS_MAX _POSIX_NGROUPS_MAX -#endif - -#endif /* bits/posix1_lim.h */ diff --git a/libc/sysdeps/linux/h8300/bits/posix2_lim.h b/libc/sysdeps/linux/h8300/bits/posix2_lim.h deleted file mode 100644 index eaaf67129..000000000 --- a/libc/sysdeps/linux/h8300/bits/posix2_lim.h +++ /dev/null @@ -1,100 +0,0 @@ -/* Copyright (C) 1991, 1996, 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* - * Never include this file directly; include <limits.h> instead. - */ - -#ifndef _BITS_POSIX2_LIM_H -#define _BITS_POSIX2_LIM_H 1 - - -/* The maximum `ibase' and `obase' values allowed by the `bc' utility. */ -#define _POSIX2_BC_BASE_MAX 99 - -/* The maximum number of elements allowed in an array by the `bc' utility. */ -#define _POSIX2_BC_DIM_MAX 2048 - -/* The maximum `scale' value allowed by the `bc' utility. */ -#define _POSIX2_BC_SCALE_MAX 99 - -/* The maximum length of a string constant accepted by the `bc' utility. */ -#define _POSIX2_BC_STRING_MAX 1000 - -/* The maximum number of weights that can be assigned to an entry of - the LC_COLLATE `order' keyword in the locale definition file. - We have no fixed limit, 255 is very high. */ -#define _POSIX2_COLL_WEIGHTS_MAX 255 - -/* The maximum number of weights that can be assigned to an entry of - the LC_COLLATE category `order' keyword in a locale definition. - We have no fixed limit, 255 is a high number. */ -#define _POSIX2_EQUIV_CLASS_MAX 255 - -/* The maximum number of expressions that can be nested - within parentheses by the `expr' utility. */ -#define _POSIX2_EXPR_NEST_MAX 32 - -/* The maximum length, in bytes, of an input line. */ -#define _POSIX2_LINE_MAX 2048 - -/* The maximum number of repeated occurrences of a regular expression - permitted when using the interval notation `\{M,N\}'. */ -#define _POSIX2_RE_DUP_MAX 255 - -/* The maximum number of bytes in a character class name. We have no - fixed limit, 2048 is a high number. */ -#define _POSIX2_CHARCLASS_NAME_MAX 2048 - - -/* These values are implementation-specific, - and may vary within the implementation. - Their precise values can be obtained from sysconf. */ - -#ifndef BC_BASE_MAX -#define BC_BASE_MAX _POSIX2_BC_BASE_MAX -#endif -#ifndef BC_DIM_MAX -#define BC_DIM_MAX _POSIX2_BC_DIM_MAX -#endif -#ifndef BC_SCALE_MAX -#define BC_SCALE_MAX _POSIX2_BC_SCALE_MAX -#endif -#ifndef BC_STRING_MAX -#define BC_STRING_MAX _POSIX2_BC_STRING_MAX -#endif -#ifndef COLL_WEIGHTS_MAX -#define COLL_WEIGHTS_MAX _POSIX2_COLL_WEIGHTS_MAX -#endif -#ifndef EQUIV_CLASS_MAX -#define EQUIV_CLASS_MAX _POSIX2_EQUIV_CLASS_MAX -#endif -#ifndef EXPR_NEST_MAX -#define EXPR_NEST_MAX _POSIX2_EXPR_NEST_MAX -#endif -#ifndef LINE_MAX -#define LINE_MAX _POSIX2_LINE_MAX -#endif -#ifndef CHARCLASS_NAME_MAX -#define CHARCLASS_NAME_MAX _POSIX2_CHARCLASS_NAME_MAX -#endif - -/* This value is defined like this in regex.h. */ -#define RE_DUP_MAX (0x7fff) - -#endif /* bits/posix2_lim.h */ diff --git a/libc/sysdeps/linux/h8300/bits/posix_opt.h b/libc/sysdeps/linux/h8300/bits/posix_opt.h deleted file mode 100644 index ff3453182..000000000 --- a/libc/sysdeps/linux/h8300/bits/posix_opt.h +++ /dev/null @@ -1,110 +0,0 @@ -/* Define POSIX options for Linux. - Copyright (C) 1996, 1997, 1998, 1999 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _POSIX_OPT_H -#define _POSIX_OPT_H 1 - -/* Job control is supported. */ -#define _POSIX_JOB_CONTROL 1 - -/* Processes have a saved set-user-ID and a saved set-group-ID. */ -#define _POSIX_SAVED_IDS 1 - -/* Priority scheduling is supported. */ -#define _POSIX_PRIORITY_SCHEDULING 1 - -/* Synchronizing file data is supported. */ -#define _POSIX_SYNCHRONIZED_IO 1 - -/* The fsync function is present. */ -#define _POSIX_FSYNC 1 - -/* Mapping of files to memory is supported. */ -#define _POSIX_MAPPED_FILES 1 - -/* Locking of all memory is supported. */ -#define _POSIX_MEMLOCK 1 - -/* Locking of ranges of memory is supported. */ -#define _POSIX_MEMLOCK_RANGE 1 - -/* Setting of memory protections is supported. */ -#define _POSIX_MEMORY_PROTECTION 1 - -/* Implementation supports `poll' function. */ -#define _POSIX_POLL 1 - -/* Implementation supports `select' and `pselect' functions. */ -#define _POSIX_SELECT 1 - -/* Only root can change owner of file. */ -#define _POSIX_CHOWN_RESTRICTED 1 - -/* `c_cc' member of 'struct termios' structure can be disabled by - using the value _POSIX_VDISABLE. */ -#define _POSIX_VDISABLE '\0' - -/* Filenames are not silently truncated. */ -#define _POSIX_NO_TRUNC 1 - -/* X/Open realtime support is available. */ -#define _XOPEN_REALTIME 1 - -/* X/Open realtime thread support is available. */ -#undef _XOPEN_REALTIME_THREADS - -/* XPG4.2 shared memory is supported. */ -#define _XOPEN_SHM 1 - -/* Tell we have POSIX threads. */ -#undef _POSIX_THREADS - -/* We have the reentrant functions described in POSIX. */ -#define _POSIX_REENTRANT_FUNCTIONS 1 -#define _POSIX_THREAD_SAFE_FUNCTIONS 1 - -/* We provide priority scheduling for threads. */ -#define _POSIX_THREAD_PRIORITY_SCHEDULING 1 - -/* We support user-defined stack sizes. */ -#define _POSIX_THREAD_ATTR_STACKSIZE 1 - -/* We support user-defined stacks. */ -#define _POSIX_THREAD_ATTR_STACKADDR 1 - -/* We support POSIX.1b semaphores, but only the non-shared form for now. */ -/*#define _POSIX_SEMAPHORES 1 XXX We are not quite there now. */ - -/* Real-time signals are supported. */ -#define _POSIX_REALTIME_SIGNALS 1 - -/* We support asynchronous I/O. */ -#define _POSIX_ASYNCHRONOUS_IO 1 -/* Alternative name for Unix98. */ -#define _LFS_ASYNCHRONOUS_IO 1 - -/* The LFS support in asynchronous I/O is also available. */ -#define _LFS64_ASYNCHRONOUS_IO 1 - -/* The rest of the LFS is also available. */ -#define _LFS_LARGEFILE 1 -#define _LFS64_LARGEFILE 1 -#define _LFS64_STDIO 1 - -#endif /* posix_opt.h */ diff --git a/libc/sysdeps/linux/h8300/bits/pthreadtypes.h b/libc/sysdeps/linux/h8300/bits/pthreadtypes.h deleted file mode 100644 index db4c3790c..000000000 --- a/libc/sysdeps/linux/h8300/bits/pthreadtypes.h +++ /dev/null @@ -1,122 +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. */ - -#if !defined _BITS_TYPES_H && !defined _PTHREAD_H -# error "Never include <bits/pthreadtypes.h> directly; use <sys/types.h> instead." -#endif - -#ifndef _BITS_PTHREADTYPES_H -#define _BITS_PTHREADTYPES_H 1 - -#define __need_schedparam -#include <bits/sched.h> - -/* Fast locks (not abstract because mutexes and conditions aren't abstract). */ -struct _pthread_fastlock -{ - long int __status; /* "Free" or "taken" or head of waiting list */ - int __spinlock; /* For compare-and-swap emulation */ -}; - -#ifndef _PTHREAD_DESCR_DEFINED -/* Thread descriptors */ -typedef struct _pthread_descr_struct *_pthread_descr; -# define _PTHREAD_DESCR_DEFINED -#endif - - -/* Attributes for threads. */ -typedef struct -{ - int __detachstate; - int __schedpolicy; - struct __sched_param __schedparam; - int __inheritsched; - int __scope; - size_t __guardsize; - int __stackaddr_set; - void *__stackaddr; - size_t __stacksize; -} pthread_attr_t; - - -/* Conditions (not abstract because of PTHREAD_COND_INITIALIZER */ -typedef struct -{ - struct _pthread_fastlock __c_lock; /* Protect against concurrent access */ - _pthread_descr __c_waiting; /* Threads waiting on this condition */ -} pthread_cond_t; - - -/* Attribute for conditionally variables. */ -typedef struct -{ - int __dummy; -} pthread_condattr_t; - -/* Keys for thread-specific data */ -typedef unsigned int pthread_key_t; - - -/* Mutexes (not abstract because of PTHREAD_MUTEX_INITIALIZER). */ -/* (The layout is unnatural to maintain binary compatibility - with earlier releases of LinuxThreads.) */ -typedef struct -{ - int __m_reserved; /* Reserved for future use */ - int __m_count; /* Depth of recursive locking */ - _pthread_descr __m_owner; /* Owner thread (if recursive or errcheck) */ - int __m_kind; /* Mutex kind: fast, recursive or errcheck */ - struct _pthread_fastlock __m_lock; /* Underlying fast lock */ -} pthread_mutex_t; - - -/* Attribute for mutex. */ -typedef struct -{ - int __mutexkind; -} pthread_mutexattr_t; - - -/* Once-only execution */ -typedef int pthread_once_t; - - -#ifdef __USE_UNIX98 -/* Read-write locks. */ -typedef struct _pthread_rwlock_t -{ - struct _pthread_fastlock __rw_lock; /* Lock to guarantee mutual exclusion */ - int __rw_readers; /* Number of readers */ - _pthread_descr __rw_writer; /* Identity of writer, or NULL if none */ - _pthread_descr __rw_read_waiting; /* Threads waiting for reading */ - _pthread_descr __rw_write_waiting; /* Threads waiting for writing */ - int __rw_kind; /* Reader/Writer preference selection */ - int __rw_pshared; /* Shared between processes or not */ -} pthread_rwlock_t; - - -/* Attribute for read-write locks. */ -typedef struct -{ - int __lockkind; - int __pshared; -} pthread_rwlockattr_t; -#endif - - -/* Thread identifiers */ -typedef unsigned long int pthread_t; - -#endif /* bits/pthreadtypes.h */ diff --git a/libc/sysdeps/linux/h8300/bits/resource.h b/libc/sysdeps/linux/h8300/bits/resource.h deleted file mode 100644 index 50c659389..000000000 --- a/libc/sysdeps/linux/h8300/bits/resource.h +++ /dev/null @@ -1,204 +0,0 @@ -/* Bit values & structures for resource limits. Linux version. - Copyright (C) 1994, 1996, 1997, 1998, 1999 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _SYS_RESOURCE_H -# error "Never use <bits/resource.h> directly; include <sys/resource.h> instead." -#endif - -#include <bits/types.h> - -/* Transmute defines to enumerations. The macro re-definitions are - necessary because some programs want to test for operating system - features with #ifdef RUSAGE_SELF. In ISO C the reflexive - definition is a no-op. */ - -/* Kinds of resource limit. */ -enum __rlimit_resource -{ - /* Per-process CPU limit, in seconds. */ - RLIMIT_CPU = 0, -#define RLIMIT_CPU RLIMIT_CPU - - /* Largest file that can be created, in bytes. */ - RLIMIT_FSIZE = 1, -#define RLIMIT_FSIZE RLIMIT_FSIZE - - /* Maximum size of data segment, in bytes. */ - RLIMIT_DATA = 2, -#define RLIMIT_DATA RLIMIT_DATA - - /* Maximum size of stack segment, in bytes. */ - RLIMIT_STACK = 3, -#define RLIMIT_STACK RLIMIT_STACK - - /* Largest core file that can be created, in bytes. */ - RLIMIT_CORE = 4, -#define RLIMIT_CORE RLIMIT_CORE - - /* Largest resident set size, in bytes. - This affects swapping; processes that are exceeding their - resident set size will be more likely to have physical memory - taken from them. */ - RLIMIT_RSS = 5, -#define RLIMIT_RSS RLIMIT_RSS - - /* Number of open files. */ - RLIMIT_NOFILE = 7, - RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */ -#define RLIMIT_NOFILE RLIMIT_NOFILE -#define RLIMIT_OFILE RLIMIT_OFILE - - /* Address space limit (?) */ - RLIMIT_AS = 9, -#define RLIMIT_AS RLIMIT_AS - - /* Number of processes. */ - RLIMIT_NPROC = 6, -#define RLIMIT_NPROC RLIMIT_NPROC - - /* Locked-in-memory address space. */ - RLIMIT_MEMLOCK = 8, -#define RLIMIT_MEMLOCK RLIMIT_MEMLOCK - - RLIM_NLIMITS = 10 -#define RLIMIT_NLIMITS RLIMIT_NLIMITS -#define RLIM_NLIMITS RLIM_NLIMITS -}; - -/* Value to indicate that there is no limit. */ -#ifndef __USE_FILE_OFFSET64 -# define RLIM_INFINITY ((long int)(~0UL >> 1)) -#else -# define RLIM_INFINITY 0x7fffffffffffffffLL -#endif - -#ifdef __USE_LARGEFILE64 -# define RLIM64_INFINITY 0x7fffffffffffffffLL -#endif - -/* We can represent all limits. */ -#define RLIM_SAVED_MAX RLIM_INFINITY -#define RLIM_SAVED_CUR RLIM_INFINITY - - -/* Type for resource quantity measurement. */ -#ifndef __USE_FILE_OFFSET64 -typedef __rlim_t rlim_t; -#else -typedef __rlim64_t rlim_t; -#endif -#ifdef __USE_LARGEFILE64 -typedef __rlim64_t rlim64_t; -#endif - -struct rlimit - { - /* The current (soft) limit. */ - rlim_t rlim_cur; - /* The hard limit. */ - rlim_t rlim_max; - }; - -#ifdef __USE_LARGEFILE64 -struct rlimit64 - { - /* The current (soft) limit. */ - rlim64_t rlim_cur; - /* The hard limit. */ - rlim64_t rlim_max; - }; -#endif - -/* Whose usage statistics do you want? */ -enum __rusage_who -{ - /* The calling process. */ - RUSAGE_SELF = 0, -#define RUSAGE_SELF RUSAGE_SELF - - /* All of its terminated child processes. */ - RUSAGE_CHILDREN = -1, -#define RUSAGE_CHILDREN RUSAGE_CHILDREN - - /* Both. */ - RUSAGE_BOTH = -2 -#define RUSAGE_BOTH RUSAGE_BOTH -}; - -#define __need_timeval -#include <bits/time.h> /* For `struct timeval'. */ - -/* Structure which says how much of each resource has been used. */ -struct rusage - { - /* Total amount of user time used. */ - struct timeval ru_utime; - /* Total amount of system time used. */ - struct timeval ru_stime; - /* Maximum resident set size (in kilobytes). */ - long int ru_maxrss; - /* Amount of sharing of text segment memory - with other processes (kilobyte-seconds). */ - long int ru_ixrss; - /* Amount of data segment memory used (kilobyte-seconds). */ - long int ru_idrss; - /* Amount of stack memory used (kilobyte-seconds). */ - long int ru_isrss; - /* Number of soft page faults (i.e. those serviced by reclaiming - a page from the list of pages awaiting reallocation. */ - long int ru_minflt; - /* Number of hard page faults (i.e. those that required I/O). */ - long int ru_majflt; - /* Number of times a process was swapped out of physical memory. */ - long int ru_nswap; - /* Number of input operations via the file system. Note: This - and `ru_oublock' do not include operations with the cache. */ - long int ru_inblock; - /* Number of output operations via the file system. */ - long int ru_oublock; - /* Number of IPC messages sent. */ - long int ru_msgsnd; - /* Number of IPC messages received. */ - long int ru_msgrcv; - /* Number of signals delivered. */ - long int ru_nsignals; - /* Number of voluntary context switches, i.e. because the process - gave up the process before it had to (usually to wait for some - resource to be available). */ - long int ru_nvcsw; - /* Number of involuntary context switches, i.e. a higher priority process - became runnable or the current process used up its time slice. */ - long int ru_nivcsw; - }; - -/* Priority limits. */ -#define PRIO_MIN -20 /* Minimum priority a process can have. */ -#define PRIO_MAX 20 /* Maximum priority a process can have. */ - -/* The type of the WHICH argument to `getpriority' and `setpriority', - indicating what flavor of entity the WHO argument specifies. */ -enum __priority_which -{ - PRIO_PROCESS = 0, /* WHO is a process ID. */ -#define PRIO_PROCESS PRIO_PROCESS - PRIO_PGRP = 1, /* WHO is a process group ID. */ -#define PRIO_PGRP PRIO_PGRP - PRIO_USER = 2 /* WHO is a user ID. */ -#define PRIO_USER PRIO_USER -}; diff --git a/libc/sysdeps/linux/h8300/bits/sched.h b/libc/sysdeps/linux/h8300/bits/sched.h deleted file mode 100644 index 7e3c40eb4..000000000 --- a/libc/sysdeps/linux/h8300/bits/sched.h +++ /dev/null @@ -1,73 +0,0 @@ -/* Definitions of constants and data structure for POSIX 1003.1b-1993 - scheduling interface. - Copyright (C) 1996, 1997, 1998, 1999 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef __need_schedparam - -#ifndef _SCHED_H -# error "Never include <bits/sched.h> directly; use <sched.h> instead." -#endif - - -/* Scheduling algorithms. */ -#define SCHED_OTHER 0 -#define SCHED_FIFO 1 -#define SCHED_RR 2 - -#ifdef __USE_MISC -/* Cloning flags. */ -# define CSIGNAL 0x000000ff /* Signal mask to be sent at exit. */ -# define CLONE_VM 0x00000100 /* Set if VM shared between processes. */ -# define CLONE_FS 0x00000200 /* Set if fs info shared between processes. */ -# define CLONE_FILES 0x00000400 /* Set if open files shared between processes. */ -# define CLONE_SIGHAND 0x00000800 /* Set if signal handlers shared. */ -# define CLONE_PID 0x00001000 /* Set if pid shared. */ -# define CLONE_PTRACE 0x00002000 /* Set if tracing continues on the child. */ -# define CLONE_VFORK 0x00004000 /* Set if the parent wants the child to - wake it up on mm_release. */ -#endif - -/* The official definition. */ -struct sched_param - { - int sched_priority; - }; - -__BEGIN_DECLS - -/* Clone current process. */ -#ifdef __USE_MISC -extern int clone __P ((int (*__fn) (void *__arg), void *__child_stack, - int __flags, void *__arg)); -#endif - -__END_DECLS - -#endif /* need schedparam */ - -#if !defined __defined_schedparam \ - && (defined __need_schedparam || defined _SCHED_H) -# define __defined_schedparam 1 -/* Data structure to describe a process' schedulability. */ -struct __sched_param - { - int sched_priority; - }; -# undef __need_schedparam -#endif diff --git a/libc/sysdeps/linux/h8300/bits/select.h b/libc/sysdeps/linux/h8300/bits/select.h deleted file mode 100644 index ad47f5092..000000000 --- a/libc/sysdeps/linux/h8300/bits/select.h +++ /dev/null @@ -1,109 +0,0 @@ -/* Copyright (C) 1997, 1998 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _SYS_SELECT_H -# error "Never use <bits/select.h> directly; include <sys/select.h> instead." -#endif - - -#if defined __GNUC__ && __GNUC__ >= 2 - -# define __FD_ZERO(fdsp) \ - do { \ - __asm__ __volatile__ ("mov.l %1,er5\n\t" \ - "mov.l er5,er6\n\t" \ - "inc.l #1,er6\n\t" \ - "mov.b #0,r4l\n\t" \ - "mov.b r4l,@er5\n\t" \ - "mov.l %0,er4\n\t" \ - "eepmov.w\n\t" \ - :: "r" (sizeof (fd_set)-1), \ - "r" (&__FDS_BITS (fdsp)[0]) \ - : "er4","er5","er6","memory"); \ - } while (0) - -# define __FD_SET(fd, fdsp) \ - __asm__ __volatile__ ("mov.l %0,er0\n\t" \ - "mov.l %1,er1\n\t" \ - "shlr.b r1l\n\t" \ - "shlr.b r1l\n\t" \ - "shlr.b r1l\n\t" \ - "add.l er1,er0\n\t" \ - "mov.l %1,er1\n\t" \ - "and.b #7,r1l\n\t" \ - "bset r1l,@er0\n\t" \ - : "=m" (__FDS_BITS (fdsp)[__FDELT (fd)]) \ - : "r" (((int) (fd)) % __NFDBITS) \ - : "cc","memory","er0","er1") -# define __FD_CLR(fd, fdsp) \ - __asm__ __volatile__ ("mov.l %0,er0\n\t" \ - "mov.l %1,er1\n\t" \ - "shlr.b r1l\n\t" \ - "shlr.b r1l\n\t" \ - "shlr.b r1l\n\t" \ - "add.l er1,er0\n\t" \ - "mov.l %1,er1\n\t" \ - "and.b #7,r1l\n\t" \ - "bclr r1l,@er0\n\t" \ - : "=m" (__FDS_BITS (fdsp)[__FDELT (fd)]) \ - : "r" (((int) (fd)) % __NFDBITS) \ - : "cc","memory","er0","er1") -# define __FD_ISSET(fd, fdsp) \ - (__extension__ \ - ({register char __result; \ - __asm__ __volatile__ ("mov.l %1,er0\n\t" \ - "sub.l er1,er1\n\t" \ - "mov.w %0,r1\n\t" \ - "shlr.b r1l\n\t" \ - "shlr.b r1l\n\t" \ - "shlr.b r1l\n\t" \ - "add.l er1,er0\n\t" \ - "mov.w %0,r1\n\t" \ - "and.b #7,r1l\n\t" \ - "btst.b r1l,@er0\n\t" \ - "beq 1f\n\t" \ - "sub.l er0,er0\n\t" \ - "mov.b r1h,r0l\n\t" \ - "bra 2f\n" \ - "1:\tsub.l er0,er0\n" \ - "2:\tmov.w r0,%0\n\t" \ - : "=r" (__result) \ - : "r" (((int) (fd)) % __NFDBITS), \ - "m" (__FDS_BITS (fdsp)[__FDELT (fd)]) \ - : "cc"); \ - __result; })) - -#else /* ! GNU CC */ - -/* We don't use `memset' because this would require a prototype and - the array isn't too big. */ -# define __FD_ZERO(set) \ - do { \ - unsigned int __i; \ - fd_set *__arr = (set); \ - for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) \ - __FDS_BITS (__arr)[__i] = 0; \ - } while (0) -# define __FD_SET(d, set) (__FDS_BITS (set)[__FDELT (d)] |= __FDMASK (d)) -# define __FD_CLR(d, set) (__FDS_BITS (set)[__FDELT (d)] &= ~__FDMASK (d)) -# define __FD_ISSET(d, set) (__FDS_BITS (set)[__FDELT (d)] & __FDMASK (d)) - -#endif /* GNU CC */ - - - diff --git a/libc/sysdeps/linux/h8300/bits/sem.h b/libc/sysdeps/linux/h8300/bits/sem.h deleted file mode 100644 index 3d113a74f..000000000 --- a/libc/sysdeps/linux/h8300/bits/sem.h +++ /dev/null @@ -1,88 +0,0 @@ -/* Copyright (C) 1995, 1996, 1997, 1998 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _SYS_SEM_H -# error "Never include <bits/sem.h> directly; use <sys/sem.h> instead." -#endif - -#include <sys/types.h> - -/* Flags for `semop'. */ -#define SEM_UNDO 0x1000 /* undo the operation on exit */ - -/* Commands for `semctl'. */ -#define GETPID 11 /* get sempid */ -#define GETVAL 12 /* get semval */ -#define GETALL 13 /* get all semval's */ -#define GETNCNT 14 /* get semncnt */ -#define GETZCNT 15 /* get semzcnt */ -#define SETVAL 16 /* set semval */ -#define SETALL 17 /* set all semval's */ - - -/* Data structure describing a set of semaphores. */ -struct semid_ds -{ - struct ipc_perm sem_perm; /* operation permission struct */ - __time_t sem_otime; /* last semop() time */ - __time_t sem_ctime; /* last time changed by semctl() */ - struct sem *__sembase; /* ptr to first semaphore in array */ - struct sem_queue *__sem_pending; /* pending operations */ - struct sem_queue *__sem_pending_last; /* last pending operation */ - struct sem_undo *__undo; /* ondo requests on this array */ - unsigned short int sem_nsems; /* number of semaphores in set */ -}; - - -/* The user should define a union like the following to use it for arguments - for `semctl'. - - union semun - { - int val; <= value for SETVAL - struct semid_ds *buf; <= buffer for IPC_STAT & IPC_SET - unsigned short int *array; <= array for GETALL & SETALL - struct seminfo *__buf; <= buffer for IPC_INFO - }; - - Previous versions of this file used to define this union but this is - incorrect. One can test the macro _SEM_SEMUN_UNDEFINED to see whether - one must define the union or not. */ -#define _SEM_SEMUN_UNDEFINED 1 - -#ifdef __USE_MISC - -/* ipcs ctl cmds */ -# define SEM_STAT 18 -# define SEM_INFO 19 - -struct seminfo -{ - int semmap; - int semmni; - int semmns; - int semmnu; - int semmsl; - int semopm; - int semume; - int semusz; - int semvmx; - int semaem; -}; - -#endif /* __USE_MISC */ diff --git a/libc/sysdeps/linux/h8300/bits/setjmp.h b/libc/sysdeps/linux/h8300/bits/setjmp.h deleted file mode 100644 index 78f9c83fb..000000000 --- a/libc/sysdeps/linux/h8300/bits/setjmp.h +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright (C) 1997, 1998 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* Define the machine-dependent type `jmp_buf'. H8/300H version. */ - -#ifndef _SETJMP_H -# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead." -#endif - -#include <signal.h> - -typedef struct - { - /* er1-er5 */ - long int __regs[5]; - - /* er6 */ - int *__fp; - /* sp */ - int *__sp; - /* pc */ - void *__pc; - } __jmp_buf[1]; - -/* Test if longjmp to JMPBUF would unwind the frame - containing a local variable at ADDRESS. */ -#define _JMPBUF_UNWINDS(jmpbuf, address) \ - ((void *) (address) < (void *) (jmpbuf)->__sp) diff --git a/libc/sysdeps/linux/h8300/bits/shm.h b/libc/sysdeps/linux/h8300/bits/shm.h deleted file mode 100644 index c7070595b..000000000 --- a/libc/sysdeps/linux/h8300/bits/shm.h +++ /dev/null @@ -1,84 +0,0 @@ -/* Copyright (C) 1995, 1996, 1997 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _SYS_SHM_H -# error "Never include <bits/shm.h> directly; use <sys/shm.h> instead." -#endif - -#include <sys/types.h> - -/* Permission flag for shmget. */ -#define SHM_R 0400 /* or S_IRUGO from <linux/stat.h> */ -#define SHM_W 0200 /* or S_IWUGO from <linux/stat.h> */ - -/* Flags for `shmat'. */ -#define SHM_RDONLY 010000 /* attach read-only else read-write */ -#define SHM_RND 020000 /* round attach address to SHMLBA */ -#define SHM_REMAP 040000 /* take-over region on attach */ - -/* Commands for `shmctl'. */ -#define SHM_LOCK 11 /* lock segment (root only) */ -#define SHM_UNLOCK 12 /* unlock segment (root only) */ - - -/* Data structure describing a set of semaphores. */ -struct shmid_ds - { - struct ipc_perm shm_perm; /* operation permission struct */ - int shm_segsz; /* size of segment in bytes */ - __time_t shm_atime; /* time of last shmat() */ - __time_t shm_dtime; /* time of last shmdt() */ - __time_t shm_ctime; /* time of last change by shmctl() */ - __ipc_pid_t shm_cpid; /* pid of creator */ - __ipc_pid_t shm_lpid; /* pid of last shmop */ - unsigned short int shm_nattch; /* number of current attaches */ - unsigned short int __shm_npages; /* size of segment (pages) */ - unsigned long int *__shm_pages; /* array of ptrs to frames -> SHMMAX */ - struct vm_area_struct *__attaches; /* descriptors for attaches */ - }; - -#ifdef __USE_MISC - -/* ipcs ctl commands */ -# define SHM_STAT 13 -# define SHM_INFO 14 - -/* shm_mode upper byte flags */ -# define SHM_DEST 01000 /* segment will be destroyed on last detach */ -# define SHM_LOCKED 02000 /* segment will not be swapped */ - -struct shminfo - { - int shmmax; - int shmmin; - int shmmni; - int shmseg; - int shmall; - }; - -struct shm_info - { - int used_ids; - unsigned long int shm_tot; /* total allocated shm */ - unsigned long int shm_rss; /* total resident shm */ - unsigned long int shm_swp; /* total swapped shm */ - unsigned long int swap_attempts; - unsigned long int swap_successes; - }; - -#endif /* __USE_MISC */ diff --git a/libc/sysdeps/linux/h8300/bits/sigaction.h b/libc/sysdeps/linux/h8300/bits/sigaction.h deleted file mode 100644 index e74eac22d..000000000 --- a/libc/sysdeps/linux/h8300/bits/sigaction.h +++ /dev/null @@ -1,77 +0,0 @@ -/* The proper definitions for Linux's sigaction. - Copyright (C) 1993, 94, 95, 96, 97, 98, 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _SIGNAL_H -# error "Never include <bits/sigaction.h> directly; use <signal.h> instead." -#endif - -/* Structure describing the action to be taken when a signal arrives. */ -struct sigaction - { - /* Signal handler. */ -#ifdef __USE_POSIX199309 - union - { - /* Used if SA_SIGINFO is not set. */ - __sighandler_t sa_handler; - /* Used if SA_SIGINFO is set. */ - void (*sa_sigaction) __PMT ((int, siginfo_t *, void *)); - } - __sigaction_handler; -# define sa_handler __sigaction_handler.sa_handler -# define sa_sigaction __sigaction_handler.sa_sigaction -#else - __sighandler_t sa_handler; -#endif - - /* Additional set of signals to be blocked. */ - __sigset_t sa_mask; - - /* Special flags. */ - int sa_flags; - - /* Restore handler. */ - void (*sa_restorer) __PMT ((void)); - }; - -/* Bits in `sa_flags'. */ -#define SA_NOCLDSTOP 1 /* Don't send SIGCHLD when children stop. */ -#define SA_NOCLDWAIT 2 /* Don't create zombie on child death. */ -#define SA_SIGINFO 4 /* Invoke signal-catching function with - three arguments instead of one. */ -#if defined __USE_UNIX98 || defined __USE_MISC -# define SA_ONSTACK 0x08000000 /* Use signal stack by using `sa_restorer'. */ -# define SA_RESTART 0x10000000 /* Restart syscall on signal return. */ -# define SA_NODEFER 0x40000000 /* Don't automatically block the signal when - its handler is being executed. */ -# define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler. */ -#endif -#ifdef __USE_MISC -# define SA_INTERRUPT 0x20000000 /* Historical no-op. */ - -/* Some aliases for the SA_ constants. */ -# define SA_NOMASK SA_NODEFER -# define SA_ONESHOT SA_RESETHAND -# define SA_STACK SA_ONSTACK -#endif - -/* Values for the HOW argument to `sigprocmask'. */ -#define SIG_BLOCK 0 /* Block signals. */ -#define SIG_UNBLOCK 1 /* Unblock signals. */ -#define SIG_SETMASK 2 /* Set the set of blocked signals. */ diff --git a/libc/sysdeps/linux/h8300/bits/sigcontext.h b/libc/sysdeps/linux/h8300/bits/sigcontext.h deleted file mode 100644 index 97cbf4b30..000000000 --- a/libc/sysdeps/linux/h8300/bits/sigcontext.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 1996, 1997, 1998 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H -# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead." -#endif - -#ifndef sigcontext_struct -/* Kernel headers before 2.1.1 define a struct sigcontext_struct, but - we need sigcontext. */ -# define sigcontext_struct sigcontext - -# include <asm/sigcontext.h> -#endif diff --git a/libc/sysdeps/linux/h8300/bits/siginfo.h b/libc/sysdeps/linux/h8300/bits/siginfo.h deleted file mode 100644 index 66e626199..000000000 --- a/libc/sysdeps/linux/h8300/bits/siginfo.h +++ /dev/null @@ -1,279 +0,0 @@ -/* siginfo_t, sigevent and constants. Linux version. - Copyright (C) 1997, 1998 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#if !defined _SIGNAL_H && !defined __need_siginfo_t -# error "Never include this file directly. Use <signal.h> instead" -#endif - -#if (!defined __have_siginfo_t \ - && (defined _SIGNAL_H || defined __need_siginfo_t)) -# define __have_siginfo_t 1 - -/* Type for data associated with a signal. */ -typedef union sigval - { - int sival_int; - void *sival_ptr; - } sigval_t; - -# define __SI_MAX_SIZE 128 -# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3) - -typedef struct siginfo - { - int si_signo; /* Signal number. */ - int si_errno; /* If non-zero, an errno value associated with - this signal, as defined in <errno.h>. */ - int si_code; /* Signal code. */ - - union - { - int _pad[__SI_PAD_SIZE]; - - /* kill(). */ - struct - { - __pid_t si_pid; /* Sending process ID. */ - __uid_t si_uid; /* Real user ID of sending process. */ - } _kill; - - /* POSIX.1b timers. */ - struct - { - unsigned int _timer1; - unsigned int _timer2; - } _timer; - - /* POSIX.1b signals. */ - struct - { - __pid_t si_pid; /* Sending process ID. */ - __uid_t si_uid; /* Real user ID of sending process. */ - sigval_t si_sigval; /* Signal value. */ - } _rt; - - /* SIGCHLD. */ - struct - { - __pid_t si_pid; /* Which child. */ - __uid_t si_uid; /* Real user ID of sending process. */ - int si_status; /* Exit value or signal. */ - __clock_t si_utime; - __clock_t si_stime; - } _sigchld; - - /* SIGILL, SIGFPE, SIGSEGV, SIGBUS. */ - struct - { - void *si_addr; /* Faulting insn/memory ref. */ - } _sigfault; - - /* SIGPOLL. */ - struct - { - int si_band; /* Band event for SIGPOLL. */ - int si_fd; - } _sigpoll; - } _sifields; - } siginfo_t; - - -/* X/Open requires some more fields with fixed names. */ -# define si_pid _sifields._kill.si_pid -# define si_uid _sifields._kill.si_uid -# define si_status _sifields._sigchld.si_status -# define si_utime _sifields._sigchld.si_utime -# define si_stime _sifields._sigchld.si_stime -# define si_value _sifields._rt.si_sigval -# define si_int _sifields._rt.si_sigval.sival_int -# define si_ptr _sifields._rt.si_sigval.sival_ptr -# define si_addr _sifields._sigfault.si_addr -# define si_band _sifields._sigpoll.si_band -# define si_fd _sifields._sigpoll.si_fd - - -/* Values for `si_code'. Positive values are reserved for kernel-generated - signals. */ -enum -{ - SI_SIGIO = -5, /* Sent by queued SIGIO. */ -# define SI_SIGIO SI_SIGIO - SI_ASYNCIO, /* Sent by AIO completion. */ -# define SI_ASYNCIO SI_ASYNCIO - SI_MESGQ, /* Sent by real time mesq state change. */ -# define SI_MESGQ SI_MESGQ - SI_TIMER, /* Sent by timer expiration. */ -# define SI_TIMER SI_TIMER - SI_QUEUE, /* Sent by sigqueue. */ -# define SI_QUEUE SI_QUEUE - SI_USER /* Sent by kill, sigsend, raise. */ -# define SI_USER SI_USER -}; - - -/* `si_code' values for SIGILL signal. */ -enum -{ - ILL_ILLOPC = 1, /* Illegal opcode. */ -# define ILL_ILLOPC ILL_ILLOPC - ILL_ILLOPN, /* Illegal operand. */ -# define ILL_ILLOPN ILL_ILLOPN - ILL_ILLADR, /* Illegal addressing mode. */ -# define ILL_ILLADR ILL_ILLADR - ILL_ILLTRP, /* Illegal trap. */ -# define ILL_ILLTRP ILL_ILLTRP - ILL_PRVOPC, /* Privileged opcode. */ -# define ILL_PRVOPC ILL_PRVOPC - ILL_PRVREG, /* Privileged register. */ -# define ILL_PRVREG ILL_PRVREG - ILL_COPROC, /* Coprocessor error. */ -# define ILL_COPROC ILL_COPROC - ILL_BADSTK /* Internal stack error. */ -# define ILL_BADSTK ILL_BADSTK -}; - -/* `si_code' values for SIGFPE signal. */ -enum -{ - FPE_INTDIV = 1, /* Integer divide by zero. */ -# define FPE_INTDIV FPE_INTDIV - FPE_INTOVF, /* Integer overflow. */ -# define FPE_INTOVF FPE_INTOVF - FPE_FLTDIV, /* Floating point divide by zero. */ -# define FPE_FLTDIV FPE_FLTDIV - FPE_FLTOVF, /* Floating point overflow. */ -# define FPE_FLTOVF FPE_FLTOVF - FPE_FLTUND, /* Floating point underflow. */ -# define FPE_FLTUND FPE_FLTUND - FPE_FLTRES, /* Floating point inexact result. */ -# define FPE_FLTRES FPE_FLTRES - FPE_FLTINV, /* Floating point invalid operation. */ -# define FPE_FLTINV FPE_FLTINV - FPE_FLTSUB /* Subscript out of range. */ -# define FPE_FLTSUB FPE_FLTSUB -}; - -/* `si_code' values for SIGSEGV signal. */ -enum -{ - SEGV_MAPERR = 1, /* Address not mapped to object. */ -# define SEGV_MAPERR SEGV_MAPERR - SEGV_ACCERR /* Invalid permissions for mapped object. */ -# define SEGV_ACCERR SEGV_ACCERR -}; - -/* `si_code' values for SIGBUS signal. */ -enum -{ - BUS_ADRALN = 1, /* Invalid address alignment. */ -# define BUS_ADRALN BUS_ADRALN - BUS_ADRERR, /* Non-existant physical address. */ -# define BUS_ADRERR BUS_ADRERR - BUS_OBJERR /* Object specific hardware error. */ -# define BUS_OBJERR BUS_OBJERR -}; - -/* `si_code' values for SIGTRAP signal. */ -enum -{ - TRAP_BRKPT = 1, /* Process breakpoint. */ -# define TRAP_BRKPT TRAP_BRKPT - TRAP_TRACE /* Process trace trap. */ -# define TRAP_TRACE TRAP_TRACE -}; - -/* `si_code' values for SIGCHLD signal. */ -enum -{ - CLD_EXITED = 1, /* Child has exited. */ -# define CLD_EXITED CLD_EXITED - CLD_KILLED, /* Child was killed. */ -# define CLD_KILLED CLD_KILLED - CLD_DUMPED, /* Child terminated abnormally. */ -# define CLD_DUMPED CLD_DUMPED - CLD_TRAPPED, /* Traced child has trapped. */ -# define CLD_TRAPPED CLD_TRAPPED - CLD_STOPPED, /* Child has stopped. */ -# define CLD_STOPPED CLD_STOPPED - CLD_CONTINUED /* Stopped child has continued. */ -# define CLD_CONTINUED CLD_CONTINUED -}; - -/* `si_code' values for SIGPOLL signal. */ -enum -{ - POLL_IN = 1, /* Data input available. */ -# define POLL_IN POLL_IN - POLL_OUT, /* Output buffers available. */ -# define POLL_OUT POLL_OUT - POLL_MSG, /* Input message available. */ -# define POLL_MSG POLL_MSG - POLL_ERR, /* I/O error. */ -# define POLL_ERR POLL_ERR - POLL_PRI, /* High priority input available. */ -# define POLL_PRI POLL_PRI - POLL_HUP /* Device disconnected. */ -# define POLL_HUP POLL_HUP -}; - -# undef __need_siginfo_t -#endif /* !have siginfo_t && (have _SIGNAL_H || need siginfo_t). */ - - -#if defined _SIGNAL_H && !defined __have_sigevent_t -# define __have_sigevent_t 1 - -/* Structure to transport application-defined values with signals. */ -# define __SIGEV_MAX_SIZE 64 -# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3) - -typedef struct sigevent - { - sigval_t sigev_value; - int sigev_signo; - int sigev_notify; - - union - { - int _pad[__SIGEV_PAD_SIZE]; - - struct - { - void (*_function) __PMT ((sigval_t)); /* Function to start. */ - void *_attribute; /* Really pthread_attr_t. */ - } _sigev_thread; - } _sigev_un; - } sigevent_t; - -/* POSIX names to access some of the members. */ -# define sigev_notify_function _sigev_un._sigev_thread._function -# define sigev_notify_attributes _sigev_un._sigev_thread._attribute - -/* `sigev_notify' values. */ -enum -{ - SIGEV_SIGNAL = 0, /* Notify via signal. */ -# define SIGEV_SIGNAL SIGEV_SIGNAL - SIGEV_NONE, /* Other notification: meaningless. */ -# define SIGEV_NONE SIGEV_NONE - SIGEV_THREAD /* Deliver via thread creation. */ -# define SIGEV_THREAD SIGEV_THREAD -}; - -#endif /* have _SIGNAL_H. */ diff --git a/libc/sysdeps/linux/h8300/bits/signum.h b/libc/sysdeps/linux/h8300/bits/signum.h deleted file mode 100644 index fb26703d0..000000000 --- a/libc/sysdeps/linux/h8300/bits/signum.h +++ /dev/null @@ -1,80 +0,0 @@ -/* Signal number definitions. Linux version. - Copyright (C) 1995, 1996, 1997, 1998, 1999 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifdef _SIGNAL_H - -/* Fake signal functions. */ -#define SIG_ERR ((__sighandler_t) -1) /* Error return. */ -#define SIG_DFL ((__sighandler_t) 0) /* Default action. */ -#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */ - -#ifdef __USE_UNIX98 -# define SIG_HOLD ((__sighandler_t) 2) /* Add signal to hold mask. */ -#endif - - -/* Signals. */ -#define SIGHUP 1 /* Hangup (POSIX). */ -#define SIGINT 2 /* Interrupt (ANSI). */ -#define SIGQUIT 3 /* Quit (POSIX). */ -#define SIGILL 4 /* Illegal instruction (ANSI). */ -#define SIGTRAP 5 /* Trace trap (POSIX). */ -#define SIGABRT 6 /* Abort (ANSI). */ -#define SIGIOT 6 /* IOT trap (4.2 BSD). */ -#define SIGBUS 7 /* BUS error (4.2 BSD). */ -#define SIGFPE 8 /* Floating-point exception (ANSI). */ -#define SIGKILL 9 /* Kill, unblockable (POSIX). */ -#define SIGUSR1 10 /* User-defined signal 1 (POSIX). */ -#define SIGSEGV 11 /* Segmentation violation (ANSI). */ -#define SIGUSR2 12 /* User-defined signal 2 (POSIX). */ -#define SIGPIPE 13 /* Broken pipe (POSIX). */ -#define SIGALRM 14 /* Alarm clock (POSIX). */ -#define SIGTERM 15 /* Termination (ANSI). */ -#define SIGSTKFLT 16 /* Stack fault. */ -#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */ -#define SIGCHLD 17 /* Child status has changed (POSIX). */ -#define SIGCONT 18 /* Continue (POSIX). */ -#define SIGSTOP 19 /* Stop, unblockable (POSIX). */ -#define SIGTSTP 20 /* Keyboard stop (POSIX). */ -#define SIGTTIN 21 /* Background read from tty (POSIX). */ -#define SIGTTOU 22 /* Background write to tty (POSIX). */ -#define SIGURG 23 /* Urgent condition on socket (4.2 BSD). */ -#define SIGXCPU 24 /* CPU limit exceeded (4.2 BSD). */ -#define SIGXFSZ 25 /* File size limit exceeded (4.2 BSD). */ -#define SIGVTALRM 26 /* Virtual alarm clock (4.2 BSD). */ -#define SIGPROF 27 /* Profiling alarm clock (4.2 BSD). */ -#define SIGWINCH 28 /* Window size change (4.3 BSD, Sun). */ -#define SIGPOLL SIGIO /* Pollable event occurred (System V). */ -#define SIGIO 29 /* I/O now possible (4.2 BSD). */ -#define SIGPWR 30 /* Power failure restart (System V). */ -#define SIGSYS 31 /* Bad system call. */ -#define SIGUNUSED 31 - -#define _NSIG 64 /* Biggest signal number + 1 - (including real-time signals). */ - -#define SIGRTMIN (__libc_current_sigrtmin ()) -#define SIGRTMAX (__libc_current_sigrtmax ()) - -/* These are the hard limits of the kernel. These values should not be - used directly at user level. */ -#define __SIGRTMIN 32 -#define __SIGRTMAX (_NSIG - 1) - -#endif /* <signal.h> included. */ diff --git a/libc/sysdeps/linux/h8300/bits/sigset.h b/libc/sysdeps/linux/h8300/bits/sigset.h deleted file mode 100644 index 7ccadda45..000000000 --- a/libc/sysdeps/linux/h8300/bits/sigset.h +++ /dev/null @@ -1,125 +0,0 @@ -/* __sig_atomic_t, __sigset_t, and related definitions. Linux version. - Copyright (C) 1991, 1992, 1994, 1996, 1997 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 _SIGSET_H_types -# define _SIGSET_H_types 1 - -typedef int __sig_atomic_t; - -/* A `sigset_t' has a bit for each signal. */ - -# define _SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int))) -typedef struct - { - unsigned long int __val[_SIGSET_NWORDS]; - } __sigset_t; - -#endif - - -/* We only want to define these functions if <signal.h> was actually - included; otherwise we were included just to define the types. Since we - are namespace-clean, it wouldn't hurt to define extra macros. But - trouble can be caused by functions being defined (e.g., any global - register vars declared later will cause compilation errors). */ - -#if !defined _SIGSET_H_fns && defined _SIGNAL_H -# define _SIGSET_H_fns 1 - -# ifndef _EXTERN_INLINE -# define _EXTERN_INLINE extern __inline -# endif - -/* Return a mask that includes the bit for SIG only. */ -# define __sigmask(sig) \ - (((unsigned long int) 1) << (((sig) - 1) % (8 * sizeof (unsigned long int)))) - -/* Return the word index for SIG. */ -# define __sigword(sig) (((sig) - 1) / (8 * sizeof (unsigned long int))) - -# if defined __GNUC__ && __GNUC__ >= 2 -# define __sigemptyset(set) \ - (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ - sigset_t *__set = (set); \ - while (--__cnt >= 0) __set->__val[__cnt] = 0; \ - 0; })) -# define __sigfillset(set) \ - (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ - sigset_t *__set = (set); \ - while (--__cnt >= 0) __set->__val[__cnt] = ~0UL; \ - 0; })) - -# ifdef __USE_GNU -/* The POSIX does not specify for handling the whole signal set in one - command. This is often wanted and so we define three more functions - here. */ -# define __sigisemptyset(set) \ - (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ - const sigset_t *__set = (set); \ - int __ret = __set->__val[--__cnt]; \ - while (!__ret && --__cnt >= 0) \ - __ret = __set->__val[__cnt]; \ - __ret == 0; })) -# define __sigandset(dest, left, right) \ - (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ - sigset_t *__dest = (dest); \ - const sigset_t *__left = (left); \ - const sigset_t *__right = (right); \ - while (--__cnt >= 0) \ - __dest->__val[__cnt] = (__left->__val[__cnt] \ - & __right->__val[__cnt]); \ - 0; })) -# define __sigorset(dest, left, right) \ - (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ - sigset_t *__dest = (dest); \ - const sigset_t *__left = (left); \ - const sigset_t *__right = (right); \ - while (--__cnt >= 0) \ - __dest->__val[__cnt] = (__left->__val[__cnt] \ - | __right->__val[__cnt]); \ - 0; })) -# endif -# endif - -/* These functions needn't check for a bogus signal number -- error - checking is done in the non __ versions. */ - -extern int __sigismember (__const __sigset_t *, int); -extern int __sigaddset (__sigset_t *, int); -extern int __sigdelset (__sigset_t *, int); - -# ifdef __USE_EXTERN_INLINES -# define __SIGSETFN(NAME, BODY, CONST) \ - _EXTERN_INLINE int \ - NAME (CONST __sigset_t *__set, int __sig) \ - { \ - unsigned long int __mask = __sigmask (__sig); \ - unsigned long int __word = __sigword (__sig); \ - return BODY; \ - } - -__SIGSETFN (__sigismember, (__set->__val[__word] & __mask) ? 1 : 0, __const) -__SIGSETFN (__sigaddset, ((__set->__val[__word] |= __mask), 0), ) -__SIGSETFN (__sigdelset, ((__set->__val[__word] &= ~__mask), 0), ) - -# undef __SIGSETFN -# endif - - -#endif /* ! _SIGSET_H_fns. */ diff --git a/libc/sysdeps/linux/h8300/bits/sigstack.h b/libc/sysdeps/linux/h8300/bits/sigstack.h deleted file mode 100644 index 905e87fd9..000000000 --- a/libc/sysdeps/linux/h8300/bits/sigstack.h +++ /dev/null @@ -1,55 +0,0 @@ -/* sigstack, sigaltstack definitions. - Copyright (C) 1998 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _SIGNAL_H -# error "Never include this file directly. Use <signal.h> instead" -#endif - - -/* Structure describing a signal stack (obsolete). */ -struct sigstack - { - __ptr_t ss_sp; /* Signal stack pointer. */ - int ss_onstack; /* Nonzero if executing on this stack. */ - }; - - -/* Possible values for `ss_flags.'. */ -enum -{ - SS_ONSTACK = 1, -#define SS_ONSTACK SS_ONSTACK - SS_DISABLE -#define SS_DISABLE SS_DISABLE -}; - -/* Minimum stack size for a signal handler. */ -#define MINSIGSTKSZ 2048 - -/* System default stack size. */ -#define SIGSTKSZ 8192 - - -/* Alternate, preferred interface. */ -typedef struct sigaltstack - { - __ptr_t ss_sp; - int ss_flags; - size_t ss_size; - } stack_t; diff --git a/libc/sysdeps/linux/h8300/bits/sigthread.h b/libc/sysdeps/linux/h8300/bits/sigthread.h deleted file mode 100644 index c213614be..000000000 --- a/libc/sysdeps/linux/h8300/bits/sigthread.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Signal handling function for threaded programs. - Copyright (C) 1998 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _BITS_SIGTHREAD_H -#define _BITS_SIGTHREAD_H 1 - -#if !defined _SIGNAL_H && !defined _PTHREAD_H -# error "Never include this file directly. Use <pthread.h> instead" -#endif - -__BEGIN_DECLS - -/* Functions for handling signals. */ - -/* Modify the signal mask for the calling thread. The arguments have - the same meaning as for sigprocmask(2). */ -extern int pthread_sigmask __P ((int __how, __const __sigset_t *__newmask, - __sigset_t *__oldmask)); - -/* Send signal SIGNO to the given thread. */ -extern int pthread_kill __P ((pthread_t __thread, int __signo)); - -__END_DECLS - -#endif /* bits/sigthread.h */ diff --git a/libc/sysdeps/linux/h8300/bits/sockaddr.h b/libc/sysdeps/linux/h8300/bits/sockaddr.h deleted file mode 100644 index 8078963a8..000000000 --- a/libc/sysdeps/linux/h8300/bits/sockaddr.h +++ /dev/null @@ -1,47 +0,0 @@ -/* Definition of `struct sockaddr_*' common members. Generic/4.2 BSD version. - Copyright (C) 1995, 1996, 1997, 1998 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* - * Never include this file directly; use <sys/socket.h> instead. - */ - -#ifndef _BITS_SOCKADDR_H -#define _BITS_SOCKADDR_H 1 - -__BEGIN_DECLS - -/* POSIX.1g specifies this type name for the `sa_family' member. */ -typedef unsigned short int sa_family_t; - -/* This macro is used to declare the initial common members - of the data types used for socket addresses, `struct sockaddr', - `struct sockaddr_in', `struct sockaddr_un', etc. */ - -#define __SOCKADDR_COMMON(sa_prefix) \ - sa_family_t sa_prefix##family - -#define __SOCKADDR_COMMON_SIZE (sizeof (unsigned short int)) - -/* Return the length of a `sockaddr' structure. */ -#define SA_LEN(_x) __libc_sa_len((_x)->sa_family) -extern int __libc_sa_len __P ((sa_family_t __af)); - -__END_DECLS - -#endif /* bits/sockaddr.h */ diff --git a/libc/sysdeps/linux/h8300/bits/socket.h b/libc/sysdeps/linux/h8300/bits/socket.h deleted file mode 100644 index dde2b2a7d..000000000 --- a/libc/sysdeps/linux/h8300/bits/socket.h +++ /dev/null @@ -1,310 +0,0 @@ -/* System-specific socket constants and types. Linux version. - Copyright (C) 1991,92,94,95,96,97,98,99 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef __BITS_SOCKET_H -#define __BITS_SOCKET_H - -#if !defined _SYS_SOCKET_H && !defined _NETINET_IN_H -# error "Never include <bits/socket.h> directly; use <sys/socket.h> instead." -#endif - -#define __need_size_t -#define __need_NULL -#include <stddef.h> - -#include <limits.h> -#include <sys/types.h> - -/* Type for length arguments in socket calls. */ -#ifndef __socklen_t_defined -typedef __socklen_t socklen_t; -# define __socklen_t_defined -#endif - -/* Types of sockets. */ -enum __socket_type -{ - SOCK_STREAM = 1, /* Sequenced, reliable, connection-based - byte streams. */ -#define SOCK_STREAM SOCK_STREAM - SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams - of fixed maximum length. */ -#define SOCK_DGRAM SOCK_DGRAM - SOCK_RAW = 3, /* Raw protocol interface. */ -#define SOCK_RAW SOCK_RAW - SOCK_RDM = 4, /* Reliably-delivered messages. */ -#define SOCK_RDM SOCK_RDM - SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, - datagrams of fixed maximum length. */ -#define SOCK_SEQPACKET SOCK_SEQPACKET - SOCK_PACKET = 10 /* Linux specific way of getting packets - at the dev level. For writing rarp and - other similar things on the user level. */ -#define SOCK_PACKET SOCK_PACKET -}; - -/* Protocol families. */ -#define PF_UNSPEC 0 /* Unspecified. */ -#define PF_LOCAL 1 /* Local to host (pipes and file-domain). */ -#define PF_UNIX PF_LOCAL /* Old BSD name for PF_LOCAL. */ -#define PF_FILE PF_LOCAL /* Another non-standard name for PF_LOCAL. */ -#define PF_INET 2 /* IP protocol family. */ -#define PF_AX25 3 /* Amateur Radio AX.25. */ -#define PF_IPX 4 /* Novell Internet Protocol. */ -#define PF_APPLETALK 5 /* Appletalk DDP. */ -#define PF_NETROM 6 /* Amateur radio NetROM. */ -#define PF_BRIDGE 7 /* Multiprotocol bridge. */ -#define PF_ATMPVC 8 /* ATM PVCs. */ -#define PF_X25 9 /* Reserved for X.25 project. */ -#define PF_INET6 10 /* IP version 6. */ -#define PF_ROSE 11 /* Amateur Radio X.25 PLP. */ -#define PF_DECnet 12 /* Reserved for DECnet project. */ -#define PF_NETBEUI 13 /* Reserved for 802.2LLC project. */ -#define PF_SECURITY 14 /* Security callback pseudo AF. */ -#define PF_KEY 15 /* PF_KEY key management API. */ -#define PF_NETLINK 16 -#define PF_ROUTE PF_NETLINK /* Alias to emulate 4.4BSD. */ -#define PF_PACKET 17 /* Packet family. */ -#define PF_ASH 18 /* Ash. */ -#define PF_ECONET 19 /* Acorn Econet. */ -#define PF_ATMSVC 20 /* ATM SVCs. */ -#define PF_SNA 22 /* Linux SNA Project */ -#define PF_IRDA 23 /* IRDA sockets. */ -#define PF_MAX 32 /* For now.. */ - -/* Address families. */ -#define AF_UNSPEC PF_UNSPEC -#define AF_LOCAL PF_LOCAL -#define AF_UNIX PF_UNIX -#define AF_FILE PF_FILE -#define AF_INET PF_INET -#define AF_AX25 PF_AX25 -#define AF_IPX PF_IPX -#define AF_APPLETALK PF_APPLETALK -#define AF_NETROM PF_NETROM -#define AF_BRIDGE PF_BRIDGE -#define AF_ATMPVC PF_ATMPVC -#define AF_X25 PF_X25 -#define AF_INET6 PF_INET6 -#define AF_ROSE PF_ROSE -#define AF_DECnet PF_DECnet -#define AF_NETBEUI PF_NETBEUI -#define AF_SECURITY PF_SECURITY -#define AF_KEY PF_KEY -#define AF_NETLINK PF_NETLINK -#define AF_ROUTE PF_ROUTE -#define AF_PACKET PF_PACKET -#define AF_ASH PF_ASH -#define AF_ECONET PF_ECONET -#define AF_ATMSVC PF_ATMSVC -#define AF_SNA PF_SNA -#define AF_IRDA PF_IRDA -#define AF_MAX PF_MAX - -/* Socket level values. Others are defined in the appropriate headers. - - XXX These definitions also should go into the appropriate headers as - far as they are available. */ -#define SOL_RAW 255 -#define SOL_DECNET 261 -#define SOL_X25 262 -#define SOL_PACKET 263 -#define SOL_ATM 264 /* ATM layer (cell level). */ -#define SOL_AAL 265 /* ATM Adaption Layer (packet level). */ -#define SOL_IRDA 266 - -/* Maximum queue length specifiable by listen. */ -#define SOMAXCONN 128 - -/* Get the definition of the macro to define the common sockaddr members. */ -#include <bits/sockaddr.h> - -/* Structure describing a generic socket address. */ -struct sockaddr - { - __SOCKADDR_COMMON (sa_); /* Common data: address family and length. */ - char sa_data[14]; /* Address data. */ - }; - - -/* Structure large enough to hold any socket address (with the historical - exception of AF_UNIX). We reserve 128 bytes. */ -#if ULONG_MAX > 0xffffffff -# define __ss_aligntype __uint64_t -#else -# define __ss_aligntype __uint32_t -#endif -#define _SS_SIZE 128 -#define _SS_PADSIZE (_SS_SIZE - (2 * sizeof (__ss_aligntype))) - -struct sockaddr_storage - { - __SOCKADDR_COMMON (__ss_); /* Address family, etc. */ - __ss_aligntype __ss_align; /* Force desired alignment. */ - char __ss_padding[_SS_PADSIZE]; - }; - - -/* Bits in the FLAGS argument to `send', `recv', et al. */ -enum - { - MSG_OOB = 0x01, /* Process out-of-band data. */ -#define MSG_OOB MSG_OOB - MSG_PEEK = 0x02, /* Peek at incoming messages. */ -#define MSG_PEEK MSG_PEEK - MSG_DONTROUTE = 0x04, /* Don't use local routing. */ -#define MSG_DONTROUTE MSG_DONTROUTE -#ifdef __USE_GNU - /* DECnet uses a different name. */ - MSG_TRYHARD = MSG_DONTROUTE, -# define MSG_TRYHARD MSG_DONTROUTE -#endif - MSG_CTRUNC = 0x08, /* Control data lost before delivery. */ -#define MSG_CTRUNC MSG_CTRUNC - MSG_PROXY = 0x10, /* Supply or ask second address. */ -#define MSG_PROXY MSG_PROXY - MSG_TRUNC = 0x20, -#define MSG_TRUNC MSG_TRUNC - MSG_DONTWAIT = 0x40, /* Nonblocking IO. */ -#define MSG_DONTWAIT MSG_DONTWAIT - MSG_EOR = 0x80, /* End of record. */ -#define MSG_EOR MSG_EOR - MSG_WAITALL = 0x100, /* Wait for a full request. */ -#define MSG_WAITALL MSG_WAITALL - MSG_FIN = 0x200, -#define MSG_FIN MSG_FIN - MSG_SYN = 0x400, -#define MSG_SYN MSG_SYN - MSG_URG = 0x800, -#define MSG_URG MSG_URG - MSG_RST = 0x1000, -#define MSG_RST MSG_RST - MSG_ERRQUEUE = 0x2000, /* Fetch message from error queue. */ -#define MSG_ERRQUEUE MSG_ERRQUEUE - MSG_NOSIGNAL = 0x4000 /* Do not generate SIGPIPE. */ -#define MSG_NOSIGNAL MSG_NOSIGNAL - }; - - -/* Structure describing messages sent by - `sendmsg' and received by `recvmsg'. */ -struct msghdr - { - __ptr_t msg_name; /* Address to send to/receive from. */ - socklen_t msg_namelen; /* Length of address data. */ - - struct iovec *msg_iov; /* Vector of data to send/receive into. */ - size_t msg_iovlen; /* Number of elements in the vector. */ - - __ptr_t msg_control; /* Ancillary data (eg BSD filedesc passing). */ - size_t msg_controllen; /* Ancillary data buffer length. */ - - int msg_flags; /* Flags on received message. */ - }; - -/* Structure used for storage of ancillary data object information. */ -struct cmsghdr - { - size_t cmsg_len; /* Length of data in cmsg_data plus length - of cmsghdr structure. */ - int cmsg_level; /* Originating protocol. */ - int cmsg_type; /* Protocol specific type. */ -#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2 - unsigned char __cmsg_data[0]; /* Ancillary data. */ - /* XXX Perhaps this should be removed. */ -#endif - }; - -/* Ancillary data object manipulation macros. */ -#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2 -# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data) -#else -# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1)) -#endif -#define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg) -#define CMSG_FIRSTHDR(mhdr) \ - ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \ - ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL) -#define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \ - & ~(sizeof (size_t) - 1)) -#define CMSG_SPACE(len) (CMSG_ALIGN (len) \ - + CMSG_ALIGN (sizeof (struct cmsghdr))) -#define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len)) - -__BEGIN_DECLS -extern struct cmsghdr *__cmsg_nxthdr __P ((struct msghdr *__mhdr, - struct cmsghdr *__cmsg)); -__END_DECLS -#ifdef __USE_EXTERN_INLINES -# ifndef _EXTERN_INLINE -# define _EXTERN_INLINE extern __inline -# endif -_EXTERN_INLINE struct cmsghdr * -__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) -{ - if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr)) - /* The kernel header does this so there may be a reason. */ - return 0; - - __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg - + CMSG_ALIGN (__cmsg->cmsg_len)); - if ((unsigned char *) (__cmsg + 1) >= ((unsigned char *) __mhdr->msg_control - + __mhdr->msg_controllen) - || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len) - >= ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen))) - /* No more entries. */ - return 0; - return __cmsg; -} -#endif /* Use `extern inline'. */ - -/* Socket level message types. This must match the definitions in - <linux/socket.h>. */ -enum - { - SCM_RIGHTS = 0x01, /* Transfer file descriptors. */ -#define SCM_RIGHTS SCM_RIGHTS -#ifdef __USE_BSD - SCM_CREDENTIALS = 0x02, /* Credentials passing. */ -# define SCM_CREDENTIALS SCM_CREDENTIALS -#endif - __SCM_CONNECT = 0x03 /* Data array is `struct scm_connect'. */ - }; - -/* User visible structure for SCM_CREDENTIALS message */ - -struct ucred -{ - pid_t pid; /* PID of sending process. */ - uid_t uid; /* UID of sending process. */ - gid_t gid; /* GID of sending process. */ -}; - -/* Get socket manipulation related informations from kernel headers. */ -#include <asm/socket.h> - - -/* Structure used to manipulate the SO_LINGER option. */ -struct linger - { - int l_onoff; /* Nonzero to linger on close. */ - int l_linger; /* Time to linger. */ - }; - -#endif /* bits/socket.h */ diff --git a/libc/sysdeps/linux/h8300/bits/stab.def b/libc/sysdeps/linux/h8300/bits/stab.def deleted file mode 100644 index 48ea231e6..000000000 --- a/libc/sysdeps/linux/h8300/bits/stab.def +++ /dev/null @@ -1,234 +0,0 @@ -/* Table of DBX symbol codes for the GNU system. - Copyright (C) 1988, 1997 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* This contains contribution from Cygnus Support. */ - -/* Global variable. Only the name is significant. - To find the address, look in the corresponding external symbol. */ -__define_stab (N_GSYM, 0x20, "GSYM") - -/* Function name for BSD Fortran. Only the name is significant. - To find the address, look in the corresponding external symbol. */ -__define_stab (N_FNAME, 0x22, "FNAME") - -/* Function name or text-segment variable for C. Value is its address. - Desc is supposedly starting line number, but GCC doesn't set it - and DBX seems not to miss it. */ -__define_stab (N_FUN, 0x24, "FUN") - -/* Data-segment variable with internal linkage. Value is its address. - "Static Sym". */ -__define_stab (N_STSYM, 0x26, "STSYM") - -/* BSS-segment variable with internal linkage. Value is its address. */ -__define_stab (N_LCSYM, 0x28, "LCSYM") - -/* Name of main routine. Only the name is significant. - This is not used in C. */ -__define_stab (N_MAIN, 0x2a, "MAIN") - -/* Global symbol in Pascal. - Supposedly the value is its line number; I'm skeptical. */ -__define_stab (N_PC, 0x30, "PC") - -/* Number of symbols: 0, files,,funcs,lines according to Ultrix V4.0. */ -__define_stab (N_NSYMS, 0x32, "NSYMS") - -/* "No DST map for sym: name, ,0,type,ignored" according to Ultrix V4.0. */ -__define_stab (N_NOMAP, 0x34, "NOMAP") - -/* New stab from Solaris. I don't know what it means, but it - don't seem to contain useful information. */ -__define_stab (N_OBJ, 0x38, "OBJ") - -/* New stab from Solaris. I don't know what it means, but it - don't seem to contain useful information. Possibly related to the - optimization flags used in this module. */ -__define_stab (N_OPT, 0x3c, "OPT") - -/* Register variable. Value is number of register. */ -__define_stab (N_RSYM, 0x40, "RSYM") - -/* Modula-2 compilation unit. Can someone say what info it contains? */ -__define_stab (N_M2C, 0x42, "M2C") - -/* Line number in text segment. Desc is the line number; - value is corresponding address. */ -__define_stab (N_SLINE, 0x44, "SLINE") - -/* Similar, for data segment. */ -__define_stab (N_DSLINE, 0x46, "DSLINE") - -/* Similar, for bss segment. */ -__define_stab (N_BSLINE, 0x48, "BSLINE") - -/* Sun's source-code browser stabs. ?? Don't know what the fields are. - Supposedly the field is "path to associated .cb file". THIS VALUE - OVERLAPS WITH N_BSLINE! */ -__define_stab (N_BROWS, 0x48, "BROWS") - -/* GNU Modula-2 definition module dependency. Value is the modification time - of the definition file. Other is non-zero if it is imported with the - GNU M2 keyword %INITIALIZE. Perhaps N_M2C can be used if there - are enough empty fields? */ -__define_stab(N_DEFD, 0x4a, "DEFD") - -/* THE FOLLOWING TWO STAB VALUES CONFLICT. Happily, one is for Modula-2 - and one is for C++. Still,... */ -/* GNU C++ exception variable. Name is variable name. */ -__define_stab (N_EHDECL, 0x50, "EHDECL") -/* Modula2 info "for imc": name,,0,0,0 according to Ultrix V4.0. */ -__define_stab (N_MOD2, 0x50, "MOD2") - -/* GNU C++ `catch' clause. Value is its address. Desc is nonzero if - this entry is immediately followed by a CAUGHT stab saying what exception - was caught. Multiple CAUGHT stabs means that multiple exceptions - can be caught here. If Desc is 0, it means all exceptions are caught - here. */ -__define_stab (N_CATCH, 0x54, "CATCH") - -/* Structure or union element. Value is offset in the structure. */ -__define_stab (N_SSYM, 0x60, "SSYM") - -/* Name of main source file. - Value is starting text address of the compilation. */ -__define_stab (N_SO, 0x64, "SO") - -/* Automatic variable in the stack. Value is offset from frame pointer. - Also used for type descriptions. */ -__define_stab (N_LSYM, 0x80, "LSYM") - -/* Beginning of an include file. Only Sun uses this. - In an object file, only the name is significant. - The Sun linker puts data into some of the other fields. */ -__define_stab (N_BINCL, 0x82, "BINCL") - -/* Name of sub-source file (#include file). - Value is starting text address of the compilation. */ -__define_stab (N_SOL, 0x84, "SOL") - -/* Parameter variable. Value is offset from argument pointer. - (On most machines the argument pointer is the same as the frame pointer. */ -__define_stab (N_PSYM, 0xa0, "PSYM") - -/* End of an include file. No name. - This and N_BINCL act as brackets around the file's output. - In an object file, there is no significant data in this entry. - The Sun linker puts data into some of the fields. */ -__define_stab (N_EINCL, 0xa2, "EINCL") - -/* Alternate entry point. Value is its address. */ -__define_stab (N_ENTRY, 0xa4, "ENTRY") - -/* Beginning of lexical block. - The desc is the nesting level in lexical blocks. - The value is the address of the start of the text for the block. - The variables declared inside the block *precede* the N_LBRAC symbol. */ -__define_stab (N_LBRAC, 0xc0, "LBRAC") - -/* Place holder for deleted include file. Replaces a N_BINCL and everything - up to the corresponding N_EINCL. The Sun linker generates these when - it finds multiple identical copies of the symbols from an include file. - This appears only in output from the Sun linker. */ -__define_stab (N_EXCL, 0xc2, "EXCL") - -/* Modula-2 scope information. Can someone say what info it contains? */ -__define_stab (N_SCOPE, 0xc4, "SCOPE") - -/* End of a lexical block. Desc matches the N_LBRAC's desc. - The value is the address of the end of the text for the block. */ -__define_stab (N_RBRAC, 0xe0, "RBRAC") - -/* Begin named common block. Only the name is significant. */ -__define_stab (N_BCOMM, 0xe2, "BCOMM") - -/* End named common block. Only the name is significant - (and it should match the N_BCOMM). */ -__define_stab (N_ECOMM, 0xe4, "ECOMM") - -/* End common (local name): value is address. - I'm not sure how this is used. */ -__define_stab (N_ECOML, 0xe8, "ECOML") - -/* These STAB's are used on Gould systems for Non-Base register symbols - or something like that. FIXME. I have assigned the values at random - since I don't have a Gould here. Fixups from Gould folk welcome... */ -__define_stab (N_NBTEXT, 0xF0, "NBTEXT") -__define_stab (N_NBDATA, 0xF2, "NBDATA") -__define_stab (N_NBBSS, 0xF4, "NBBSS") -__define_stab (N_NBSTS, 0xF6, "NBSTS") -__define_stab (N_NBLCS, 0xF8, "NBLCS") - -/* Second symbol entry containing a length-value for the preceding entry. - The value is the length. */ -__define_stab (N_LENG, 0xfe, "LENG") - -/* The above information, in matrix format. - - STAB MATRIX - _________________________________________________ - | 00 - 1F are not dbx stab symbols | - | In most cases, the low bit is the EXTernal bit| - - | 00 UNDEF | 02 ABS | 04 TEXT | 06 DATA | - | 01 |EXT | 03 |EXT | 05 |EXT | 07 |EXT | - - | 08 BSS | 0A INDR | 0C FN_SEQ | 0E | - | 09 |EXT | 0B | 0D | 0F | - - | 10 | 12 COMM | 14 SETA | 16 SETT | - | 11 | 13 | 15 | 17 | - - | 18 SETD | 1A SETB | 1C SETV | 1E WARNING| - | 19 | 1B | 1D | 1F FN | - - |_______________________________________________| - | Debug entries with bit 01 set are unused. | - | 20 GSYM | 22 FNAME | 24 FUN | 26 STSYM | - | 28 LCSYM | 2A MAIN | 2C | 2E | - | 30 PC | 32 NSYMS | 34 NOMAP | 36 | - | 38 OBJ | 3A | 3C OPT | 3E | - | 40 RSYM | 42 M2C | 44 SLINE | 46 DSLINE | - | 48 BSLINE*| 4A DEFD | 4C | 4E | - | 50 EHDECL*| 52 | 54 CATCH | 56 | - | 58 | 5A | 5C | 5E | - | 60 SSYM | 62 | 64 SO | 66 | - | 68 | 6A | 6C | 6E | - | 70 | 72 | 74 | 76 | - | 78 | 7A | 7C | 7E | - | 80 LSYM | 82 BINCL | 84 SOL | 86 | - | 88 | 8A | 8C | 8E | - | 90 | 92 | 94 | 96 | - | 98 | 9A | 9C | 9E | - | A0 PSYM | A2 EINCL | A4 ENTRY | A6 | - | A8 | AA | AC | AE | - | B0 | B2 | B4 | B6 | - | B8 | BA | BC | BE | - | C0 LBRAC | C2 EXCL | C4 SCOPE | C6 | - | C8 | CA | CC | CE | - | D0 | D2 | D4 | D6 | - | D8 | DA | DC | DE | - | E0 RBRAC | E2 BCOMM | E4 ECOMM | E6 | - | E8 ECOML | EA | EC | EE | - | F0 | F2 | F4 | F6 | - | F8 | FA | FC | FE LENG | - +-----------------------------------------------+ - * 50 EHDECL is also MOD2. - * 48 BSLINE is also BROWS. - */ diff --git a/libc/sysdeps/linux/h8300/bits/stat.h b/libc/sysdeps/linux/h8300/bits/stat.h deleted file mode 100644 index c175668a0..000000000 --- a/libc/sysdeps/linux/h8300/bits/stat.h +++ /dev/null @@ -1,127 +0,0 @@ -/* Copyright (C) 1992, 1995, 1996, 1997, 1998 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _SYS_STAT_H -# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead." -#endif - -/* Versions of the `struct stat' data structure. */ -#define _STAT_VER_LINUX_OLD 1 -#define _STAT_VER_KERNEL 1 -#define _STAT_VER_SVR4 2 -#define _STAT_VER_LINUX 3 -#define _STAT_VER _STAT_VER_LINUX /* The one defined below. */ - -/* Versions of the `xmknod' interface. */ -#define _MKNOD_VER_LINUX 1 -#define _MKNOD_VER_SVR4 2 -#define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */ - - -struct stat - { - __dev_t st_dev; /* Device. */ - unsigned short int __pad1; -#ifndef __USE_FILE_OFFSET64 - __ino_t st_ino; /* File serial number. */ -#else - __ino64_t st_ino; /* File serial number. */ -#endif - __mode_t st_mode; /* File mode. */ - __nlink_t st_nlink; /* Link count. */ - __uid_t st_uid; /* User ID of the file's owner. */ - __gid_t st_gid; /* Group ID of the file's group.*/ - __dev_t st_rdev; /* Device number, if device. */ - unsigned short int __pad2; -#ifndef __USE_FILE_OFFSET64 - __off_t st_size; /* Size of file, in bytes. */ -#else - __off64_t st_size; /* Size of file, in bytes. */ -#endif - unsigned long int st_blksize; /* Optimal block size for I/O. */ - -#ifndef __USE_FILE_OFFSET64 - __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ -#else - __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ -#endif - __time_t st_atime; /* Time of last access. */ - unsigned long int __unused1; - __time_t st_mtime; /* Time of last modification. */ - unsigned long int __unused2; - __time_t st_ctime; /* Time of last status change. */ - unsigned long int __unused3; - unsigned long int __unused4; - unsigned long int __unused5; - }; - -#ifdef __USE_LARGEFILE64 -struct stat64 - { - __dev_t st_dev; /* Device. */ - unsigned short int __pad1; - - __ino64_t st_ino; /* File serial number. */ - __mode_t st_mode; /* File mode. */ - __nlink_t st_nlink; /* Link count. */ - __uid_t st_uid; /* User ID of the file's owner. */ - __gid_t st_gid; /* Group ID of the file's group.*/ - __dev_t st_rdev; /* Device number, if device. */ - unsigned short int __pad2; - __off64_t st_size; /* Size of file, in bytes. */ - unsigned long int st_blksize; /* Optimal block size for I/O. */ - - __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ - __time_t st_atime; /* Time of last access. */ - unsigned long int __unused1; - __time_t st_mtime; /* Time of last modification. */ - unsigned long int __unused2; - __time_t st_ctime; /* Time of last status change. */ - unsigned long int __unused3; - unsigned long int __unused4; - unsigned long int __unused5; - }; -#endif - -/* Tell code we have these members. */ -#define _STATBUF_ST_BLKSIZE -#define _STATBUF_ST_RDEV - -/* Encoding of the file mode. */ - -#define __S_IFMT 0170000 /* These bits determine file type. */ - -/* File types. */ -#define __S_IFDIR 0040000 /* Directory. */ -#define __S_IFCHR 0020000 /* Character device. */ -#define __S_IFBLK 0060000 /* Block device. */ -#define __S_IFREG 0100000 /* Regular file. */ -#define __S_IFIFO 0010000 /* FIFO. */ - -/* These don't actually exist on System V, but having them doesn't hurt. */ -#define __S_IFLNK 0120000 /* Symbolic link. */ -#define __S_IFSOCK 0140000 /* Socket. */ - -/* Protection bits. */ - -#define __S_ISUID 04000 /* Set user ID on execution. */ -#define __S_ISGID 02000 /* Set group ID on execution. */ -#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ -#define __S_IREAD 0400 /* Read by owner. */ -#define __S_IWRITE 0200 /* Write by owner. */ -#define __S_IEXEC 0100 /* Execute by owner. */ diff --git a/libc/sysdeps/linux/h8300/bits/statfs.h b/libc/sysdeps/linux/h8300/bits/statfs.h deleted file mode 100644 index 31ae564b4..000000000 --- a/libc/sysdeps/linux/h8300/bits/statfs.h +++ /dev/null @@ -1,61 +0,0 @@ -/* Copyright (C) 1997, 1998 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _SYS_STATFS_H -# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead." -#endif - -#include <bits/types.h> /* for __fsid_t and __fsblkcnt_t*/ - -struct statfs - { - int f_type; - int f_bsize; -#ifndef __USE_FILE_OFFSET64 - __fsblkcnt_t f_blocks; - __fsblkcnt_t f_bfree; - __fsblkcnt_t f_bavail; - __fsfilcnt_t f_files; - __fsfilcnt_t f_ffree; -#else - __fsblkcnt64_t f_blocks; - __fsblkcnt64_t f_bfree; - __fsblkcnt64_t f_bavail; - __fsfilcnt64_t f_files; - __fsfilcnt64_t f_ffree; -#endif - __fsid_t f_fsid; - int f_namelen; - int f_spare[6]; - }; - -#ifdef __USE_LARGEFILE64 -struct statfs64 - { - int f_type; - int f_bsize; - __fsblkcnt64_t f_blocks; - __fsblkcnt64_t f_bfree; - __fsblkcnt64_t f_bavail; - __fsfilcnt64_t f_files; - __fsfilcnt64_t f_ffree; - __fsid_t f_fsid; - int f_namelen; - int f_spare[6]; - }; -#endif diff --git a/libc/sysdeps/linux/h8300/bits/statvfs.h b/libc/sysdeps/linux/h8300/bits/statvfs.h deleted file mode 100644 index 32e03f31e..000000000 --- a/libc/sysdeps/linux/h8300/bits/statvfs.h +++ /dev/null @@ -1,99 +0,0 @@ -/* Copyright (C) 1997, 1998, 2000, 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. */ - -#ifndef _SYS_STATVFS_H -# error "Never include <bits/statvfs.h> directly; use <sys/statvfs.h> instead." -#endif - -#include <bits/types.h> /* For __fsblkcnt_t and __fsfilcnt_t. */ - -struct statvfs - { - unsigned long int f_bsize; - unsigned long int f_frsize; -#ifndef __USE_FILE_OFFSET64 - __fsblkcnt_t f_blocks; - __fsblkcnt_t f_bfree; - __fsblkcnt_t f_bavail; - __fsfilcnt_t f_files; - __fsfilcnt_t f_ffree; - __fsfilcnt_t f_favail; -#else - __fsblkcnt64_t f_blocks; - __fsblkcnt64_t f_bfree; - __fsblkcnt64_t f_bavail; - __fsfilcnt64_t f_files; - __fsfilcnt64_t f_ffree; - __fsfilcnt64_t f_favail; -#endif - unsigned long int f_fsid; - int __f_unused; - unsigned long int f_flag; - unsigned long int f_namemax; - int __f_spare[6]; - }; -#define _STATVFSBUF_F_UNUSED - -#ifdef __USE_LARGEFILE64 -struct statvfs64 - { - unsigned long int f_bsize; - unsigned long int f_frsize; - __fsblkcnt64_t f_blocks; - __fsblkcnt64_t f_bfree; - __fsblkcnt64_t f_bavail; - __fsfilcnt64_t f_files; - __fsfilcnt64_t f_ffree; - __fsfilcnt64_t f_favail; - unsigned long int f_fsid; - int __f_unused; - unsigned long int f_flag; - unsigned long int f_namemax; - int __f_spare[6]; - }; -#endif - -/* Definitions for the flag in `f_flag'. These definitions should be - kept in sync which the definitions in <sys/mount.h>. */ -enum -{ - ST_RDONLY = 1, /* Mount read-only. */ -#define ST_RDONLY ST_RDONLY - ST_NOSUID = 2, /* Ignore suid and sgid bits. */ -#define ST_NOSUID ST_NOSUID -#ifdef __USE_GNU - ST_NODEV = 4, /* Disallow access to device special files. */ -# define ST_NODEV ST_NODEV - ST_NOEXEC = 8, /* Disallow program execution. */ -# define ST_NOEXEC ST_NOEXEC - ST_SYNCHRONOUS = 16, /* Writes are synced at once. */ -# define ST_SYNCHRONOUS ST_SYNCHRONOUS - ST_MANDLOCK = 64, /* Allow mandatory locks on an FS. */ -# define ST_MANDLOCK ST_MANDLOCK - ST_WRITE = 128, /* Write on file/directory/symlink. */ -# define ST_WRITE ST_WRITE - ST_APPEND = 256, /* Append-only file. */ -# define ST_APPEND ST_APPEND - ST_IMMUTABLE = 512, /* Immutable file. */ -# define ST_IMMUTABLE ST_IMMUTABLE - ST_NOATIME = 1024, /* Do not update access times. */ -# define ST_NOATIME ST_NOATIME - ST_NODIRATIME /* Do not update directory access times. */ -# define ST_NODIRATIME ST_NODIRATIME -#endif /* Use GNU. */ -}; diff --git a/libc/sysdeps/linux/h8300/bits/stdio-lock.h b/libc/sysdeps/linux/h8300/bits/stdio-lock.h deleted file mode 100644 index edc69f6cf..000000000 --- a/libc/sysdeps/linux/h8300/bits/stdio-lock.h +++ /dev/null @@ -1,39 +0,0 @@ -/* Thread package specific definitions of stream lock type. - Copyright (C) 1996, 1997, 1998 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include <pthread.h> - -typedef pthread_mutex_t _IO_lock_t; - -/* We need recursive (counting) mutexes. */ -#define _IO_lock_initializer PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP - - -#define _IO_cleanup_region_start(_fct, _fp) \ - __libc_cleanup_region_start (_fct, _fp) -#define _IO_cleanup_region_end(_doit) \ - __libc_cleanup_region_end (_doit) -#define _IO_lock_init(_name) \ - __libc_lock_init_recursive (_name) -#define _IO_lock_fini(_name) \ - __libc_lock_fini_recursive (_name) -#define _IO_lock_lock(_name) \ - __libc_lock_lock (_name) -#define _IO_lock_unlock(_name) \ - __libc_lock_unlock (_name) diff --git a/libc/sysdeps/linux/h8300/bits/stdio.h b/libc/sysdeps/linux/h8300/bits/stdio.h deleted file mode 100644 index c58643461..000000000 --- a/libc/sysdeps/linux/h8300/bits/stdio.h +++ /dev/null @@ -1,168 +0,0 @@ -/* Optimizing macros and inline functions for stdio functions. - Copyright (C) 198 Free Software Foundation, Inc. - - The GNU C Library 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. - - 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _STDIO_H -# error "Never include <bits/stdio.h> directly; use <stdio.h> instead." -#endif - -#ifdef __cplusplus -# define __STDIO_INLINE inline -#else -# define __STDIO_INLINE extern __inline -#endif - - -#ifdef __USE_EXTERN_INLINES -/* Write formatted output to stdout from argument list ARG. */ -__STDIO_INLINE int -vprintf (__const char *__restrict __fmt, _G_va_list __arg) -{ - return vfprintf (stdout, __fmt, __arg); -} - -/* Read a character from stdin. */ -__STDIO_INLINE int -getchar (void) -{ - return _IO_getc (stdin); -} - - -# if defined __USE_POSIX || defined __USE_MISC -/* This is defined in POSIX.1:1996. */ -__STDIO_INLINE int -getc_unlocked (FILE *__fp) -{ - return _IO_getc_unlocked (__fp); -} - -/* This is defined in POSIX.1:1996. */ -__STDIO_INLINE int -getchar_unlocked (void) -{ - return _IO_getc_unlocked (stdin); -} -# endif /* POSIX || misc */ - - -/* Write a character to stdout. */ -__STDIO_INLINE int -putchar (int __c) -{ - return _IO_putc (__c, stdout); -} - - -# ifdef __USE_MISC -/* Faster version when locking is not necessary. */ -__STDIO_INLINE int -fputc_unlocked (int __c, FILE *__stream) -{ - return _IO_putc_unlocked (__c, __stream); -} -# endif /* misc */ - - -# if defined __USE_POSIX || defined __USE_MISC -/* This is defined in POSIX.1:1996. */ -__STDIO_INLINE int -putc_unlocked (int __c, FILE *__stream) -{ - return _IO_putc_unlocked (__c, __stream); -} - -/* This is defined in POSIX.1:1996. */ -__STDIO_INLINE int -putchar_unlocked (int __c) -{ - return _IO_putc_unlocked (__c, stdout); -} -# endif /* POSIX || misc */ - - -# ifdef __USE_GNU -/* Like `getdelim', but reads up to a newline. */ -__STDIO_INLINE _IO_ssize_t -getline (char **__lineptr, size_t *__n, FILE *__stream) -{ - return __getdelim (__lineptr, __n, '\n', __stream); -} -# endif /* GNU */ - - -# ifdef __USE_MISC -/* Faster versions when locking is not required. */ -__STDIO_INLINE int -feof_unlocked (FILE *__stream) -{ - return _IO_feof_unlocked (__stream); -} - -/* Faster versions when locking is not required. */ -__STDIO_INLINE int -ferror_unlocked (FILE *__stream) -{ - return _IO_ferror_unlocked (__stream); -} -# endif /* misc */ - -#endif /* Use extern inlines. */ - - -#if defined __USE_MISC && defined __GNUC__ && defined __OPTIMIZE__ -/* Perform some simple optimizations. */ -# define fread_unlocked(ptr, size, n, stream) \ - (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) \ - && (size_t) ((size) * (n)) <= 8 && (size) != 0) \ - ? ({ char *__ptr = (char *) (ptr); \ - FILE *__stream = (stream); \ - size_t __cnt; \ - for (__cnt = (size) * (n); __cnt > 0; --__cnt) \ - { \ - int __c = _IO_getc_unlocked (__stream); \ - if (__c == EOF) \ - break; \ - *__ptr++ = __c; \ - } \ - ((size_t) ((size) * (n)) - __cnt) / (size); }) \ - : (((__builtin_constant_p (size) && (size) == 0) \ - || (__builtin_constant_p (n) && (n) == 0)) \ - /* Evaluate all parameters once. */ \ - ? ((void) (ptr), (void) (stream), (void) (size), \ - (void) (n), 0) \ - : fread_unlocked (ptr, size, n, stream)))) - -# define fwrite_unlocked(ptr, size, n, stream) \ - (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) \ - && (size_t) ((size) * (n)) <= 8 && (size) != 0) \ - ? ({ const char *__ptr = (const char *) (ptr); \ - FILE *__stream = (stream); \ - size_t __cnt; \ - for (__cnt = (size) * (n); __cnt > 0; --__cnt) \ - if (_IO_putc_unlocked (*__ptr++, __stream) == EOF) \ - break; \ - ((size_t) ((size) * (n)) - __cnt) / (size); }) \ - : (((__builtin_constant_p (size) && (size) == 0) \ - || (__builtin_constant_p (n) && (n) == 0)) \ - /* Evaluate all parameters once. */ \ - ? ((void) (ptr), (void) (stream), (void) (size), n) \ - : fwrite_unlocked (ptr, size, n, stream)))) -#endif - -/* Define helper macro. */ -#undef __STDIO_INLINE diff --git a/libc/sysdeps/linux/h8300/bits/stdio_lim.h b/libc/sysdeps/linux/h8300/bits/stdio_lim.h deleted file mode 100644 index 9787b4358..000000000 --- a/libc/sysdeps/linux/h8300/bits/stdio_lim.h +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (C) 1994, 1997, 1998 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#if !defined _STDIO_H && !defined __need_FOPEN_MAX -# error "Never include <bits/stdio_lim.h> directly; use <stdio.h> instead." -#endif - -#ifdef _STDIO_H -# define L_tmpnam 20 -# define TMP_MAX 238328 -# define FILENAME_MAX 255 - -# ifdef __USE_POSIX -# define L_ctermid 9 -# define L_cuserid 9 -# endif -#endif - -#if defined __need_FOPEN_MAX || defined _STDIO_H -# undef FOPEN_MAX -# define FOPEN_MAX 256 -#endif diff --git a/libc/sysdeps/linux/h8300/bits/string.h b/libc/sysdeps/linux/h8300/bits/string.h deleted file mode 100644 index 6462ef0d8..000000000 --- a/libc/sysdeps/linux/h8300/bits/string.h +++ /dev/null @@ -1,26 +0,0 @@ -/* Optimized, inlined string functions. m680x0 version, x >= 2. - Copyright (C) 1997 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _STRING_H -# error "Never use <bits/string.h> directly; include <string.h> instead." -#endif - -/* Currently the only purpose of this file is to tell the generic inline - macros that unaligned memory access is possible. */ -#define _STRING_ARCH_unaligned 1 diff --git a/libc/sysdeps/linux/h8300/bits/string2.h b/libc/sysdeps/linux/h8300/bits/string2.h deleted file mode 100644 index 734f5b0e3..000000000 --- a/libc/sysdeps/linux/h8300/bits/string2.h +++ /dev/null @@ -1,1214 +0,0 @@ -/* Machine-independant string function optimizations. - Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. - - The GNU C Library 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. - - 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _STRING_H -# error "Never use <bits/string2.h> directly; include <string.h> instead." -#endif - -#ifndef __NO_STRING_INLINES - -/* Unlike the definitions in the header <bits/string.h> the - definitions contained here are not optimized down to assembler - level. Those optimizations are not always a good idea since this - means the code size increases a lot. Instead the definitions here - optimize some functions in a way which do not dramatically - increase the code size and which do not use assembler. The main - trick is to use GNU CC's `__builtin_constant_p' function. - - Every function XXX which has a defined version in - <bits/string.h> must be accompanied by a symbol _HAVE_STRING_ARCH_XXX - to make sure we don't get redefinitions. - - We must use here macros instead of inline functions since the - trick won't work with the latter. */ - -#ifndef __STRING_INLINE -# ifdef __cplusplus -# define __STRING_INLINE inline -# else -# define __STRING_INLINE extern __inline -# endif -#endif - -#if _STRING_ARCH_unaligned -/* If we can do unaligned memory accesses we must know the endianess. */ -# include <endian.h> -# include <bits/types.h> - -# if __BYTE_ORDER == __LITTLE_ENDIAN -# define __STRING2_SMALL_GET16(src, idx) \ - (((__const unsigned char *) (__const char *) (src))[idx + 1] << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx]) -# define __STRING2_SMALL_GET32(src, idx) \ - (((((__const unsigned char *) (__const char *) (src))[idx + 3] << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 2]) << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 1]) << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx]) -# else -# define __STRING2_SMALL_GET16(src, idx) \ - (((__const unsigned char *) (__const char *) (src))[idx] << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 1]) -# define __STRING2_SMALL_GET32(src, idx) \ - (((((__const unsigned char *) (__const char *) (src))[idx] << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 1]) << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 2]) << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 3]) -# endif -#else -/* These are a few types we need for the optimizations if we cannot - use unaligned memory accesses. */ -# define __STRING2_COPY_TYPE(N) \ - typedef struct { unsigned char __arr[N]; } \ - __STRING2_COPY_ARR##N __attribute__ ((packed)) -__STRING2_COPY_TYPE (2); -__STRING2_COPY_TYPE (3); -__STRING2_COPY_TYPE (4); -__STRING2_COPY_TYPE (5); -__STRING2_COPY_TYPE (6); -__STRING2_COPY_TYPE (7); -__STRING2_COPY_TYPE (8); -# undef __STRING2_COPY_TYPE -#endif - -/* Dereferencing a pointer arg to run sizeof on it fails for the void - pointer case, so we use this instead. - Note that __x is evaluated twice. */ -#define __string2_1bptr_p(__x) \ - ((size_t)(const void *)((__x) + 1) - (size_t)(const void *)(__x) == 1) - -/* Set N bytes of S to C. */ -#ifndef _HAVE_STRING_ARCH_memset -# if _STRING_ARCH_unaligned -# define memset(s, c, n) \ - (__extension__ (__builtin_constant_p (n) && (n) <= 16 \ - ? ((n) == 1 \ - ? __memset_1 (s, c) \ - : __memset_gc (s, c, n)) \ - : (__builtin_constant_p (c) && (c) == '\0' \ - ? ({ void *__s = (s); __bzero (__s, n); __s; }) \ - : memset (s, c, n)))) - -# define __memset_1(s, c) ({ void *__s = (s); \ - *((__uint8_t *) __s) = (__uint8_t) c; __s; }) - -# define __memset_gc(s, c, n) \ - ({ void *__s = (s); \ - union { \ - unsigned int __ui; \ - unsigned short int __usi; \ - unsigned char __uc; \ - } *__u = __s; \ - __uint8_t __c = (__uint8_t) (c); \ - \ - /* This `switch' statement will be removed at compile-time. */ \ - switch ((unsigned int) (n)) \ - { \ - case 15: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 11: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 7: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 3: \ - __u->__usi = (unsigned short int) __c * 0x0101; \ - __u = __extension__ (void *)((char *) __u + 2); \ - __u->__uc = (unsigned char) __c; \ - break; \ - \ - case 14: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 10: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 6: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 2: \ - __u->__usi = (unsigned short int) __c * 0x0101; \ - break; \ - \ - case 13: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 9: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 5: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 1: \ - __u->__uc = (unsigned char) __c; \ - break; \ - \ - case 16: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 12: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 8: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 4: \ - __u->__ui = __c * 0x01010101; \ - case 0: \ - break; \ - } \ - \ - __s; }) -# else -# define memset(s, c, n) \ - (__extension__ (__builtin_constant_p (c) && (c) == '\0' \ - ? ({ void *__s = (s); __bzero (__s, n); __s; }) \ - : memset (s, c, n))) -# endif - -/* GCC optimizes memset(s, 0, n) but not bzero(s, n). - The optimization is broken before EGCS 1.1. */ -# if defined __GNUC__ \ - && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 90)) -# define __bzero(s, n) __builtin_memset (s, '\0', n) -# endif - -#endif - - -/* Copy N bytes from SRC to DEST, returning pointer to byte following the - last copied. */ -#ifdef __USE_GNU -# ifndef _HAVE_STRING_ARCH_mempcpy -# define __mempcpy(dest, src, n) \ - (__extension__ (__builtin_constant_p (src) && __builtin_constant_p (n) \ - && __string2_1bptr_p (src) && n <= 8 \ - ? __mempcpy_small (dest, __mempcpy_args (src), n) \ - : __mempcpy (dest, src, n))) -/* In glibc we use this function frequently but for namespace reasons - we have to use the name `__mempcpy'. */ -# define mempcpy(dest, src, n) __mempcpy (dest, src, n) - -# if _STRING_ARCH_unaligned -# define __mempcpy_args(src) \ - ((char *) (src))[0], ((char *) (src))[2], ((char *) (src))[4], \ - ((char *) (src))[6], \ - __extension__ __STRING2_SMALL_GET16 (src, 0), \ - __extension__ __STRING2_SMALL_GET16 (src, 4), \ - __extension__ __STRING2_SMALL_GET32 (src, 0), \ - __extension__ __STRING2_SMALL_GET32 (src, 4) -__STRING_INLINE void *__mempcpy_small (void *, char, char, char, char, - __uint16_t, __uint16_t, __uint32_t, - __uint32_t, size_t); -__STRING_INLINE void * -__mempcpy_small (void *__dest1, - char __src0_1, char __src2_1, char __src4_1, char __src6_1, - __uint16_t __src0_2, __uint16_t __src4_2, - __uint32_t __src0_4, __uint32_t __src4_4, - size_t __srclen) -{ - union { - __uint32_t __ui; - __uint16_t __usi; - unsigned char __uc; - unsigned char __c; - } *__u = __dest1; - switch ((unsigned int) __srclen) - { - case 1: - __u->__c = __src0_1; - __u = __extension__ (void *)((char *) __u + 1); - break; - case 2: - __u->__usi = __src0_2; - __u = __extension__ (void *)((char *) __u + 2); - break; - case 3: - __u->__usi = __src0_2; - __u = __extension__ (void *)((char *) __u + 2); - __u->__c = __src2_1; - __u = __extension__ (void *)((char *) __u + 1); - break; - case 4: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - break; - case 5: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__c = __src4_1; - __u = __extension__ (void *)((char *) __u + 1); - break; - case 6: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__usi = __src4_2; - __u = __extension__ (void *)((char *) __u + 2); - break; - case 7: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__usi = __src4_2; - __u = __extension__ (void *)((char *) __u + 2); - __u->__c = __src6_1; - __u = __extension__ (void *)((char *) __u + 1); - break; - case 8: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__ui = __src4_4; - __u = __extension__ (void *)((char *) __u + 4); - break; - } - return (void *) __u; -} -# else -# define __mempcpy_args(src) \ - ((__const char *) (src))[0], \ - __extension__ ((__STRING2_COPY_ARR2) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1] } }), \ - __extension__ ((__STRING2_COPY_ARR3) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2] } }), \ - __extension__ ((__STRING2_COPY_ARR4) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3] } }), \ - __extension__ ((__STRING2_COPY_ARR5) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4] } }), \ - __extension__ ((__STRING2_COPY_ARR6) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5] } }), \ - __extension__ ((__STRING2_COPY_ARR7) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - ((__const char *) (src))[6] } }), \ - __extension__ ((__STRING2_COPY_ARR8) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - ((__const char *) (src))[6], ((__const char *) (src))[7] } }) -__STRING_INLINE void *__mempcpy_small (void *, char, __STRING2_COPY_ARR2, - __STRING2_COPY_ARR3, - __STRING2_COPY_ARR4, - __STRING2_COPY_ARR5, - __STRING2_COPY_ARR6, - __STRING2_COPY_ARR7, - __STRING2_COPY_ARR8, size_t); -__STRING_INLINE void * -__mempcpy_small (void *__dest, char __src1, - __STRING2_COPY_ARR2 __src2, __STRING2_COPY_ARR3 __src3, - __STRING2_COPY_ARR4 __src4, __STRING2_COPY_ARR5 __src5, - __STRING2_COPY_ARR6 __src6, __STRING2_COPY_ARR7 __src7, - __STRING2_COPY_ARR8 __src8, size_t __srclen) -{ - union { - char __c; - __STRING2_COPY_ARR2 __sca2; - __STRING2_COPY_ARR3 __sca3; - __STRING2_COPY_ARR4 __sca4; - __STRING2_COPY_ARR5 __sca5; - __STRING2_COPY_ARR6 __sca6; - __STRING2_COPY_ARR7 __sca7; - __STRING2_COPY_ARR8 __sca8; - } *__u = __dest; - switch ((unsigned int) __srclen) - { - case 1: - __u->__c = __src1; - break; - case 2: - __extension__ __u->__sca2 = __src2; - break; - case 3: - __extension__ __u->__sca3 = __src3; - break; - case 4: - __extension__ __u->__sca4 = __src4; - break; - case 5: - __extension__ __u->__sca5 = __src5; - break; - case 6: - __extension__ __u->__sca6 = __src6; - break; - case 7: - __extension__ __u->__sca7 = __src7; - break; - case 8: - __extension__ __u->__sca8 = __src8; - break; - } - return __extension__ (void *)((char *) __u + __srclen); -} -# endif -# endif -#endif - - -/* Return pointer to C in S. */ -#ifndef _HAVE_STRING_ARCH_strchr -extern __ptr_t __rawmemchr (const __ptr_t __s, int __c); -# define strchr(s, c) \ - (__extension__ (__builtin_constant_p (c) && (c) == '\0' \ - ? (char *) __rawmemchr (s, c) \ - : strchr (s, c))) -#endif - - -/* Copy SRC to DEST. */ -#ifndef _HAVE_STRING_ARCH_strcpy -# define strcpy(dest, src) \ - (__extension__ (__builtin_constant_p (src) \ - ? (__string2_1bptr_p (src) && strlen (src) + 1 <= 8 \ - ? __strcpy_small (dest, __strcpy_args (src), \ - strlen (src) + 1) \ - : (char *) memcpy (dest, src, strlen (src) + 1)) \ - : strcpy (dest, src))) - -# if _STRING_ARCH_unaligned -# define __strcpy_args(src) \ - __extension__ __STRING2_SMALL_GET16 (src, 0), \ - __extension__ __STRING2_SMALL_GET16 (src, 4), \ - __extension__ __STRING2_SMALL_GET32 (src, 0), \ - __extension__ __STRING2_SMALL_GET32 (src, 4) -__STRING_INLINE char *__strcpy_small (char *, __uint16_t, __uint16_t, - __uint32_t, __uint32_t, size_t); -__STRING_INLINE char * -__strcpy_small (char *__dest, - __uint16_t __src0_2, __uint16_t __src4_2, - __uint32_t __src0_4, __uint32_t __src4_4, - size_t __srclen) -{ - union { - __uint32_t __ui; - __uint16_t __usi; - unsigned char __uc; - } *__u = (void *) __dest; - switch ((unsigned int) __srclen) - { - case 1: - __u->__uc = '\0'; - break; - case 2: - __u->__usi = __src0_2; - break; - case 3: - __u->__usi = __src0_2; - __u = __extension__ (void *)((char *) __u + 2); - __u->__uc = '\0'; - break; - case 4: - __u->__ui = __src0_4; - break; - case 5: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__uc = '\0'; - break; - case 6: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__usi = __src4_2; - break; - case 7: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__usi = __src4_2; - __u = __extension__ (void *)((char *) __u + 2); - __u->__uc = '\0'; - break; - case 8: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__ui = __src4_4; - break; - } - return __dest; -} -# else -# define __strcpy_args(src) \ - __extension__ ((__STRING2_COPY_ARR2) \ - { { ((__const char *) (src))[0], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR3) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR4) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR5) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR6) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR7) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR8) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - ((__const char *) (src))[6], '\0' } }) -__STRING_INLINE char *__strcpy_small (char *, __STRING2_COPY_ARR2, - __STRING2_COPY_ARR3, - __STRING2_COPY_ARR4, - __STRING2_COPY_ARR5, - __STRING2_COPY_ARR6, - __STRING2_COPY_ARR7, - __STRING2_COPY_ARR8, size_t); -__STRING_INLINE char * -__strcpy_small (char *__dest, - __STRING2_COPY_ARR2 __src2, __STRING2_COPY_ARR3 __src3, - __STRING2_COPY_ARR4 __src4, __STRING2_COPY_ARR5 __src5, - __STRING2_COPY_ARR6 __src6, __STRING2_COPY_ARR7 __src7, - __STRING2_COPY_ARR8 __src8, size_t __srclen) -{ - union { - char __c; - __STRING2_COPY_ARR2 __sca2; - __STRING2_COPY_ARR3 __sca3; - __STRING2_COPY_ARR4 __sca4; - __STRING2_COPY_ARR5 __sca5; - __STRING2_COPY_ARR6 __sca6; - __STRING2_COPY_ARR7 __sca7; - __STRING2_COPY_ARR8 __sca8; - } *__u = (void *) __dest; - switch ((unsigned int) __srclen) - { - case 1: - __u->__c = '\0'; - break; - case 2: - __extension__ __u->__sca2 = __src2; - break; - case 3: - __extension__ __u->__sca3 = __src3; - break; - case 4: - __extension__ __u->__sca4 = __src4; - break; - case 5: - __extension__ __u->__sca5 = __src5; - break; - case 6: - __extension__ __u->__sca6 = __src6; - break; - case 7: - __extension__ __u->__sca7 = __src7; - break; - case 8: - __extension__ __u->__sca8 = __src8; - break; - } - return __dest; -} -# endif -#endif - - -/* Copy SRC to DEST, returning pointer to final NUL byte. */ -#ifdef __USE_GNU -# ifndef _HAVE_STRING_ARCH_stpcpy -# define __stpcpy(dest, src) \ - (__extension__ (__builtin_constant_p (src) \ - ? (__string2_1bptr_p (src) && strlen (src) + 1 <= 8 \ - ? __stpcpy_small (dest, __stpcpy_args (src), \ - strlen (src) + 1) \ - : ((char *) __mempcpy (dest, src, strlen (src) + 1) - 1))\ - : __stpcpy (dest, src))) -/* In glibc we use this function frequently but for namespace reasons - we have to use the name `__stpcpy'. */ -# define stpcpy(dest, src) __stpcpy (dest, src) - -# if _STRING_ARCH_unaligned -# define __stpcpy_args(src) \ - __extension__ __STRING2_SMALL_GET16 (src, 0), \ - __extension__ __STRING2_SMALL_GET16 (src, 4), \ - __extension__ __STRING2_SMALL_GET32 (src, 0), \ - __extension__ __STRING2_SMALL_GET32 (src, 4) -__STRING_INLINE char *__stpcpy_small (char *, __uint16_t, __uint16_t, - __uint32_t, __uint32_t, size_t); -__STRING_INLINE char * -__stpcpy_small (char *__dest, - __uint16_t __src0_2, __uint16_t __src4_2, - __uint32_t __src0_4, __uint32_t __src4_4, - size_t __srclen) -{ - union { - unsigned int __ui; - unsigned short int __usi; - unsigned char __uc; - char __c; - } *__u = (void *) __dest; - switch ((unsigned int) __srclen) - { - case 1: - __u->__uc = '\0'; - break; - case 2: - __u->__usi = __src0_2; - __u = __extension__ (void *)((char *) __u + 1); - break; - case 3: - __u->__usi = __src0_2; - __u = __extension__ (void *)((char *) __u + 2); - __u->__uc = '\0'; - break; - case 4: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 3); - break; - case 5: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__uc = '\0'; - break; - case 6: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__usi = __src4_2; - __u = __extension__ (void *)((char *) __u + 1); - break; - case 7: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__usi = __src4_2; - __u = __extension__ (void *)((char *) __u + 2); - __u->__uc = '\0'; - break; - case 8: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__ui = __src4_4; - __u = __extension__ (void *)((char *) __u + 3); - break; - } - return &__u->__c; -} -# else -# define __stpcpy_args(src) \ - __extension__ ((__STRING2_COPY_ARR2) \ - { { ((__const char *) (src))[0], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR3) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR4) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR5) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR6) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR7) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR8) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - ((__const char *) (src))[6], '\0' } }) -__STRING_INLINE char *__stpcpy_small (char *, __STRING2_COPY_ARR2, - __STRING2_COPY_ARR3, - __STRING2_COPY_ARR4, - __STRING2_COPY_ARR5, - __STRING2_COPY_ARR6, - __STRING2_COPY_ARR7, - __STRING2_COPY_ARR8, size_t); -__STRING_INLINE char * -__stpcpy_small (char *__dest, - __STRING2_COPY_ARR2 __src2, __STRING2_COPY_ARR3 __src3, - __STRING2_COPY_ARR4 __src4, __STRING2_COPY_ARR5 __src5, - __STRING2_COPY_ARR6 __src6, __STRING2_COPY_ARR7 __src7, - __STRING2_COPY_ARR8 __src8, size_t __srclen) -{ - union { - char __c; - __STRING2_COPY_ARR2 __sca2; - __STRING2_COPY_ARR3 __sca3; - __STRING2_COPY_ARR4 __sca4; - __STRING2_COPY_ARR5 __sca5; - __STRING2_COPY_ARR6 __sca6; - __STRING2_COPY_ARR7 __sca7; - __STRING2_COPY_ARR8 __sca8; - } *__u = (void *) __dest; - switch ((unsigned int) __srclen) - { - case 1: - __u->__c = '\0'; - break; - case 2: - __extension__ __u->__sca2 = __src2; - break; - case 3: - __extension__ __u->__sca3 = __src3; - break; - case 4: - __extension__ __u->__sca4 = __src4; - break; - case 5: - __extension__ __u->__sca5 = __src5; - break; - case 6: - __extension__ __u->__sca6 = __src6; - break; - case 7: - __extension__ __u->__sca7 = __src7; - break; - case 8: - __extension__ __u->__sca8 = __src8; - break; - } - return __dest + __srclen - 1; -} -# endif -# endif -#endif - - -/* Copy no more than N characters of SRC to DEST. */ -#ifndef _HAVE_STRING_ARCH_strncpy -# if defined _HAVE_STRING_ARCH_memset && defined _HAVE_STRING_ARCH_mempcpy -# define strncpy(dest, src, n) \ - (__extension__ ({ char *__dest = (dest); \ - __builtin_constant_p (src) && __builtin_constant_p (n) \ - ? (strlen (src) + 1 >= ((size_t) (n)) \ - ? (char *) memcpy (__dest, src, n) \ - : (memset (__mempcpy (__dest, src, strlen (src)), \ - '\0', n - strlen (src)), \ - __dest)) \ - : strncpy (__dest, src, n); })) -# else -# define strncpy(dest, src, n) \ - (__extension__ (__builtin_constant_p (src) && __builtin_constant_p (n) \ - ? (strlen (src) + 1 >= ((size_t) (n)) \ - ? (char *) memcpy (dest, src, n) \ - : strncpy (dest, src, n)) \ - : strncpy (dest, src, n))) -# endif -#endif - - -/* Append no more than N characters from SRC onto DEST. */ -#ifndef _HAVE_STRING_ARCH_strncat -# ifdef _HAVE_STRING_ARCH_strchr -# define strncat(dest, src, n) \ - (__extension__ ({ char *__dest = (dest); \ - __builtin_constant_p (src) && __builtin_constant_p (n) \ - ? (strlen (src) < ((size_t) (n)) \ - ? strcat (__dest, src) \ - : (memcpy (strchr (__dest, '\0'), src, n), __dest)) \ - : strncat (dest, src, n); })) -# else -# define strncat(dest, src, n) \ - (__extension__ (__builtin_constant_p (src) && __builtin_constant_p (n) \ - ? (strlen (src) < ((size_t) (n)) \ - ? strcat (dest, src) \ - : strncat (dest, src, n)) \ - : strncat (dest, src, n))) -# endif -#endif - - -/* Compare characters of S1 and S2. */ -#ifndef _HAVE_STRING_ARCH_strcmp -# define strcmp(s1, s2) \ - __extension__ \ - ({ size_t __s1_len, __s2_len; \ - (__builtin_constant_p (s1) && __builtin_constant_p (s2) \ - && (__s1_len = strlen (s1), __s2_len = strlen (s2), \ - (!__string2_1bptr_p (s1) || __s1_len >= 4) \ - && (!__string2_1bptr_p (s2) || __s2_len >= 4)) \ - ? memcmp ((__const char *) (s1), (__const char *) (s2), \ - (__s1_len < __s2_len ? __s1_len : __s2_len) + 1) \ - : (__builtin_constant_p (s1) && __string2_1bptr_p (s1) \ - && (__s1_len = strlen (s1), __s1_len < 4) \ - ? (__builtin_constant_p (s2) && __string2_1bptr_p (s2) \ - ? __strcmp_cc (s1, s2, __s1_len) \ - : __strcmp_cg (s1, s2, __s1_len)) \ - : (__builtin_constant_p (s2) && __string2_1bptr_p (s2) \ - && (__s2_len = strlen (s2), __s2_len < 4) \ - ? (__builtin_constant_p (s1) && __string2_1bptr_p (s1) \ - ? __strcmp_cc (s1, s2, __s2_len) \ - : __strcmp_gc (s1, s2, __s2_len)) \ - : strcmp (s1, s2)))); }) - -# define __strcmp_cc(s1, s2, l) \ - (__extension__ ({ register int __result = \ - (((__const unsigned char *) (__const char *) (s1))[0] \ - - ((__const unsigned char *) (__const char *)(s2))[0]);\ - if (l > 0 && __result == 0) \ - { \ - __result = (((__const unsigned char *) \ - (__const char *) (s1))[1] \ - - ((__const unsigned char *) \ - (__const char *) (s2))[1]); \ - if (l > 1 && __result == 0) \ - { \ - __result = \ - (((__const unsigned char *) \ - (__const char *) (s1))[2] \ - - ((__const unsigned char *) \ - (__const char *) (s2))[2]); \ - if (l > 2 && __result == 0) \ - __result = \ - (((__const unsigned char *) \ - (__const char *) (s1))[3] \ - - ((__const unsigned char *) \ - (__const char *) (s2))[3]); \ - } \ - } \ - __result; })) - -# define __strcmp_cg(s1, s2, l1) \ - (__extension__ ({ __const unsigned char *__s2 = \ - (__const unsigned char *) (__const char *) (s2); \ - register int __result = \ - (((__const unsigned char *) (__const char *) (s1))[0] \ - - __s2[0]); \ - if (l1 > 0 && __result == 0) \ - { \ - __result = (((__const unsigned char *) \ - (__const char *) (s1))[1] - __s2[1]); \ - if (l1 > 1 && __result == 0) \ - { \ - __result = (((__const unsigned char *) \ - (__const char *) (s1))[2] - __s2[2]);\ - if (l1 > 2 && __result == 0) \ - __result = (((__const unsigned char *) \ - (__const char *) (s1))[3] \ - - __s2[3]); \ - } \ - } \ - __result; })) - -# define __strcmp_gc(s1, s2, l2) \ - (__extension__ ({ __const unsigned char *__s1 = \ - (__const unsigned char *) (__const char *) (s1); \ - register int __result = \ - __s1[0] - ((__const unsigned char *) \ - (__const char *) (s2))[0]; \ - if (l2 > 0 && __result == 0) \ - { \ - __result = (__s1[1] \ - - ((__const unsigned char *) \ - (__const char *) (s2))[1]); \ - if (l2 > 1 && __result == 0) \ - { \ - __result = \ - (__s1[2] - ((__const unsigned char *) \ - (__const char *) (s2))[2]); \ - if (l2 > 2 && __result == 0) \ - __result = \ - (__s1[3] \ - - ((__const unsigned char *) \ - (__const char *) (s2))[3]); \ - } \ - } \ - __result; })) -#endif - - -/* Compare N characters of S1 and S2. */ -#ifndef _HAVE_STRING_ARCH_strncmp -# define strncmp(s1, s2, n) \ - (__extension__ (__builtin_constant_p (n) \ - && ((__builtin_constant_p (s1) \ - && strlen (s1) < ((size_t) (n))) \ - || (__builtin_constant_p (s2) \ - && strlen (s2) < ((size_t) (n)))) \ - ? strcmp (s1, s2) : strncmp (s1, s2, n))) -#endif - - -/* Return the length of the initial segment of S which - consists entirely of characters not in REJECT. */ -#ifndef _HAVE_STRING_ARCH_strcspn -# define strcspn(s, reject) \ - __extension__ \ - ({ char __r0, __r1, __r2; \ - (__builtin_constant_p (reject) && __string2_1bptr_p (reject) \ - ? ((__r0 = ((__const char *) (reject))[0], __r0 == '\0') \ - ? strlen (s) \ - : ((__r1 = ((__const char *) (reject))[1], __r1 == '\0') \ - ? __strcspn_c1 (s, __r0) \ - : ((__r2 = ((__const char *) (reject))[2], __r2 == '\0') \ - ? __strcspn_c2 (s, __r0, __r1) \ - : (((__const char *) (reject))[3] == '\0' \ - ? __strcspn_c3 (s, __r0, __r1, __r2) \ - : strcspn (s, reject))))) \ - : strcspn (s, reject)); }) - -__STRING_INLINE size_t __strcspn_c1 (__const char *__s, char __reject); -__STRING_INLINE size_t -__strcspn_c1 (__const char *__s, char __reject) -{ - register size_t __result = 0; - while (__s[__result] != '\0' && __s[__result] != __reject) - ++__result; - return __result; -} - -__STRING_INLINE size_t __strcspn_c2 (__const char *__s, char __reject1, - char __reject2); -__STRING_INLINE size_t -__strcspn_c2 (__const char *__s, char __reject1, char __reject2) -{ - register size_t __result = 0; - while (__s[__result] != '\0' && __s[__result] != __reject1 - && __s[__result] != __reject2) - ++__result; - return __result; -} - -__STRING_INLINE size_t __strcspn_c3 (__const char *__s, char __reject1, - char __reject2, char __reject3); -__STRING_INLINE size_t -__strcspn_c3 (__const char *__s, char __reject1, char __reject2, - char __reject3) -{ - register size_t __result = 0; - while (__s[__result] != '\0' && __s[__result] != __reject1 - && __s[__result] != __reject2 && __s[__result] != __reject3) - ++__result; - return __result; -} -#endif - - -/* Return the length of the initial segment of S which - consists entirely of characters in ACCEPT. */ -#ifndef _HAVE_STRING_ARCH_strspn -# define strspn(s, accept) \ - __extension__ \ - ({ char __a0, __a1, __a2; \ - (__builtin_constant_p (accept) && __string2_1bptr_p (accept) \ - ? ((__a0 = ((__const char *) (accept))[0], __a0 == '\0') \ - ? 0 \ - : ((__a1 = ((__const char *) (accept))[1], __a1 == '\0') \ - ? __strspn_c1 (s, __a0) \ - : ((__a2 = ((__const char *) (accept))[2], __a2 == '\0') \ - ? __strspn_c2 (s, __a0, __a1) \ - : (((__const char *) (accept))[3] == '\0' \ - ? __strspn_c3 (s, __a0, __a1, __a2) \ - : strspn (s, accept))))) \ - : strspn (s, accept)); }) - -__STRING_INLINE size_t __strspn_c1 (__const char *__s, char __accept); -__STRING_INLINE size_t -__strspn_c1 (__const char *__s, char __accept) -{ - register size_t __result = 0; - /* Please note that __accept never can be '\0'. */ - while (__s[__result] == __accept) - ++__result; - return __result; -} - -__STRING_INLINE size_t __strspn_c2 (__const char *__s, char __accept1, - char __accept2); -__STRING_INLINE size_t -__strspn_c2 (__const char *__s, char __accept1, char __accept2) -{ - register size_t __result = 0; - /* Please note that __accept1 and __accept2 never can be '\0'. */ - while (__s[__result] == __accept1 || __s[__result] == __accept2) - ++__result; - return __result; -} - -__STRING_INLINE size_t __strspn_c3 (__const char *__s, char __accept1, - char __accept2, char __accept3); -__STRING_INLINE size_t -__strspn_c3 (__const char *__s, char __accept1, char __accept2, char __accept3) -{ - register size_t __result = 0; - /* Please note that __accept1 to __accept3 never can be '\0'. */ - while (__s[__result] == __accept1 || __s[__result] == __accept2 - || __s[__result] == __accept3) - ++__result; - return __result; -} -#endif - - -/* Find the first occurrence in S of any character in ACCEPT. */ -#ifndef _HAVE_STRING_ARCH_strpbrk -# define strpbrk(s, accept) \ - __extension__ \ - ({ char __a0, __a1, __a2; \ - (__builtin_constant_p (accept) && __string2_1bptr_p (accept) \ - ? ((__a0 = ((__const char *) (accept))[0], __a0 == '\0') \ - ? NULL \ - : ((__a1 = ((__const char *) (accept))[1], __a1 == '\0') \ - ? strchr (s, __a0) \ - : ((__a2 = ((__const char *) (accept))[2], __a2 == '\0') \ - ? __strpbrk_c2 (s, __a0, __a1) \ - : (((__const char *) (accept))[3] == '\0' \ - ? __strpbrk_c3 (s, __a0, __a1, __a2) \ - : strpbrk (s, accept))))) \ - : strpbrk (s, accept)); }) - -__STRING_INLINE char *__strpbrk_c2 (__const char *__s, char __accept1, - char __accept2); -__STRING_INLINE char * -__strpbrk_c2 (__const char *__s, char __accept1, char __accept2) -{ - /* Please note that __accept1 and __accept2 never can be '\0'. */ - while (*__s != '\0' && *__s != __accept1 && *__s != __accept2) - ++__s; - return *__s == '\0' ? NULL : (char *) (size_t) __s; -} - -__STRING_INLINE char *__strpbrk_c3 (__const char *__s, char __accept1, - char __accept2, char __accept3); -__STRING_INLINE char * -__strpbrk_c3 (__const char *__s, char __accept1, char __accept2, - char __accept3) -{ - /* Please note that __accept1 to __accept3 never can be '\0'. */ - while (*__s != '\0' && *__s != __accept1 && *__s != __accept2 - && *__s != __accept3) - ++__s; - return *__s == '\0' ? NULL : (char *) (size_t) __s; -} -#endif - - -/* Find the first occurrence of NEEDLE in HAYSTACK. */ -#ifndef _HAVE_STRING_ARCH_strstr -# define strstr(haystack, needle) \ - (__extension__ (__builtin_constant_p (needle) && __string2_1bptr_p (needle) \ - ? (((__const char *) (needle))[0] == '\0' \ - ? (char *) (size_t) (haystack) \ - : (((__const char *) (needle))[1] == '\0' \ - ? strchr (haystack, \ - ((__const char *) (needle))[0]) \ - : strstr (haystack, needle))) \ - : strstr (haystack, needle))) -#endif - - -#if defined __USE_GNU && !defined _FORCE_INLINES -# ifndef _HAVE_STRING_ARCH_strnlen -__STRING_INLINE size_t -strnlen (__const char *__string, size_t __maxlen) -{ - __const char *__end = (__const char *) memchr (__string, '\0', __maxlen); - return __end ? (size_t) (__end - __string) : __maxlen; -} -# endif -#endif - - -#ifndef _HAVE_STRING_ARCH_strtok_r -# define __strtok_r(s, sep, nextp) \ - (__extension__ (__builtin_constant_p (sep) && __string2_1bptr_p (sep) \ - ? (((__const char *) (sep))[0] != '\0' \ - && ((__const char *) (sep))[1] == '\0' \ - ? __strtok_r_1c (s, ((__const char *) (sep))[0], nextp) \ - : __strtok_r (s, sep, nextp)) \ - : __strtok_r (s, sep, nextp))) - -__STRING_INLINE char *__strtok_r_1c (char *__s, char __sep, char **__nextp); -__STRING_INLINE char * -__strtok_r_1c (char *__s, char __sep, char **__nextp) -{ - char *__result; - if (__s == NULL) - __s = *__nextp; - while (*__s == __sep) - ++__s; - if (*__s == '\0') - __result = NULL; - else - { - __result = __s; - while (*__s != '\0' && *__s != __sep) - ++__s; - if (*__s == '\0') - *__nextp = __s; - else - { - *__s = '\0'; - *__nextp = __s + 1; - } - } - return __result; -} -# if defined __USE_POSIX || defined __USE_MISC -# define strtok_r(s, sep, nextp) __strtok_r ((s), (sep), (nextp)) -# endif -#endif - - -#ifndef _HAVE_STRING_ARCH_strsep - -# define __strsep(s, reject) \ - __extension__ \ - ({ char __r0, __r1, __r2; \ - (__builtin_constant_p (reject) && __string2_1bptr_p (reject) \ - && (__r0 = ((__const char *) (reject))[0], \ - ((__const char *) (reject))[0] != '\0') \ - ? ((__r1 = ((__const char *) (reject))[1], \ - ((__const char *) (reject))[1] == '\0') \ - ? __strsep_1c (s, __r0) \ - : ((__r2 = ((__const char *) (reject))[2], __r2 == '\0') \ - ? __strsep_2c (s, __r0, __r1) \ - : (((__const char *) (reject))[3] == '\0' \ - ? __strsep_3c (s, __r0, __r1, __r2) \ - : __strsep_g (s, reject)))) \ - : __strsep_g (s, reject)); }) - -__STRING_INLINE char *__strsep_1c (char **__s, char __reject); -__STRING_INLINE char * -__strsep_1c (char **__s, char __reject) -{ - register char *__retval = *__s; - if (__retval == NULL) - return *__s = NULL; - if (*__retval == __reject) - *(*__s)++ = '\0'; - else - if ((*__s = strchr (__retval, __reject)) != NULL) - *(*__s)++ = '\0'; - else - *__s = NULL; - return __retval; -} - -__STRING_INLINE char *__strsep_2c (char **__s, char __reject1, char __reject2); -__STRING_INLINE char * -__strsep_2c (char **__s, char __reject1, char __reject2) -{ - register char *__retval = *__s; - if (__retval == NULL) - return *__s = NULL; - if (*__retval == __reject1 || *__retval == __reject2) - *(*__s)++ = '\0'; - else - { - register char *__cp = __retval; - while (*__cp != '\0' && *__cp != __reject1 && *__cp != __reject2) - ++__cp; - if (*__cp != '\0') - { - *__s = __cp; - *(*__s)++ = '\0'; - } - else - *__s = NULL; - } - return __retval; -} - -__STRING_INLINE char *__strsep_3c (char **__s, char __reject1, char __reject2, - char __reject3); -__STRING_INLINE char * -__strsep_3c (char **__s, char __reject1, char __reject2, char __reject3) -{ - register char *__retval = *__s; - if (__retval == NULL) - return *__s = NULL; - if (*__retval == __reject1 || *__retval == __reject2 - || *__retval == __reject3) - *(*__s)++ = '\0'; - else - { - register char *__cp = __retval; - while (*__cp != '\0' && *__cp != __reject1 && *__cp != __reject2 - && *__cp != __reject3) - ++__cp; - if (*__cp != '\0') - { - *__s = __cp; - *(*__s)++ = '\0'; - } - else - *__s = NULL; - } - return __retval; -} - -__STRING_INLINE char *__strsep_g (char **__s, __const char *__reject); -__STRING_INLINE char * -__strsep_g (char **__s, __const char *__reject) -{ - register char *__retval = *__s; - if (__retval == NULL) - return NULL; - if ((*__s = strpbrk (__retval, __reject)) != NULL) - *(*__s)++ = '\0'; - return __retval; -} -# ifdef __USE_BSD -# define strsep(s, reject) __strsep ((s), (reject)) -# endif -#endif - -/* We need the memory allocation functions for inline strdup(). - Referring to stdlib.h (even minimally) is not allowed - in any of the tight standards compliant modes. */ -#ifdef __USE_MISC - -# if !defined _HAVE_STRING_ARCH_strdup || !defined _HAVE_STRING_ARCH_strndup -# define __need_malloc_and_calloc -# include <stdlib.h> -# endif - -# ifndef _HAVE_STRING_ARCH_strdup - -# define __strdup(s) \ - (__extension__ (__builtin_constant_p (s) && __string2_1bptr_p (s) \ - ? (((__const char *) (s))[0] == '\0' \ - ? (char *) calloc (1, 1) \ - : ({ size_t __len = strlen (s) + 1; \ - char *__retval = (char *) malloc (__len); \ - if (__retval != NULL) \ - __retval = (char *) memcpy (__retval, s, __len); \ - __retval; })) \ - : __strdup (s))) - -# if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN_EXTENDED -# define strdup(s) __strdup (s) -# endif -# endif - -#endif /* Use misc. or use GNU. */ - -#ifndef _FORCE_INLINES -# undef __STRING_INLINE -#endif - -#endif /* No string inlines. */ diff --git a/libc/sysdeps/linux/h8300/bits/stropts.h b/libc/sysdeps/linux/h8300/bits/stropts.h deleted file mode 100644 index ed807473c..000000000 --- a/libc/sysdeps/linux/h8300/bits/stropts.h +++ /dev/null @@ -1,219 +0,0 @@ -/* Copyright (C) 1998, 1999 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _BITS_STROPTS_H -#define _BITS_STROPTS_H 1 - -#include <bits/types.h> - -/* Macros used as `request' argument to `ioctl'. */ -#define __SID ('S' << 8) - -#define I_NREAD (__SID | 1) /* Counts the number of data bytes in the data - block in the first message. */ -#define I_PUSH (__SID | 2) /* Push STREAMS module onto top of the current - STREAM, just below the STREAM head. */ -#define I_POP (__SID | 3) /* Remove STREAMS module from just below the - STREAM head. */ -#define I_LOOK (__SID | 4) /* Retrieve the name of the module just below - the STREAM head and place it in a character - string. */ -#define I_FLUSH (__SID | 5) /* Flush all input and/or output. */ -#define I_SRDOPT (__SID | 6) /* Sets the read mode. */ -#define I_GRDOPT (__SID | 7) /* Returns the current read mode setting. */ -#define I_STR (__SID | 8) /* Construct an internal STREAMS `ioctl' - message and send that message downstream. */ -#define I_SETSIG (__SID | 9) /* Inform the STREAM head that the process - wants the SIGPOLL signal issued. */ -#define I_GETSIG (__SID |10) /* Return the events for which the calling - process is currently registered to be sent - a SIGPOLL signal. */ -#define I_FIND (__SID |11) /* Compares the names of all modules currently - present in the STREAM to the name pointed to - by `arg'. */ -#define I_LINK (__SID |12) /* Connect two STREAMs. */ -#define I_UNLINK (__SID |13) /* Disconnects the two STREAMs. */ -#define I_PEEK (__SID |15) /* Allows a process to retrieve the information - in the first message on the STREAM head read - queue without taking the message off the - queue. */ -#define I_FDINSERT (__SID |16) /* Create a message from the specified - buffer(s), adds information about another - STREAM, and send the message downstream. */ -#define I_SENDFD (__SID |17) /* Requests the STREAM associated with `fildes' - to send a message, containing a file - pointer, to the STREAM head at the other end - of a STREAMS pipe. */ -#define I_RECVFD (__SID |14) /* Non-EFT definition. */ -#define I_SWROPT (__SID |19) /* Set the write mode. */ -#define I_GWRSET (__SID |20) /* Return the current write mode setting. */ -#define I_LIST (__SID |21) /* List all the module names on the STREAM, up - to and including the topmost driver name. */ -#define I_PLINK (__SID |22) /* Connect two STREAMs with a persistent - link. */ -#define I_PUNLINK (__SID |23) /* Disconnect the two STREAMs that were - connected with a persistent link. */ -#define I_FLUSHBAND (__SID |28) /* Flush only band specified. */ -#define I_CKBAND (__SID |29) /* Check if the message of a given priority - band exists on the STREAM head read - queue. */ -#define I_GETBAND (__SID |30) /* Return the priority band of the first - message on the STREAM head read queue. */ -#define I_ATMARK (__SID |31) /* See if the current message on the STREAM - head read queue is "marked" by some module - downstream. */ -#define I_SETCLTIME (__SID |32) /* Set the time the STREAM head will delay when - a STREAM is closing and there is data on - the write queues. */ -#define I_GETCLTIME (__SID |33) /* Get current value for closing timeout. */ -#define I_CANPUT (__SID |34) /* Check if a certain band is writable. */ - - -/* Used in `I_LOOK' request. */ -#define FMNAMESZ 8 /* compatibility w/UnixWare/Solaris. */ - -/* Flush options. */ -#define FLUSHR 0x01 /* Flush read queues. */ -#define FLUSHW 0x02 /* Flush write queues. */ -#define FLUSHRW 0x03 /* Flush read and write queues. */ -#define FLUSHBAND 0x04 /* Flush only specified band. */ - -/* Possible arguments for `I_SETSIG'. */ -#define S_INPUT 0x0001 /* A message, other than a high-priority - message, has arrived. */ -#define S_HIPRI 0x0002 /* A high-priority message is present. */ -#define S_OUTPUT 0x0004 /* The write queue for normal data is no longer - full. */ -#define S_MSG 0x0008 /* A STREAMS signal message that contains the - SIGPOLL signal reaches the front of the - STREAM head read queue. */ -#define S_ERROR 0x0010 /* Notification of an error condition. */ -#define S_HANGUP 0x0020 /* Notification of a hangup. */ -#define S_RDNORM 0x0040 /* A normal message has arrived. */ -#define S_WRNORM S_OUTPUT -#define S_RDBAND 0x0080 /* A message with a non-zero priority has - arrived. */ -#define S_WRBAND 0x0100 /* The write queue for a non-zero priority - band is no longer full. */ -#define S_BANDURG 0x0200 /* When used in conjunction with S_RDBAND, - SIGURG is generated instead of SIGPOLL when - a priority message reaches the front of the - STREAM head read queue. */ - -/* Option for `I_PEEK'. */ -#define RS_HIPRI 0x01 /* Only look for high-priority messages. */ - -/* Options for `I_SRDOPT'. */ -#define RNORM 0x0000 /* Byte-STREAM mode, the default. */ -#define RMSGD 0x0001 /* Message-discard mode. */ -#define RMSGN 0x0002 /* Message-nondiscard mode. */ -#define RPROTDAT 0x0004 /* Deliver the control part of a message as - data. */ -#define RPROTDIS 0x0008 /* Discard the control part of a message, - delivering any data part. */ -#define RPROTNORM 0x0010 /* Fail `read' with EBADMSG if a message - containing a control part is at the front - of the STREAM head read queue. */ -#define RPROTMASK 0x001C /* The RPROT bits */ - -/* Possible mode for `I_SWROPT'. */ -#define SNDZERO 0x001 /* Send a zero-length message downstream when a - `write' of 0 bytes occurs. */ -#define SNDPIPE 0x002 /* Send SIGPIPE on write and putmsg if - sd_werror is set. */ - -/* Arguments for `I_ATMARK'. */ -#define ANYMARK 0x01 /* Check if the message is marked. */ -#define LASTMARK 0x02 /* Check if the message is the last one marked - on the queue. */ - -/* Argument for `I_UNLINK'. */ -#define MUXID_ALL (-1) /* Unlink all STREAMs linked to the STREAM - associated with `fildes'. */ - - -/* Macros for `getmsg', `getpmsg', `putmsg' and `putpmsg'. */ -#define MSG_HIPRI 0x01 /* Send/receive high priority message. */ -#define MSG_ANY 0x02 /* Receive any message. */ -#define MSG_BAND 0x04 /* Receive message from specified band. */ - -/* Values returned by getmsg and getpmsg */ -#define MORECTL 1 /* More control information is left in - message. */ -#define MOREDATA 2 /* More data is left in message. */ - - -/* Structure used for the I_FLUSHBAND ioctl on streams. */ -struct bandinfo - { - unsigned char bi_pri; - int bi_flag; - }; - -struct strbuf - { - int maxlen; /* Maximum buffer length. */ - int len; /* Length of data. */ - char *buf; /* Pointer to buffer. */ - }; - -struct strpeek - { - struct strbuf ctlbuf; - struct strbuf databuf; - __t_uscalar_t flags; /* UnixWare/Solaris compatibility. */ - }; - -struct strfdinsert - { - struct strbuf ctlbuf; - struct strbuf databuf; - __t_uscalar_t flags; /* UnixWare/Solaris compatibility. */ - int fildes; - int offset; - }; - -struct strioctl - { - int ic_cmd; - int ic_timout; - int ic_len; - char *ic_dp; - }; - -struct strrecvfd - { - int fd; - __uid_t uid; - __gid_t gid; - char fill[8]; /* UnixWare/Solaris compatibility */ - }; - - -struct str_mlist - { - char l_name[FMNAMESZ + 1]; - }; - -struct str_list - { - int sl_nmods; - struct str_mlist *sl_modlist; - }; - -#endif /* bits/stropts.h */ diff --git a/libc/sysdeps/linux/h8300/bits/termios.h b/libc/sysdeps/linux/h8300/bits/termios.h deleted file mode 100644 index a5ba1d258..000000000 --- a/libc/sysdeps/linux/h8300/bits/termios.h +++ /dev/null @@ -1,212 +0,0 @@ -/* termios type and macro definitions. Linux version. - Copyright (C) 1993, 94, 95, 96, 97, 98, 99 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _TERMIOS_H -# error "Never include <bits/termios.h> directly; use <termios.h> instead." -#endif - -typedef unsigned char cc_t; -typedef unsigned int speed_t; -typedef unsigned int tcflag_t; - -#define NCCS 32 -struct termios - { - tcflag_t c_iflag; /* input mode flags */ - tcflag_t c_oflag; /* output mode flags */ - tcflag_t c_cflag; /* control mode flags */ - tcflag_t c_lflag; /* local mode flags */ - cc_t c_line; /* line discipline */ - cc_t c_cc[NCCS]; /* control characters */ - speed_t c_ispeed; /* input speed */ - speed_t c_ospeed; /* output speed */ - }; - -/* c_cc characters */ -#define VINTR 0 -#define VQUIT 1 -#define VERASE 2 -#define VKILL 3 -#define VEOF 4 -#define VTIME 5 -#define VMIN 6 -#define VSWTC 7 -#define VSTART 8 -#define VSTOP 9 -#define VSUSP 10 -#define VEOL 11 -#define VREPRINT 12 -#define VDISCARD 13 -#define VWERASE 14 -#define VLNEXT 15 -#define VEOL2 16 - -/* c_iflag bits */ -#define IGNBRK 0000001 -#define BRKINT 0000002 -#define IGNPAR 0000004 -#define PARMRK 0000010 -#define INPCK 0000020 -#define ISTRIP 0000040 -#define INLCR 0000100 -#define IGNCR 0000200 -#define ICRNL 0000400 -#define IUCLC 0001000 -#define IXON 0002000 -#define IXANY 0004000 -#define IXOFF 0010000 -#define IMAXBEL 0020000 - -/* c_oflag bits */ -#define OPOST 0000001 -#define OLCUC 0000002 -#define ONLCR 0000004 -#define OCRNL 0000010 -#define ONOCR 0000020 -#define ONLRET 0000040 -#define OFILL 0000100 -#define OFDEL 0000200 -#if defined __USE_MISC || defined __USE_XOPEN -# define NLDLY 0000400 -# define NL0 0000000 -# define NL1 0000400 -# define CRDLY 0003000 -# define CR0 0000000 -# define CR1 0001000 -# define CR2 0002000 -# define CR3 0003000 -# define TABDLY 0014000 -# define TAB0 0000000 -# define TAB1 0004000 -# define TAB2 0010000 -# define TAB3 0014000 -# define BSDLY 0020000 -# define BS0 0000000 -# define BS1 0020000 -# define FFDLY 0100000 -# define FF0 0000000 -# define FF1 0100000 -#endif - -#define VTDLY 0040000 -#define VT0 0000000 -#define VT1 0040000 - -#ifdef __USE_MISC -# define XTABS 0014000 -#endif - -/* c_cflag bit meaning */ -#ifdef __USE_MISC -# define CBAUD 0010017 -#endif -#define B0 0000000 /* hang up */ -#define B50 0000001 -#define B75 0000002 -#define B110 0000003 -#define B134 0000004 -#define B150 0000005 -#define B200 0000006 -#define B300 0000007 -#define B600 0000010 -#define B1200 0000011 -#define B1800 0000012 -#define B2400 0000013 -#define B4800 0000014 -#define B9600 0000015 -#define B19200 0000016 -#define B38400 0000017 -#ifdef __USE_MISC -# define EXTA B19200 -# define EXTB B38400 -#endif -#define CSIZE 0000060 -#define CS5 0000000 -#define CS6 0000020 -#define CS7 0000040 -#define CS8 0000060 -#define CSTOPB 0000100 -#define CREAD 0000200 -#define PARENB 0000400 -#define PARODD 0001000 -#define HUPCL 0002000 -#define CLOCAL 0004000 -#ifdef __USE_MISC -# define CBAUDEX 0010000 -#endif -#define B57600 0010001 -#define B115200 0010002 -#define B230400 0010003 -#define B460800 0010004 -#define B500000 0010005 -#define B576000 0010006 -#define B921600 0010007 -#define B1000000 0010010 -#define B1152000 0010011 -#define B1500000 0010012 -#define B2000000 0010013 -#define B2500000 0010014 -#define B3000000 0010015 -#define B3500000 0010016 -#define B4000000 0010017 -#ifdef __USE_MISC -# define CIBAUD 002003600000 /* input baud rate (not used) */ -# define CRTSCTS 020000000000 /* flow control */ -#endif - -/* c_lflag bits */ -#define ISIG 0000001 -#define ICANON 0000002 -#if defined __USE_MISC || defined __USE_XOPEN -# define XCASE 0000004 -#endif -#define ECHO 0000010 -#define ECHOE 0000020 -#define ECHOK 0000040 -#define ECHONL 0000100 -#define NOFLSH 0000200 -#define TOSTOP 0000400 -#ifdef __USE_MISC -# define ECHOCTL 0001000 -# define ECHOPRT 0002000 -# define ECHOKE 0004000 -# define FLUSHO 0010000 -# define PENDIN 0040000 -#endif -#define IEXTEN 0100000 - -/* tcflow() and TCXONC use these */ -#define TCOOFF 0 -#define TCOON 1 -#define TCIOFF 2 -#define TCION 3 - -/* tcflush() and TCFLSH use these */ -#define TCIFLUSH 0 -#define TCOFLUSH 1 -#define TCIOFLUSH 2 - -/* tcsetattr uses these */ -#define TCSANOW 0 -#define TCSADRAIN 1 -#define TCSAFLUSH 2 - - -#define _IOT_termios /* Hurd ioctl type field. */ \ - _IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2) diff --git a/libc/sysdeps/linux/h8300/bits/time.h b/libc/sysdeps/linux/h8300/bits/time.h deleted file mode 100644 index 274d61677..000000000 --- a/libc/sysdeps/linux/h8300/bits/time.h +++ /dev/null @@ -1,59 +0,0 @@ -/* System-dependent timing definitions. Linux version. - Copyright (C) 1996, 1997 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* - * Never include this file directly; use <time.h> instead. - */ - -#ifndef __need_timeval -# ifndef _BITS_TIME_H -# define _BITS_TIME_H 1 - -/* ISO/IEC 9899:1990 7.12.1: <time.h> - The macro `CLOCKS_PER_SEC' is the number per second of the value - returned by the `clock' function. */ -/* CAE XSH, Issue 4, Version 2: <time.h> - The value of CLOCKS_PER_SEC is required to be 1 million on all - XSI-conformant systems. */ -# define CLOCKS_PER_SEC 1000000 - -# ifndef __STRICT_ANSI__ -/* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK - presents the real value for clock ticks per second for the system. */ -# define CLK_TCK 100 -# endif - -# endif /* bits/time.h */ -#endif - -#ifdef __need_timeval -# undef __need_timeval -# ifndef _STRUCT_TIMEVAL -# define _STRUCT_TIMEVAL 1 -# include <bits/types.h> - -/* A time value that is accurate to the nearest - microsecond but also has a range of years. */ -struct timeval - { - __time_t tv_sec; /* Seconds. */ - __time_t tv_usec; /* Microseconds. */ - }; -# endif /* struct timeval */ -#endif /* need timeval */ diff --git a/libc/sysdeps/linux/h8300/bits/types.h b/libc/sysdeps/linux/h8300/bits/types.h deleted file mode 100644 index 8f1465424..000000000 --- a/libc/sysdeps/linux/h8300/bits/types.h +++ /dev/null @@ -1,142 +0,0 @@ -/* Copyright (C) 1991,92,94,95,96,97,98,99 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* - * Never include this file directly; use <sys/types.h> instead. - */ - -#ifndef _BITS_TYPES_H -#define _BITS_TYPES_H 1 - -#include <features.h> - -#define __need_size_t -#include <stddef.h> - -/* Convenience types. */ -typedef unsigned char __u_char; -typedef unsigned short __u_short; -typedef unsigned int __u_int; -typedef unsigned long __u_long; -#ifdef __GNUC__ -typedef unsigned long long int __u_quad_t; -typedef long long int __quad_t; -#else -typedef struct - { - long int __val[2]; - } __quad_t; -typedef struct - { - __u_long __val[2]; - } __u_quad_t; -#endif -typedef signed char __int8_t; -typedef unsigned char __uint8_t; -typedef signed short int __int16_t; -typedef unsigned short int __uint16_t; -typedef signed int __int32_t; -typedef unsigned int __uint32_t; -#ifdef __GNUC__ -typedef signed long long int __int64_t; -typedef unsigned long long int __uint64_t; -#endif -typedef __quad_t *__qaddr_t; - -typedef __u_short __dev_t; /* Type of device numbers. */ -typedef __u_short __uid_t; /* Type of user identifications. */ -typedef __u_short __gid_t; /* Type of group identifications. */ -typedef __u_long __ino_t; /* Type of file serial numbers. */ -typedef __u_short __mode_t; /* Type of file attribute bitmasks. */ -typedef __u_short __nlink_t; /* Type of file link counts. */ -typedef long int __off_t; /* Type of file sizes and offsets. */ -typedef __quad_t __loff_t; /* Type of file sizes and offsets. */ -typedef int __pid_t; /* Type of process identifications. */ -typedef int __ssize_t; /* Type of a byte count, or error. */ -typedef __u_long __rlim_t; /* Type of resource counts. */ -typedef __u_quad_t __rlim64_t; /* Type of resource counts (LFS). */ -typedef __u_int __id_t; /* General type for ID. */ - -typedef struct - { - int __val[2]; - } __fsid_t; /* Type of file system IDs. */ - -/* Everythin' else. */ -typedef int __daddr_t; /* The type of a disk address. */ -typedef char *__caddr_t; -typedef long int __time_t; -typedef long int __swblk_t; /* Type of a swap block maybe? */ -typedef unsigned int __useconds_t; -typedef long int __suseconds_t; - -typedef long int __clock_t; - -/* Clock ID used in clock and timer functions. */ -typedef int __clockid_t; - -/* Timer ID returned by `timer_create'. */ -typedef int __timer_t; - -/* Number of descriptors that can fit in an `fd_set'. */ -#define __FD_SETSIZE 1024 - -typedef int __key_t; - -/* Used in `struct shmid_ds'. */ -typedef unsigned short int __ipc_pid_t; - -/* Type to represent block size. */ -typedef long int __blksize_t; - -/* Types from the Large File Support interface. */ - -/* Type to count number os disk blocks. */ -typedef long int __blkcnt_t; -typedef __quad_t __blkcnt64_t; - -/* Type to count file system blocks. */ -typedef __u_long __fsblkcnt_t; -typedef __u_quad_t __fsblkcnt64_t; - -/* Type to count file system inodes. */ -typedef __u_long __fsfilcnt_t; -typedef __u_quad_t __fsfilcnt64_t; - -/* Type of file serial numbers. */ -typedef __u_long __ino64_t; - -/* Type of file sizes and offsets. */ -typedef __loff_t __off64_t; - -/* Used in XTI. */ -typedef long int __t_scalar_t; -typedef unsigned long int __t_uscalar_t; - -/* Duplicates info from stdint.h but this is used in unistd.h. */ -typedef int __intptr_t; - -/* Duplicate info from sys/socket.h. */ -typedef unsigned int __socklen_t; - -/* Now add the thread types. */ -#ifdef __USE_UNIX98 -# include <bits/pthreadtypes.h> -#endif - -#endif /* bits/types.h */ diff --git a/libc/sysdeps/linux/h8300/bits/uio.h b/libc/sysdeps/linux/h8300/bits/uio.h deleted file mode 100644 index 38ac17baa..000000000 --- a/libc/sysdeps/linux/h8300/bits/uio.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (C) 1996, 1997 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _SYS_UIO_H -# error "Never include <bits/uio.h> directly; use <sys/uio.h> instead." -#endif - - -#include <sys/types.h> - - -/* We should normally use the Linux kernel header file to define this - type and macros but this calls for trouble because of the header - includes other kernel headers. */ - -/* Size of object which can be written atomically. - - This macro has different values in different kernel versions. The - latest versions of ther kernel use 1024 and this is good choice. Since - the C library implementation of readv/writev is able to emulate the - functionality even if the currently running kernel does not support - this large value the readv/writev call will not fail because of this. */ -#define UIO_MAXIOV 1024 - - -/* Structure for scatter/gather I/O. */ -struct iovec - { - void *iov_base; /* Pointer to data. */ - size_t iov_len; /* Length of data. */ - }; diff --git a/libc/sysdeps/linux/h8300/bits/ustat.h b/libc/sysdeps/linux/h8300/bits/ustat.h deleted file mode 100644 index 526069a7f..000000000 --- a/libc/sysdeps/linux/h8300/bits/ustat.h +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 1997 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include <sys/types.h> - -struct ustat - { - __daddr_t f_tfree; - __ino_t f_tinode; - char f_fname[6]; - char f_fpack[6]; - }; diff --git a/libc/sysdeps/linux/h8300/bits/utmp.h b/libc/sysdeps/linux/h8300/bits/utmp.h deleted file mode 100644 index d07486e9c..000000000 --- a/libc/sysdeps/linux/h8300/bits/utmp.h +++ /dev/null @@ -1,105 +0,0 @@ -/* The `struct utmp' type, describing entries in the utmp file. GNU version. - Copyright (C) 1993, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. - - The GNU C Library 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. - - 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _UTMP_H -# error "Never include <bits/utmp.h> directly; use <utmp.h> instead." -#endif - -#include <paths.h> -#include <sys/time.h> -#include <sys/types.h> - - -#define UT_LINESIZE 32 -#define UT_NAMESIZE 32 -#define UT_HOSTSIZE 256 - - -/* The structure describing an entry in the database of - previous logins. */ -struct lastlog - { - __time_t ll_time; - char ll_line[UT_LINESIZE]; - char ll_host[UT_HOSTSIZE]; - }; - - -/* The structure describing the status of a terminated process. This - type is used in `struct utmp' below. */ -struct exit_status - { - short int e_termination; /* Process termination status. */ - short int e_exit; /* Process exit status. */ - }; - - -/* The structure describing an entry in the user accounting database. */ -struct utmp -{ - short int ut_type; /* Type of login. */ - pid_t ut_pid; /* Process ID of login process. */ - char ut_line[UT_LINESIZE]; /* Devicename. */ - char ut_id[4]; /* Inittab ID. */ - char ut_user[UT_NAMESIZE]; /* Username. */ - char ut_host[UT_HOSTSIZE]; /* Hostname for remote login. */ - struct exit_status ut_exit; /* Exit status of a process marked - as DEAD_PROCESS. */ - long int ut_session; /* Session ID, used for windowing. */ - struct timeval ut_tv; /* Time entry was made. */ - int32_t ut_addr_v6[4]; /* Internet address of remote host. */ - char __unused[20]; /* Reserved for future use. */ -}; - -/* Backwards compatibility hacks. */ -#define ut_name ut_user -#ifndef _NO_UT_TIME -/* We have a problem here: `ut_time' is also used otherwise. Define - _NO_UT_TIME if the compiler complains. */ -# define ut_time ut_tv.tv_sec -#endif -#define ut_xtime ut_tv.tv_sec -#define ut_addr ut_addr_v6[0] - - -/* Values for the `ut_type' field of a `struct utmp'. */ -#define EMPTY 0 /* No valid user accounting information. */ - -#define RUN_LVL 1 /* The system's runlevel. */ -#define BOOT_TIME 2 /* Time of system boot. */ -#define NEW_TIME 3 /* Time after system clock changed. */ -#define OLD_TIME 4 /* Time when system clock changed. */ - -#define INIT_PROCESS 5 /* Process spawned by the init process. */ -#define LOGIN_PROCESS 6 /* Session leader of a logged in user. */ -#define USER_PROCESS 7 /* Normal process. */ -#define DEAD_PROCESS 8 /* Terminated process. */ - -#define ACCOUNTING 9 - -/* Old Linux name for the EMPTY type. */ -#define UT_UNKNOWN EMPTY - - -/* Tell the user that we have a modern system with UT_HOST, UT_PID, - UT_TYPE, UT_ID and UT_TV fields. */ -#define _HAVE_UT_TYPE 1 -#define _HAVE_UT_PID 1 -#define _HAVE_UT_ID 1 -#define _HAVE_UT_TV 1 -#define _HAVE_UT_HOST 1 diff --git a/libc/sysdeps/linux/h8300/bits/utmpx.h b/libc/sysdeps/linux/h8300/bits/utmpx.h deleted file mode 100644 index 74befe59e..000000000 --- a/libc/sysdeps/linux/h8300/bits/utmpx.h +++ /dev/null @@ -1,86 +0,0 @@ -/* Structures and defenitions for the user accounting database. GNU version. - Copyright (C) 1997, 1998 Free Software Foundation, Inc. - - The GNU C Library 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. - - 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _UTMPX_H -# error "Never include <bits/utmpx.h> directly; use <utmpx.h> instead." -#endif - -#include <bits/types.h> -#include <sys/time.h> - - -#ifdef __USE_GNU -# include <paths.h> -# define _PATH_UTMPX _PATH_UTMP -# define _PATH_WTMPX _PATH_WTMP -#endif - - -#define __UT_LINESIZE 32 -#define __UT_NAMESIZE 32 -#define __UT_HOSTSIZE 256 - - -/* The structure describing the status of a terminated process. This - type is used in `struct utmpx' below. */ -struct __exit_status - { -#ifdef __USE_GNU - short int e_termination; /* Process termination status. */ - short int e_exit; /* Process exit status. */ -#else - short int __e_termination; /* Process termination status. */ - short int __e_exit; /* Process exit status. */ -#endif - }; - - -/* The structure describing an entry in the user accounting database. */ -struct utmpx -{ - short int ut_type; /* Type of login. */ - __pid_t ut_pid; /* Process ID of login process. */ - char ut_line[__UT_LINESIZE]; /* Devicename. */ - char ut_id[4]; /* Inittab ID. */ - char ut_user[__UT_NAMESIZE]; /* Username. */ - char ut_host[__UT_HOSTSIZE]; /* Hostname for remote login. */ - struct __exit_status ut_exit; /* Exit status of a process marked - as DEAD_PROCESS. */ - long int ut_session; /* Session ID, used for windowing. */ - struct timeval ut_tv; /* Time entry was made. */ - __int32_t ut_addr_v6[4]; /* Internet address of remote host. */ - char __unused[20]; /* Reserved for future use. */ -}; - - -/* Values for the `ut_type' field of a `struct utmpx'. */ -#define EMPTY 0 /* No valid user accounting information. */ - -#define RUN_LVL 1 /* The system's runlevel. */ -#define BOOT_TIME 2 /* Time of system boot. */ -#define NEW_TIME 3 /* Time after system clock changed. */ -#define OLD_TIME 4 /* Time when system clock changed. */ - -#define INIT_PROCESS 5 /* Process spawned by the init process. */ -#define LOGIN_PROCESS 6 /* Session leader of a logged in user. */ -#define USER_PROCESS 7 /* Normal process. */ -#define DEAD_PROCESS 8 /* Terminated process. */ - -#ifdef __USE_GNU -# define ACCOUNTING 9 /* System accounting. */ -#endif diff --git a/libc/sysdeps/linux/h8300/bits/utsname.h b/libc/sysdeps/linux/h8300/bits/utsname.h deleted file mode 100644 index 8f4bf16f5..000000000 --- a/libc/sysdeps/linux/h8300/bits/utsname.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 1995, 1996, 1997 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _SYS_UTSNAME_H -# error "Never include <bits/utsname.h> directly; use <sys/utsname.h> instead." -#endif - -/* Length of the entries in `struct utsname' is 65. */ -#define _UTSNAME_LENGTH 65 - -/* Linux provides as additional information in the `struct utsname' - the name of the current domain. Define _UTSNAME_DOMAIN_LENGTH - to a value != 0 to activate this entry. */ -#define _UTSNAME_DOMAIN_LENGTH _UTSNAME_LENGTH diff --git a/libc/sysdeps/linux/h8300/bits/waitflags.h b/libc/sysdeps/linux/h8300/bits/waitflags.h deleted file mode 100644 index b854dd333..000000000 --- a/libc/sysdeps/linux/h8300/bits/waitflags.h +++ /dev/null @@ -1,30 +0,0 @@ -/* Definitions of flag bits for `waitpid' et al. - Copyright (C) 1992, 1996, 1997, 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#if !defined _SYS_WAIT_H && !defined _STDLIB_H -# error "Never include <bits/waitflags.h> directly; use <sys/wait.h> instead." -#endif - - -/* Bits in the third argument to `waitpid'. */ -#define WNOHANG 1 /* Don't block waiting. */ -#define WUNTRACED 2 /* Report status of stopped children. */ - -#define __WALL 0x40000000 /* Wait for any child. */ -#define __WCLONE 0x80000000 /* Wait for cloned process. */ diff --git a/libc/sysdeps/linux/h8300/bits/waitstatus.h b/libc/sysdeps/linux/h8300/bits/waitstatus.h deleted file mode 100644 index cb9f6cee9..000000000 --- a/libc/sysdeps/linux/h8300/bits/waitstatus.h +++ /dev/null @@ -1,104 +0,0 @@ -/* Definitions of status bits for `wait' et al. - Copyright (C) 1992, 1994, 1996, 1997 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#if !defined _SYS_WAIT_H && !defined _STDLIB_H -# error "Never include <bits/waitstatus.h> directly; use <sys/wait.h> instead." -#endif - - -/* Everything extant so far uses these same bits. */ - - -/* If WIFEXITED(STATUS), the low-order 8 bits of the status. */ -#define __WEXITSTATUS(status) (((status) & 0xff00) >> 8) - -/* If WIFSIGNALED(STATUS), the terminating signal. */ -#define __WTERMSIG(status) ((status) & 0x7f) - -/* If WIFSTOPPED(STATUS), the signal that stopped the child. */ -#define __WSTOPSIG(status) __WEXITSTATUS(status) - -/* Nonzero if STATUS indicates normal termination. */ -#define __WIFEXITED(status) (__WTERMSIG(status) == 0) - -/* Nonzero if STATUS indicates termination by a signal. */ -#ifdef __GNUC__ -# define __WIFSIGNALED(status) \ - (__extension__ ({ int __status = (status); \ - !__WIFSTOPPED(__status) && !__WIFEXITED(__status); })) -#else /* Not GCC. */ -# define __WIFSIGNALED(status) (!__WIFSTOPPED(status) && !__WIFEXITED(status)) -#endif /* GCC. */ - -/* Nonzero if STATUS indicates the child is stopped. */ -#define __WIFSTOPPED(status) (((status) & 0xff) == 0x7f) - -/* Nonzero if STATUS indicates the child dumped core. */ -#define __WCOREDUMP(status) ((status) & __WCOREFLAG) - -/* Macros for constructing status values. */ -#define __W_EXITCODE(ret, sig) ((ret) << 8 | (sig)) -#define __W_STOPCODE(sig) ((sig) << 8 | 0x7f) -#define __WCOREFLAG 0x80 - - -#ifdef __USE_BSD - -# include <endian.h> - -union wait - { - int w_status; - struct - { -# if __BYTE_ORDER == __LITTLE_ENDIAN - unsigned int __w_termsig:7; /* Terminating signal. */ - unsigned int __w_coredump:1; /* Set if dumped core. */ - unsigned int __w_retcode:8; /* Return code if exited normally. */ - unsigned int:16; -# endif /* Little endian. */ -# if __BYTE_ORDER == __BIG_ENDIAN - unsigned int:16; - unsigned int __w_retcode:8; - unsigned int __w_coredump:1; - unsigned int __w_termsig:7; -# endif /* Big endian. */ - } __wait_terminated; - struct - { -# if __BYTE_ORDER == __LITTLE_ENDIAN - unsigned int __w_stopval:8; /* W_STOPPED if stopped. */ - unsigned int __w_stopsig:8; /* Stopping signal. */ - unsigned int:16; -# endif /* Little endian. */ -# if __BYTE_ORDER == __BIG_ENDIAN - unsigned int:16; - unsigned int __w_stopsig:8; /* Stopping signal. */ - unsigned int __w_stopval:8; /* W_STOPPED if stopped. */ -# endif /* Big endian. */ - } __wait_stopped; - }; - -# define w_termsig __wait_terminated.__w_termsig -# define w_coredump __wait_terminated.__w_coredump -# define w_retcode __wait_terminated.__w_retcode -# define w_stopsig __wait_stopped.__w_stopsig -# define w_stopval __wait_stopped.__w_stopval - -#endif /* Use BSD. */ diff --git a/libc/sysdeps/linux/h8300/bits/wordsize.h b/libc/sysdeps/linux/h8300/bits/wordsize.h deleted file mode 100644 index 62dad0c71..000000000 --- a/libc/sysdeps/linux/h8300/bits/wordsize.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright (C) 1999 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#define __WORDSIZE 32 diff --git a/libc/sysdeps/linux/h8300/bits/xopen_lim.h b/libc/sysdeps/linux/h8300/bits/xopen_lim.h deleted file mode 100644 index 9f22e44e2..000000000 --- a/libc/sysdeps/linux/h8300/bits/xopen_lim.h +++ /dev/null @@ -1,96 +0,0 @@ -/* Copyright (C) 1996, 1997 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* - * Never include this file directly; use <limits.h> instead. - */ - -/* Additional definitions from X/Open Portability Guide, Issue 4, Version 2 - System Interfaces and Headers, 4.16 <limits.h> - - Please note only the values which are not greater than the minimum - stated in the standard document are listed. The `sysconf' functions - should be used to obtain the actual value. */ - -#ifndef _XOPEN_LIM_H -#define _XOPEN_LIM_H 1 - -#define __need_FOPEN_MAX -#include <bits/stdio_lim.h> - -/* We do not provide fixed values for - - ARG_MAX Maximum length of argument to the `exec' function - including environment data. - - ATEXIT_MAX Maximum number of functions that may be registered - with `atexit'. - - CHILD_MAX Maximum number of simultaneous processes per real - user ID. - - OPEN_MAX Maximum number of files that one process can have open - at anyone time. - - PAGESIZE - PAGE_SIZE Size of bytes of a page. - - PASS_MAX Maximum number of significant bytes in a password. -*/ - - -/* Maximum number of `iovec' structures that one process has available - for use with `readv' or writev'. */ -#define IOV_MAX _XOPEN_IOV_MAX - -/* The number of streams that one process can have open at one time. */ -#define STREAM_MAX FOPEN_MAX - -/* Maximum number of bytes supported for the name of a time zone. */ -#define TZNAME_MAX _POSIX_TZNAME_MAX - - -/* Maximum number of `iovec' structures that one process has available - for use with `readv' or writev'. */ -#define _XOPEN_IOV_MAX _POSIX_UIO_MAXIOV - - -/* Maximum value of `digit' in calls to the `printf' and `scanf' - functions. We have no limit, so return a reasonable value. */ -#define NL_ARGMAX _POSIX_ARG_MAX - -/* Maximum number of bytes in a `LANG' name. We have no limit. */ -#define NL_LANGMAX _POSIX2_LINE_MAX - -/* Maximum message number. We have no limit. */ -#define NL_MSGMAX INT_MAX - -/* Maximum number of bytes in N-to-1 collation mapping. We have no - limit. */ -#define NL_NMAX INT_MAX - -/* Maximum set number. We have no limit. */ -#define NL_SETMAX INT_MAX - -/* Maximum number of bytes in a message. We have no limit. */ -#define NL_TEXTMAX INT_MAX - -/* Default process priority. */ -#define NZERO 20 - -#endif /* bits/xopen_lim.h */ diff --git a/libc/sysdeps/linux/i386/Makefile b/libc/sysdeps/linux/i386/Makefile index 143162ccb..d7933bba1 100644 --- a/libc/sysdeps/linux/i386/Makefile +++ b/libc/sysdeps/linux/i386/Makefile @@ -74,8 +74,6 @@ $(COBJS): %.o : %.c headers: @(TOPDIR=$(TOPDIR) CC=$(CC) /bin/sh $(TOPDIR)/extra/scripts/gen_bits_syscall_h.sh > bits/syscall.h ) - cd $(TOPDIR)/include/sys && ln -fs ../../libc/sysdeps/linux/i386/vm86.h . - cd $(TOPDIR)/include/sys && ln -fs ../../libc/sysdeps/linux/i386/reg.h . clean: diff --git a/libc/sysdeps/linux/i386/bits/byteswap.h b/libc/sysdeps/linux/i386/bits/byteswap.h index c76b0814d..d08a342ab 100644 --- a/libc/sysdeps/linux/i386/bits/byteswap.h +++ b/libc/sysdeps/linux/i386/bits/byteswap.h @@ -1,5 +1,5 @@ /* Macros to swap the order of bytes in integer values. - Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 2000, 2002 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 @@ -21,6 +21,9 @@ # error "Never use <bits/byteswap.h> directly; include <byteswap.h> instead." #endif +#ifndef _BITS_BYTESWAP_H +#define _BITS_BYTESWAP_H 1 + /* Swap bytes in 16 bit value. */ #define __bswap_constant_16(x) \ ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)) @@ -108,3 +111,5 @@ } \ __r.__ll; })) #endif + +#endif /* _BITS_BYTESWAP_H */ diff --git a/libc/sysdeps/linux/i386/bits/cmathcalls.h b/libc/sysdeps/linux/i386/bits/cmathcalls.h deleted file mode 100644 index c680c6d8e..000000000 --- a/libc/sysdeps/linux/i386/bits/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/libc/sysdeps/linux/i386/bits/confname.h b/libc/sysdeps/linux/i386/bits/confname.h deleted file mode 100644 index ba8868af4..000000000 --- a/libc/sysdeps/linux/i386/bits/confname.h +++ /dev/null @@ -1,566 +0,0 @@ -/* `sysconf', `pathconf', and `confstr' NAME values. Generic version. - Copyright (C) 1993, 1995-1998, 2000, 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. */ - -#ifndef _UNISTD_H -# error "Never use <bits/confname.h> directly; include <unistd.h> instead." -#endif - -/* Values for the NAME argument to `pathconf' and `fpathconf'. */ -enum - { - _PC_LINK_MAX, -#define _PC_LINK_MAX _PC_LINK_MAX - _PC_MAX_CANON, -#define _PC_MAX_CANON _PC_MAX_CANON - _PC_MAX_INPUT, -#define _PC_MAX_INPUT _PC_MAX_INPUT - _PC_NAME_MAX, -#define _PC_NAME_MAX _PC_NAME_MAX - _PC_PATH_MAX, -#define _PC_PATH_MAX _PC_PATH_MAX - _PC_PIPE_BUF, -#define _PC_PIPE_BUF _PC_PIPE_BUF - _PC_CHOWN_RESTRICTED, -#define _PC_CHOWN_RESTRICTED _PC_CHOWN_RESTRICTED - _PC_NO_TRUNC, -#define _PC_NO_TRUNC _PC_NO_TRUNC - _PC_VDISABLE, -#define _PC_VDISABLE _PC_VDISABLE - _PC_SYNC_IO, -#define _PC_SYNC_IO _PC_SYNC_IO - _PC_ASYNC_IO, -#define _PC_ASYNC_IO _PC_ASYNC_IO - _PC_PRIO_IO, -#define _PC_PRIO_IO _PC_PRIO_IO - _PC_SOCK_MAXBUF, -#define _PC_SOCK_MAXBUF _PC_SOCK_MAXBUF - _PC_FILESIZEBITS, -#define _PC_FILESIZEBITS _PC_FILESIZEBITS - _PC_REC_INCR_XFER_SIZE, -#define _PC_REC_INCR_XFER_SIZE _PC_REC_INCR_XFER_SIZE - _PC_REC_MAX_XFER_SIZE, -#define _PC_REC_MAX_XFER_SIZE _PC_REC_MAX_XFER_SIZE - _PC_REC_MIN_XFER_SIZE, -#define _PC_REC_MIN_XFER_SIZE _PC_REC_MIN_XFER_SIZE - _PC_REC_XFER_ALIGN, -#define _PC_REC_XFER_ALIGN _PC_REC_XFER_ALIGN - _PC_ALLOC_SIZE_MIN, -#define _PC_ALLOC_SIZE_MIN _PC_ALLOC_SIZE_MIN - _PC_SYMLINK_MAX -#define _PC_SYMLINK_MAX _PC_SYMLINK_MAX - }; - -/* Values for the argument to `sysconf'. */ -enum - { - _SC_ARG_MAX, -#define _SC_ARG_MAX _SC_ARG_MAX - _SC_CHILD_MAX, -#define _SC_CHILD_MAX _SC_CHILD_MAX - _SC_CLK_TCK, -#define _SC_CLK_TCK _SC_CLK_TCK - _SC_NGROUPS_MAX, -#define _SC_NGROUPS_MAX _SC_NGROUPS_MAX - _SC_OPEN_MAX, -#define _SC_OPEN_MAX _SC_OPEN_MAX - _SC_STREAM_MAX, -#define _SC_STREAM_MAX _SC_STREAM_MAX - _SC_TZNAME_MAX, -#define _SC_TZNAME_MAX _SC_TZNAME_MAX - _SC_JOB_CONTROL, -#define _SC_JOB_CONTROL _SC_JOB_CONTROL - _SC_SAVED_IDS, -#define _SC_SAVED_IDS _SC_SAVED_IDS - _SC_REALTIME_SIGNALS, -#define _SC_REALTIME_SIGNALS _SC_REALTIME_SIGNALS - _SC_PRIORITY_SCHEDULING, -#define _SC_PRIORITY_SCHEDULING _SC_PRIORITY_SCHEDULING - _SC_TIMERS, -#define _SC_TIMERS _SC_TIMERS - _SC_ASYNCHRONOUS_IO, -#define _SC_ASYNCHRONOUS_IO _SC_ASYNCHRONOUS_IO - _SC_PRIORITIZED_IO, -#define _SC_PRIORITIZED_IO _SC_PRIORITIZED_IO - _SC_SYNCHRONIZED_IO, -#define _SC_SYNCHRONIZED_IO _SC_SYNCHRONIZED_IO - _SC_FSYNC, -#define _SC_FSYNC _SC_FSYNC - _SC_MAPPED_FILES, -#define _SC_MAPPED_FILES _SC_MAPPED_FILES - _SC_MEMLOCK, -#define _SC_MEMLOCK _SC_MEMLOCK - _SC_MEMLOCK_RANGE, -#define _SC_MEMLOCK_RANGE _SC_MEMLOCK_RANGE - _SC_MEMORY_PROTECTION, -#define _SC_MEMORY_PROTECTION _SC_MEMORY_PROTECTION - _SC_MESSAGE_PASSING, -#define _SC_MESSAGE_PASSING _SC_MESSAGE_PASSING - _SC_SEMAPHORES, -#define _SC_SEMAPHORES _SC_SEMAPHORES - _SC_SHARED_MEMORY_OBJECTS, -#define _SC_SHARED_MEMORY_OBJECTS _SC_SHARED_MEMORY_OBJECTS - _SC_AIO_LISTIO_MAX, -#define _SC_AIO_LISTIO_MAX _SC_AIO_LISTIO_MAX - _SC_AIO_MAX, -#define _SC_AIO_MAX _SC_AIO_MAX - _SC_AIO_PRIO_DELTA_MAX, -#define _SC_AIO_PRIO_DELTA_MAX _SC_AIO_PRIO_DELTA_MAX - _SC_DELAYTIMER_MAX, -#define _SC_DELAYTIMER_MAX _SC_DELAYTIMER_MAX - _SC_MQ_OPEN_MAX, -#define _SC_MQ_OPEN_MAX _SC_MQ_OPEN_MAX - _SC_MQ_PRIO_MAX, -#define _SC_MQ_PRIO_MAX _SC_MQ_PRIO_MAX - _SC_VERSION, -#define _SC_VERSION _SC_VERSION - _SC_PAGESIZE, -#define _SC_PAGESIZE _SC_PAGESIZE -#define _SC_PAGE_SIZE _SC_PAGESIZE - _SC_RTSIG_MAX, -#define _SC_RTSIG_MAX _SC_RTSIG_MAX - _SC_SEM_NSEMS_MAX, -#define _SC_SEM_NSEMS_MAX _SC_SEM_NSEMS_MAX - _SC_SEM_VALUE_MAX, -#define _SC_SEM_VALUE_MAX _SC_SEM_VALUE_MAX - _SC_SIGQUEUE_MAX, -#define _SC_SIGQUEUE_MAX _SC_SIGQUEUE_MAX - _SC_TIMER_MAX, -#define _SC_TIMER_MAX _SC_TIMER_MAX - - /* Values for the argument to `sysconf' - corresponding to _POSIX2_* symbols. */ - _SC_BC_BASE_MAX, -#define _SC_BC_BASE_MAX _SC_BC_BASE_MAX - _SC_BC_DIM_MAX, -#define _SC_BC_DIM_MAX _SC_BC_DIM_MAX - _SC_BC_SCALE_MAX, -#define _SC_BC_SCALE_MAX _SC_BC_SCALE_MAX - _SC_BC_STRING_MAX, -#define _SC_BC_STRING_MAX _SC_BC_STRING_MAX - _SC_COLL_WEIGHTS_MAX, -#define _SC_COLL_WEIGHTS_MAX _SC_COLL_WEIGHTS_MAX - _SC_EQUIV_CLASS_MAX, -#define _SC_EQUIV_CLASS_MAX _SC_EQUIV_CLASS_MAX - _SC_EXPR_NEST_MAX, -#define _SC_EXPR_NEST_MAX _SC_EXPR_NEST_MAX - _SC_LINE_MAX, -#define _SC_LINE_MAX _SC_LINE_MAX - _SC_RE_DUP_MAX, -#define _SC_RE_DUP_MAX _SC_RE_DUP_MAX - _SC_CHARCLASS_NAME_MAX, -#define _SC_CHARCLASS_NAME_MAX _SC_CHARCLASS_NAME_MAX - - _SC_2_VERSION, -#define _SC_2_VERSION _SC_2_VERSION - _SC_2_C_BIND, -#define _SC_2_C_BIND _SC_2_C_BIND - _SC_2_C_DEV, -#define _SC_2_C_DEV _SC_2_C_DEV - _SC_2_FORT_DEV, -#define _SC_2_FORT_DEV _SC_2_FORT_DEV - _SC_2_FORT_RUN, -#define _SC_2_FORT_RUN _SC_2_FORT_RUN - _SC_2_SW_DEV, -#define _SC_2_SW_DEV _SC_2_SW_DEV - _SC_2_LOCALEDEF, -#define _SC_2_LOCALEDEF _SC_2_LOCALEDEF - - _SC_PII, -#define _SC_PII _SC_PII - _SC_PII_XTI, -#define _SC_PII_XTI _SC_PII_XTI - _SC_PII_SOCKET, -#define _SC_PII_SOCKET _SC_PII_SOCKET - _SC_PII_INTERNET, -#define _SC_PII_INTERNET _SC_PII_INTERNET - _SC_PII_OSI, -#define _SC_PII_OSI _SC_PII_OSI - _SC_POLL, -#define _SC_POLL _SC_POLL - _SC_SELECT, -#define _SC_SELECT _SC_SELECT - _SC_UIO_MAXIOV, -#define _SC_UIO_MAXIOV _SC_UIO_MAXIOV - _SC_IOV_MAX = _SC_UIO_MAXIOV, -#define _SC_IOV_MAX _SC_IOV_MAX - _SC_PII_INTERNET_STREAM, -#define _SC_PII_INTERNET_STREAM _SC_PII_INTERNET_STREAM - _SC_PII_INTERNET_DGRAM, -#define _SC_PII_INTERNET_DGRAM _SC_PII_INTERNET_DGRAM - _SC_PII_OSI_COTS, -#define _SC_PII_OSI_COTS _SC_PII_OSI_COTS - _SC_PII_OSI_CLTS, -#define _SC_PII_OSI_CLTS _SC_PII_OSI_CLTS - _SC_PII_OSI_M, -#define _SC_PII_OSI_M _SC_PII_OSI_M - _SC_T_IOV_MAX, -#define _SC_T_IOV_MAX _SC_T_IOV_MAX - - /* Values according to POSIX 1003.1c (POSIX threads). */ - _SC_THREADS, -#define _SC_THREADS _SC_THREADS - _SC_THREAD_SAFE_FUNCTIONS, -#define _SC_THREAD_SAFE_FUNCTIONS _SC_THREAD_SAFE_FUNCTIONS - _SC_GETGR_R_SIZE_MAX, -#define _SC_GETGR_R_SIZE_MAX _SC_GETGR_R_SIZE_MAX - _SC_GETPW_R_SIZE_MAX, -#define _SC_GETPW_R_SIZE_MAX _SC_GETPW_R_SIZE_MAX - _SC_LOGIN_NAME_MAX, -#define _SC_LOGIN_NAME_MAX _SC_LOGIN_NAME_MAX - _SC_TTY_NAME_MAX, -#define _SC_TTY_NAME_MAX _SC_TTY_NAME_MAX - _SC_THREAD_DESTRUCTOR_ITERATIONS, -#define _SC_THREAD_DESTRUCTOR_ITERATIONS _SC_THREAD_DESTRUCTOR_ITERATIONS - _SC_THREAD_KEYS_MAX, -#define _SC_THREAD_KEYS_MAX _SC_THREAD_KEYS_MAX - _SC_THREAD_STACK_MIN, -#define _SC_THREAD_STACK_MIN _SC_THREAD_STACK_MIN - _SC_THREAD_THREADS_MAX, -#define _SC_THREAD_THREADS_MAX _SC_THREAD_THREADS_MAX - _SC_THREAD_ATTR_STACKADDR, -#define _SC_THREAD_ATTR_STACKADDR _SC_THREAD_ATTR_STACKADDR - _SC_THREAD_ATTR_STACKSIZE, -#define _SC_THREAD_ATTR_STACKSIZE _SC_THREAD_ATTR_STACKSIZE - _SC_THREAD_PRIORITY_SCHEDULING, -#define _SC_THREAD_PRIORITY_SCHEDULING _SC_THREAD_PRIORITY_SCHEDULING - _SC_THREAD_PRIO_INHERIT, -#define _SC_THREAD_PRIO_INHERIT _SC_THREAD_PRIO_INHERIT - _SC_THREAD_PRIO_PROTECT, -#define _SC_THREAD_PRIO_PROTECT _SC_THREAD_PRIO_PROTECT - _SC_THREAD_PROCESS_SHARED, -#define _SC_THREAD_PROCESS_SHARED _SC_THREAD_PROCESS_SHARED - - _SC_NPROCESSORS_CONF, -#define _SC_NPROCESSORS_CONF _SC_NPROCESSORS_CONF - _SC_NPROCESSORS_ONLN, -#define _SC_NPROCESSORS_ONLN _SC_NPROCESSORS_ONLN - _SC_PHYS_PAGES, -#define _SC_PHYS_PAGES _SC_PHYS_PAGES - _SC_AVPHYS_PAGES, -#define _SC_AVPHYS_PAGES _SC_AVPHYS_PAGES - _SC_ATEXIT_MAX, -#define _SC_ATEXIT_MAX _SC_ATEXIT_MAX - _SC_PASS_MAX, -#define _SC_PASS_MAX _SC_PASS_MAX - - _SC_XOPEN_VERSION, -#define _SC_XOPEN_VERSION _SC_XOPEN_VERSION - _SC_XOPEN_XCU_VERSION, -#define _SC_XOPEN_XCU_VERSION _SC_XOPEN_XCU_VERSION - _SC_XOPEN_UNIX, -#define _SC_XOPEN_UNIX _SC_XOPEN_UNIX - _SC_XOPEN_CRYPT, -#define _SC_XOPEN_CRYPT _SC_XOPEN_CRYPT - _SC_XOPEN_ENH_I18N, -#define _SC_XOPEN_ENH_I18N _SC_XOPEN_ENH_I18N - _SC_XOPEN_SHM, -#define _SC_XOPEN_SHM _SC_XOPEN_SHM - - _SC_2_CHAR_TERM, -#define _SC_2_CHAR_TERM _SC_2_CHAR_TERM - _SC_2_C_VERSION, -#define _SC_2_C_VERSION _SC_2_C_VERSION - _SC_2_UPE, -#define _SC_2_UPE _SC_2_UPE - - _SC_XOPEN_XPG2, -#define _SC_XOPEN_XPG2 _SC_XOPEN_XPG2 - _SC_XOPEN_XPG3, -#define _SC_XOPEN_XPG3 _SC_XOPEN_XPG3 - _SC_XOPEN_XPG4, -#define _SC_XOPEN_XPG4 _SC_XOPEN_XPG4 - - _SC_CHAR_BIT, -#define _SC_CHAR_BIT _SC_CHAR_BIT - _SC_CHAR_MAX, -#define _SC_CHAR_MAX _SC_CHAR_MAX - _SC_CHAR_MIN, -#define _SC_CHAR_MIN _SC_CHAR_MIN - _SC_INT_MAX, -#define _SC_INT_MAX _SC_INT_MAX - _SC_INT_MIN, -#define _SC_INT_MIN _SC_INT_MIN - _SC_LONG_BIT, -#define _SC_LONG_BIT _SC_LONG_BIT - _SC_WORD_BIT, -#define _SC_WORD_BIT _SC_WORD_BIT - _SC_MB_LEN_MAX, -#define _SC_MB_LEN_MAX _SC_MB_LEN_MAX - _SC_NZERO, -#define _SC_NZERO _SC_NZERO - _SC_SSIZE_MAX, -#define _SC_SSIZE_MAX _SC_SSIZE_MAX - _SC_SCHAR_MAX, -#define _SC_SCHAR_MAX _SC_SCHAR_MAX - _SC_SCHAR_MIN, -#define _SC_SCHAR_MIN _SC_SCHAR_MIN - _SC_SHRT_MAX, -#define _SC_SHRT_MAX _SC_SHRT_MAX - _SC_SHRT_MIN, -#define _SC_SHRT_MIN _SC_SHRT_MIN - _SC_UCHAR_MAX, -#define _SC_UCHAR_MAX _SC_UCHAR_MAX - _SC_UINT_MAX, -#define _SC_UINT_MAX _SC_UINT_MAX - _SC_ULONG_MAX, -#define _SC_ULONG_MAX _SC_ULONG_MAX - _SC_USHRT_MAX, -#define _SC_USHRT_MAX _SC_USHRT_MAX - - _SC_NL_ARGMAX, -#define _SC_NL_ARGMAX _SC_NL_ARGMAX - _SC_NL_LANGMAX, -#define _SC_NL_LANGMAX _SC_NL_LANGMAX - _SC_NL_MSGMAX, -#define _SC_NL_MSGMAX _SC_NL_MSGMAX - _SC_NL_NMAX, -#define _SC_NL_NMAX _SC_NL_NMAX - _SC_NL_SETMAX, -#define _SC_NL_SETMAX _SC_NL_SETMAX - _SC_NL_TEXTMAX, -#define _SC_NL_TEXTMAX _SC_NL_TEXTMAX - - _SC_XBS5_ILP32_OFF32, -#define _SC_XBS5_ILP32_OFF32 _SC_XBS5_ILP32_OFF32 - _SC_XBS5_ILP32_OFFBIG, -#define _SC_XBS5_ILP32_OFFBIG _SC_XBS5_ILP32_OFFBIG - _SC_XBS5_LP64_OFF64, -#define _SC_XBS5_LP64_OFF64 _SC_XBS5_LP64_OFF64 - _SC_XBS5_LPBIG_OFFBIG, -#define _SC_XBS5_LPBIG_OFFBIG _SC_XBS5_LPBIG_OFFBIG - - _SC_XOPEN_LEGACY, -#define _SC_XOPEN_LEGACY _SC_XOPEN_LEGACY - _SC_XOPEN_REALTIME, -#define _SC_XOPEN_REALTIME _SC_XOPEN_REALTIME - _SC_XOPEN_REALTIME_THREADS, -#define _SC_XOPEN_REALTIME_THREADS _SC_XOPEN_REALTIME_THREADS - - _SC_ADVISORY_INFO, -#define _SC_ADVISORY_INFO _SC_ADVISORY_INFO - _SC_BARRIERS, -#define _SC_BARRIERS _SC_BARRIERS - _SC_BASE, -#define _SC_BASE _SC_BASE - _SC_C_LANG_SUPPORT, -#define _SC_C_LANG_SUPPORT _SC_C_LANG_SUPPORT - _SC_C_LANG_SUPPORT_R, -#define _SC_C_LANG_SUPPORT_R _SC_C_LANG_SUPPORT_R - _SC_CLOCK_SELECTION, -#define _SC_CLOCK_SELECTION _SC_CLOCK_SELECTION - _SC_CPUTIME, -#define _SC_CPUTIME _SC_CPUTIME - _SC_THREAD_CPUTIME, -#define _SC_THREAD_CPUTIME _SC_THREAD_CPUTIME - _SC_DEVICE_IO, -#define _SC_DEVICE_IO _SC_DEVICE_IO - _SC_DEVICE_SPECIFIC, -#define _SC_DEVICE_SPECIFIC _SC_DEVICE_SPECIFIC - _SC_DEVICE_SPECIFIC_R, -#define _SC_DEVICE_SPECIFIC_R _SC_DEVICE_SPECIFIC_R - _SC_FD_MGMT, -#define _SC_FD_MGMT _SC_FD_MGMT - _SC_FIFO, -#define _SC_FIFO _SC_FIFO - _SC_PIPE, -#define _SC_PIPE _SC_PIPE - _SC_FILE_ATTRIBUTES, -#define _SC_FILE_ATTRIBUTES _SC_FILE_ATTRIBUTES - _SC_FILE_LOCKING, -#define _SC_FILE_LOCKING _SC_FILE_LOCKING - _SC_FILE_SYSTEM, -#define _SC_FILE_SYSTEM _SC_FILE_SYSTEM - _SC_MONOTONIC_CLOCK, -#define _SC_MONOTONIC_CLOCK _SC_MONOTONIC_CLOCK - _SC_MULTI_PROCESS, -#define _SC_MULTI_PROCESS _SC_MULTI_PROCESS - _SC_SINGLE_PROCESS, -#define _SC_SINGLE_PROCESS _SC_SINGLE_PROCESS - _SC_NETWORKING, -#define _SC_NETWORKING _SC_NETWORKING - _SC_READER_WRITER_LOCKS, -#define _SC_READER_WRITER_LOCKS _SC_READER_WRITER_LOCKS - _SC_SPIN_LOCKS, -#define _SC_SPIN_LOCKS _SC_SPIN_LOCKS - _SC_REGEXP, -#define _SC_REGEXP _SC_REGEXP - _SC_REGEX_VERSION, -#define _SC_REGEX_VERSION _SC_REGEX_VERSION - _SC_SHELL, -#define _SC_SHELL _SC_SHELL - _SC_SIGNALS, -#define _SC_SIGNALS _SC_SIGNALS - _SC_SPAWN, -#define _SC_SPAWN _SC_SPAWN - _SC_SPORADIC_SERVER, -#define _SC_SPORADIC_SERVER _SC_SPORADIC_SERVER - _SC_THREAD_SPORADIC_SERVER, -#define _SC_THREAD_SPORADIC_SERVER _SC_THREAD_SPORADIC_SERVER - _SC_SYSTEM_DATABASE, -#define _SC_SYSTEM_DATABASE _SC_SYSTEM_DATABASE - _SC_SYSTEM_DATABASE_R, -#define _SC_SYSTEM_DATABASE_R _SC_SYSTEM_DATABASE_R - _SC_TIMEOUTS, -#define _SC_TIMEOUTS _SC_TIMEOUTS - _SC_TYPED_MEMORY_OBJECTS, -#define _SC_TYPED_MEMORY_OBJECTS _SC_TYPED_MEMORY_OBJECTS - _SC_USER_GROUPS, -#define _SC_USER_GROUPS _SC_USER_GROUPS - _SC_USER_GROUPS_R, -#define _SC_USER_GROUPS_R _SC_USER_GROUPS_R - _SC_2_PBS, -#define _SC_2_PBS _SC_2_PBS - _SC_2_PBS_ACCOUNTING, -#define _SC_2_PBS_ACCOUNTING _SC_2_PBS_ACCOUNTING - _SC_2_PBS_LOCATE, -#define _SC_2_PBS_LOCATE _SC_2_PBS_LOCATE - _SC_2_PBS_MESSAGE, -#define _SC_2_PBS_MESSAGE _SC_2_PBS_MESSAGE - _SC_2_PBS_TRACK, -#define _SC_2_PBS_TRACK _SC_2_PBS_TRACK - _SC_SYMLOOP_MAX, -#define _SC_SYMLOOP_MAX _SC_SYMLOOP_MAX - _SC_STREAMS, -#define _SC_STREAMS _SC_STREAMS - _SC_2_PBS_CHECKPOINT, -#define _SC_2_PBS_CHECKPOINT _SC_2_PBS_CHECKPOINT - - _SC_V6_ILP32_OFF32, -#define _SC_V6_ILP32_OFF32 _SC_V6_ILP32_OFF32 - _SC_V6_ILP32_OFFBIG, -#define _SC_V6_ILP32_OFFBIG _SC_V6_ILP32_OFFBIG - _SC_V6_LP64_OFF64, -#define _SC_V6_LP64_OFF64 _SC_V6_LP64_OFF64 - _SC_V6_LPBIG_OFFBIG, -#define _SC_V6_LPBIG_OFFBIG _SC_V6_LPBIG_OFFBIG - - _SC_HOST_NAME_MAX, -#define _SC_HOST_NAME_MAX _SC_HOST_NAME_MAX - _SC_TRACE, -#define _SC_TRACE _SC_TRACE - _SC_TRACE_EVENT_FILTER, -#define _SC_TRACE_EVENT_FILTER _SC_TRACE_EVENT_FILTER - _SC_TRACE_INHERIT, -#define _SC_TRACE_INHERIT _SC_TRACE_INHERIT - _SC_TRACE_LOG -#define _SC_TRACE_LOG _SC_TRACE_LOG - }; - -#if (defined __USE_POSIX2 || defined __USE_UNIX98 \ - || defined __USE_FILE_OFFSET64 || defined __USE_LARGEFILE64 \ - || defined __USE_LARGEFILE) -/* Values for the NAME argument to `confstr'. */ -enum - { - _CS_PATH, /* The default search path. */ -#define _CS_PATH _CS_PATH - -# if (defined __USE_FILE_OFFSET64 || defined __USE_LARGEFILE64 \ - || defined __USE_LARGEFILE) - _CS_LFS_CFLAGS = 1000, -# define _CS_LFS_CFLAGS _CS_LFS_CFLAGS - _CS_LFS_LDFLAGS, -# define _CS_LFS_LDFLAGS _CS_LFS_LDFLAGS - _CS_LFS_LIBS, -# define _CS_LFS_LIBS _CS_LFS_LIBS - _CS_LFS_LINTFLAGS, -# define _CS_LFS_LINTFLAGS _CS_LFS_LINTFLAGS - _CS_LFS64_CFLAGS, -# define _CS_LFS64_CFLAGS _CS_LFS64_CFLAGS - _CS_LFS64_LDFLAGS, -# define _CS_LFS64_LDFLAGS _CS_LFS64_LDFLAGS - _CS_LFS64_LIBS, -# define _CS_LFS64_LIBS _CS_LFS64_LIBS - _CS_LFS64_LINTFLAGS, -# define _CS_LFS64_LINTFLAGS _CS_LFS64_LINTFLAGS -# endif - -# ifdef __USE_UNIX98 - _CS_XBS5_ILP32_OFF32_CFLAGS = 1100, -# define _CS_XBS5_ILP32_OFF32_CFLAGS _CS_XBS5_ILP32_OFF32_CFLAGS - _CS_XBS5_ILP32_OFF32_LDFLAGS, -# define _CS_XBS5_ILP32_OFF32_LDFLAGS _CS_XBS5_ILP32_OFF32_LDFLAGS - _CS_XBS5_ILP32_OFF32_LIBS, -# define _CS_XBS5_ILP32_OFF32_LIBS _CS_XBS5_ILP32_OFF32_LIBS - _CS_XBS5_ILP32_OFF32_LINTFLAGS, -# define _CS_XBS5_ILP32_OFF32_LINTFLAGS _CS_XBS5_ILP32_OFF32_LINTFLAGS - _CS_XBS5_ILP32_OFFBIG_CFLAGS, -# define _CS_XBS5_ILP32_OFFBIG_CFLAGS _CS_XBS5_ILP32_OFFBIG_CFLAGS - _CS_XBS5_ILP32_OFFBIG_LDFLAGS, -# define _CS_XBS5_ILP32_OFFBIG_LDFLAGS _CS_XBS5_ILP32_OFFBIG_LDFLAGS - _CS_XBS5_ILP32_OFFBIG_LIBS, -# define _CS_XBS5_ILP32_OFFBIG_LIBS _CS_XBS5_ILP32_OFFBIG_LIBS - _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, -# define _CS_XBS5_ILP32_OFFBIG_LINTFLAGS _CS_XBS5_ILP32_OFFBIG_LINTFLAGS - _CS_XBS5_LP64_OFF64_CFLAGS, -# define _CS_XBS5_LP64_OFF64_CFLAGS _CS_XBS5_LP64_OFF64_CFLAGS - _CS_XBS5_LP64_OFF64_LDFLAGS, -# define _CS_XBS5_LP64_OFF64_LDFLAGS _CS_XBS5_LP64_OFF64_LDFLAGS - _CS_XBS5_LP64_OFF64_LIBS, -# define _CS_XBS5_LP64_OFF64_LIBS _CS_XBS5_LP64_OFF64_LIBS - _CS_XBS5_LP64_OFF64_LINTFLAGS, -# define _CS_XBS5_LP64_OFF64_LINTFLAGS _CS_XBS5_LP64_OFF64_LINTFLAGS - _CS_XBS5_LPBIG_OFFBIG_CFLAGS, -# define _CS_XBS5_LPBIG_OFFBIG_CFLAGS _CS_XBS5_LPBIG_OFFBIG_CFLAGS - _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, -# define _CS_XBS5_LPBIG_OFFBIG_LDFLAGS _CS_XBS5_LPBIG_OFFBIG_LDFLAGS - _CS_XBS5_LPBIG_OFFBIG_LIBS, -# define _CS_XBS5_LPBIG_OFFBIG_LIBS _CS_XBS5_LPBIG_OFFBIG_LIBS - _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, -# define _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS -# endif -# ifdef __USE_XOPEN2K - _CS_POSIX_V6_ILP32_OFF32_CFLAGS, -# define _CS_POSIX_V6_ILP32_OFF32_CFLAGS _CS_POSIX_V6_ILP32_OFF32_CFLAGS - _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, -# define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS _CS_POSIX_V6_ILP32_OFF32_LDFLAGS - _CS_POSIX_V6_ILP32_OFF32_LIBS, -# define _CS_POSIX_V6_ILP32_OFF32_LIBS _CS_POSIX_V6_ILP32_OFF32_LIBS - _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, -# define _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS - _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, -# define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS - _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, -# define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS - _CS_POSIX_V6_ILP32_OFFBIG_LIBS, -# define _CS_POSIX_V6_ILP32_OFFBIG_LIBS _CS_POSIX_V6_ILP32_OFFBIG_LIBS - _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, -# define _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS - _CS_POSIX_V6_LP64_OFF64_CFLAGS, -# define _CS_POSIX_V6_LP64_OFF64_CFLAGS _CS_POSIX_V6_LP64_OFF64_CFLAGS - _CS_POSIX_V6_LP64_OFF64_LDFLAGS, -# define _CS_POSIX_V6_LP64_OFF64_LDFLAGS _CS_POSIX_V6_LP64_OFF64_LDFLAGS - _CS_POSIX_V6_LP64_OFF64_LIBS, -# define _CS_POSIX_V6_LP64_OFF64_LIBS _CS_POSIX_V6_LP64_OFF64_LIBS - _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, -# define _CS_POSIX_V6_LP64_OFF64_LINTFLAGS _CS_POSIX_V6_LP64_OFF64_LINTFLAGS - _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, -# define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS - _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, -# define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS - _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, -# define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS _CS_POSIX_V6_LPBIG_OFFBIG_LIBS - _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS, -# define _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS -# endif - - _CS_V6_WIDTH_RESTRICTED_ENVS -# define _CS_V6_WIDTH_RESTRICTED_ENVS _CS_V6_WIDTH_RESTRICTED_ENVS - }; -#endif diff --git a/libc/sysdeps/linux/i386/bits/dirent.h b/libc/sysdeps/linux/i386/bits/dirent.h deleted file mode 100644 index 82d8663f2..000000000 --- a/libc/sysdeps/linux/i386/bits/dirent.h +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright (C) 1996, 1997 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 _DIRENT_H -# error "Never use <bits/dirent.h> directly; include <dirent.h> instead." -#endif - -struct dirent - { -#ifndef __USE_FILE_OFFSET64 - __ino_t d_ino; - __off_t d_off; -#else - __ino64_t d_ino; - __off64_t d_off; -#endif - unsigned short int d_reclen; -#ifdef __USE_FILE_OFFSET64 - unsigned char d_type; -#endif - char d_name[256]; /* We must not include limits.h! */ - }; - -#ifdef __USE_LARGEFILE64 -struct dirent64 - { - __ino64_t d_ino; - __off64_t d_off; - unsigned short int d_reclen; - unsigned char d_type; - char d_name[256]; /* We must not include limits.h! */ - }; -#endif - -#define d_fileno d_ino /* Backwards compatibility. */ - -#undef _DIRENT_HAVE_D_NAMLEN -#define _DIRENT_HAVE_D_RECLEN -#define _DIRENT_HAVE_D_OFF -#undef _DIRENT_HAVE_D_TYPE diff --git a/libc/sysdeps/linux/i386/bits/dlfcn.h b/libc/sysdeps/linux/i386/bits/dlfcn.h deleted file mode 100644 index 2525fa3d9..000000000 --- a/libc/sysdeps/linux/i386/bits/dlfcn.h +++ /dev/null @@ -1,59 +0,0 @@ -/* System dependent definitions for run-time dynamic loading. - 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. */ - -#ifndef _DLFCN_H -# error "Never use <bits/dlfcn.h> directly; include <dlfcn.h> instead." -#endif - -/* The MODE argument to `dlopen' contains one of the following: */ -#define RTLD_LAZY 0x00001 /* Lazy function call binding. */ -#define RTLD_NOW 0x00002 /* Immediate function call binding. */ -#define RTLD_BINDING_MASK 0x3 /* Mask of binding time value. */ -#define RTLD_NOLOAD 0x00004 /* Do not load the object. */ - -/* If the following bit is set in the MODE argument to `dlopen', - the symbols of the loaded object and its dependencies are made - visible as if the object were linked directly into the program. */ -#define RTLD_GLOBAL 0x00100 - -/* Unix98 demands the following flag which is the inverse to RTLD_GLOBAL. - The implementation does this by default and so we can define the - value to zero. */ -#define RTLD_LOCAL 0 - -/* Do not delete object when closed. */ -#define RTLD_NODELETE 0x01000 - -#ifdef __USE_GNU -/* To support profiling of shared objects it is a good idea to call - the function found using `dlsym' using the following macro since - these calls do not use the PLT. But this would mean the dynamic - loader has no chance to find out when the function is called. The - macro applies the necessary magic so that profiling is possible. - Rewrite - foo = (*fctp) (arg1, arg2); - into - foo = DL_CALL_FCT (fctp, (arg1, arg2)); -*/ -# define DL_CALL_FCT(fctp, args) \ - (_dl_mcount_wrapper_check (fctp), (*(fctp)) args) - -/* This function calls the profiling functions. */ -extern void _dl_mcount_wrapper_check (void *__selfpc) __THROW; -#endif diff --git a/libc/sysdeps/linux/i386/bits/elfclass.h b/libc/sysdeps/linux/i386/bits/elfclass.h deleted file mode 100644 index 180227d9e..000000000 --- a/libc/sysdeps/linux/i386/bits/elfclass.h +++ /dev/null @@ -1,14 +0,0 @@ -/* This file specifies the native word size of the machine, which indicates - the ELF file class used for executables and shared objects on this - machine. */ - -#ifndef _LINK_H -# error "Never use <bits/elfclass.h> directly; include <link.h> instead." -#endif - -#include <bits/wordsize.h> - -#define __ELF_NATIVE_CLASS __WORDSIZE - -/* The entries in the .hash table always have a size of 32 bits. */ -typedef uint32_t Elf_Symndx; diff --git a/libc/sysdeps/linux/i386/bits/environments.h b/libc/sysdeps/linux/i386/bits/environments.h deleted file mode 100644 index c3829927b..000000000 --- a/libc/sysdeps/linux/i386/bits/environments.h +++ /dev/null @@ -1,75 +0,0 @@ -/* Copyright (C) 1999, 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. */ - -#ifndef _UNISTD_H -# error "Never include this file directly. Use <unistd.h> instead" -#endif - -#include <bits/wordsize.h> - -/* This header should define the following symbols under the described - situations. A value `1' means that the model is always supported, - `-1' means it is never supported. Undefined means it cannot be - statically decided. - - _POSIX_V6_ILP32_OFF32 32bit int, long, pointers, and off_t type - _POSIX_V6_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type - - _POSIX_V6_LP64_OFF32 64bit long and pointers and 32bit off_t type - _POSIX_V6_LPBIG_OFFBIG 64bit long and pointers and large off_t type - - The macros _XBS5_ILP32_OFF32, _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and - _XBS5_LPBIG_OFFBIG were used in previous versions of the Unix standard - and are available only for compatibility. -*/ - -#if __WORDSIZE == 64 - -/* We can never provide environments with 32-bit wide pointers. */ -# define _POSIX_V6_ILP32_OFF32 -1 -# define _POSIX_V6_ILP32_OFFBIG -1 -# define _XBS5_ILP32_OFF32 -1 -# define _XBS5_ILP32_OFFBIG -1 -/* We also have no use (for now) for an environment with bigger pointers - and offsets. */ -# define _POSIX_V6_LPBIG_OFFBIG -1 -# define _XBS5_LPBIG_OFFBIG -1 - -/* By default we have 64-bit wide `long int', pointers and `off_t'. */ -# define _POSIX_V6_LP64_OFF64 1 -# define _XBS5_LP64_OFF64 1 - -#else /* __WORDSIZE == 32 */ - -/* By default we have 32-bit wide `int', `long int', pointers and `off_t' - and all platforms support LFS. */ -# define _POSIX_V6_ILP32_OFF32 1 -# define _POSIX_V6_ILP32_OFFBIG 1 -# define _XBS5_ILP32_OFF32 1 -# define _XBS5_ILP32_OFFBIG 1 - -/* We optionally provide an environment with the above size but an 64-bit - side `off_t'. Therefore we don't define _XBS5_ILP32_OFFBIG. */ - -/* We can never provide environments with 64-bit wide pointers. */ -# define _POSIX_V6_LP64_OFF64 -1 -# define _POSIX_V6_LPBIG_OFFBIG -1 -# define _XBS5_LP64_OFF64 -1 -# define _XBS5_LPBIG_OFFBIG -1 - -#endif /* __WORDSIZE == 32 */ diff --git a/libc/sysdeps/linux/i386/bits/errno.h b/libc/sysdeps/linux/i386/bits/errno.h deleted file mode 100644 index ac59d4c9d..000000000 --- a/libc/sysdeps/linux/i386/bits/errno.h +++ /dev/null @@ -1,60 +0,0 @@ -/* Error constants. Linux specific version. - Copyright (C) 1996, 1997, 1998, 1999 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. */ - -#ifdef _ERRNO_H - -# undef EDOM -# undef EILSEQ -# undef ERANGE -# include <linux/errno.h> - -/* Linux has no ENOTSUP error code. */ -# define ENOTSUP EOPNOTSUPP - -/* Linux also has no ECANCELED error code. Since it is not used here - we define it to an invalid value. */ -# define ECANCELED 125 - -# ifndef __ASSEMBLER__ -/* We now need a declaration of the `errno' variable. */ -extern int errno; - -/* Function to get address of global `errno' variable. */ -extern int *__errno_location (void) __THROW __attribute__ ((__const__)); - -# if defined _LIBC -/* We wouldn't need a special macro anymore but it is history. */ -# define __set_errno(val) (*__errno_location ()) = (val) -# endif /* _LIBC */ - -# if !defined _LIBC || defined _LIBC_REENTRANT -/* When using threads, errno is a per-thread value. */ -# define errno (*__errno_location ()) -# endif -# endif /* !__ASSEMBLER__ */ -#endif /* _ERRNO_H */ - -#if !defined _ERRNO_H && defined __need_Emath -/* This is ugly but the kernel header is not clean enough. We must - define only the values EDOM, EILSEQ and ERANGE in case __need_Emath is - defined. */ -# define EDOM 33 /* Math argument out of domain of function. */ -# define EILSEQ 84 /* Illegal byte sequence. */ -# define ERANGE 34 /* Math result not representable. */ -#endif /* !_ERRNO_H && __need_Emath */ diff --git a/libc/sysdeps/linux/i386/bits/in.h b/libc/sysdeps/linux/i386/bits/in.h deleted file mode 100644 index e6cf57574..000000000 --- a/libc/sysdeps/linux/i386/bits/in.h +++ /dev/null @@ -1,141 +0,0 @@ -/* Copyright (C) 1991-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. */ - -/* Linux version. */ - -#ifndef _NETINET_IN_H -# error "Never use <bits/in.h> directly; include <netinet/in.h> instead." -#endif - -/* Options for use with `getsockopt' and `setsockopt' at the IP level. - The first word in the comment at the right is the data type used; - "bool" means a boolean value stored in an `int'. */ -#define IP_TOS 1 /* int; IP type of service and precedence. */ -#define IP_TTL 2 /* int; IP time to live. */ -#define IP_HDRINCL 3 /* int; Header is included with data. */ -#define IP_OPTIONS 4 /* ip_opts; IP per-packet options. */ -#define IP_ROUTER_ALERT 5 /* bool */ -#define IP_RECVOPTS 6 /* bool */ -#define IP_RETOPTS 7 /* bool */ -#define IP_PKTINFO 8 /* bool */ -#define IP_PKTOPTIONS 9 -#define IP_PMTUDISC 10 /* obsolete name? */ -#define IP_MTU_DISCOVER 10 /* int; see below */ -#define IP_RECVERR 11 /* bool */ -#define IP_RECVTTL 12 /* bool */ -#define IP_RECVTOS 13 /* bool */ -#define IP_MULTICAST_IF 32 /* in_addr; set/get IP multicast i/f */ -#define IP_MULTICAST_TTL 33 /* u_char; set/get IP multicast ttl */ -#define IP_MULTICAST_LOOP 34 /* i_char; set/get IP multicast loopback */ -#define IP_ADD_MEMBERSHIP 35 /* ip_mreq; add an IP group membership */ -#define IP_DROP_MEMBERSHIP 36 /* ip_mreq; drop an IP group membership */ - -/* For BSD compatibility. */ -#define IP_RECVRETOPTS IP_RETOPTS - -/* IP_MTU_DISCOVER arguments. */ -#define IP_PMTUDISC_DONT 0 /* Never send DF frames. */ -#define IP_PMTUDISC_WANT 1 /* Use per route hints. */ -#define IP_PMTUDISC_DO 2 /* Always DF. */ - -/* To select the IP level. */ -#define SOL_IP 0 - -#define IP_DEFAULT_MULTICAST_TTL 1 -#define IP_DEFAULT_MULTICAST_LOOP 1 -#define IP_MAX_MEMBERSHIPS 20 - -/* Structure used to describe IP options for IP_OPTIONS. The `ip_dst' - field is used for the first-hop gateway when using a source route - (this gets put into the header proper). */ -struct ip_opts - { - struct in_addr ip_dst; /* First hop; zero without source route. */ - char ip_opts[40]; /* Actually variable in size. */ - }; - -/* Structure used for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP. */ -struct ip_mreq - { - struct in_addr imr_multiaddr; /* IP multicast address of group */ - struct in_addr imr_interface; /* local IP address of interface */ - }; - -/* As above but including interface specification by index. */ -struct ip_mreqn - { - struct in_addr imr_multiaddr; /* IP multicast address of group */ - struct in_addr imr_address; /* local IP address of interface */ - int imr_ifindex; /* Interface index */ - }; - -/* Structure used for IP_PKTINFO. */ -struct in_pktinfo - { - int ipi_ifindex; /* Interface index */ - struct in_addr ipi_spec_dst; /* Routing destination address */ - struct in_addr ipi_addr; /* Header destination address */ - }; - -/* Options for use with `getsockopt' and `setsockopt' at the IPv6 level. - The first word in the comment at the right is the data type used; - "bool" means a boolean value stored in an `int'. */ -#define IPV6_ADDRFORM 1 -#define IPV6_PKTINFO 2 -#define IPV6_HOPOPTS 3 -#define IPV6_DSTOPTS 4 -#define IPV6_RTHDR 5 -#define IPV6_PKTOPTIONS 6 -#define IPV6_CHECKSUM 7 -#define IPV6_HOPLIMIT 8 -#define IPV6_NEXTHOP 9 -#define IPV6_AUTHHDR 10 -#define IPV6_UNICAST_HOPS 16 -#define IPV6_MULTICAST_IF 17 -#define IPV6_MULTICAST_HOPS 18 -#define IPV6_MULTICAST_LOOP 19 -#define IPV6_JOIN_GROUP 20 -#define IPV6_LEAVE_GROUP 21 -#define IPV6_ROUTER_ALERT 22 -#define IPV6_MTU_DISCOVER 23 -#define IPV6_MTU 24 -#define IPV6_RECVERR 25 - -#define SCM_SRCRT IPV6_RXSRCRT - -/* Obsolete synonyms for the above. */ -#define IPV6_RXHOPOPTS IPV6_HOPOPTS -#define IPV6_RXDSTOPTS IPV6_DSTOPTS -#define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP -#define IPV6_DROP_MEMBERSHIP IPV6_LEAVE_GROUP - - -/* IPV6_MTU_DISCOVER values. */ -#define IPV6_PMTUDISC_DONT 0 /* Never send DF frames. */ -#define IPV6_PMTUDISC_WANT 1 /* Use per route hints. */ -#define IPV6_PMTUDISC_DO 2 /* Always DF. */ - -/* Socket level values for IPv6. */ -#define SOL_IPV6 41 -#define SOL_ICMPV6 58 - -/* Routing header options for IPv6. */ -#define IPV6_RTHDR_LOOSE 0 /* Hop doesn't need to be neighbour. */ -#define IPV6_RTHDR_STRICT 1 /* Hop must be a neighbour. */ - -#define IPV6_RTHDR_TYPE_0 0 /* IPv6 Routing header type 0. */ diff --git a/libc/sysdeps/linux/i386/bits/initspin.h b/libc/sysdeps/linux/i386/bits/initspin.h deleted file mode 100644 index af19d44e6..000000000 --- a/libc/sysdeps/linux/i386/bits/initspin.h +++ /dev/null @@ -1,28 +0,0 @@ -/* Generic definitions for spinlock initializers. - Copyright (C) 2000, 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* Initial value of a spinlock. Most platforms should use zero, - unless they only implement a "test and clear" operation instead of - the usual "test and set". */ -#define __LT_SPINLOCK_INIT 0 - -/* Macros for lock initializers, using the above definition. */ -#define __LOCK_INITIALIZER { 0, __LT_SPINLOCK_INIT } -#define __ALT_LOCK_INITIALIZER { 0, __LT_SPINLOCK_INIT } -#define __ATOMIC_INITIALIZER { 0, __LT_SPINLOCK_INIT } diff --git a/libc/sysdeps/linux/i386/bits/ioctl-types.h b/libc/sysdeps/linux/i386/bits/ioctl-types.h deleted file mode 100644 index e856a04b4..000000000 --- a/libc/sysdeps/linux/i386/bits/ioctl-types.h +++ /dev/null @@ -1,78 +0,0 @@ -/* Structure types for pre-termios terminal ioctls. Linux version. - Copyright (C) 1996, 1997, 1999, 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. */ - -#ifndef _SYS_IOCTL_H -# error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead." -#endif - -/* Get definition of constants for use with `ioctl'. */ -#include <asm/ioctls.h> - - -struct winsize - { - unsigned short int ws_row; - unsigned short int ws_col; - unsigned short int ws_xpixel; - unsigned short int ws_ypixel; - }; - -#define NCC 8 -struct termio - { - unsigned short int c_iflag; /* input mode flags */ - unsigned short int c_oflag; /* output mode flags */ - unsigned short int c_cflag; /* control mode flags */ - unsigned short int c_lflag; /* local mode flags */ - unsigned char c_line; /* line discipline */ - unsigned char c_cc[NCC]; /* control characters */ -}; - -/* modem lines */ -#define TIOCM_LE 0x001 -#define TIOCM_DTR 0x002 -#define TIOCM_RTS 0x004 -#define TIOCM_ST 0x008 -#define TIOCM_SR 0x010 -#define TIOCM_CTS 0x020 -#define TIOCM_CAR 0x040 -#define TIOCM_RNG 0x080 -#define TIOCM_DSR 0x100 -#define TIOCM_CD TIOCM_CAR -#define TIOCM_RI TIOCM_RNG - -/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ - -/* line disciplines */ -#define N_TTY 0 -#define N_SLIP 1 -#define N_MOUSE 2 -#define N_PPP 3 -#define N_STRIP 4 -#define N_AX25 5 -#define N_X25 6 /* X.25 async */ -#define N_6PACK 7 -#define N_MASC 8 /* Mobitex module */ -#define N_R3964 9 /* Simatic R3964 module */ -#define N_PROFIBUS_FDL 10 /* Profibus */ -#define N_IRDA 11 /* Linux IR */ -#define N_SMSBLOCK 12 /* SMS block mode */ -#define N_HDLC 13 /* synchronous HDLC */ -#define N_SYNC_PPP 14 /* synchronous PPP */ -#define N_HCI 15 /* Bluetooth HCI UART */ diff --git a/libc/sysdeps/linux/i386/bits/ioctls.h b/libc/sysdeps/linux/i386/bits/ioctls.h deleted file mode 100644 index b49ca2076..000000000 --- a/libc/sysdeps/linux/i386/bits/ioctls.h +++ /dev/null @@ -1,108 +0,0 @@ -/* Copyright (C) 1996, 1997, 1998 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 _SYS_IOCTL_H -# error "Never use <bits/ioctls.h> directly; include <sys/ioctl.h> instead." -#endif - -/* Use the definitions from the kernel header files. */ -#include <asm/ioctls.h> - -/* Routing table calls. */ -#define SIOCADDRT 0x890B /* add routing table entry */ -#define SIOCDELRT 0x890C /* delete routing table entry */ -#define SIOCRTMSG 0x890D /* call to routing system */ - -/* Socket configuration controls. */ -#define SIOCGIFNAME 0x8910 /* get iface name */ -#define SIOCSIFLINK 0x8911 /* set iface channel */ -#define SIOCGIFCONF 0x8912 /* get iface list */ -#define SIOCGIFFLAGS 0x8913 /* get flags */ -#define SIOCSIFFLAGS 0x8914 /* set flags */ -#define SIOCGIFADDR 0x8915 /* get PA address */ -#define SIOCSIFADDR 0x8916 /* set PA address */ -#define SIOCGIFDSTADDR 0x8917 /* get remote PA address */ -#define SIOCSIFDSTADDR 0x8918 /* set remote PA address */ -#define SIOCGIFBRDADDR 0x8919 /* get broadcast PA address */ -#define SIOCSIFBRDADDR 0x891a /* set broadcast PA address */ -#define SIOCGIFNETMASK 0x891b /* get network PA mask */ -#define SIOCSIFNETMASK 0x891c /* set network PA mask */ -#define SIOCGIFMETRIC 0x891d /* get metric */ -#define SIOCSIFMETRIC 0x891e /* set metric */ -#define SIOCGIFMEM 0x891f /* get memory address (BSD) */ -#define SIOCSIFMEM 0x8920 /* set memory address (BSD) */ -#define SIOCGIFMTU 0x8921 /* get MTU size */ -#define SIOCSIFMTU 0x8922 /* set MTU size */ -#define SIOCSIFHWADDR 0x8924 /* set hardware address */ -#define SIOCGIFENCAP 0x8925 /* get/set encapsulations */ -#define SIOCSIFENCAP 0x8926 -#define SIOCGIFHWADDR 0x8927 /* Get hardware address */ -#define SIOCGIFSLAVE 0x8929 /* Driver slaving support */ -#define SIOCSIFSLAVE 0x8930 -#define SIOCADDMULTI 0x8931 /* Multicast address lists */ -#define SIOCDELMULTI 0x8932 -#define SIOCGIFINDEX 0x8933 /* name -> if_index mapping */ -#define SIOGIFINDEX SIOCGIFINDEX /* misprint compatibility :-) */ -#define SIOCSIFPFLAGS 0x8934 /* set/get extended flags set */ -#define SIOCGIFPFLAGS 0x8935 -#define SIOCDIFADDR 0x8936 /* delete PA address */ -#define SIOCSIFHWBROADCAST 0x8937 /* set hardware broadcast addr */ -#define SIOCGIFCOUNT 0x8938 /* get number of devices */ - -#define SIOCGIFBR 0x8940 /* Bridging support */ -#define SIOCSIFBR 0x8941 /* Set bridging options */ - -#define SIOCGIFTXQLEN 0x8942 /* Get the tx queue length */ -#define SIOCSIFTXQLEN 0x8943 /* Set the tx queue length */ - - -/* ARP cache control calls. */ - /* 0x8950 - 0x8952 * obsolete calls, don't re-use */ -#define SIOCDARP 0x8953 /* delete ARP table entry */ -#define SIOCGARP 0x8954 /* get ARP table entry */ -#define SIOCSARP 0x8955 /* set ARP table entry */ - -/* RARP cache control calls. */ -#define SIOCDRARP 0x8960 /* delete RARP table entry */ -#define SIOCGRARP 0x8961 /* get RARP table entry */ -#define SIOCSRARP 0x8962 /* set RARP table entry */ - -/* Driver configuration calls */ - -#define SIOCGIFMAP 0x8970 /* Get device parameters */ -#define SIOCSIFMAP 0x8971 /* Set device parameters */ - -/* DLCI configuration calls */ - -#define SIOCADDDLCI 0x8980 /* Create new DLCI device */ -#define SIOCDELDLCI 0x8981 /* Delete DLCI device */ - -/* Device private ioctl calls. */ - -/* These 16 ioctls are available to devices via the do_ioctl() device - vector. Each device should include this file and redefine these - names as their own. Because these are device dependent it is a good - idea _NOT_ to issue them to random objects and hope. */ - -#define SIOCDEVPRIVATE 0x89F0 /* to 89FF */ - -/* - * These 16 ioctl calls are protocol private - */ - -#define SIOCPROTOPRIVATE 0x89E0 /* to 89EF */ diff --git a/libc/sysdeps/linux/i386/bits/ipc.h b/libc/sysdeps/linux/i386/bits/ipc.h deleted file mode 100644 index f1a043fe5..000000000 --- a/libc/sysdeps/linux/i386/bits/ipc.h +++ /dev/null @@ -1,56 +0,0 @@ -/* Copyright (C) 1995-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 _SYS_IPC_H -# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead." -#endif - -#include <bits/types.h> - -/* Mode bits for `msgget', `semget', and `shmget'. */ -#define IPC_CREAT 01000 /* Create key if key does not exist. */ -#define IPC_EXCL 02000 /* Fail if key exists. */ -#define IPC_NOWAIT 04000 /* Return error on wait. */ - -/* Control commands for `msgctl', `semctl', and `shmctl'. */ -#define IPC_RMID 0 /* Remove identifier. */ -#define IPC_SET 1 /* Set `ipc_perm' options. */ -#define IPC_STAT 2 /* Get `ipc_perm' options. */ -#ifdef __USE_GNU -# define IPC_INFO 3 /* See ipcs. */ -#endif - -/* Special key values. */ -#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ - - -/* Data structure used to pass permission information to IPC operations. */ -struct ipc_perm - { - __key_t __key; /* Key. */ - __uid_t uid; /* Owner's user ID. */ - __gid_t gid; /* Owner's group ID. */ - __uid_t cuid; /* Creator's user ID. */ - __gid_t cgid; /* Creator's group ID. */ - unsigned short int mode; /* Read/write permission. */ - unsigned short int __pad1; - unsigned short int __seq; /* Sequence number. */ - unsigned short int __pad2; - unsigned long int __unused1; - unsigned long int __unused2; - }; diff --git a/libc/sysdeps/linux/i386/bits/libc-lock.h b/libc/sysdeps/linux/i386/bits/libc-lock.h deleted file mode 100644 index dbd9cc14f..000000000 --- a/libc/sysdeps/linux/i386/bits/libc-lock.h +++ /dev/null @@ -1,317 +0,0 @@ -/* libc-internal interface for mutex locks. LinuxThreads version. - Copyright (C) 1996,1997,1998,1999,2000,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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _BITS_LIBC_LOCK_H -#define _BITS_LIBC_LOCK_H 1 - -#include <pthread.h> - -/* Mutex type. */ -#ifdef _LIBC -typedef pthread_mutex_t __libc_lock_t; -typedef pthread_rwlock_t __libc_rwlock_t; -#else -typedef struct __libc_lock_opaque__ __libc_lock_t; -typedef struct __libc_rwlock_opaque__ __libc_rwlock_t; -#endif - -/* Type for key to thread-specific data. */ -typedef pthread_key_t __libc_key_t; - -/* Define a lock variable NAME with storage class CLASS. The lock must be - initialized with __libc_lock_init before it can be used (or define it - with __libc_lock_define_initialized, below). Use `extern' for CLASS to - declare a lock defined in another module. In public structure - definitions you must use a pointer to the lock structure (i.e., NAME - begins with a `*'), because its storage size will not be known outside - of libc. */ -#define __libc_lock_define(CLASS,NAME) \ - CLASS __libc_lock_t NAME; -#define __libc_rwlock_define(CLASS,NAME) \ - CLASS __libc_rwlock_t NAME; - -/* Define an initialized lock variable NAME with storage class CLASS. - - For the C library we take a deeper look at the initializer. For - this implementation all fields are initialized to zero. Therefore - we don't initialize the variable which allows putting it into the - BSS section. (Except on PA-RISC and other odd architectures, where - initialized locks must be set to one due to the lack of normal - atomic operations.) */ - -#if __LT_SPINLOCK_INIT == 0 -# define __libc_lock_define_initialized(CLASS,NAME) \ - CLASS __libc_lock_t NAME; -#else -# define __libc_lock_define_initialized(CLASS,NAME) \ - CLASS __libc_lock_t NAME = PTHREAD_MUTEX_INITIALIZER; -#endif - -#define __libc_rwlock_define_initialized(CLASS,NAME) \ - CLASS __libc_rwlock_t NAME = PTHREAD_RWLOCK_INITIALIZER; - -/* Define an initialized recursive lock variable NAME with storage - class CLASS. */ -#define __libc_lock_define_initialized_recursive(CLASS,NAME) \ - CLASS __libc_lock_t NAME = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; - -/* Initialize the named lock variable, leaving it in a consistent, unlocked - state. */ -#define __libc_lock_init(NAME) \ - (__pthread_mutex_init != NULL ? __pthread_mutex_init (&(NAME), NULL) : 0); -#define __libc_rwlock_init(NAME) \ - (__pthread_rwlock_init != NULL ? __pthread_rwlock_init (&(NAME), NULL) : 0); - -/* Same as last but this time we initialize a recursive mutex. */ -#define __libc_lock_init_recursive(NAME) \ - do { \ - if (__pthread_mutex_init != NULL) \ - { \ - pthread_mutexattr_t __attr; \ - __pthread_mutexattr_init (&__attr); \ - __pthread_mutexattr_settype (&__attr, PTHREAD_MUTEX_RECURSIVE_NP); \ - __pthread_mutex_init (&(NAME), &__attr); \ - __pthread_mutexattr_destroy (&__attr); \ - } \ - } while (0); - -/* Finalize the named lock variable, which must be locked. It cannot be - used again until __libc_lock_init is called again on it. This must be - called on a lock variable before the containing storage is reused. */ -#define __libc_lock_fini(NAME) \ - (__pthread_mutex_destroy != NULL ? __pthread_mutex_destroy (&(NAME)) : 0); -#define __libc_rwlock_fini(NAME) \ - (__pthread_rwlock_destroy != NULL ? __pthread_rwlock_destroy (&(NAME)) : 0); - -/* Finalize recursive named lock. */ -#define __libc_lock_fini_recursive(NAME) __libc_lock_fini (NAME) - -/* Lock the named lock variable. */ -#define __libc_lock_lock(NAME) \ - (__pthread_mutex_lock != NULL ? __pthread_mutex_lock (&(NAME)) : 0); -#define __libc_rwlock_rdlock(NAME) \ - (__pthread_rwlock_rdlock != NULL ? __pthread_rwlock_rdlock (&(NAME)) : 0); -#define __libc_rwlock_wrlock(NAME) \ - (__pthread_rwlock_wrlock != NULL ? __pthread_rwlock_wrlock (&(NAME)) : 0); - -/* Lock the recursive named lock variable. */ -#define __libc_lock_lock_recursive(NAME) __libc_lock_lock (NAME) - -/* Try to lock the named lock variable. */ -#define __libc_lock_trylock(NAME) \ - (__pthread_mutex_trylock != NULL ? __pthread_mutex_trylock (&(NAME)) : 0) -#define __libc_rwlock_tryrdlock(NAME) \ - (__pthread_rwlock_tryrdlock != NULL \ - ? __pthread_rwlock_tryrdlock (&(NAME)) : 0) -#define __libc_rwlock_trywrlock(NAME) \ - (__pthread_rwlock_trywrlock != NULL \ - ? __pthread_rwlock_trywrlock (&(NAME)) : 0) - -/* Try to lock the recursive named lock variable. */ -#define __libc_lock_trylock_recursive(NAME) __libc_lock_trylock (NAME) - -/* Unlock the named lock variable. */ -#define __libc_lock_unlock(NAME) \ - (__pthread_mutex_unlock != NULL ? __pthread_mutex_unlock (&(NAME)) : 0); -#define __libc_rwlock_unlock(NAME) \ - (__pthread_rwlock_unlock != NULL ? __pthread_rwlock_unlock (&(NAME)) : 0); - -/* Unlock the recursive named lock variable. */ -#define __libc_lock_unlock_recursive(NAME) __libc_lock_unlock (NAME) - - -/* Define once control variable. */ -#if PTHREAD_ONCE_INIT == 0 -/* Special case for static variables where we can avoid the initialization - if it is zero. */ -# define __libc_once_define(CLASS, NAME) \ - CLASS pthread_once_t NAME -#else -# define __libc_once_define(CLASS, NAME) \ - CLASS pthread_once_t NAME = PTHREAD_ONCE_INIT -#endif - -/* Call handler iff the first call. */ -#define __libc_once(ONCE_CONTROL, INIT_FUNCTION) \ - do { \ - if (__pthread_once != NULL) \ - __pthread_once (&(ONCE_CONTROL), (INIT_FUNCTION)); \ - else if ((ONCE_CONTROL) == PTHREAD_ONCE_INIT) { \ - INIT_FUNCTION (); \ - (ONCE_CONTROL) = !PTHREAD_ONCE_INIT; \ - } \ - } while (0) - - -/* Start critical region with cleanup. */ -#define __libc_cleanup_region_start(FCT, ARG) \ - { struct _pthread_cleanup_buffer _buffer; \ - int _avail = _pthread_cleanup_push_defer != NULL; \ - if (_avail) { \ - _pthread_cleanup_push_defer (&_buffer, (FCT), (ARG)); \ - } - -/* End critical region with cleanup. */ -#define __libc_cleanup_region_end(DOIT) \ - if (_avail) { \ - _pthread_cleanup_pop_restore (&_buffer, (DOIT)); \ - } \ - } - -/* Sometimes we have to exit the block in the middle. */ -#define __libc_cleanup_end(DOIT) \ - if (_avail) { \ - _pthread_cleanup_pop_restore (&_buffer, (DOIT)); \ - } - -/* Create thread-specific key. */ -#define __libc_key_create(KEY, DESTRUCTOR) \ - (__pthread_key_create != NULL ? __pthread_key_create (KEY, DESTRUCTOR) : 1) - -/* Get thread-specific data. */ -#define __libc_getspecific(KEY) \ - (__pthread_getspecific != NULL ? __pthread_getspecific (KEY) : NULL) - -/* Set thread-specific data. */ -#define __libc_setspecific(KEY, VALUE) \ - (__pthread_setspecific != NULL ? __pthread_setspecific (KEY, VALUE) : 0) - - -/* Register handlers to execute before and after `fork'. */ -#define __libc_atfork(PREPARE, PARENT, CHILD) \ - (__pthread_atfork != NULL ? __pthread_atfork (PREPARE, PARENT, CHILD) : 0) - -/* Functions that are used by this file and are internal to the GNU C - library. */ - -extern int __pthread_mutex_init (pthread_mutex_t *__mutex, - __const pthread_mutexattr_t *__mutex_attr); - -extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex); - -extern int __pthread_mutex_trylock (pthread_mutex_t *__mutex); - -extern int __pthread_mutex_lock (pthread_mutex_t *__mutex); - -extern int __pthread_mutex_unlock (pthread_mutex_t *__mutex); - -extern int __pthread_mutexattr_init (pthread_mutexattr_t *__attr); - -extern int __pthread_mutexattr_destroy (pthread_mutexattr_t *__attr); - -extern int __pthread_mutexattr_settype (pthread_mutexattr_t *__attr, - int __kind); - -#ifdef __USE_UNIX98 -extern int __pthread_rwlock_init (pthread_rwlock_t *__rwlock, - __const pthread_rwlockattr_t *__attr); - -extern int __pthread_rwlock_destroy (pthread_rwlock_t *__rwlock); - -extern int __pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock); - -extern int __pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock); - -extern int __pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock); - -extern int __pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock); - -extern int __pthread_rwlock_unlock (pthread_rwlock_t *__rwlock); -#endif - -extern int __pthread_key_create (pthread_key_t *__key, - void (*__destr_function) (void *)); - -extern int __pthread_setspecific (pthread_key_t __key, - __const void *__pointer); - -extern void *__pthread_getspecific (pthread_key_t __key); - -extern int __pthread_once (pthread_once_t *__once_control, - void (*__init_routine) (void)); - -extern int __pthread_atfork (void (*__prepare) (void), - void (*__parent) (void), - void (*__child) (void)); - - - -/* Make the pthread functions weak so that we can elide them from - single-threaded processes. */ -#ifndef __NO_WEAK_PTHREAD_ALIASES -# ifdef weak_extern -# if _LIBC -# include <bp-sym.h> -# else -# define BP_SYM (sym) sym -# endif -weak_extern (BP_SYM (__pthread_mutex_init)) -weak_extern (BP_SYM (__pthread_mutex_destroy)) -weak_extern (BP_SYM (__pthread_mutex_lock)) -weak_extern (BP_SYM (__pthread_mutex_trylock)) -weak_extern (BP_SYM (__pthread_mutex_unlock)) -weak_extern (BP_SYM (__pthread_mutexattr_init)) -weak_extern (BP_SYM (__pthread_mutexattr_destroy)) -weak_extern (BP_SYM (__pthread_mutexattr_settype)) -weak_extern (BP_SYM (__pthread_rwlock_init)) -weak_extern (BP_SYM (__pthread_rwlock_destroy)) -weak_extern (BP_SYM (__pthread_rwlock_rdlock)) -weak_extern (BP_SYM (__pthread_rwlock_tryrdlock)) -weak_extern (BP_SYM (__pthread_rwlock_wrlock)) -weak_extern (BP_SYM (__pthread_rwlock_trywrlock)) -weak_extern (BP_SYM (__pthread_rwlock_unlock)) -weak_extern (BP_SYM (__pthread_key_create)) -weak_extern (BP_SYM (__pthread_setspecific)) -weak_extern (BP_SYM (__pthread_getspecific)) -weak_extern (BP_SYM (__pthread_once)) -weak_extern (__pthread_initialize) -weak_extern (__pthread_atfork) -weak_extern (BP_SYM (_pthread_cleanup_push_defer)) -weak_extern (BP_SYM (_pthread_cleanup_pop_restore)) -# else -# pragma weak __pthread_mutex_init -# pragma weak __pthread_mutex_destroy -# pragma weak __pthread_mutex_lock -# pragma weak __pthread_mutex_trylock -# pragma weak __pthread_mutex_unlock -# pragma weak __pthread_mutexattr_init -# pragma weak __pthread_mutexattr_destroy -# pragma weak __pthread_mutexattr_settype -# pragma weak __pthread_rwlock_destroy -# pragma weak __pthread_rwlock_rdlock -# pragma weak __pthread_rwlock_tryrdlock -# pragma weak __pthread_rwlock_wrlock -# pragma weak __pthread_rwlock_trywrlock -# pragma weak __pthread_rwlock_unlock -# pragma weak __pthread_key_create -# pragma weak __pthread_setspecific -# pragma weak __pthread_getspecific -# pragma weak __pthread_once -# pragma weak __pthread_initialize -# pragma weak __pthread_atfork -# pragma weak _pthread_cleanup_push_defer -# pragma weak _pthread_cleanup_pop_restore -# endif -#endif - -/* We need portable names for some functions. E.g., when they are - used as argument to __libc_cleanup_region_start. */ -#define __libc_mutex_unlock __pthread_mutex_unlock - -#endif /* bits/libc-lock.h */ diff --git a/libc/sysdeps/linux/i386/bits/local_lim.h b/libc/sysdeps/linux/i386/bits/local_lim.h deleted file mode 100644 index 0a7c83706..000000000 --- a/libc/sysdeps/linux/i386/bits/local_lim.h +++ /dev/null @@ -1,77 +0,0 @@ -/* Minimum guaranteed maximum values for system limits. Linux version. - Copyright (C) 1993, 94, 95, 96, 97, 98, 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* The kernel header pollutes the namespace with the NR_OPEN symbol - and defines LINK_MAX although filesystems have different maxima. A - similar thing is true for OPEN_MAX: the limit can be changed at - runtime and therefore the macro must not be defined. Remove this - after including the header if necessary. */ -#ifndef NR_OPEN -# define __undef_NR_OPEN -#endif -#ifndef LINK_MAX -# define __undef_LINK_MAX -#endif -#ifndef OPEN_MAX -# define __undef_OPEN_MAX -#endif - -/* The kernel sources contain a file with all the needed information. */ -#include <linux/limits.h> - -/* Have to remove NR_OPEN? */ -#ifdef __undef_NR_OPEN -# undef NR_OPEN -# undef __undef_NR_OPEN -#endif -/* Have to remove LINK_MAX? */ -#ifdef __undef_LINK_MAX -# undef LINK_MAX -# undef __undef_LINK_MAX -#endif -/* Have to remove OPEN_MAX? */ -#ifdef __undef_OPEN_MAX -# undef OPEN_MAX -# undef __undef_OPEN_MAX -#endif - -/* The number of data keys per process. */ -#define _POSIX_THREAD_KEYS_MAX 128 -/* This is the value this implementation supports. */ -#define PTHREAD_KEYS_MAX 1024 - -/* Controlling the iterations of destructors for thread-specific data. */ -#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 -/* Number of iterations this implementation does. */ -#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS - -/* The number of threads per process. */ -#define _POSIX_THREAD_THREADS_MAX 64 -/* This is the value this implementation supports. */ -#define PTHREAD_THREADS_MAX 1024 - -/* Maximum amount by which a process can descrease its asynchronous I/O - priority level. */ -#define AIO_PRIO_DELTA_MAX 20 - -/* Minimum size for a thread. We are free to choose a reasonable value. */ -#define PTHREAD_STACK_MIN 16384 - -/* Maximum number of POSIX timers available. */ -#define TIMER_MAX 256 diff --git a/libc/sysdeps/linux/i386/bits/locale.h b/libc/sysdeps/linux/i386/bits/locale.h deleted file mode 100644 index 50064b53e..000000000 --- a/libc/sysdeps/linux/i386/bits/locale.h +++ /dev/null @@ -1,44 +0,0 @@ -/* Definition of locale category symbol values. - Copyright (C) 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. */ - -#if !defined _LOCALE_H && !defined _LANGINFO_H -# error "Never use <bits/locale.h> directly; include <locale.h> instead." -#endif - -#ifndef _BITS_LOCALE_H -#define _BITS_LOCALE_H 1 - -enum -{ - __LC_CTYPE = 0, - __LC_NUMERIC = 1, - __LC_TIME = 2, - __LC_COLLATE = 3, - __LC_MONETARY = 4, - __LC_MESSAGES = 5, - __LC_ALL = 6, - __LC_PAPER = 7, - __LC_NAME = 8, - __LC_ADDRESS = 9, - __LC_TELEPHONE = 10, - __LC_MEASUREMENT = 11, - __LC_IDENTIFICATION = 12 -}; - -#endif /* bits/locale.h */ diff --git a/libc/sysdeps/linux/i386/bits/mathcalls.h b/libc/sysdeps/linux/i386/bits/mathcalls.h deleted file mode 100644 index c1181f737..000000000 --- a/libc/sysdeps/linux/i386/bits/mathcalls.h +++ /dev/null @@ -1,333 +0,0 @@ -/* Prototype declarations for math functions; helper file for <math.h>. - Copyright (C) 1996,1997,1998,1999,2000,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 <math.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,[_r], (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,[_r], (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. - - Note that there must be no whitespace before the argument passed for - NAME, to make token pasting work with -traditional. */ - -#ifndef _MATH_H - #error "Never include <bits/mathcalls.h> directly; include <math.h> instead." -#endif - - -/* Trigonometric functions. */ - -/* Arc cosine of X. */ -__MATHCALL (acos,, (_Mdouble_ __x)); -/* Arc sine of X. */ -__MATHCALL (asin,, (_Mdouble_ __x)); -/* Arc tangent of X. */ -__MATHCALL (atan,, (_Mdouble_ __x)); -/* Arc tangent of Y/X. */ -__MATHCALL (atan2,, (_Mdouble_ __y, _Mdouble_ __x)); - -/* Cosine of X. */ -__MATHCALL (cos,, (_Mdouble_ __x)); -/* Sine of X. */ -__MATHCALL (sin,, (_Mdouble_ __x)); -/* Tangent of X. */ -__MATHCALL (tan,, (_Mdouble_ __x)); - -#ifdef __USE_GNU -/* Cosine and sine of X. */ -__MATHDECL (void,sincos,, - (_Mdouble_ __x, _Mdouble_ *__sinx, _Mdouble_ *__cosx)); -#endif - -/* Hyperbolic functions. */ - -/* Hyperbolic cosine of X. */ -__MATHCALL (cosh,, (_Mdouble_ __x)); -/* Hyperbolic sine of X. */ -__MATHCALL (sinh,, (_Mdouble_ __x)); -/* Hyperbolic tangent of X. */ -__MATHCALL (tanh,, (_Mdouble_ __x)); - -#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 -/* Hyperbolic arc cosine of X. */ -__MATHCALL (acosh,, (_Mdouble_ __x)); -/* Hyperbolic arc sine of X. */ -__MATHCALL (asinh,, (_Mdouble_ __x)); -/* Hyperbolic arc tangent of X. */ -__MATHCALL (atanh,, (_Mdouble_ __x)); -#endif - -/* Exponential and logarithmic functions. */ - -/* Exponential function of X. */ -__MATHCALL (exp,, (_Mdouble_ __x)); - -#ifdef __USE_GNU -/* A function missing in all standards: compute exponent to base ten. */ -__MATHCALL (exp10,, (_Mdouble_ __x)); -/* Another name occasionally used. */ -__MATHCALL (pow10,, (_Mdouble_ __x)); -#endif - -/* Break VALUE into a normalized fraction and an integral power of 2. */ -__MATHCALL (frexp,, (_Mdouble_ __x, int *__exponent)); - -/* X times (two to the EXP power). */ -__MATHCALL (ldexp,, (_Mdouble_ __x, int __exponent)); - -/* Natural logarithm of X. */ -__MATHCALL (log,, (_Mdouble_ __x)); - -/* Base-ten logarithm of X. */ -__MATHCALL (log10,, (_Mdouble_ __x)); - -/* Break VALUE into integral and fractional parts. */ -__MATHCALL (modf,, (_Mdouble_ __x, _Mdouble_ *__iptr)); - -#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 -/* Return exp(X) - 1. */ -__MATHCALL (expm1,, (_Mdouble_ __x)); - -/* Return log(1 + X). */ -__MATHCALL (log1p,, (_Mdouble_ __x)); - -/* Return the base 2 signed integral exponent of X. */ -__MATHCALL (logb,, (_Mdouble_ __x)); -#endif - -#ifdef __USE_ISOC99 -/* Compute base-2 exponential of X. */ -__MATHCALL (exp2,, (_Mdouble_ __x)); - -/* Compute base-2 logarithm of X. */ -__MATHCALL (log2,, (_Mdouble_ __x)); -#endif - - -/* Power functions. */ - -/* Return X to the Y power. */ -__MATHCALL (pow,, (_Mdouble_ __x, _Mdouble_ __y)); - -/* Return the square root of X. */ -__MATHCALL (sqrt,, (_Mdouble_ __x)); - -#if defined __USE_MISC || defined __USE_XOPEN || defined __USE_ISOC99 -/* Return `sqrt(X*X + Y*Y)'. */ -__MATHCALL (hypot,, (_Mdouble_ __x, _Mdouble_ __y)); -#endif - -#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 -/* Return the cube root of X. */ -__MATHCALL (cbrt,, (_Mdouble_ __x)); -#endif - - -/* Nearest integer, absolute value, and remainder functions. */ - -/* Smallest integral value not less than X. */ -__MATHCALL (ceil,, (_Mdouble_ __x)); - -/* Absolute value of X. */ -__MATHCALLX (fabs,, (_Mdouble_ __x), (__const__)); - -/* Largest integer not greater than X. */ -__MATHCALL (floor,, (_Mdouble_ __x)); - -/* Floating-point modulo remainder of X/Y. */ -__MATHCALL (fmod,, (_Mdouble_ __x, _Mdouble_ __y)); - - -/* Return 0 if VALUE is finite or NaN, +1 if it - is +Infinity, -1 if it is -Infinity. */ -__MATHDECL_1 (int,__isinf,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -/* Return nonzero if VALUE is finite and not NaN. */ -__MATHDECL_1 (int,__finite,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -#ifdef __USE_MISC -/* Return 0 if VALUE is finite or NaN, +1 if it - is +Infinity, -1 if it is -Infinity. */ -__MATHDECL_1 (int,isinf,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -/* Return nonzero if VALUE is finite and not NaN. */ -__MATHDECL_1 (int,finite,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -/* Return the remainder of X/Y. */ -__MATHCALL (drem,, (_Mdouble_ __x, _Mdouble_ __y)); - - -/* Return the fractional part of X after dividing out `ilogb (X)'. */ -__MATHCALL (significand,, (_Mdouble_ __x)); -#endif /* Use misc. */ - -#if defined __USE_MISC || defined __USE_ISOC99 -/* Return X with its signed changed to Y's. */ -__MATHCALLX (copysign,, (_Mdouble_ __x, _Mdouble_ __y), (__const__)); -#endif - -#ifdef __USE_ISOC99 -/* Return representation of NaN for double type. */ -__MATHCALLX (nan,, (__const char *__tagb), (__const__)); -#endif - - -/* Return nonzero if VALUE is not a number. */ -__MATHDECL_1 (int,__isnan,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -#if defined __USE_MISC || defined __USE_XOPEN -/* Return nonzero if VALUE is not a number. */ -__MATHDECL_1 (int,isnan,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -/* Bessel functions. */ -__MATHCALL (j0,, (_Mdouble_)); -__MATHCALL (j1,, (_Mdouble_)); -__MATHCALL (jn,, (int, _Mdouble_)); -__MATHCALL (y0,, (_Mdouble_)); -__MATHCALL (y1,, (_Mdouble_)); -__MATHCALL (yn,, (int, _Mdouble_)); -#endif - - -#if defined __USE_MISC || defined __USE_XOPEN || defined __USE_ISOC99 -/* Error and gamma functions. */ -__MATHCALL (erf,, (_Mdouble_)); -__MATHCALL (erfc,, (_Mdouble_)); -__MATHCALL (lgamma,, (_Mdouble_)); -#endif - -#ifdef __USE_ISOC99 -__MATHCALL (tgamma,, (_Mdouble_)); -#endif - -#if defined __USE_MISC || defined __USE_XOPEN -/* Obsolete alias for `lgamma'. */ -__MATHCALL (gamma,, (_Mdouble_)); -#endif - -#ifdef __USE_MISC -/* Reentrant version of lgamma. This function uses the global variable - `signgam'. The reentrant version instead takes a pointer and stores - the value through it. */ -__MATHCALL (lgamma,_r, (_Mdouble_, int *__signgamp)); -#endif - - -#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 -/* Return the integer nearest X in the direction of the - prevailing rounding mode. */ -__MATHCALL (rint,, (_Mdouble_ __x)); - -/* Return X + epsilon if X < Y, X - epsilon if X > Y. */ -__MATHCALLX (nextafter,, (_Mdouble_ __x, _Mdouble_ __y), (__const__)); -# ifdef __USE_ISOC99 -__MATHCALLX (nexttoward,, (_Mdouble_ __x, long double __y), (__const__)); -# endif - -/* Return the remainder of integer divison X / Y with infinite precision. */ -__MATHCALL (remainder,, (_Mdouble_ __x, _Mdouble_ __y)); - -# if defined __USE_MISC || defined __USE_XOPEN_EXTENDED -/* Return X times (2 to the Nth power). */ -__MATHCALL (scalb,, (_Mdouble_ __x, _Mdouble_ __n)); -# endif - -# if defined __USE_MISC || defined __USE_ISOC99 -/* Return X times (2 to the Nth power). */ -__MATHCALL (scalbn,, (_Mdouble_ __x, int __n)); -# endif - -/* Return the binary exponent of X, which must be nonzero. */ -__MATHDECL (int,ilogb,, (_Mdouble_ __x)); -#endif - -#ifdef __USE_ISOC99 -/* Return X times (2 to the Nth power). */ -__MATHCALL (scalbln,, (_Mdouble_ __x, long int __n)); - -/* Round X to integral value in floating-point format using current - rounding direction, but do not raise inexact exception. */ -__MATHCALL (nearbyint,, (_Mdouble_ __x)); - -/* Round X to nearest integral value, rounding halfway cases away from - zero. */ -__MATHCALL (round,, (_Mdouble_ __x)); - -/* Round X to the integral value in floating-point format nearest but - not larger in magnitude. */ -__MATHCALLX (trunc,, (_Mdouble_ __x), (__const__)); - -/* Compute remainder of X and Y and put in *QUO a value with sign of x/y - and magnitude congruent `mod 2^n' to the magnitude of the integral - quotient x/y, with n >= 3. */ -__MATHCALL (remquo,, (_Mdouble_ __x, _Mdouble_ __y, int *__quo)); - - -/* Conversion functions. */ - -/* Round X to nearest integral value according to current rounding - direction. */ -__MATHDECL (long int,lrint,, (_Mdouble_ __x)); -__MATHDECL (long long int,llrint,, (_Mdouble_ __x)); - -/* Round X to nearest integral value, rounding halfway cases away from - zero. */ -__MATHDECL (long int,lround,, (_Mdouble_ __x)); -__MATHDECL (long long int,llround,, (_Mdouble_ __x)); - - -/* Return positive difference between X and Y. */ -__MATHCALL (fdim,, (_Mdouble_ __x, _Mdouble_ __y)); - -/* Return maximum numeric value from X and Y. */ -__MATHCALL (fmax,, (_Mdouble_ __x, _Mdouble_ __y)); - -/* Return minimum numeric value from X and Y. */ -__MATHCALL (fmin,, (_Mdouble_ __x, _Mdouble_ __y)); - - -/* Classify given number. */ -__MATHDECL_1 (int, __fpclassify,, (_Mdouble_ __value)) - __attribute__ ((__const__)); - -/* Test for negative number. */ -__MATHDECL_1 (int, __signbit,, (_Mdouble_ __value)) - __attribute__ ((__const__)); - - -/* Multiply-add function computed as a ternary operation. */ -__MATHCALL (fma,, (_Mdouble_ __x, _Mdouble_ __y, _Mdouble_ __z)); -#endif /* Use ISO C99. */ diff --git a/libc/sysdeps/linux/i386/bits/mathinline.h b/libc/sysdeps/linux/i386/bits/mathinline.h index e8091df68..0464003b7 100644 --- a/libc/sysdeps/linux/i386/bits/mathinline.h +++ b/libc/sysdeps/linux/i386/bits/mathinline.h @@ -381,7 +381,7 @@ __sincosl (long double __x, long double *__sinx, long double *__cosx) __THROW ("fscale # 2^int(x * log2(e))\n\t" \ : "=t" (__temp) : "0" (1.0), "u" (__exponent)); \ __temp -= 1.0; \ - return __temp + __value ?: __x + return __temp + __value ? __temp + __value : __x __inline_mathcodeNP_ (long double, __expm1l, __x, __expm1_code) diff --git a/libc/sysdeps/linux/i386/bits/msq.h b/libc/sysdeps/linux/i386/bits/msq.h deleted file mode 100644 index 32a49b592..000000000 --- a/libc/sysdeps/linux/i386/bits/msq.h +++ /dev/null @@ -1,77 +0,0 @@ -/* Copyright (C) 1995, 1996, 1997, 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 _SYS_MSG_H -# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead." -#endif - -#include <bits/types.h> - -/* Define options for message queue functions. */ -#define MSG_NOERROR 010000 /* no error if message is too big */ -#ifdef __USE_GNU -# define MSG_EXCEPT 020000 /* recv any msg except of specified type */ -#endif - -/* Types used in the structure definition. */ -typedef unsigned long int msgqnum_t; -typedef unsigned long int msglen_t; - - -/* Structure of record for one message inside the kernel. - The type `struct msg' is opaque. */ -struct msqid_ds -{ - struct ipc_perm msg_perm; /* structure describing operation permission */ - __time_t msg_stime; /* time of last msgsnd command */ - unsigned long int __unused1; - __time_t msg_rtime; /* time of last msgrcv command */ - unsigned long int __unused2; - __time_t msg_ctime; /* time of last change */ - unsigned long int __unused3; - unsigned long int __msg_cbytes; /* current number of bytes on queue */ - msgqnum_t msg_qnum; /* number of messages currently on queue */ - msglen_t msg_qbytes; /* max number of bytes allowed on queue */ - __pid_t msg_lspid; /* pid of last msgsnd() */ - __pid_t msg_lrpid; /* pid of last msgrcv() */ - unsigned long int __unused4; - unsigned long int __unused5; -}; - -#ifdef __USE_MISC - -# define msg_cbytes __msg_cbytes - -/* ipcs ctl commands */ -# define MSG_STAT 11 -# define MSG_INFO 12 - -/* buffer for msgctl calls IPC_INFO, MSG_INFO */ -struct msginfo - { - int msgpool; - int msgmap; - int msgmax; - int msgmnb; - int msgmni; - int msgssz; - int msgtql; - unsigned short int msgseg; - }; - -#endif /* __USE_MISC */ diff --git a/libc/sysdeps/linux/i386/bits/nan.h b/libc/sysdeps/linux/i386/bits/nan.h deleted file mode 100644 index 6d88b551b..000000000 --- a/libc/sysdeps/linux/i386/bits/nan.h +++ /dev/null @@ -1,48 +0,0 @@ -/* `NAN' constant for IEEE 754 machines. - Copyright (C) 1992, 1996, 1997, 1999 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 _MATH_H -# error "Never use <bits/nan.h> directly; include <math.h> instead." -#endif - - -/* IEEE Not A Number. */ - -#ifdef __GNUC__ - -# define NAN \ - (__extension__ \ - ((union { unsigned __l __attribute__((__mode__(__SI__))); float __d; }) \ - { __l: 0x7fc00000UL }).__d) - -#else - -# include <endian.h> - -# if __BYTE_ORDER == __BIG_ENDIAN -# define __nan_bytes { 0x7f, 0xc0, 0, 0 } -# endif -# if __BYTE_ORDER == __LITTLE_ENDIAN -# define __nan_bytes { 0, 0, 0xc0, 0x7f } -# endif - -static union { unsigned char __c[4]; float __d; } __nan_union = { __nan_bytes }; -# define NAN (__nan_union.__d) - -#endif /* GCC. */ diff --git a/libc/sysdeps/linux/i386/bits/netdb.h b/libc/sysdeps/linux/i386/bits/netdb.h deleted file mode 100644 index 41dc73193..000000000 --- a/libc/sysdeps/linux/i386/bits/netdb.h +++ /dev/null @@ -1,33 +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. */ - -#ifndef _NETDB_H -# error "Never include <bits/netdb.h> directly; use <netdb.h> instead." -#endif - - -/* Description of data base entry for a single network. NOTE: here a - poor assumption is made. The network number is expected to fit - into an unsigned long int variable. */ -struct netent -{ - char *n_name; /* Official name of network. */ - char **n_aliases; /* Alias list. */ - int n_addrtype; /* Net address type. */ - uint32_t n_net; /* Network number. */ -}; diff --git a/libc/sysdeps/linux/i386/bits/poll.h b/libc/sysdeps/linux/i386/bits/poll.h deleted file mode 100644 index dccb8b666..000000000 --- a/libc/sysdeps/linux/i386/bits/poll.h +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (C) 1997, 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. */ - -#ifndef _SYS_POLL_H -# error "Never use <bits/poll.h> directly; include <sys/poll.h> instead." -#endif - -/* Event types that can be polled for. These bits may be set in `events' - to indicate the interesting event types; they will appear in `revents' - to indicate the status of the file descriptor. */ -#define POLLIN 0x001 /* There is data to read. */ -#define POLLPRI 0x002 /* There is urgent data to read. */ -#define POLLOUT 0x004 /* Writing now will not block. */ - -#ifdef __USE_XOPEN -/* These values are defined in XPG4.2. */ -# define POLLRDNORM 0x040 /* Normal data may be read. */ -# define POLLRDBAND 0x080 /* Priority data may be read. */ -# define POLLWRNORM 0x100 /* Writing now will not block. */ -# define POLLWRBAND 0x200 /* Priority data may be written. */ -#endif - -#ifdef __USE_GNU -/* This is an extension for Linux. */ -# define POLLMSG 0x400 -#endif - -/* Event types always implicitly polled for. These bits need not be set in - `events', but they will appear in `revents' to indicate the status of - the file descriptor. */ -#define POLLERR 0x008 /* Error condition. */ -#define POLLHUP 0x010 /* Hung up. */ -#define POLLNVAL 0x020 /* Invalid polling request. */ diff --git a/libc/sysdeps/linux/i386/bits/posix1_lim.h b/libc/sysdeps/linux/i386/bits/posix1_lim.h deleted file mode 100644 index e16f4674d..000000000 --- a/libc/sysdeps/linux/i386/bits/posix1_lim.h +++ /dev/null @@ -1,141 +0,0 @@ -/* Copyright (C) 1991,92,93,96,98,2000,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. */ - -/* - * POSIX Standard: 2.9.2 Minimum Values Added to <limits.h> - * - * Never include this file directly; use <limits.h> instead. - */ - -#ifndef _BITS_POSIX1_LIM_H -#define _BITS_POSIX1_LIM_H 1 - - -/* These are the standard-mandated minimum values. */ - -/* Minimum number of operations in one list I/O call. */ -#define _POSIX_AIO_LISTIO_MAX 2 - -/* Minimal number of outstanding asynchronous I/O operations. */ -#define _POSIX_AIO_MAX 1 - -/* Maximum length of arguments to `execve', including environment. */ -#define _POSIX_ARG_MAX 4096 - -/* Maximum simultaneous processes per real user ID. */ -#define _POSIX_CHILD_MAX 6 - -/* Minimal number of timer expiration overruns. */ -#define _POSIX_DELAYTIMER_MAX 32 - -/* Maximum link count of a file. */ -#define _POSIX_LINK_MAX 8 - -/* Number of bytes in a terminal canonical input queue. */ -#define _POSIX_MAX_CANON 255 - -/* Number of bytes for which space will be - available in a terminal input queue. */ -#define _POSIX_MAX_INPUT 255 - -/* Maximum number of message queues open for a process. */ -#define _POSIX_MQ_OPEN_MAX 8 - -/* Maximum number of supported message priorities. */ -#define _POSIX_MQ_PRIO_MAX 32 - -/* Number of simultaneous supplementary group IDs per process. */ -#define _POSIX_NGROUPS_MAX 0 - -/* Number of files one process can have open at once. */ -#define _POSIX_OPEN_MAX 16 - -/* Number of descriptors that a process may examine with `pselect' or - `select'. */ -#define _POSIX_FD_SETSIZE _POSIX_OPEN_MAX - -/* Number of bytes in a filename. */ -#define _POSIX_NAME_MAX 14 - -/* Number of bytes in a pathname. */ -#define _POSIX_PATH_MAX 256 - -/* Number of bytes than can be written atomically to a pipe. */ -#define _POSIX_PIPE_BUF 512 - -/* Minimal number of realtime signals reserved for the application. */ -#define _POSIX_RTSIG_MAX 8 - -/* Number of semaphores a process can have. */ -#define _POSIX_SEM_NSEMS_MAX 256 - -/* Maximal value of a semaphore. */ -#define _POSIX_SEM_VALUE_MAX 32767 - -/* Number of pending realtime signals. */ -#define _POSIX_SIGQUEUE_MAX 32 - -/* Largest value of a `ssize_t'. */ -#define _POSIX_SSIZE_MAX 32767 - -/* Number of streams a process can have open at once. */ -#define _POSIX_STREAM_MAX 8 - -/* Maximum length of a timezone name (element of `tzname'). */ -#define _POSIX_TZNAME_MAX 6 - -/* Maximum number of connections that can be queued on a socket. */ -#define _POSIX_QLIMIT 1 - -/* Maximum number of bytes that can be buffered on a socket for send - or receive. */ -#define _POSIX_HIWAT _POSIX_PIPE_BUF - -/* Maximum number of elements in an `iovec' array. */ -#define _POSIX_UIO_MAXIOV 16 - -/* Maximum number of characters in a tty name. */ -#define _POSIX_TTY_NAME_MAX 9 - -/* Number of timer for a process. */ -#define _POSIX_TIMER_MAX 32 - -/* Maximum length of login name. */ -#define _POSIX_LOGIN_NAME_MAX 9 - -/* Maximum clock resolution in nanoseconds. */ -#define _POSIX_CLOCKRES_MIN 20000000 - - -/* Get the implementation-specific values for the above. */ -#include <bits/local_lim.h> - - -#ifndef SSIZE_MAX -# define SSIZE_MAX INT_MAX -#endif - - -/* This value is a guaranteed minimum maximum. - The current maximum can be got from `sysconf'. */ - -#ifndef NGROUPS_MAX -# define NGROUPS_MAX _POSIX_NGROUPS_MAX -#endif - -#endif /* bits/posix1_lim.h */ diff --git a/libc/sysdeps/linux/i386/bits/posix2_lim.h b/libc/sysdeps/linux/i386/bits/posix2_lim.h deleted file mode 100644 index 24483a09d..000000000 --- a/libc/sysdeps/linux/i386/bits/posix2_lim.h +++ /dev/null @@ -1,91 +0,0 @@ -/* Copyright (C) 1991, 1996, 1999, 2000, 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. */ - -/* - * Never include this file directly; include <limits.h> instead. - */ - -#ifndef _BITS_POSIX2_LIM_H -#define _BITS_POSIX2_LIM_H 1 - - -/* The maximum `ibase' and `obase' values allowed by the `bc' utility. */ -#define _POSIX2_BC_BASE_MAX 99 - -/* The maximum number of elements allowed in an array by the `bc' utility. */ -#define _POSIX2_BC_DIM_MAX 2048 - -/* The maximum `scale' value allowed by the `bc' utility. */ -#define _POSIX2_BC_SCALE_MAX 99 - -/* The maximum length of a string constant accepted by the `bc' utility. */ -#define _POSIX2_BC_STRING_MAX 1000 - -/* The maximum number of weights that can be assigned to an entry of - the LC_COLLATE `order' keyword in the locale definition file. */ -#define _POSIX2_COLL_WEIGHTS_MAX 2 - -/* The maximum number of expressions that can be nested - within parentheses by the `expr' utility. */ -#define _POSIX2_EXPR_NEST_MAX 32 - -/* The maximum length, in bytes, of an input line. */ -#define _POSIX2_LINE_MAX 2048 - -/* The maximum number of repeated occurrences of a regular expression - permitted when using the interval notation `\{M,N\}'. */ -#define _POSIX2_RE_DUP_MAX 255 - -/* The maximum number of bytes in a character class name. We have no - fixed limit, 2048 is a high number. */ -#define _POSIX2_CHARCLASS_NAME_MAX 14 - - -/* These values are implementation-specific, - and may vary within the implementation. - Their precise values can be obtained from sysconf. */ - -#ifndef BC_BASE_MAX -#define BC_BASE_MAX _POSIX2_BC_BASE_MAX -#endif -#ifndef BC_DIM_MAX -#define BC_DIM_MAX _POSIX2_BC_DIM_MAX -#endif -#ifndef BC_SCALE_MAX -#define BC_SCALE_MAX _POSIX2_BC_SCALE_MAX -#endif -#ifndef BC_STRING_MAX -#define BC_STRING_MAX _POSIX2_BC_STRING_MAX -#endif -#ifndef COLL_WEIGHTS_MAX -#define COLL_WEIGHTS_MAX 255 -#endif -#ifndef EXPR_NEST_MAX -#define EXPR_NEST_MAX _POSIX2_EXPR_NEST_MAX -#endif -#ifndef LINE_MAX -#define LINE_MAX _POSIX2_LINE_MAX -#endif -#ifndef CHARCLASS_NAME_MAX -#define CHARCLASS_NAME_MAX 2048 -#endif - -/* This value is defined like this in regex.h. */ -#define RE_DUP_MAX (0x7fff) - -#endif /* bits/posix2_lim.h */ diff --git a/libc/sysdeps/linux/i386/bits/pthreadtypes.h b/libc/sysdeps/linux/i386/bits/pthreadtypes.h deleted file mode 100644 index 3ee5c4813..000000000 --- a/libc/sysdeps/linux/i386/bits/pthreadtypes.h +++ /dev/null @@ -1,142 +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. */ - -#if !defined _BITS_TYPES_H && !defined _PTHREAD_H -# error "Never include <bits/pthreadtypes.h> directly; use <sys/types.h> instead." -#endif - -#ifndef _BITS_PTHREADTYPES_H -#define _BITS_PTHREADTYPES_H 1 - -#define __need_schedparam -#include <bits/sched.h> - -/* Fast locks (not abstract because mutexes and conditions aren't abstract). */ -struct _pthread_fastlock -{ - long int __status; /* "Free" or "taken" or head of waiting list */ - int __spinlock; /* Used by compare_and_swap emulation. Also, - adaptive SMP lock stores spin count here. */ -}; - -#ifndef _PTHREAD_DESCR_DEFINED -/* Thread descriptors */ -typedef struct _pthread_descr_struct *_pthread_descr; -# define _PTHREAD_DESCR_DEFINED -#endif - - -/* Attributes for threads. */ -typedef struct __pthread_attr_s -{ - int __detachstate; - int __schedpolicy; - struct __sched_param __schedparam; - int __inheritsched; - int __scope; - size_t __guardsize; - int __stackaddr_set; - void *__stackaddr; - size_t __stacksize; -} pthread_attr_t; - - -/* Conditions (not abstract because of PTHREAD_COND_INITIALIZER */ -typedef struct -{ - struct _pthread_fastlock __c_lock; /* Protect against concurrent access */ - _pthread_descr __c_waiting; /* Threads waiting on this condition */ -} pthread_cond_t; - - -/* Attribute for conditionally variables. */ -typedef struct -{ - int __dummy; -} pthread_condattr_t; - -/* Keys for thread-specific data */ -typedef unsigned int pthread_key_t; - - -/* Mutexes (not abstract because of PTHREAD_MUTEX_INITIALIZER). */ -/* (The layout is unnatural to maintain binary compatibility - with earlier releases of LinuxThreads.) */ -typedef struct -{ - int __m_reserved; /* Reserved for future use */ - int __m_count; /* Depth of recursive locking */ - _pthread_descr __m_owner; /* Owner thread (if recursive or errcheck) */ - int __m_kind; /* Mutex kind: fast, recursive or errcheck */ - struct _pthread_fastlock __m_lock; /* Underlying fast lock */ -} pthread_mutex_t; - - -/* Attribute for mutex. */ -typedef struct -{ - int __mutexkind; -} pthread_mutexattr_t; - - -/* Once-only execution */ -typedef int pthread_once_t; - - -#ifdef __USE_UNIX98 -/* Read-write locks. */ -typedef struct _pthread_rwlock_t -{ - struct _pthread_fastlock __rw_lock; /* Lock to guarantee mutual exclusion */ - int __rw_readers; /* Number of readers */ - _pthread_descr __rw_writer; /* Identity of writer, or NULL if none */ - _pthread_descr __rw_read_waiting; /* Threads waiting for reading */ - _pthread_descr __rw_write_waiting; /* Threads waiting for writing */ - int __rw_kind; /* Reader/Writer preference selection */ - int __rw_pshared; /* Shared between processes or not */ -} pthread_rwlock_t; - - -/* Attribute for read-write locks. */ -typedef struct -{ - int __lockkind; - int __pshared; -} pthread_rwlockattr_t; -#endif - -#ifdef __USE_XOPEN2K -/* POSIX spinlock data type. */ -typedef volatile int pthread_spinlock_t; - -/* POSIX barrier. */ -typedef struct { - struct _pthread_fastlock __ba_lock; /* Lock to guarantee mutual exclusion */ - int __ba_required; /* Threads needed for completion */ - int __ba_present; /* Threads waiting */ - _pthread_descr __ba_waiting; /* Queue of waiting threads */ -} pthread_barrier_t; - -/* barrier attribute */ -typedef struct { - int __pshared; -} pthread_barrierattr_t; - -#endif - - -/* Thread identifiers */ -typedef unsigned long int pthread_t; - -#endif /* bits/pthreadtypes.h */ diff --git a/libc/sysdeps/linux/i386/bits/sched.h b/libc/sysdeps/linux/i386/bits/sched.h deleted file mode 100644 index 5c10d85d4..000000000 --- a/libc/sysdeps/linux/i386/bits/sched.h +++ /dev/null @@ -1,73 +0,0 @@ -/* Definitions of constants and data structure for POSIX 1003.1b-1993 - scheduling interface. - Copyright (C) 1996, 1997, 1998, 1999, 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. */ - -#ifndef __need_schedparam - -#ifndef _SCHED_H -# error "Never include <bits/sched.h> directly; use <sched.h> instead." -#endif - - -/* Scheduling algorithms. */ -#define SCHED_OTHER 0 -#define SCHED_FIFO 1 -#define SCHED_RR 2 - -#ifdef __USE_MISC -/* Cloning flags. */ -# define CSIGNAL 0x000000ff /* Signal mask to be sent at exit. */ -# define CLONE_VM 0x00000100 /* Set if VM shared between processes. */ -# define CLONE_FS 0x00000200 /* Set if fs info shared between processes. */ -# define CLONE_FILES 0x00000400 /* Set if open files shared between processes. */ -# define CLONE_SIGHAND 0x00000800 /* Set if signal handlers shared. */ -# define CLONE_PID 0x00001000 /* Set if pid shared. */ -# define CLONE_PTRACE 0x00002000 /* Set if tracing continues on the child. */ -# define CLONE_VFORK 0x00004000 /* Set if the parent wants the child to - wake it up on mm_release. */ -#endif - -/* The official definition. */ -struct sched_param - { - int __sched_priority; - }; - -__BEGIN_DECLS - -/* Clone current process. */ -#ifdef __USE_MISC -extern int clone (int (*__fn) (void *__arg), void *__child_stack, - int __flags, void *__arg) __THROW; -#endif - -__END_DECLS - -#endif /* need schedparam */ - -#if !defined __defined_schedparam \ - && (defined __need_schedparam || defined _SCHED_H) -# define __defined_schedparam 1 -/* Data structure to describe a process' schedulability. */ -struct __sched_param - { - int __sched_priority; - }; -# undef __need_schedparam -#endif diff --git a/libc/sysdeps/linux/i386/bits/sem.h b/libc/sysdeps/linux/i386/bits/sem.h deleted file mode 100644 index 6193501e2..000000000 --- a/libc/sysdeps/linux/i386/bits/sem.h +++ /dev/null @@ -1,87 +0,0 @@ -/* Copyright (C) 1995, 1996, 1997, 1998, 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 _SYS_SEM_H -# error "Never include <bits/sem.h> directly; use <sys/sem.h> instead." -#endif - -#include <sys/types.h> - -/* Flags for `semop'. */ -#define SEM_UNDO 0x1000 /* undo the operation on exit */ - -/* Commands for `semctl'. */ -#define GETPID 11 /* get sempid */ -#define GETVAL 12 /* get semval */ -#define GETALL 13 /* get all semval's */ -#define GETNCNT 14 /* get semncnt */ -#define GETZCNT 15 /* get semzcnt */ -#define SETVAL 16 /* set semval */ -#define SETALL 17 /* set all semval's */ - - -/* Data structure describing a set of semaphores. */ -struct semid_ds -{ - struct ipc_perm sem_perm; /* operation permission struct */ - __time_t sem_otime; /* last semop() time */ - unsigned long int __unused1; - __time_t sem_ctime; /* last time changed by semctl() */ - unsigned long int __unused2; - unsigned long int sem_nsems; /* number of semaphores in set */ - unsigned long int __unused3; - unsigned long int __unused4; -}; - -/* The user should define a union like the following to use it for arguments - for `semctl'. - - union semun - { - int val; <= value for SETVAL - struct semid_ds *buf; <= buffer for IPC_STAT & IPC_SET - unsigned short int *array; <= array for GETALL & SETALL - struct seminfo *__buf; <= buffer for IPC_INFO - }; - - Previous versions of this file used to define this union but this is - incorrect. One can test the macro _SEM_SEMUN_UNDEFINED to see whether - one must define the union or not. */ -#define _SEM_SEMUN_UNDEFINED 1 - -#ifdef __USE_MISC - -/* ipcs ctl cmds */ -# define SEM_STAT 18 -# define SEM_INFO 19 - -struct seminfo -{ - int semmap; - int semmni; - int semmns; - int semmnu; - int semmsl; - int semopm; - int semume; - int semusz; - int semvmx; - int semaem; -}; - -#endif /* __USE_MISC */ diff --git a/libc/sysdeps/linux/i386/bits/shm.h b/libc/sysdeps/linux/i386/bits/shm.h deleted file mode 100644 index 18246c3bd..000000000 --- a/libc/sysdeps/linux/i386/bits/shm.h +++ /dev/null @@ -1,93 +0,0 @@ -/* Copyright (C) 1995, 1996, 1997, 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 _SYS_SHM_H -# error "Never include <bits/shm.h> directly; use <sys/shm.h> instead." -#endif - -#include <bits/types.h> - -/* Permission flag for shmget. */ -#define SHM_R 0400 /* or S_IRUGO from <linux/stat.h> */ -#define SHM_W 0200 /* or S_IWUGO from <linux/stat.h> */ - -/* Flags for `shmat'. */ -#define SHM_RDONLY 010000 /* attach read-only else read-write */ -#define SHM_RND 020000 /* round attach address to SHMLBA */ -#define SHM_REMAP 040000 /* take-over region on attach */ - -/* Commands for `shmctl'. */ -#define SHM_LOCK 11 /* lock segment (root only) */ -#define SHM_UNLOCK 12 /* unlock segment (root only) */ - - -/* Type to count number of attaches. */ -typedef unsigned long int shmatt_t; - -/* Data structure describing a set of semaphores. */ -struct shmid_ds - { - struct ipc_perm shm_perm; /* operation permission struct */ - size_t shm_segsz; /* size of segment in bytes */ - __time_t shm_atime; /* time of last shmat() */ - unsigned long int __unused1; - __time_t shm_dtime; /* time of last shmdt() */ - unsigned long int __unused2; - __time_t shm_ctime; /* time of last change by shmctl() */ - unsigned long int __unused3; - __pid_t shm_cpid; /* pid of creator */ - __pid_t shm_lpid; /* pid of last shmop */ - shmatt_t shm_nattch; /* number of current attaches */ - unsigned long int __unused4; - unsigned long int __unused5; - }; - -#ifdef __USE_MISC - -/* ipcs ctl commands */ -# define SHM_STAT 13 -# define SHM_INFO 14 - -/* shm_mode upper byte flags */ -# define SHM_DEST 01000 /* segment will be destroyed on last detach */ -# define SHM_LOCKED 02000 /* segment will not be swapped */ - -struct shminfo - { - unsigned long int shmmax; - unsigned long int shmmin; - unsigned long int shmmni; - unsigned long int shmseg; - unsigned long int shmall; - unsigned long int __unused1; - unsigned long int __unused2; - unsigned long int __unused3; - unsigned long int __unused4; - }; - -struct shm_info - { - int used_ids; - unsigned long int shm_tot; /* total allocated shm */ - unsigned long int shm_rss; /* total resident shm */ - unsigned long int shm_swp; /* total swapped shm */ - unsigned long int swap_attempts; - unsigned long int swap_successes; - }; - -#endif /* __USE_MISC */ diff --git a/libc/sysdeps/linux/i386/bits/sigaction.h b/libc/sysdeps/linux/i386/bits/sigaction.h deleted file mode 100644 index 48cc5312f..000000000 --- a/libc/sysdeps/linux/i386/bits/sigaction.h +++ /dev/null @@ -1,77 +0,0 @@ -/* The proper definitions for Linux's sigaction. - Copyright (C) 1993-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 _SIGNAL_H -# error "Never include <bits/sigaction.h> directly; use <signal.h> instead." -#endif - -/* Structure describing the action to be taken when a signal arrives. */ -struct sigaction - { - /* Signal handler. */ -#ifdef __USE_POSIX199309 - union - { - /* Used if SA_SIGINFO is not set. */ - __sighandler_t sa_handler; - /* Used if SA_SIGINFO is set. */ - void (*sa_sigaction) (int, siginfo_t *, void *); - } - __sigaction_handler; -# define sa_handler __sigaction_handler.sa_handler -# define sa_sigaction __sigaction_handler.sa_sigaction -#else - __sighandler_t sa_handler; -#endif - - /* Additional set of signals to be blocked. */ - __sigset_t sa_mask; - - /* Special flags. */ - int sa_flags; - - /* Restore handler. */ - void (*sa_restorer) (void); - }; - -/* Bits in `sa_flags'. */ -#define SA_NOCLDSTOP 1 /* Don't send SIGCHLD when children stop. */ -#define SA_NOCLDWAIT 2 /* Don't create zombie on child death. */ -#define SA_SIGINFO 4 /* Invoke signal-catching function with - three arguments instead of one. */ -#if defined __USE_UNIX98 || defined __USE_MISC -# define SA_ONSTACK 0x08000000 /* Use signal stack by using `sa_restorer'. */ -# define SA_RESTART 0x10000000 /* Restart syscall on signal return. */ -# define SA_NODEFER 0x40000000 /* Don't automatically block the signal when - its handler is being executed. */ -# define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler. */ -#endif -#ifdef __USE_MISC -# define SA_INTERRUPT 0x20000000 /* Historical no-op. */ - -/* Some aliases for the SA_ constants. */ -# define SA_NOMASK SA_NODEFER -# define SA_ONESHOT SA_RESETHAND -# define SA_STACK SA_ONSTACK -#endif - -/* Values for the HOW argument to `sigprocmask'. */ -#define SIG_BLOCK 0 /* Block signals. */ -#define SIG_UNBLOCK 1 /* Unblock signals. */ -#define SIG_SETMASK 2 /* Set the set of blocked signals. */ diff --git a/libc/sysdeps/linux/i386/bits/sigcontext.h b/libc/sysdeps/linux/i386/bits/sigcontext.h deleted file mode 100644 index 67dcf9498..000000000 --- a/libc/sysdeps/linux/i386/bits/sigcontext.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 1996, 1997, 1998 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. */ - -#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H -# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead." -#endif - -#ifndef sigcontext_struct -/* Kernel headers before 2.1.1 define a struct sigcontext_struct, but - we need sigcontext. */ -# define sigcontext_struct sigcontext - -# include <asm/sigcontext.h> -#endif diff --git a/libc/sysdeps/linux/i386/bits/siginfo.h b/libc/sysdeps/linux/i386/bits/siginfo.h deleted file mode 100644 index 70a8c217e..000000000 --- a/libc/sysdeps/linux/i386/bits/siginfo.h +++ /dev/null @@ -1,306 +0,0 @@ -/* siginfo_t, sigevent and constants. Linux/SPARC version. - Copyright (C) 1997, 1998, 1999, 2000, 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. */ - -#if !defined _SIGNAL_H && !defined __need_siginfo_t \ - && !defined __need_sigevent_t -# error "Never include this file directly. Use <signal.h> instead" -#endif - -#include <bits/wordsize.h> - -#if (!defined __have_sigval_t \ - && (defined _SIGNAL_H || defined __need_siginfo_t \ - || defined __need_sigevent_t)) -# define __have_sigval_t 1 - -/* Type for data associated with a signal. */ -typedef union sigval - { - int sival_int; - void *sival_ptr; - } sigval_t; -#endif - -#if (!defined __have_siginfo_t \ - && (defined _SIGNAL_H || defined __need_siginfo_t)) -# define __have_siginfo_t 1 - -# define __SI_MAX_SIZE 128 -# if __WORDSIZE == 64 -# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 4) -# else -# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3) -# endif - -typedef struct siginfo - { - int si_signo; /* Signal number. */ - int si_errno; /* If non-zero, an errno value associated with - this signal, as defined in <errno.h>. */ - int si_code; /* Signal code. */ - - union - { - int _pad[__SI_PAD_SIZE]; - - /* kill(). */ - struct - { - __pid_t si_pid; /* Sending process ID. */ - __uid_t si_uid; /* Real user ID of sending process. */ - } _kill; - - /* POSIX.1b timers. */ - struct - { - unsigned int _timer1; - unsigned int _timer2; - } _timer; - - /* POSIX.1b signals. */ - struct - { - __pid_t si_pid; /* Sending process ID. */ - __uid_t si_uid; /* Real user ID of sending process. */ - sigval_t si_sigval; /* Signal value. */ - } _rt; - - /* SIGCHLD. */ - struct - { - __pid_t si_pid; /* Which child. */ - __uid_t si_uid; /* Real user ID of sending process. */ - int si_status; /* Exit value or signal. */ - __clock_t si_utime; - __clock_t si_stime; - } _sigchld; - - /* SIGILL, SIGFPE, SIGSEGV, SIGBUS. */ - struct - { - void *si_addr; /* Faulting insn/memory ref. */ - } _sigfault; - - /* SIGPOLL. */ - struct - { - long int si_band; /* Band event for SIGPOLL. */ - int si_fd; - } _sigpoll; - } _sifields; - } siginfo_t; - - -/* X/Open requires some more fields with fixed names. */ -# define si_pid _sifields._kill.si_pid -# define si_uid _sifields._kill.si_uid -# define si_timer1 _sifields._timer._timer1 -# define si_timer2 _sifields._timer._timer2 -# define si_status _sifields._sigchld.si_status -# define si_utime _sifields._sigchld.si_utime -# define si_stime _sifields._sigchld.si_stime -# define si_value _sifields._rt.si_sigval -# define si_int _sifields._rt.si_sigval.sival_int -# define si_ptr _sifields._rt.si_sigval.sival_ptr -# define si_addr _sifields._sigfault.si_addr -# define si_band _sifields._sigpoll.si_band -# define si_fd _sifields._sigpoll.si_fd - - -/* Values for `si_code'. Positive values are reserved for kernel-generated - signals. */ -enum -{ - SI_ASYNCNL = -6, /* Sent by asynch name lookup completion. */ -# define SI_ASYNCNL SI_ASYNCNL - SI_SIGIO, /* Sent by queued SIGIO. */ -# define SI_SIGIO SI_SIGIO - SI_ASYNCIO, /* Sent by AIO completion. */ -# define SI_ASYNCIO SI_ASYNCIO - SI_MESGQ, /* Sent by real time mesq state change. */ -# define SI_MESGQ SI_MESGQ - SI_TIMER, /* Sent by timer expiration. */ -# define SI_TIMER SI_TIMER - SI_QUEUE, /* Sent by sigqueue. */ -# define SI_QUEUE SI_QUEUE - SI_USER, /* Sent by kill, sigsend, raise. */ -# define SI_USER SI_USER - SI_KERNEL = 0x80 /* Send by kernel. */ -#define SI_KERNEL SI_KERNEL -}; - - -/* `si_code' values for SIGILL signal. */ -enum -{ - ILL_ILLOPC = 1, /* Illegal opcode. */ -# define ILL_ILLOPC ILL_ILLOPC - ILL_ILLOPN, /* Illegal operand. */ -# define ILL_ILLOPN ILL_ILLOPN - ILL_ILLADR, /* Illegal addressing mode. */ -# define ILL_ILLADR ILL_ILLADR - ILL_ILLTRP, /* Illegal trap. */ -# define ILL_ILLTRP ILL_ILLTRP - ILL_PRVOPC, /* Privileged opcode. */ -# define ILL_PRVOPC ILL_PRVOPC - ILL_PRVREG, /* Privileged register. */ -# define ILL_PRVREG ILL_PRVREG - ILL_COPROC, /* Coprocessor error. */ -# define ILL_COPROC ILL_COPROC - ILL_BADSTK /* Internal stack error. */ -# define ILL_BADSTK ILL_BADSTK -}; - -/* `si_code' values for SIGFPE signal. */ -enum -{ - FPE_INTDIV = 1, /* Integer divide by zero. */ -# define FPE_INTDIV FPE_INTDIV - FPE_INTOVF, /* Integer overflow. */ -# define FPE_INTOVF FPE_INTOVF - FPE_FLTDIV, /* Floating point divide by zero. */ -# define FPE_FLTDIV FPE_FLTDIV - FPE_FLTOVF, /* Floating point overflow. */ -# define FPE_FLTOVF FPE_FLTOVF - FPE_FLTUND, /* Floating point underflow. */ -# define FPE_FLTUND FPE_FLTUND - FPE_FLTRES, /* Floating point inexact result. */ -# define FPE_FLTRES FPE_FLTRES - FPE_FLTINV, /* Floating point invalid operation. */ -# define FPE_FLTINV FPE_FLTINV - FPE_FLTSUB /* Subscript out of range. */ -# define FPE_FLTSUB FPE_FLTSUB -}; - -/* `si_code' values for SIGSEGV signal. */ -enum -{ - SEGV_MAPERR = 1, /* Address not mapped to object. */ -# define SEGV_MAPERR SEGV_MAPERR - SEGV_ACCERR /* Invalid permissions for mapped object. */ -# define SEGV_ACCERR SEGV_ACCERR -}; - -/* `si_code' values for SIGBUS signal. */ -enum -{ - BUS_ADRALN = 1, /* Invalid address alignment. */ -# define BUS_ADRALN BUS_ADRALN - BUS_ADRERR, /* Non-existant physical address. */ -# define BUS_ADRERR BUS_ADRERR - BUS_OBJERR /* Object specific hardware error. */ -# define BUS_OBJERR BUS_OBJERR -}; - -/* `si_code' values for SIGTRAP signal. */ -enum -{ - TRAP_BRKPT = 1, /* Process breakpoint. */ -# define TRAP_BRKPT TRAP_BRKPT - TRAP_TRACE /* Process trace trap. */ -# define TRAP_TRACE TRAP_TRACE -}; - -/* `si_code' values for SIGCHLD signal. */ -enum -{ - CLD_EXITED = 1, /* Child has exited. */ -# define CLD_EXITED CLD_EXITED - CLD_KILLED, /* Child was killed. */ -# define CLD_KILLED CLD_KILLED - CLD_DUMPED, /* Child terminated abnormally. */ -# define CLD_DUMPED CLD_DUMPED - CLD_TRAPPED, /* Traced child has trapped. */ -# define CLD_TRAPPED CLD_TRAPPED - CLD_STOPPED, /* Child has stopped. */ -# define CLD_STOPPED CLD_STOPPED - CLD_CONTINUED /* Stopped child has continued. */ -# define CLD_CONTINUED CLD_CONTINUED -}; - -/* `si_code' values for SIGPOLL signal. */ -enum -{ - POLL_IN = 1, /* Data input available. */ -# define POLL_IN POLL_IN - POLL_OUT, /* Output buffers available. */ -# define POLL_OUT POLL_OUT - POLL_MSG, /* Input message available. */ -# define POLL_MSG POLL_MSG - POLL_ERR, /* I/O error. */ -# define POLL_ERR POLL_ERR - POLL_PRI, /* High priority input available. */ -# define POLL_PRI POLL_PRI - POLL_HUP /* Device disconnected. */ -# define POLL_HUP POLL_HUP -}; - -# undef __need_siginfo_t -#endif /* !have siginfo_t && (have _SIGNAL_H || need siginfo_t). */ - - -#if (defined _SIGNAL_H || defined __need_sigevent_t) \ - && !defined __have_sigevent_t -# define __have_sigevent_t 1 - -/* Structure to transport application-defined values with signals. */ -# define __SIGEV_MAX_SIZE 64 -# if __WORDSIZE == 64 -# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4) -# else -# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3) -# endif - -/* Forward declaration of the `pthread_attr_t' type. */ -struct __pthread_attr_s; - -typedef struct sigevent - { - sigval_t sigev_value; - int sigev_signo; - int sigev_notify; - - union - { - int _pad[__SIGEV_PAD_SIZE]; - - struct - { - void (*_function) (sigval_t); /* Function to start. */ - struct __pthread_attr_s *_attribute; /* Really pthread_attr_t. */ - } _sigev_thread; - } _sigev_un; - } sigevent_t; - -/* POSIX names to access some of the members. */ -# define sigev_notify_function _sigev_un._sigev_thread._function -# define sigev_notify_attributes _sigev_un._sigev_thread._attribute - -/* `sigev_notify' values. */ -enum -{ - SIGEV_SIGNAL = 0, /* Notify via signal. */ -# define SIGEV_SIGNAL SIGEV_SIGNAL - SIGEV_NONE, /* Other notification: meaningless. */ -# define SIGEV_NONE SIGEV_NONE - SIGEV_THREAD /* Deliver via thread creation. */ -# define SIGEV_THREAD SIGEV_THREAD -}; - -#endif /* have _SIGNAL_H. */ diff --git a/libc/sysdeps/linux/i386/bits/signum.h b/libc/sysdeps/linux/i386/bits/signum.h deleted file mode 100644 index 74259b492..000000000 --- a/libc/sysdeps/linux/i386/bits/signum.h +++ /dev/null @@ -1,80 +0,0 @@ -/* Signal number definitions. Linux version. - Copyright (C) 1995, 1996, 1997, 1998, 1999 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. */ - -#ifdef _SIGNAL_H - -/* Fake signal functions. */ -#define SIG_ERR ((__sighandler_t) -1) /* Error return. */ -#define SIG_DFL ((__sighandler_t) 0) /* Default action. */ -#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */ - -#ifdef __USE_UNIX98 -# define SIG_HOLD ((__sighandler_t) 2) /* Add signal to hold mask. */ -#endif - - -/* Signals. */ -#define SIGHUP 1 /* Hangup (POSIX). */ -#define SIGINT 2 /* Interrupt (ANSI). */ -#define SIGQUIT 3 /* Quit (POSIX). */ -#define SIGILL 4 /* Illegal instruction (ANSI). */ -#define SIGTRAP 5 /* Trace trap (POSIX). */ -#define SIGABRT 6 /* Abort (ANSI). */ -#define SIGIOT 6 /* IOT trap (4.2 BSD). */ -#define SIGBUS 7 /* BUS error (4.2 BSD). */ -#define SIGFPE 8 /* Floating-point exception (ANSI). */ -#define SIGKILL 9 /* Kill, unblockable (POSIX). */ -#define SIGUSR1 10 /* User-defined signal 1 (POSIX). */ -#define SIGSEGV 11 /* Segmentation violation (ANSI). */ -#define SIGUSR2 12 /* User-defined signal 2 (POSIX). */ -#define SIGPIPE 13 /* Broken pipe (POSIX). */ -#define SIGALRM 14 /* Alarm clock (POSIX). */ -#define SIGTERM 15 /* Termination (ANSI). */ -#define SIGSTKFLT 16 /* Stack fault. */ -#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */ -#define SIGCHLD 17 /* Child status has changed (POSIX). */ -#define SIGCONT 18 /* Continue (POSIX). */ -#define SIGSTOP 19 /* Stop, unblockable (POSIX). */ -#define SIGTSTP 20 /* Keyboard stop (POSIX). */ -#define SIGTTIN 21 /* Background read from tty (POSIX). */ -#define SIGTTOU 22 /* Background write to tty (POSIX). */ -#define SIGURG 23 /* Urgent condition on socket (4.2 BSD). */ -#define SIGXCPU 24 /* CPU limit exceeded (4.2 BSD). */ -#define SIGXFSZ 25 /* File size limit exceeded (4.2 BSD). */ -#define SIGVTALRM 26 /* Virtual alarm clock (4.2 BSD). */ -#define SIGPROF 27 /* Profiling alarm clock (4.2 BSD). */ -#define SIGWINCH 28 /* Window size change (4.3 BSD, Sun). */ -#define SIGPOLL SIGIO /* Pollable event occurred (System V). */ -#define SIGIO 29 /* I/O now possible (4.2 BSD). */ -#define SIGPWR 30 /* Power failure restart (System V). */ -#define SIGSYS 31 /* Bad system call. */ -#define SIGUNUSED 31 - -#define _NSIG 64 /* Biggest signal number + 1 - (including real-time signals). */ - -#define SIGRTMIN (__libc_current_sigrtmin ()) -#define SIGRTMAX (__libc_current_sigrtmax ()) - -/* These are the hard limits of the kernel. These values should not be - used directly at user level. */ -#define __SIGRTMIN 32 -#define __SIGRTMAX (_NSIG - 1) - -#endif /* <signal.h> included. */ diff --git a/libc/sysdeps/linux/i386/bits/sigset.h b/libc/sysdeps/linux/i386/bits/sigset.h deleted file mode 100644 index 7ccadda45..000000000 --- a/libc/sysdeps/linux/i386/bits/sigset.h +++ /dev/null @@ -1,125 +0,0 @@ -/* __sig_atomic_t, __sigset_t, and related definitions. Linux version. - Copyright (C) 1991, 1992, 1994, 1996, 1997 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 _SIGSET_H_types -# define _SIGSET_H_types 1 - -typedef int __sig_atomic_t; - -/* A `sigset_t' has a bit for each signal. */ - -# define _SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int))) -typedef struct - { - unsigned long int __val[_SIGSET_NWORDS]; - } __sigset_t; - -#endif - - -/* We only want to define these functions if <signal.h> was actually - included; otherwise we were included just to define the types. Since we - are namespace-clean, it wouldn't hurt to define extra macros. But - trouble can be caused by functions being defined (e.g., any global - register vars declared later will cause compilation errors). */ - -#if !defined _SIGSET_H_fns && defined _SIGNAL_H -# define _SIGSET_H_fns 1 - -# ifndef _EXTERN_INLINE -# define _EXTERN_INLINE extern __inline -# endif - -/* Return a mask that includes the bit for SIG only. */ -# define __sigmask(sig) \ - (((unsigned long int) 1) << (((sig) - 1) % (8 * sizeof (unsigned long int)))) - -/* Return the word index for SIG. */ -# define __sigword(sig) (((sig) - 1) / (8 * sizeof (unsigned long int))) - -# if defined __GNUC__ && __GNUC__ >= 2 -# define __sigemptyset(set) \ - (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ - sigset_t *__set = (set); \ - while (--__cnt >= 0) __set->__val[__cnt] = 0; \ - 0; })) -# define __sigfillset(set) \ - (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ - sigset_t *__set = (set); \ - while (--__cnt >= 0) __set->__val[__cnt] = ~0UL; \ - 0; })) - -# ifdef __USE_GNU -/* The POSIX does not specify for handling the whole signal set in one - command. This is often wanted and so we define three more functions - here. */ -# define __sigisemptyset(set) \ - (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ - const sigset_t *__set = (set); \ - int __ret = __set->__val[--__cnt]; \ - while (!__ret && --__cnt >= 0) \ - __ret = __set->__val[__cnt]; \ - __ret == 0; })) -# define __sigandset(dest, left, right) \ - (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ - sigset_t *__dest = (dest); \ - const sigset_t *__left = (left); \ - const sigset_t *__right = (right); \ - while (--__cnt >= 0) \ - __dest->__val[__cnt] = (__left->__val[__cnt] \ - & __right->__val[__cnt]); \ - 0; })) -# define __sigorset(dest, left, right) \ - (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ - sigset_t *__dest = (dest); \ - const sigset_t *__left = (left); \ - const sigset_t *__right = (right); \ - while (--__cnt >= 0) \ - __dest->__val[__cnt] = (__left->__val[__cnt] \ - | __right->__val[__cnt]); \ - 0; })) -# endif -# endif - -/* These functions needn't check for a bogus signal number -- error - checking is done in the non __ versions. */ - -extern int __sigismember (__const __sigset_t *, int); -extern int __sigaddset (__sigset_t *, int); -extern int __sigdelset (__sigset_t *, int); - -# ifdef __USE_EXTERN_INLINES -# define __SIGSETFN(NAME, BODY, CONST) \ - _EXTERN_INLINE int \ - NAME (CONST __sigset_t *__set, int __sig) \ - { \ - unsigned long int __mask = __sigmask (__sig); \ - unsigned long int __word = __sigword (__sig); \ - return BODY; \ - } - -__SIGSETFN (__sigismember, (__set->__val[__word] & __mask) ? 1 : 0, __const) -__SIGSETFN (__sigaddset, ((__set->__val[__word] |= __mask), 0), ) -__SIGSETFN (__sigdelset, ((__set->__val[__word] &= ~__mask), 0), ) - -# undef __SIGSETFN -# endif - - -#endif /* ! _SIGSET_H_fns. */ diff --git a/libc/sysdeps/linux/i386/bits/sigstack.h b/libc/sysdeps/linux/i386/bits/sigstack.h deleted file mode 100644 index 7f260367b..000000000 --- a/libc/sysdeps/linux/i386/bits/sigstack.h +++ /dev/null @@ -1,55 +0,0 @@ -/* sigstack, sigaltstack definitions. - Copyright (C) 1998, 1999 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 _SIGNAL_H -# error "Never include this file directly. Use <signal.h> instead" -#endif - - -/* Structure describing a signal stack (obsolete). */ -struct sigstack - { - void *ss_sp; /* Signal stack pointer. */ - int ss_onstack; /* Nonzero if executing on this stack. */ - }; - - -/* Possible values for `ss_flags.'. */ -enum -{ - SS_ONSTACK = 1, -#define SS_ONSTACK SS_ONSTACK - SS_DISABLE -#define SS_DISABLE SS_DISABLE -}; - -/* Minimum stack size for a signal handler. */ -#define MINSIGSTKSZ 2048 - -/* System default stack size. */ -#define SIGSTKSZ 8192 - - -/* Alternate, preferred interface. */ -typedef struct sigaltstack - { - void *ss_sp; - int ss_flags; - size_t ss_size; - } stack_t; diff --git a/libc/sysdeps/linux/i386/bits/sigthread.h b/libc/sysdeps/linux/i386/bits/sigthread.h deleted file mode 100644 index b86e75f20..000000000 --- a/libc/sysdeps/linux/i386/bits/sigthread.h +++ /dev/null @@ -1,38 +0,0 @@ -/* Signal handling function for threaded programs. - Copyright (C) 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _BITS_SIGTHREAD_H -#define _BITS_SIGTHREAD_H 1 - -#if !defined _SIGNAL_H && !defined _PTHREAD_H -# error "Never include this file directly. Use <pthread.h> instead" -#endif - -/* Functions for handling signals. */ - -/* Modify the signal mask for the calling thread. The arguments have - the same meaning as for sigprocmask(2). */ -extern int pthread_sigmask (int __how, - __const __sigset_t *__restrict __newmask, - __sigset_t *__restrict __oldmask)__THROW; - -/* Send signal SIGNO to the given thread. */ -extern int pthread_kill (pthread_t __thread, int __signo) __THROW; - -#endif /* bits/sigthread.h */ diff --git a/libc/sysdeps/linux/i386/bits/sockaddr.h b/libc/sysdeps/linux/i386/bits/sockaddr.h deleted file mode 100644 index 3e1d1312d..000000000 --- a/libc/sysdeps/linux/i386/bits/sockaddr.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Definition of `struct sockaddr_*' common members. Generic/4.2 BSD version. - Copyright (C) 1995,1996,1997,1998,2000,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. */ - -/* - * Never include this file directly; use <sys/socket.h> instead. - */ - -#ifndef _BITS_SOCKADDR_H -#define _BITS_SOCKADDR_H 1 - - -/* POSIX.1g specifies this type name for the `sa_family' member. */ -typedef unsigned short int sa_family_t; - -/* This macro is used to declare the initial common members - of the data types used for socket addresses, `struct sockaddr', - `struct sockaddr_in', `struct sockaddr_un', etc. */ - -#define __SOCKADDR_COMMON(sa_prefix) \ - sa_family_t sa_prefix##family - -#define __SOCKADDR_COMMON_SIZE (sizeof (unsigned short int)) - -#endif /* bits/sockaddr.h */ diff --git a/libc/sysdeps/linux/i386/bits/socket.h b/libc/sysdeps/linux/i386/bits/socket.h deleted file mode 100644 index 6ad4a5ed9..000000000 --- a/libc/sysdeps/linux/i386/bits/socket.h +++ /dev/null @@ -1,314 +0,0 @@ -/* System-specific socket constants and types. Linux version. - Copyright (C) 1991,1992,1994-1999,2000,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. */ - -#ifndef __BITS_SOCKET_H -#define __BITS_SOCKET_H - -#if !defined _SYS_SOCKET_H && !defined _NETINET_IN_H -# error "Never include <bits/socket.h> directly; use <sys/socket.h> instead." -#endif - -#define __need_size_t -#define __need_NULL -#include <stddef.h> - -#include <limits.h> -#include <sys/types.h> - -/* Type for length arguments in socket calls. */ -#ifndef __socklen_t_defined -typedef __socklen_t socklen_t; -# define __socklen_t_defined -#endif - -/* Types of sockets. */ -enum __socket_type -{ - SOCK_STREAM = 1, /* Sequenced, reliable, connection-based - byte streams. */ -#define SOCK_STREAM SOCK_STREAM - SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams - of fixed maximum length. */ -#define SOCK_DGRAM SOCK_DGRAM - SOCK_RAW = 3, /* Raw protocol interface. */ -#define SOCK_RAW SOCK_RAW - SOCK_RDM = 4, /* Reliably-delivered messages. */ -#define SOCK_RDM SOCK_RDM - SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, - datagrams of fixed maximum length. */ -#define SOCK_SEQPACKET SOCK_SEQPACKET - SOCK_PACKET = 10 /* Linux specific way of getting packets - at the dev level. For writing rarp and - other similar things on the user level. */ -#define SOCK_PACKET SOCK_PACKET -}; - -/* Protocol families. */ -#define PF_UNSPEC 0 /* Unspecified. */ -#define PF_LOCAL 1 /* Local to host (pipes and file-domain). */ -#define PF_UNIX PF_LOCAL /* Old BSD name for PF_LOCAL. */ -#define PF_FILE PF_LOCAL /* Another non-standard name for PF_LOCAL. */ -#define PF_INET 2 /* IP protocol family. */ -#define PF_AX25 3 /* Amateur Radio AX.25. */ -#define PF_IPX 4 /* Novell Internet Protocol. */ -#define PF_APPLETALK 5 /* Appletalk DDP. */ -#define PF_NETROM 6 /* Amateur radio NetROM. */ -#define PF_BRIDGE 7 /* Multiprotocol bridge. */ -#define PF_ATMPVC 8 /* ATM PVCs. */ -#define PF_X25 9 /* Reserved for X.25 project. */ -#define PF_INET6 10 /* IP version 6. */ -#define PF_ROSE 11 /* Amateur Radio X.25 PLP. */ -#define PF_DECnet 12 /* Reserved for DECnet project. */ -#define PF_NETBEUI 13 /* Reserved for 802.2LLC project. */ -#define PF_SECURITY 14 /* Security callback pseudo AF. */ -#define PF_KEY 15 /* PF_KEY key management API. */ -#define PF_NETLINK 16 -#define PF_ROUTE PF_NETLINK /* Alias to emulate 4.4BSD. */ -#define PF_PACKET 17 /* Packet family. */ -#define PF_ASH 18 /* Ash. */ -#define PF_ECONET 19 /* Acorn Econet. */ -#define PF_ATMSVC 20 /* ATM SVCs. */ -#define PF_SNA 22 /* Linux SNA Project */ -#define PF_IRDA 23 /* IRDA sockets. */ -#define PF_PPPOX 24 /* PPPoX sockets. */ -#define PF_WANPIPE 25 /* Wanpipe API sockets. */ -#define PF_BLUETOOTH 31 /* Bluetooth sockets. */ -#define PF_MAX 32 /* For now.. */ - -/* Address families. */ -#define AF_UNSPEC PF_UNSPEC -#define AF_LOCAL PF_LOCAL -#define AF_UNIX PF_UNIX -#define AF_FILE PF_FILE -#define AF_INET PF_INET -#define AF_AX25 PF_AX25 -#define AF_IPX PF_IPX -#define AF_APPLETALK PF_APPLETALK -#define AF_NETROM PF_NETROM -#define AF_BRIDGE PF_BRIDGE -#define AF_ATMPVC PF_ATMPVC -#define AF_X25 PF_X25 -#define AF_INET6 PF_INET6 -#define AF_ROSE PF_ROSE -#define AF_DECnet PF_DECnet -#define AF_NETBEUI PF_NETBEUI -#define AF_SECURITY PF_SECURITY -#define AF_KEY PF_KEY -#define AF_NETLINK PF_NETLINK -#define AF_ROUTE PF_ROUTE -#define AF_PACKET PF_PACKET -#define AF_ASH PF_ASH -#define AF_ECONET PF_ECONET -#define AF_ATMSVC PF_ATMSVC -#define AF_SNA PF_SNA -#define AF_IRDA PF_IRDA -#define AF_PPPOX PF_PPPOX -#define AF_WANPIPE PF_WANPIPE -#define AF_BLUETOOTH PF_BLUETOOTH -#define AF_MAX PF_MAX - -/* Socket level values. Others are defined in the appropriate headers. - - XXX These definitions also should go into the appropriate headers as - far as they are available. */ -#define SOL_RAW 255 -#define SOL_DECNET 261 -#define SOL_X25 262 -#define SOL_PACKET 263 -#define SOL_ATM 264 /* ATM layer (cell level). */ -#define SOL_AAL 265 /* ATM Adaption Layer (packet level). */ -#define SOL_IRDA 266 - -/* Maximum queue length specifiable by listen. */ -#define SOMAXCONN 128 - -/* Get the definition of the macro to define the common sockaddr members. */ -#include <bits/sockaddr.h> - -/* Structure describing a generic socket address. */ -struct sockaddr - { - __SOCKADDR_COMMON (sa_); /* Common data: address family and length. */ - char sa_data[14]; /* Address data. */ - }; - - -/* Structure large enough to hold any socket address (with the historical - exception of AF_UNIX). We reserve 128 bytes. */ -#if ULONG_MAX > 0xffffffff -# define __ss_aligntype __uint64_t -#else -# define __ss_aligntype __uint32_t -#endif -#define _SS_SIZE 128 -#define _SS_PADSIZE (_SS_SIZE - (2 * sizeof (__ss_aligntype))) - -struct sockaddr_storage - { - __SOCKADDR_COMMON (ss_); /* Address family, etc. */ - __ss_aligntype __ss_align; /* Force desired alignment. */ - char __ss_padding[_SS_PADSIZE]; - }; - - -/* Bits in the FLAGS argument to `send', `recv', et al. */ -enum - { - MSG_OOB = 0x01, /* Process out-of-band data. */ -#define MSG_OOB MSG_OOB - MSG_PEEK = 0x02, /* Peek at incoming messages. */ -#define MSG_PEEK MSG_PEEK - MSG_DONTROUTE = 0x04, /* Don't use local routing. */ -#define MSG_DONTROUTE MSG_DONTROUTE -#ifdef __USE_GNU - /* DECnet uses a different name. */ - MSG_TRYHARD = MSG_DONTROUTE, -# define MSG_TRYHARD MSG_DONTROUTE -#endif - MSG_CTRUNC = 0x08, /* Control data lost before delivery. */ -#define MSG_CTRUNC MSG_CTRUNC - MSG_PROXY = 0x10, /* Supply or ask second address. */ -#define MSG_PROXY MSG_PROXY - MSG_TRUNC = 0x20, -#define MSG_TRUNC MSG_TRUNC - MSG_DONTWAIT = 0x40, /* Nonblocking IO. */ -#define MSG_DONTWAIT MSG_DONTWAIT - MSG_EOR = 0x80, /* End of record. */ -#define MSG_EOR MSG_EOR - MSG_WAITALL = 0x100, /* Wait for a full request. */ -#define MSG_WAITALL MSG_WAITALL - MSG_FIN = 0x200, -#define MSG_FIN MSG_FIN - MSG_SYN = 0x400, -#define MSG_SYN MSG_SYN - MSG_CONFIRM = 0x800, /* Confirm path validity. */ -#define MSG_CONFIRM MSG_CONFIRM - MSG_RST = 0x1000, -#define MSG_RST MSG_RST - MSG_ERRQUEUE = 0x2000, /* Fetch message from error queue. */ -#define MSG_ERRQUEUE MSG_ERRQUEUE - MSG_NOSIGNAL = 0x4000, /* Do not generate SIGPIPE. */ -#define MSG_NOSIGNAL MSG_NOSIGNAL - MSG_MORE = 0x8000 /* Sender will send more. */ -#define MSG_MORE MSG_MORE - }; - - -/* Structure describing messages sent by - `sendmsg' and received by `recvmsg'. */ -struct msghdr - { - void *msg_name; /* Address to send to/receive from. */ - socklen_t msg_namelen; /* Length of address data. */ - - struct iovec *msg_iov; /* Vector of data to send/receive into. */ - int msg_iovlen; /* Number of elements in the vector. */ - - void *msg_control; /* Ancillary data (eg BSD filedesc passing). */ - socklen_t msg_controllen; /* Ancillary data buffer length. */ - - int msg_flags; /* Flags on received message. */ - }; - -/* Structure used for storage of ancillary data object information. */ -struct cmsghdr - { - size_t cmsg_len; /* Length of data in cmsg_data plus length - of cmsghdr structure. */ - int cmsg_level; /* Originating protocol. */ - int cmsg_type; /* Protocol specific type. */ - __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */ - /* XXX Perhaps this should be removed. */ - }; - -/* Ancillary data object manipulation macros. */ -#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2 -# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data) -#else -# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1)) -#endif -#define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg) -#define CMSG_FIRSTHDR(mhdr) \ - ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \ - ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL) -#define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \ - & (size_t) ~(sizeof (size_t) - 1)) -#define CMSG_SPACE(len) (CMSG_ALIGN (len) \ - + CMSG_ALIGN (sizeof (struct cmsghdr))) -#define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len)) - -extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr, - struct cmsghdr *__cmsg) __THROW; -#ifdef __USE_EXTERN_INLINES -# ifndef _EXTERN_INLINE -# define _EXTERN_INLINE extern __inline -# endif -_EXTERN_INLINE struct cmsghdr * -__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW -{ - if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr)) - /* The kernel header does this so there may be a reason. */ - return 0; - - __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg - + CMSG_ALIGN (__cmsg->cmsg_len)); - if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control - + __mhdr->msg_controllen) - || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len) - > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen))) - /* No more entries. */ - return 0; - return __cmsg; -} -#endif /* Use `extern inline'. */ - -/* Socket level message types. This must match the definitions in - <linux/socket.h>. */ -enum - { - SCM_RIGHTS = 0x01, /* Transfer file descriptors. */ -#define SCM_RIGHTS SCM_RIGHTS -#ifdef __USE_BSD - SCM_CREDENTIALS = 0x02, /* Credentials passing. */ -# define SCM_CREDENTIALS SCM_CREDENTIALS -#endif - __SCM_CONNECT = 0x03 /* Data array is `struct scm_connect'. */ - }; - -/* User visible structure for SCM_CREDENTIALS message */ - -struct ucred -{ - pid_t pid; /* PID of sending process. */ - uid_t uid; /* UID of sending process. */ - gid_t gid; /* GID of sending process. */ -}; - -/* Get socket manipulation related informations from kernel headers. */ -#include <asm/socket.h> - - -/* Structure used to manipulate the SO_LINGER option. */ -struct linger - { - int l_onoff; /* Nonzero to linger on close. */ - int l_linger; /* Time to linger. */ - }; - -#endif /* bits/socket.h */ diff --git a/libc/sysdeps/linux/i386/bits/stab.def b/libc/sysdeps/linux/i386/bits/stab.def deleted file mode 100644 index 48ea231e6..000000000 --- a/libc/sysdeps/linux/i386/bits/stab.def +++ /dev/null @@ -1,234 +0,0 @@ -/* Table of DBX symbol codes for the GNU system. - Copyright (C) 1988, 1997 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* This contains contribution from Cygnus Support. */ - -/* Global variable. Only the name is significant. - To find the address, look in the corresponding external symbol. */ -__define_stab (N_GSYM, 0x20, "GSYM") - -/* Function name for BSD Fortran. Only the name is significant. - To find the address, look in the corresponding external symbol. */ -__define_stab (N_FNAME, 0x22, "FNAME") - -/* Function name or text-segment variable for C. Value is its address. - Desc is supposedly starting line number, but GCC doesn't set it - and DBX seems not to miss it. */ -__define_stab (N_FUN, 0x24, "FUN") - -/* Data-segment variable with internal linkage. Value is its address. - "Static Sym". */ -__define_stab (N_STSYM, 0x26, "STSYM") - -/* BSS-segment variable with internal linkage. Value is its address. */ -__define_stab (N_LCSYM, 0x28, "LCSYM") - -/* Name of main routine. Only the name is significant. - This is not used in C. */ -__define_stab (N_MAIN, 0x2a, "MAIN") - -/* Global symbol in Pascal. - Supposedly the value is its line number; I'm skeptical. */ -__define_stab (N_PC, 0x30, "PC") - -/* Number of symbols: 0, files,,funcs,lines according to Ultrix V4.0. */ -__define_stab (N_NSYMS, 0x32, "NSYMS") - -/* "No DST map for sym: name, ,0,type,ignored" according to Ultrix V4.0. */ -__define_stab (N_NOMAP, 0x34, "NOMAP") - -/* New stab from Solaris. I don't know what it means, but it - don't seem to contain useful information. */ -__define_stab (N_OBJ, 0x38, "OBJ") - -/* New stab from Solaris. I don't know what it means, but it - don't seem to contain useful information. Possibly related to the - optimization flags used in this module. */ -__define_stab (N_OPT, 0x3c, "OPT") - -/* Register variable. Value is number of register. */ -__define_stab (N_RSYM, 0x40, "RSYM") - -/* Modula-2 compilation unit. Can someone say what info it contains? */ -__define_stab (N_M2C, 0x42, "M2C") - -/* Line number in text segment. Desc is the line number; - value is corresponding address. */ -__define_stab (N_SLINE, 0x44, "SLINE") - -/* Similar, for data segment. */ -__define_stab (N_DSLINE, 0x46, "DSLINE") - -/* Similar, for bss segment. */ -__define_stab (N_BSLINE, 0x48, "BSLINE") - -/* Sun's source-code browser stabs. ?? Don't know what the fields are. - Supposedly the field is "path to associated .cb file". THIS VALUE - OVERLAPS WITH N_BSLINE! */ -__define_stab (N_BROWS, 0x48, "BROWS") - -/* GNU Modula-2 definition module dependency. Value is the modification time - of the definition file. Other is non-zero if it is imported with the - GNU M2 keyword %INITIALIZE. Perhaps N_M2C can be used if there - are enough empty fields? */ -__define_stab(N_DEFD, 0x4a, "DEFD") - -/* THE FOLLOWING TWO STAB VALUES CONFLICT. Happily, one is for Modula-2 - and one is for C++. Still,... */ -/* GNU C++ exception variable. Name is variable name. */ -__define_stab (N_EHDECL, 0x50, "EHDECL") -/* Modula2 info "for imc": name,,0,0,0 according to Ultrix V4.0. */ -__define_stab (N_MOD2, 0x50, "MOD2") - -/* GNU C++ `catch' clause. Value is its address. Desc is nonzero if - this entry is immediately followed by a CAUGHT stab saying what exception - was caught. Multiple CAUGHT stabs means that multiple exceptions - can be caught here. If Desc is 0, it means all exceptions are caught - here. */ -__define_stab (N_CATCH, 0x54, "CATCH") - -/* Structure or union element. Value is offset in the structure. */ -__define_stab (N_SSYM, 0x60, "SSYM") - -/* Name of main source file. - Value is starting text address of the compilation. */ -__define_stab (N_SO, 0x64, "SO") - -/* Automatic variable in the stack. Value is offset from frame pointer. - Also used for type descriptions. */ -__define_stab (N_LSYM, 0x80, "LSYM") - -/* Beginning of an include file. Only Sun uses this. - In an object file, only the name is significant. - The Sun linker puts data into some of the other fields. */ -__define_stab (N_BINCL, 0x82, "BINCL") - -/* Name of sub-source file (#include file). - Value is starting text address of the compilation. */ -__define_stab (N_SOL, 0x84, "SOL") - -/* Parameter variable. Value is offset from argument pointer. - (On most machines the argument pointer is the same as the frame pointer. */ -__define_stab (N_PSYM, 0xa0, "PSYM") - -/* End of an include file. No name. - This and N_BINCL act as brackets around the file's output. - In an object file, there is no significant data in this entry. - The Sun linker puts data into some of the fields. */ -__define_stab (N_EINCL, 0xa2, "EINCL") - -/* Alternate entry point. Value is its address. */ -__define_stab (N_ENTRY, 0xa4, "ENTRY") - -/* Beginning of lexical block. - The desc is the nesting level in lexical blocks. - The value is the address of the start of the text for the block. - The variables declared inside the block *precede* the N_LBRAC symbol. */ -__define_stab (N_LBRAC, 0xc0, "LBRAC") - -/* Place holder for deleted include file. Replaces a N_BINCL and everything - up to the corresponding N_EINCL. The Sun linker generates these when - it finds multiple identical copies of the symbols from an include file. - This appears only in output from the Sun linker. */ -__define_stab (N_EXCL, 0xc2, "EXCL") - -/* Modula-2 scope information. Can someone say what info it contains? */ -__define_stab (N_SCOPE, 0xc4, "SCOPE") - -/* End of a lexical block. Desc matches the N_LBRAC's desc. - The value is the address of the end of the text for the block. */ -__define_stab (N_RBRAC, 0xe0, "RBRAC") - -/* Begin named common block. Only the name is significant. */ -__define_stab (N_BCOMM, 0xe2, "BCOMM") - -/* End named common block. Only the name is significant - (and it should match the N_BCOMM). */ -__define_stab (N_ECOMM, 0xe4, "ECOMM") - -/* End common (local name): value is address. - I'm not sure how this is used. */ -__define_stab (N_ECOML, 0xe8, "ECOML") - -/* These STAB's are used on Gould systems for Non-Base register symbols - or something like that. FIXME. I have assigned the values at random - since I don't have a Gould here. Fixups from Gould folk welcome... */ -__define_stab (N_NBTEXT, 0xF0, "NBTEXT") -__define_stab (N_NBDATA, 0xF2, "NBDATA") -__define_stab (N_NBBSS, 0xF4, "NBBSS") -__define_stab (N_NBSTS, 0xF6, "NBSTS") -__define_stab (N_NBLCS, 0xF8, "NBLCS") - -/* Second symbol entry containing a length-value for the preceding entry. - The value is the length. */ -__define_stab (N_LENG, 0xfe, "LENG") - -/* The above information, in matrix format. - - STAB MATRIX - _________________________________________________ - | 00 - 1F are not dbx stab symbols | - | In most cases, the low bit is the EXTernal bit| - - | 00 UNDEF | 02 ABS | 04 TEXT | 06 DATA | - | 01 |EXT | 03 |EXT | 05 |EXT | 07 |EXT | - - | 08 BSS | 0A INDR | 0C FN_SEQ | 0E | - | 09 |EXT | 0B | 0D | 0F | - - | 10 | 12 COMM | 14 SETA | 16 SETT | - | 11 | 13 | 15 | 17 | - - | 18 SETD | 1A SETB | 1C SETV | 1E WARNING| - | 19 | 1B | 1D | 1F FN | - - |_______________________________________________| - | Debug entries with bit 01 set are unused. | - | 20 GSYM | 22 FNAME | 24 FUN | 26 STSYM | - | 28 LCSYM | 2A MAIN | 2C | 2E | - | 30 PC | 32 NSYMS | 34 NOMAP | 36 | - | 38 OBJ | 3A | 3C OPT | 3E | - | 40 RSYM | 42 M2C | 44 SLINE | 46 DSLINE | - | 48 BSLINE*| 4A DEFD | 4C | 4E | - | 50 EHDECL*| 52 | 54 CATCH | 56 | - | 58 | 5A | 5C | 5E | - | 60 SSYM | 62 | 64 SO | 66 | - | 68 | 6A | 6C | 6E | - | 70 | 72 | 74 | 76 | - | 78 | 7A | 7C | 7E | - | 80 LSYM | 82 BINCL | 84 SOL | 86 | - | 88 | 8A | 8C | 8E | - | 90 | 92 | 94 | 96 | - | 98 | 9A | 9C | 9E | - | A0 PSYM | A2 EINCL | A4 ENTRY | A6 | - | A8 | AA | AC | AE | - | B0 | B2 | B4 | B6 | - | B8 | BA | BC | BE | - | C0 LBRAC | C2 EXCL | C4 SCOPE | C6 | - | C8 | CA | CC | CE | - | D0 | D2 | D4 | D6 | - | D8 | DA | DC | DE | - | E0 RBRAC | E2 BCOMM | E4 ECOMM | E6 | - | E8 ECOML | EA | EC | EE | - | F0 | F2 | F4 | F6 | - | F8 | FA | FC | FE LENG | - +-----------------------------------------------+ - * 50 EHDECL is also MOD2. - * 48 BSLINE is also BROWS. - */ diff --git a/libc/sysdeps/linux/i386/bits/stat.h b/libc/sysdeps/linux/i386/bits/stat.h deleted file mode 100644 index f446a91db..000000000 --- a/libc/sysdeps/linux/i386/bits/stat.h +++ /dev/null @@ -1,134 +0,0 @@ -/* Copyright (C) 1992,95,96,97,98,99,2000,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. */ - -#ifndef _SYS_STAT_H -# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead." -#endif - -/* Versions of the `struct stat' data structure. */ -#define _STAT_VER_LINUX_OLD 1 -#define _STAT_VER_KERNEL 1 -#define _STAT_VER_SVR4 2 -#define _STAT_VER_LINUX 3 -#define _STAT_VER _STAT_VER_LINUX /* The one defined below. */ - -/* Versions of the `xmknod' interface. */ -#define _MKNOD_VER_LINUX 1 -#define _MKNOD_VER_SVR4 2 -#define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */ - - -struct stat - { - __dev_t st_dev; /* Device. */ - unsigned short int __pad1; -#ifndef __USE_FILE_OFFSET64 - __ino_t st_ino; /* File serial number. */ -#else - __ino_t __st_ino; /* 32bit file serial number. */ -#endif - __mode_t st_mode; /* File mode. */ - __nlink_t st_nlink; /* Link count. */ - __uid_t st_uid; /* User ID of the file's owner. */ - __gid_t st_gid; /* Group ID of the file's group.*/ - __dev_t st_rdev; /* Device number, if device. */ - unsigned short int __pad2; -#ifndef __USE_FILE_OFFSET64 - __off_t st_size; /* Size of file, in bytes. */ -#else - __off64_t st_size; /* Size of file, in bytes. */ -#endif - __blksize_t st_blksize; /* Optimal block size for I/O. */ - -#ifndef __USE_FILE_OFFSET64 - __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ -#else - __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ -#endif - __time_t st_atime; /* Time of last access. */ - unsigned long int __unused1; - __time_t st_mtime; /* Time of last modification. */ - unsigned long int __unused2; - __time_t st_ctime; /* Time of last status change. */ - unsigned long int __unused3; -#ifndef __USE_FILE_OFFSET64 - unsigned long int __unused4; - unsigned long int __unused5; -#else - __ino64_t st_ino; /* File serial number. */ -#endif - }; - -#ifdef __USE_LARGEFILE64 -struct stat64 - { - __dev_t st_dev; /* Device. */ - unsigned int __pad1; - - __ino_t __st_ino; /* 32bit file serial number. */ - __mode_t st_mode; /* File mode. */ - __nlink_t st_nlink; /* Link count. */ - __uid_t st_uid; /* User ID of the file's owner. */ - __gid_t st_gid; /* Group ID of the file's group.*/ - __dev_t st_rdev; /* Device number, if device. */ - unsigned int __pad2; - __off64_t st_size; /* Size of file, in bytes. */ - __blksize_t st_blksize; /* Optimal block size for I/O. */ - - __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ - __time_t st_atime; /* Time of last access. */ - unsigned long int __unused1; - __time_t st_mtime; /* Time of last modification. */ - unsigned long int __unused2; - __time_t st_ctime; /* Time of last status change. */ - unsigned long int __unused3; - __ino64_t st_ino; /* File serial number. */ - }; -#endif - -/* Tell code we have these members. */ -#define _STATBUF_ST_BLKSIZE -#define _STATBUF_ST_RDEV - -/* Encoding of the file mode. */ - -#define __S_IFMT 0170000 /* These bits determine file type. */ - -/* File types. */ -#define __S_IFDIR 0040000 /* Directory. */ -#define __S_IFCHR 0020000 /* Character device. */ -#define __S_IFBLK 0060000 /* Block device. */ -#define __S_IFREG 0100000 /* Regular file. */ -#define __S_IFIFO 0010000 /* FIFO. */ -#define __S_IFLNK 0120000 /* Symbolic link. */ -#define __S_IFSOCK 0140000 /* Socket. */ - -/* POSIX.1b objects. Note that these macros always evaluate to zero. But - they do it by enforcing the correct use of the macros. */ -#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode) -#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode) -#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode) - -/* Protection bits. */ - -#define __S_ISUID 04000 /* Set user ID on execution. */ -#define __S_ISGID 02000 /* Set group ID on execution. */ -#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ -#define __S_IREAD 0400 /* Read by owner. */ -#define __S_IWRITE 0200 /* Write by owner. */ -#define __S_IEXEC 0100 /* Execute by owner. */ diff --git a/libc/sysdeps/linux/i386/bits/statfs.h b/libc/sysdeps/linux/i386/bits/statfs.h deleted file mode 100644 index 78c9bdbbc..000000000 --- a/libc/sysdeps/linux/i386/bits/statfs.h +++ /dev/null @@ -1,64 +0,0 @@ -/* Copyright (C) 1997, 1998, 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 _SYS_STATFS_H -# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead." -#endif - -#include <bits/types.h> /* for __fsid_t and __fsblkcnt_t*/ - -struct statfs - { - int f_type; - int f_bsize; -#ifndef __USE_FILE_OFFSET64 - __fsblkcnt_t f_blocks; - __fsblkcnt_t f_bfree; - __fsblkcnt_t f_bavail; - __fsfilcnt_t f_files; - __fsfilcnt_t f_ffree; -#else - __fsblkcnt64_t f_blocks; - __fsblkcnt64_t f_bfree; - __fsblkcnt64_t f_bavail; - __fsfilcnt64_t f_files; - __fsfilcnt64_t f_ffree; -#endif - __fsid_t f_fsid; - int f_namelen; - int f_spare[6]; - }; - -#ifdef __USE_LARGEFILE64 -struct statfs64 - { - int f_type; - int f_bsize; - __fsblkcnt64_t f_blocks; - __fsblkcnt64_t f_bfree; - __fsblkcnt64_t f_bavail; - __fsfilcnt64_t f_files; - __fsfilcnt64_t f_ffree; - __fsid_t f_fsid; - int f_namelen; - int f_spare[6]; - }; -#endif - -/* Tell code we have this member. */ -#define _STATFS_F_NAMELEN diff --git a/libc/sysdeps/linux/i386/bits/statvfs.h b/libc/sysdeps/linux/i386/bits/statvfs.h deleted file mode 100644 index 32e03f31e..000000000 --- a/libc/sysdeps/linux/i386/bits/statvfs.h +++ /dev/null @@ -1,99 +0,0 @@ -/* Copyright (C) 1997, 1998, 2000, 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. */ - -#ifndef _SYS_STATVFS_H -# error "Never include <bits/statvfs.h> directly; use <sys/statvfs.h> instead." -#endif - -#include <bits/types.h> /* For __fsblkcnt_t and __fsfilcnt_t. */ - -struct statvfs - { - unsigned long int f_bsize; - unsigned long int f_frsize; -#ifndef __USE_FILE_OFFSET64 - __fsblkcnt_t f_blocks; - __fsblkcnt_t f_bfree; - __fsblkcnt_t f_bavail; - __fsfilcnt_t f_files; - __fsfilcnt_t f_ffree; - __fsfilcnt_t f_favail; -#else - __fsblkcnt64_t f_blocks; - __fsblkcnt64_t f_bfree; - __fsblkcnt64_t f_bavail; - __fsfilcnt64_t f_files; - __fsfilcnt64_t f_ffree; - __fsfilcnt64_t f_favail; -#endif - unsigned long int f_fsid; - int __f_unused; - unsigned long int f_flag; - unsigned long int f_namemax; - int __f_spare[6]; - }; -#define _STATVFSBUF_F_UNUSED - -#ifdef __USE_LARGEFILE64 -struct statvfs64 - { - unsigned long int f_bsize; - unsigned long int f_frsize; - __fsblkcnt64_t f_blocks; - __fsblkcnt64_t f_bfree; - __fsblkcnt64_t f_bavail; - __fsfilcnt64_t f_files; - __fsfilcnt64_t f_ffree; - __fsfilcnt64_t f_favail; - unsigned long int f_fsid; - int __f_unused; - unsigned long int f_flag; - unsigned long int f_namemax; - int __f_spare[6]; - }; -#endif - -/* Definitions for the flag in `f_flag'. These definitions should be - kept in sync which the definitions in <sys/mount.h>. */ -enum -{ - ST_RDONLY = 1, /* Mount read-only. */ -#define ST_RDONLY ST_RDONLY - ST_NOSUID = 2, /* Ignore suid and sgid bits. */ -#define ST_NOSUID ST_NOSUID -#ifdef __USE_GNU - ST_NODEV = 4, /* Disallow access to device special files. */ -# define ST_NODEV ST_NODEV - ST_NOEXEC = 8, /* Disallow program execution. */ -# define ST_NOEXEC ST_NOEXEC - ST_SYNCHRONOUS = 16, /* Writes are synced at once. */ -# define ST_SYNCHRONOUS ST_SYNCHRONOUS - ST_MANDLOCK = 64, /* Allow mandatory locks on an FS. */ -# define ST_MANDLOCK ST_MANDLOCK - ST_WRITE = 128, /* Write on file/directory/symlink. */ -# define ST_WRITE ST_WRITE - ST_APPEND = 256, /* Append-only file. */ -# define ST_APPEND ST_APPEND - ST_IMMUTABLE = 512, /* Immutable file. */ -# define ST_IMMUTABLE ST_IMMUTABLE - ST_NOATIME = 1024, /* Do not update access times. */ -# define ST_NOATIME ST_NOATIME - ST_NODIRATIME /* Do not update directory access times. */ -# define ST_NODIRATIME ST_NODIRATIME -#endif /* Use GNU. */ -}; diff --git a/libc/sysdeps/linux/i386/bits/stdio-lock.h b/libc/sysdeps/linux/i386/bits/stdio-lock.h deleted file mode 100644 index a1893c8bd..000000000 --- a/libc/sysdeps/linux/i386/bits/stdio-lock.h +++ /dev/null @@ -1,50 +0,0 @@ -/* Thread package specific definitions of stream lock type. - Copyright (C) 1996, 1997, 1998, 2000, 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include <pthread.h> - -typedef pthread_mutex_t _IO_lock_t; - -/* We need recursive (counting) mutexes. */ -#define _IO_lock_initializer PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP - - -#define _IO_cleanup_region_start(_fct, _fp) \ - { struct _pthread_cleanup_buffer _buffer; \ - int _avail = (((_fp)->_flags & _IO_USER_LOCK) == 0 \ - && _pthread_cleanup_push_defer != NULL); \ - if (_avail) { \ - _pthread_cleanup_push_defer (&_buffer, (_fct), (_fp)); \ - } -#define _IO_cleanup_region_start_noarg(_fct) \ - { struct _pthread_cleanup_buffer _buffer; \ - int _avail = _pthread_cleanup_push_defer != NULL; \ - if (_avail) { \ - _pthread_cleanup_push_defer (&_buffer, (_fct), NULL); \ - } -#define _IO_cleanup_region_end(_doit) \ - __libc_cleanup_region_end (_doit) -#define _IO_lock_init(_name) \ - __libc_lock_init_recursive (_name) -#define _IO_lock_fini(_name) \ - __libc_lock_fini_recursive (_name) -#define _IO_lock_lock(_name) \ - __libc_lock_lock (_name) -#define _IO_lock_unlock(_name) \ - __libc_lock_unlock (_name) diff --git a/libc/sysdeps/linux/i386/bits/string2.h b/libc/sysdeps/linux/i386/bits/string2.h deleted file mode 100644 index e2e5c0053..000000000 --- a/libc/sysdeps/linux/i386/bits/string2.h +++ /dev/null @@ -1,1244 +0,0 @@ -/* Machine-independant string function optimizations. - Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. - - 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 _STRING_H -# error "Never use <bits/string2.h> directly; include <string.h> instead." -#endif - -#if !defined __NO_STRING_INLINES && !defined __BOUNDED_POINTERS__ - -/* Unlike the definitions in the header <bits/string.h> the - definitions contained here are not optimized down to assembler - level. Those optimizations are not always a good idea since this - means the code size increases a lot. Instead the definitions here - optimize some functions in a way which do not dramatically - increase the code size and which do not use assembler. The main - trick is to use GNU CC's `__builtin_constant_p' function. - - Every function XXX which has a defined version in - <bits/string.h> must be accompanied by a symbol _HAVE_STRING_ARCH_XXX - to make sure we don't get redefinitions. - - We must use here macros instead of inline functions since the - trick won't work with the latter. */ - -#ifndef __STRING_INLINE -# ifdef __cplusplus -# define __STRING_INLINE inline -# else -# define __STRING_INLINE extern __inline -# endif -#endif - -#if _STRING_ARCH_unaligned -/* If we can do unaligned memory accesses we must know the endianess. */ -# include <endian.h> -# include <bits/types.h> - -# if __BYTE_ORDER == __LITTLE_ENDIAN -# define __STRING2_SMALL_GET16(src, idx) \ - (((__const unsigned char *) (__const char *) (src))[idx + 1] << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx]) -# define __STRING2_SMALL_GET32(src, idx) \ - (((((__const unsigned char *) (__const char *) (src))[idx + 3] << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 2]) << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 1]) << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx]) -# else -# define __STRING2_SMALL_GET16(src, idx) \ - (((__const unsigned char *) (__const char *) (src))[idx] << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 1]) -# define __STRING2_SMALL_GET32(src, idx) \ - (((((__const unsigned char *) (__const char *) (src))[idx] << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 1]) << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 2]) << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 3]) -# endif -#else -/* These are a few types we need for the optimizations if we cannot - use unaligned memory accesses. */ -# define __STRING2_COPY_TYPE(N) \ - typedef struct { unsigned char __arr[N]; } \ - __STRING2_COPY_ARR##N __attribute__ ((packed)) -__STRING2_COPY_TYPE (2); -__STRING2_COPY_TYPE (3); -__STRING2_COPY_TYPE (4); -__STRING2_COPY_TYPE (5); -__STRING2_COPY_TYPE (6); -__STRING2_COPY_TYPE (7); -__STRING2_COPY_TYPE (8); -# undef __STRING2_COPY_TYPE -#endif - -/* Dereferencing a pointer arg to run sizeof on it fails for the void - pointer case, so we use this instead. - Note that __x is evaluated twice. */ -#define __string2_1bptr_p(__x) \ - ((size_t)(const void *)((__x) + 1) - (size_t)(const void *)(__x) == 1) - -/* Set N bytes of S to C. */ -#ifndef _HAVE_STRING_ARCH_memset -# if _STRING_ARCH_unaligned -# define memset(s, c, n) \ - (__extension__ (__builtin_constant_p (n) && (n) <= 16 \ - ? ((n) == 1 \ - ? __memset_1 (s, c) \ - : __memset_gc (s, c, n)) \ - : (__builtin_constant_p (c) && (c) == '\0' \ - ? ({ void *__s = (s); __bzero (__s, n); __s; }) \ - : memset (s, c, n)))) - -# define __memset_1(s, c) ({ void *__s = (s); \ - *((__uint8_t *) __s) = (__uint8_t) c; __s; }) - -# define __memset_gc(s, c, n) \ - ({ void *__s = (s); \ - union { \ - unsigned int __ui; \ - unsigned short int __usi; \ - unsigned char __uc; \ - } *__u = __s; \ - __uint8_t __c = (__uint8_t) (c); \ - \ - /* This `switch' statement will be removed at compile-time. */ \ - switch ((unsigned int) (n)) \ - { \ - case 15: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 11: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 7: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 3: \ - __u->__usi = (unsigned short int) __c * 0x0101; \ - __u = __extension__ (void *)((char *) __u + 2); \ - __u->__uc = (unsigned char) __c; \ - break; \ - \ - case 14: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 10: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 6: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 2: \ - __u->__usi = (unsigned short int) __c * 0x0101; \ - break; \ - \ - case 13: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 9: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 5: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 1: \ - __u->__uc = (unsigned char) __c; \ - break; \ - \ - case 16: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 12: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 8: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 4: \ - __u->__ui = __c * 0x01010101; \ - case 0: \ - break; \ - } \ - \ - __s; }) -# else -# define memset(s, c, n) \ - (__extension__ (__builtin_constant_p (c) && (c) == '\0' \ - ? ({ void *__s = (s); __bzero (__s, n); __s; }) \ - : memset (s, c, n))) -# endif - -/* GCC optimizes memset(s, 0, n) but not bzero(s, n). - The optimization is broken before EGCS 1.1. */ -# if __GNUC_PREREQ (2, 91) -# define __bzero(s, n) __builtin_memset (s, '\0', n) -# endif - -#endif - - -/* Copy N bytes from SRC to DEST, returning pointer to byte following the - last copied. */ -#ifdef __USE_GNU -# ifndef _HAVE_STRING_ARCH_mempcpy -# define __mempcpy(dest, src, n) \ - (__extension__ (__builtin_constant_p (src) && __builtin_constant_p (n) \ - && __string2_1bptr_p (src) && n <= 8 \ - ? __mempcpy_small (dest, __mempcpy_args (src), n) \ - : __mempcpy (dest, src, n))) -/* In glibc we use this function frequently but for namespace reasons - we have to use the name `__mempcpy'. */ -# define mempcpy(dest, src, n) __mempcpy (dest, src, n) - -# if _STRING_ARCH_unaligned -# define __mempcpy_args(src) \ - ((__const char *) (src))[0], ((__const char *) (src))[2], \ - ((__const char *) (src))[4], ((__const char *) (src))[6], \ - __extension__ __STRING2_SMALL_GET16 (src, 0), \ - __extension__ __STRING2_SMALL_GET16 (src, 4), \ - __extension__ __STRING2_SMALL_GET32 (src, 0), \ - __extension__ __STRING2_SMALL_GET32 (src, 4) -__STRING_INLINE void *__mempcpy_small (void *, char, char, char, char, - __uint16_t, __uint16_t, __uint32_t, - __uint32_t, size_t); -__STRING_INLINE void * -__mempcpy_small (void *__dest1, - char __src0_1, char __src2_1, char __src4_1, char __src6_1, - __uint16_t __src0_2, __uint16_t __src4_2, - __uint32_t __src0_4, __uint32_t __src4_4, - size_t __srclen) -{ - union { - __uint32_t __ui; - __uint16_t __usi; - unsigned char __uc; - unsigned char __c; - } *__u = __dest1; - switch ((unsigned int) __srclen) - { - case 1: - __u->__c = __src0_1; - __u = __extension__ (void *)((char *) __u + 1); - break; - case 2: - __u->__usi = __src0_2; - __u = __extension__ (void *)((char *) __u + 2); - break; - case 3: - __u->__usi = __src0_2; - __u = __extension__ (void *)((char *) __u + 2); - __u->__c = __src2_1; - __u = __extension__ (void *)((char *) __u + 1); - break; - case 4: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - break; - case 5: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__c = __src4_1; - __u = __extension__ (void *)((char *) __u + 1); - break; - case 6: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__usi = __src4_2; - __u = __extension__ (void *)((char *) __u + 2); - break; - case 7: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__usi = __src4_2; - __u = __extension__ (void *)((char *) __u + 2); - __u->__c = __src6_1; - __u = __extension__ (void *)((char *) __u + 1); - break; - case 8: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__ui = __src4_4; - __u = __extension__ (void *)((char *) __u + 4); - break; - } - return (void *) __u; -} -# else -# define __mempcpy_args(src) \ - ((__const char *) (src))[0], \ - __extension__ ((__STRING2_COPY_ARR2) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1] } }), \ - __extension__ ((__STRING2_COPY_ARR3) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2] } }), \ - __extension__ ((__STRING2_COPY_ARR4) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3] } }), \ - __extension__ ((__STRING2_COPY_ARR5) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4] } }), \ - __extension__ ((__STRING2_COPY_ARR6) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5] } }), \ - __extension__ ((__STRING2_COPY_ARR7) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - ((__const char *) (src))[6] } }), \ - __extension__ ((__STRING2_COPY_ARR8) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - ((__const char *) (src))[6], ((__const char *) (src))[7] } }) -__STRING_INLINE void *__mempcpy_small (void *, char, __STRING2_COPY_ARR2, - __STRING2_COPY_ARR3, - __STRING2_COPY_ARR4, - __STRING2_COPY_ARR5, - __STRING2_COPY_ARR6, - __STRING2_COPY_ARR7, - __STRING2_COPY_ARR8, size_t); -__STRING_INLINE void * -__mempcpy_small (void *__dest, char __src1, - __STRING2_COPY_ARR2 __src2, __STRING2_COPY_ARR3 __src3, - __STRING2_COPY_ARR4 __src4, __STRING2_COPY_ARR5 __src5, - __STRING2_COPY_ARR6 __src6, __STRING2_COPY_ARR7 __src7, - __STRING2_COPY_ARR8 __src8, size_t __srclen) -{ - union { - char __c; - __STRING2_COPY_ARR2 __sca2; - __STRING2_COPY_ARR3 __sca3; - __STRING2_COPY_ARR4 __sca4; - __STRING2_COPY_ARR5 __sca5; - __STRING2_COPY_ARR6 __sca6; - __STRING2_COPY_ARR7 __sca7; - __STRING2_COPY_ARR8 __sca8; - } *__u = __dest; - switch ((unsigned int) __srclen) - { - case 1: - __u->__c = __src1; - break; - case 2: - __extension__ __u->__sca2 = __src2; - break; - case 3: - __extension__ __u->__sca3 = __src3; - break; - case 4: - __extension__ __u->__sca4 = __src4; - break; - case 5: - __extension__ __u->__sca5 = __src5; - break; - case 6: - __extension__ __u->__sca6 = __src6; - break; - case 7: - __extension__ __u->__sca7 = __src7; - break; - case 8: - __extension__ __u->__sca8 = __src8; - break; - } - return __extension__ (void *)((char *) __u + __srclen); -} -# endif -# endif -#endif - - -/* Return pointer to C in S. */ -#ifndef _HAVE_STRING_ARCH_strchr -extern void *__rawmemchr (const void *__s, int __c); -# define strchr(s, c) \ - (__extension__ (__builtin_constant_p (c) && (c) == '\0' \ - ? (char *) __rawmemchr (s, c) \ - : strchr (s, c))) -#endif - - -/* Copy SRC to DEST. */ -#ifndef _HAVE_STRING_ARCH_strcpy -# define strcpy(dest, src) \ - (__extension__ (__builtin_constant_p (src) \ - ? (__string2_1bptr_p (src) && strlen (src) + 1 <= 8 \ - ? __strcpy_small (dest, __strcpy_args (src), \ - strlen (src) + 1) \ - : (char *) memcpy (dest, src, strlen (src) + 1)) \ - : strcpy (dest, src))) - -# if _STRING_ARCH_unaligned -# define __strcpy_args(src) \ - __extension__ __STRING2_SMALL_GET16 (src, 0), \ - __extension__ __STRING2_SMALL_GET16 (src, 4), \ - __extension__ __STRING2_SMALL_GET32 (src, 0), \ - __extension__ __STRING2_SMALL_GET32 (src, 4) -__STRING_INLINE char *__strcpy_small (char *, __uint16_t, __uint16_t, - __uint32_t, __uint32_t, size_t); -__STRING_INLINE char * -__strcpy_small (char *__dest, - __uint16_t __src0_2, __uint16_t __src4_2, - __uint32_t __src0_4, __uint32_t __src4_4, - size_t __srclen) -{ - union { - __uint32_t __ui; - __uint16_t __usi; - unsigned char __uc; - } *__u = (void *) __dest; - switch ((unsigned int) __srclen) - { - case 1: - __u->__uc = '\0'; - break; - case 2: - __u->__usi = __src0_2; - break; - case 3: - __u->__usi = __src0_2; - __u = __extension__ (void *)((char *) __u + 2); - __u->__uc = '\0'; - break; - case 4: - __u->__ui = __src0_4; - break; - case 5: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__uc = '\0'; - break; - case 6: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__usi = __src4_2; - break; - case 7: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__usi = __src4_2; - __u = __extension__ (void *)((char *) __u + 2); - __u->__uc = '\0'; - break; - case 8: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__ui = __src4_4; - break; - } - return __dest; -} -# else -# define __strcpy_args(src) \ - __extension__ ((__STRING2_COPY_ARR2) \ - { { ((__const char *) (src))[0], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR3) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR4) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR5) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR6) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR7) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR8) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - ((__const char *) (src))[6], '\0' } }) -__STRING_INLINE char *__strcpy_small (char *, __STRING2_COPY_ARR2, - __STRING2_COPY_ARR3, - __STRING2_COPY_ARR4, - __STRING2_COPY_ARR5, - __STRING2_COPY_ARR6, - __STRING2_COPY_ARR7, - __STRING2_COPY_ARR8, size_t); -__STRING_INLINE char * -__strcpy_small (char *__dest, - __STRING2_COPY_ARR2 __src2, __STRING2_COPY_ARR3 __src3, - __STRING2_COPY_ARR4 __src4, __STRING2_COPY_ARR5 __src5, - __STRING2_COPY_ARR6 __src6, __STRING2_COPY_ARR7 __src7, - __STRING2_COPY_ARR8 __src8, size_t __srclen) -{ - union { - char __c; - __STRING2_COPY_ARR2 __sca2; - __STRING2_COPY_ARR3 __sca3; - __STRING2_COPY_ARR4 __sca4; - __STRING2_COPY_ARR5 __sca5; - __STRING2_COPY_ARR6 __sca6; - __STRING2_COPY_ARR7 __sca7; - __STRING2_COPY_ARR8 __sca8; - } *__u = (void *) __dest; - switch ((unsigned int) __srclen) - { - case 1: - __u->__c = '\0'; - break; - case 2: - __extension__ __u->__sca2 = __src2; - break; - case 3: - __extension__ __u->__sca3 = __src3; - break; - case 4: - __extension__ __u->__sca4 = __src4; - break; - case 5: - __extension__ __u->__sca5 = __src5; - break; - case 6: - __extension__ __u->__sca6 = __src6; - break; - case 7: - __extension__ __u->__sca7 = __src7; - break; - case 8: - __extension__ __u->__sca8 = __src8; - break; - } - return __dest; -} -# endif -#endif - - -/* Copy SRC to DEST, returning pointer to final NUL byte. */ -#ifdef __USE_GNU -# ifndef _HAVE_STRING_ARCH_stpcpy -# define __stpcpy(dest, src) \ - (__extension__ (__builtin_constant_p (src) \ - ? (__string2_1bptr_p (src) && strlen (src) + 1 <= 8 \ - ? __stpcpy_small (dest, __stpcpy_args (src), \ - strlen (src) + 1) \ - : ((char *) __mempcpy (dest, src, strlen (src) + 1) - 1))\ - : __stpcpy (dest, src))) -/* In glibc we use this function frequently but for namespace reasons - we have to use the name `__stpcpy'. */ -# define stpcpy(dest, src) __stpcpy (dest, src) - -# if _STRING_ARCH_unaligned -# define __stpcpy_args(src) \ - __extension__ __STRING2_SMALL_GET16 (src, 0), \ - __extension__ __STRING2_SMALL_GET16 (src, 4), \ - __extension__ __STRING2_SMALL_GET32 (src, 0), \ - __extension__ __STRING2_SMALL_GET32 (src, 4) -__STRING_INLINE char *__stpcpy_small (char *, __uint16_t, __uint16_t, - __uint32_t, __uint32_t, size_t); -__STRING_INLINE char * -__stpcpy_small (char *__dest, - __uint16_t __src0_2, __uint16_t __src4_2, - __uint32_t __src0_4, __uint32_t __src4_4, - size_t __srclen) -{ - union { - unsigned int __ui; - unsigned short int __usi; - unsigned char __uc; - char __c; - } *__u = (void *) __dest; - switch ((unsigned int) __srclen) - { - case 1: - __u->__uc = '\0'; - break; - case 2: - __u->__usi = __src0_2; - __u = __extension__ (void *)((char *) __u + 1); - break; - case 3: - __u->__usi = __src0_2; - __u = __extension__ (void *)((char *) __u + 2); - __u->__uc = '\0'; - break; - case 4: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 3); - break; - case 5: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__uc = '\0'; - break; - case 6: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__usi = __src4_2; - __u = __extension__ (void *)((char *) __u + 1); - break; - case 7: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__usi = __src4_2; - __u = __extension__ (void *)((char *) __u + 2); - __u->__uc = '\0'; - break; - case 8: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__ui = __src4_4; - __u = __extension__ (void *)((char *) __u + 3); - break; - } - return &__u->__c; -} -# else -# define __stpcpy_args(src) \ - __extension__ ((__STRING2_COPY_ARR2) \ - { { ((__const char *) (src))[0], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR3) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR4) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR5) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR6) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR7) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR8) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - ((__const char *) (src))[6], '\0' } }) -__STRING_INLINE char *__stpcpy_small (char *, __STRING2_COPY_ARR2, - __STRING2_COPY_ARR3, - __STRING2_COPY_ARR4, - __STRING2_COPY_ARR5, - __STRING2_COPY_ARR6, - __STRING2_COPY_ARR7, - __STRING2_COPY_ARR8, size_t); -__STRING_INLINE char * -__stpcpy_small (char *__dest, - __STRING2_COPY_ARR2 __src2, __STRING2_COPY_ARR3 __src3, - __STRING2_COPY_ARR4 __src4, __STRING2_COPY_ARR5 __src5, - __STRING2_COPY_ARR6 __src6, __STRING2_COPY_ARR7 __src7, - __STRING2_COPY_ARR8 __src8, size_t __srclen) -{ - union { - char __c; - __STRING2_COPY_ARR2 __sca2; - __STRING2_COPY_ARR3 __sca3; - __STRING2_COPY_ARR4 __sca4; - __STRING2_COPY_ARR5 __sca5; - __STRING2_COPY_ARR6 __sca6; - __STRING2_COPY_ARR7 __sca7; - __STRING2_COPY_ARR8 __sca8; - } *__u = (void *) __dest; - switch ((unsigned int) __srclen) - { - case 1: - __u->__c = '\0'; - break; - case 2: - __extension__ __u->__sca2 = __src2; - break; - case 3: - __extension__ __u->__sca3 = __src3; - break; - case 4: - __extension__ __u->__sca4 = __src4; - break; - case 5: - __extension__ __u->__sca5 = __src5; - break; - case 6: - __extension__ __u->__sca6 = __src6; - break; - case 7: - __extension__ __u->__sca7 = __src7; - break; - case 8: - __extension__ __u->__sca8 = __src8; - break; - } - return __dest + __srclen - 1; -} -# endif -# endif -#endif - - -/* Copy no more than N characters of SRC to DEST. */ -#ifndef _HAVE_STRING_ARCH_strncpy -# if defined _USE_STRING_ARCH_memset && defined _USE_STRING_ARCH_mempcpy -# define strncpy(dest, src, n) \ - (__extension__ ({ char *__dest = (dest); \ - __builtin_constant_p (src) && __builtin_constant_p (n) \ - ? (strlen (src) + 1 >= ((size_t) (n)) \ - ? (char *) memcpy (__dest, src, n) \ - : (memset (__mempcpy (__dest, src, strlen (src)), \ - '\0', n - strlen (src)), \ - __dest)) \ - : strncpy (__dest, src, n); })) -# else -# define strncpy(dest, src, n) \ - (__extension__ (__builtin_constant_p (src) && __builtin_constant_p (n) \ - ? (strlen (src) + 1 >= ((size_t) (n)) \ - ? (char *) memcpy (dest, src, n) \ - : strncpy (dest, src, n)) \ - : strncpy (dest, src, n))) -# endif -#endif - - -/* Append no more than N characters from SRC onto DEST. */ -#ifndef _HAVE_STRING_ARCH_strncat -# ifdef _USE_STRING_ARCH_strchr -# define strncat(dest, src, n) \ - (__extension__ ({ char *__dest = (dest); \ - __builtin_constant_p (src) && __builtin_constant_p (n) \ - ? (strlen (src) < ((size_t) (n)) \ - ? strcat (__dest, src) \ - : (*((char *) __mempcpy (strchr (__dest, '\0'), \ - src, n)) = '\0', __dest)) \ - : strncat (dest, src, n); })) -# else -# define strncat(dest, src, n) \ - (__extension__ (__builtin_constant_p (src) && __builtin_constant_p (n) \ - ? (strlen (src) < ((size_t) (n)) \ - ? strcat (dest, src) \ - : strncat (dest, src, n)) \ - : strncat (dest, src, n))) -# endif -#endif - - -/* Compare characters of S1 and S2. */ -#ifndef _HAVE_STRING_ARCH_strcmp -# define strcmp(s1, s2) \ - __extension__ \ - ({ size_t __s1_len, __s2_len; \ - (__builtin_constant_p (s1) && __builtin_constant_p (s2) \ - && (__s1_len = strlen (s1), __s2_len = strlen (s2), \ - (!__string2_1bptr_p (s1) || __s1_len >= 4) \ - && (!__string2_1bptr_p (s2) || __s2_len >= 4)) \ - ? memcmp ((__const char *) (s1), (__const char *) (s2), \ - (__s1_len < __s2_len ? __s1_len : __s2_len) + 1) \ - : (__builtin_constant_p (s1) && __string2_1bptr_p (s1) \ - && (__s1_len = strlen (s1), __s1_len < 4) \ - ? (__builtin_constant_p (s2) && __string2_1bptr_p (s2) \ - ? __strcmp_cc (s1, s2, __s1_len) \ - : __strcmp_cg (s1, s2, __s1_len)) \ - : (__builtin_constant_p (s2) && __string2_1bptr_p (s2) \ - && (__s2_len = strlen (s2), __s2_len < 4) \ - ? (__builtin_constant_p (s1) && __string2_1bptr_p (s1) \ - ? __strcmp_cc (s1, s2, __s2_len) \ - : __strcmp_gc (s1, s2, __s2_len)) \ - : strcmp (s1, s2)))); }) - -# define __strcmp_cc(s1, s2, l) \ - (__extension__ ({ register int __result = \ - (((__const unsigned char *) (__const char *) (s1))[0] \ - - ((__const unsigned char *) (__const char *)(s2))[0]);\ - if (l > 0 && __result == 0) \ - { \ - __result = (((__const unsigned char *) \ - (__const char *) (s1))[1] \ - - ((__const unsigned char *) \ - (__const char *) (s2))[1]); \ - if (l > 1 && __result == 0) \ - { \ - __result = \ - (((__const unsigned char *) \ - (__const char *) (s1))[2] \ - - ((__const unsigned char *) \ - (__const char *) (s2))[2]); \ - if (l > 2 && __result == 0) \ - __result = \ - (((__const unsigned char *) \ - (__const char *) (s1))[3] \ - - ((__const unsigned char *) \ - (__const char *) (s2))[3]); \ - } \ - } \ - __result; })) - -# define __strcmp_cg(s1, s2, l1) \ - (__extension__ ({ __const unsigned char *__s2 = \ - (__const unsigned char *) (__const char *) (s2); \ - register int __result = \ - (((__const unsigned char *) (__const char *) (s1))[0] \ - - __s2[0]); \ - if (l1 > 0 && __result == 0) \ - { \ - __result = (((__const unsigned char *) \ - (__const char *) (s1))[1] - __s2[1]); \ - if (l1 > 1 && __result == 0) \ - { \ - __result = (((__const unsigned char *) \ - (__const char *) (s1))[2] - __s2[2]);\ - if (l1 > 2 && __result == 0) \ - __result = (((__const unsigned char *) \ - (__const char *) (s1))[3] \ - - __s2[3]); \ - } \ - } \ - __result; })) - -# define __strcmp_gc(s1, s2, l2) \ - (__extension__ ({ __const unsigned char *__s1 = \ - (__const unsigned char *) (__const char *) (s1); \ - register int __result = \ - __s1[0] - ((__const unsigned char *) \ - (__const char *) (s2))[0]; \ - if (l2 > 0 && __result == 0) \ - { \ - __result = (__s1[1] \ - - ((__const unsigned char *) \ - (__const char *) (s2))[1]); \ - if (l2 > 1 && __result == 0) \ - { \ - __result = \ - (__s1[2] - ((__const unsigned char *) \ - (__const char *) (s2))[2]); \ - if (l2 > 2 && __result == 0) \ - __result = \ - (__s1[3] \ - - ((__const unsigned char *) \ - (__const char *) (s2))[3]); \ - } \ - } \ - __result; })) -#endif - - -/* Compare N characters of S1 and S2. */ -#ifndef _HAVE_STRING_ARCH_strncmp -# define strncmp(s1, s2, n) \ - (__extension__ (__builtin_constant_p (n) \ - && ((__builtin_constant_p (s1) \ - && strlen (s1) < ((size_t) (n))) \ - || (__builtin_constant_p (s2) \ - && strlen (s2) < ((size_t) (n)))) \ - ? strcmp (s1, s2) : strncmp (s1, s2, n))) -#endif - - -/* Return the length of the initial segment of S which - consists entirely of characters not in REJECT. */ -#ifndef _HAVE_STRING_ARCH_strcspn -# define strcspn(s, reject) \ - __extension__ \ - ({ char __r0, __r1, __r2; \ - (__builtin_constant_p (reject) && __string2_1bptr_p (reject) \ - ? ((__r0 = ((__const char *) (reject))[0], __r0 == '\0') \ - ? strlen (s) \ - : ((__r1 = ((__const char *) (reject))[1], __r1 == '\0') \ - ? __strcspn_c1 (s, __r0) \ - : ((__r2 = ((__const char *) (reject))[2], __r2 == '\0') \ - ? __strcspn_c2 (s, __r0, __r1) \ - : (((__const char *) (reject))[3] == '\0' \ - ? __strcspn_c3 (s, __r0, __r1, __r2) \ - : strcspn (s, reject))))) \ - : strcspn (s, reject)); }) - -__STRING_INLINE size_t __strcspn_c1 (__const char *__s, char __reject); -__STRING_INLINE size_t -__strcspn_c1 (__const char *__s, char __reject) -{ - register size_t __result = 0; - while (__s[__result] != '\0' && __s[__result] != __reject) - ++__result; - return __result; -} - -__STRING_INLINE size_t __strcspn_c2 (__const char *__s, char __reject1, - char __reject2); -__STRING_INLINE size_t -__strcspn_c2 (__const char *__s, char __reject1, char __reject2) -{ - register size_t __result = 0; - while (__s[__result] != '\0' && __s[__result] != __reject1 - && __s[__result] != __reject2) - ++__result; - return __result; -} - -__STRING_INLINE size_t __strcspn_c3 (__const char *__s, char __reject1, - char __reject2, char __reject3); -__STRING_INLINE size_t -__strcspn_c3 (__const char *__s, char __reject1, char __reject2, - char __reject3) -{ - register size_t __result = 0; - while (__s[__result] != '\0' && __s[__result] != __reject1 - && __s[__result] != __reject2 && __s[__result] != __reject3) - ++__result; - return __result; -} -#endif - - -/* Return the length of the initial segment of S which - consists entirely of characters in ACCEPT. */ -#ifndef _HAVE_STRING_ARCH_strspn -# define strspn(s, accept) \ - __extension__ \ - ({ char __a0, __a1, __a2; \ - (__builtin_constant_p (accept) && __string2_1bptr_p (accept) \ - ? ((__a0 = ((__const char *) (accept))[0], __a0 == '\0') \ - ? ((void) (s), 0) \ - : ((__a1 = ((__const char *) (accept))[1], __a1 == '\0') \ - ? __strspn_c1 (s, __a0) \ - : ((__a2 = ((__const char *) (accept))[2], __a2 == '\0') \ - ? __strspn_c2 (s, __a0, __a1) \ - : (((__const char *) (accept))[3] == '\0' \ - ? __strspn_c3 (s, __a0, __a1, __a2) \ - : strspn (s, accept))))) \ - : strspn (s, accept)); }) - -__STRING_INLINE size_t __strspn_c1 (__const char *__s, char __accept); -__STRING_INLINE size_t -__strspn_c1 (__const char *__s, char __accept) -{ - register size_t __result = 0; - /* Please note that __accept never can be '\0'. */ - while (__s[__result] == __accept) - ++__result; - return __result; -} - -__STRING_INLINE size_t __strspn_c2 (__const char *__s, char __accept1, - char __accept2); -__STRING_INLINE size_t -__strspn_c2 (__const char *__s, char __accept1, char __accept2) -{ - register size_t __result = 0; - /* Please note that __accept1 and __accept2 never can be '\0'. */ - while (__s[__result] == __accept1 || __s[__result] == __accept2) - ++__result; - return __result; -} - -__STRING_INLINE size_t __strspn_c3 (__const char *__s, char __accept1, - char __accept2, char __accept3); -__STRING_INLINE size_t -__strspn_c3 (__const char *__s, char __accept1, char __accept2, char __accept3) -{ - register size_t __result = 0; - /* Please note that __accept1 to __accept3 never can be '\0'. */ - while (__s[__result] == __accept1 || __s[__result] == __accept2 - || __s[__result] == __accept3) - ++__result; - return __result; -} -#endif - - -/* Find the first occurrence in S of any character in ACCEPT. */ -#ifndef _HAVE_STRING_ARCH_strpbrk -# define strpbrk(s, accept) \ - __extension__ \ - ({ char __a0, __a1, __a2; \ - (__builtin_constant_p (accept) && __string2_1bptr_p (accept) \ - ? ((__a0 = ((__const char *) (accept))[0], __a0 == '\0') \ - ? ((void) (s), NULL) \ - : ((__a1 = ((__const char *) (accept))[1], __a1 == '\0') \ - ? strchr (s, __a0) \ - : ((__a2 = ((__const char *) (accept))[2], __a2 == '\0') \ - ? __strpbrk_c2 (s, __a0, __a1) \ - : (((__const char *) (accept))[3] == '\0' \ - ? __strpbrk_c3 (s, __a0, __a1, __a2) \ - : strpbrk (s, accept))))) \ - : strpbrk (s, accept)); }) - -__STRING_INLINE char *__strpbrk_c2 (__const char *__s, int __accept1, - int __accept2); -__STRING_INLINE char * -__strpbrk_c2 (__const char *__s, int __accept1, int __accept2) -{ - /* Please note that __accept1 and __accept2 never can be '\0'. */ - while (*__s != '\0' && *__s != __accept1 && *__s != __accept2) - ++__s; - return *__s == '\0' ? NULL : (char *) (size_t) __s; -} - -__STRING_INLINE char *__strpbrk_c3 (__const char *__s, int __accept1, - int __accept2, int __accept3); -__STRING_INLINE char * -__strpbrk_c3 (__const char *__s, int __accept1, int __accept2, - int __accept3) -{ - /* Please note that __accept1 to __accept3 never can be '\0'. */ - while (*__s != '\0' && *__s != __accept1 && *__s != __accept2 - && *__s != __accept3) - ++__s; - return *__s == '\0' ? NULL : (char *) (size_t) __s; -} -#endif - - -/* Find the first occurrence of NEEDLE in HAYSTACK. Newer gcc versions - do this itself. */ -#if !defined _HAVE_STRING_ARCH_strstr && !__GNUC_PREREQ (2, 97) -# define strstr(haystack, needle) \ - (__extension__ (__builtin_constant_p (needle) && __string2_1bptr_p (needle) \ - ? (((__const char *) (needle))[0] == '\0' \ - ? (char *) (size_t) (haystack) \ - : (((__const char *) (needle))[1] == '\0' \ - ? strchr (haystack, \ - ((__const char *) (needle))[0]) \ - : strstr (haystack, needle))) \ - : strstr (haystack, needle))) -#endif - - -#if defined __USE_GNU && !defined _FORCE_INLINES -# ifndef _HAVE_STRING_ARCH_strnlen -__STRING_INLINE size_t -strnlen (__const char *__string, size_t __maxlen) -{ - __const char *__end = (__const char *) memchr (__string, '\0', __maxlen); - return __end ? (size_t) (__end - __string) : __maxlen; -} -# endif -#endif - - -#ifndef _HAVE_STRING_ARCH_strtok_r -# define __strtok_r(s, sep, nextp) \ - (__extension__ (__builtin_constant_p (sep) && __string2_1bptr_p (sep) \ - ? (((__const char *) (sep))[0] != '\0' \ - && ((__const char *) (sep))[1] == '\0' \ - ? __strtok_r_1c (s, ((__const char *) (sep))[0], nextp) \ - : __strtok_r (s, sep, nextp)) \ - : __strtok_r (s, sep, nextp))) - -__STRING_INLINE char *__strtok_r_1c (char *__s, char __sep, char **__nextp); -__STRING_INLINE char * -__strtok_r_1c (char *__s, char __sep, char **__nextp) -{ - char *__result; - if (__s == NULL) - __s = *__nextp; - while (*__s == __sep) - ++__s; - if (*__s == '\0') - __result = NULL; - else - { - __result = __s; - while (*__s != '\0' && *__s != __sep) - ++__s; - if (*__s == '\0') - *__nextp = __s; - else - { - *__s = '\0'; - *__nextp = __s + 1; - } - } - return __result; -} -# if defined __USE_POSIX || defined __USE_MISC -# define strtok_r(s, sep, nextp) __strtok_r ((s), (sep), (nextp)) -# endif -#endif - - -#ifndef _HAVE_STRING_ARCH_strsep - -# define __strsep(s, reject) \ - __extension__ \ - ({ char __r0, __r1, __r2; \ - (__builtin_constant_p (reject) && __string2_1bptr_p (reject) \ - && (__r0 = ((__const char *) (reject))[0], \ - ((__const char *) (reject))[0] != '\0') \ - ? ((__r1 = ((__const char *) (reject))[1], \ - ((__const char *) (reject))[1] == '\0') \ - ? __strsep_1c (s, __r0) \ - : ((__r2 = ((__const char *) (reject))[2], __r2 == '\0') \ - ? __strsep_2c (s, __r0, __r1) \ - : (((__const char *) (reject))[3] == '\0' \ - ? __strsep_3c (s, __r0, __r1, __r2) \ - : __strsep_g (s, reject)))) \ - : __strsep_g (s, reject)); }) - -__STRING_INLINE char *__strsep_1c (char **__s, char __reject); -__STRING_INLINE char * -__strsep_1c (char **__s, char __reject) -{ - register char *__retval = *__s; - if (__retval == NULL) - return *__s = NULL; - if (*__retval == __reject) - *(*__s)++ = '\0'; - else - if ((*__s = strchr (__retval, __reject)) != NULL) - *(*__s)++ = '\0'; - else - *__s = NULL; - return __retval; -} - -__STRING_INLINE char *__strsep_2c (char **__s, char __reject1, char __reject2); -__STRING_INLINE char * -__strsep_2c (char **__s, char __reject1, char __reject2) -{ - register char *__retval = *__s; - if (__retval == NULL) - return *__s = NULL; - if (*__retval == __reject1 || *__retval == __reject2) - *(*__s)++ = '\0'; - else - { - register char *__cp = __retval; - while (*__cp != '\0' && *__cp != __reject1 && *__cp != __reject2) - ++__cp; - if (*__cp != '\0') - { - *__s = __cp; - *(*__s)++ = '\0'; - } - else - *__s = NULL; - } - return __retval; -} - -__STRING_INLINE char *__strsep_3c (char **__s, char __reject1, char __reject2, - char __reject3); -__STRING_INLINE char * -__strsep_3c (char **__s, char __reject1, char __reject2, char __reject3) -{ - register char *__retval = *__s; - if (__retval == NULL) - return *__s = NULL; - if (*__retval == __reject1 || *__retval == __reject2 - || *__retval == __reject3) - *(*__s)++ = '\0'; - else - { - register char *__cp = __retval; - while (*__cp != '\0' && *__cp != __reject1 && *__cp != __reject2 - && *__cp != __reject3) - ++__cp; - if (*__cp != '\0') - { - *__s = __cp; - *(*__s)++ = '\0'; - } - else - *__s = NULL; - } - return __retval; -} - -__STRING_INLINE char *__strsep_g (char **__s, __const char *__reject); -__STRING_INLINE char * -__strsep_g (char **__s, __const char *__reject) -{ - register char *__retval = *__s; - if (__retval == NULL) - return NULL; - if ((*__s = strpbrk (__retval, __reject)) != NULL) - *(*__s)++ = '\0'; - return __retval; -} -# ifdef __USE_BSD -# define strsep(s, reject) __strsep ((s), (reject)) -# endif -#endif - -/* We need the memory allocation functions for inline strdup(). - Referring to stdlib.h (even minimally) is not allowed - in any of the tight standards compliant modes. */ -#ifdef __USE_MISC - -# if !defined _HAVE_STRING_ARCH_strdup || !defined _HAVE_STRING_ARCH_strndup -# define __need_malloc_and_calloc -# include <stdlib.h> -# endif - -# ifndef _HAVE_STRING_ARCH_strdup - -extern char *__strdup (__const char *__string) __THROW __attribute_malloc__; -# define __strdup(s) \ - (__extension__ (__builtin_constant_p (s) && __string2_1bptr_p (s) \ - ? (((__const char *) (s))[0] == '\0' \ - ? (char *) calloc (1, 1) \ - : ({ size_t __len = strlen (s) + 1; \ - char *__retval = (char *) malloc (__len); \ - if (__retval != NULL) \ - __retval = (char *) memcpy (__retval, s, __len); \ - __retval; })) \ - : __strdup (s))) - -# if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN_EXTENDED -# define strdup(s) __strdup (s) -# endif -# endif - -# ifndef _HAVE_STRING_ARCH_strndup - -extern char *__strndup (__const char *__string, size_t __n) - __THROW __attribute_malloc__; -# define __strndup(s, n) \ - (__extension__ (__builtin_constant_p (s) && __string2_1bptr_p (s) \ - ? (((__const char *) (s))[0] == '\0' \ - ? (char *) calloc (1, 1) \ - : ({ size_t __len = strlen (s) + 1; \ - size_t __n = (n); \ - char *__retval; \ - if (__n < __len) \ - __len = __n; \ - __retval = (char *) malloc (__len); \ - if (__retval != NULL) \ - { \ - __retval[__len - 1] = '\0'; \ - __retval = (char *) memcpy (__retval, s, \ - __len - 1); \ - } \ - __retval; })) \ - : __strndup ((s), (n)))) - -# ifdef __USE_GNU -# define strndup(s, n) __strndup ((s), (n)) -# endif -# endif - -#endif /* Use misc. or use GNU. */ - -#ifndef _FORCE_INLINES -# undef __STRING_INLINE -#endif - -#endif /* No string inlines. */ diff --git a/libc/sysdeps/linux/i386/bits/stropts.h b/libc/sysdeps/linux/i386/bits/stropts.h deleted file mode 100644 index 21538c31d..000000000 --- a/libc/sysdeps/linux/i386/bits/stropts.h +++ /dev/null @@ -1,227 +0,0 @@ -/* Copyright (C) 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. */ - -#ifndef _BITS_STROPTS_H -#define _BITS_STROPTS_H 1 - -#include <bits/types.h> - -/* Macros used as `request' argument to `ioctl'. */ -#define __SID ('S' << 8) - -#define I_NREAD (__SID | 1) /* Counts the number of data bytes in the data - block in the first message. */ -#define I_PUSH (__SID | 2) /* Push STREAMS module onto top of the current - STREAM, just below the STREAM head. */ -#define I_POP (__SID | 3) /* Remove STREAMS module from just below the - STREAM head. */ -#define I_LOOK (__SID | 4) /* Retrieve the name of the module just below - the STREAM head and place it in a character - string. */ -#define I_FLUSH (__SID | 5) /* Flush all input and/or output. */ -#define I_SRDOPT (__SID | 6) /* Sets the read mode. */ -#define I_GRDOPT (__SID | 7) /* Returns the current read mode setting. */ -#define I_STR (__SID | 8) /* Construct an internal STREAMS `ioctl' - message and send that message downstream. */ -#define I_SETSIG (__SID | 9) /* Inform the STREAM head that the process - wants the SIGPOLL signal issued. */ -#define I_GETSIG (__SID |10) /* Return the events for which the calling - process is currently registered to be sent - a SIGPOLL signal. */ -#define I_FIND (__SID |11) /* Compares the names of all modules currently - present in the STREAM to the name pointed to - by `arg'. */ -#define I_LINK (__SID |12) /* Connect two STREAMs. */ -#define I_UNLINK (__SID |13) /* Disconnects the two STREAMs. */ -#define I_PEEK (__SID |15) /* Allows a process to retrieve the information - in the first message on the STREAM head read - queue without taking the message off the - queue. */ -#define I_FDINSERT (__SID |16) /* Create a message from the specified - buffer(s), adds information about another - STREAM, and send the message downstream. */ -#define I_SENDFD (__SID |17) /* Requests the STREAM associated with `fildes' - to send a message, containing a file - pointer, to the STREAM head at the other end - of a STREAMS pipe. */ -#define I_RECVFD (__SID |14) /* Non-EFT definition. */ -#define I_SWROPT (__SID |19) /* Set the write mode. */ -#define I_GWROPT (__SID |20) /* Return the current write mode setting. */ -#define I_LIST (__SID |21) /* List all the module names on the STREAM, up - to and including the topmost driver name. */ -#define I_PLINK (__SID |22) /* Connect two STREAMs with a persistent - link. */ -#define I_PUNLINK (__SID |23) /* Disconnect the two STREAMs that were - connected with a persistent link. */ -#define I_FLUSHBAND (__SID |28) /* Flush only band specified. */ -#define I_CKBAND (__SID |29) /* Check if the message of a given priority - band exists on the STREAM head read - queue. */ -#define I_GETBAND (__SID |30) /* Return the priority band of the first - message on the STREAM head read queue. */ -#define I_ATMARK (__SID |31) /* See if the current message on the STREAM - head read queue is "marked" by some module - downstream. */ -#define I_SETCLTIME (__SID |32) /* Set the time the STREAM head will delay when - a STREAM is closing and there is data on - the write queues. */ -#define I_GETCLTIME (__SID |33) /* Get current value for closing timeout. */ -#define I_CANPUT (__SID |34) /* Check if a certain band is writable. */ - - -/* Used in `I_LOOK' request. */ -#define FMNAMESZ 8 /* compatibility w/UnixWare/Solaris. */ - -/* Flush options. */ -#define FLUSHR 0x01 /* Flush read queues. */ -#define FLUSHW 0x02 /* Flush write queues. */ -#define FLUSHRW 0x03 /* Flush read and write queues. */ -#ifdef __USE_GNU -# define FLUSHBAND 0x04 /* Flush only specified band. */ -#endif - -/* Possible arguments for `I_SETSIG'. */ -#define S_INPUT 0x0001 /* A message, other than a high-priority - message, has arrived. */ -#define S_HIPRI 0x0002 /* A high-priority message is present. */ -#define S_OUTPUT 0x0004 /* The write queue for normal data is no longer - full. */ -#define S_MSG 0x0008 /* A STREAMS signal message that contains the - SIGPOLL signal reaches the front of the - STREAM head read queue. */ -#define S_ERROR 0x0010 /* Notification of an error condition. */ -#define S_HANGUP 0x0020 /* Notification of a hangup. */ -#define S_RDNORM 0x0040 /* A normal message has arrived. */ -#define S_WRNORM S_OUTPUT -#define S_RDBAND 0x0080 /* A message with a non-zero priority has - arrived. */ -#define S_WRBAND 0x0100 /* The write queue for a non-zero priority - band is no longer full. */ -#define S_BANDURG 0x0200 /* When used in conjunction with S_RDBAND, - SIGURG is generated instead of SIGPOLL when - a priority message reaches the front of the - STREAM head read queue. */ - -/* Option for `I_PEEK'. */ -#define RS_HIPRI 0x01 /* Only look for high-priority messages. */ - -/* Options for `I_SRDOPT'. */ -#define RNORM 0x0000 /* Byte-STREAM mode, the default. */ -#define RMSGD 0x0001 /* Message-discard mode. */ -#define RMSGN 0x0002 /* Message-nondiscard mode. */ -#define RPROTDAT 0x0004 /* Deliver the control part of a message as - data. */ -#define RPROTDIS 0x0008 /* Discard the control part of a message, - delivering any data part. */ -#define RPROTNORM 0x0010 /* Fail `read' with EBADMSG if a message - containing a control part is at the front - of the STREAM head read queue. */ -#ifdef __USE_GNU -# define RPROTMASK 0x001C /* The RPROT bits */ -#endif - -/* Possible mode for `I_SWROPT'. */ -#define SNDZERO 0x001 /* Send a zero-length message downstream when a - `write' of 0 bytes occurs. */ -#ifdef __USE_GNU -# define SNDPIPE 0x002 /* Send SIGPIPE on write and putmsg if - sd_werror is set. */ -#endif - -/* Arguments for `I_ATMARK'. */ -#define ANYMARK 0x01 /* Check if the message is marked. */ -#define LASTMARK 0x02 /* Check if the message is the last one marked - on the queue. */ - -/* Argument for `I_UNLINK'. */ -#ifdef __USE_GNU -# define MUXID_ALL (-1) /* Unlink all STREAMs linked to the STREAM - associated with `fildes'. */ -#endif - - -/* Macros for `getmsg', `getpmsg', `putmsg' and `putpmsg'. */ -#define MSG_HIPRI 0x01 /* Send/receive high priority message. */ -#define MSG_ANY 0x02 /* Receive any message. */ -#define MSG_BAND 0x04 /* Receive message from specified band. */ - -/* Values returned by getmsg and getpmsg */ -#define MORECTL 1 /* More control information is left in - message. */ -#define MOREDATA 2 /* More data is left in message. */ - - -/* Structure used for the I_FLUSHBAND ioctl on streams. */ -struct bandinfo - { - unsigned char bi_pri; - int bi_flag; - }; - -struct strbuf - { - int maxlen; /* Maximum buffer length. */ - int len; /* Length of data. */ - char *buf; /* Pointer to buffer. */ - }; - -struct strpeek - { - struct strbuf ctlbuf; - struct strbuf databuf; - t_uscalar_t flags; /* UnixWare/Solaris compatibility. */ - }; - -struct strfdinsert - { - struct strbuf ctlbuf; - struct strbuf databuf; - t_uscalar_t flags; /* UnixWare/Solaris compatibility. */ - int fildes; - int offset; - }; - -struct strioctl - { - int ic_cmd; - int ic_timout; - int ic_len; - char *ic_dp; - }; - -struct strrecvfd - { - int fd; - uid_t uid; - gid_t gid; - char __fill[8]; /* UnixWare/Solaris compatibility */ - }; - - -struct str_mlist - { - char l_name[FMNAMESZ + 1]; - }; - -struct str_list - { - int sl_nmods; - struct str_mlist *sl_modlist; - }; - -#endif /* bits/stropts.h */ diff --git a/libc/sysdeps/linux/i386/bits/termios.h b/libc/sysdeps/linux/i386/bits/termios.h deleted file mode 100644 index 887b309ad..000000000 --- a/libc/sysdeps/linux/i386/bits/termios.h +++ /dev/null @@ -1,213 +0,0 @@ -/* termios type and macro definitions. Linux version. - Copyright (C) 1993, 94, 95, 96, 97, 98, 99 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 _TERMIOS_H -# error "Never include <bits/termios.h> directly; use <termios.h> instead." -#endif - -typedef unsigned char cc_t; -typedef unsigned int speed_t; -typedef unsigned int tcflag_t; - -#define NCCS 32 -struct termios - { - tcflag_t c_iflag; /* input mode flags */ - tcflag_t c_oflag; /* output mode flags */ - tcflag_t c_cflag; /* control mode flags */ - tcflag_t c_lflag; /* local mode flags */ - cc_t c_line; /* line discipline */ - cc_t c_cc[NCCS]; /* control characters */ - speed_t c_ispeed; /* input speed */ - speed_t c_ospeed; /* output speed */ - }; - -/* c_cc characters */ -#define VINTR 0 -#define VQUIT 1 -#define VERASE 2 -#define VKILL 3 -#define VEOF 4 -#define VTIME 5 -#define VMIN 6 -#define VSWTC 7 -#define VSTART 8 -#define VSTOP 9 -#define VSUSP 10 -#define VEOL 11 -#define VREPRINT 12 -#define VDISCARD 13 -#define VWERASE 14 -#define VLNEXT 15 -#define VEOL2 16 - -/* c_iflag bits */ -#define IGNBRK 0000001 -#define BRKINT 0000002 -#define IGNPAR 0000004 -#define PARMRK 0000010 -#define INPCK 0000020 -#define ISTRIP 0000040 -#define INLCR 0000100 -#define IGNCR 0000200 -#define ICRNL 0000400 -#define IUCLC 0001000 -#define IXON 0002000 -#define IXANY 0004000 -#define IXOFF 0010000 -#define IMAXBEL 0020000 - -/* c_oflag bits */ -#define OPOST 0000001 -#define OLCUC 0000002 -#define ONLCR 0000004 -#define OCRNL 0000010 -#define ONOCR 0000020 -#define ONLRET 0000040 -#define OFILL 0000100 -#define OFDEL 0000200 -#if defined __USE_MISC || defined __USE_XOPEN -# define NLDLY 0000400 -# define NL0 0000000 -# define NL1 0000400 -# define CRDLY 0003000 -# define CR0 0000000 -# define CR1 0001000 -# define CR2 0002000 -# define CR3 0003000 -# define TABDLY 0014000 -# define TAB0 0000000 -# define TAB1 0004000 -# define TAB2 0010000 -# define TAB3 0014000 -# define BSDLY 0020000 -# define BS0 0000000 -# define BS1 0020000 -# define FFDLY 0100000 -# define FF0 0000000 -# define FF1 0100000 -#endif - -#define VTDLY 0040000 -#define VT0 0000000 -#define VT1 0040000 - -#ifdef __USE_MISC -# define XTABS 0014000 -#endif - -/* c_cflag bit meaning */ -#ifdef __USE_MISC -# define CBAUD 0010017 -#endif -#define B0 0000000 /* hang up */ -#define B50 0000001 -#define B75 0000002 -#define B110 0000003 -#define B134 0000004 -#define B150 0000005 -#define B200 0000006 -#define B300 0000007 -#define B600 0000010 -#define B1200 0000011 -#define B1800 0000012 -#define B2400 0000013 -#define B4800 0000014 -#define B9600 0000015 -#define B19200 0000016 -#define B38400 0000017 -#ifdef __USE_MISC -# define EXTA B19200 -# define EXTB B38400 -#endif -#define CSIZE 0000060 -#define CS5 0000000 -#define CS6 0000020 -#define CS7 0000040 -#define CS8 0000060 -#define CSTOPB 0000100 -#define CREAD 0000200 -#define PARENB 0000400 -#define PARODD 0001000 -#define HUPCL 0002000 -#define CLOCAL 0004000 -#ifdef __USE_MISC -# define CBAUDEX 0010000 -#endif -#define B57600 0010001 -#define B115200 0010002 -#define B230400 0010003 -#define B460800 0010004 -#define B500000 0010005 -#define B576000 0010006 -#define B921600 0010007 -#define B1000000 0010010 -#define B1152000 0010011 -#define B1500000 0010012 -#define B2000000 0010013 -#define B2500000 0010014 -#define B3000000 0010015 -#define B3500000 0010016 -#define B4000000 0010017 -#define __MAX_BAUD B4000000 -#ifdef __USE_MISC -# define CIBAUD 002003600000 /* input baud rate (not used) */ -# define CRTSCTS 020000000000 /* flow control */ -#endif - -/* c_lflag bits */ -#define ISIG 0000001 -#define ICANON 0000002 -#if defined __USE_MISC || defined __USE_XOPEN -# define XCASE 0000004 -#endif -#define ECHO 0000010 -#define ECHOE 0000020 -#define ECHOK 0000040 -#define ECHONL 0000100 -#define NOFLSH 0000200 -#define TOSTOP 0000400 -#ifdef __USE_MISC -# define ECHOCTL 0001000 -# define ECHOPRT 0002000 -# define ECHOKE 0004000 -# define FLUSHO 0010000 -# define PENDIN 0040000 -#endif -#define IEXTEN 0100000 - -/* tcflow() and TCXONC use these */ -#define TCOOFF 0 -#define TCOON 1 -#define TCIOFF 2 -#define TCION 3 - -/* tcflush() and TCFLSH use these */ -#define TCIFLUSH 0 -#define TCOFLUSH 1 -#define TCIOFLUSH 2 - -/* tcsetattr uses these */ -#define TCSANOW 0 -#define TCSADRAIN 1 -#define TCSAFLUSH 2 - - -#define _IOT_termios /* Hurd ioctl type field. */ \ - _IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2) diff --git a/libc/sysdeps/linux/i386/bits/uio.h b/libc/sysdeps/linux/i386/bits/uio.h deleted file mode 100644 index 84b4805fe..000000000 --- a/libc/sysdeps/linux/i386/bits/uio.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (C) 1996, 1997 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 _SYS_UIO_H -# error "Never include <bits/uio.h> directly; use <sys/uio.h> instead." -#endif - - -#include <sys/types.h> - - -/* We should normally use the Linux kernel header file to define this - type and macros but this calls for trouble because of the header - includes other kernel headers. */ - -/* Size of object which can be written atomically. - - This macro has different values in different kernel versions. The - latest versions of ther kernel use 1024 and this is good choice. Since - the C library implementation of readv/writev is able to emulate the - functionality even if the currently running kernel does not support - this large value the readv/writev call will not fail because of this. */ -#define UIO_MAXIOV 1024 - - -/* Structure for scatter/gather I/O. */ -struct iovec - { - void *iov_base; /* Pointer to data. */ - size_t iov_len; /* Length of data. */ - }; diff --git a/libc/sysdeps/linux/i386/bits/utmp.h b/libc/sysdeps/linux/i386/bits/utmp.h deleted file mode 100644 index 2ed29bbb4..000000000 --- a/libc/sysdeps/linux/i386/bits/utmp.h +++ /dev/null @@ -1,106 +0,0 @@ -/* The `struct utmp' type, describing entries in the utmp file. GNU version. - Copyright (C) 1993, 1996, 1997, 1998, 1999 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 _UTMP_H -# error "Never include <bits/utmp.h> directly; use <utmp.h> instead." -#endif - -#include <paths.h> -#include <sys/time.h> -#include <sys/types.h> - - -#define UT_LINESIZE 32 -#define UT_NAMESIZE 32 -#define UT_HOSTSIZE 256 - - -/* The structure describing an entry in the database of - previous logins. */ -struct lastlog - { - __time_t ll_time; - char ll_line[UT_LINESIZE]; - char ll_host[UT_HOSTSIZE]; - }; - - -/* The structure describing the status of a terminated process. This - type is used in `struct utmp' below. */ -struct exit_status - { - short int e_termination; /* Process termination status. */ - short int e_exit; /* Process exit status. */ - }; - - -/* The structure describing an entry in the user accounting database. */ -struct utmp -{ - short int ut_type; /* Type of login. */ - pid_t ut_pid; /* Process ID of login process. */ - char ut_line[UT_LINESIZE]; /* Devicename. */ - char ut_id[4]; /* Inittab ID. */ - char ut_user[UT_NAMESIZE]; /* Username. */ - char ut_host[UT_HOSTSIZE]; /* Hostname for remote login. */ - struct exit_status ut_exit; /* Exit status of a process marked - as DEAD_PROCESS. */ - long int ut_session; /* Session ID, used for windowing. */ - struct timeval ut_tv; /* Time entry was made. */ - int32_t ut_addr_v6[4]; /* Internet address of remote host. */ - char __unused[20]; /* Reserved for future use. */ -}; - -/* Backwards compatibility hacks. */ -#define ut_name ut_user -#ifndef _NO_UT_TIME -/* We have a problem here: `ut_time' is also used otherwise. Define - _NO_UT_TIME if the compiler complains. */ -# define ut_time ut_tv.tv_sec -#endif -#define ut_xtime ut_tv.tv_sec -#define ut_addr ut_addr_v6[0] - - -/* Values for the `ut_type' field of a `struct utmp'. */ -#define EMPTY 0 /* No valid user accounting information. */ - -#define RUN_LVL 1 /* The system's runlevel. */ -#define BOOT_TIME 2 /* Time of system boot. */ -#define NEW_TIME 3 /* Time after system clock changed. */ -#define OLD_TIME 4 /* Time when system clock changed. */ - -#define INIT_PROCESS 5 /* Process spawned by the init process. */ -#define LOGIN_PROCESS 6 /* Session leader of a logged in user. */ -#define USER_PROCESS 7 /* Normal process. */ -#define DEAD_PROCESS 8 /* Terminated process. */ - -#define ACCOUNTING 9 - -/* Old Linux name for the EMPTY type. */ -#define UT_UNKNOWN EMPTY - - -/* Tell the user that we have a modern system with UT_HOST, UT_PID, - UT_TYPE, UT_ID and UT_TV fields. */ -#define _HAVE_UT_TYPE 1 -#define _HAVE_UT_PID 1 -#define _HAVE_UT_ID 1 -#define _HAVE_UT_TV 1 -#define _HAVE_UT_HOST 1 diff --git a/libc/sysdeps/linux/i386/bits/utmpx.h b/libc/sysdeps/linux/i386/bits/utmpx.h deleted file mode 100644 index 99735370b..000000000 --- a/libc/sysdeps/linux/i386/bits/utmpx.h +++ /dev/null @@ -1,89 +0,0 @@ -/* Structures and definitions for the user accounting database. GNU version. - Copyright (C) 1997, 1998, 2000, 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. */ - -#ifndef _UTMPX_H -# error "Never include <bits/utmpx.h> directly; use <utmpx.h> instead." -#endif - -#include <bits/types.h> -#include <sys/time.h> - - -#ifdef __USE_GNU -# include <paths.h> -# define _PATH_UTMPX _PATH_UTMP -# define _PATH_WTMPX _PATH_WTMP -#endif - - -#define __UT_LINESIZE 32 -#define __UT_NAMESIZE 32 -#define __UT_HOSTSIZE 256 - - -/* The structure describing the status of a terminated process. This - type is used in `struct utmpx' below. */ -struct __exit_status - { -#ifdef __USE_GNU - short int e_termination; /* Process termination status. */ - short int e_exit; /* Process exit status. */ -#else - short int __e_termination; /* Process termination status. */ - short int __e_exit; /* Process exit status. */ -#endif - }; - - -/* The structure describing an entry in the user accounting database. */ -struct utmpx -{ - short int ut_type; /* Type of login. */ - __pid_t ut_pid; /* Process ID of login process. */ - char ut_line[__UT_LINESIZE]; /* Devicename. */ - char ut_id[4]; /* Inittab ID. */ - char ut_user[__UT_NAMESIZE]; /* Username. */ - char ut_host[__UT_HOSTSIZE]; /* Hostname for remote login. */ - struct __exit_status ut_exit; /* Exit status of a process marked - as DEAD_PROCESS. */ - long int ut_session; /* Session ID, used for windowing. */ - struct timeval ut_tv; /* Time entry was made. */ - __int32_t ut_addr_v6[4]; /* Internet address of remote host. */ - char __unused[20]; /* Reserved for future use. */ -}; - - -/* Values for the `ut_type' field of a `struct utmpx'. */ -#define EMPTY 0 /* No valid user accounting information. */ - -#ifdef __USE_GNU -# define RUN_LVL 1 /* The system's runlevel. */ -#endif -#define BOOT_TIME 2 /* Time of system boot. */ -#define NEW_TIME 3 /* Time after system clock changed. */ -#define OLD_TIME 4 /* Time when system clock changed. */ - -#define INIT_PROCESS 5 /* Process spawned by the init process. */ -#define LOGIN_PROCESS 6 /* Session leader of a logged in user. */ -#define USER_PROCESS 7 /* Normal process. */ -#define DEAD_PROCESS 8 /* Terminated process. */ - -#ifdef __USE_GNU -# define ACCOUNTING 9 /* System accounting. */ -#endif diff --git a/libc/sysdeps/linux/i386/bits/utsname.h b/libc/sysdeps/linux/i386/bits/utsname.h deleted file mode 100644 index 35e71e3ba..000000000 --- a/libc/sysdeps/linux/i386/bits/utsname.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 1995, 1996, 1997 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 _SYS_UTSNAME_H -# error "Never include <bits/utsname.h> directly; use <sys/utsname.h> instead." -#endif - -/* Length of the entries in `struct utsname' is 65. */ -#define _UTSNAME_LENGTH 65 - -/* Linux provides as additional information in the `struct utsname' - the name of the current domain. Define _UTSNAME_DOMAIN_LENGTH - to a value != 0 to activate this entry. */ -#define _UTSNAME_DOMAIN_LENGTH _UTSNAME_LENGTH diff --git a/libc/sysdeps/linux/i386/bits/waitflags.h b/libc/sysdeps/linux/i386/bits/waitflags.h deleted file mode 100644 index 1303c6c36..000000000 --- a/libc/sysdeps/linux/i386/bits/waitflags.h +++ /dev/null @@ -1,30 +0,0 @@ -/* Definitions of flag bits for `waitpid' et al. - Copyright (C) 1992, 1996, 1997, 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. */ - -#if !defined _SYS_WAIT_H && !defined _STDLIB_H -# error "Never include <bits/waitflags.h> directly; use <sys/wait.h> instead." -#endif - - -/* Bits in the third argument to `waitpid'. */ -#define WNOHANG 1 /* Don't block waiting. */ -#define WUNTRACED 2 /* Report status of stopped children. */ - -#define __WALL 0x40000000 /* Wait for any child. */ -#define __WCLONE 0x80000000 /* Wait for cloned process. */ diff --git a/libc/sysdeps/linux/i386/bits/waitstatus.h b/libc/sysdeps/linux/i386/bits/waitstatus.h deleted file mode 100644 index 982c9dbb2..000000000 --- a/libc/sysdeps/linux/i386/bits/waitstatus.h +++ /dev/null @@ -1,104 +0,0 @@ -/* Definitions of status bits for `wait' et al. - Copyright (C) 1992, 1994, 1996, 1997, 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. */ - -#if !defined _SYS_WAIT_H && !defined _STDLIB_H -# error "Never include <bits/waitstatus.h> directly; use <sys/wait.h> instead." -#endif - - -/* Everything extant so far uses these same bits. */ - - -/* If WIFEXITED(STATUS), the low-order 8 bits of the status. */ -#define __WEXITSTATUS(status) (((status) & 0xff00) >> 8) - -/* If WIFSIGNALED(STATUS), the terminating signal. */ -#define __WTERMSIG(status) ((status) & 0x7f) - -/* If WIFSTOPPED(STATUS), the signal that stopped the child. */ -#define __WSTOPSIG(status) __WEXITSTATUS(status) - -/* Nonzero if STATUS indicates normal termination. */ -#define __WIFEXITED(status) (__WTERMSIG(status) == 0) - -/* Nonzero if STATUS indicates termination by a signal. */ -#ifdef __GNUC__ -# define __WIFSIGNALED(status) \ - (__extension__ ({ int __status = (status); \ - !__WIFSTOPPED(__status) && !__WIFEXITED(__status); })) -#else /* Not GCC. */ -# define __WIFSIGNALED(status) (!__WIFSTOPPED(status) && !__WIFEXITED(status)) -#endif /* GCC. */ - -/* Nonzero if STATUS indicates the child is stopped. */ -#define __WIFSTOPPED(status) (((status) & 0xff) == 0x7f) - -/* Nonzero if STATUS indicates the child dumped core. */ -#define __WCOREDUMP(status) ((status) & __WCOREFLAG) - -/* Macros for constructing status values. */ -#define __W_EXITCODE(ret, sig) ((ret) << 8 | (sig)) -#define __W_STOPCODE(sig) ((sig) << 8 | 0x7f) -#define __WCOREFLAG 0x80 - - -#ifdef __USE_BSD - -# include <endian.h> - -union wait - { - int w_status; - struct - { -# if __BYTE_ORDER == __LITTLE_ENDIAN - unsigned int __w_termsig:7; /* Terminating signal. */ - unsigned int __w_coredump:1; /* Set if dumped core. */ - unsigned int __w_retcode:8; /* Return code if exited normally. */ - unsigned int:16; -# endif /* Little endian. */ -# if __BYTE_ORDER == __BIG_ENDIAN - unsigned int:16; - unsigned int __w_retcode:8; - unsigned int __w_coredump:1; - unsigned int __w_termsig:7; -# endif /* Big endian. */ - } __wait_terminated; - struct - { -# if __BYTE_ORDER == __LITTLE_ENDIAN - unsigned int __w_stopval:8; /* W_STOPPED if stopped. */ - unsigned int __w_stopsig:8; /* Stopping signal. */ - unsigned int:16; -# endif /* Little endian. */ -# if __BYTE_ORDER == __BIG_ENDIAN - unsigned int:16; - unsigned int __w_stopsig:8; /* Stopping signal. */ - unsigned int __w_stopval:8; /* W_STOPPED if stopped. */ -# endif /* Big endian. */ - } __wait_stopped; - }; - -# define w_termsig __wait_terminated.__w_termsig -# define w_coredump __wait_terminated.__w_coredump -# define w_retcode __wait_terminated.__w_retcode -# define w_stopsig __wait_stopped.__w_stopsig -# define w_stopval __wait_stopped.__w_stopval - -#endif /* Use BSD. */ diff --git a/libc/sysdeps/linux/m68k/bits/wchar.h b/libc/sysdeps/linux/i386/bits/wchar.h index ef1f56363..442a4621e 100644 --- a/libc/sysdeps/linux/m68k/bits/wchar.h +++ b/libc/sysdeps/linux/i386/bits/wchar.h @@ -20,7 +20,7 @@ #ifndef _BITS_WCHAR_H #define _BITS_WCHAR_H 1 -#define __WCHAR_MIN (-2147483647 - 1) -#define __WCHAR_MAX (2147483647) +#define __WCHAR_MIN (-2147483647l - 1l) +#define __WCHAR_MAX (2147483647l) #endif /* bits/wchar.h */ diff --git a/libc/sysdeps/linux/i386/bits/xopen_lim.h b/libc/sysdeps/linux/i386/bits/xopen_lim.h deleted file mode 100644 index 7f3611860..000000000 --- a/libc/sysdeps/linux/i386/bits/xopen_lim.h +++ /dev/null @@ -1,144 +0,0 @@ -/* Copyright (C) 1996, 1997, 1999, 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. */ - -/* - * Never include this file directly; use <limits.h> instead. - */ - -/* Additional definitions from X/Open Portability Guide, Issue 4, Version 2 - System Interfaces and Headers, 4.16 <limits.h> - - Please note only the values which are not greater than the minimum - stated in the standard document are listed. The `sysconf' functions - should be used to obtain the actual value. */ - -#ifndef _XOPEN_LIM_H -#define _XOPEN_LIM_H 1 - -#define __need_IOV_MAX -#include <bits/stdio_lim.h> - -/* We do not provide fixed values for - - ARG_MAX Maximum length of argument to the `exec' function - including environment data. - - ATEXIT_MAX Maximum number of functions that may be registered - with `atexit'. - - CHILD_MAX Maximum number of simultaneous processes per real - user ID. - - OPEN_MAX Maximum number of files that one process can have open - at anyone time. - - PAGESIZE - PAGE_SIZE Size of bytes of a page. - - PASS_MAX Maximum number of significant bytes in a password. - - We only provide a fixed limit for - - IOV_MAX Maximum number of `iovec' structures that one process has - available for use with `readv' or writev'. - - if this is indeed fixed by the underlying system. -*/ - - -/* Maximum number of `iovec' structures that one process has available - for use with `readv' or writev'. */ -#define _XOPEN_IOV_MAX _POSIX_UIO_MAXIOV - - -/* Maximum value of `digit' in calls to the `printf' and `scanf' - functions. We have no limit, so return a reasonable value. */ -#define NL_ARGMAX _POSIX_ARG_MAX - -/* Maximum number of bytes in a `LANG' name. We have no limit. */ -#define NL_LANGMAX _POSIX2_LINE_MAX - -/* Maximum message number. We have no limit. */ -#define NL_MSGMAX INT_MAX - -/* Maximum number of bytes in N-to-1 collation mapping. We have no - limit. */ -#define NL_NMAX INT_MAX - -/* Maximum set number. We have no limit. */ -#define NL_SETMAX INT_MAX - -/* Maximum number of bytes in a message. We have no limit. */ -#define NL_TEXTMAX INT_MAX - -/* Default process priority. */ -#define NZERO 20 - - -/* Number of bits in a word of type `int'. */ -#ifdef INT_MAX -# if INT_MAX == 32767 -# define WORD_BIT 16 -# else -# if INT_MAX == 2147483647 -# define WORD_BIT 32 -# else -/* Safe assumption. */ -# define WORD_BIT 64 -# endif -# endif -#elif defined __INT_MAX__ -# if __INT_MAX__ == 32767 -# define WORD_BIT 16 -# else -# if __INT_MAX__ == 2147483647 -# define WORD_BIT 32 -# else -/* Safe assumption. */ -# define WORD_BIT 64 -# endif -# endif -#else -# define WORD_BIT 32 -#endif - -/* Number of bits in a word of type `long int'. */ -#ifdef LONG_MAX -# if LONG_MAX == 2147483647 -# define LONG_BIT 32 -# else -/* Safe assumption. */ -# define LONG_BIT 64 -# endif -#elif defined __LONG_MAX__ -# if __LONG_MAX__ == 2147483647 -# define LONG_BIT 32 -# else -/* Safe assumption. */ -# define LONG_BIT 64 -# endif -#else -# include <bits/wordsize.h> -# if __WORDSIZE == 64 -# define LONG_BIT 64 -# else -# define LONG_BIT 32 -# endif -#endif - -#endif /* bits/xopen_lim.h */ diff --git a/libc/sysdeps/linux/i386/sys/debugreg.h b/libc/sysdeps/linux/i386/sys/debugreg.h new file mode 100644 index 000000000..c99c94359 --- /dev/null +++ b/libc/sysdeps/linux/i386/sys/debugreg.h @@ -0,0 +1,91 @@ +/* Copyright (C) 1998, 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 _SYS_DEBUGREG_H +#define _SYS_DEBUGREG_H 1 + +/* Indicate the register numbers for a number of the specific + debug registers. Registers 0-3 contain the addresses we wish to trap on */ +#define DR_FIRSTADDR 0 /* u_debugreg[DR_FIRSTADDR] */ +#define DR_LASTADDR 3 /* u_debugreg[DR_LASTADDR] */ + +#define DR_STATUS 6 /* u_debugreg[DR_STATUS] */ +#define DR_CONTROL 7 /* u_debugreg[DR_CONTROL] */ + +/* Define a few things for the status register. We can use this to determine + which debugging register was responsible for the trap. The other bits + are either reserved or not of interest to us. */ + +#define DR_TRAP0 (0x1) /* db0 */ +#define DR_TRAP1 (0x2) /* db1 */ +#define DR_TRAP2 (0x4) /* db2 */ +#define DR_TRAP3 (0x8) /* db3 */ + +#define DR_STEP (0x4000) /* single-step */ +#define DR_SWITCH (0x8000) /* task switch */ + +/* Now define a bunch of things for manipulating the control register. + The top two bytes of the control register consist of 4 fields of 4 + bits - each field corresponds to one of the four debug registers, + and indicates what types of access we trap on, and how large the data + field is that we are looking at */ + +#define DR_CONTROL_SHIFT 16 /* Skip this many bits in ctl register */ +#define DR_CONTROL_SIZE 4 /* 4 control bits per register */ + +#define DR_RW_EXECUTE (0x0) /* Settings for the access types to trap on */ +#define DR_RW_WRITE (0x1) +#define DR_RW_READ (0x3) + +#define DR_LEN_1 (0x0) /* Settings for data length to trap on */ +#define DR_LEN_2 (0x4) +#define DR_LEN_4 (0xC) + +/* The low byte to the control register determine which registers are + enabled. There are 4 fields of two bits. One bit is "local", meaning + that the processor will reset the bit after a task switch and the other + is global meaning that we have to explicitly reset the bit. With linux, + you can use either one, since we explicitly zero the register when we enter + kernel mode. */ + +#define DR_LOCAL_ENABLE_SHIFT 0 /* Extra shift to the local enable bit */ +#define DR_GLOBAL_ENABLE_SHIFT 1 /* Extra shift to the global enable bit */ +#define DR_ENABLE_SIZE 2 /* 2 enable bits per register */ + +#define DR_LOCAL_ENABLE_MASK (0x55) /* Set local bits for all 4 regs */ +#define DR_GLOBAL_ENABLE_MASK (0xAA) /* Set global bits for all 4 regs */ + +/* The second byte to the control register has a few special things. + + On the i386, you should set the DR_LOCAL_SLOWDOWN or + DR_GLOBAL_SLOWDOWN bits if you want to know exactly which + instruction triggered the watchpoint. Setting these bits causes + the processor to run more slowly, but leaving them clear makes it + treat watchpoint hits as imprecise exceptions, so you can't + reliably determine which instruction caused the hit. + + The i486 and all later IA-32 processors ignore DR_LOCAL_SLOWDOWN + and DR_GLOBAL_SLOWDOWN. They always report the exception + precisely, except in some rare cases, which the user can't do + anything about. */ + +#define DR_CONTROL_RESERVED (0xFC00) /* Reserved by Intel */ +#define DR_LOCAL_SLOWDOWN (0x100) /* Local slow the pipeline */ +#define DR_GLOBAL_SLOWDOWN (0x200) /* Global slow the pipeline */ + +#endif /* sys/debugreg.h */ diff --git a/libc/sysdeps/linux/m68k/bits/ustat.h b/libc/sysdeps/linux/i386/sys/elf.h index aeafc22a5..d959cdca1 100644 --- a/libc/sysdeps/linux/m68k/bits/ustat.h +++ b/libc/sysdeps/linux/i386/sys/elf.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997 Free Software Foundation, Inc. +/* Copyright (C) 1998, 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 @@ -16,12 +16,11 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include <sys/types.h> +#ifndef _SYS_ELF_H +#define _SYS_ELF_H 1 -struct ustat - { - __daddr_t f_tfree; - __ino_t f_tinode; - char f_fname[6]; - char f_fpack[6]; - }; +#warning "This header is obsolete; use <sys/procfs.h> instead." + +#include <sys/procfs.h> + +#endif /* _SYS_ELF_H */ diff --git a/libc/sysdeps/linux/i386/bits/io_i386.h b/libc/sysdeps/linux/i386/sys/io.h index a2660b3a5..39a7877f7 100644 --- a/libc/sysdeps/linux/i386/bits/io_i386.h +++ b/libc/sysdeps/linux/i386/sys/io.h @@ -2,34 +2,41 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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. */ -/* - * June 16, 2001 hacked for uClibc inclusion by Manuel Novoa III - * - * This was originally sys/io.h from glibc-2.2.2. However, uClibc - * currently shares the same sys/io.h for all archs. So, I placed - * moved and renamed it to bits/io_i386.h and modified sys/io.h to - * conditionally include this if __i386__ was defined. - */ +#ifndef _SYS_IO_H +#define _SYS_IO_H 1 -#if !defined _SYS_IO_H || defined _BITS_IO_I386_H -#error Never include <bits/io_i386.h> directly; use <sys/io.h> instead. -#endif +#include <features.h> -#define _BITS_IO_I386_H 1 +__BEGIN_DECLS + +/* If TURN_ON is TRUE, request for permission to do direct i/o on the + port numbers in the range [FROM,FROM+NUM-1]. Otherwise, turn I/O + permission off for that range. This call requires root privileges. + + Portability note: not all Linux platforms support this call. Most + platforms based on the PC I/O architecture probably will, however. + E.g., Linux/Alpha for Alpha PCs supports this. */ +extern int ioperm (unsigned long int __from, unsigned long int __num, + int __turn_on) __THROW; + +/* Set the I/O privilege level to LEVEL. If LEVEL>3, permission to + access any I/O port is granted. This call requires root + privileges. */ +extern int iopl (int __level) __THROW; #if defined __GNUC__ && __GNUC__ >= 2 @@ -169,3 +176,6 @@ outsl (unsigned short int port, const void *addr, unsigned long int count) } #endif /* GNU C */ + +__END_DECLS +#endif /* _SYS_IO_H */ diff --git a/include/sys/perm.h b/libc/sysdeps/linux/i386/sys/perm.h index e389e6679..e389e6679 100644 --- a/include/sys/perm.h +++ b/libc/sysdeps/linux/i386/sys/perm.h diff --git a/libc/sysdeps/linux/i386/sys/procfs.h b/libc/sysdeps/linux/i386/sys/procfs.h new file mode 100644 index 000000000..f0be43309 --- /dev/null +++ b/libc/sysdeps/linux/i386/sys/procfs.h @@ -0,0 +1,131 @@ +/* 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 _SYS_PROCFS_H +#define _SYS_PROCFS_H 1 + +/* This is somewhat modelled after the file of the same name on SVR4 + systems. It provides a definition of the core file format for ELF + used on Linux. It doesn't have anything to do with the /proc file + system, even though Linux has one. + + Anyway, the whole purpose of this file is for GDB and GDB only. + Don't read too much into it. Don't use it for anything other than + GDB unless you know what you are doing. */ + +#include <features.h> +#include <sys/time.h> +#include <sys/types.h> +#include <sys/user.h> + +__BEGIN_DECLS + +/* Type for a general-purpose register. */ +typedef unsigned long elf_greg_t; + +/* And the whole bunch of them. We could have used `struct + user_regs_struct' directly in the typedef, but tradition says that + the register set is an array, which does have some peculiar + semantics, so leave it that way. */ +#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t)) +typedef elf_greg_t elf_gregset_t[ELF_NGREG]; + +/* Register set for the floating-point registers. */ +typedef struct user_fpregs_struct elf_fpregset_t; + +/* Register set for the extended floating-point registers. Includes + the Pentium III SSE registers in addition to the classic + floating-point stuff. */ +typedef struct user_fpxregs_struct elf_fpxregset_t; + + +/* Signal info. */ +struct elf_siginfo + { + int si_signo; /* Signal number. */ + int si_code; /* Extra code. */ + int si_errno; /* Errno. */ + }; + + +/* Definitions to generate Intel SVR4-like core files. These mostly + have the same names as the SVR4 types with "elf_" tacked on the + front to prevent clashes with Linux definitions, and the typedef + forms have been avoided. This is mostly like the SVR4 structure, + but more Linuxy, with things that Linux does not support and which + GDB doesn't really use excluded. */ + +struct elf_prstatus + { + struct elf_siginfo pr_info; /* Info associated with signal. */ + short int pr_cursig; /* Current signal. */ + unsigned long int pr_sigpend; /* Set of pending signals. */ + unsigned long int pr_sighold; /* Set of held signals. */ + __pid_t pr_pid; + __pid_t pr_ppid; + __pid_t pr_pgrp; + __pid_t pr_sid; + struct timeval pr_utime; /* User time. */ + struct timeval pr_stime; /* System time. */ + struct timeval pr_cutime; /* Cumulative user time. */ + struct timeval pr_cstime; /* Cumulative system time. */ + elf_gregset_t pr_reg; /* GP registers. */ + int pr_fpvalid; /* True if math copro being used. */ + }; + + +#define ELF_PRARGSZ (80) /* Number of chars for args. */ + +struct elf_prpsinfo + { + char pr_state; /* Numeric process state. */ + char pr_sname; /* Char for pr_state. */ + char pr_zomb; /* Zombie. */ + char pr_nice; /* Nice val. */ + unsigned long int pr_flag; /* Flags. */ + unsigned short int pr_uid; + unsigned short int pr_gid; + int pr_pid, pr_ppid, pr_pgrp, pr_sid; + /* Lots missing */ + char pr_fname[16]; /* Filename of executable. */ + char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ + }; + + +/* The rest of this file provides the types for emulation of the + Solaris <proc_service.h> interfaces that should be implemented by + users of libthread_db. */ + +/* Addresses. */ +typedef void *psaddr_t; + +/* Register sets. Linux has different names. */ +typedef elf_gregset_t prgregset_t; +typedef elf_fpregset_t prfpregset_t; + +/* We don't have any differences between processes and threads, + therefore have only one PID type. */ +typedef __pid_t lwpid_t; + +/* Process status and info. In the end we do provide typedefs for them. */ +typedef struct elf_prstatus prstatus_t; +typedef struct elf_prpsinfo prpsinfo_t; + +__END_DECLS + +#endif /* sys/procfs.h */ diff --git a/libc/sysdeps/linux/i386/reg.h b/libc/sysdeps/linux/i386/sys/reg.h index 39003c45b..39003c45b 100644 --- a/libc/sysdeps/linux/i386/reg.h +++ b/libc/sysdeps/linux/i386/sys/reg.h diff --git a/libc/sysdeps/linux/i386/sys/ucontext.h b/libc/sysdeps/linux/i386/sys/ucontext.h new file mode 100644 index 000000000..d6474c722 --- /dev/null +++ b/libc/sysdeps/linux/i386/sys/ucontext.h @@ -0,0 +1,129 @@ +/* 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. */ + +#ifndef _SYS_UCONTEXT_H +#define _SYS_UCONTEXT_H 1 + +#include <features.h> +#include <signal.h> + +/* We need the signal context definitions even if they are not used + included in <signal.h>. */ +#include <bits/sigcontext.h> + + +/* Type for general register. */ +typedef int greg_t; + +/* Number of general registers. */ +#define NGREG 19 + +/* Container for all general registers. */ +typedef greg_t gregset_t[NGREG]; + +#ifdef __USE_GNU +/* Number of each register is the `gregset_t' array. */ +enum +{ + REG_GS = 0, +# define REG_GS REG_GS + REG_FS, +# define REG_FS REG_FS + REG_ES, +# define REG_ES REG_ES + REG_DS, +# define REG_DS REG_DS + REG_EDI, +# define REG_EDI REG_EDI + REG_ESI, +# define REG_ESI REG_ESI + REG_EBP, +# define REG_EBP REG_EBP + REG_ESP, +# define REG_ESP REG_ESP + REG_EBX, +# define REG_EBX REG_EBX + REG_EDX, +# define REG_EDX REG_EDX + REG_ECX, +# define REG_ECX REG_ECX + REG_EAX, +# define REG_EAX REG_EAX + REG_TRAPNO, +# define REG_TRAPNO REG_TRAPNO + REG_ERR, +# define REG_ERR REG_ERR + REG_EIP, +# define REG_EIP REG_EIP + REG_CS, +# define REG_CS REG_CS + REG_EFL, +# define REG_EFL REG_EFL + REG_UESP, +# define REG_UESP REG_UESP + REG_SS +# define REG_SS REG_SS +}; +#endif + +/* Definitions taken from the kernel headers. */ +struct _libc_fpreg +{ + unsigned short int significand[4]; + unsigned short int exponent; +}; + +struct _libc_fpstate +{ + unsigned long int cw; + unsigned long int sw; + unsigned long int tag; + unsigned long int ipoff; + unsigned long int cssel; + unsigned long int dataoff; + unsigned long int datasel; + struct _libc_fpreg _st[8]; + unsigned long int status; +}; + +/* Structure to describe FPU registers. */ +typedef struct _libc_fpstate *fpregset_t; + +/* Context to describe whole processor state. */ +typedef struct + { + gregset_t gregs; + /* Due to Linux's history we have to use a pointer here. The SysV/i386 + ABI requires a struct with the values. */ + fpregset_t fpregs; + unsigned long int oldmask; + unsigned long int cr2; + } mcontext_t; + +/* Userlevel context. */ +typedef struct ucontext + { + unsigned long int uc_flags; + struct ucontext *uc_link; + stack_t uc_stack; + mcontext_t uc_mcontext; + __sigset_t uc_sigmask; + struct _libc_fpstate __fpregs_mem; + } ucontext_t; + +#endif /* sys/ucontext.h */ diff --git a/libc/sysdeps/linux/i386/sys/user.h b/libc/sysdeps/linux/i386/sys/user.h new file mode 100644 index 000000000..aca46e7d3 --- /dev/null +++ b/libc/sysdeps/linux/i386/sys/user.h @@ -0,0 +1,103 @@ +/* Copyright (C) 1998, 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 _SYS_USER_H +#define _SYS_USER_H 1 + +/* The whole purpose of this file is for GDB and GDB only. Don't read + too much into it. Don't use it for anything other than GDB unless + you know what you are doing. */ + +struct user_fpregs_struct +{ + long int cwd; + long int swd; + long int twd; + long int fip; + long int fcs; + long int foo; + long int fos; + long int st_space [20]; +}; + +struct user_fpxregs_struct +{ + unsigned short int cwd; + unsigned short int swd; + unsigned short int twd; + unsigned short int fop; + long int fip; + long int fcs; + long int foo; + long int fos; + long int mxcsr; + long int reserved; + long int st_space[32]; /* 8*16 bytes for each FP-reg = 128 bytes */ + long int xmm_space[32]; /* 8*16 bytes for each XMM-reg = 128 bytes */ + long int padding[56]; +}; + +struct user_regs_struct +{ + long int ebx; + long int ecx; + long int edx; + long int esi; + long int edi; + long int ebp; + long int eax; + long int xds; + long int xes; + long int xfs; + long int xgs; + long int orig_eax; + long int eip; + long int xcs; + long int eflags; + long int esp; + long int xss; +}; + +struct user +{ + struct user_regs_struct regs; + int u_fpvalid; + struct user_fpregs_struct i387; + unsigned long int u_tsize; + unsigned long int u_dsize; + unsigned long int u_ssize; + unsigned long start_code; + unsigned long start_stack; + long int signal; + int reserved; + struct user_regs_struct* u_ar0; + struct user_fpregs_struct* u_fpstate; + unsigned long int magic; + char u_comm [32]; + int u_debugreg [8]; +}; + +#define PAGE_SHIFT 12 +#define PAGE_SIZE (1UL << PAGE_SHIFT) +#define PAGE_MASK (~(PAGE_SIZE-1)) +#define NBPG PAGE_SIZE +#define UPAGES 1 +#define HOST_TEXT_START_ADDR (u.start_code) +#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) + +#endif /* _SYS_USER_H */ diff --git a/libc/sysdeps/linux/i386/vm86.h b/libc/sysdeps/linux/i386/sys/vm86.h index 8faeed7f1..8faeed7f1 100644 --- a/libc/sysdeps/linux/i386/vm86.h +++ b/libc/sysdeps/linux/i386/sys/vm86.h diff --git a/libc/sysdeps/linux/m68k/Makefile b/libc/sysdeps/linux/m68k/Makefile index 2337a6ea7..e28cf57f7 100644 --- a/libc/sysdeps/linux/m68k/Makefile +++ b/libc/sysdeps/linux/m68k/Makefile @@ -72,7 +72,6 @@ $(COBJS): %.o : %.c headers: @(TOPDIR=$(TOPDIR) CC=$(CC) /bin/sh $(TOPDIR)/extra/scripts/gen_bits_syscall_h.sh > bits/syscall.h ) - cd $(TOPDIR)/include/sys && ln -fs ../../libc/sysdeps/linux/m68k/reg.h . ifeq ($(strip $(HAVE_ELF)),false) echo "Working around compiler bug in the m68k-pic-coff toolchain" cd $(TOPDIR)/include && ln -fs ../libc/sysdeps/linux/m68k/float.h . diff --git a/libc/sysdeps/linux/m68k/bits/byteswap.h b/libc/sysdeps/linux/m68k/bits/byteswap.h index ea6aa964b..549d4452e 100644 --- a/libc/sysdeps/linux/m68k/bits/byteswap.h +++ b/libc/sysdeps/linux/m68k/bits/byteswap.h @@ -1,5 +1,5 @@ /* Macros to swap the order of bytes in integer values. m68k version. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 2002 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 @@ -21,6 +21,9 @@ # error "Never use <bits/byteswap.h> directly; include <byteswap.h> instead." #endif +#ifndef _BITS_BYTESWAP_H +#define _BITS_BYTESWAP_H 1 + /* Swap bytes in 16 bit value. We don't provide an assembler version because GCC is smart enough to generate optimal assembler output, and this allows for better cse. */ @@ -60,3 +63,5 @@ __bswap_64_r.__l[1] = __bswap_32 (__bswap_64_v.__l[0]); \ __bswap_64_r.__ll; }) #endif + +#endif /* _BITS_BYTESWAP_H */ diff --git a/libc/sysdeps/linux/m68k/bits/cmathcalls.h b/libc/sysdeps/linux/m68k/bits/cmathcalls.h deleted file mode 100644 index c680c6d8e..000000000 --- a/libc/sysdeps/linux/m68k/bits/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/libc/sysdeps/linux/m68k/bits/confname.h b/libc/sysdeps/linux/m68k/bits/confname.h deleted file mode 100644 index ba8868af4..000000000 --- a/libc/sysdeps/linux/m68k/bits/confname.h +++ /dev/null @@ -1,566 +0,0 @@ -/* `sysconf', `pathconf', and `confstr' NAME values. Generic version. - Copyright (C) 1993, 1995-1998, 2000, 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. */ - -#ifndef _UNISTD_H -# error "Never use <bits/confname.h> directly; include <unistd.h> instead." -#endif - -/* Values for the NAME argument to `pathconf' and `fpathconf'. */ -enum - { - _PC_LINK_MAX, -#define _PC_LINK_MAX _PC_LINK_MAX - _PC_MAX_CANON, -#define _PC_MAX_CANON _PC_MAX_CANON - _PC_MAX_INPUT, -#define _PC_MAX_INPUT _PC_MAX_INPUT - _PC_NAME_MAX, -#define _PC_NAME_MAX _PC_NAME_MAX - _PC_PATH_MAX, -#define _PC_PATH_MAX _PC_PATH_MAX - _PC_PIPE_BUF, -#define _PC_PIPE_BUF _PC_PIPE_BUF - _PC_CHOWN_RESTRICTED, -#define _PC_CHOWN_RESTRICTED _PC_CHOWN_RESTRICTED - _PC_NO_TRUNC, -#define _PC_NO_TRUNC _PC_NO_TRUNC - _PC_VDISABLE, -#define _PC_VDISABLE _PC_VDISABLE - _PC_SYNC_IO, -#define _PC_SYNC_IO _PC_SYNC_IO - _PC_ASYNC_IO, -#define _PC_ASYNC_IO _PC_ASYNC_IO - _PC_PRIO_IO, -#define _PC_PRIO_IO _PC_PRIO_IO - _PC_SOCK_MAXBUF, -#define _PC_SOCK_MAXBUF _PC_SOCK_MAXBUF - _PC_FILESIZEBITS, -#define _PC_FILESIZEBITS _PC_FILESIZEBITS - _PC_REC_INCR_XFER_SIZE, -#define _PC_REC_INCR_XFER_SIZE _PC_REC_INCR_XFER_SIZE - _PC_REC_MAX_XFER_SIZE, -#define _PC_REC_MAX_XFER_SIZE _PC_REC_MAX_XFER_SIZE - _PC_REC_MIN_XFER_SIZE, -#define _PC_REC_MIN_XFER_SIZE _PC_REC_MIN_XFER_SIZE - _PC_REC_XFER_ALIGN, -#define _PC_REC_XFER_ALIGN _PC_REC_XFER_ALIGN - _PC_ALLOC_SIZE_MIN, -#define _PC_ALLOC_SIZE_MIN _PC_ALLOC_SIZE_MIN - _PC_SYMLINK_MAX -#define _PC_SYMLINK_MAX _PC_SYMLINK_MAX - }; - -/* Values for the argument to `sysconf'. */ -enum - { - _SC_ARG_MAX, -#define _SC_ARG_MAX _SC_ARG_MAX - _SC_CHILD_MAX, -#define _SC_CHILD_MAX _SC_CHILD_MAX - _SC_CLK_TCK, -#define _SC_CLK_TCK _SC_CLK_TCK - _SC_NGROUPS_MAX, -#define _SC_NGROUPS_MAX _SC_NGROUPS_MAX - _SC_OPEN_MAX, -#define _SC_OPEN_MAX _SC_OPEN_MAX - _SC_STREAM_MAX, -#define _SC_STREAM_MAX _SC_STREAM_MAX - _SC_TZNAME_MAX, -#define _SC_TZNAME_MAX _SC_TZNAME_MAX - _SC_JOB_CONTROL, -#define _SC_JOB_CONTROL _SC_JOB_CONTROL - _SC_SAVED_IDS, -#define _SC_SAVED_IDS _SC_SAVED_IDS - _SC_REALTIME_SIGNALS, -#define _SC_REALTIME_SIGNALS _SC_REALTIME_SIGNALS - _SC_PRIORITY_SCHEDULING, -#define _SC_PRIORITY_SCHEDULING _SC_PRIORITY_SCHEDULING - _SC_TIMERS, -#define _SC_TIMERS _SC_TIMERS - _SC_ASYNCHRONOUS_IO, -#define _SC_ASYNCHRONOUS_IO _SC_ASYNCHRONOUS_IO - _SC_PRIORITIZED_IO, -#define _SC_PRIORITIZED_IO _SC_PRIORITIZED_IO - _SC_SYNCHRONIZED_IO, -#define _SC_SYNCHRONIZED_IO _SC_SYNCHRONIZED_IO - _SC_FSYNC, -#define _SC_FSYNC _SC_FSYNC - _SC_MAPPED_FILES, -#define _SC_MAPPED_FILES _SC_MAPPED_FILES - _SC_MEMLOCK, -#define _SC_MEMLOCK _SC_MEMLOCK - _SC_MEMLOCK_RANGE, -#define _SC_MEMLOCK_RANGE _SC_MEMLOCK_RANGE - _SC_MEMORY_PROTECTION, -#define _SC_MEMORY_PROTECTION _SC_MEMORY_PROTECTION - _SC_MESSAGE_PASSING, -#define _SC_MESSAGE_PASSING _SC_MESSAGE_PASSING - _SC_SEMAPHORES, -#define _SC_SEMAPHORES _SC_SEMAPHORES - _SC_SHARED_MEMORY_OBJECTS, -#define _SC_SHARED_MEMORY_OBJECTS _SC_SHARED_MEMORY_OBJECTS - _SC_AIO_LISTIO_MAX, -#define _SC_AIO_LISTIO_MAX _SC_AIO_LISTIO_MAX - _SC_AIO_MAX, -#define _SC_AIO_MAX _SC_AIO_MAX - _SC_AIO_PRIO_DELTA_MAX, -#define _SC_AIO_PRIO_DELTA_MAX _SC_AIO_PRIO_DELTA_MAX - _SC_DELAYTIMER_MAX, -#define _SC_DELAYTIMER_MAX _SC_DELAYTIMER_MAX - _SC_MQ_OPEN_MAX, -#define _SC_MQ_OPEN_MAX _SC_MQ_OPEN_MAX - _SC_MQ_PRIO_MAX, -#define _SC_MQ_PRIO_MAX _SC_MQ_PRIO_MAX - _SC_VERSION, -#define _SC_VERSION _SC_VERSION - _SC_PAGESIZE, -#define _SC_PAGESIZE _SC_PAGESIZE -#define _SC_PAGE_SIZE _SC_PAGESIZE - _SC_RTSIG_MAX, -#define _SC_RTSIG_MAX _SC_RTSIG_MAX - _SC_SEM_NSEMS_MAX, -#define _SC_SEM_NSEMS_MAX _SC_SEM_NSEMS_MAX - _SC_SEM_VALUE_MAX, -#define _SC_SEM_VALUE_MAX _SC_SEM_VALUE_MAX - _SC_SIGQUEUE_MAX, -#define _SC_SIGQUEUE_MAX _SC_SIGQUEUE_MAX - _SC_TIMER_MAX, -#define _SC_TIMER_MAX _SC_TIMER_MAX - - /* Values for the argument to `sysconf' - corresponding to _POSIX2_* symbols. */ - _SC_BC_BASE_MAX, -#define _SC_BC_BASE_MAX _SC_BC_BASE_MAX - _SC_BC_DIM_MAX, -#define _SC_BC_DIM_MAX _SC_BC_DIM_MAX - _SC_BC_SCALE_MAX, -#define _SC_BC_SCALE_MAX _SC_BC_SCALE_MAX - _SC_BC_STRING_MAX, -#define _SC_BC_STRING_MAX _SC_BC_STRING_MAX - _SC_COLL_WEIGHTS_MAX, -#define _SC_COLL_WEIGHTS_MAX _SC_COLL_WEIGHTS_MAX - _SC_EQUIV_CLASS_MAX, -#define _SC_EQUIV_CLASS_MAX _SC_EQUIV_CLASS_MAX - _SC_EXPR_NEST_MAX, -#define _SC_EXPR_NEST_MAX _SC_EXPR_NEST_MAX - _SC_LINE_MAX, -#define _SC_LINE_MAX _SC_LINE_MAX - _SC_RE_DUP_MAX, -#define _SC_RE_DUP_MAX _SC_RE_DUP_MAX - _SC_CHARCLASS_NAME_MAX, -#define _SC_CHARCLASS_NAME_MAX _SC_CHARCLASS_NAME_MAX - - _SC_2_VERSION, -#define _SC_2_VERSION _SC_2_VERSION - _SC_2_C_BIND, -#define _SC_2_C_BIND _SC_2_C_BIND - _SC_2_C_DEV, -#define _SC_2_C_DEV _SC_2_C_DEV - _SC_2_FORT_DEV, -#define _SC_2_FORT_DEV _SC_2_FORT_DEV - _SC_2_FORT_RUN, -#define _SC_2_FORT_RUN _SC_2_FORT_RUN - _SC_2_SW_DEV, -#define _SC_2_SW_DEV _SC_2_SW_DEV - _SC_2_LOCALEDEF, -#define _SC_2_LOCALEDEF _SC_2_LOCALEDEF - - _SC_PII, -#define _SC_PII _SC_PII - _SC_PII_XTI, -#define _SC_PII_XTI _SC_PII_XTI - _SC_PII_SOCKET, -#define _SC_PII_SOCKET _SC_PII_SOCKET - _SC_PII_INTERNET, -#define _SC_PII_INTERNET _SC_PII_INTERNET - _SC_PII_OSI, -#define _SC_PII_OSI _SC_PII_OSI - _SC_POLL, -#define _SC_POLL _SC_POLL - _SC_SELECT, -#define _SC_SELECT _SC_SELECT - _SC_UIO_MAXIOV, -#define _SC_UIO_MAXIOV _SC_UIO_MAXIOV - _SC_IOV_MAX = _SC_UIO_MAXIOV, -#define _SC_IOV_MAX _SC_IOV_MAX - _SC_PII_INTERNET_STREAM, -#define _SC_PII_INTERNET_STREAM _SC_PII_INTERNET_STREAM - _SC_PII_INTERNET_DGRAM, -#define _SC_PII_INTERNET_DGRAM _SC_PII_INTERNET_DGRAM - _SC_PII_OSI_COTS, -#define _SC_PII_OSI_COTS _SC_PII_OSI_COTS - _SC_PII_OSI_CLTS, -#define _SC_PII_OSI_CLTS _SC_PII_OSI_CLTS - _SC_PII_OSI_M, -#define _SC_PII_OSI_M _SC_PII_OSI_M - _SC_T_IOV_MAX, -#define _SC_T_IOV_MAX _SC_T_IOV_MAX - - /* Values according to POSIX 1003.1c (POSIX threads). */ - _SC_THREADS, -#define _SC_THREADS _SC_THREADS - _SC_THREAD_SAFE_FUNCTIONS, -#define _SC_THREAD_SAFE_FUNCTIONS _SC_THREAD_SAFE_FUNCTIONS - _SC_GETGR_R_SIZE_MAX, -#define _SC_GETGR_R_SIZE_MAX _SC_GETGR_R_SIZE_MAX - _SC_GETPW_R_SIZE_MAX, -#define _SC_GETPW_R_SIZE_MAX _SC_GETPW_R_SIZE_MAX - _SC_LOGIN_NAME_MAX, -#define _SC_LOGIN_NAME_MAX _SC_LOGIN_NAME_MAX - _SC_TTY_NAME_MAX, -#define _SC_TTY_NAME_MAX _SC_TTY_NAME_MAX - _SC_THREAD_DESTRUCTOR_ITERATIONS, -#define _SC_THREAD_DESTRUCTOR_ITERATIONS _SC_THREAD_DESTRUCTOR_ITERATIONS - _SC_THREAD_KEYS_MAX, -#define _SC_THREAD_KEYS_MAX _SC_THREAD_KEYS_MAX - _SC_THREAD_STACK_MIN, -#define _SC_THREAD_STACK_MIN _SC_THREAD_STACK_MIN - _SC_THREAD_THREADS_MAX, -#define _SC_THREAD_THREADS_MAX _SC_THREAD_THREADS_MAX - _SC_THREAD_ATTR_STACKADDR, -#define _SC_THREAD_ATTR_STACKADDR _SC_THREAD_ATTR_STACKADDR - _SC_THREAD_ATTR_STACKSIZE, -#define _SC_THREAD_ATTR_STACKSIZE _SC_THREAD_ATTR_STACKSIZE - _SC_THREAD_PRIORITY_SCHEDULING, -#define _SC_THREAD_PRIORITY_SCHEDULING _SC_THREAD_PRIORITY_SCHEDULING - _SC_THREAD_PRIO_INHERIT, -#define _SC_THREAD_PRIO_INHERIT _SC_THREAD_PRIO_INHERIT - _SC_THREAD_PRIO_PROTECT, -#define _SC_THREAD_PRIO_PROTECT _SC_THREAD_PRIO_PROTECT - _SC_THREAD_PROCESS_SHARED, -#define _SC_THREAD_PROCESS_SHARED _SC_THREAD_PROCESS_SHARED - - _SC_NPROCESSORS_CONF, -#define _SC_NPROCESSORS_CONF _SC_NPROCESSORS_CONF - _SC_NPROCESSORS_ONLN, -#define _SC_NPROCESSORS_ONLN _SC_NPROCESSORS_ONLN - _SC_PHYS_PAGES, -#define _SC_PHYS_PAGES _SC_PHYS_PAGES - _SC_AVPHYS_PAGES, -#define _SC_AVPHYS_PAGES _SC_AVPHYS_PAGES - _SC_ATEXIT_MAX, -#define _SC_ATEXIT_MAX _SC_ATEXIT_MAX - _SC_PASS_MAX, -#define _SC_PASS_MAX _SC_PASS_MAX - - _SC_XOPEN_VERSION, -#define _SC_XOPEN_VERSION _SC_XOPEN_VERSION - _SC_XOPEN_XCU_VERSION, -#define _SC_XOPEN_XCU_VERSION _SC_XOPEN_XCU_VERSION - _SC_XOPEN_UNIX, -#define _SC_XOPEN_UNIX _SC_XOPEN_UNIX - _SC_XOPEN_CRYPT, -#define _SC_XOPEN_CRYPT _SC_XOPEN_CRYPT - _SC_XOPEN_ENH_I18N, -#define _SC_XOPEN_ENH_I18N _SC_XOPEN_ENH_I18N - _SC_XOPEN_SHM, -#define _SC_XOPEN_SHM _SC_XOPEN_SHM - - _SC_2_CHAR_TERM, -#define _SC_2_CHAR_TERM _SC_2_CHAR_TERM - _SC_2_C_VERSION, -#define _SC_2_C_VERSION _SC_2_C_VERSION - _SC_2_UPE, -#define _SC_2_UPE _SC_2_UPE - - _SC_XOPEN_XPG2, -#define _SC_XOPEN_XPG2 _SC_XOPEN_XPG2 - _SC_XOPEN_XPG3, -#define _SC_XOPEN_XPG3 _SC_XOPEN_XPG3 - _SC_XOPEN_XPG4, -#define _SC_XOPEN_XPG4 _SC_XOPEN_XPG4 - - _SC_CHAR_BIT, -#define _SC_CHAR_BIT _SC_CHAR_BIT - _SC_CHAR_MAX, -#define _SC_CHAR_MAX _SC_CHAR_MAX - _SC_CHAR_MIN, -#define _SC_CHAR_MIN _SC_CHAR_MIN - _SC_INT_MAX, -#define _SC_INT_MAX _SC_INT_MAX - _SC_INT_MIN, -#define _SC_INT_MIN _SC_INT_MIN - _SC_LONG_BIT, -#define _SC_LONG_BIT _SC_LONG_BIT - _SC_WORD_BIT, -#define _SC_WORD_BIT _SC_WORD_BIT - _SC_MB_LEN_MAX, -#define _SC_MB_LEN_MAX _SC_MB_LEN_MAX - _SC_NZERO, -#define _SC_NZERO _SC_NZERO - _SC_SSIZE_MAX, -#define _SC_SSIZE_MAX _SC_SSIZE_MAX - _SC_SCHAR_MAX, -#define _SC_SCHAR_MAX _SC_SCHAR_MAX - _SC_SCHAR_MIN, -#define _SC_SCHAR_MIN _SC_SCHAR_MIN - _SC_SHRT_MAX, -#define _SC_SHRT_MAX _SC_SHRT_MAX - _SC_SHRT_MIN, -#define _SC_SHRT_MIN _SC_SHRT_MIN - _SC_UCHAR_MAX, -#define _SC_UCHAR_MAX _SC_UCHAR_MAX - _SC_UINT_MAX, -#define _SC_UINT_MAX _SC_UINT_MAX - _SC_ULONG_MAX, -#define _SC_ULONG_MAX _SC_ULONG_MAX - _SC_USHRT_MAX, -#define _SC_USHRT_MAX _SC_USHRT_MAX - - _SC_NL_ARGMAX, -#define _SC_NL_ARGMAX _SC_NL_ARGMAX - _SC_NL_LANGMAX, -#define _SC_NL_LANGMAX _SC_NL_LANGMAX - _SC_NL_MSGMAX, -#define _SC_NL_MSGMAX _SC_NL_MSGMAX - _SC_NL_NMAX, -#define _SC_NL_NMAX _SC_NL_NMAX - _SC_NL_SETMAX, -#define _SC_NL_SETMAX _SC_NL_SETMAX - _SC_NL_TEXTMAX, -#define _SC_NL_TEXTMAX _SC_NL_TEXTMAX - - _SC_XBS5_ILP32_OFF32, -#define _SC_XBS5_ILP32_OFF32 _SC_XBS5_ILP32_OFF32 - _SC_XBS5_ILP32_OFFBIG, -#define _SC_XBS5_ILP32_OFFBIG _SC_XBS5_ILP32_OFFBIG - _SC_XBS5_LP64_OFF64, -#define _SC_XBS5_LP64_OFF64 _SC_XBS5_LP64_OFF64 - _SC_XBS5_LPBIG_OFFBIG, -#define _SC_XBS5_LPBIG_OFFBIG _SC_XBS5_LPBIG_OFFBIG - - _SC_XOPEN_LEGACY, -#define _SC_XOPEN_LEGACY _SC_XOPEN_LEGACY - _SC_XOPEN_REALTIME, -#define _SC_XOPEN_REALTIME _SC_XOPEN_REALTIME - _SC_XOPEN_REALTIME_THREADS, -#define _SC_XOPEN_REALTIME_THREADS _SC_XOPEN_REALTIME_THREADS - - _SC_ADVISORY_INFO, -#define _SC_ADVISORY_INFO _SC_ADVISORY_INFO - _SC_BARRIERS, -#define _SC_BARRIERS _SC_BARRIERS - _SC_BASE, -#define _SC_BASE _SC_BASE - _SC_C_LANG_SUPPORT, -#define _SC_C_LANG_SUPPORT _SC_C_LANG_SUPPORT - _SC_C_LANG_SUPPORT_R, -#define _SC_C_LANG_SUPPORT_R _SC_C_LANG_SUPPORT_R - _SC_CLOCK_SELECTION, -#define _SC_CLOCK_SELECTION _SC_CLOCK_SELECTION - _SC_CPUTIME, -#define _SC_CPUTIME _SC_CPUTIME - _SC_THREAD_CPUTIME, -#define _SC_THREAD_CPUTIME _SC_THREAD_CPUTIME - _SC_DEVICE_IO, -#define _SC_DEVICE_IO _SC_DEVICE_IO - _SC_DEVICE_SPECIFIC, -#define _SC_DEVICE_SPECIFIC _SC_DEVICE_SPECIFIC - _SC_DEVICE_SPECIFIC_R, -#define _SC_DEVICE_SPECIFIC_R _SC_DEVICE_SPECIFIC_R - _SC_FD_MGMT, -#define _SC_FD_MGMT _SC_FD_MGMT - _SC_FIFO, -#define _SC_FIFO _SC_FIFO - _SC_PIPE, -#define _SC_PIPE _SC_PIPE - _SC_FILE_ATTRIBUTES, -#define _SC_FILE_ATTRIBUTES _SC_FILE_ATTRIBUTES - _SC_FILE_LOCKING, -#define _SC_FILE_LOCKING _SC_FILE_LOCKING - _SC_FILE_SYSTEM, -#define _SC_FILE_SYSTEM _SC_FILE_SYSTEM - _SC_MONOTONIC_CLOCK, -#define _SC_MONOTONIC_CLOCK _SC_MONOTONIC_CLOCK - _SC_MULTI_PROCESS, -#define _SC_MULTI_PROCESS _SC_MULTI_PROCESS - _SC_SINGLE_PROCESS, -#define _SC_SINGLE_PROCESS _SC_SINGLE_PROCESS - _SC_NETWORKING, -#define _SC_NETWORKING _SC_NETWORKING - _SC_READER_WRITER_LOCKS, -#define _SC_READER_WRITER_LOCKS _SC_READER_WRITER_LOCKS - _SC_SPIN_LOCKS, -#define _SC_SPIN_LOCKS _SC_SPIN_LOCKS - _SC_REGEXP, -#define _SC_REGEXP _SC_REGEXP - _SC_REGEX_VERSION, -#define _SC_REGEX_VERSION _SC_REGEX_VERSION - _SC_SHELL, -#define _SC_SHELL _SC_SHELL - _SC_SIGNALS, -#define _SC_SIGNALS _SC_SIGNALS - _SC_SPAWN, -#define _SC_SPAWN _SC_SPAWN - _SC_SPORADIC_SERVER, -#define _SC_SPORADIC_SERVER _SC_SPORADIC_SERVER - _SC_THREAD_SPORADIC_SERVER, -#define _SC_THREAD_SPORADIC_SERVER _SC_THREAD_SPORADIC_SERVER - _SC_SYSTEM_DATABASE, -#define _SC_SYSTEM_DATABASE _SC_SYSTEM_DATABASE - _SC_SYSTEM_DATABASE_R, -#define _SC_SYSTEM_DATABASE_R _SC_SYSTEM_DATABASE_R - _SC_TIMEOUTS, -#define _SC_TIMEOUTS _SC_TIMEOUTS - _SC_TYPED_MEMORY_OBJECTS, -#define _SC_TYPED_MEMORY_OBJECTS _SC_TYPED_MEMORY_OBJECTS - _SC_USER_GROUPS, -#define _SC_USER_GROUPS _SC_USER_GROUPS - _SC_USER_GROUPS_R, -#define _SC_USER_GROUPS_R _SC_USER_GROUPS_R - _SC_2_PBS, -#define _SC_2_PBS _SC_2_PBS - _SC_2_PBS_ACCOUNTING, -#define _SC_2_PBS_ACCOUNTING _SC_2_PBS_ACCOUNTING - _SC_2_PBS_LOCATE, -#define _SC_2_PBS_LOCATE _SC_2_PBS_LOCATE - _SC_2_PBS_MESSAGE, -#define _SC_2_PBS_MESSAGE _SC_2_PBS_MESSAGE - _SC_2_PBS_TRACK, -#define _SC_2_PBS_TRACK _SC_2_PBS_TRACK - _SC_SYMLOOP_MAX, -#define _SC_SYMLOOP_MAX _SC_SYMLOOP_MAX - _SC_STREAMS, -#define _SC_STREAMS _SC_STREAMS - _SC_2_PBS_CHECKPOINT, -#define _SC_2_PBS_CHECKPOINT _SC_2_PBS_CHECKPOINT - - _SC_V6_ILP32_OFF32, -#define _SC_V6_ILP32_OFF32 _SC_V6_ILP32_OFF32 - _SC_V6_ILP32_OFFBIG, -#define _SC_V6_ILP32_OFFBIG _SC_V6_ILP32_OFFBIG - _SC_V6_LP64_OFF64, -#define _SC_V6_LP64_OFF64 _SC_V6_LP64_OFF64 - _SC_V6_LPBIG_OFFBIG, -#define _SC_V6_LPBIG_OFFBIG _SC_V6_LPBIG_OFFBIG - - _SC_HOST_NAME_MAX, -#define _SC_HOST_NAME_MAX _SC_HOST_NAME_MAX - _SC_TRACE, -#define _SC_TRACE _SC_TRACE - _SC_TRACE_EVENT_FILTER, -#define _SC_TRACE_EVENT_FILTER _SC_TRACE_EVENT_FILTER - _SC_TRACE_INHERIT, -#define _SC_TRACE_INHERIT _SC_TRACE_INHERIT - _SC_TRACE_LOG -#define _SC_TRACE_LOG _SC_TRACE_LOG - }; - -#if (defined __USE_POSIX2 || defined __USE_UNIX98 \ - || defined __USE_FILE_OFFSET64 || defined __USE_LARGEFILE64 \ - || defined __USE_LARGEFILE) -/* Values for the NAME argument to `confstr'. */ -enum - { - _CS_PATH, /* The default search path. */ -#define _CS_PATH _CS_PATH - -# if (defined __USE_FILE_OFFSET64 || defined __USE_LARGEFILE64 \ - || defined __USE_LARGEFILE) - _CS_LFS_CFLAGS = 1000, -# define _CS_LFS_CFLAGS _CS_LFS_CFLAGS - _CS_LFS_LDFLAGS, -# define _CS_LFS_LDFLAGS _CS_LFS_LDFLAGS - _CS_LFS_LIBS, -# define _CS_LFS_LIBS _CS_LFS_LIBS - _CS_LFS_LINTFLAGS, -# define _CS_LFS_LINTFLAGS _CS_LFS_LINTFLAGS - _CS_LFS64_CFLAGS, -# define _CS_LFS64_CFLAGS _CS_LFS64_CFLAGS - _CS_LFS64_LDFLAGS, -# define _CS_LFS64_LDFLAGS _CS_LFS64_LDFLAGS - _CS_LFS64_LIBS, -# define _CS_LFS64_LIBS _CS_LFS64_LIBS - _CS_LFS64_LINTFLAGS, -# define _CS_LFS64_LINTFLAGS _CS_LFS64_LINTFLAGS -# endif - -# ifdef __USE_UNIX98 - _CS_XBS5_ILP32_OFF32_CFLAGS = 1100, -# define _CS_XBS5_ILP32_OFF32_CFLAGS _CS_XBS5_ILP32_OFF32_CFLAGS - _CS_XBS5_ILP32_OFF32_LDFLAGS, -# define _CS_XBS5_ILP32_OFF32_LDFLAGS _CS_XBS5_ILP32_OFF32_LDFLAGS - _CS_XBS5_ILP32_OFF32_LIBS, -# define _CS_XBS5_ILP32_OFF32_LIBS _CS_XBS5_ILP32_OFF32_LIBS - _CS_XBS5_ILP32_OFF32_LINTFLAGS, -# define _CS_XBS5_ILP32_OFF32_LINTFLAGS _CS_XBS5_ILP32_OFF32_LINTFLAGS - _CS_XBS5_ILP32_OFFBIG_CFLAGS, -# define _CS_XBS5_ILP32_OFFBIG_CFLAGS _CS_XBS5_ILP32_OFFBIG_CFLAGS - _CS_XBS5_ILP32_OFFBIG_LDFLAGS, -# define _CS_XBS5_ILP32_OFFBIG_LDFLAGS _CS_XBS5_ILP32_OFFBIG_LDFLAGS - _CS_XBS5_ILP32_OFFBIG_LIBS, -# define _CS_XBS5_ILP32_OFFBIG_LIBS _CS_XBS5_ILP32_OFFBIG_LIBS - _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, -# define _CS_XBS5_ILP32_OFFBIG_LINTFLAGS _CS_XBS5_ILP32_OFFBIG_LINTFLAGS - _CS_XBS5_LP64_OFF64_CFLAGS, -# define _CS_XBS5_LP64_OFF64_CFLAGS _CS_XBS5_LP64_OFF64_CFLAGS - _CS_XBS5_LP64_OFF64_LDFLAGS, -# define _CS_XBS5_LP64_OFF64_LDFLAGS _CS_XBS5_LP64_OFF64_LDFLAGS - _CS_XBS5_LP64_OFF64_LIBS, -# define _CS_XBS5_LP64_OFF64_LIBS _CS_XBS5_LP64_OFF64_LIBS - _CS_XBS5_LP64_OFF64_LINTFLAGS, -# define _CS_XBS5_LP64_OFF64_LINTFLAGS _CS_XBS5_LP64_OFF64_LINTFLAGS - _CS_XBS5_LPBIG_OFFBIG_CFLAGS, -# define _CS_XBS5_LPBIG_OFFBIG_CFLAGS _CS_XBS5_LPBIG_OFFBIG_CFLAGS - _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, -# define _CS_XBS5_LPBIG_OFFBIG_LDFLAGS _CS_XBS5_LPBIG_OFFBIG_LDFLAGS - _CS_XBS5_LPBIG_OFFBIG_LIBS, -# define _CS_XBS5_LPBIG_OFFBIG_LIBS _CS_XBS5_LPBIG_OFFBIG_LIBS - _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, -# define _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS -# endif -# ifdef __USE_XOPEN2K - _CS_POSIX_V6_ILP32_OFF32_CFLAGS, -# define _CS_POSIX_V6_ILP32_OFF32_CFLAGS _CS_POSIX_V6_ILP32_OFF32_CFLAGS - _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, -# define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS _CS_POSIX_V6_ILP32_OFF32_LDFLAGS - _CS_POSIX_V6_ILP32_OFF32_LIBS, -# define _CS_POSIX_V6_ILP32_OFF32_LIBS _CS_POSIX_V6_ILP32_OFF32_LIBS - _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, -# define _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS - _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, -# define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS - _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, -# define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS - _CS_POSIX_V6_ILP32_OFFBIG_LIBS, -# define _CS_POSIX_V6_ILP32_OFFBIG_LIBS _CS_POSIX_V6_ILP32_OFFBIG_LIBS - _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, -# define _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS - _CS_POSIX_V6_LP64_OFF64_CFLAGS, -# define _CS_POSIX_V6_LP64_OFF64_CFLAGS _CS_POSIX_V6_LP64_OFF64_CFLAGS - _CS_POSIX_V6_LP64_OFF64_LDFLAGS, -# define _CS_POSIX_V6_LP64_OFF64_LDFLAGS _CS_POSIX_V6_LP64_OFF64_LDFLAGS - _CS_POSIX_V6_LP64_OFF64_LIBS, -# define _CS_POSIX_V6_LP64_OFF64_LIBS _CS_POSIX_V6_LP64_OFF64_LIBS - _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, -# define _CS_POSIX_V6_LP64_OFF64_LINTFLAGS _CS_POSIX_V6_LP64_OFF64_LINTFLAGS - _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, -# define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS - _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, -# define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS - _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, -# define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS _CS_POSIX_V6_LPBIG_OFFBIG_LIBS - _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS, -# define _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS -# endif - - _CS_V6_WIDTH_RESTRICTED_ENVS -# define _CS_V6_WIDTH_RESTRICTED_ENVS _CS_V6_WIDTH_RESTRICTED_ENVS - }; -#endif diff --git a/libc/sysdeps/linux/m68k/bits/dlfcn.h b/libc/sysdeps/linux/m68k/bits/dlfcn.h deleted file mode 100644 index 2525fa3d9..000000000 --- a/libc/sysdeps/linux/m68k/bits/dlfcn.h +++ /dev/null @@ -1,59 +0,0 @@ -/* System dependent definitions for run-time dynamic loading. - 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. */ - -#ifndef _DLFCN_H -# error "Never use <bits/dlfcn.h> directly; include <dlfcn.h> instead." -#endif - -/* The MODE argument to `dlopen' contains one of the following: */ -#define RTLD_LAZY 0x00001 /* Lazy function call binding. */ -#define RTLD_NOW 0x00002 /* Immediate function call binding. */ -#define RTLD_BINDING_MASK 0x3 /* Mask of binding time value. */ -#define RTLD_NOLOAD 0x00004 /* Do not load the object. */ - -/* If the following bit is set in the MODE argument to `dlopen', - the symbols of the loaded object and its dependencies are made - visible as if the object were linked directly into the program. */ -#define RTLD_GLOBAL 0x00100 - -/* Unix98 demands the following flag which is the inverse to RTLD_GLOBAL. - The implementation does this by default and so we can define the - value to zero. */ -#define RTLD_LOCAL 0 - -/* Do not delete object when closed. */ -#define RTLD_NODELETE 0x01000 - -#ifdef __USE_GNU -/* To support profiling of shared objects it is a good idea to call - the function found using `dlsym' using the following macro since - these calls do not use the PLT. But this would mean the dynamic - loader has no chance to find out when the function is called. The - macro applies the necessary magic so that profiling is possible. - Rewrite - foo = (*fctp) (arg1, arg2); - into - foo = DL_CALL_FCT (fctp, (arg1, arg2)); -*/ -# define DL_CALL_FCT(fctp, args) \ - (_dl_mcount_wrapper_check (fctp), (*(fctp)) args) - -/* This function calls the profiling functions. */ -extern void _dl_mcount_wrapper_check (void *__selfpc) __THROW; -#endif diff --git a/libc/sysdeps/linux/m68k/bits/elfclass.h b/libc/sysdeps/linux/m68k/bits/elfclass.h deleted file mode 100644 index 180227d9e..000000000 --- a/libc/sysdeps/linux/m68k/bits/elfclass.h +++ /dev/null @@ -1,14 +0,0 @@ -/* This file specifies the native word size of the machine, which indicates - the ELF file class used for executables and shared objects on this - machine. */ - -#ifndef _LINK_H -# error "Never use <bits/elfclass.h> directly; include <link.h> instead." -#endif - -#include <bits/wordsize.h> - -#define __ELF_NATIVE_CLASS __WORDSIZE - -/* The entries in the .hash table always have a size of 32 bits. */ -typedef uint32_t Elf_Symndx; diff --git a/libc/sysdeps/linux/m68k/bits/environments.h b/libc/sysdeps/linux/m68k/bits/environments.h deleted file mode 100644 index c3829927b..000000000 --- a/libc/sysdeps/linux/m68k/bits/environments.h +++ /dev/null @@ -1,75 +0,0 @@ -/* Copyright (C) 1999, 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. */ - -#ifndef _UNISTD_H -# error "Never include this file directly. Use <unistd.h> instead" -#endif - -#include <bits/wordsize.h> - -/* This header should define the following symbols under the described - situations. A value `1' means that the model is always supported, - `-1' means it is never supported. Undefined means it cannot be - statically decided. - - _POSIX_V6_ILP32_OFF32 32bit int, long, pointers, and off_t type - _POSIX_V6_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type - - _POSIX_V6_LP64_OFF32 64bit long and pointers and 32bit off_t type - _POSIX_V6_LPBIG_OFFBIG 64bit long and pointers and large off_t type - - The macros _XBS5_ILP32_OFF32, _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and - _XBS5_LPBIG_OFFBIG were used in previous versions of the Unix standard - and are available only for compatibility. -*/ - -#if __WORDSIZE == 64 - -/* We can never provide environments with 32-bit wide pointers. */ -# define _POSIX_V6_ILP32_OFF32 -1 -# define _POSIX_V6_ILP32_OFFBIG -1 -# define _XBS5_ILP32_OFF32 -1 -# define _XBS5_ILP32_OFFBIG -1 -/* We also have no use (for now) for an environment with bigger pointers - and offsets. */ -# define _POSIX_V6_LPBIG_OFFBIG -1 -# define _XBS5_LPBIG_OFFBIG -1 - -/* By default we have 64-bit wide `long int', pointers and `off_t'. */ -# define _POSIX_V6_LP64_OFF64 1 -# define _XBS5_LP64_OFF64 1 - -#else /* __WORDSIZE == 32 */ - -/* By default we have 32-bit wide `int', `long int', pointers and `off_t' - and all platforms support LFS. */ -# define _POSIX_V6_ILP32_OFF32 1 -# define _POSIX_V6_ILP32_OFFBIG 1 -# define _XBS5_ILP32_OFF32 1 -# define _XBS5_ILP32_OFFBIG 1 - -/* We optionally provide an environment with the above size but an 64-bit - side `off_t'. Therefore we don't define _XBS5_ILP32_OFFBIG. */ - -/* We can never provide environments with 64-bit wide pointers. */ -# define _POSIX_V6_LP64_OFF64 -1 -# define _POSIX_V6_LPBIG_OFFBIG -1 -# define _XBS5_LP64_OFF64 -1 -# define _XBS5_LPBIG_OFFBIG -1 - -#endif /* __WORDSIZE == 32 */ diff --git a/libc/sysdeps/linux/m68k/bits/errno.h b/libc/sysdeps/linux/m68k/bits/errno.h deleted file mode 100644 index ac59d4c9d..000000000 --- a/libc/sysdeps/linux/m68k/bits/errno.h +++ /dev/null @@ -1,60 +0,0 @@ -/* Error constants. Linux specific version. - Copyright (C) 1996, 1997, 1998, 1999 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. */ - -#ifdef _ERRNO_H - -# undef EDOM -# undef EILSEQ -# undef ERANGE -# include <linux/errno.h> - -/* Linux has no ENOTSUP error code. */ -# define ENOTSUP EOPNOTSUPP - -/* Linux also has no ECANCELED error code. Since it is not used here - we define it to an invalid value. */ -# define ECANCELED 125 - -# ifndef __ASSEMBLER__ -/* We now need a declaration of the `errno' variable. */ -extern int errno; - -/* Function to get address of global `errno' variable. */ -extern int *__errno_location (void) __THROW __attribute__ ((__const__)); - -# if defined _LIBC -/* We wouldn't need a special macro anymore but it is history. */ -# define __set_errno(val) (*__errno_location ()) = (val) -# endif /* _LIBC */ - -# if !defined _LIBC || defined _LIBC_REENTRANT -/* When using threads, errno is a per-thread value. */ -# define errno (*__errno_location ()) -# endif -# endif /* !__ASSEMBLER__ */ -#endif /* _ERRNO_H */ - -#if !defined _ERRNO_H && defined __need_Emath -/* This is ugly but the kernel header is not clean enough. We must - define only the values EDOM, EILSEQ and ERANGE in case __need_Emath is - defined. */ -# define EDOM 33 /* Math argument out of domain of function. */ -# define EILSEQ 84 /* Illegal byte sequence. */ -# define ERANGE 34 /* Math result not representable. */ -#endif /* !_ERRNO_H && __need_Emath */ diff --git a/libc/sysdeps/linux/m68k/bits/fenvinline.h b/libc/sysdeps/linux/m68k/bits/fenvinline.h deleted file mode 100644 index 42f77b561..000000000 --- a/libc/sysdeps/linux/m68k/bits/fenvinline.h +++ /dev/null @@ -1,8 +0,0 @@ -/* This file provides inline versions of floating-pint environment - handling functions. If there were any. */ - -#ifndef __NO_MATH_INLINES - -/* Here is where the code would go. */ - -#endif diff --git a/libc/sysdeps/linux/m68k/bits/in.h b/libc/sysdeps/linux/m68k/bits/in.h deleted file mode 100644 index e6cf57574..000000000 --- a/libc/sysdeps/linux/m68k/bits/in.h +++ /dev/null @@ -1,141 +0,0 @@ -/* Copyright (C) 1991-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. */ - -/* Linux version. */ - -#ifndef _NETINET_IN_H -# error "Never use <bits/in.h> directly; include <netinet/in.h> instead." -#endif - -/* Options for use with `getsockopt' and `setsockopt' at the IP level. - The first word in the comment at the right is the data type used; - "bool" means a boolean value stored in an `int'. */ -#define IP_TOS 1 /* int; IP type of service and precedence. */ -#define IP_TTL 2 /* int; IP time to live. */ -#define IP_HDRINCL 3 /* int; Header is included with data. */ -#define IP_OPTIONS 4 /* ip_opts; IP per-packet options. */ -#define IP_ROUTER_ALERT 5 /* bool */ -#define IP_RECVOPTS 6 /* bool */ -#define IP_RETOPTS 7 /* bool */ -#define IP_PKTINFO 8 /* bool */ -#define IP_PKTOPTIONS 9 -#define IP_PMTUDISC 10 /* obsolete name? */ -#define IP_MTU_DISCOVER 10 /* int; see below */ -#define IP_RECVERR 11 /* bool */ -#define IP_RECVTTL 12 /* bool */ -#define IP_RECVTOS 13 /* bool */ -#define IP_MULTICAST_IF 32 /* in_addr; set/get IP multicast i/f */ -#define IP_MULTICAST_TTL 33 /* u_char; set/get IP multicast ttl */ -#define IP_MULTICAST_LOOP 34 /* i_char; set/get IP multicast loopback */ -#define IP_ADD_MEMBERSHIP 35 /* ip_mreq; add an IP group membership */ -#define IP_DROP_MEMBERSHIP 36 /* ip_mreq; drop an IP group membership */ - -/* For BSD compatibility. */ -#define IP_RECVRETOPTS IP_RETOPTS - -/* IP_MTU_DISCOVER arguments. */ -#define IP_PMTUDISC_DONT 0 /* Never send DF frames. */ -#define IP_PMTUDISC_WANT 1 /* Use per route hints. */ -#define IP_PMTUDISC_DO 2 /* Always DF. */ - -/* To select the IP level. */ -#define SOL_IP 0 - -#define IP_DEFAULT_MULTICAST_TTL 1 -#define IP_DEFAULT_MULTICAST_LOOP 1 -#define IP_MAX_MEMBERSHIPS 20 - -/* Structure used to describe IP options for IP_OPTIONS. The `ip_dst' - field is used for the first-hop gateway when using a source route - (this gets put into the header proper). */ -struct ip_opts - { - struct in_addr ip_dst; /* First hop; zero without source route. */ - char ip_opts[40]; /* Actually variable in size. */ - }; - -/* Structure used for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP. */ -struct ip_mreq - { - struct in_addr imr_multiaddr; /* IP multicast address of group */ - struct in_addr imr_interface; /* local IP address of interface */ - }; - -/* As above but including interface specification by index. */ -struct ip_mreqn - { - struct in_addr imr_multiaddr; /* IP multicast address of group */ - struct in_addr imr_address; /* local IP address of interface */ - int imr_ifindex; /* Interface index */ - }; - -/* Structure used for IP_PKTINFO. */ -struct in_pktinfo - { - int ipi_ifindex; /* Interface index */ - struct in_addr ipi_spec_dst; /* Routing destination address */ - struct in_addr ipi_addr; /* Header destination address */ - }; - -/* Options for use with `getsockopt' and `setsockopt' at the IPv6 level. - The first word in the comment at the right is the data type used; - "bool" means a boolean value stored in an `int'. */ -#define IPV6_ADDRFORM 1 -#define IPV6_PKTINFO 2 -#define IPV6_HOPOPTS 3 -#define IPV6_DSTOPTS 4 -#define IPV6_RTHDR 5 -#define IPV6_PKTOPTIONS 6 -#define IPV6_CHECKSUM 7 -#define IPV6_HOPLIMIT 8 -#define IPV6_NEXTHOP 9 -#define IPV6_AUTHHDR 10 -#define IPV6_UNICAST_HOPS 16 -#define IPV6_MULTICAST_IF 17 -#define IPV6_MULTICAST_HOPS 18 -#define IPV6_MULTICAST_LOOP 19 -#define IPV6_JOIN_GROUP 20 -#define IPV6_LEAVE_GROUP 21 -#define IPV6_ROUTER_ALERT 22 -#define IPV6_MTU_DISCOVER 23 -#define IPV6_MTU 24 -#define IPV6_RECVERR 25 - -#define SCM_SRCRT IPV6_RXSRCRT - -/* Obsolete synonyms for the above. */ -#define IPV6_RXHOPOPTS IPV6_HOPOPTS -#define IPV6_RXDSTOPTS IPV6_DSTOPTS -#define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP -#define IPV6_DROP_MEMBERSHIP IPV6_LEAVE_GROUP - - -/* IPV6_MTU_DISCOVER values. */ -#define IPV6_PMTUDISC_DONT 0 /* Never send DF frames. */ -#define IPV6_PMTUDISC_WANT 1 /* Use per route hints. */ -#define IPV6_PMTUDISC_DO 2 /* Always DF. */ - -/* Socket level values for IPv6. */ -#define SOL_IPV6 41 -#define SOL_ICMPV6 58 - -/* Routing header options for IPv6. */ -#define IPV6_RTHDR_LOOSE 0 /* Hop doesn't need to be neighbour. */ -#define IPV6_RTHDR_STRICT 1 /* Hop must be a neighbour. */ - -#define IPV6_RTHDR_TYPE_0 0 /* IPv6 Routing header type 0. */ diff --git a/libc/sysdeps/linux/m68k/bits/initspin.h b/libc/sysdeps/linux/m68k/bits/initspin.h deleted file mode 100644 index af19d44e6..000000000 --- a/libc/sysdeps/linux/m68k/bits/initspin.h +++ /dev/null @@ -1,28 +0,0 @@ -/* Generic definitions for spinlock initializers. - Copyright (C) 2000, 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* Initial value of a spinlock. Most platforms should use zero, - unless they only implement a "test and clear" operation instead of - the usual "test and set". */ -#define __LT_SPINLOCK_INIT 0 - -/* Macros for lock initializers, using the above definition. */ -#define __LOCK_INITIALIZER { 0, __LT_SPINLOCK_INIT } -#define __ALT_LOCK_INITIALIZER { 0, __LT_SPINLOCK_INIT } -#define __ATOMIC_INITIALIZER { 0, __LT_SPINLOCK_INIT } diff --git a/libc/sysdeps/linux/m68k/bits/ioctl-types.h b/libc/sysdeps/linux/m68k/bits/ioctl-types.h deleted file mode 100644 index e856a04b4..000000000 --- a/libc/sysdeps/linux/m68k/bits/ioctl-types.h +++ /dev/null @@ -1,78 +0,0 @@ -/* Structure types for pre-termios terminal ioctls. Linux version. - Copyright (C) 1996, 1997, 1999, 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. */ - -#ifndef _SYS_IOCTL_H -# error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead." -#endif - -/* Get definition of constants for use with `ioctl'. */ -#include <asm/ioctls.h> - - -struct winsize - { - unsigned short int ws_row; - unsigned short int ws_col; - unsigned short int ws_xpixel; - unsigned short int ws_ypixel; - }; - -#define NCC 8 -struct termio - { - unsigned short int c_iflag; /* input mode flags */ - unsigned short int c_oflag; /* output mode flags */ - unsigned short int c_cflag; /* control mode flags */ - unsigned short int c_lflag; /* local mode flags */ - unsigned char c_line; /* line discipline */ - unsigned char c_cc[NCC]; /* control characters */ -}; - -/* modem lines */ -#define TIOCM_LE 0x001 -#define TIOCM_DTR 0x002 -#define TIOCM_RTS 0x004 -#define TIOCM_ST 0x008 -#define TIOCM_SR 0x010 -#define TIOCM_CTS 0x020 -#define TIOCM_CAR 0x040 -#define TIOCM_RNG 0x080 -#define TIOCM_DSR 0x100 -#define TIOCM_CD TIOCM_CAR -#define TIOCM_RI TIOCM_RNG - -/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ - -/* line disciplines */ -#define N_TTY 0 -#define N_SLIP 1 -#define N_MOUSE 2 -#define N_PPP 3 -#define N_STRIP 4 -#define N_AX25 5 -#define N_X25 6 /* X.25 async */ -#define N_6PACK 7 -#define N_MASC 8 /* Mobitex module */ -#define N_R3964 9 /* Simatic R3964 module */ -#define N_PROFIBUS_FDL 10 /* Profibus */ -#define N_IRDA 11 /* Linux IR */ -#define N_SMSBLOCK 12 /* SMS block mode */ -#define N_HDLC 13 /* synchronous HDLC */ -#define N_SYNC_PPP 14 /* synchronous PPP */ -#define N_HCI 15 /* Bluetooth HCI UART */ diff --git a/libc/sysdeps/linux/m68k/bits/ioctls.h b/libc/sysdeps/linux/m68k/bits/ioctls.h deleted file mode 100644 index b49ca2076..000000000 --- a/libc/sysdeps/linux/m68k/bits/ioctls.h +++ /dev/null @@ -1,108 +0,0 @@ -/* Copyright (C) 1996, 1997, 1998 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 _SYS_IOCTL_H -# error "Never use <bits/ioctls.h> directly; include <sys/ioctl.h> instead." -#endif - -/* Use the definitions from the kernel header files. */ -#include <asm/ioctls.h> - -/* Routing table calls. */ -#define SIOCADDRT 0x890B /* add routing table entry */ -#define SIOCDELRT 0x890C /* delete routing table entry */ -#define SIOCRTMSG 0x890D /* call to routing system */ - -/* Socket configuration controls. */ -#define SIOCGIFNAME 0x8910 /* get iface name */ -#define SIOCSIFLINK 0x8911 /* set iface channel */ -#define SIOCGIFCONF 0x8912 /* get iface list */ -#define SIOCGIFFLAGS 0x8913 /* get flags */ -#define SIOCSIFFLAGS 0x8914 /* set flags */ -#define SIOCGIFADDR 0x8915 /* get PA address */ -#define SIOCSIFADDR 0x8916 /* set PA address */ -#define SIOCGIFDSTADDR 0x8917 /* get remote PA address */ -#define SIOCSIFDSTADDR 0x8918 /* set remote PA address */ -#define SIOCGIFBRDADDR 0x8919 /* get broadcast PA address */ -#define SIOCSIFBRDADDR 0x891a /* set broadcast PA address */ -#define SIOCGIFNETMASK 0x891b /* get network PA mask */ -#define SIOCSIFNETMASK 0x891c /* set network PA mask */ -#define SIOCGIFMETRIC 0x891d /* get metric */ -#define SIOCSIFMETRIC 0x891e /* set metric */ -#define SIOCGIFMEM 0x891f /* get memory address (BSD) */ -#define SIOCSIFMEM 0x8920 /* set memory address (BSD) */ -#define SIOCGIFMTU 0x8921 /* get MTU size */ -#define SIOCSIFMTU 0x8922 /* set MTU size */ -#define SIOCSIFHWADDR 0x8924 /* set hardware address */ -#define SIOCGIFENCAP 0x8925 /* get/set encapsulations */ -#define SIOCSIFENCAP 0x8926 -#define SIOCGIFHWADDR 0x8927 /* Get hardware address */ -#define SIOCGIFSLAVE 0x8929 /* Driver slaving support */ -#define SIOCSIFSLAVE 0x8930 -#define SIOCADDMULTI 0x8931 /* Multicast address lists */ -#define SIOCDELMULTI 0x8932 -#define SIOCGIFINDEX 0x8933 /* name -> if_index mapping */ -#define SIOGIFINDEX SIOCGIFINDEX /* misprint compatibility :-) */ -#define SIOCSIFPFLAGS 0x8934 /* set/get extended flags set */ -#define SIOCGIFPFLAGS 0x8935 -#define SIOCDIFADDR 0x8936 /* delete PA address */ -#define SIOCSIFHWBROADCAST 0x8937 /* set hardware broadcast addr */ -#define SIOCGIFCOUNT 0x8938 /* get number of devices */ - -#define SIOCGIFBR 0x8940 /* Bridging support */ -#define SIOCSIFBR 0x8941 /* Set bridging options */ - -#define SIOCGIFTXQLEN 0x8942 /* Get the tx queue length */ -#define SIOCSIFTXQLEN 0x8943 /* Set the tx queue length */ - - -/* ARP cache control calls. */ - /* 0x8950 - 0x8952 * obsolete calls, don't re-use */ -#define SIOCDARP 0x8953 /* delete ARP table entry */ -#define SIOCGARP 0x8954 /* get ARP table entry */ -#define SIOCSARP 0x8955 /* set ARP table entry */ - -/* RARP cache control calls. */ -#define SIOCDRARP 0x8960 /* delete RARP table entry */ -#define SIOCGRARP 0x8961 /* get RARP table entry */ -#define SIOCSRARP 0x8962 /* set RARP table entry */ - -/* Driver configuration calls */ - -#define SIOCGIFMAP 0x8970 /* Get device parameters */ -#define SIOCSIFMAP 0x8971 /* Set device parameters */ - -/* DLCI configuration calls */ - -#define SIOCADDDLCI 0x8980 /* Create new DLCI device */ -#define SIOCDELDLCI 0x8981 /* Delete DLCI device */ - -/* Device private ioctl calls. */ - -/* These 16 ioctls are available to devices via the do_ioctl() device - vector. Each device should include this file and redefine these - names as their own. Because these are device dependent it is a good - idea _NOT_ to issue them to random objects and hope. */ - -#define SIOCDEVPRIVATE 0x89F0 /* to 89FF */ - -/* - * These 16 ioctl calls are protocol private - */ - -#define SIOCPROTOPRIVATE 0x89E0 /* to 89EF */ diff --git a/libc/sysdeps/linux/m68k/bits/ipc.h b/libc/sysdeps/linux/m68k/bits/ipc.h deleted file mode 100644 index f1a043fe5..000000000 --- a/libc/sysdeps/linux/m68k/bits/ipc.h +++ /dev/null @@ -1,56 +0,0 @@ -/* Copyright (C) 1995-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 _SYS_IPC_H -# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead." -#endif - -#include <bits/types.h> - -/* Mode bits for `msgget', `semget', and `shmget'. */ -#define IPC_CREAT 01000 /* Create key if key does not exist. */ -#define IPC_EXCL 02000 /* Fail if key exists. */ -#define IPC_NOWAIT 04000 /* Return error on wait. */ - -/* Control commands for `msgctl', `semctl', and `shmctl'. */ -#define IPC_RMID 0 /* Remove identifier. */ -#define IPC_SET 1 /* Set `ipc_perm' options. */ -#define IPC_STAT 2 /* Get `ipc_perm' options. */ -#ifdef __USE_GNU -# define IPC_INFO 3 /* See ipcs. */ -#endif - -/* Special key values. */ -#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ - - -/* Data structure used to pass permission information to IPC operations. */ -struct ipc_perm - { - __key_t __key; /* Key. */ - __uid_t uid; /* Owner's user ID. */ - __gid_t gid; /* Owner's group ID. */ - __uid_t cuid; /* Creator's user ID. */ - __gid_t cgid; /* Creator's group ID. */ - unsigned short int mode; /* Read/write permission. */ - unsigned short int __pad1; - unsigned short int __seq; /* Sequence number. */ - unsigned short int __pad2; - unsigned long int __unused1; - unsigned long int __unused2; - }; diff --git a/libc/sysdeps/linux/m68k/bits/local_lim.h b/libc/sysdeps/linux/m68k/bits/local_lim.h deleted file mode 100644 index 0a7c83706..000000000 --- a/libc/sysdeps/linux/m68k/bits/local_lim.h +++ /dev/null @@ -1,77 +0,0 @@ -/* Minimum guaranteed maximum values for system limits. Linux version. - Copyright (C) 1993, 94, 95, 96, 97, 98, 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* The kernel header pollutes the namespace with the NR_OPEN symbol - and defines LINK_MAX although filesystems have different maxima. A - similar thing is true for OPEN_MAX: the limit can be changed at - runtime and therefore the macro must not be defined. Remove this - after including the header if necessary. */ -#ifndef NR_OPEN -# define __undef_NR_OPEN -#endif -#ifndef LINK_MAX -# define __undef_LINK_MAX -#endif -#ifndef OPEN_MAX -# define __undef_OPEN_MAX -#endif - -/* The kernel sources contain a file with all the needed information. */ -#include <linux/limits.h> - -/* Have to remove NR_OPEN? */ -#ifdef __undef_NR_OPEN -# undef NR_OPEN -# undef __undef_NR_OPEN -#endif -/* Have to remove LINK_MAX? */ -#ifdef __undef_LINK_MAX -# undef LINK_MAX -# undef __undef_LINK_MAX -#endif -/* Have to remove OPEN_MAX? */ -#ifdef __undef_OPEN_MAX -# undef OPEN_MAX -# undef __undef_OPEN_MAX -#endif - -/* The number of data keys per process. */ -#define _POSIX_THREAD_KEYS_MAX 128 -/* This is the value this implementation supports. */ -#define PTHREAD_KEYS_MAX 1024 - -/* Controlling the iterations of destructors for thread-specific data. */ -#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 -/* Number of iterations this implementation does. */ -#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS - -/* The number of threads per process. */ -#define _POSIX_THREAD_THREADS_MAX 64 -/* This is the value this implementation supports. */ -#define PTHREAD_THREADS_MAX 1024 - -/* Maximum amount by which a process can descrease its asynchronous I/O - priority level. */ -#define AIO_PRIO_DELTA_MAX 20 - -/* Minimum size for a thread. We are free to choose a reasonable value. */ -#define PTHREAD_STACK_MIN 16384 - -/* Maximum number of POSIX timers available. */ -#define TIMER_MAX 256 diff --git a/libc/sysdeps/linux/m68k/bits/locale.h b/libc/sysdeps/linux/m68k/bits/locale.h deleted file mode 100644 index 50064b53e..000000000 --- a/libc/sysdeps/linux/m68k/bits/locale.h +++ /dev/null @@ -1,44 +0,0 @@ -/* Definition of locale category symbol values. - Copyright (C) 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. */ - -#if !defined _LOCALE_H && !defined _LANGINFO_H -# error "Never use <bits/locale.h> directly; include <locale.h> instead." -#endif - -#ifndef _BITS_LOCALE_H -#define _BITS_LOCALE_H 1 - -enum -{ - __LC_CTYPE = 0, - __LC_NUMERIC = 1, - __LC_TIME = 2, - __LC_COLLATE = 3, - __LC_MONETARY = 4, - __LC_MESSAGES = 5, - __LC_ALL = 6, - __LC_PAPER = 7, - __LC_NAME = 8, - __LC_ADDRESS = 9, - __LC_TELEPHONE = 10, - __LC_MEASUREMENT = 11, - __LC_IDENTIFICATION = 12 -}; - -#endif /* bits/locale.h */ diff --git a/libc/sysdeps/linux/m68k/bits/mathcalls.h b/libc/sysdeps/linux/m68k/bits/mathcalls.h deleted file mode 100644 index c1181f737..000000000 --- a/libc/sysdeps/linux/m68k/bits/mathcalls.h +++ /dev/null @@ -1,333 +0,0 @@ -/* Prototype declarations for math functions; helper file for <math.h>. - Copyright (C) 1996,1997,1998,1999,2000,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 <math.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,[_r], (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,[_r], (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. - - Note that there must be no whitespace before the argument passed for - NAME, to make token pasting work with -traditional. */ - -#ifndef _MATH_H - #error "Never include <bits/mathcalls.h> directly; include <math.h> instead." -#endif - - -/* Trigonometric functions. */ - -/* Arc cosine of X. */ -__MATHCALL (acos,, (_Mdouble_ __x)); -/* Arc sine of X. */ -__MATHCALL (asin,, (_Mdouble_ __x)); -/* Arc tangent of X. */ -__MATHCALL (atan,, (_Mdouble_ __x)); -/* Arc tangent of Y/X. */ -__MATHCALL (atan2,, (_Mdouble_ __y, _Mdouble_ __x)); - -/* Cosine of X. */ -__MATHCALL (cos,, (_Mdouble_ __x)); -/* Sine of X. */ -__MATHCALL (sin,, (_Mdouble_ __x)); -/* Tangent of X. */ -__MATHCALL (tan,, (_Mdouble_ __x)); - -#ifdef __USE_GNU -/* Cosine and sine of X. */ -__MATHDECL (void,sincos,, - (_Mdouble_ __x, _Mdouble_ *__sinx, _Mdouble_ *__cosx)); -#endif - -/* Hyperbolic functions. */ - -/* Hyperbolic cosine of X. */ -__MATHCALL (cosh,, (_Mdouble_ __x)); -/* Hyperbolic sine of X. */ -__MATHCALL (sinh,, (_Mdouble_ __x)); -/* Hyperbolic tangent of X. */ -__MATHCALL (tanh,, (_Mdouble_ __x)); - -#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 -/* Hyperbolic arc cosine of X. */ -__MATHCALL (acosh,, (_Mdouble_ __x)); -/* Hyperbolic arc sine of X. */ -__MATHCALL (asinh,, (_Mdouble_ __x)); -/* Hyperbolic arc tangent of X. */ -__MATHCALL (atanh,, (_Mdouble_ __x)); -#endif - -/* Exponential and logarithmic functions. */ - -/* Exponential function of X. */ -__MATHCALL (exp,, (_Mdouble_ __x)); - -#ifdef __USE_GNU -/* A function missing in all standards: compute exponent to base ten. */ -__MATHCALL (exp10,, (_Mdouble_ __x)); -/* Another name occasionally used. */ -__MATHCALL (pow10,, (_Mdouble_ __x)); -#endif - -/* Break VALUE into a normalized fraction and an integral power of 2. */ -__MATHCALL (frexp,, (_Mdouble_ __x, int *__exponent)); - -/* X times (two to the EXP power). */ -__MATHCALL (ldexp,, (_Mdouble_ __x, int __exponent)); - -/* Natural logarithm of X. */ -__MATHCALL (log,, (_Mdouble_ __x)); - -/* Base-ten logarithm of X. */ -__MATHCALL (log10,, (_Mdouble_ __x)); - -/* Break VALUE into integral and fractional parts. */ -__MATHCALL (modf,, (_Mdouble_ __x, _Mdouble_ *__iptr)); - -#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 -/* Return exp(X) - 1. */ -__MATHCALL (expm1,, (_Mdouble_ __x)); - -/* Return log(1 + X). */ -__MATHCALL (log1p,, (_Mdouble_ __x)); - -/* Return the base 2 signed integral exponent of X. */ -__MATHCALL (logb,, (_Mdouble_ __x)); -#endif - -#ifdef __USE_ISOC99 -/* Compute base-2 exponential of X. */ -__MATHCALL (exp2,, (_Mdouble_ __x)); - -/* Compute base-2 logarithm of X. */ -__MATHCALL (log2,, (_Mdouble_ __x)); -#endif - - -/* Power functions. */ - -/* Return X to the Y power. */ -__MATHCALL (pow,, (_Mdouble_ __x, _Mdouble_ __y)); - -/* Return the square root of X. */ -__MATHCALL (sqrt,, (_Mdouble_ __x)); - -#if defined __USE_MISC || defined __USE_XOPEN || defined __USE_ISOC99 -/* Return `sqrt(X*X + Y*Y)'. */ -__MATHCALL (hypot,, (_Mdouble_ __x, _Mdouble_ __y)); -#endif - -#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 -/* Return the cube root of X. */ -__MATHCALL (cbrt,, (_Mdouble_ __x)); -#endif - - -/* Nearest integer, absolute value, and remainder functions. */ - -/* Smallest integral value not less than X. */ -__MATHCALL (ceil,, (_Mdouble_ __x)); - -/* Absolute value of X. */ -__MATHCALLX (fabs,, (_Mdouble_ __x), (__const__)); - -/* Largest integer not greater than X. */ -__MATHCALL (floor,, (_Mdouble_ __x)); - -/* Floating-point modulo remainder of X/Y. */ -__MATHCALL (fmod,, (_Mdouble_ __x, _Mdouble_ __y)); - - -/* Return 0 if VALUE is finite or NaN, +1 if it - is +Infinity, -1 if it is -Infinity. */ -__MATHDECL_1 (int,__isinf,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -/* Return nonzero if VALUE is finite and not NaN. */ -__MATHDECL_1 (int,__finite,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -#ifdef __USE_MISC -/* Return 0 if VALUE is finite or NaN, +1 if it - is +Infinity, -1 if it is -Infinity. */ -__MATHDECL_1 (int,isinf,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -/* Return nonzero if VALUE is finite and not NaN. */ -__MATHDECL_1 (int,finite,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -/* Return the remainder of X/Y. */ -__MATHCALL (drem,, (_Mdouble_ __x, _Mdouble_ __y)); - - -/* Return the fractional part of X after dividing out `ilogb (X)'. */ -__MATHCALL (significand,, (_Mdouble_ __x)); -#endif /* Use misc. */ - -#if defined __USE_MISC || defined __USE_ISOC99 -/* Return X with its signed changed to Y's. */ -__MATHCALLX (copysign,, (_Mdouble_ __x, _Mdouble_ __y), (__const__)); -#endif - -#ifdef __USE_ISOC99 -/* Return representation of NaN for double type. */ -__MATHCALLX (nan,, (__const char *__tagb), (__const__)); -#endif - - -/* Return nonzero if VALUE is not a number. */ -__MATHDECL_1 (int,__isnan,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -#if defined __USE_MISC || defined __USE_XOPEN -/* Return nonzero if VALUE is not a number. */ -__MATHDECL_1 (int,isnan,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -/* Bessel functions. */ -__MATHCALL (j0,, (_Mdouble_)); -__MATHCALL (j1,, (_Mdouble_)); -__MATHCALL (jn,, (int, _Mdouble_)); -__MATHCALL (y0,, (_Mdouble_)); -__MATHCALL (y1,, (_Mdouble_)); -__MATHCALL (yn,, (int, _Mdouble_)); -#endif - - -#if defined __USE_MISC || defined __USE_XOPEN || defined __USE_ISOC99 -/* Error and gamma functions. */ -__MATHCALL (erf,, (_Mdouble_)); -__MATHCALL (erfc,, (_Mdouble_)); -__MATHCALL (lgamma,, (_Mdouble_)); -#endif - -#ifdef __USE_ISOC99 -__MATHCALL (tgamma,, (_Mdouble_)); -#endif - -#if defined __USE_MISC || defined __USE_XOPEN -/* Obsolete alias for `lgamma'. */ -__MATHCALL (gamma,, (_Mdouble_)); -#endif - -#ifdef __USE_MISC -/* Reentrant version of lgamma. This function uses the global variable - `signgam'. The reentrant version instead takes a pointer and stores - the value through it. */ -__MATHCALL (lgamma,_r, (_Mdouble_, int *__signgamp)); -#endif - - -#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 -/* Return the integer nearest X in the direction of the - prevailing rounding mode. */ -__MATHCALL (rint,, (_Mdouble_ __x)); - -/* Return X + epsilon if X < Y, X - epsilon if X > Y. */ -__MATHCALLX (nextafter,, (_Mdouble_ __x, _Mdouble_ __y), (__const__)); -# ifdef __USE_ISOC99 -__MATHCALLX (nexttoward,, (_Mdouble_ __x, long double __y), (__const__)); -# endif - -/* Return the remainder of integer divison X / Y with infinite precision. */ -__MATHCALL (remainder,, (_Mdouble_ __x, _Mdouble_ __y)); - -# if defined __USE_MISC || defined __USE_XOPEN_EXTENDED -/* Return X times (2 to the Nth power). */ -__MATHCALL (scalb,, (_Mdouble_ __x, _Mdouble_ __n)); -# endif - -# if defined __USE_MISC || defined __USE_ISOC99 -/* Return X times (2 to the Nth power). */ -__MATHCALL (scalbn,, (_Mdouble_ __x, int __n)); -# endif - -/* Return the binary exponent of X, which must be nonzero. */ -__MATHDECL (int,ilogb,, (_Mdouble_ __x)); -#endif - -#ifdef __USE_ISOC99 -/* Return X times (2 to the Nth power). */ -__MATHCALL (scalbln,, (_Mdouble_ __x, long int __n)); - -/* Round X to integral value in floating-point format using current - rounding direction, but do not raise inexact exception. */ -__MATHCALL (nearbyint,, (_Mdouble_ __x)); - -/* Round X to nearest integral value, rounding halfway cases away from - zero. */ -__MATHCALL (round,, (_Mdouble_ __x)); - -/* Round X to the integral value in floating-point format nearest but - not larger in magnitude. */ -__MATHCALLX (trunc,, (_Mdouble_ __x), (__const__)); - -/* Compute remainder of X and Y and put in *QUO a value with sign of x/y - and magnitude congruent `mod 2^n' to the magnitude of the integral - quotient x/y, with n >= 3. */ -__MATHCALL (remquo,, (_Mdouble_ __x, _Mdouble_ __y, int *__quo)); - - -/* Conversion functions. */ - -/* Round X to nearest integral value according to current rounding - direction. */ -__MATHDECL (long int,lrint,, (_Mdouble_ __x)); -__MATHDECL (long long int,llrint,, (_Mdouble_ __x)); - -/* Round X to nearest integral value, rounding halfway cases away from - zero. */ -__MATHDECL (long int,lround,, (_Mdouble_ __x)); -__MATHDECL (long long int,llround,, (_Mdouble_ __x)); - - -/* Return positive difference between X and Y. */ -__MATHCALL (fdim,, (_Mdouble_ __x, _Mdouble_ __y)); - -/* Return maximum numeric value from X and Y. */ -__MATHCALL (fmax,, (_Mdouble_ __x, _Mdouble_ __y)); - -/* Return minimum numeric value from X and Y. */ -__MATHCALL (fmin,, (_Mdouble_ __x, _Mdouble_ __y)); - - -/* Classify given number. */ -__MATHDECL_1 (int, __fpclassify,, (_Mdouble_ __value)) - __attribute__ ((__const__)); - -/* Test for negative number. */ -__MATHDECL_1 (int, __signbit,, (_Mdouble_ __value)) - __attribute__ ((__const__)); - - -/* Multiply-add function computed as a ternary operation. */ -__MATHCALL (fma,, (_Mdouble_ __x, _Mdouble_ __y, _Mdouble_ __z)); -#endif /* Use ISO C99. */ diff --git a/libc/sysdeps/linux/m68k/bits/msq.h b/libc/sysdeps/linux/m68k/bits/msq.h deleted file mode 100644 index 32a49b592..000000000 --- a/libc/sysdeps/linux/m68k/bits/msq.h +++ /dev/null @@ -1,77 +0,0 @@ -/* Copyright (C) 1995, 1996, 1997, 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 _SYS_MSG_H -# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead." -#endif - -#include <bits/types.h> - -/* Define options for message queue functions. */ -#define MSG_NOERROR 010000 /* no error if message is too big */ -#ifdef __USE_GNU -# define MSG_EXCEPT 020000 /* recv any msg except of specified type */ -#endif - -/* Types used in the structure definition. */ -typedef unsigned long int msgqnum_t; -typedef unsigned long int msglen_t; - - -/* Structure of record for one message inside the kernel. - The type `struct msg' is opaque. */ -struct msqid_ds -{ - struct ipc_perm msg_perm; /* structure describing operation permission */ - __time_t msg_stime; /* time of last msgsnd command */ - unsigned long int __unused1; - __time_t msg_rtime; /* time of last msgrcv command */ - unsigned long int __unused2; - __time_t msg_ctime; /* time of last change */ - unsigned long int __unused3; - unsigned long int __msg_cbytes; /* current number of bytes on queue */ - msgqnum_t msg_qnum; /* number of messages currently on queue */ - msglen_t msg_qbytes; /* max number of bytes allowed on queue */ - __pid_t msg_lspid; /* pid of last msgsnd() */ - __pid_t msg_lrpid; /* pid of last msgrcv() */ - unsigned long int __unused4; - unsigned long int __unused5; -}; - -#ifdef __USE_MISC - -# define msg_cbytes __msg_cbytes - -/* ipcs ctl commands */ -# define MSG_STAT 11 -# define MSG_INFO 12 - -/* buffer for msgctl calls IPC_INFO, MSG_INFO */ -struct msginfo - { - int msgpool; - int msgmap; - int msgmax; - int msgmnb; - int msgmni; - int msgssz; - int msgtql; - unsigned short int msgseg; - }; - -#endif /* __USE_MISC */ diff --git a/libc/sysdeps/linux/m68k/bits/nan.h b/libc/sysdeps/linux/m68k/bits/nan.h deleted file mode 100644 index 6d88b551b..000000000 --- a/libc/sysdeps/linux/m68k/bits/nan.h +++ /dev/null @@ -1,48 +0,0 @@ -/* `NAN' constant for IEEE 754 machines. - Copyright (C) 1992, 1996, 1997, 1999 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 _MATH_H -# error "Never use <bits/nan.h> directly; include <math.h> instead." -#endif - - -/* IEEE Not A Number. */ - -#ifdef __GNUC__ - -# define NAN \ - (__extension__ \ - ((union { unsigned __l __attribute__((__mode__(__SI__))); float __d; }) \ - { __l: 0x7fc00000UL }).__d) - -#else - -# include <endian.h> - -# if __BYTE_ORDER == __BIG_ENDIAN -# define __nan_bytes { 0x7f, 0xc0, 0, 0 } -# endif -# if __BYTE_ORDER == __LITTLE_ENDIAN -# define __nan_bytes { 0, 0, 0xc0, 0x7f } -# endif - -static union { unsigned char __c[4]; float __d; } __nan_union = { __nan_bytes }; -# define NAN (__nan_union.__d) - -#endif /* GCC. */ diff --git a/libc/sysdeps/linux/m68k/bits/netdb.h b/libc/sysdeps/linux/m68k/bits/netdb.h deleted file mode 100644 index 41dc73193..000000000 --- a/libc/sysdeps/linux/m68k/bits/netdb.h +++ /dev/null @@ -1,33 +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. */ - -#ifndef _NETDB_H -# error "Never include <bits/netdb.h> directly; use <netdb.h> instead." -#endif - - -/* Description of data base entry for a single network. NOTE: here a - poor assumption is made. The network number is expected to fit - into an unsigned long int variable. */ -struct netent -{ - char *n_name; /* Official name of network. */ - char **n_aliases; /* Alias list. */ - int n_addrtype; /* Net address type. */ - uint32_t n_net; /* Network number. */ -}; diff --git a/libc/sysdeps/linux/m68k/bits/posix1_lim.h b/libc/sysdeps/linux/m68k/bits/posix1_lim.h deleted file mode 100644 index e16f4674d..000000000 --- a/libc/sysdeps/linux/m68k/bits/posix1_lim.h +++ /dev/null @@ -1,141 +0,0 @@ -/* Copyright (C) 1991,92,93,96,98,2000,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. */ - -/* - * POSIX Standard: 2.9.2 Minimum Values Added to <limits.h> - * - * Never include this file directly; use <limits.h> instead. - */ - -#ifndef _BITS_POSIX1_LIM_H -#define _BITS_POSIX1_LIM_H 1 - - -/* These are the standard-mandated minimum values. */ - -/* Minimum number of operations in one list I/O call. */ -#define _POSIX_AIO_LISTIO_MAX 2 - -/* Minimal number of outstanding asynchronous I/O operations. */ -#define _POSIX_AIO_MAX 1 - -/* Maximum length of arguments to `execve', including environment. */ -#define _POSIX_ARG_MAX 4096 - -/* Maximum simultaneous processes per real user ID. */ -#define _POSIX_CHILD_MAX 6 - -/* Minimal number of timer expiration overruns. */ -#define _POSIX_DELAYTIMER_MAX 32 - -/* Maximum link count of a file. */ -#define _POSIX_LINK_MAX 8 - -/* Number of bytes in a terminal canonical input queue. */ -#define _POSIX_MAX_CANON 255 - -/* Number of bytes for which space will be - available in a terminal input queue. */ -#define _POSIX_MAX_INPUT 255 - -/* Maximum number of message queues open for a process. */ -#define _POSIX_MQ_OPEN_MAX 8 - -/* Maximum number of supported message priorities. */ -#define _POSIX_MQ_PRIO_MAX 32 - -/* Number of simultaneous supplementary group IDs per process. */ -#define _POSIX_NGROUPS_MAX 0 - -/* Number of files one process can have open at once. */ -#define _POSIX_OPEN_MAX 16 - -/* Number of descriptors that a process may examine with `pselect' or - `select'. */ -#define _POSIX_FD_SETSIZE _POSIX_OPEN_MAX - -/* Number of bytes in a filename. */ -#define _POSIX_NAME_MAX 14 - -/* Number of bytes in a pathname. */ -#define _POSIX_PATH_MAX 256 - -/* Number of bytes than can be written atomically to a pipe. */ -#define _POSIX_PIPE_BUF 512 - -/* Minimal number of realtime signals reserved for the application. */ -#define _POSIX_RTSIG_MAX 8 - -/* Number of semaphores a process can have. */ -#define _POSIX_SEM_NSEMS_MAX 256 - -/* Maximal value of a semaphore. */ -#define _POSIX_SEM_VALUE_MAX 32767 - -/* Number of pending realtime signals. */ -#define _POSIX_SIGQUEUE_MAX 32 - -/* Largest value of a `ssize_t'. */ -#define _POSIX_SSIZE_MAX 32767 - -/* Number of streams a process can have open at once. */ -#define _POSIX_STREAM_MAX 8 - -/* Maximum length of a timezone name (element of `tzname'). */ -#define _POSIX_TZNAME_MAX 6 - -/* Maximum number of connections that can be queued on a socket. */ -#define _POSIX_QLIMIT 1 - -/* Maximum number of bytes that can be buffered on a socket for send - or receive. */ -#define _POSIX_HIWAT _POSIX_PIPE_BUF - -/* Maximum number of elements in an `iovec' array. */ -#define _POSIX_UIO_MAXIOV 16 - -/* Maximum number of characters in a tty name. */ -#define _POSIX_TTY_NAME_MAX 9 - -/* Number of timer for a process. */ -#define _POSIX_TIMER_MAX 32 - -/* Maximum length of login name. */ -#define _POSIX_LOGIN_NAME_MAX 9 - -/* Maximum clock resolution in nanoseconds. */ -#define _POSIX_CLOCKRES_MIN 20000000 - - -/* Get the implementation-specific values for the above. */ -#include <bits/local_lim.h> - - -#ifndef SSIZE_MAX -# define SSIZE_MAX INT_MAX -#endif - - -/* This value is a guaranteed minimum maximum. - The current maximum can be got from `sysconf'. */ - -#ifndef NGROUPS_MAX -# define NGROUPS_MAX _POSIX_NGROUPS_MAX -#endif - -#endif /* bits/posix1_lim.h */ diff --git a/libc/sysdeps/linux/m68k/bits/posix2_lim.h b/libc/sysdeps/linux/m68k/bits/posix2_lim.h deleted file mode 100644 index 24483a09d..000000000 --- a/libc/sysdeps/linux/m68k/bits/posix2_lim.h +++ /dev/null @@ -1,91 +0,0 @@ -/* Copyright (C) 1991, 1996, 1999, 2000, 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. */ - -/* - * Never include this file directly; include <limits.h> instead. - */ - -#ifndef _BITS_POSIX2_LIM_H -#define _BITS_POSIX2_LIM_H 1 - - -/* The maximum `ibase' and `obase' values allowed by the `bc' utility. */ -#define _POSIX2_BC_BASE_MAX 99 - -/* The maximum number of elements allowed in an array by the `bc' utility. */ -#define _POSIX2_BC_DIM_MAX 2048 - -/* The maximum `scale' value allowed by the `bc' utility. */ -#define _POSIX2_BC_SCALE_MAX 99 - -/* The maximum length of a string constant accepted by the `bc' utility. */ -#define _POSIX2_BC_STRING_MAX 1000 - -/* The maximum number of weights that can be assigned to an entry of - the LC_COLLATE `order' keyword in the locale definition file. */ -#define _POSIX2_COLL_WEIGHTS_MAX 2 - -/* The maximum number of expressions that can be nested - within parentheses by the `expr' utility. */ -#define _POSIX2_EXPR_NEST_MAX 32 - -/* The maximum length, in bytes, of an input line. */ -#define _POSIX2_LINE_MAX 2048 - -/* The maximum number of repeated occurrences of a regular expression - permitted when using the interval notation `\{M,N\}'. */ -#define _POSIX2_RE_DUP_MAX 255 - -/* The maximum number of bytes in a character class name. We have no - fixed limit, 2048 is a high number. */ -#define _POSIX2_CHARCLASS_NAME_MAX 14 - - -/* These values are implementation-specific, - and may vary within the implementation. - Their precise values can be obtained from sysconf. */ - -#ifndef BC_BASE_MAX -#define BC_BASE_MAX _POSIX2_BC_BASE_MAX -#endif -#ifndef BC_DIM_MAX -#define BC_DIM_MAX _POSIX2_BC_DIM_MAX -#endif -#ifndef BC_SCALE_MAX -#define BC_SCALE_MAX _POSIX2_BC_SCALE_MAX -#endif -#ifndef BC_STRING_MAX -#define BC_STRING_MAX _POSIX2_BC_STRING_MAX -#endif -#ifndef COLL_WEIGHTS_MAX -#define COLL_WEIGHTS_MAX 255 -#endif -#ifndef EXPR_NEST_MAX -#define EXPR_NEST_MAX _POSIX2_EXPR_NEST_MAX -#endif -#ifndef LINE_MAX -#define LINE_MAX _POSIX2_LINE_MAX -#endif -#ifndef CHARCLASS_NAME_MAX -#define CHARCLASS_NAME_MAX 2048 -#endif - -/* This value is defined like this in regex.h. */ -#define RE_DUP_MAX (0x7fff) - -#endif /* bits/posix2_lim.h */ diff --git a/libc/sysdeps/linux/m68k/bits/posix_opt.h b/libc/sysdeps/linux/m68k/bits/posix_opt.h deleted file mode 100644 index 54640bb56..000000000 --- a/libc/sysdeps/linux/m68k/bits/posix_opt.h +++ /dev/null @@ -1,141 +0,0 @@ -/* Define POSIX options for Linux. - Copyright (C) 1996,1997,1998,1999,2000,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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _POSIX_OPT_H -#define _POSIX_OPT_H 1 - -/* Job control is supported. */ -#define _POSIX_JOB_CONTROL 1 - -/* Processes have a saved set-user-ID and a saved set-group-ID. */ -#define _POSIX_SAVED_IDS 1 - -/* Priority scheduling is supported. */ -#define _POSIX_PRIORITY_SCHEDULING 1 - -/* Synchronizing file data is supported. */ -#define _POSIX_SYNCHRONIZED_IO 1 - -/* The fsync function is present. */ -#define _POSIX_FSYNC 1 - -/* Mapping of files to memory is supported. */ -#define _POSIX_MAPPED_FILES 1 - -/* Locking of all memory is supported. */ -#define _POSIX_MEMLOCK 1 - -/* Locking of ranges of memory is supported. */ -#define _POSIX_MEMLOCK_RANGE 1 - -/* Setting of memory protections is supported. */ -#define _POSIX_MEMORY_PROTECTION 1 - -/* Implementation supports `poll' function. */ -#define _POSIX_POLL 1 - -/* Implementation supports `select' and `pselect' functions. */ -#define _POSIX_SELECT 1 - -/* Only root can change owner of file. */ -#define _POSIX_CHOWN_RESTRICTED 1 - -/* `c_cc' member of 'struct termios' structure can be disabled by - using the value _POSIX_VDISABLE. */ -#define _POSIX_VDISABLE '\0' - -/* Filenames are not silently truncated. */ -#define _POSIX_NO_TRUNC 1 - -/* X/Open realtime support is available. */ -#define _XOPEN_REALTIME 1 - -/* X/Open realtime thread support is available. */ -#define _XOPEN_REALTIME_THREADS 1 - -/* XPG4.2 shared memory is supported. */ -#define _XOPEN_SHM 1 - -/* Tell we have POSIX threads. */ -#define _POSIX_THREADS 1 - -/* We have the reentrant functions described in POSIX. */ -#define _POSIX_REENTRANT_FUNCTIONS 1 -#define _POSIX_THREAD_SAFE_FUNCTIONS 1 - -/* We provide priority scheduling for threads. */ -#define _POSIX_THREAD_PRIORITY_SCHEDULING 1 - -/* We support user-defined stack sizes. */ -#define _POSIX_THREAD_ATTR_STACKSIZE 1 - -/* We support user-defined stacks. */ -#define _POSIX_THREAD_ATTR_STACKADDR 1 - -/* We support POSIX.1b semaphores, but only the non-shared form for now. */ -#define _POSIX_SEMAPHORES 1 - -/* Real-time signals are supported. */ -#define _POSIX_REALTIME_SIGNALS 1 - -/* We support asynchronous I/O. */ -#define _POSIX_ASYNCHRONOUS_IO 1 -#define _POSIX_ASYNC_IO 1 -/* Alternative name for Unix98. */ -#define _LFS_ASYNCHRONOUS_IO 1 - -/* The LFS support in asynchronous I/O is also available. */ -#define _LFS64_ASYNCHRONOUS_IO 1 - -/* The rest of the LFS is also available. */ -#define _LFS_LARGEFILE 1 -#define _LFS64_LARGEFILE 1 -#define _LFS64_STDIO 1 - -/* POSIX shared memory objects are implemented. */ -#define _POSIX_SHARED_MEMORY_OBJECTS 1 - -/* GNU libc provides regular expression handling. */ -#define _POSIX_REGEXP 1 - -/* Reader/Writer locks are available. */ -#define _POSIX_READER_WRITER_LOCKS 200912L - -/* We have a POSIX shell. */ -#define _POSIX_SHELL 1 - -/* We support the Timeouts option. */ -#define _POSIX_TIMEOUTS 200912L - -/* We support spinlocks. */ -#define _POSIX_SPIN_LOCKS 200912L - -/* The `spawn' function family is supported. */ -#define _POSIX_SPAWN 200912L - -/* We have POSIX timers. */ -#define _POSIX_TIMERS 1 - -/* The barrier functions are available. */ -#define _POSIX_BARRIERS 200912L - -/* POSIX message queues are not yet supported. */ -#undef _POSIX_MESSAGE_PASSING - -#endif /* posix_opt.h */ diff --git a/libc/sysdeps/linux/m68k/bits/resource.h b/libc/sysdeps/linux/m68k/bits/resource.h index 30825c2e0..e6fa04abc 100644 --- a/libc/sysdeps/linux/m68k/bits/resource.h +++ b/libc/sysdeps/linux/m68k/bits/resource.h @@ -1,5 +1,5 @@ -/* Bit values & structures for resource limits. Linux version. - Copyright (C) 1994,1996,1997,1998,1999,2000 Free Software Foundation, Inc. +/* Bit values & structures for resource limits. Linux/m68k version. + Copyright (C) 1994,1996,1997,1998,1999,2000,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 @@ -64,7 +64,7 @@ enum __rlimit_resource #define RLIMIT_NOFILE RLIMIT_NOFILE #define RLIMIT_OFILE RLIMIT_OFILE - /* Address space limit (?) */ + /* Address space limit. */ RLIMIT_AS = 9, #define RLIMIT_AS RLIMIT_AS @@ -80,20 +80,21 @@ enum __rlimit_resource RLIMIT_LOCKS = 10, #define RLIMIT_LOCKS RLIMIT_LOCKS - RLIM_NLIMITS = 11 + RLIMIT_NLIMITS = 11, + RLIM_NLIMITS = RLIMIT_NLIMITS #define RLIMIT_NLIMITS RLIMIT_NLIMITS #define RLIM_NLIMITS RLIM_NLIMITS }; /* Value to indicate that there is no limit. */ #ifndef __USE_FILE_OFFSET64 -# define RLIM_INFINITY ((long int)(~0UL >> 1)) +# define RLIM_INFINITY ((unsigned long int)(~0UL)) #else -# define RLIM_INFINITY 0x7fffffffffffffffLL +# define RLIM_INFINITY 0xffffffffffffffffuLL #endif #ifdef __USE_LARGEFILE64 -# define RLIM64_INFINITY 0x7fffffffffffffffLL +# define RLIM64_INFINITY 0xffffffffffffffffuLL #endif /* We can represent all limits. */ diff --git a/libc/sysdeps/linux/m68k/bits/sched.h b/libc/sysdeps/linux/m68k/bits/sched.h deleted file mode 100644 index 5c10d85d4..000000000 --- a/libc/sysdeps/linux/m68k/bits/sched.h +++ /dev/null @@ -1,73 +0,0 @@ -/* Definitions of constants and data structure for POSIX 1003.1b-1993 - scheduling interface. - Copyright (C) 1996, 1997, 1998, 1999, 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. */ - -#ifndef __need_schedparam - -#ifndef _SCHED_H -# error "Never include <bits/sched.h> directly; use <sched.h> instead." -#endif - - -/* Scheduling algorithms. */ -#define SCHED_OTHER 0 -#define SCHED_FIFO 1 -#define SCHED_RR 2 - -#ifdef __USE_MISC -/* Cloning flags. */ -# define CSIGNAL 0x000000ff /* Signal mask to be sent at exit. */ -# define CLONE_VM 0x00000100 /* Set if VM shared between processes. */ -# define CLONE_FS 0x00000200 /* Set if fs info shared between processes. */ -# define CLONE_FILES 0x00000400 /* Set if open files shared between processes. */ -# define CLONE_SIGHAND 0x00000800 /* Set if signal handlers shared. */ -# define CLONE_PID 0x00001000 /* Set if pid shared. */ -# define CLONE_PTRACE 0x00002000 /* Set if tracing continues on the child. */ -# define CLONE_VFORK 0x00004000 /* Set if the parent wants the child to - wake it up on mm_release. */ -#endif - -/* The official definition. */ -struct sched_param - { - int __sched_priority; - }; - -__BEGIN_DECLS - -/* Clone current process. */ -#ifdef __USE_MISC -extern int clone (int (*__fn) (void *__arg), void *__child_stack, - int __flags, void *__arg) __THROW; -#endif - -__END_DECLS - -#endif /* need schedparam */ - -#if !defined __defined_schedparam \ - && (defined __need_schedparam || defined _SCHED_H) -# define __defined_schedparam 1 -/* Data structure to describe a process' schedulability. */ -struct __sched_param - { - int __sched_priority; - }; -# undef __need_schedparam -#endif diff --git a/libc/sysdeps/linux/m68k/bits/select.h b/libc/sysdeps/linux/m68k/bits/select.h deleted file mode 100644 index 47e7dedc3..000000000 --- a/libc/sysdeps/linux/m68k/bits/select.h +++ /dev/null @@ -1,35 +0,0 @@ -/* 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. */ - -#ifndef _SYS_SELECT_H -# error "Never use <bits/select.h> directly; include <sys/select.h> instead." -#endif - - -/* We don't use `memset' because this would require a prototype and - the array isn't too big. */ -#define __FD_ZERO(s) \ - do { \ - unsigned int __i; \ - fd_set *__arr = (s); \ - for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) \ - __FDS_BITS (__arr)[__i] = 0; \ - } while (0) -#define __FD_SET(d, s) (__FDS_BITS (s)[__FDELT(d)] |= __FDMASK(d)) -#define __FD_CLR(d, s) (__FDS_BITS (s)[__FDELT(d)] &= ~__FDMASK(d)) -#define __FD_ISSET(d, s) ((__FDS_BITS (s)[__FDELT(d)] & __FDMASK(d)) != 0) diff --git a/libc/sysdeps/linux/m68k/bits/sem.h b/libc/sysdeps/linux/m68k/bits/sem.h deleted file mode 100644 index 6193501e2..000000000 --- a/libc/sysdeps/linux/m68k/bits/sem.h +++ /dev/null @@ -1,87 +0,0 @@ -/* Copyright (C) 1995, 1996, 1997, 1998, 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 _SYS_SEM_H -# error "Never include <bits/sem.h> directly; use <sys/sem.h> instead." -#endif - -#include <sys/types.h> - -/* Flags for `semop'. */ -#define SEM_UNDO 0x1000 /* undo the operation on exit */ - -/* Commands for `semctl'. */ -#define GETPID 11 /* get sempid */ -#define GETVAL 12 /* get semval */ -#define GETALL 13 /* get all semval's */ -#define GETNCNT 14 /* get semncnt */ -#define GETZCNT 15 /* get semzcnt */ -#define SETVAL 16 /* set semval */ -#define SETALL 17 /* set all semval's */ - - -/* Data structure describing a set of semaphores. */ -struct semid_ds -{ - struct ipc_perm sem_perm; /* operation permission struct */ - __time_t sem_otime; /* last semop() time */ - unsigned long int __unused1; - __time_t sem_ctime; /* last time changed by semctl() */ - unsigned long int __unused2; - unsigned long int sem_nsems; /* number of semaphores in set */ - unsigned long int __unused3; - unsigned long int __unused4; -}; - -/* The user should define a union like the following to use it for arguments - for `semctl'. - - union semun - { - int val; <= value for SETVAL - struct semid_ds *buf; <= buffer for IPC_STAT & IPC_SET - unsigned short int *array; <= array for GETALL & SETALL - struct seminfo *__buf; <= buffer for IPC_INFO - }; - - Previous versions of this file used to define this union but this is - incorrect. One can test the macro _SEM_SEMUN_UNDEFINED to see whether - one must define the union or not. */ -#define _SEM_SEMUN_UNDEFINED 1 - -#ifdef __USE_MISC - -/* ipcs ctl cmds */ -# define SEM_STAT 18 -# define SEM_INFO 19 - -struct seminfo -{ - int semmap; - int semmni; - int semmns; - int semmnu; - int semmsl; - int semopm; - int semume; - int semusz; - int semvmx; - int semaem; -}; - -#endif /* __USE_MISC */ diff --git a/libc/sysdeps/linux/m68k/bits/setjmp.h b/libc/sysdeps/linux/m68k/bits/setjmp.h index ea8045df7..2c2b3ee15 100644 --- a/libc/sysdeps/linux/m68k/bits/setjmp.h +++ b/libc/sysdeps/linux/m68k/bits/setjmp.h @@ -1,18 +1,36 @@ +/* Copyright (C) 1997, 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. -/* Copyright (C) 2002, David McCullough <davidm@snapgear.com> */ -/* This file is released under the LGPL, any version you like */ + 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. */ + +/* Define the machine-dependent type `jmp_buf'. m68k version. */ #ifndef _SETJMP_H # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead." #endif -#ifndef _ASM - typedef struct { - unsigned long __dregs[6]; /* save d2 - d7 */ - unsigned long __aregs[6]; /* save a2 - a7 */ - unsigned long __pc; /* the return address */ + /* There are eight 4-byte data registers, but D0 is not saved. */ + long int __dregs[7]; + + /* There are six 4-byte address registers, plus the FP and SP. */ + int *__aregs[6]; + int *__fp; + int *__sp; #if defined __HAVE_68881__ || defined __HAVE_FPU__ /* There are eight floating point registers which @@ -22,21 +40,6 @@ typedef struct } __jmp_buf[1]; -#endif /* _ASM */ - -#define JB_REGS 0 -#define JB_DREGS 0 -#define JB_AREGS 24 -#define JB_PC 48 -#define JB_FPREGS 52 - -#if defined __HAVE_68881__ || defined __HAVE_FPU__ -# define JB_SIZE 76 -#else -# define JB_SIZE 52 -#endif - - /* Test if longjmp to JMPBUF would unwind the frame containing a local variable at ADDRESS. */ #define _JMPBUF_UNWINDS(jmpbuf, address) \ diff --git a/libc/sysdeps/linux/m68k/bits/shm.h b/libc/sysdeps/linux/m68k/bits/shm.h deleted file mode 100644 index 18246c3bd..000000000 --- a/libc/sysdeps/linux/m68k/bits/shm.h +++ /dev/null @@ -1,93 +0,0 @@ -/* Copyright (C) 1995, 1996, 1997, 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 _SYS_SHM_H -# error "Never include <bits/shm.h> directly; use <sys/shm.h> instead." -#endif - -#include <bits/types.h> - -/* Permission flag for shmget. */ -#define SHM_R 0400 /* or S_IRUGO from <linux/stat.h> */ -#define SHM_W 0200 /* or S_IWUGO from <linux/stat.h> */ - -/* Flags for `shmat'. */ -#define SHM_RDONLY 010000 /* attach read-only else read-write */ -#define SHM_RND 020000 /* round attach address to SHMLBA */ -#define SHM_REMAP 040000 /* take-over region on attach */ - -/* Commands for `shmctl'. */ -#define SHM_LOCK 11 /* lock segment (root only) */ -#define SHM_UNLOCK 12 /* unlock segment (root only) */ - - -/* Type to count number of attaches. */ -typedef unsigned long int shmatt_t; - -/* Data structure describing a set of semaphores. */ -struct shmid_ds - { - struct ipc_perm shm_perm; /* operation permission struct */ - size_t shm_segsz; /* size of segment in bytes */ - __time_t shm_atime; /* time of last shmat() */ - unsigned long int __unused1; - __time_t shm_dtime; /* time of last shmdt() */ - unsigned long int __unused2; - __time_t shm_ctime; /* time of last change by shmctl() */ - unsigned long int __unused3; - __pid_t shm_cpid; /* pid of creator */ - __pid_t shm_lpid; /* pid of last shmop */ - shmatt_t shm_nattch; /* number of current attaches */ - unsigned long int __unused4; - unsigned long int __unused5; - }; - -#ifdef __USE_MISC - -/* ipcs ctl commands */ -# define SHM_STAT 13 -# define SHM_INFO 14 - -/* shm_mode upper byte flags */ -# define SHM_DEST 01000 /* segment will be destroyed on last detach */ -# define SHM_LOCKED 02000 /* segment will not be swapped */ - -struct shminfo - { - unsigned long int shmmax; - unsigned long int shmmin; - unsigned long int shmmni; - unsigned long int shmseg; - unsigned long int shmall; - unsigned long int __unused1; - unsigned long int __unused2; - unsigned long int __unused3; - unsigned long int __unused4; - }; - -struct shm_info - { - int used_ids; - unsigned long int shm_tot; /* total allocated shm */ - unsigned long int shm_rss; /* total resident shm */ - unsigned long int shm_swp; /* total swapped shm */ - unsigned long int swap_attempts; - unsigned long int swap_successes; - }; - -#endif /* __USE_MISC */ diff --git a/libc/sysdeps/linux/m68k/bits/sigaction.h b/libc/sysdeps/linux/m68k/bits/sigaction.h deleted file mode 100644 index 48cc5312f..000000000 --- a/libc/sysdeps/linux/m68k/bits/sigaction.h +++ /dev/null @@ -1,77 +0,0 @@ -/* The proper definitions for Linux's sigaction. - Copyright (C) 1993-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 _SIGNAL_H -# error "Never include <bits/sigaction.h> directly; use <signal.h> instead." -#endif - -/* Structure describing the action to be taken when a signal arrives. */ -struct sigaction - { - /* Signal handler. */ -#ifdef __USE_POSIX199309 - union - { - /* Used if SA_SIGINFO is not set. */ - __sighandler_t sa_handler; - /* Used if SA_SIGINFO is set. */ - void (*sa_sigaction) (int, siginfo_t *, void *); - } - __sigaction_handler; -# define sa_handler __sigaction_handler.sa_handler -# define sa_sigaction __sigaction_handler.sa_sigaction -#else - __sighandler_t sa_handler; -#endif - - /* Additional set of signals to be blocked. */ - __sigset_t sa_mask; - - /* Special flags. */ - int sa_flags; - - /* Restore handler. */ - void (*sa_restorer) (void); - }; - -/* Bits in `sa_flags'. */ -#define SA_NOCLDSTOP 1 /* Don't send SIGCHLD when children stop. */ -#define SA_NOCLDWAIT 2 /* Don't create zombie on child death. */ -#define SA_SIGINFO 4 /* Invoke signal-catching function with - three arguments instead of one. */ -#if defined __USE_UNIX98 || defined __USE_MISC -# define SA_ONSTACK 0x08000000 /* Use signal stack by using `sa_restorer'. */ -# define SA_RESTART 0x10000000 /* Restart syscall on signal return. */ -# define SA_NODEFER 0x40000000 /* Don't automatically block the signal when - its handler is being executed. */ -# define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler. */ -#endif -#ifdef __USE_MISC -# define SA_INTERRUPT 0x20000000 /* Historical no-op. */ - -/* Some aliases for the SA_ constants. */ -# define SA_NOMASK SA_NODEFER -# define SA_ONESHOT SA_RESETHAND -# define SA_STACK SA_ONSTACK -#endif - -/* Values for the HOW argument to `sigprocmask'. */ -#define SIG_BLOCK 0 /* Block signals. */ -#define SIG_UNBLOCK 1 /* Unblock signals. */ -#define SIG_SETMASK 2 /* Set the set of blocked signals. */ diff --git a/libc/sysdeps/linux/m68k/bits/sigcontext.h b/libc/sysdeps/linux/m68k/bits/sigcontext.h deleted file mode 100644 index 67dcf9498..000000000 --- a/libc/sysdeps/linux/m68k/bits/sigcontext.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 1996, 1997, 1998 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. */ - -#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H -# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead." -#endif - -#ifndef sigcontext_struct -/* Kernel headers before 2.1.1 define a struct sigcontext_struct, but - we need sigcontext. */ -# define sigcontext_struct sigcontext - -# include <asm/sigcontext.h> -#endif diff --git a/libc/sysdeps/linux/m68k/bits/siginfo.h b/libc/sysdeps/linux/m68k/bits/siginfo.h deleted file mode 100644 index 70a8c217e..000000000 --- a/libc/sysdeps/linux/m68k/bits/siginfo.h +++ /dev/null @@ -1,306 +0,0 @@ -/* siginfo_t, sigevent and constants. Linux/SPARC version. - Copyright (C) 1997, 1998, 1999, 2000, 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. */ - -#if !defined _SIGNAL_H && !defined __need_siginfo_t \ - && !defined __need_sigevent_t -# error "Never include this file directly. Use <signal.h> instead" -#endif - -#include <bits/wordsize.h> - -#if (!defined __have_sigval_t \ - && (defined _SIGNAL_H || defined __need_siginfo_t \ - || defined __need_sigevent_t)) -# define __have_sigval_t 1 - -/* Type for data associated with a signal. */ -typedef union sigval - { - int sival_int; - void *sival_ptr; - } sigval_t; -#endif - -#if (!defined __have_siginfo_t \ - && (defined _SIGNAL_H || defined __need_siginfo_t)) -# define __have_siginfo_t 1 - -# define __SI_MAX_SIZE 128 -# if __WORDSIZE == 64 -# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 4) -# else -# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3) -# endif - -typedef struct siginfo - { - int si_signo; /* Signal number. */ - int si_errno; /* If non-zero, an errno value associated with - this signal, as defined in <errno.h>. */ - int si_code; /* Signal code. */ - - union - { - int _pad[__SI_PAD_SIZE]; - - /* kill(). */ - struct - { - __pid_t si_pid; /* Sending process ID. */ - __uid_t si_uid; /* Real user ID of sending process. */ - } _kill; - - /* POSIX.1b timers. */ - struct - { - unsigned int _timer1; - unsigned int _timer2; - } _timer; - - /* POSIX.1b signals. */ - struct - { - __pid_t si_pid; /* Sending process ID. */ - __uid_t si_uid; /* Real user ID of sending process. */ - sigval_t si_sigval; /* Signal value. */ - } _rt; - - /* SIGCHLD. */ - struct - { - __pid_t si_pid; /* Which child. */ - __uid_t si_uid; /* Real user ID of sending process. */ - int si_status; /* Exit value or signal. */ - __clock_t si_utime; - __clock_t si_stime; - } _sigchld; - - /* SIGILL, SIGFPE, SIGSEGV, SIGBUS. */ - struct - { - void *si_addr; /* Faulting insn/memory ref. */ - } _sigfault; - - /* SIGPOLL. */ - struct - { - long int si_band; /* Band event for SIGPOLL. */ - int si_fd; - } _sigpoll; - } _sifields; - } siginfo_t; - - -/* X/Open requires some more fields with fixed names. */ -# define si_pid _sifields._kill.si_pid -# define si_uid _sifields._kill.si_uid -# define si_timer1 _sifields._timer._timer1 -# define si_timer2 _sifields._timer._timer2 -# define si_status _sifields._sigchld.si_status -# define si_utime _sifields._sigchld.si_utime -# define si_stime _sifields._sigchld.si_stime -# define si_value _sifields._rt.si_sigval -# define si_int _sifields._rt.si_sigval.sival_int -# define si_ptr _sifields._rt.si_sigval.sival_ptr -# define si_addr _sifields._sigfault.si_addr -# define si_band _sifields._sigpoll.si_band -# define si_fd _sifields._sigpoll.si_fd - - -/* Values for `si_code'. Positive values are reserved for kernel-generated - signals. */ -enum -{ - SI_ASYNCNL = -6, /* Sent by asynch name lookup completion. */ -# define SI_ASYNCNL SI_ASYNCNL - SI_SIGIO, /* Sent by queued SIGIO. */ -# define SI_SIGIO SI_SIGIO - SI_ASYNCIO, /* Sent by AIO completion. */ -# define SI_ASYNCIO SI_ASYNCIO - SI_MESGQ, /* Sent by real time mesq state change. */ -# define SI_MESGQ SI_MESGQ - SI_TIMER, /* Sent by timer expiration. */ -# define SI_TIMER SI_TIMER - SI_QUEUE, /* Sent by sigqueue. */ -# define SI_QUEUE SI_QUEUE - SI_USER, /* Sent by kill, sigsend, raise. */ -# define SI_USER SI_USER - SI_KERNEL = 0x80 /* Send by kernel. */ -#define SI_KERNEL SI_KERNEL -}; - - -/* `si_code' values for SIGILL signal. */ -enum -{ - ILL_ILLOPC = 1, /* Illegal opcode. */ -# define ILL_ILLOPC ILL_ILLOPC - ILL_ILLOPN, /* Illegal operand. */ -# define ILL_ILLOPN ILL_ILLOPN - ILL_ILLADR, /* Illegal addressing mode. */ -# define ILL_ILLADR ILL_ILLADR - ILL_ILLTRP, /* Illegal trap. */ -# define ILL_ILLTRP ILL_ILLTRP - ILL_PRVOPC, /* Privileged opcode. */ -# define ILL_PRVOPC ILL_PRVOPC - ILL_PRVREG, /* Privileged register. */ -# define ILL_PRVREG ILL_PRVREG - ILL_COPROC, /* Coprocessor error. */ -# define ILL_COPROC ILL_COPROC - ILL_BADSTK /* Internal stack error. */ -# define ILL_BADSTK ILL_BADSTK -}; - -/* `si_code' values for SIGFPE signal. */ -enum -{ - FPE_INTDIV = 1, /* Integer divide by zero. */ -# define FPE_INTDIV FPE_INTDIV - FPE_INTOVF, /* Integer overflow. */ -# define FPE_INTOVF FPE_INTOVF - FPE_FLTDIV, /* Floating point divide by zero. */ -# define FPE_FLTDIV FPE_FLTDIV - FPE_FLTOVF, /* Floating point overflow. */ -# define FPE_FLTOVF FPE_FLTOVF - FPE_FLTUND, /* Floating point underflow. */ -# define FPE_FLTUND FPE_FLTUND - FPE_FLTRES, /* Floating point inexact result. */ -# define FPE_FLTRES FPE_FLTRES - FPE_FLTINV, /* Floating point invalid operation. */ -# define FPE_FLTINV FPE_FLTINV - FPE_FLTSUB /* Subscript out of range. */ -# define FPE_FLTSUB FPE_FLTSUB -}; - -/* `si_code' values for SIGSEGV signal. */ -enum -{ - SEGV_MAPERR = 1, /* Address not mapped to object. */ -# define SEGV_MAPERR SEGV_MAPERR - SEGV_ACCERR /* Invalid permissions for mapped object. */ -# define SEGV_ACCERR SEGV_ACCERR -}; - -/* `si_code' values for SIGBUS signal. */ -enum -{ - BUS_ADRALN = 1, /* Invalid address alignment. */ -# define BUS_ADRALN BUS_ADRALN - BUS_ADRERR, /* Non-existant physical address. */ -# define BUS_ADRERR BUS_ADRERR - BUS_OBJERR /* Object specific hardware error. */ -# define BUS_OBJERR BUS_OBJERR -}; - -/* `si_code' values for SIGTRAP signal. */ -enum -{ - TRAP_BRKPT = 1, /* Process breakpoint. */ -# define TRAP_BRKPT TRAP_BRKPT - TRAP_TRACE /* Process trace trap. */ -# define TRAP_TRACE TRAP_TRACE -}; - -/* `si_code' values for SIGCHLD signal. */ -enum -{ - CLD_EXITED = 1, /* Child has exited. */ -# define CLD_EXITED CLD_EXITED - CLD_KILLED, /* Child was killed. */ -# define CLD_KILLED CLD_KILLED - CLD_DUMPED, /* Child terminated abnormally. */ -# define CLD_DUMPED CLD_DUMPED - CLD_TRAPPED, /* Traced child has trapped. */ -# define CLD_TRAPPED CLD_TRAPPED - CLD_STOPPED, /* Child has stopped. */ -# define CLD_STOPPED CLD_STOPPED - CLD_CONTINUED /* Stopped child has continued. */ -# define CLD_CONTINUED CLD_CONTINUED -}; - -/* `si_code' values for SIGPOLL signal. */ -enum -{ - POLL_IN = 1, /* Data input available. */ -# define POLL_IN POLL_IN - POLL_OUT, /* Output buffers available. */ -# define POLL_OUT POLL_OUT - POLL_MSG, /* Input message available. */ -# define POLL_MSG POLL_MSG - POLL_ERR, /* I/O error. */ -# define POLL_ERR POLL_ERR - POLL_PRI, /* High priority input available. */ -# define POLL_PRI POLL_PRI - POLL_HUP /* Device disconnected. */ -# define POLL_HUP POLL_HUP -}; - -# undef __need_siginfo_t -#endif /* !have siginfo_t && (have _SIGNAL_H || need siginfo_t). */ - - -#if (defined _SIGNAL_H || defined __need_sigevent_t) \ - && !defined __have_sigevent_t -# define __have_sigevent_t 1 - -/* Structure to transport application-defined values with signals. */ -# define __SIGEV_MAX_SIZE 64 -# if __WORDSIZE == 64 -# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4) -# else -# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3) -# endif - -/* Forward declaration of the `pthread_attr_t' type. */ -struct __pthread_attr_s; - -typedef struct sigevent - { - sigval_t sigev_value; - int sigev_signo; - int sigev_notify; - - union - { - int _pad[__SIGEV_PAD_SIZE]; - - struct - { - void (*_function) (sigval_t); /* Function to start. */ - struct __pthread_attr_s *_attribute; /* Really pthread_attr_t. */ - } _sigev_thread; - } _sigev_un; - } sigevent_t; - -/* POSIX names to access some of the members. */ -# define sigev_notify_function _sigev_un._sigev_thread._function -# define sigev_notify_attributes _sigev_un._sigev_thread._attribute - -/* `sigev_notify' values. */ -enum -{ - SIGEV_SIGNAL = 0, /* Notify via signal. */ -# define SIGEV_SIGNAL SIGEV_SIGNAL - SIGEV_NONE, /* Other notification: meaningless. */ -# define SIGEV_NONE SIGEV_NONE - SIGEV_THREAD /* Deliver via thread creation. */ -# define SIGEV_THREAD SIGEV_THREAD -}; - -#endif /* have _SIGNAL_H. */ diff --git a/libc/sysdeps/linux/m68k/bits/signum.h b/libc/sysdeps/linux/m68k/bits/signum.h deleted file mode 100644 index 74259b492..000000000 --- a/libc/sysdeps/linux/m68k/bits/signum.h +++ /dev/null @@ -1,80 +0,0 @@ -/* Signal number definitions. Linux version. - Copyright (C) 1995, 1996, 1997, 1998, 1999 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. */ - -#ifdef _SIGNAL_H - -/* Fake signal functions. */ -#define SIG_ERR ((__sighandler_t) -1) /* Error return. */ -#define SIG_DFL ((__sighandler_t) 0) /* Default action. */ -#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */ - -#ifdef __USE_UNIX98 -# define SIG_HOLD ((__sighandler_t) 2) /* Add signal to hold mask. */ -#endif - - -/* Signals. */ -#define SIGHUP 1 /* Hangup (POSIX). */ -#define SIGINT 2 /* Interrupt (ANSI). */ -#define SIGQUIT 3 /* Quit (POSIX). */ -#define SIGILL 4 /* Illegal instruction (ANSI). */ -#define SIGTRAP 5 /* Trace trap (POSIX). */ -#define SIGABRT 6 /* Abort (ANSI). */ -#define SIGIOT 6 /* IOT trap (4.2 BSD). */ -#define SIGBUS 7 /* BUS error (4.2 BSD). */ -#define SIGFPE 8 /* Floating-point exception (ANSI). */ -#define SIGKILL 9 /* Kill, unblockable (POSIX). */ -#define SIGUSR1 10 /* User-defined signal 1 (POSIX). */ -#define SIGSEGV 11 /* Segmentation violation (ANSI). */ -#define SIGUSR2 12 /* User-defined signal 2 (POSIX). */ -#define SIGPIPE 13 /* Broken pipe (POSIX). */ -#define SIGALRM 14 /* Alarm clock (POSIX). */ -#define SIGTERM 15 /* Termination (ANSI). */ -#define SIGSTKFLT 16 /* Stack fault. */ -#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */ -#define SIGCHLD 17 /* Child status has changed (POSIX). */ -#define SIGCONT 18 /* Continue (POSIX). */ -#define SIGSTOP 19 /* Stop, unblockable (POSIX). */ -#define SIGTSTP 20 /* Keyboard stop (POSIX). */ -#define SIGTTIN 21 /* Background read from tty (POSIX). */ -#define SIGTTOU 22 /* Background write to tty (POSIX). */ -#define SIGURG 23 /* Urgent condition on socket (4.2 BSD). */ -#define SIGXCPU 24 /* CPU limit exceeded (4.2 BSD). */ -#define SIGXFSZ 25 /* File size limit exceeded (4.2 BSD). */ -#define SIGVTALRM 26 /* Virtual alarm clock (4.2 BSD). */ -#define SIGPROF 27 /* Profiling alarm clock (4.2 BSD). */ -#define SIGWINCH 28 /* Window size change (4.3 BSD, Sun). */ -#define SIGPOLL SIGIO /* Pollable event occurred (System V). */ -#define SIGIO 29 /* I/O now possible (4.2 BSD). */ -#define SIGPWR 30 /* Power failure restart (System V). */ -#define SIGSYS 31 /* Bad system call. */ -#define SIGUNUSED 31 - -#define _NSIG 64 /* Biggest signal number + 1 - (including real-time signals). */ - -#define SIGRTMIN (__libc_current_sigrtmin ()) -#define SIGRTMAX (__libc_current_sigrtmax ()) - -/* These are the hard limits of the kernel. These values should not be - used directly at user level. */ -#define __SIGRTMIN 32 -#define __SIGRTMAX (_NSIG - 1) - -#endif /* <signal.h> included. */ diff --git a/libc/sysdeps/linux/m68k/bits/sigset.h b/libc/sysdeps/linux/m68k/bits/sigset.h deleted file mode 100644 index 7ccadda45..000000000 --- a/libc/sysdeps/linux/m68k/bits/sigset.h +++ /dev/null @@ -1,125 +0,0 @@ -/* __sig_atomic_t, __sigset_t, and related definitions. Linux version. - Copyright (C) 1991, 1992, 1994, 1996, 1997 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 _SIGSET_H_types -# define _SIGSET_H_types 1 - -typedef int __sig_atomic_t; - -/* A `sigset_t' has a bit for each signal. */ - -# define _SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int))) -typedef struct - { - unsigned long int __val[_SIGSET_NWORDS]; - } __sigset_t; - -#endif - - -/* We only want to define these functions if <signal.h> was actually - included; otherwise we were included just to define the types. Since we - are namespace-clean, it wouldn't hurt to define extra macros. But - trouble can be caused by functions being defined (e.g., any global - register vars declared later will cause compilation errors). */ - -#if !defined _SIGSET_H_fns && defined _SIGNAL_H -# define _SIGSET_H_fns 1 - -# ifndef _EXTERN_INLINE -# define _EXTERN_INLINE extern __inline -# endif - -/* Return a mask that includes the bit for SIG only. */ -# define __sigmask(sig) \ - (((unsigned long int) 1) << (((sig) - 1) % (8 * sizeof (unsigned long int)))) - -/* Return the word index for SIG. */ -# define __sigword(sig) (((sig) - 1) / (8 * sizeof (unsigned long int))) - -# if defined __GNUC__ && __GNUC__ >= 2 -# define __sigemptyset(set) \ - (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ - sigset_t *__set = (set); \ - while (--__cnt >= 0) __set->__val[__cnt] = 0; \ - 0; })) -# define __sigfillset(set) \ - (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ - sigset_t *__set = (set); \ - while (--__cnt >= 0) __set->__val[__cnt] = ~0UL; \ - 0; })) - -# ifdef __USE_GNU -/* The POSIX does not specify for handling the whole signal set in one - command. This is often wanted and so we define three more functions - here. */ -# define __sigisemptyset(set) \ - (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ - const sigset_t *__set = (set); \ - int __ret = __set->__val[--__cnt]; \ - while (!__ret && --__cnt >= 0) \ - __ret = __set->__val[__cnt]; \ - __ret == 0; })) -# define __sigandset(dest, left, right) \ - (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ - sigset_t *__dest = (dest); \ - const sigset_t *__left = (left); \ - const sigset_t *__right = (right); \ - while (--__cnt >= 0) \ - __dest->__val[__cnt] = (__left->__val[__cnt] \ - & __right->__val[__cnt]); \ - 0; })) -# define __sigorset(dest, left, right) \ - (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ - sigset_t *__dest = (dest); \ - const sigset_t *__left = (left); \ - const sigset_t *__right = (right); \ - while (--__cnt >= 0) \ - __dest->__val[__cnt] = (__left->__val[__cnt] \ - | __right->__val[__cnt]); \ - 0; })) -# endif -# endif - -/* These functions needn't check for a bogus signal number -- error - checking is done in the non __ versions. */ - -extern int __sigismember (__const __sigset_t *, int); -extern int __sigaddset (__sigset_t *, int); -extern int __sigdelset (__sigset_t *, int); - -# ifdef __USE_EXTERN_INLINES -# define __SIGSETFN(NAME, BODY, CONST) \ - _EXTERN_INLINE int \ - NAME (CONST __sigset_t *__set, int __sig) \ - { \ - unsigned long int __mask = __sigmask (__sig); \ - unsigned long int __word = __sigword (__sig); \ - return BODY; \ - } - -__SIGSETFN (__sigismember, (__set->__val[__word] & __mask) ? 1 : 0, __const) -__SIGSETFN (__sigaddset, ((__set->__val[__word] |= __mask), 0), ) -__SIGSETFN (__sigdelset, ((__set->__val[__word] &= ~__mask), 0), ) - -# undef __SIGSETFN -# endif - - -#endif /* ! _SIGSET_H_fns. */ diff --git a/libc/sysdeps/linux/m68k/bits/sigstack.h b/libc/sysdeps/linux/m68k/bits/sigstack.h deleted file mode 100644 index 7f260367b..000000000 --- a/libc/sysdeps/linux/m68k/bits/sigstack.h +++ /dev/null @@ -1,55 +0,0 @@ -/* sigstack, sigaltstack definitions. - Copyright (C) 1998, 1999 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 _SIGNAL_H -# error "Never include this file directly. Use <signal.h> instead" -#endif - - -/* Structure describing a signal stack (obsolete). */ -struct sigstack - { - void *ss_sp; /* Signal stack pointer. */ - int ss_onstack; /* Nonzero if executing on this stack. */ - }; - - -/* Possible values for `ss_flags.'. */ -enum -{ - SS_ONSTACK = 1, -#define SS_ONSTACK SS_ONSTACK - SS_DISABLE -#define SS_DISABLE SS_DISABLE -}; - -/* Minimum stack size for a signal handler. */ -#define MINSIGSTKSZ 2048 - -/* System default stack size. */ -#define SIGSTKSZ 8192 - - -/* Alternate, preferred interface. */ -typedef struct sigaltstack - { - void *ss_sp; - int ss_flags; - size_t ss_size; - } stack_t; diff --git a/libc/sysdeps/linux/m68k/bits/sigthread.h b/libc/sysdeps/linux/m68k/bits/sigthread.h deleted file mode 100644 index b86e75f20..000000000 --- a/libc/sysdeps/linux/m68k/bits/sigthread.h +++ /dev/null @@ -1,38 +0,0 @@ -/* Signal handling function for threaded programs. - Copyright (C) 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _BITS_SIGTHREAD_H -#define _BITS_SIGTHREAD_H 1 - -#if !defined _SIGNAL_H && !defined _PTHREAD_H -# error "Never include this file directly. Use <pthread.h> instead" -#endif - -/* Functions for handling signals. */ - -/* Modify the signal mask for the calling thread. The arguments have - the same meaning as for sigprocmask(2). */ -extern int pthread_sigmask (int __how, - __const __sigset_t *__restrict __newmask, - __sigset_t *__restrict __oldmask)__THROW; - -/* Send signal SIGNO to the given thread. */ -extern int pthread_kill (pthread_t __thread, int __signo) __THROW; - -#endif /* bits/sigthread.h */ diff --git a/libc/sysdeps/linux/m68k/bits/sockaddr.h b/libc/sysdeps/linux/m68k/bits/sockaddr.h deleted file mode 100644 index 3e1d1312d..000000000 --- a/libc/sysdeps/linux/m68k/bits/sockaddr.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Definition of `struct sockaddr_*' common members. Generic/4.2 BSD version. - Copyright (C) 1995,1996,1997,1998,2000,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. */ - -/* - * Never include this file directly; use <sys/socket.h> instead. - */ - -#ifndef _BITS_SOCKADDR_H -#define _BITS_SOCKADDR_H 1 - - -/* POSIX.1g specifies this type name for the `sa_family' member. */ -typedef unsigned short int sa_family_t; - -/* This macro is used to declare the initial common members - of the data types used for socket addresses, `struct sockaddr', - `struct sockaddr_in', `struct sockaddr_un', etc. */ - -#define __SOCKADDR_COMMON(sa_prefix) \ - sa_family_t sa_prefix##family - -#define __SOCKADDR_COMMON_SIZE (sizeof (unsigned short int)) - -#endif /* bits/sockaddr.h */ diff --git a/libc/sysdeps/linux/m68k/bits/socket.h b/libc/sysdeps/linux/m68k/bits/socket.h deleted file mode 100644 index 61644073b..000000000 --- a/libc/sysdeps/linux/m68k/bits/socket.h +++ /dev/null @@ -1,315 +0,0 @@ -/* System-specific socket constants and types. Linux version. - Copyright (C) 1991,1992,1994-1999,2000,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. */ - -#ifndef __BITS_SOCKET_H -#define __BITS_SOCKET_H - -#if !defined _SYS_SOCKET_H && !defined _NETINET_IN_H -# error "Never include <bits/socket.h> directly; use <sys/socket.h> instead." -#endif - -#define __need_size_t -#define __need_NULL -#include <stddef.h> - -#include <limits.h> -#include <sys/types.h> - -/* Type for length arguments in socket calls. */ -#ifndef __socklen_t_defined -typedef __socklen_t socklen_t; -# define __socklen_t_defined -#endif - -/* Types of sockets. */ -enum __socket_type -{ - SOCK_STREAM = 1, /* Sequenced, reliable, connection-based - byte streams. */ -#define SOCK_STREAM SOCK_STREAM - SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams - of fixed maximum length. */ -#define SOCK_DGRAM SOCK_DGRAM - SOCK_RAW = 3, /* Raw protocol interface. */ -#define SOCK_RAW SOCK_RAW - SOCK_RDM = 4, /* Reliably-delivered messages. */ -#define SOCK_RDM SOCK_RDM - SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, - datagrams of fixed maximum length. */ -#define SOCK_SEQPACKET SOCK_SEQPACKET - SOCK_PACKET = 10 /* Linux specific way of getting packets - at the dev level. For writing rarp and - other similar things on the user level. */ -#define SOCK_PACKET SOCK_PACKET -}; - -/* Protocol families. */ -#define PF_UNSPEC 0 /* Unspecified. */ -#define PF_LOCAL 1 /* Local to host (pipes and file-domain). */ -#define PF_UNIX PF_LOCAL /* Old BSD name for PF_LOCAL. */ -#define PF_FILE PF_LOCAL /* Another non-standard name for PF_LOCAL. */ -#define PF_INET 2 /* IP protocol family. */ -#define PF_AX25 3 /* Amateur Radio AX.25. */ -#define PF_IPX 4 /* Novell Internet Protocol. */ -#define PF_APPLETALK 5 /* Appletalk DDP. */ -#define PF_NETROM 6 /* Amateur radio NetROM. */ -#define PF_BRIDGE 7 /* Multiprotocol bridge. */ -#define PF_ATMPVC 8 /* ATM PVCs. */ -#define PF_X25 9 /* Reserved for X.25 project. */ -#define PF_INET6 10 /* IP version 6. */ -#define PF_ROSE 11 /* Amateur Radio X.25 PLP. */ -#define PF_DECnet 12 /* Reserved for DECnet project. */ -#define PF_NETBEUI 13 /* Reserved for 802.2LLC project. */ -#define PF_SECURITY 14 /* Security callback pseudo AF. */ -#define PF_KEY 15 /* PF_KEY key management API. */ -#define PF_NETLINK 16 -#define PF_ROUTE PF_NETLINK /* Alias to emulate 4.4BSD. */ -#define PF_PACKET 17 /* Packet family. */ -#define PF_ASH 18 /* Ash. */ -#define PF_ECONET 19 /* Acorn Econet. */ -#define PF_ATMSVC 20 /* ATM SVCs. */ -#define PF_SNA 22 /* Linux SNA Project */ -#define PF_IRDA 23 /* IRDA sockets. */ -#define PF_PPPOX 24 /* PPPoX sockets. */ -#define PF_WANPIPE 25 /* Wanpipe API sockets. */ -#define PF_BLUETOOTH 31 /* Bluetooth sockets. */ -#define PF_MAX 32 /* For now.. */ - -/* Address families. */ -#define AF_UNSPEC PF_UNSPEC -#define AF_LOCAL PF_LOCAL -#define AF_UNIX PF_UNIX -#define AF_FILE PF_FILE -#define AF_INET PF_INET -#define AF_AX25 PF_AX25 -#define AF_IPX PF_IPX -#define AF_APPLETALK PF_APPLETALK -#define AF_NETROM PF_NETROM -#define AF_BRIDGE PF_BRIDGE -#define AF_ATMPVC PF_ATMPVC -#define AF_X25 PF_X25 -#define AF_INET6 PF_INET6 -#define AF_ROSE PF_ROSE -#define AF_DECnet PF_DECnet -#define AF_NETBEUI PF_NETBEUI -#define AF_SECURITY PF_SECURITY -#define AF_KEY PF_KEY -#define AF_NETLINK PF_NETLINK -#define AF_ROUTE PF_ROUTE -#define AF_PACKET PF_PACKET -#define AF_ASH PF_ASH -#define AF_ECONET PF_ECONET -#define AF_ATMSVC PF_ATMSVC -#define AF_SNA PF_SNA -#define AF_IRDA PF_IRDA -#define AF_PPPOX PF_PPPOX -#define AF_WANPIPE PF_WANPIPE -#define AF_BLUETOOTH PF_BLUETOOTH -#define AF_MAX PF_MAX - -/* Socket level values. Others are defined in the appropriate headers. - - XXX These definitions also should go into the appropriate headers as - far as they are available. */ -#define SOL_RAW 255 -#define SOL_DECNET 261 -#define SOL_X25 262 -#define SOL_PACKET 263 -#define SOL_ATM 264 /* ATM layer (cell level). */ -#define SOL_AAL 265 /* ATM Adaption Layer (packet level). */ -#define SOL_IRDA 266 - -/* Maximum queue length specifiable by listen. */ -#define SOMAXCONN 128 - -/* Get the definition of the macro to define the common sockaddr members. */ -#include <bits/sockaddr.h> - -/* Structure describing a generic socket address. */ -struct sockaddr - { - __SOCKADDR_COMMON (sa_); /* Common data: address family and length. */ - char sa_data[14]; /* Address data. */ - }; - - -/* Structure large enough to hold any socket address (with the historical - exception of AF_UNIX). We reserve 128 bytes. */ -#if ULONG_MAX > 0xffffffff -# define __ss_aligntype __uint64_t -#else -# define __ss_aligntype __uint32_t -#endif -#define _SS_SIZE 128 -#define _SS_PADSIZE (_SS_SIZE - (2 * sizeof (__ss_aligntype))) - -struct sockaddr_storage - { - __SOCKADDR_COMMON (ss_); /* Address family, etc. */ - __ss_aligntype __ss_align; /* Force desired alignment. */ - char __ss_padding[_SS_PADSIZE]; - }; - - -/* Bits in the FLAGS argument to `send', `recv', et al. */ -enum - { - MSG_OOB = 0x01, /* Process out-of-band data. */ -#define MSG_OOB MSG_OOB - MSG_PEEK = 0x02, /* Peek at incoming messages. */ -#define MSG_PEEK MSG_PEEK - MSG_DONTROUTE = 0x04, /* Don't use local routing. */ -#define MSG_DONTROUTE MSG_DONTROUTE -#ifdef __USE_GNU - /* DECnet uses a different name. */ - MSG_TRYHARD = MSG_DONTROUTE, -# define MSG_TRYHARD MSG_DONTROUTE -#endif - MSG_CTRUNC = 0x08, /* Control data lost before delivery. */ -#define MSG_CTRUNC MSG_CTRUNC - MSG_PROXY = 0x10, /* Supply or ask second address. */ -#define MSG_PROXY MSG_PROXY - MSG_TRUNC = 0x20, -#define MSG_TRUNC MSG_TRUNC - MSG_DONTWAIT = 0x40, /* Nonblocking IO. */ -#define MSG_DONTWAIT MSG_DONTWAIT - MSG_EOR = 0x80, /* End of record. */ -#define MSG_EOR MSG_EOR - MSG_WAITALL = 0x100, /* Wait for a full request. */ -#define MSG_WAITALL MSG_WAITALL - MSG_FIN = 0x200, -#define MSG_FIN MSG_FIN - MSG_SYN = 0x400, -#define MSG_SYN MSG_SYN - MSG_CONFIRM = 0x800, /* Confirm path validity. */ -#define MSG_CONFIRM MSG_CONFIRM - MSG_RST = 0x1000, -#define MSG_RST MSG_RST - MSG_ERRQUEUE = 0x2000, /* Fetch message from error queue. */ -#define MSG_ERRQUEUE MSG_ERRQUEUE - MSG_NOSIGNAL = 0x4000, /* Do not generate SIGPIPE. */ -#define MSG_NOSIGNAL MSG_NOSIGNAL - MSG_MORE = 0x8000 /* Sender will send more. */ -#define MSG_MORE MSG_MORE - }; - - -/* Structure describing messages sent by - `sendmsg' and received by `recvmsg'. */ -struct msghdr - { - void *msg_name; /* Address to send to/receive from. */ - socklen_t msg_namelen; /* Length of address data. */ - - struct iovec *msg_iov; /* Vector of data to send/receive into. */ - int msg_iovlen; /* Number of elements in the vector. */ - - void *msg_control; /* Ancillary data (eg BSD filedesc passing). */ - socklen_t msg_controllen; /* Ancillary data buffer length. */ - - int msg_flags; /* Flags on received message. */ - }; - -/* Structure used for storage of ancillary data object information. */ -struct cmsghdr - { - size_t cmsg_len; /* Length of data in cmsg_data plus length - of cmsghdr structure. */ - int cmsg_level; /* Originating protocol. */ - int cmsg_type; /* Protocol specific type. */ -#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L - __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */ -#endif - }; - -/* Ancillary data object manipulation macros. */ -#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L -# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data) -#else -# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1)) -#endif -#define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg) -#define CMSG_FIRSTHDR(mhdr) \ - ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \ - ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL) -#define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \ - & (size_t) ~(sizeof (size_t) - 1)) -#define CMSG_SPACE(len) (CMSG_ALIGN (len) \ - + CMSG_ALIGN (sizeof (struct cmsghdr))) -#define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len)) - -extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr, - struct cmsghdr *__cmsg) __THROW; -#ifdef __USE_EXTERN_INLINES -# ifndef _EXTERN_INLINE -# define _EXTERN_INLINE extern __inline -# endif -_EXTERN_INLINE struct cmsghdr * -__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW -{ - if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr)) - /* The kernel header does this so there may be a reason. */ - return 0; - - __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg - + CMSG_ALIGN (__cmsg->cmsg_len)); - if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control - + __mhdr->msg_controllen) - || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len) - > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen))) - /* No more entries. */ - return 0; - return __cmsg; -} -#endif /* Use `extern inline'. */ - -/* Socket level message types. This must match the definitions in - <linux/socket.h>. */ -enum - { - SCM_RIGHTS = 0x01, /* Transfer file descriptors. */ -#define SCM_RIGHTS SCM_RIGHTS -#ifdef __USE_BSD - SCM_CREDENTIALS = 0x02, /* Credentials passing. */ -# define SCM_CREDENTIALS SCM_CREDENTIALS -#endif - __SCM_CONNECT = 0x03 /* Data array is `struct scm_connect'. */ - }; - -/* User visible structure for SCM_CREDENTIALS message */ - -struct ucred -{ - pid_t pid; /* PID of sending process. */ - uid_t uid; /* UID of sending process. */ - gid_t gid; /* GID of sending process. */ -}; - -/* Get socket manipulation related informations from kernel headers. */ -#include <asm/socket.h> - - -/* Structure used to manipulate the SO_LINGER option. */ -struct linger - { - int l_onoff; /* Nonzero to linger on close. */ - int l_linger; /* Time to linger. */ - }; - -#endif /* bits/socket.h */ diff --git a/libc/sysdeps/linux/m68k/bits/stab.def b/libc/sysdeps/linux/m68k/bits/stab.def deleted file mode 100644 index 3d54774cf..000000000 --- a/libc/sysdeps/linux/m68k/bits/stab.def +++ /dev/null @@ -1,234 +0,0 @@ -/* Table of DBX symbol codes for the GNU system. - Copyright (C) 1988, 1997 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. */ - -/* This contains contribution from Cygnus Support. */ - -/* Global variable. Only the name is significant. - To find the address, look in the corresponding external symbol. */ -__define_stab (N_GSYM, 0x20, "GSYM") - -/* Function name for BSD Fortran. Only the name is significant. - To find the address, look in the corresponding external symbol. */ -__define_stab (N_FNAME, 0x22, "FNAME") - -/* Function name or text-segment variable for C. Value is its address. - Desc is supposedly starting line number, but GCC doesn't set it - and DBX seems not to miss it. */ -__define_stab (N_FUN, 0x24, "FUN") - -/* Data-segment variable with internal linkage. Value is its address. - "Static Sym". */ -__define_stab (N_STSYM, 0x26, "STSYM") - -/* BSS-segment variable with internal linkage. Value is its address. */ -__define_stab (N_LCSYM, 0x28, "LCSYM") - -/* Name of main routine. Only the name is significant. - This is not used in C. */ -__define_stab (N_MAIN, 0x2a, "MAIN") - -/* Global symbol in Pascal. - Supposedly the value is its line number; I'm skeptical. */ -__define_stab (N_PC, 0x30, "PC") - -/* Number of symbols: 0, files,,funcs,lines according to Ultrix V4.0. */ -__define_stab (N_NSYMS, 0x32, "NSYMS") - -/* "No DST map for sym: name, ,0,type,ignored" according to Ultrix V4.0. */ -__define_stab (N_NOMAP, 0x34, "NOMAP") - -/* New stab from Solaris. I don't know what it means, but it - don't seem to contain useful information. */ -__define_stab (N_OBJ, 0x38, "OBJ") - -/* New stab from Solaris. I don't know what it means, but it - don't seem to contain useful information. Possibly related to the - optimization flags used in this module. */ -__define_stab (N_OPT, 0x3c, "OPT") - -/* Register variable. Value is number of register. */ -__define_stab (N_RSYM, 0x40, "RSYM") - -/* Modula-2 compilation unit. Can someone say what info it contains? */ -__define_stab (N_M2C, 0x42, "M2C") - -/* Line number in text segment. Desc is the line number; - value is corresponding address. */ -__define_stab (N_SLINE, 0x44, "SLINE") - -/* Similar, for data segment. */ -__define_stab (N_DSLINE, 0x46, "DSLINE") - -/* Similar, for bss segment. */ -__define_stab (N_BSLINE, 0x48, "BSLINE") - -/* Sun's source-code browser stabs. ?? Don't know what the fields are. - Supposedly the field is "path to associated .cb file". THIS VALUE - OVERLAPS WITH N_BSLINE! */ -__define_stab (N_BROWS, 0x48, "BROWS") - -/* GNU Modula-2 definition module dependency. Value is the modification time - of the definition file. Other is non-zero if it is imported with the - GNU M2 keyword %INITIALIZE. Perhaps N_M2C can be used if there - are enough empty fields? */ -__define_stab(N_DEFD, 0x4a, "DEFD") - -/* THE FOLLOWING TWO STAB VALUES CONFLICT. Happily, one is for Modula-2 - and one is for C++. Still,... */ -/* GNU C++ exception variable. Name is variable name. */ -__define_stab (N_EHDECL, 0x50, "EHDECL") -/* Modula2 info "for imc": name,,0,0,0 according to Ultrix V4.0. */ -__define_stab (N_MOD2, 0x50, "MOD2") - -/* GNU C++ `catch' clause. Value is its address. Desc is nonzero if - this entry is immediately followed by a CAUGHT stab saying what exception - was caught. Multiple CAUGHT stabs means that multiple exceptions - can be caught here. If Desc is 0, it means all exceptions are caught - here. */ -__define_stab (N_CATCH, 0x54, "CATCH") - -/* Structure or union element. Value is offset in the structure. */ -__define_stab (N_SSYM, 0x60, "SSYM") - -/* Name of main source file. - Value is starting text address of the compilation. */ -__define_stab (N_SO, 0x64, "SO") - -/* Automatic variable in the stack. Value is offset from frame pointer. - Also used for type descriptions. */ -__define_stab (N_LSYM, 0x80, "LSYM") - -/* Beginning of an include file. Only Sun uses this. - In an object file, only the name is significant. - The Sun linker puts data into some of the other fields. */ -__define_stab (N_BINCL, 0x82, "BINCL") - -/* Name of sub-source file (#include file). - Value is starting text address of the compilation. */ -__define_stab (N_SOL, 0x84, "SOL") - -/* Parameter variable. Value is offset from argument pointer. - (On most machines the argument pointer is the same as the frame pointer. */ -__define_stab (N_PSYM, 0xa0, "PSYM") - -/* End of an include file. No name. - This and N_BINCL act as brackets around the file's output. - In an object file, there is no significant data in this entry. - The Sun linker puts data into some of the fields. */ -__define_stab (N_EINCL, 0xa2, "EINCL") - -/* Alternate entry point. Value is its address. */ -__define_stab (N_ENTRY, 0xa4, "ENTRY") - -/* Beginning of lexical block. - The desc is the nesting level in lexical blocks. - The value is the address of the start of the text for the block. - The variables declared inside the block *precede* the N_LBRAC symbol. */ -__define_stab (N_LBRAC, 0xc0, "LBRAC") - -/* Place holder for deleted include file. Replaces a N_BINCL and everything - up to the corresponding N_EINCL. The Sun linker generates these when - it finds multiple identical copies of the symbols from an include file. - This appears only in output from the Sun linker. */ -__define_stab (N_EXCL, 0xc2, "EXCL") - -/* Modula-2 scope information. Can someone say what info it contains? */ -__define_stab (N_SCOPE, 0xc4, "SCOPE") - -/* End of a lexical block. Desc matches the N_LBRAC's desc. - The value is the address of the end of the text for the block. */ -__define_stab (N_RBRAC, 0xe0, "RBRAC") - -/* Begin named common block. Only the name is significant. */ -__define_stab (N_BCOMM, 0xe2, "BCOMM") - -/* End named common block. Only the name is significant - (and it should match the N_BCOMM). */ -__define_stab (N_ECOMM, 0xe4, "ECOMM") - -/* End common (local name): value is address. - I'm not sure how this is used. */ -__define_stab (N_ECOML, 0xe8, "ECOML") - -/* These STAB's are used on Gould systems for Non-Base register symbols - or something like that. FIXME. I have assigned the values at random - since I don't have a Gould here. Fixups from Gould folk welcome... */ -__define_stab (N_NBTEXT, 0xF0, "NBTEXT") -__define_stab (N_NBDATA, 0xF2, "NBDATA") -__define_stab (N_NBBSS, 0xF4, "NBBSS") -__define_stab (N_NBSTS, 0xF6, "NBSTS") -__define_stab (N_NBLCS, 0xF8, "NBLCS") - -/* Second symbol entry containing a length-value for the preceding entry. - The value is the length. */ -__define_stab (N_LENG, 0xfe, "LENG") - -/* The above information, in matrix format. - - STAB MATRIX - _________________________________________________ - | 00 - 1F are not dbx stab symbols | - | In most cases, the low bit is the EXTernal bit| - - | 00 UNDEF | 02 ABS | 04 TEXT | 06 DATA | - | 01 |EXT | 03 |EXT | 05 |EXT | 07 |EXT | - - | 08 BSS | 0A INDR | 0C FN_SEQ | 0E | - | 09 |EXT | 0B | 0D | 0F | - - | 10 | 12 COMM | 14 SETA | 16 SETT | - | 11 | 13 | 15 | 17 | - - | 18 SETD | 1A SETB | 1C SETV | 1E WARNING| - | 19 | 1B | 1D | 1F FN | - - |_______________________________________________| - | Debug entries with bit 01 set are unused. | - | 20 GSYM | 22 FNAME | 24 FUN | 26 STSYM | - | 28 LCSYM | 2A MAIN | 2C | 2E | - | 30 PC | 32 NSYMS | 34 NOMAP | 36 | - | 38 OBJ | 3A | 3C OPT | 3E | - | 40 RSYM | 42 M2C | 44 SLINE | 46 DSLINE | - | 48 BSLINE*| 4A DEFD | 4C | 4E | - | 50 EHDECL*| 52 | 54 CATCH | 56 | - | 58 | 5A | 5C | 5E | - | 60 SSYM | 62 | 64 SO | 66 | - | 68 | 6A | 6C | 6E | - | 70 | 72 | 74 | 76 | - | 78 | 7A | 7C | 7E | - | 80 LSYM | 82 BINCL | 84 SOL | 86 | - | 88 | 8A | 8C | 8E | - | 90 | 92 | 94 | 96 | - | 98 | 9A | 9C | 9E | - | A0 PSYM | A2 EINCL | A4 ENTRY | A6 | - | A8 | AA | AC | AE | - | B0 | B2 | B4 | B6 | - | B8 | BA | BC | BE | - | C0 LBRAC | C2 EXCL | C4 SCOPE | C6 | - | C8 | CA | CC | CE | - | D0 | D2 | D4 | D6 | - | D8 | DA | DC | DE | - | E0 RBRAC | E2 BCOMM | E4 ECOMM | E6 | - | E8 ECOML | EA | EC | EE | - | F0 | F2 | F4 | F6 | - | F8 | FA | FC | FE LENG | - +-----------------------------------------------+ - * 50 EHDECL is also MOD2. - * 48 BSLINE is also BROWS. - */ diff --git a/libc/sysdeps/linux/m68k/bits/statfs.h b/libc/sysdeps/linux/m68k/bits/statfs.h deleted file mode 100644 index 78c9bdbbc..000000000 --- a/libc/sysdeps/linux/m68k/bits/statfs.h +++ /dev/null @@ -1,64 +0,0 @@ -/* Copyright (C) 1997, 1998, 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 _SYS_STATFS_H -# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead." -#endif - -#include <bits/types.h> /* for __fsid_t and __fsblkcnt_t*/ - -struct statfs - { - int f_type; - int f_bsize; -#ifndef __USE_FILE_OFFSET64 - __fsblkcnt_t f_blocks; - __fsblkcnt_t f_bfree; - __fsblkcnt_t f_bavail; - __fsfilcnt_t f_files; - __fsfilcnt_t f_ffree; -#else - __fsblkcnt64_t f_blocks; - __fsblkcnt64_t f_bfree; - __fsblkcnt64_t f_bavail; - __fsfilcnt64_t f_files; - __fsfilcnt64_t f_ffree; -#endif - __fsid_t f_fsid; - int f_namelen; - int f_spare[6]; - }; - -#ifdef __USE_LARGEFILE64 -struct statfs64 - { - int f_type; - int f_bsize; - __fsblkcnt64_t f_blocks; - __fsblkcnt64_t f_bfree; - __fsblkcnt64_t f_bavail; - __fsfilcnt64_t f_files; - __fsfilcnt64_t f_ffree; - __fsid_t f_fsid; - int f_namelen; - int f_spare[6]; - }; -#endif - -/* Tell code we have this member. */ -#define _STATFS_F_NAMELEN diff --git a/libc/sysdeps/linux/m68k/bits/statvfs.h b/libc/sysdeps/linux/m68k/bits/statvfs.h deleted file mode 100644 index 32e03f31e..000000000 --- a/libc/sysdeps/linux/m68k/bits/statvfs.h +++ /dev/null @@ -1,99 +0,0 @@ -/* Copyright (C) 1997, 1998, 2000, 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. */ - -#ifndef _SYS_STATVFS_H -# error "Never include <bits/statvfs.h> directly; use <sys/statvfs.h> instead." -#endif - -#include <bits/types.h> /* For __fsblkcnt_t and __fsfilcnt_t. */ - -struct statvfs - { - unsigned long int f_bsize; - unsigned long int f_frsize; -#ifndef __USE_FILE_OFFSET64 - __fsblkcnt_t f_blocks; - __fsblkcnt_t f_bfree; - __fsblkcnt_t f_bavail; - __fsfilcnt_t f_files; - __fsfilcnt_t f_ffree; - __fsfilcnt_t f_favail; -#else - __fsblkcnt64_t f_blocks; - __fsblkcnt64_t f_bfree; - __fsblkcnt64_t f_bavail; - __fsfilcnt64_t f_files; - __fsfilcnt64_t f_ffree; - __fsfilcnt64_t f_favail; -#endif - unsigned long int f_fsid; - int __f_unused; - unsigned long int f_flag; - unsigned long int f_namemax; - int __f_spare[6]; - }; -#define _STATVFSBUF_F_UNUSED - -#ifdef __USE_LARGEFILE64 -struct statvfs64 - { - unsigned long int f_bsize; - unsigned long int f_frsize; - __fsblkcnt64_t f_blocks; - __fsblkcnt64_t f_bfree; - __fsblkcnt64_t f_bavail; - __fsfilcnt64_t f_files; - __fsfilcnt64_t f_ffree; - __fsfilcnt64_t f_favail; - unsigned long int f_fsid; - int __f_unused; - unsigned long int f_flag; - unsigned long int f_namemax; - int __f_spare[6]; - }; -#endif - -/* Definitions for the flag in `f_flag'. These definitions should be - kept in sync which the definitions in <sys/mount.h>. */ -enum -{ - ST_RDONLY = 1, /* Mount read-only. */ -#define ST_RDONLY ST_RDONLY - ST_NOSUID = 2, /* Ignore suid and sgid bits. */ -#define ST_NOSUID ST_NOSUID -#ifdef __USE_GNU - ST_NODEV = 4, /* Disallow access to device special files. */ -# define ST_NODEV ST_NODEV - ST_NOEXEC = 8, /* Disallow program execution. */ -# define ST_NOEXEC ST_NOEXEC - ST_SYNCHRONOUS = 16, /* Writes are synced at once. */ -# define ST_SYNCHRONOUS ST_SYNCHRONOUS - ST_MANDLOCK = 64, /* Allow mandatory locks on an FS. */ -# define ST_MANDLOCK ST_MANDLOCK - ST_WRITE = 128, /* Write on file/directory/symlink. */ -# define ST_WRITE ST_WRITE - ST_APPEND = 256, /* Append-only file. */ -# define ST_APPEND ST_APPEND - ST_IMMUTABLE = 512, /* Immutable file. */ -# define ST_IMMUTABLE ST_IMMUTABLE - ST_NOATIME = 1024, /* Do not update access times. */ -# define ST_NOATIME ST_NOATIME - ST_NODIRATIME /* Do not update directory access times. */ -# define ST_NODIRATIME ST_NODIRATIME -#endif /* Use GNU. */ -}; diff --git a/libc/sysdeps/linux/m68k/bits/stdio.h b/libc/sysdeps/linux/m68k/bits/stdio.h deleted file mode 100644 index 118118adc..000000000 --- a/libc/sysdeps/linux/m68k/bits/stdio.h +++ /dev/null @@ -1,169 +0,0 @@ -/* Optimizing macros and inline functions for stdio functions. - Copyright (C) 1998, 2000, 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. */ - -#ifndef _STDIO_H -# error "Never include <bits/stdio.h> directly; use <stdio.h> instead." -#endif - -#ifdef __cplusplus -# define __STDIO_INLINE inline -#else -# define __STDIO_INLINE extern __inline -#endif - - -#ifdef __USE_EXTERN_INLINES -/* Write formatted output to stdout from argument list ARG. */ -__STDIO_INLINE int -vprintf (__const char *__restrict __fmt, _G_va_list __arg) __THROW -{ - return vfprintf (stdout, __fmt, __arg); -} - -/* Read a character from stdin. */ -__STDIO_INLINE int -getchar (void) __THROW -{ - return _IO_getc (stdin); -} - - -# if defined __USE_POSIX || defined __USE_MISC -/* This is defined in POSIX.1:1996. */ -__STDIO_INLINE int -getc_unlocked (FILE *__fp) __THROW -{ - return _IO_getc_unlocked (__fp); -} - -/* This is defined in POSIX.1:1996. */ -__STDIO_INLINE int -getchar_unlocked (void) __THROW -{ - return _IO_getc_unlocked (stdin); -} -# endif /* POSIX || misc */ - - -/* Write a character to stdout. */ -__STDIO_INLINE int -putchar (int __c) __THROW -{ - return _IO_putc (__c, stdout); -} - - -# ifdef __USE_MISC -/* Faster version when locking is not necessary. */ -__STDIO_INLINE int -fputc_unlocked (int __c, FILE *__stream) __THROW -{ - return _IO_putc_unlocked (__c, __stream); -} -# endif /* misc */ - - -# if defined __USE_POSIX || defined __USE_MISC -/* This is defined in POSIX.1:1996. */ -__STDIO_INLINE int -putc_unlocked (int __c, FILE *__stream) __THROW -{ - return _IO_putc_unlocked (__c, __stream); -} - -/* This is defined in POSIX.1:1996. */ -__STDIO_INLINE int -putchar_unlocked (int __c) __THROW -{ - return _IO_putc_unlocked (__c, stdout); -} -# endif /* POSIX || misc */ - - -# ifdef __USE_GNU -/* Like `getdelim', but reads up to a newline. */ -__STDIO_INLINE _IO_ssize_t -getline (char **__lineptr, size_t *__n, FILE *__stream) __THROW -{ - return __getdelim (__lineptr, __n, '\n', __stream); -} -# endif /* GNU */ - - -# ifdef __USE_MISC -/* Faster versions when locking is not required. */ -__STDIO_INLINE int -feof_unlocked (FILE *__stream) __THROW -{ - return _IO_feof_unlocked (__stream); -} - -/* Faster versions when locking is not required. */ -__STDIO_INLINE int -ferror_unlocked (FILE *__stream) __THROW -{ - return _IO_ferror_unlocked (__stream); -} -# endif /* misc */ - -#endif /* Use extern inlines. */ - - -#if defined __USE_MISC && defined __GNUC__ && defined __OPTIMIZE__ -/* Perform some simple optimizations. */ -# define fread_unlocked(ptr, size, n, stream) \ - (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) \ - && (size_t) ((size) * (n)) <= 8 && (size) != 0) \ - ? ({ char *__ptr = (char *) (ptr); \ - FILE *__stream = (stream); \ - size_t __cnt; \ - for (__cnt = (size) * (n); __cnt > 0; --__cnt) \ - { \ - int __c = _IO_getc_unlocked (__stream); \ - if (__c == EOF) \ - break; \ - *__ptr++ = __c; \ - } \ - ((size_t) ((size) * (n)) - __cnt) / (size); }) \ - : (((__builtin_constant_p (size) && (size) == 0) \ - || (__builtin_constant_p (n) && (n) == 0)) \ - /* Evaluate all parameters once. */ \ - ? ((void) (ptr), (void) (stream), (void) (size), \ - (void) (n), 0) \ - : fread_unlocked (ptr, size, n, stream)))) - -# define fwrite_unlocked(ptr, size, n, stream) \ - (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) \ - && (size_t) ((size) * (n)) <= 8 && (size) != 0) \ - ? ({ const char *__ptr = (const char *) (ptr); \ - FILE *__stream = (stream); \ - size_t __cnt; \ - for (__cnt = (size) * (n); __cnt > 0; --__cnt) \ - if (_IO_putc_unlocked (*__ptr++, __stream) == EOF) \ - break; \ - ((size_t) ((size) * (n)) - __cnt) / (size); }) \ - : (((__builtin_constant_p (size) && (size) == 0) \ - || (__builtin_constant_p (n) && (n) == 0)) \ - /* Evaluate all parameters once. */ \ - ? ((void) (ptr), (void) (stream), (void) (size), n) \ - : fwrite_unlocked (ptr, size, n, stream)))) -#endif - -/* Define helper macro. */ -#undef __STDIO_INLINE diff --git a/libc/sysdeps/linux/m68k/bits/stdio_lim.h b/libc/sysdeps/linux/m68k/bits/stdio_lim.h deleted file mode 100644 index ea6d693f5..000000000 --- a/libc/sysdeps/linux/m68k/bits/stdio_lim.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (C) 1994, 1997, 1998, 1999 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. */ - -#if !defined _STDIO_H && !defined __need_FOPEN_MAX && !defined __need_IOV_MAX -# error "Never include <bits/stdio_lim.h> directly; use <stdio.h> instead." -#endif - -#ifdef _STDIO_H -# define L_tmpnam 20 -# define TMP_MAX 238328 -# define FILENAME_MAX 4095 - -# ifdef __USE_POSIX -# define L_ctermid 9 -# define L_cuserid 9 -# endif -#endif - -#if defined __need_FOPEN_MAX || defined _STDIO_H -# undef FOPEN_MAX -# define FOPEN_MAX 16 -#endif - -#if defined __need_IOV_MAX && !defined IOV_MAX -# define IOV_MAX 1024 -#endif diff --git a/libc/sysdeps/linux/m68k/bits/string.h b/libc/sysdeps/linux/m68k/bits/string.h deleted file mode 100644 index 84be224b7..000000000 --- a/libc/sysdeps/linux/m68k/bits/string.h +++ /dev/null @@ -1,26 +0,0 @@ -/* Optimized, inlined string functions. m680x0 version, x >= 2. - Copyright (C) 1997 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 _STRING_H -# error "Never use <bits/string.h> directly; include <string.h> instead." -#endif - -/* Currently the only purpose of this file is to tell the generic inline - macros that unaligned memory access is possible. */ -#define _STRING_ARCH_unaligned 1 diff --git a/libc/sysdeps/linux/m68k/bits/string2.h b/libc/sysdeps/linux/m68k/bits/string2.h deleted file mode 100644 index 9e522cedf..000000000 --- a/libc/sysdeps/linux/m68k/bits/string2.h +++ /dev/null @@ -1,1241 +0,0 @@ -/* Machine-independant string function optimizations. - Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. - - 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 _STRING_H -# error "Never use <bits/string2.h> directly; include <string.h> instead." -#endif - -#if !defined __NO_STRING_INLINES && !defined __BOUNDED_POINTERS__ - -/* Unlike the definitions in the header <bits/string.h> the - definitions contained here are not optimized down to assembler - level. Those optimizations are not always a good idea since this - means the code size increases a lot. Instead the definitions here - optimize some functions in a way which do not dramatically - increase the code size and which do not use assembler. The main - trick is to use GNU CC's `__builtin_constant_p' function. - - Every function XXX which has a defined version in - <bits/string.h> must be accompanied by a symbol _HAVE_STRING_ARCH_XXX - to make sure we don't get redefinitions. - - We must use here macros instead of inline functions since the - trick won't work with the latter. */ - -#ifndef __STRING_INLINE -# ifdef __cplusplus -# define __STRING_INLINE inline -# else -# define __STRING_INLINE extern __inline -# endif -#endif - -#if _STRING_ARCH_unaligned -/* If we can do unaligned memory accesses we must know the endianess. */ -# include <endian.h> -# include <bits/types.h> - -# if __BYTE_ORDER == __LITTLE_ENDIAN -# define __STRING2_SMALL_GET16(src, idx) \ - (((__const unsigned char *) (__const char *) (src))[idx + 1] << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx]) -# define __STRING2_SMALL_GET32(src, idx) \ - (((((__const unsigned char *) (__const char *) (src))[idx + 3] << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 2]) << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 1]) << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx]) -# else -# define __STRING2_SMALL_GET16(src, idx) \ - (((__const unsigned char *) (__const char *) (src))[idx] << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 1]) -# define __STRING2_SMALL_GET32(src, idx) \ - (((((__const unsigned char *) (__const char *) (src))[idx] << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 1]) << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 2]) << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 3]) -# endif -#else -/* These are a few types we need for the optimizations if we cannot - use unaligned memory accesses. */ -# define __STRING2_COPY_TYPE(N) \ - typedef struct { unsigned char __arr[N]; } \ - __STRING2_COPY_ARR##N __attribute__ ((packed)) -__STRING2_COPY_TYPE (2); -__STRING2_COPY_TYPE (3); -__STRING2_COPY_TYPE (4); -__STRING2_COPY_TYPE (5); -__STRING2_COPY_TYPE (6); -__STRING2_COPY_TYPE (7); -__STRING2_COPY_TYPE (8); -# undef __STRING2_COPY_TYPE -#endif - -/* Dereferencing a pointer arg to run sizeof on it fails for the void - pointer case, so we use this instead. - Note that __x is evaluated twice. */ -#define __string2_1bptr_p(__x) \ - ((size_t)(const void *)((__x) + 1) - (size_t)(const void *)(__x) == 1) - -/* Set N bytes of S to C. */ -#ifndef _HAVE_STRING_ARCH_memset -# if _STRING_ARCH_unaligned -# define memset(s, c, n) \ - (__extension__ (__builtin_constant_p (n) && (n) <= 16 \ - ? ((n) == 1 \ - ? __memset_1 (s, c) \ - : __memset_gc (s, c, n)) \ - : (__builtin_constant_p (c) && (c) == '\0' \ - ? ({ void *__s = (s); __bzero (__s, n); __s; }) \ - : memset (s, c, n)))) - -# define __memset_1(s, c) ({ void *__s = (s); \ - *((__uint8_t *) __s) = (__uint8_t) c; __s; }) - -# define __memset_gc(s, c, n) \ - ({ void *__s = (s); \ - union { \ - unsigned int __ui; \ - unsigned short int __usi; \ - unsigned char __uc; \ - } *__u = __s; \ - __uint8_t __c = (__uint8_t) (c); \ - \ - /* This `switch' statement will be removed at compile-time. */ \ - switch ((unsigned int) (n)) \ - { \ - case 15: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 11: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 7: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 3: \ - __u->__usi = (unsigned short int) __c * 0x0101; \ - __u = __extension__ (void *)((char *) __u + 2); \ - __u->__uc = (unsigned char) __c; \ - break; \ - \ - case 14: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 10: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 6: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 2: \ - __u->__usi = (unsigned short int) __c * 0x0101; \ - break; \ - \ - case 13: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 9: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 5: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 1: \ - __u->__uc = (unsigned char) __c; \ - break; \ - \ - case 16: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 12: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 8: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 4: \ - __u->__ui = __c * 0x01010101; \ - case 0: \ - break; \ - } \ - \ - __s; }) -# else -# define memset(s, c, n) \ - (__extension__ (__builtin_constant_p (c) && (c) == '\0' \ - ? ({ void *__s = (s); __bzero (__s, n); __s; }) \ - : memset (s, c, n))) -# endif - -/* GCC optimizes memset(s, 0, n) but not bzero(s, n). - The optimization is broken before EGCS 1.1. */ -# if __GNUC_PREREQ (2, 91) -# define __bzero(s, n) __builtin_memset (s, '\0', n) -# endif - -#endif - - -/* Copy N bytes from SRC to DEST, returning pointer to byte following the - last copied. */ -#ifdef __USE_GNU -# if !defined _HAVE_STRING_ARCH_mempcpy || defined _FORCE_INLINES -# ifndef _HAVE_STRING_ARCH_mempcpy -# define __mempcpy(dest, src, n) \ - (__extension__ (__builtin_constant_p (src) && __builtin_constant_p (n) \ - && __string2_1bptr_p (src) && n <= 8 \ - ? __mempcpy_small (dest, __mempcpy_args (src), n) \ - : __mempcpy (dest, src, n))) -/* In glibc we use this function frequently but for namespace reasons - we have to use the name `__mempcpy'. */ -# define mempcpy(dest, src, n) __mempcpy (dest, src, n) -# endif - -# if _STRING_ARCH_unaligned -# ifndef _FORCE_INLINES -# define __mempcpy_args(src) \ - ((__const char *) (src))[0], ((__const char *) (src))[2], \ - ((__const char *) (src))[4], ((__const char *) (src))[6], \ - __extension__ __STRING2_SMALL_GET16 (src, 0), \ - __extension__ __STRING2_SMALL_GET16 (src, 4), \ - __extension__ __STRING2_SMALL_GET32 (src, 0), \ - __extension__ __STRING2_SMALL_GET32 (src, 4) -# endif -__STRING_INLINE void *__mempcpy_small (void *, char, char, char, char, - __uint16_t, __uint16_t, __uint32_t, - __uint32_t, size_t); -__STRING_INLINE void * -__mempcpy_small (void *__dest1, - char __src0_1, char __src2_1, char __src4_1, char __src6_1, - __uint16_t __src0_2, __uint16_t __src4_2, - __uint32_t __src0_4, __uint32_t __src4_4, - size_t __srclen) -{ - union { - __uint32_t __ui; - __uint16_t __usi; - unsigned char __uc; - unsigned char __c; - } *__u = __dest1; - switch ((unsigned int) __srclen) - { - case 1: - __u->__c = __src0_1; - __u = __extension__ (void *)((char *) __u + 1); - break; - case 2: - __u->__usi = __src0_2; - __u = __extension__ (void *)((char *) __u + 2); - break; - case 3: - __u->__usi = __src0_2; - __u = __extension__ (void *)((char *) __u + 2); - __u->__c = __src2_1; - __u = __extension__ (void *)((char *) __u + 1); - break; - case 4: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - break; - case 5: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__c = __src4_1; - __u = __extension__ (void *)((char *) __u + 1); - break; - case 6: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__usi = __src4_2; - __u = __extension__ (void *)((char *) __u + 2); - break; - case 7: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__usi = __src4_2; - __u = __extension__ (void *)((char *) __u + 2); - __u->__c = __src6_1; - __u = __extension__ (void *)((char *) __u + 1); - break; - case 8: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__ui = __src4_4; - __u = __extension__ (void *)((char *) __u + 4); - break; - } - return (void *) __u; -} -# else -# ifndef _FORCE_INLINES -# define __mempcpy_args(src) \ - ((__const char *) (src))[0], \ - __extension__ ((__STRING2_COPY_ARR2) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1] } }), \ - __extension__ ((__STRING2_COPY_ARR3) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2] } }), \ - __extension__ ((__STRING2_COPY_ARR4) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3] } }), \ - __extension__ ((__STRING2_COPY_ARR5) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4] } }), \ - __extension__ ((__STRING2_COPY_ARR6) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5] } }), \ - __extension__ ((__STRING2_COPY_ARR7) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - ((__const char *) (src))[6] } }), \ - __extension__ ((__STRING2_COPY_ARR8) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - ((__const char *) (src))[6], ((__const char *) (src))[7] } }) -# endif -__STRING_INLINE void *__mempcpy_small (void *, char, __STRING2_COPY_ARR2, - __STRING2_COPY_ARR3, - __STRING2_COPY_ARR4, - __STRING2_COPY_ARR5, - __STRING2_COPY_ARR6, - __STRING2_COPY_ARR7, - __STRING2_COPY_ARR8, size_t); -__STRING_INLINE void * -__mempcpy_small (void *__dest, char __src1, - __STRING2_COPY_ARR2 __src2, __STRING2_COPY_ARR3 __src3, - __STRING2_COPY_ARR4 __src4, __STRING2_COPY_ARR5 __src5, - __STRING2_COPY_ARR6 __src6, __STRING2_COPY_ARR7 __src7, - __STRING2_COPY_ARR8 __src8, size_t __srclen) -{ - union { - char __c; - __STRING2_COPY_ARR2 __sca2; - __STRING2_COPY_ARR3 __sca3; - __STRING2_COPY_ARR4 __sca4; - __STRING2_COPY_ARR5 __sca5; - __STRING2_COPY_ARR6 __sca6; - __STRING2_COPY_ARR7 __sca7; - __STRING2_COPY_ARR8 __sca8; - } *__u = __dest; - switch ((unsigned int) __srclen) - { - case 1: - __u->__c = __src1; - break; - case 2: - __extension__ __u->__sca2 = __src2; - break; - case 3: - __extension__ __u->__sca3 = __src3; - break; - case 4: - __extension__ __u->__sca4 = __src4; - break; - case 5: - __extension__ __u->__sca5 = __src5; - break; - case 6: - __extension__ __u->__sca6 = __src6; - break; - case 7: - __extension__ __u->__sca7 = __src7; - break; - case 8: - __extension__ __u->__sca8 = __src8; - break; - } - return __extension__ (void *)((char *) __u + __srclen); -} -# endif -# endif -#endif - - -/* Return pointer to C in S. */ -#ifndef _HAVE_STRING_ARCH_strchr -extern void *__rawmemchr (const void *__s, int __c); -# define strchr(s, c) \ - (__extension__ (__builtin_constant_p (c) && (c) == '\0' \ - ? (char *) __rawmemchr (s, c) \ - : strchr (s, c))) -#endif - - -/* Copy SRC to DEST. */ -#if !defined _HAVE_STRING_ARCH_strcpy || defined _FORCE_INLINES -# ifndef _HAVE_STRING_ARCH_strcpy -# define strcpy(dest, src) \ - (__extension__ (__builtin_constant_p (src) \ - ? (__string2_1bptr_p (src) && strlen (src) + 1 <= 8 \ - ? __strcpy_small (dest, __strcpy_args (src), \ - strlen (src) + 1) \ - : (char *) memcpy (dest, src, strlen (src) + 1)) \ - : strcpy (dest, src))) -# endif - -# if _STRING_ARCH_unaligned -# ifndef _FORCE_INLINES -# define __strcpy_args(src) \ - __extension__ __STRING2_SMALL_GET16 (src, 0), \ - __extension__ __STRING2_SMALL_GET16 (src, 4), \ - __extension__ __STRING2_SMALL_GET32 (src, 0), \ - __extension__ __STRING2_SMALL_GET32 (src, 4) -# endif -__STRING_INLINE char *__strcpy_small (char *, __uint16_t, __uint16_t, - __uint32_t, __uint32_t, size_t); -__STRING_INLINE char * -__strcpy_small (char *__dest, - __uint16_t __src0_2, __uint16_t __src4_2, - __uint32_t __src0_4, __uint32_t __src4_4, - size_t __srclen) -{ - union { - __uint32_t __ui; - __uint16_t __usi; - unsigned char __uc; - } *__u = (void *) __dest; - switch ((unsigned int) __srclen) - { - case 1: - __u->__uc = '\0'; - break; - case 2: - __u->__usi = __src0_2; - break; - case 3: - __u->__usi = __src0_2; - __u = __extension__ (void *)((char *) __u + 2); - __u->__uc = '\0'; - break; - case 4: - __u->__ui = __src0_4; - break; - case 5: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__uc = '\0'; - break; - case 6: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__usi = __src4_2; - break; - case 7: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__usi = __src4_2; - __u = __extension__ (void *)((char *) __u + 2); - __u->__uc = '\0'; - break; - case 8: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__ui = __src4_4; - break; - } - return __dest; -} -# else -# ifndef _FORCE_INLINES -# define __strcpy_args(src) \ - __extension__ ((__STRING2_COPY_ARR2) \ - { { ((__const char *) (src))[0], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR3) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR4) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR5) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR6) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR7) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR8) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - ((__const char *) (src))[6], '\0' } }) -# endif -__STRING_INLINE char *__strcpy_small (char *, __STRING2_COPY_ARR2, - __STRING2_COPY_ARR3, - __STRING2_COPY_ARR4, - __STRING2_COPY_ARR5, - __STRING2_COPY_ARR6, - __STRING2_COPY_ARR7, - __STRING2_COPY_ARR8, size_t); -__STRING_INLINE char * -__strcpy_small (char *__dest, - __STRING2_COPY_ARR2 __src2, __STRING2_COPY_ARR3 __src3, - __STRING2_COPY_ARR4 __src4, __STRING2_COPY_ARR5 __src5, - __STRING2_COPY_ARR6 __src6, __STRING2_COPY_ARR7 __src7, - __STRING2_COPY_ARR8 __src8, size_t __srclen) -{ - union { - char __c; - __STRING2_COPY_ARR2 __sca2; - __STRING2_COPY_ARR3 __sca3; - __STRING2_COPY_ARR4 __sca4; - __STRING2_COPY_ARR5 __sca5; - __STRING2_COPY_ARR6 __sca6; - __STRING2_COPY_ARR7 __sca7; - __STRING2_COPY_ARR8 __sca8; - } *__u = (void *) __dest; - switch ((unsigned int) __srclen) - { - case 1: - __u->__c = '\0'; - break; - case 2: - __extension__ __u->__sca2 = __src2; - break; - case 3: - __extension__ __u->__sca3 = __src3; - break; - case 4: - __extension__ __u->__sca4 = __src4; - break; - case 5: - __extension__ __u->__sca5 = __src5; - break; - case 6: - __extension__ __u->__sca6 = __src6; - break; - case 7: - __extension__ __u->__sca7 = __src7; - break; - case 8: - __extension__ __u->__sca8 = __src8; - break; - } - return __dest; -} -# endif -#endif - - -/* Copy SRC to DEST, returning pointer to final NUL byte. */ -#ifdef __USE_GNU -# if !defined _HAVE_STRING_ARCH_stpcpy || defined _FORCE_INLINES -# ifndef _HAVE_STRING_ARCH_stpcpy -# define __stpcpy(dest, src) \ - (__extension__ (__builtin_constant_p (src) \ - ? (__string2_1bptr_p (src) && strlen (src) + 1 <= 8 \ - ? __stpcpy_small (dest, __stpcpy_args (src), \ - strlen (src) + 1) \ - : ((char *) __mempcpy (dest, src, strlen (src) + 1) - 1))\ - : __stpcpy (dest, src))) -/* In glibc we use this function frequently but for namespace reasons - we have to use the name `__stpcpy'. */ -# define stpcpy(dest, src) __stpcpy (dest, src) -# endif - -# if _STRING_ARCH_unaligned -# ifndef _FORCE_INLINES -# define __stpcpy_args(src) \ - __extension__ __STRING2_SMALL_GET16 (src, 0), \ - __extension__ __STRING2_SMALL_GET16 (src, 4), \ - __extension__ __STRING2_SMALL_GET32 (src, 0), \ - __extension__ __STRING2_SMALL_GET32 (src, 4) -# endif -__STRING_INLINE char *__stpcpy_small (char *, __uint16_t, __uint16_t, - __uint32_t, __uint32_t, size_t); -__STRING_INLINE char * -__stpcpy_small (char *__dest, - __uint16_t __src0_2, __uint16_t __src4_2, - __uint32_t __src0_4, __uint32_t __src4_4, - size_t __srclen) -{ - union { - unsigned int __ui; - unsigned short int __usi; - unsigned char __uc; - char __c; - } *__u = (void *) __dest; - switch ((unsigned int) __srclen) - { - case 1: - __u->__uc = '\0'; - break; - case 2: - __u->__usi = __src0_2; - __u = __extension__ (void *)((char *) __u + 1); - break; - case 3: - __u->__usi = __src0_2; - __u = __extension__ (void *)((char *) __u + 2); - __u->__uc = '\0'; - break; - case 4: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 3); - break; - case 5: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__uc = '\0'; - break; - case 6: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__usi = __src4_2; - __u = __extension__ (void *)((char *) __u + 1); - break; - case 7: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__usi = __src4_2; - __u = __extension__ (void *)((char *) __u + 2); - __u->__uc = '\0'; - break; - case 8: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__ui = __src4_4; - __u = __extension__ (void *)((char *) __u + 3); - break; - } - return &__u->__c; -} -# else -# ifndef _FORCE_INLINES -# define __stpcpy_args(src) \ - __extension__ ((__STRING2_COPY_ARR2) \ - { { ((__const char *) (src))[0], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR3) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR4) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR5) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR6) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR7) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR8) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - ((__const char *) (src))[6], '\0' } }) -# endif -__STRING_INLINE char *__stpcpy_small (char *, __STRING2_COPY_ARR2, - __STRING2_COPY_ARR3, - __STRING2_COPY_ARR4, - __STRING2_COPY_ARR5, - __STRING2_COPY_ARR6, - __STRING2_COPY_ARR7, - __STRING2_COPY_ARR8, size_t); -__STRING_INLINE char * -__stpcpy_small (char *__dest, - __STRING2_COPY_ARR2 __src2, __STRING2_COPY_ARR3 __src3, - __STRING2_COPY_ARR4 __src4, __STRING2_COPY_ARR5 __src5, - __STRING2_COPY_ARR6 __src6, __STRING2_COPY_ARR7 __src7, - __STRING2_COPY_ARR8 __src8, size_t __srclen) -{ - union { - char __c; - __STRING2_COPY_ARR2 __sca2; - __STRING2_COPY_ARR3 __sca3; - __STRING2_COPY_ARR4 __sca4; - __STRING2_COPY_ARR5 __sca5; - __STRING2_COPY_ARR6 __sca6; - __STRING2_COPY_ARR7 __sca7; - __STRING2_COPY_ARR8 __sca8; - } *__u = (void *) __dest; - switch ((unsigned int) __srclen) - { - case 1: - __u->__c = '\0'; - break; - case 2: - __extension__ __u->__sca2 = __src2; - break; - case 3: - __extension__ __u->__sca3 = __src3; - break; - case 4: - __extension__ __u->__sca4 = __src4; - break; - case 5: - __extension__ __u->__sca5 = __src5; - break; - case 6: - __extension__ __u->__sca6 = __src6; - break; - case 7: - __extension__ __u->__sca7 = __src7; - break; - case 8: - __extension__ __u->__sca8 = __src8; - break; - } - return __dest + __srclen - 1; -} -# endif -# endif -#endif - - -/* Copy no more than N characters of SRC to DEST. */ -#ifndef _HAVE_STRING_ARCH_strncpy -# if defined _USE_STRING_ARCH_memset && defined _USE_STRING_ARCH_mempcpy -# define strncpy(dest, src, n) \ - (__extension__ ({ char *__dest = (dest); \ - __builtin_constant_p (src) && __builtin_constant_p (n) \ - ? (strlen (src) + 1 >= ((size_t) (n)) \ - ? (char *) memcpy (__dest, src, n) \ - : (memset (__mempcpy (__dest, src, strlen (src)), \ - '\0', n - strlen (src)), \ - __dest)) \ - : strncpy (__dest, src, n); })) -# else -# define strncpy(dest, src, n) \ - (__extension__ (__builtin_constant_p (src) && __builtin_constant_p (n) \ - ? (strlen (src) + 1 >= ((size_t) (n)) \ - ? (char *) memcpy (dest, src, n) \ - : strncpy (dest, src, n)) \ - : strncpy (dest, src, n))) -# endif -#endif - - -/* Append no more than N characters from SRC onto DEST. */ -#ifndef _HAVE_STRING_ARCH_strncat -# ifdef _USE_STRING_ARCH_strchr -# define strncat(dest, src, n) \ - (__extension__ ({ char *__dest = (dest); \ - __builtin_constant_p (src) && __builtin_constant_p (n) \ - ? (strlen (src) < ((size_t) (n)) \ - ? strcat (__dest, src) \ - : (*((char *) __mempcpy (strchr (__dest, '\0'), \ - src, n)) = '\0', __dest)) \ - : strncat (dest, src, n); })) -# else -# define strncat(dest, src, n) \ - (__extension__ (__builtin_constant_p (src) && __builtin_constant_p (n) \ - ? (strlen (src) < ((size_t) (n)) \ - ? strcat (dest, src) \ - : strncat (dest, src, n)) \ - : strncat (dest, src, n))) -# endif -#endif - - -/* Compare characters of S1 and S2. */ -#ifndef _HAVE_STRING_ARCH_strcmp -# define strcmp(s1, s2) \ - __extension__ \ - ({ size_t __s1_len, __s2_len; \ - (__builtin_constant_p (s1) && __builtin_constant_p (s2) \ - && (__s1_len = strlen (s1), __s2_len = strlen (s2), \ - (!__string2_1bptr_p (s1) || __s1_len >= 4) \ - && (!__string2_1bptr_p (s2) || __s2_len >= 4)) \ - ? memcmp ((__const char *) (s1), (__const char *) (s2), \ - (__s1_len < __s2_len ? __s1_len : __s2_len) + 1) \ - : (__builtin_constant_p (s1) && __string2_1bptr_p (s1) \ - && (__s1_len = strlen (s1), __s1_len < 4) \ - ? (__builtin_constant_p (s2) && __string2_1bptr_p (s2) \ - ? __strcmp_cc (s1, s2, __s1_len) \ - : __strcmp_cg (s1, s2, __s1_len)) \ - : (__builtin_constant_p (s2) && __string2_1bptr_p (s2) \ - && (__s2_len = strlen (s2), __s2_len < 4) \ - ? (__builtin_constant_p (s1) && __string2_1bptr_p (s1) \ - ? __strcmp_cc (s1, s2, __s2_len) \ - : __strcmp_gc (s1, s2, __s2_len)) \ - : strcmp (s1, s2)))); }) - -# define __strcmp_cc(s1, s2, l) \ - (__extension__ ({ register int __result = \ - (((__const unsigned char *) (__const char *) (s1))[0] \ - - ((__const unsigned char *) (__const char *)(s2))[0]);\ - if (l > 0 && __result == 0) \ - { \ - __result = (((__const unsigned char *) \ - (__const char *) (s1))[1] \ - - ((__const unsigned char *) \ - (__const char *) (s2))[1]); \ - if (l > 1 && __result == 0) \ - { \ - __result = \ - (((__const unsigned char *) \ - (__const char *) (s1))[2] \ - - ((__const unsigned char *) \ - (__const char *) (s2))[2]); \ - if (l > 2 && __result == 0) \ - __result = \ - (((__const unsigned char *) \ - (__const char *) (s1))[3] \ - - ((__const unsigned char *) \ - (__const char *) (s2))[3]); \ - } \ - } \ - __result; })) - -# define __strcmp_cg(s1, s2, l1) \ - (__extension__ ({ __const unsigned char *__s2 = \ - (__const unsigned char *) (__const char *) (s2); \ - register int __result = \ - (((__const unsigned char *) (__const char *) (s1))[0] \ - - __s2[0]); \ - if (l1 > 0 && __result == 0) \ - { \ - __result = (((__const unsigned char *) \ - (__const char *) (s1))[1] - __s2[1]); \ - if (l1 > 1 && __result == 0) \ - { \ - __result = (((__const unsigned char *) \ - (__const char *) (s1))[2] - __s2[2]);\ - if (l1 > 2 && __result == 0) \ - __result = (((__const unsigned char *) \ - (__const char *) (s1))[3] \ - - __s2[3]); \ - } \ - } \ - __result; })) - -# define __strcmp_gc(s1, s2, l2) \ - (__extension__ ({ __const unsigned char *__s1 = \ - (__const unsigned char *) (__const char *) (s1); \ - register int __result = \ - __s1[0] - ((__const unsigned char *) \ - (__const char *) (s2))[0]; \ - if (l2 > 0 && __result == 0) \ - { \ - __result = (__s1[1] \ - - ((__const unsigned char *) \ - (__const char *) (s2))[1]); \ - if (l2 > 1 && __result == 0) \ - { \ - __result = \ - (__s1[2] - ((__const unsigned char *) \ - (__const char *) (s2))[2]); \ - if (l2 > 2 && __result == 0) \ - __result = \ - (__s1[3] \ - - ((__const unsigned char *) \ - (__const char *) (s2))[3]); \ - } \ - } \ - __result; })) -#endif - - -/* Compare N characters of S1 and S2. */ -#ifndef _HAVE_STRING_ARCH_strncmp -# define strncmp(s1, s2, n) \ - (__extension__ (__builtin_constant_p (n) \ - && ((__builtin_constant_p (s1) \ - && strlen (s1) < ((size_t) (n))) \ - || (__builtin_constant_p (s2) \ - && strlen (s2) < ((size_t) (n)))) \ - ? strcmp (s1, s2) : strncmp (s1, s2, n))) -#endif - - -/* Return the length of the initial segment of S which - consists entirely of characters not in REJECT. */ -#if !defined _HAVE_STRING_ARCH_strcspn || defined _FORCE_INLINES -# ifndef _HAVE_STRING_ARCH_strcspn -# define strcspn(s, reject) \ - __extension__ \ - ({ char __r0, __r1, __r2; \ - (__builtin_constant_p (reject) && __string2_1bptr_p (reject) \ - ? ((__r0 = ((__const char *) (reject))[0], __r0 == '\0') \ - ? strlen (s) \ - : ((__r1 = ((__const char *) (reject))[1], __r1 == '\0') \ - ? __strcspn_c1 (s, __r0) \ - : ((__r2 = ((__const char *) (reject))[2], __r2 == '\0') \ - ? __strcspn_c2 (s, __r0, __r1) \ - : (((__const char *) (reject))[3] == '\0' \ - ? __strcspn_c3 (s, __r0, __r1, __r2) \ - : strcspn (s, reject))))) \ - : strcspn (s, reject)); }) -# endif - -__STRING_INLINE size_t __strcspn_c1 (__const char *__s, int __reject); -__STRING_INLINE size_t -__strcspn_c1 (__const char *__s, int __reject) -{ - register size_t __result = 0; - while (__s[__result] != '\0' && __s[__result] != __reject) - ++__result; - return __result; -} - -__STRING_INLINE size_t __strcspn_c2 (__const char *__s, int __reject1, - int __reject2); -__STRING_INLINE size_t -__strcspn_c2 (__const char *__s, int __reject1, int __reject2) -{ - register size_t __result = 0; - while (__s[__result] != '\0' && __s[__result] != __reject1 - && __s[__result] != __reject2) - ++__result; - return __result; -} - -__STRING_INLINE size_t __strcspn_c3 (__const char *__s, int __reject1, - int __reject2, int __reject3); -__STRING_INLINE size_t -__strcspn_c3 (__const char *__s, int __reject1, int __reject2, - int __reject3) -{ - register size_t __result = 0; - while (__s[__result] != '\0' && __s[__result] != __reject1 - && __s[__result] != __reject2 && __s[__result] != __reject3) - ++__result; - return __result; -} -#endif - - -/* Return the length of the initial segment of S which - consists entirely of characters in ACCEPT. */ -#if !defined _HAVE_STRING_ARCH_strspn || defined _FORCE_INLINES -# ifndef _HAVE_STRING_ARCH_strspn -# define strspn(s, accept) \ - __extension__ \ - ({ char __a0, __a1, __a2; \ - (__builtin_constant_p (accept) && __string2_1bptr_p (accept) \ - ? ((__a0 = ((__const char *) (accept))[0], __a0 == '\0') \ - ? ((void) (s), 0) \ - : ((__a1 = ((__const char *) (accept))[1], __a1 == '\0') \ - ? __strspn_c1 (s, __a0) \ - : ((__a2 = ((__const char *) (accept))[2], __a2 == '\0') \ - ? __strspn_c2 (s, __a0, __a1) \ - : (((__const char *) (accept))[3] == '\0' \ - ? __strspn_c3 (s, __a0, __a1, __a2) \ - : strspn (s, accept))))) \ - : strspn (s, accept)); }) -# endif - -__STRING_INLINE size_t __strspn_c1 (__const char *__s, int __accept); -__STRING_INLINE size_t -__strspn_c1 (__const char *__s, int __accept) -{ - register size_t __result = 0; - /* Please note that __accept never can be '\0'. */ - while (__s[__result] == __accept) - ++__result; - return __result; -} - -__STRING_INLINE size_t __strspn_c2 (__const char *__s, int __accept1, - int __accept2); -__STRING_INLINE size_t -__strspn_c2 (__const char *__s, int __accept1, int __accept2) -{ - register size_t __result = 0; - /* Please note that __accept1 and __accept2 never can be '\0'. */ - while (__s[__result] == __accept1 || __s[__result] == __accept2) - ++__result; - return __result; -} - -__STRING_INLINE size_t __strspn_c3 (__const char *__s, int __accept1, - int __accept2, int __accept3); -__STRING_INLINE size_t -__strspn_c3 (__const char *__s, int __accept1, int __accept2, int __accept3) -{ - register size_t __result = 0; - /* Please note that __accept1 to __accept3 never can be '\0'. */ - while (__s[__result] == __accept1 || __s[__result] == __accept2 - || __s[__result] == __accept3) - ++__result; - return __result; -} -#endif - - -/* Find the first occurrence in S of any character in ACCEPT. */ -#if !defined _HAVE_STRING_ARCH_strpbrk || defined _FORCE_INLINES -# ifndef _HAVE_STRING_ARCH_strpbrk -# define strpbrk(s, accept) \ - __extension__ \ - ({ char __a0, __a1, __a2; \ - (__builtin_constant_p (accept) && __string2_1bptr_p (accept) \ - ? ((__a0 = ((__const char *) (accept))[0], __a0 == '\0') \ - ? ((void) (s), NULL) \ - : ((__a1 = ((__const char *) (accept))[1], __a1 == '\0') \ - ? strchr (s, __a0) \ - : ((__a2 = ((__const char *) (accept))[2], __a2 == '\0') \ - ? __strpbrk_c2 (s, __a0, __a1) \ - : (((__const char *) (accept))[3] == '\0' \ - ? __strpbrk_c3 (s, __a0, __a1, __a2) \ - : strpbrk (s, accept))))) \ - : strpbrk (s, accept)); }) -# endif - -__STRING_INLINE char *__strpbrk_c2 (__const char *__s, int __accept1, - int __accept2); -__STRING_INLINE char * -__strpbrk_c2 (__const char *__s, int __accept1, int __accept2) -{ - /* Please note that __accept1 and __accept2 never can be '\0'. */ - while (*__s != '\0' && *__s != __accept1 && *__s != __accept2) - ++__s; - return *__s == '\0' ? NULL : (char *) (size_t) __s; -} - -__STRING_INLINE char *__strpbrk_c3 (__const char *__s, int __accept1, - int __accept2, int __accept3); -__STRING_INLINE char * -__strpbrk_c3 (__const char *__s, int __accept1, int __accept2, - int __accept3) -{ - /* Please note that __accept1 to __accept3 never can be '\0'. */ - while (*__s != '\0' && *__s != __accept1 && *__s != __accept2 - && *__s != __accept3) - ++__s; - return *__s == '\0' ? NULL : (char *) (size_t) __s; -} -#endif - - -/* Find the first occurrence of NEEDLE in HAYSTACK. Newer gcc versions - do this itself. */ -#if !defined _HAVE_STRING_ARCH_strstr && !__GNUC_PREREQ (2, 97) -# define strstr(haystack, needle) \ - (__extension__ (__builtin_constant_p (needle) && __string2_1bptr_p (needle) \ - ? (((__const char *) (needle))[0] == '\0' \ - ? (char *) (size_t) (haystack) \ - : (((__const char *) (needle))[1] == '\0' \ - ? strchr (haystack, \ - ((__const char *) (needle))[0]) \ - : strstr (haystack, needle))) \ - : strstr (haystack, needle))) -#endif - - -#if !defined _HAVE_STRING_ARCH_strtok_r || defined _FORCE_INLINES -# ifndef _HAVE_STRING_ARCH_strtok_r -# define __strtok_r(s, sep, nextp) \ - (__extension__ (__builtin_constant_p (sep) && __string2_1bptr_p (sep) \ - ? (((__const char *) (sep))[0] != '\0' \ - && ((__const char *) (sep))[1] == '\0' \ - ? __strtok_r_1c (s, ((__const char *) (sep))[0], nextp) \ - : __strtok_r (s, sep, nextp)) \ - : __strtok_r (s, sep, nextp))) -# endif - -__STRING_INLINE char *__strtok_r_1c (char *__s, char __sep, char **__nextp); -__STRING_INLINE char * -__strtok_r_1c (char *__s, char __sep, char **__nextp) -{ - char *__result; - if (__s == NULL) - __s = *__nextp; - while (*__s == __sep) - ++__s; - __result = NULL; - if (*__s != '\0') - { - __result = __s++; - while (*__s != '\0') - if (*__s++ == __sep) - { - __s[-1] = '\0'; - break; - } - *__nextp = __s; - } - return __result; -} -# if defined __USE_POSIX || defined __USE_MISC -# define strtok_r(s, sep, nextp) __strtok_r (s, sep, nextp) -# endif -#endif - - -#if !defined _HAVE_STRING_ARCH_strsep || defined _FORCE_INLINES -# ifndef _HAVE_STRING_ARCH_strsep - -extern char *__strsep_g (char **__stringp, __const char *__delim); -# define __strsep(s, reject) \ - __extension__ \ - ({ char __r0, __r1, __r2; \ - (__builtin_constant_p (reject) && __string2_1bptr_p (reject) \ - && (__r0 = ((__const char *) (reject))[0], \ - ((__const char *) (reject))[0] != '\0') \ - ? ((__r1 = ((__const char *) (reject))[1], \ - ((__const char *) (reject))[1] == '\0') \ - ? __strsep_1c (s, __r0) \ - : ((__r2 = ((__const char *) (reject))[2], __r2 == '\0') \ - ? __strsep_2c (s, __r0, __r1) \ - : (((__const char *) (reject))[3] == '\0' \ - ? __strsep_3c (s, __r0, __r1, __r2) \ - : __strsep_g (s, reject)))) \ - : __strsep_g (s, reject)); }) -# endif - -__STRING_INLINE char *__strsep_1c (char **__s, char __reject); -__STRING_INLINE char * -__strsep_1c (char **__s, char __reject) -{ - register char *__retval = *__s; - if (__retval != NULL && (*__s = strchr (__retval, __reject)) != NULL) - *(*__s)++ = '\0'; - return __retval; -} - -__STRING_INLINE char *__strsep_2c (char **__s, char __reject1, char __reject2); -__STRING_INLINE char * -__strsep_2c (char **__s, char __reject1, char __reject2) -{ - register char *__retval = *__s; - if (__retval != NULL) - { - register char *__cp = __retval; - while (1) - { - if (*__cp == '\0') - { - __cp = NULL; - break; - } - if (*__cp == __reject1 || *__cp == __reject2) - { - *__cp++ = '\0'; - break; - } - ++__cp; - } - *__s = __cp; - } - return __retval; -} - -__STRING_INLINE char *__strsep_3c (char **__s, char __reject1, char __reject2, - char __reject3); -__STRING_INLINE char * -__strsep_3c (char **__s, char __reject1, char __reject2, char __reject3) -{ - register char *__retval = *__s; - if (__retval != NULL) - { - register char *__cp = __retval; - while (1) - { - if (*__cp == '\0') - { - __cp = NULL; - break; - } - if (*__cp == __reject1 || *__cp == __reject2 || *__cp == __reject3) - { - *__cp++ = '\0'; - break; - } - ++__cp; - } - *__s = __cp; - } - return __retval; -} -# ifdef __USE_BSD -# define strsep(s, reject) __strsep (s, reject) -# endif -#endif - -/* We need the memory allocation functions for inline strdup(). - Referring to stdlib.h (even minimally) is not allowed - in any of the tight standards compliant modes. */ -#ifdef __USE_MISC - -# if !defined _HAVE_STRING_ARCH_strdup || !defined _HAVE_STRING_ARCH_strndup -# define __need_malloc_and_calloc -# include <stdlib.h> -# endif - -# ifndef _HAVE_STRING_ARCH_strdup - -extern char *__strdup (__const char *__string) __THROW __attribute_malloc__; -# define __strdup(s) \ - (__extension__ (__builtin_constant_p (s) && __string2_1bptr_p (s) \ - ? (((__const char *) (s))[0] == '\0' \ - ? (char *) calloc (1, 1) \ - : ({ size_t __len = strlen (s) + 1; \ - char *__retval = (char *) malloc (__len); \ - if (__retval != NULL) \ - __retval = (char *) memcpy (__retval, s, __len); \ - __retval; })) \ - : __strdup (s))) - -# if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN_EXTENDED -# define strdup(s) __strdup (s) -# endif -# endif - -# ifndef _HAVE_STRING_ARCH_strndup - -extern char *__strndup (__const char *__string, size_t __n) - __THROW __attribute_malloc__; -# define __strndup(s, n) \ - (__extension__ (__builtin_constant_p (s) && __string2_1bptr_p (s) \ - ? (((__const char *) (s))[0] == '\0' \ - ? (char *) calloc (1, 1) \ - : ({ size_t __len = strlen (s) + 1; \ - size_t __n = (n); \ - char *__retval; \ - if (__n < __len) \ - __len = __n; \ - __retval = (char *) malloc (__len); \ - if (__retval != NULL) \ - { \ - __retval[__len - 1] = '\0'; \ - __retval = (char *) memcpy (__retval, s, \ - __len - 1); \ - } \ - __retval; })) \ - : __strndup (s, n))) - -# ifdef __USE_GNU -# define strndup(s, n) __strndup (s, n) -# endif -# endif - -#endif /* Use misc. or use GNU. */ - -#ifndef _FORCE_INLINES -# undef __STRING_INLINE -#endif - -#endif /* No string inlines. */ diff --git a/libc/sysdeps/linux/m68k/bits/stropts.h b/libc/sysdeps/linux/m68k/bits/stropts.h deleted file mode 100644 index 21538c31d..000000000 --- a/libc/sysdeps/linux/m68k/bits/stropts.h +++ /dev/null @@ -1,227 +0,0 @@ -/* Copyright (C) 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. */ - -#ifndef _BITS_STROPTS_H -#define _BITS_STROPTS_H 1 - -#include <bits/types.h> - -/* Macros used as `request' argument to `ioctl'. */ -#define __SID ('S' << 8) - -#define I_NREAD (__SID | 1) /* Counts the number of data bytes in the data - block in the first message. */ -#define I_PUSH (__SID | 2) /* Push STREAMS module onto top of the current - STREAM, just below the STREAM head. */ -#define I_POP (__SID | 3) /* Remove STREAMS module from just below the - STREAM head. */ -#define I_LOOK (__SID | 4) /* Retrieve the name of the module just below - the STREAM head and place it in a character - string. */ -#define I_FLUSH (__SID | 5) /* Flush all input and/or output. */ -#define I_SRDOPT (__SID | 6) /* Sets the read mode. */ -#define I_GRDOPT (__SID | 7) /* Returns the current read mode setting. */ -#define I_STR (__SID | 8) /* Construct an internal STREAMS `ioctl' - message and send that message downstream. */ -#define I_SETSIG (__SID | 9) /* Inform the STREAM head that the process - wants the SIGPOLL signal issued. */ -#define I_GETSIG (__SID |10) /* Return the events for which the calling - process is currently registered to be sent - a SIGPOLL signal. */ -#define I_FIND (__SID |11) /* Compares the names of all modules currently - present in the STREAM to the name pointed to - by `arg'. */ -#define I_LINK (__SID |12) /* Connect two STREAMs. */ -#define I_UNLINK (__SID |13) /* Disconnects the two STREAMs. */ -#define I_PEEK (__SID |15) /* Allows a process to retrieve the information - in the first message on the STREAM head read - queue without taking the message off the - queue. */ -#define I_FDINSERT (__SID |16) /* Create a message from the specified - buffer(s), adds information about another - STREAM, and send the message downstream. */ -#define I_SENDFD (__SID |17) /* Requests the STREAM associated with `fildes' - to send a message, containing a file - pointer, to the STREAM head at the other end - of a STREAMS pipe. */ -#define I_RECVFD (__SID |14) /* Non-EFT definition. */ -#define I_SWROPT (__SID |19) /* Set the write mode. */ -#define I_GWROPT (__SID |20) /* Return the current write mode setting. */ -#define I_LIST (__SID |21) /* List all the module names on the STREAM, up - to and including the topmost driver name. */ -#define I_PLINK (__SID |22) /* Connect two STREAMs with a persistent - link. */ -#define I_PUNLINK (__SID |23) /* Disconnect the two STREAMs that were - connected with a persistent link. */ -#define I_FLUSHBAND (__SID |28) /* Flush only band specified. */ -#define I_CKBAND (__SID |29) /* Check if the message of a given priority - band exists on the STREAM head read - queue. */ -#define I_GETBAND (__SID |30) /* Return the priority band of the first - message on the STREAM head read queue. */ -#define I_ATMARK (__SID |31) /* See if the current message on the STREAM - head read queue is "marked" by some module - downstream. */ -#define I_SETCLTIME (__SID |32) /* Set the time the STREAM head will delay when - a STREAM is closing and there is data on - the write queues. */ -#define I_GETCLTIME (__SID |33) /* Get current value for closing timeout. */ -#define I_CANPUT (__SID |34) /* Check if a certain band is writable. */ - - -/* Used in `I_LOOK' request. */ -#define FMNAMESZ 8 /* compatibility w/UnixWare/Solaris. */ - -/* Flush options. */ -#define FLUSHR 0x01 /* Flush read queues. */ -#define FLUSHW 0x02 /* Flush write queues. */ -#define FLUSHRW 0x03 /* Flush read and write queues. */ -#ifdef __USE_GNU -# define FLUSHBAND 0x04 /* Flush only specified band. */ -#endif - -/* Possible arguments for `I_SETSIG'. */ -#define S_INPUT 0x0001 /* A message, other than a high-priority - message, has arrived. */ -#define S_HIPRI 0x0002 /* A high-priority message is present. */ -#define S_OUTPUT 0x0004 /* The write queue for normal data is no longer - full. */ -#define S_MSG 0x0008 /* A STREAMS signal message that contains the - SIGPOLL signal reaches the front of the - STREAM head read queue. */ -#define S_ERROR 0x0010 /* Notification of an error condition. */ -#define S_HANGUP 0x0020 /* Notification of a hangup. */ -#define S_RDNORM 0x0040 /* A normal message has arrived. */ -#define S_WRNORM S_OUTPUT -#define S_RDBAND 0x0080 /* A message with a non-zero priority has - arrived. */ -#define S_WRBAND 0x0100 /* The write queue for a non-zero priority - band is no longer full. */ -#define S_BANDURG 0x0200 /* When used in conjunction with S_RDBAND, - SIGURG is generated instead of SIGPOLL when - a priority message reaches the front of the - STREAM head read queue. */ - -/* Option for `I_PEEK'. */ -#define RS_HIPRI 0x01 /* Only look for high-priority messages. */ - -/* Options for `I_SRDOPT'. */ -#define RNORM 0x0000 /* Byte-STREAM mode, the default. */ -#define RMSGD 0x0001 /* Message-discard mode. */ -#define RMSGN 0x0002 /* Message-nondiscard mode. */ -#define RPROTDAT 0x0004 /* Deliver the control part of a message as - data. */ -#define RPROTDIS 0x0008 /* Discard the control part of a message, - delivering any data part. */ -#define RPROTNORM 0x0010 /* Fail `read' with EBADMSG if a message - containing a control part is at the front - of the STREAM head read queue. */ -#ifdef __USE_GNU -# define RPROTMASK 0x001C /* The RPROT bits */ -#endif - -/* Possible mode for `I_SWROPT'. */ -#define SNDZERO 0x001 /* Send a zero-length message downstream when a - `write' of 0 bytes occurs. */ -#ifdef __USE_GNU -# define SNDPIPE 0x002 /* Send SIGPIPE on write and putmsg if - sd_werror is set. */ -#endif - -/* Arguments for `I_ATMARK'. */ -#define ANYMARK 0x01 /* Check if the message is marked. */ -#define LASTMARK 0x02 /* Check if the message is the last one marked - on the queue. */ - -/* Argument for `I_UNLINK'. */ -#ifdef __USE_GNU -# define MUXID_ALL (-1) /* Unlink all STREAMs linked to the STREAM - associated with `fildes'. */ -#endif - - -/* Macros for `getmsg', `getpmsg', `putmsg' and `putpmsg'. */ -#define MSG_HIPRI 0x01 /* Send/receive high priority message. */ -#define MSG_ANY 0x02 /* Receive any message. */ -#define MSG_BAND 0x04 /* Receive message from specified band. */ - -/* Values returned by getmsg and getpmsg */ -#define MORECTL 1 /* More control information is left in - message. */ -#define MOREDATA 2 /* More data is left in message. */ - - -/* Structure used for the I_FLUSHBAND ioctl on streams. */ -struct bandinfo - { - unsigned char bi_pri; - int bi_flag; - }; - -struct strbuf - { - int maxlen; /* Maximum buffer length. */ - int len; /* Length of data. */ - char *buf; /* Pointer to buffer. */ - }; - -struct strpeek - { - struct strbuf ctlbuf; - struct strbuf databuf; - t_uscalar_t flags; /* UnixWare/Solaris compatibility. */ - }; - -struct strfdinsert - { - struct strbuf ctlbuf; - struct strbuf databuf; - t_uscalar_t flags; /* UnixWare/Solaris compatibility. */ - int fildes; - int offset; - }; - -struct strioctl - { - int ic_cmd; - int ic_timout; - int ic_len; - char *ic_dp; - }; - -struct strrecvfd - { - int fd; - uid_t uid; - gid_t gid; - char __fill[8]; /* UnixWare/Solaris compatibility */ - }; - - -struct str_mlist - { - char l_name[FMNAMESZ + 1]; - }; - -struct str_list - { - int sl_nmods; - struct str_mlist *sl_modlist; - }; - -#endif /* bits/stropts.h */ diff --git a/libc/sysdeps/linux/m68k/bits/termios.h b/libc/sysdeps/linux/m68k/bits/termios.h deleted file mode 100644 index 887b309ad..000000000 --- a/libc/sysdeps/linux/m68k/bits/termios.h +++ /dev/null @@ -1,213 +0,0 @@ -/* termios type and macro definitions. Linux version. - Copyright (C) 1993, 94, 95, 96, 97, 98, 99 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 _TERMIOS_H -# error "Never include <bits/termios.h> directly; use <termios.h> instead." -#endif - -typedef unsigned char cc_t; -typedef unsigned int speed_t; -typedef unsigned int tcflag_t; - -#define NCCS 32 -struct termios - { - tcflag_t c_iflag; /* input mode flags */ - tcflag_t c_oflag; /* output mode flags */ - tcflag_t c_cflag; /* control mode flags */ - tcflag_t c_lflag; /* local mode flags */ - cc_t c_line; /* line discipline */ - cc_t c_cc[NCCS]; /* control characters */ - speed_t c_ispeed; /* input speed */ - speed_t c_ospeed; /* output speed */ - }; - -/* c_cc characters */ -#define VINTR 0 -#define VQUIT 1 -#define VERASE 2 -#define VKILL 3 -#define VEOF 4 -#define VTIME 5 -#define VMIN 6 -#define VSWTC 7 -#define VSTART 8 -#define VSTOP 9 -#define VSUSP 10 -#define VEOL 11 -#define VREPRINT 12 -#define VDISCARD 13 -#define VWERASE 14 -#define VLNEXT 15 -#define VEOL2 16 - -/* c_iflag bits */ -#define IGNBRK 0000001 -#define BRKINT 0000002 -#define IGNPAR 0000004 -#define PARMRK 0000010 -#define INPCK 0000020 -#define ISTRIP 0000040 -#define INLCR 0000100 -#define IGNCR 0000200 -#define ICRNL 0000400 -#define IUCLC 0001000 -#define IXON 0002000 -#define IXANY 0004000 -#define IXOFF 0010000 -#define IMAXBEL 0020000 - -/* c_oflag bits */ -#define OPOST 0000001 -#define OLCUC 0000002 -#define ONLCR 0000004 -#define OCRNL 0000010 -#define ONOCR 0000020 -#define ONLRET 0000040 -#define OFILL 0000100 -#define OFDEL 0000200 -#if defined __USE_MISC || defined __USE_XOPEN -# define NLDLY 0000400 -# define NL0 0000000 -# define NL1 0000400 -# define CRDLY 0003000 -# define CR0 0000000 -# define CR1 0001000 -# define CR2 0002000 -# define CR3 0003000 -# define TABDLY 0014000 -# define TAB0 0000000 -# define TAB1 0004000 -# define TAB2 0010000 -# define TAB3 0014000 -# define BSDLY 0020000 -# define BS0 0000000 -# define BS1 0020000 -# define FFDLY 0100000 -# define FF0 0000000 -# define FF1 0100000 -#endif - -#define VTDLY 0040000 -#define VT0 0000000 -#define VT1 0040000 - -#ifdef __USE_MISC -# define XTABS 0014000 -#endif - -/* c_cflag bit meaning */ -#ifdef __USE_MISC -# define CBAUD 0010017 -#endif -#define B0 0000000 /* hang up */ -#define B50 0000001 -#define B75 0000002 -#define B110 0000003 -#define B134 0000004 -#define B150 0000005 -#define B200 0000006 -#define B300 0000007 -#define B600 0000010 -#define B1200 0000011 -#define B1800 0000012 -#define B2400 0000013 -#define B4800 0000014 -#define B9600 0000015 -#define B19200 0000016 -#define B38400 0000017 -#ifdef __USE_MISC -# define EXTA B19200 -# define EXTB B38400 -#endif -#define CSIZE 0000060 -#define CS5 0000000 -#define CS6 0000020 -#define CS7 0000040 -#define CS8 0000060 -#define CSTOPB 0000100 -#define CREAD 0000200 -#define PARENB 0000400 -#define PARODD 0001000 -#define HUPCL 0002000 -#define CLOCAL 0004000 -#ifdef __USE_MISC -# define CBAUDEX 0010000 -#endif -#define B57600 0010001 -#define B115200 0010002 -#define B230400 0010003 -#define B460800 0010004 -#define B500000 0010005 -#define B576000 0010006 -#define B921600 0010007 -#define B1000000 0010010 -#define B1152000 0010011 -#define B1500000 0010012 -#define B2000000 0010013 -#define B2500000 0010014 -#define B3000000 0010015 -#define B3500000 0010016 -#define B4000000 0010017 -#define __MAX_BAUD B4000000 -#ifdef __USE_MISC -# define CIBAUD 002003600000 /* input baud rate (not used) */ -# define CRTSCTS 020000000000 /* flow control */ -#endif - -/* c_lflag bits */ -#define ISIG 0000001 -#define ICANON 0000002 -#if defined __USE_MISC || defined __USE_XOPEN -# define XCASE 0000004 -#endif -#define ECHO 0000010 -#define ECHOE 0000020 -#define ECHOK 0000040 -#define ECHONL 0000100 -#define NOFLSH 0000200 -#define TOSTOP 0000400 -#ifdef __USE_MISC -# define ECHOCTL 0001000 -# define ECHOPRT 0002000 -# define ECHOKE 0004000 -# define FLUSHO 0010000 -# define PENDIN 0040000 -#endif -#define IEXTEN 0100000 - -/* tcflow() and TCXONC use these */ -#define TCOOFF 0 -#define TCOON 1 -#define TCIOFF 2 -#define TCION 3 - -/* tcflush() and TCFLSH use these */ -#define TCIFLUSH 0 -#define TCOFLUSH 1 -#define TCIOFLUSH 2 - -/* tcsetattr uses these */ -#define TCSANOW 0 -#define TCSADRAIN 1 -#define TCSAFLUSH 2 - - -#define _IOT_termios /* Hurd ioctl type field. */ \ - _IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2) diff --git a/libc/sysdeps/linux/m68k/bits/time.h b/libc/sysdeps/linux/m68k/bits/time.h deleted file mode 100644 index 2a6873f00..000000000 --- a/libc/sysdeps/linux/m68k/bits/time.h +++ /dev/null @@ -1,69 +0,0 @@ -/* System-dependent timing definitions. Linux version. - Copyright (C) 1996, 1997, 1999, 2000, 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. */ - -/* - * Never include this file directly; use <time.h> instead. - */ - -#ifndef __need_timeval -# ifndef _BITS_TIME_H -# define _BITS_TIME_H 1 - -/* ISO/IEC 9899:1990 7.12.1: <time.h> - The macro `CLOCKS_PER_SEC' is the number per second of the value - returned by the `clock' function. */ -/* CAE XSH, Issue 4, Version 2: <time.h> - The value of CLOCKS_PER_SEC is required to be 1 million on all - XSI-conformant systems. */ -# define CLOCKS_PER_SEC 1000000l - -# if !defined __STRICT_ANSI__ && !defined __USE_XOPEN2K -/* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK - presents the real value for clock ticks per second for the system. */ -# include <bits/types.h> -extern long int __sysconf (int); -# define CLK_TCK ((__clock_t) __sysconf (2)) /* 2 is _SC_CLK_TCK */ -# endif - -# ifdef __USE_POSIX199309 -/* Identifier for system-wide realtime clock. */ -# define CLOCK_REALTIME 0 - -/* Flag to indicate time is absolute. */ -# define TIMER_ABSTIME 1 -# endif - -# endif /* bits/time.h */ -#endif - -#ifdef __need_timeval -# undef __need_timeval -# ifndef _STRUCT_TIMEVAL -# define _STRUCT_TIMEVAL 1 -# include <bits/types.h> - -/* A time value that is accurate to the nearest - microsecond but also has a range of years. */ -struct timeval - { - __time_t tv_sec; /* Seconds. */ - __suseconds_t tv_usec; /* Microseconds. */ - }; -# endif /* struct timeval */ -#endif /* need timeval */ diff --git a/libc/sysdeps/linux/m68k/bits/types.h b/libc/sysdeps/linux/m68k/bits/types.h deleted file mode 100644 index bdda9388a..000000000 --- a/libc/sysdeps/linux/m68k/bits/types.h +++ /dev/null @@ -1,146 +0,0 @@ -/* Copyright (C) 1991,92,1994-1999,2000,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. */ - -/* - * Never include this file directly; use <sys/types.h> instead. - */ - -#ifndef _BITS_TYPES_H -#define _BITS_TYPES_H 1 - -#include <features.h> - -#define __need_size_t -#include <stddef.h> - -/* Convenience types. */ -typedef unsigned char __u_char; -typedef unsigned short __u_short; -typedef unsigned int __u_int; -typedef unsigned long __u_long; -#ifdef __GNUC__ -__extension__ typedef unsigned long long int __u_quad_t; -__extension__ typedef long long int __quad_t; -#else -typedef struct - { - long int __val[2]; - } __quad_t; -typedef struct - { - __u_long __val[2]; - } __u_quad_t; -#endif -typedef signed char __int8_t; -typedef unsigned char __uint8_t; -typedef signed short int __int16_t; -typedef unsigned short int __uint16_t; -typedef signed int __int32_t; -typedef unsigned int __uint32_t; -#ifdef __GNUC__ -__extension__ typedef signed long long int __int64_t; -__extension__ typedef unsigned long long int __uint64_t; -#endif -typedef __quad_t *__qaddr_t; - -typedef __u_quad_t __dev_t; /* Type of device numbers. */ -typedef __u_int __uid_t; /* Type of user identifications. */ -typedef __u_int __gid_t; /* Type of group identifications. */ -typedef __u_long __ino_t; /* Type of file serial numbers. */ -typedef __u_int __mode_t; /* Type of file attribute bitmasks. */ -typedef __u_int __nlink_t; /* Type of file link counts. */ -typedef long int __off_t; /* Type of file sizes and offsets. */ -typedef __quad_t __loff_t; /* Type of file sizes and offsets. */ -typedef int __pid_t; /* Type of process identifications. */ -typedef int __ssize_t; /* Type of a byte count, or error. */ -typedef __u_long __rlim_t; /* Type of resource counts. */ -typedef __u_quad_t __rlim64_t; /* Type of resource counts (LFS). */ -typedef __u_int __id_t; /* General type for ID. */ - -typedef struct - { - int __val[2]; - } __fsid_t; /* Type of file system IDs. */ - -/* Everythin' else. */ -typedef int __daddr_t; /* The type of a disk address. */ -typedef char *__caddr_t; -typedef long int __time_t; -typedef unsigned int __useconds_t; -typedef long int __suseconds_t; -typedef long int __swblk_t; /* Type of a swap block maybe? */ - -typedef long int __clock_t; - -/* Clock ID used in clock and timer functions. */ -typedef int __clockid_t; - -/* Timer ID returned by `timer_create'. */ -typedef int __timer_t; - - -/* Number of descriptors that can fit in an `fd_set'. */ -#define __FD_SETSIZE 1024 - - -typedef int __key_t; - -/* Used in `struct shmid_ds'. */ -typedef unsigned short int __ipc_pid_t; - - -/* Type to represent block size. */ -typedef long int __blksize_t; - -/* Types from the Large File Support interface. */ - -/* Type to count number os disk blocks. */ -typedef long int __blkcnt_t; -typedef __quad_t __blkcnt64_t; - -/* Type to count file system blocks. */ -typedef __u_long __fsblkcnt_t; -typedef __u_quad_t __fsblkcnt64_t; - -/* Type to count file system inodes. */ -typedef __u_long __fsfilcnt_t; -typedef __u_quad_t __fsfilcnt64_t; - -/* Type of file serial numbers. */ -typedef __u_quad_t __ino64_t; - -/* Type of file sizes and offsets. */ -typedef __loff_t __off64_t; - -/* Used in XTI. */ -typedef long int __t_scalar_t; -typedef unsigned long int __t_uscalar_t; - -/* Duplicates info from stdint.h but this is used in unistd.h. */ -typedef int __intptr_t; - -/* Duplicate info from sys/socket.h. */ -typedef unsigned int __socklen_t; - - -/* Now add the thread types. */ -#if defined __USE_POSIX199506 || defined __USE_UNIX98 -# include <bits/pthreadtypes.h> -#endif - -#endif /* bits/types.h */ diff --git a/libc/sysdeps/linux/m68k/bits/uio.h b/libc/sysdeps/linux/m68k/bits/uio.h deleted file mode 100644 index 84b4805fe..000000000 --- a/libc/sysdeps/linux/m68k/bits/uio.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (C) 1996, 1997 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 _SYS_UIO_H -# error "Never include <bits/uio.h> directly; use <sys/uio.h> instead." -#endif - - -#include <sys/types.h> - - -/* We should normally use the Linux kernel header file to define this - type and macros but this calls for trouble because of the header - includes other kernel headers. */ - -/* Size of object which can be written atomically. - - This macro has different values in different kernel versions. The - latest versions of ther kernel use 1024 and this is good choice. Since - the C library implementation of readv/writev is able to emulate the - functionality even if the currently running kernel does not support - this large value the readv/writev call will not fail because of this. */ -#define UIO_MAXIOV 1024 - - -/* Structure for scatter/gather I/O. */ -struct iovec - { - void *iov_base; /* Pointer to data. */ - size_t iov_len; /* Length of data. */ - }; diff --git a/libc/sysdeps/linux/m68k/bits/utmp.h b/libc/sysdeps/linux/m68k/bits/utmp.h deleted file mode 100644 index 2ed29bbb4..000000000 --- a/libc/sysdeps/linux/m68k/bits/utmp.h +++ /dev/null @@ -1,106 +0,0 @@ -/* The `struct utmp' type, describing entries in the utmp file. GNU version. - Copyright (C) 1993, 1996, 1997, 1998, 1999 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 _UTMP_H -# error "Never include <bits/utmp.h> directly; use <utmp.h> instead." -#endif - -#include <paths.h> -#include <sys/time.h> -#include <sys/types.h> - - -#define UT_LINESIZE 32 -#define UT_NAMESIZE 32 -#define UT_HOSTSIZE 256 - - -/* The structure describing an entry in the database of - previous logins. */ -struct lastlog - { - __time_t ll_time; - char ll_line[UT_LINESIZE]; - char ll_host[UT_HOSTSIZE]; - }; - - -/* The structure describing the status of a terminated process. This - type is used in `struct utmp' below. */ -struct exit_status - { - short int e_termination; /* Process termination status. */ - short int e_exit; /* Process exit status. */ - }; - - -/* The structure describing an entry in the user accounting database. */ -struct utmp -{ - short int ut_type; /* Type of login. */ - pid_t ut_pid; /* Process ID of login process. */ - char ut_line[UT_LINESIZE]; /* Devicename. */ - char ut_id[4]; /* Inittab ID. */ - char ut_user[UT_NAMESIZE]; /* Username. */ - char ut_host[UT_HOSTSIZE]; /* Hostname for remote login. */ - struct exit_status ut_exit; /* Exit status of a process marked - as DEAD_PROCESS. */ - long int ut_session; /* Session ID, used for windowing. */ - struct timeval ut_tv; /* Time entry was made. */ - int32_t ut_addr_v6[4]; /* Internet address of remote host. */ - char __unused[20]; /* Reserved for future use. */ -}; - -/* Backwards compatibility hacks. */ -#define ut_name ut_user -#ifndef _NO_UT_TIME -/* We have a problem here: `ut_time' is also used otherwise. Define - _NO_UT_TIME if the compiler complains. */ -# define ut_time ut_tv.tv_sec -#endif -#define ut_xtime ut_tv.tv_sec -#define ut_addr ut_addr_v6[0] - - -/* Values for the `ut_type' field of a `struct utmp'. */ -#define EMPTY 0 /* No valid user accounting information. */ - -#define RUN_LVL 1 /* The system's runlevel. */ -#define BOOT_TIME 2 /* Time of system boot. */ -#define NEW_TIME 3 /* Time after system clock changed. */ -#define OLD_TIME 4 /* Time when system clock changed. */ - -#define INIT_PROCESS 5 /* Process spawned by the init process. */ -#define LOGIN_PROCESS 6 /* Session leader of a logged in user. */ -#define USER_PROCESS 7 /* Normal process. */ -#define DEAD_PROCESS 8 /* Terminated process. */ - -#define ACCOUNTING 9 - -/* Old Linux name for the EMPTY type. */ -#define UT_UNKNOWN EMPTY - - -/* Tell the user that we have a modern system with UT_HOST, UT_PID, - UT_TYPE, UT_ID and UT_TV fields. */ -#define _HAVE_UT_TYPE 1 -#define _HAVE_UT_PID 1 -#define _HAVE_UT_ID 1 -#define _HAVE_UT_TV 1 -#define _HAVE_UT_HOST 1 diff --git a/libc/sysdeps/linux/m68k/bits/utmpx.h b/libc/sysdeps/linux/m68k/bits/utmpx.h deleted file mode 100644 index 99735370b..000000000 --- a/libc/sysdeps/linux/m68k/bits/utmpx.h +++ /dev/null @@ -1,89 +0,0 @@ -/* Structures and definitions for the user accounting database. GNU version. - Copyright (C) 1997, 1998, 2000, 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. */ - -#ifndef _UTMPX_H -# error "Never include <bits/utmpx.h> directly; use <utmpx.h> instead." -#endif - -#include <bits/types.h> -#include <sys/time.h> - - -#ifdef __USE_GNU -# include <paths.h> -# define _PATH_UTMPX _PATH_UTMP -# define _PATH_WTMPX _PATH_WTMP -#endif - - -#define __UT_LINESIZE 32 -#define __UT_NAMESIZE 32 -#define __UT_HOSTSIZE 256 - - -/* The structure describing the status of a terminated process. This - type is used in `struct utmpx' below. */ -struct __exit_status - { -#ifdef __USE_GNU - short int e_termination; /* Process termination status. */ - short int e_exit; /* Process exit status. */ -#else - short int __e_termination; /* Process termination status. */ - short int __e_exit; /* Process exit status. */ -#endif - }; - - -/* The structure describing an entry in the user accounting database. */ -struct utmpx -{ - short int ut_type; /* Type of login. */ - __pid_t ut_pid; /* Process ID of login process. */ - char ut_line[__UT_LINESIZE]; /* Devicename. */ - char ut_id[4]; /* Inittab ID. */ - char ut_user[__UT_NAMESIZE]; /* Username. */ - char ut_host[__UT_HOSTSIZE]; /* Hostname for remote login. */ - struct __exit_status ut_exit; /* Exit status of a process marked - as DEAD_PROCESS. */ - long int ut_session; /* Session ID, used for windowing. */ - struct timeval ut_tv; /* Time entry was made. */ - __int32_t ut_addr_v6[4]; /* Internet address of remote host. */ - char __unused[20]; /* Reserved for future use. */ -}; - - -/* Values for the `ut_type' field of a `struct utmpx'. */ -#define EMPTY 0 /* No valid user accounting information. */ - -#ifdef __USE_GNU -# define RUN_LVL 1 /* The system's runlevel. */ -#endif -#define BOOT_TIME 2 /* Time of system boot. */ -#define NEW_TIME 3 /* Time after system clock changed. */ -#define OLD_TIME 4 /* Time when system clock changed. */ - -#define INIT_PROCESS 5 /* Process spawned by the init process. */ -#define LOGIN_PROCESS 6 /* Session leader of a logged in user. */ -#define USER_PROCESS 7 /* Normal process. */ -#define DEAD_PROCESS 8 /* Terminated process. */ - -#ifdef __USE_GNU -# define ACCOUNTING 9 /* System accounting. */ -#endif diff --git a/libc/sysdeps/linux/m68k/bits/utsname.h b/libc/sysdeps/linux/m68k/bits/utsname.h deleted file mode 100644 index 35e71e3ba..000000000 --- a/libc/sysdeps/linux/m68k/bits/utsname.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 1995, 1996, 1997 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 _SYS_UTSNAME_H -# error "Never include <bits/utsname.h> directly; use <sys/utsname.h> instead." -#endif - -/* Length of the entries in `struct utsname' is 65. */ -#define _UTSNAME_LENGTH 65 - -/* Linux provides as additional information in the `struct utsname' - the name of the current domain. Define _UTSNAME_DOMAIN_LENGTH - to a value != 0 to activate this entry. */ -#define _UTSNAME_DOMAIN_LENGTH _UTSNAME_LENGTH diff --git a/libc/sysdeps/linux/m68k/bits/waitflags.h b/libc/sysdeps/linux/m68k/bits/waitflags.h deleted file mode 100644 index 1303c6c36..000000000 --- a/libc/sysdeps/linux/m68k/bits/waitflags.h +++ /dev/null @@ -1,30 +0,0 @@ -/* Definitions of flag bits for `waitpid' et al. - Copyright (C) 1992, 1996, 1997, 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. */ - -#if !defined _SYS_WAIT_H && !defined _STDLIB_H -# error "Never include <bits/waitflags.h> directly; use <sys/wait.h> instead." -#endif - - -/* Bits in the third argument to `waitpid'. */ -#define WNOHANG 1 /* Don't block waiting. */ -#define WUNTRACED 2 /* Report status of stopped children. */ - -#define __WALL 0x40000000 /* Wait for any child. */ -#define __WCLONE 0x80000000 /* Wait for cloned process. */ diff --git a/libc/sysdeps/linux/m68k/bits/waitstatus.h b/libc/sysdeps/linux/m68k/bits/waitstatus.h deleted file mode 100644 index 982c9dbb2..000000000 --- a/libc/sysdeps/linux/m68k/bits/waitstatus.h +++ /dev/null @@ -1,104 +0,0 @@ -/* Definitions of status bits for `wait' et al. - Copyright (C) 1992, 1994, 1996, 1997, 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. */ - -#if !defined _SYS_WAIT_H && !defined _STDLIB_H -# error "Never include <bits/waitstatus.h> directly; use <sys/wait.h> instead." -#endif - - -/* Everything extant so far uses these same bits. */ - - -/* If WIFEXITED(STATUS), the low-order 8 bits of the status. */ -#define __WEXITSTATUS(status) (((status) & 0xff00) >> 8) - -/* If WIFSIGNALED(STATUS), the terminating signal. */ -#define __WTERMSIG(status) ((status) & 0x7f) - -/* If WIFSTOPPED(STATUS), the signal that stopped the child. */ -#define __WSTOPSIG(status) __WEXITSTATUS(status) - -/* Nonzero if STATUS indicates normal termination. */ -#define __WIFEXITED(status) (__WTERMSIG(status) == 0) - -/* Nonzero if STATUS indicates termination by a signal. */ -#ifdef __GNUC__ -# define __WIFSIGNALED(status) \ - (__extension__ ({ int __status = (status); \ - !__WIFSTOPPED(__status) && !__WIFEXITED(__status); })) -#else /* Not GCC. */ -# define __WIFSIGNALED(status) (!__WIFSTOPPED(status) && !__WIFEXITED(status)) -#endif /* GCC. */ - -/* Nonzero if STATUS indicates the child is stopped. */ -#define __WIFSTOPPED(status) (((status) & 0xff) == 0x7f) - -/* Nonzero if STATUS indicates the child dumped core. */ -#define __WCOREDUMP(status) ((status) & __WCOREFLAG) - -/* Macros for constructing status values. */ -#define __W_EXITCODE(ret, sig) ((ret) << 8 | (sig)) -#define __W_STOPCODE(sig) ((sig) << 8 | 0x7f) -#define __WCOREFLAG 0x80 - - -#ifdef __USE_BSD - -# include <endian.h> - -union wait - { - int w_status; - struct - { -# if __BYTE_ORDER == __LITTLE_ENDIAN - unsigned int __w_termsig:7; /* Terminating signal. */ - unsigned int __w_coredump:1; /* Set if dumped core. */ - unsigned int __w_retcode:8; /* Return code if exited normally. */ - unsigned int:16; -# endif /* Little endian. */ -# if __BYTE_ORDER == __BIG_ENDIAN - unsigned int:16; - unsigned int __w_retcode:8; - unsigned int __w_coredump:1; - unsigned int __w_termsig:7; -# endif /* Big endian. */ - } __wait_terminated; - struct - { -# if __BYTE_ORDER == __LITTLE_ENDIAN - unsigned int __w_stopval:8; /* W_STOPPED if stopped. */ - unsigned int __w_stopsig:8; /* Stopping signal. */ - unsigned int:16; -# endif /* Little endian. */ -# if __BYTE_ORDER == __BIG_ENDIAN - unsigned int:16; - unsigned int __w_stopsig:8; /* Stopping signal. */ - unsigned int __w_stopval:8; /* W_STOPPED if stopped. */ -# endif /* Big endian. */ - } __wait_stopped; - }; - -# define w_termsig __wait_terminated.__w_termsig -# define w_coredump __wait_terminated.__w_coredump -# define w_retcode __wait_terminated.__w_retcode -# define w_stopsig __wait_stopped.__w_stopsig -# define w_stopval __wait_stopped.__w_stopval - -#endif /* Use BSD. */ diff --git a/libc/sysdeps/linux/m68k/bits/xopen_lim.h b/libc/sysdeps/linux/m68k/bits/xopen_lim.h deleted file mode 100644 index 7f3611860..000000000 --- a/libc/sysdeps/linux/m68k/bits/xopen_lim.h +++ /dev/null @@ -1,144 +0,0 @@ -/* Copyright (C) 1996, 1997, 1999, 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. */ - -/* - * Never include this file directly; use <limits.h> instead. - */ - -/* Additional definitions from X/Open Portability Guide, Issue 4, Version 2 - System Interfaces and Headers, 4.16 <limits.h> - - Please note only the values which are not greater than the minimum - stated in the standard document are listed. The `sysconf' functions - should be used to obtain the actual value. */ - -#ifndef _XOPEN_LIM_H -#define _XOPEN_LIM_H 1 - -#define __need_IOV_MAX -#include <bits/stdio_lim.h> - -/* We do not provide fixed values for - - ARG_MAX Maximum length of argument to the `exec' function - including environment data. - - ATEXIT_MAX Maximum number of functions that may be registered - with `atexit'. - - CHILD_MAX Maximum number of simultaneous processes per real - user ID. - - OPEN_MAX Maximum number of files that one process can have open - at anyone time. - - PAGESIZE - PAGE_SIZE Size of bytes of a page. - - PASS_MAX Maximum number of significant bytes in a password. - - We only provide a fixed limit for - - IOV_MAX Maximum number of `iovec' structures that one process has - available for use with `readv' or writev'. - - if this is indeed fixed by the underlying system. -*/ - - -/* Maximum number of `iovec' structures that one process has available - for use with `readv' or writev'. */ -#define _XOPEN_IOV_MAX _POSIX_UIO_MAXIOV - - -/* Maximum value of `digit' in calls to the `printf' and `scanf' - functions. We have no limit, so return a reasonable value. */ -#define NL_ARGMAX _POSIX_ARG_MAX - -/* Maximum number of bytes in a `LANG' name. We have no limit. */ -#define NL_LANGMAX _POSIX2_LINE_MAX - -/* Maximum message number. We have no limit. */ -#define NL_MSGMAX INT_MAX - -/* Maximum number of bytes in N-to-1 collation mapping. We have no - limit. */ -#define NL_NMAX INT_MAX - -/* Maximum set number. We have no limit. */ -#define NL_SETMAX INT_MAX - -/* Maximum number of bytes in a message. We have no limit. */ -#define NL_TEXTMAX INT_MAX - -/* Default process priority. */ -#define NZERO 20 - - -/* Number of bits in a word of type `int'. */ -#ifdef INT_MAX -# if INT_MAX == 32767 -# define WORD_BIT 16 -# else -# if INT_MAX == 2147483647 -# define WORD_BIT 32 -# else -/* Safe assumption. */ -# define WORD_BIT 64 -# endif -# endif -#elif defined __INT_MAX__ -# if __INT_MAX__ == 32767 -# define WORD_BIT 16 -# else -# if __INT_MAX__ == 2147483647 -# define WORD_BIT 32 -# else -/* Safe assumption. */ -# define WORD_BIT 64 -# endif -# endif -#else -# define WORD_BIT 32 -#endif - -/* Number of bits in a word of type `long int'. */ -#ifdef LONG_MAX -# if LONG_MAX == 2147483647 -# define LONG_BIT 32 -# else -/* Safe assumption. */ -# define LONG_BIT 64 -# endif -#elif defined __LONG_MAX__ -# if __LONG_MAX__ == 2147483647 -# define LONG_BIT 32 -# else -/* Safe assumption. */ -# define LONG_BIT 64 -# endif -#else -# include <bits/wordsize.h> -# if __WORDSIZE == 64 -# define LONG_BIT 64 -# else -# define LONG_BIT 32 -# endif -#endif - -#endif /* bits/xopen_lim.h */ diff --git a/libc/sysdeps/linux/m68k/sys/procfs.h b/libc/sysdeps/linux/m68k/sys/procfs.h new file mode 100644 index 000000000..27abf8ef5 --- /dev/null +++ b/libc/sysdeps/linux/m68k/sys/procfs.h @@ -0,0 +1,126 @@ +/* Copyright (C) 1996, 1997, 1999, 2000, 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. */ + +#ifndef _SYS_PROCFS_H +#define _SYS_PROCFS_H 1 + +/* This is somewhat modelled after the file of the same name on SVR4 + systems. It provides a definition of the core file format for ELF + used on Linux. It doesn't have anything to do with the /proc file + system, even though Linux has one. + + Anyway, the whole purpose of this file is for GDB and GDB only. + Don't read too much into it. Don't use it for anything other than + GDB unless you know what you are doing. */ + +#include <features.h> +#include <sys/time.h> +#include <sys/types.h> +#include <sys/user.h> + +__BEGIN_DECLS + +/* Type for a general-purpose register. */ +typedef unsigned long elf_greg_t; + +/* And the whole bunch of them. We could have used `struct + user_regs_struct' directly in the typedef, but tradition says that + the register set is an array, which does have some peculiar + semantics, so leave it that way. */ +#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t)) +typedef elf_greg_t elf_gregset_t[ELF_NGREG]; + +/* Register set for the floating-point registers. */ +typedef struct user_m68kfp_struct elf_fpregset_t; + + +/* Signal info. */ +struct elf_siginfo + { + int si_signo; /* Signal number. */ + int si_code; /* Extra code. */ + int si_errno; /* Errno. */ + }; + + +/* Definitions to generate Intel SVR4-like core files. These mostly + have the same names as the SVR4 types with "elf_" tacked on the + front to prevent clashes with Linux definitions, and the typedef + forms have been avoided. This is mostly like the SVR4 structure, + but more Linuxy, with things that Linux does not support and which + GDB doesn't really use excluded. */ + +struct elf_prstatus + { + struct elf_siginfo pr_info; /* Info associated with signal. */ + short int pr_cursig; /* Current signal. */ + unsigned long int pr_sigpend; /* Set of pending signals. */ + unsigned long int pr_sighold; /* Set of held signals. */ + __pid_t pr_pid; + __pid_t pr_ppid; + __pid_t pr_pgrp; + __pid_t pr_sid; + struct timeval pr_utime; /* User time. */ + struct timeval pr_stime; /* System time. */ + struct timeval pr_cutime; /* Cumulative user time. */ + struct timeval pr_cstime; /* Cumulative system time. */ + elf_gregset_t pr_reg; /* GP registers. */ + int pr_fpvalid; /* True if math copro being used. */ + }; + + +#define ELF_PRARGSZ (80) /* Number of chars for args. */ + +struct elf_prpsinfo + { + char pr_state; /* Numeric process state. */ + char pr_sname; /* Char for pr_state. */ + char pr_zomb; /* Zombie. */ + char pr_nice; /* Nice val. */ + unsigned long int pr_flag; /* Flags. */ + unsigned short int pr_uid; + unsigned short int pr_gid; + int pr_pid, pr_ppid, pr_pgrp, pr_sid; + /* Lots missing */ + char pr_fname[16]; /* Filename of executable. */ + char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ + }; + + +/* The rest of this file provides the types for emulation of the + Solaris <proc_service.h> interfaces that should be implemented by + users of libthread_db. */ + +/* Addresses. */ +typedef void *psaddr_t; + +/* Register sets. Linux has different names. */ +typedef elf_gregset_t prgregset_t; +typedef elf_fpregset_t prfpregset_t; + +/* We don't have any differences between processes and threads, + therefore have only one PID type. */ +typedef __pid_t lwpid_t; + +/* Process status and info. In the end we do provide typedefs for them. */ +typedef struct elf_prstatus prstatus_t; +typedef struct elf_prpsinfo prpsinfo_t; + +__END_DECLS + +#endif /* sys/procfs.h */ diff --git a/libc/sysdeps/linux/m68k/reg.h b/libc/sysdeps/linux/m68k/sys/reg.h index 418f8323f..418f8323f 100644 --- a/libc/sysdeps/linux/m68k/reg.h +++ b/libc/sysdeps/linux/m68k/sys/reg.h diff --git a/libc/sysdeps/linux/m68k/sys/ucontext.h b/libc/sysdeps/linux/m68k/sys/ucontext.h new file mode 100644 index 000000000..3c441dc5c --- /dev/null +++ b/libc/sysdeps/linux/m68k/sys/ucontext.h @@ -0,0 +1,109 @@ +/* Copyright (C) 1997, 1999, 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. */ + +/* System V/m68k ABI compliant context switching support. */ + +#ifndef _SYS_UCONTEXT_H +#define _SYS_UCONTEXT_H 1 + +#include <features.h> +#include <signal.h> + +/* Type for general register. */ +typedef int greg_t; + +/* Number of general registers. */ +#define NGREG 18 + +/* Container for all general registers. */ +typedef greg_t gregset_t[NGREG]; + +/* Number of each register is the `gregset_t' array. */ +enum +{ + R_D0 = 0, +#define R_D0 R_D0 + R_D1 = 1, +#define R_D1 R_D1 + R_D2 = 2, +#define R_D2 R_D2 + R_D3 = 3, +#define R_D3 R_D3 + R_D4 = 4, +#define R_D4 R_D4 + R_D5 = 5, +#define R_D5 R_D5 + R_D6 = 6, +#define R_D6 R_D6 + R_D7 = 7, +#define R_D7 R_D7 + R_A0 = 8, +#define R_A0 R_A0 + R_A1 = 9, +#define R_A1 R_A1 + R_A2 = 10, +#define R_A2 R_A2 + R_A3 = 11, +#define R_A3 R_A3 + R_A4 = 12, +#define R_A4 R_A4 + R_A5 = 13, +#define R_A5 R_A5 + R_A6 = 14, +#define R_A6 R_A6 + R_A7 = 15, +#define R_A7 R_A7 + R_SP = 15, +#define R_SP R_SP + R_PC = 16, +#define R_PC R_PC + R_PS = 17 +#define R_PS R_PS +}; + +/* Structure to describe FPU registers. */ +typedef struct fpregset +{ + int f_fpregs[8][3]; + int f_pcr; + int f_psr; + int f_fpiaddr; +} fpregset_t; + +/* Context to describe whole processor state. */ +typedef struct +{ + int version; + gregset_t gregs; + fpregset_t fpregs; +} mcontext_t; + +#define MCONTEXT_VERSION 2 + +/* Userlevel context. */ +typedef struct ucontext +{ + unsigned long int uc_flags; + struct ucontext *uc_link; + __sigset_t uc_sigmask; + stack_t uc_stack; + mcontext_t uc_mcontext; + long int uc_filler[174]; +} ucontext_t; + +#endif /* sys/ucontext.h */ diff --git a/libc/sysdeps/linux/mips/bits/cmathcalls.h b/libc/sysdeps/linux/mips/bits/cmathcalls.h deleted file mode 100644 index c680c6d8e..000000000 --- a/libc/sysdeps/linux/mips/bits/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/libc/sysdeps/linux/mips/bits/confname.h b/libc/sysdeps/linux/mips/bits/confname.h deleted file mode 100644 index ba8868af4..000000000 --- a/libc/sysdeps/linux/mips/bits/confname.h +++ /dev/null @@ -1,566 +0,0 @@ -/* `sysconf', `pathconf', and `confstr' NAME values. Generic version. - Copyright (C) 1993, 1995-1998, 2000, 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. */ - -#ifndef _UNISTD_H -# error "Never use <bits/confname.h> directly; include <unistd.h> instead." -#endif - -/* Values for the NAME argument to `pathconf' and `fpathconf'. */ -enum - { - _PC_LINK_MAX, -#define _PC_LINK_MAX _PC_LINK_MAX - _PC_MAX_CANON, -#define _PC_MAX_CANON _PC_MAX_CANON - _PC_MAX_INPUT, -#define _PC_MAX_INPUT _PC_MAX_INPUT - _PC_NAME_MAX, -#define _PC_NAME_MAX _PC_NAME_MAX - _PC_PATH_MAX, -#define _PC_PATH_MAX _PC_PATH_MAX - _PC_PIPE_BUF, -#define _PC_PIPE_BUF _PC_PIPE_BUF - _PC_CHOWN_RESTRICTED, -#define _PC_CHOWN_RESTRICTED _PC_CHOWN_RESTRICTED - _PC_NO_TRUNC, -#define _PC_NO_TRUNC _PC_NO_TRUNC - _PC_VDISABLE, -#define _PC_VDISABLE _PC_VDISABLE - _PC_SYNC_IO, -#define _PC_SYNC_IO _PC_SYNC_IO - _PC_ASYNC_IO, -#define _PC_ASYNC_IO _PC_ASYNC_IO - _PC_PRIO_IO, -#define _PC_PRIO_IO _PC_PRIO_IO - _PC_SOCK_MAXBUF, -#define _PC_SOCK_MAXBUF _PC_SOCK_MAXBUF - _PC_FILESIZEBITS, -#define _PC_FILESIZEBITS _PC_FILESIZEBITS - _PC_REC_INCR_XFER_SIZE, -#define _PC_REC_INCR_XFER_SIZE _PC_REC_INCR_XFER_SIZE - _PC_REC_MAX_XFER_SIZE, -#define _PC_REC_MAX_XFER_SIZE _PC_REC_MAX_XFER_SIZE - _PC_REC_MIN_XFER_SIZE, -#define _PC_REC_MIN_XFER_SIZE _PC_REC_MIN_XFER_SIZE - _PC_REC_XFER_ALIGN, -#define _PC_REC_XFER_ALIGN _PC_REC_XFER_ALIGN - _PC_ALLOC_SIZE_MIN, -#define _PC_ALLOC_SIZE_MIN _PC_ALLOC_SIZE_MIN - _PC_SYMLINK_MAX -#define _PC_SYMLINK_MAX _PC_SYMLINK_MAX - }; - -/* Values for the argument to `sysconf'. */ -enum - { - _SC_ARG_MAX, -#define _SC_ARG_MAX _SC_ARG_MAX - _SC_CHILD_MAX, -#define _SC_CHILD_MAX _SC_CHILD_MAX - _SC_CLK_TCK, -#define _SC_CLK_TCK _SC_CLK_TCK - _SC_NGROUPS_MAX, -#define _SC_NGROUPS_MAX _SC_NGROUPS_MAX - _SC_OPEN_MAX, -#define _SC_OPEN_MAX _SC_OPEN_MAX - _SC_STREAM_MAX, -#define _SC_STREAM_MAX _SC_STREAM_MAX - _SC_TZNAME_MAX, -#define _SC_TZNAME_MAX _SC_TZNAME_MAX - _SC_JOB_CONTROL, -#define _SC_JOB_CONTROL _SC_JOB_CONTROL - _SC_SAVED_IDS, -#define _SC_SAVED_IDS _SC_SAVED_IDS - _SC_REALTIME_SIGNALS, -#define _SC_REALTIME_SIGNALS _SC_REALTIME_SIGNALS - _SC_PRIORITY_SCHEDULING, -#define _SC_PRIORITY_SCHEDULING _SC_PRIORITY_SCHEDULING - _SC_TIMERS, -#define _SC_TIMERS _SC_TIMERS - _SC_ASYNCHRONOUS_IO, -#define _SC_ASYNCHRONOUS_IO _SC_ASYNCHRONOUS_IO - _SC_PRIORITIZED_IO, -#define _SC_PRIORITIZED_IO _SC_PRIORITIZED_IO - _SC_SYNCHRONIZED_IO, -#define _SC_SYNCHRONIZED_IO _SC_SYNCHRONIZED_IO - _SC_FSYNC, -#define _SC_FSYNC _SC_FSYNC - _SC_MAPPED_FILES, -#define _SC_MAPPED_FILES _SC_MAPPED_FILES - _SC_MEMLOCK, -#define _SC_MEMLOCK _SC_MEMLOCK - _SC_MEMLOCK_RANGE, -#define _SC_MEMLOCK_RANGE _SC_MEMLOCK_RANGE - _SC_MEMORY_PROTECTION, -#define _SC_MEMORY_PROTECTION _SC_MEMORY_PROTECTION - _SC_MESSAGE_PASSING, -#define _SC_MESSAGE_PASSING _SC_MESSAGE_PASSING - _SC_SEMAPHORES, -#define _SC_SEMAPHORES _SC_SEMAPHORES - _SC_SHARED_MEMORY_OBJECTS, -#define _SC_SHARED_MEMORY_OBJECTS _SC_SHARED_MEMORY_OBJECTS - _SC_AIO_LISTIO_MAX, -#define _SC_AIO_LISTIO_MAX _SC_AIO_LISTIO_MAX - _SC_AIO_MAX, -#define _SC_AIO_MAX _SC_AIO_MAX - _SC_AIO_PRIO_DELTA_MAX, -#define _SC_AIO_PRIO_DELTA_MAX _SC_AIO_PRIO_DELTA_MAX - _SC_DELAYTIMER_MAX, -#define _SC_DELAYTIMER_MAX _SC_DELAYTIMER_MAX - _SC_MQ_OPEN_MAX, -#define _SC_MQ_OPEN_MAX _SC_MQ_OPEN_MAX - _SC_MQ_PRIO_MAX, -#define _SC_MQ_PRIO_MAX _SC_MQ_PRIO_MAX - _SC_VERSION, -#define _SC_VERSION _SC_VERSION - _SC_PAGESIZE, -#define _SC_PAGESIZE _SC_PAGESIZE -#define _SC_PAGE_SIZE _SC_PAGESIZE - _SC_RTSIG_MAX, -#define _SC_RTSIG_MAX _SC_RTSIG_MAX - _SC_SEM_NSEMS_MAX, -#define _SC_SEM_NSEMS_MAX _SC_SEM_NSEMS_MAX - _SC_SEM_VALUE_MAX, -#define _SC_SEM_VALUE_MAX _SC_SEM_VALUE_MAX - _SC_SIGQUEUE_MAX, -#define _SC_SIGQUEUE_MAX _SC_SIGQUEUE_MAX - _SC_TIMER_MAX, -#define _SC_TIMER_MAX _SC_TIMER_MAX - - /* Values for the argument to `sysconf' - corresponding to _POSIX2_* symbols. */ - _SC_BC_BASE_MAX, -#define _SC_BC_BASE_MAX _SC_BC_BASE_MAX - _SC_BC_DIM_MAX, -#define _SC_BC_DIM_MAX _SC_BC_DIM_MAX - _SC_BC_SCALE_MAX, -#define _SC_BC_SCALE_MAX _SC_BC_SCALE_MAX - _SC_BC_STRING_MAX, -#define _SC_BC_STRING_MAX _SC_BC_STRING_MAX - _SC_COLL_WEIGHTS_MAX, -#define _SC_COLL_WEIGHTS_MAX _SC_COLL_WEIGHTS_MAX - _SC_EQUIV_CLASS_MAX, -#define _SC_EQUIV_CLASS_MAX _SC_EQUIV_CLASS_MAX - _SC_EXPR_NEST_MAX, -#define _SC_EXPR_NEST_MAX _SC_EXPR_NEST_MAX - _SC_LINE_MAX, -#define _SC_LINE_MAX _SC_LINE_MAX - _SC_RE_DUP_MAX, -#define _SC_RE_DUP_MAX _SC_RE_DUP_MAX - _SC_CHARCLASS_NAME_MAX, -#define _SC_CHARCLASS_NAME_MAX _SC_CHARCLASS_NAME_MAX - - _SC_2_VERSION, -#define _SC_2_VERSION _SC_2_VERSION - _SC_2_C_BIND, -#define _SC_2_C_BIND _SC_2_C_BIND - _SC_2_C_DEV, -#define _SC_2_C_DEV _SC_2_C_DEV - _SC_2_FORT_DEV, -#define _SC_2_FORT_DEV _SC_2_FORT_DEV - _SC_2_FORT_RUN, -#define _SC_2_FORT_RUN _SC_2_FORT_RUN - _SC_2_SW_DEV, -#define _SC_2_SW_DEV _SC_2_SW_DEV - _SC_2_LOCALEDEF, -#define _SC_2_LOCALEDEF _SC_2_LOCALEDEF - - _SC_PII, -#define _SC_PII _SC_PII - _SC_PII_XTI, -#define _SC_PII_XTI _SC_PII_XTI - _SC_PII_SOCKET, -#define _SC_PII_SOCKET _SC_PII_SOCKET - _SC_PII_INTERNET, -#define _SC_PII_INTERNET _SC_PII_INTERNET - _SC_PII_OSI, -#define _SC_PII_OSI _SC_PII_OSI - _SC_POLL, -#define _SC_POLL _SC_POLL - _SC_SELECT, -#define _SC_SELECT _SC_SELECT - _SC_UIO_MAXIOV, -#define _SC_UIO_MAXIOV _SC_UIO_MAXIOV - _SC_IOV_MAX = _SC_UIO_MAXIOV, -#define _SC_IOV_MAX _SC_IOV_MAX - _SC_PII_INTERNET_STREAM, -#define _SC_PII_INTERNET_STREAM _SC_PII_INTERNET_STREAM - _SC_PII_INTERNET_DGRAM, -#define _SC_PII_INTERNET_DGRAM _SC_PII_INTERNET_DGRAM - _SC_PII_OSI_COTS, -#define _SC_PII_OSI_COTS _SC_PII_OSI_COTS - _SC_PII_OSI_CLTS, -#define _SC_PII_OSI_CLTS _SC_PII_OSI_CLTS - _SC_PII_OSI_M, -#define _SC_PII_OSI_M _SC_PII_OSI_M - _SC_T_IOV_MAX, -#define _SC_T_IOV_MAX _SC_T_IOV_MAX - - /* Values according to POSIX 1003.1c (POSIX threads). */ - _SC_THREADS, -#define _SC_THREADS _SC_THREADS - _SC_THREAD_SAFE_FUNCTIONS, -#define _SC_THREAD_SAFE_FUNCTIONS _SC_THREAD_SAFE_FUNCTIONS - _SC_GETGR_R_SIZE_MAX, -#define _SC_GETGR_R_SIZE_MAX _SC_GETGR_R_SIZE_MAX - _SC_GETPW_R_SIZE_MAX, -#define _SC_GETPW_R_SIZE_MAX _SC_GETPW_R_SIZE_MAX - _SC_LOGIN_NAME_MAX, -#define _SC_LOGIN_NAME_MAX _SC_LOGIN_NAME_MAX - _SC_TTY_NAME_MAX, -#define _SC_TTY_NAME_MAX _SC_TTY_NAME_MAX - _SC_THREAD_DESTRUCTOR_ITERATIONS, -#define _SC_THREAD_DESTRUCTOR_ITERATIONS _SC_THREAD_DESTRUCTOR_ITERATIONS - _SC_THREAD_KEYS_MAX, -#define _SC_THREAD_KEYS_MAX _SC_THREAD_KEYS_MAX - _SC_THREAD_STACK_MIN, -#define _SC_THREAD_STACK_MIN _SC_THREAD_STACK_MIN - _SC_THREAD_THREADS_MAX, -#define _SC_THREAD_THREADS_MAX _SC_THREAD_THREADS_MAX - _SC_THREAD_ATTR_STACKADDR, -#define _SC_THREAD_ATTR_STACKADDR _SC_THREAD_ATTR_STACKADDR - _SC_THREAD_ATTR_STACKSIZE, -#define _SC_THREAD_ATTR_STACKSIZE _SC_THREAD_ATTR_STACKSIZE - _SC_THREAD_PRIORITY_SCHEDULING, -#define _SC_THREAD_PRIORITY_SCHEDULING _SC_THREAD_PRIORITY_SCHEDULING - _SC_THREAD_PRIO_INHERIT, -#define _SC_THREAD_PRIO_INHERIT _SC_THREAD_PRIO_INHERIT - _SC_THREAD_PRIO_PROTECT, -#define _SC_THREAD_PRIO_PROTECT _SC_THREAD_PRIO_PROTECT - _SC_THREAD_PROCESS_SHARED, -#define _SC_THREAD_PROCESS_SHARED _SC_THREAD_PROCESS_SHARED - - _SC_NPROCESSORS_CONF, -#define _SC_NPROCESSORS_CONF _SC_NPROCESSORS_CONF - _SC_NPROCESSORS_ONLN, -#define _SC_NPROCESSORS_ONLN _SC_NPROCESSORS_ONLN - _SC_PHYS_PAGES, -#define _SC_PHYS_PAGES _SC_PHYS_PAGES - _SC_AVPHYS_PAGES, -#define _SC_AVPHYS_PAGES _SC_AVPHYS_PAGES - _SC_ATEXIT_MAX, -#define _SC_ATEXIT_MAX _SC_ATEXIT_MAX - _SC_PASS_MAX, -#define _SC_PASS_MAX _SC_PASS_MAX - - _SC_XOPEN_VERSION, -#define _SC_XOPEN_VERSION _SC_XOPEN_VERSION - _SC_XOPEN_XCU_VERSION, -#define _SC_XOPEN_XCU_VERSION _SC_XOPEN_XCU_VERSION - _SC_XOPEN_UNIX, -#define _SC_XOPEN_UNIX _SC_XOPEN_UNIX - _SC_XOPEN_CRYPT, -#define _SC_XOPEN_CRYPT _SC_XOPEN_CRYPT - _SC_XOPEN_ENH_I18N, -#define _SC_XOPEN_ENH_I18N _SC_XOPEN_ENH_I18N - _SC_XOPEN_SHM, -#define _SC_XOPEN_SHM _SC_XOPEN_SHM - - _SC_2_CHAR_TERM, -#define _SC_2_CHAR_TERM _SC_2_CHAR_TERM - _SC_2_C_VERSION, -#define _SC_2_C_VERSION _SC_2_C_VERSION - _SC_2_UPE, -#define _SC_2_UPE _SC_2_UPE - - _SC_XOPEN_XPG2, -#define _SC_XOPEN_XPG2 _SC_XOPEN_XPG2 - _SC_XOPEN_XPG3, -#define _SC_XOPEN_XPG3 _SC_XOPEN_XPG3 - _SC_XOPEN_XPG4, -#define _SC_XOPEN_XPG4 _SC_XOPEN_XPG4 - - _SC_CHAR_BIT, -#define _SC_CHAR_BIT _SC_CHAR_BIT - _SC_CHAR_MAX, -#define _SC_CHAR_MAX _SC_CHAR_MAX - _SC_CHAR_MIN, -#define _SC_CHAR_MIN _SC_CHAR_MIN - _SC_INT_MAX, -#define _SC_INT_MAX _SC_INT_MAX - _SC_INT_MIN, -#define _SC_INT_MIN _SC_INT_MIN - _SC_LONG_BIT, -#define _SC_LONG_BIT _SC_LONG_BIT - _SC_WORD_BIT, -#define _SC_WORD_BIT _SC_WORD_BIT - _SC_MB_LEN_MAX, -#define _SC_MB_LEN_MAX _SC_MB_LEN_MAX - _SC_NZERO, -#define _SC_NZERO _SC_NZERO - _SC_SSIZE_MAX, -#define _SC_SSIZE_MAX _SC_SSIZE_MAX - _SC_SCHAR_MAX, -#define _SC_SCHAR_MAX _SC_SCHAR_MAX - _SC_SCHAR_MIN, -#define _SC_SCHAR_MIN _SC_SCHAR_MIN - _SC_SHRT_MAX, -#define _SC_SHRT_MAX _SC_SHRT_MAX - _SC_SHRT_MIN, -#define _SC_SHRT_MIN _SC_SHRT_MIN - _SC_UCHAR_MAX, -#define _SC_UCHAR_MAX _SC_UCHAR_MAX - _SC_UINT_MAX, -#define _SC_UINT_MAX _SC_UINT_MAX - _SC_ULONG_MAX, -#define _SC_ULONG_MAX _SC_ULONG_MAX - _SC_USHRT_MAX, -#define _SC_USHRT_MAX _SC_USHRT_MAX - - _SC_NL_ARGMAX, -#define _SC_NL_ARGMAX _SC_NL_ARGMAX - _SC_NL_LANGMAX, -#define _SC_NL_LANGMAX _SC_NL_LANGMAX - _SC_NL_MSGMAX, -#define _SC_NL_MSGMAX _SC_NL_MSGMAX - _SC_NL_NMAX, -#define _SC_NL_NMAX _SC_NL_NMAX - _SC_NL_SETMAX, -#define _SC_NL_SETMAX _SC_NL_SETMAX - _SC_NL_TEXTMAX, -#define _SC_NL_TEXTMAX _SC_NL_TEXTMAX - - _SC_XBS5_ILP32_OFF32, -#define _SC_XBS5_ILP32_OFF32 _SC_XBS5_ILP32_OFF32 - _SC_XBS5_ILP32_OFFBIG, -#define _SC_XBS5_ILP32_OFFBIG _SC_XBS5_ILP32_OFFBIG - _SC_XBS5_LP64_OFF64, -#define _SC_XBS5_LP64_OFF64 _SC_XBS5_LP64_OFF64 - _SC_XBS5_LPBIG_OFFBIG, -#define _SC_XBS5_LPBIG_OFFBIG _SC_XBS5_LPBIG_OFFBIG - - _SC_XOPEN_LEGACY, -#define _SC_XOPEN_LEGACY _SC_XOPEN_LEGACY - _SC_XOPEN_REALTIME, -#define _SC_XOPEN_REALTIME _SC_XOPEN_REALTIME - _SC_XOPEN_REALTIME_THREADS, -#define _SC_XOPEN_REALTIME_THREADS _SC_XOPEN_REALTIME_THREADS - - _SC_ADVISORY_INFO, -#define _SC_ADVISORY_INFO _SC_ADVISORY_INFO - _SC_BARRIERS, -#define _SC_BARRIERS _SC_BARRIERS - _SC_BASE, -#define _SC_BASE _SC_BASE - _SC_C_LANG_SUPPORT, -#define _SC_C_LANG_SUPPORT _SC_C_LANG_SUPPORT - _SC_C_LANG_SUPPORT_R, -#define _SC_C_LANG_SUPPORT_R _SC_C_LANG_SUPPORT_R - _SC_CLOCK_SELECTION, -#define _SC_CLOCK_SELECTION _SC_CLOCK_SELECTION - _SC_CPUTIME, -#define _SC_CPUTIME _SC_CPUTIME - _SC_THREAD_CPUTIME, -#define _SC_THREAD_CPUTIME _SC_THREAD_CPUTIME - _SC_DEVICE_IO, -#define _SC_DEVICE_IO _SC_DEVICE_IO - _SC_DEVICE_SPECIFIC, -#define _SC_DEVICE_SPECIFIC _SC_DEVICE_SPECIFIC - _SC_DEVICE_SPECIFIC_R, -#define _SC_DEVICE_SPECIFIC_R _SC_DEVICE_SPECIFIC_R - _SC_FD_MGMT, -#define _SC_FD_MGMT _SC_FD_MGMT - _SC_FIFO, -#define _SC_FIFO _SC_FIFO - _SC_PIPE, -#define _SC_PIPE _SC_PIPE - _SC_FILE_ATTRIBUTES, -#define _SC_FILE_ATTRIBUTES _SC_FILE_ATTRIBUTES - _SC_FILE_LOCKING, -#define _SC_FILE_LOCKING _SC_FILE_LOCKING - _SC_FILE_SYSTEM, -#define _SC_FILE_SYSTEM _SC_FILE_SYSTEM - _SC_MONOTONIC_CLOCK, -#define _SC_MONOTONIC_CLOCK _SC_MONOTONIC_CLOCK - _SC_MULTI_PROCESS, -#define _SC_MULTI_PROCESS _SC_MULTI_PROCESS - _SC_SINGLE_PROCESS, -#define _SC_SINGLE_PROCESS _SC_SINGLE_PROCESS - _SC_NETWORKING, -#define _SC_NETWORKING _SC_NETWORKING - _SC_READER_WRITER_LOCKS, -#define _SC_READER_WRITER_LOCKS _SC_READER_WRITER_LOCKS - _SC_SPIN_LOCKS, -#define _SC_SPIN_LOCKS _SC_SPIN_LOCKS - _SC_REGEXP, -#define _SC_REGEXP _SC_REGEXP - _SC_REGEX_VERSION, -#define _SC_REGEX_VERSION _SC_REGEX_VERSION - _SC_SHELL, -#define _SC_SHELL _SC_SHELL - _SC_SIGNALS, -#define _SC_SIGNALS _SC_SIGNALS - _SC_SPAWN, -#define _SC_SPAWN _SC_SPAWN - _SC_SPORADIC_SERVER, -#define _SC_SPORADIC_SERVER _SC_SPORADIC_SERVER - _SC_THREAD_SPORADIC_SERVER, -#define _SC_THREAD_SPORADIC_SERVER _SC_THREAD_SPORADIC_SERVER - _SC_SYSTEM_DATABASE, -#define _SC_SYSTEM_DATABASE _SC_SYSTEM_DATABASE - _SC_SYSTEM_DATABASE_R, -#define _SC_SYSTEM_DATABASE_R _SC_SYSTEM_DATABASE_R - _SC_TIMEOUTS, -#define _SC_TIMEOUTS _SC_TIMEOUTS - _SC_TYPED_MEMORY_OBJECTS, -#define _SC_TYPED_MEMORY_OBJECTS _SC_TYPED_MEMORY_OBJECTS - _SC_USER_GROUPS, -#define _SC_USER_GROUPS _SC_USER_GROUPS - _SC_USER_GROUPS_R, -#define _SC_USER_GROUPS_R _SC_USER_GROUPS_R - _SC_2_PBS, -#define _SC_2_PBS _SC_2_PBS - _SC_2_PBS_ACCOUNTING, -#define _SC_2_PBS_ACCOUNTING _SC_2_PBS_ACCOUNTING - _SC_2_PBS_LOCATE, -#define _SC_2_PBS_LOCATE _SC_2_PBS_LOCATE - _SC_2_PBS_MESSAGE, -#define _SC_2_PBS_MESSAGE _SC_2_PBS_MESSAGE - _SC_2_PBS_TRACK, -#define _SC_2_PBS_TRACK _SC_2_PBS_TRACK - _SC_SYMLOOP_MAX, -#define _SC_SYMLOOP_MAX _SC_SYMLOOP_MAX - _SC_STREAMS, -#define _SC_STREAMS _SC_STREAMS - _SC_2_PBS_CHECKPOINT, -#define _SC_2_PBS_CHECKPOINT _SC_2_PBS_CHECKPOINT - - _SC_V6_ILP32_OFF32, -#define _SC_V6_ILP32_OFF32 _SC_V6_ILP32_OFF32 - _SC_V6_ILP32_OFFBIG, -#define _SC_V6_ILP32_OFFBIG _SC_V6_ILP32_OFFBIG - _SC_V6_LP64_OFF64, -#define _SC_V6_LP64_OFF64 _SC_V6_LP64_OFF64 - _SC_V6_LPBIG_OFFBIG, -#define _SC_V6_LPBIG_OFFBIG _SC_V6_LPBIG_OFFBIG - - _SC_HOST_NAME_MAX, -#define _SC_HOST_NAME_MAX _SC_HOST_NAME_MAX - _SC_TRACE, -#define _SC_TRACE _SC_TRACE - _SC_TRACE_EVENT_FILTER, -#define _SC_TRACE_EVENT_FILTER _SC_TRACE_EVENT_FILTER - _SC_TRACE_INHERIT, -#define _SC_TRACE_INHERIT _SC_TRACE_INHERIT - _SC_TRACE_LOG -#define _SC_TRACE_LOG _SC_TRACE_LOG - }; - -#if (defined __USE_POSIX2 || defined __USE_UNIX98 \ - || defined __USE_FILE_OFFSET64 || defined __USE_LARGEFILE64 \ - || defined __USE_LARGEFILE) -/* Values for the NAME argument to `confstr'. */ -enum - { - _CS_PATH, /* The default search path. */ -#define _CS_PATH _CS_PATH - -# if (defined __USE_FILE_OFFSET64 || defined __USE_LARGEFILE64 \ - || defined __USE_LARGEFILE) - _CS_LFS_CFLAGS = 1000, -# define _CS_LFS_CFLAGS _CS_LFS_CFLAGS - _CS_LFS_LDFLAGS, -# define _CS_LFS_LDFLAGS _CS_LFS_LDFLAGS - _CS_LFS_LIBS, -# define _CS_LFS_LIBS _CS_LFS_LIBS - _CS_LFS_LINTFLAGS, -# define _CS_LFS_LINTFLAGS _CS_LFS_LINTFLAGS - _CS_LFS64_CFLAGS, -# define _CS_LFS64_CFLAGS _CS_LFS64_CFLAGS - _CS_LFS64_LDFLAGS, -# define _CS_LFS64_LDFLAGS _CS_LFS64_LDFLAGS - _CS_LFS64_LIBS, -# define _CS_LFS64_LIBS _CS_LFS64_LIBS - _CS_LFS64_LINTFLAGS, -# define _CS_LFS64_LINTFLAGS _CS_LFS64_LINTFLAGS -# endif - -# ifdef __USE_UNIX98 - _CS_XBS5_ILP32_OFF32_CFLAGS = 1100, -# define _CS_XBS5_ILP32_OFF32_CFLAGS _CS_XBS5_ILP32_OFF32_CFLAGS - _CS_XBS5_ILP32_OFF32_LDFLAGS, -# define _CS_XBS5_ILP32_OFF32_LDFLAGS _CS_XBS5_ILP32_OFF32_LDFLAGS - _CS_XBS5_ILP32_OFF32_LIBS, -# define _CS_XBS5_ILP32_OFF32_LIBS _CS_XBS5_ILP32_OFF32_LIBS - _CS_XBS5_ILP32_OFF32_LINTFLAGS, -# define _CS_XBS5_ILP32_OFF32_LINTFLAGS _CS_XBS5_ILP32_OFF32_LINTFLAGS - _CS_XBS5_ILP32_OFFBIG_CFLAGS, -# define _CS_XBS5_ILP32_OFFBIG_CFLAGS _CS_XBS5_ILP32_OFFBIG_CFLAGS - _CS_XBS5_ILP32_OFFBIG_LDFLAGS, -# define _CS_XBS5_ILP32_OFFBIG_LDFLAGS _CS_XBS5_ILP32_OFFBIG_LDFLAGS - _CS_XBS5_ILP32_OFFBIG_LIBS, -# define _CS_XBS5_ILP32_OFFBIG_LIBS _CS_XBS5_ILP32_OFFBIG_LIBS - _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, -# define _CS_XBS5_ILP32_OFFBIG_LINTFLAGS _CS_XBS5_ILP32_OFFBIG_LINTFLAGS - _CS_XBS5_LP64_OFF64_CFLAGS, -# define _CS_XBS5_LP64_OFF64_CFLAGS _CS_XBS5_LP64_OFF64_CFLAGS - _CS_XBS5_LP64_OFF64_LDFLAGS, -# define _CS_XBS5_LP64_OFF64_LDFLAGS _CS_XBS5_LP64_OFF64_LDFLAGS - _CS_XBS5_LP64_OFF64_LIBS, -# define _CS_XBS5_LP64_OFF64_LIBS _CS_XBS5_LP64_OFF64_LIBS - _CS_XBS5_LP64_OFF64_LINTFLAGS, -# define _CS_XBS5_LP64_OFF64_LINTFLAGS _CS_XBS5_LP64_OFF64_LINTFLAGS - _CS_XBS5_LPBIG_OFFBIG_CFLAGS, -# define _CS_XBS5_LPBIG_OFFBIG_CFLAGS _CS_XBS5_LPBIG_OFFBIG_CFLAGS - _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, -# define _CS_XBS5_LPBIG_OFFBIG_LDFLAGS _CS_XBS5_LPBIG_OFFBIG_LDFLAGS - _CS_XBS5_LPBIG_OFFBIG_LIBS, -# define _CS_XBS5_LPBIG_OFFBIG_LIBS _CS_XBS5_LPBIG_OFFBIG_LIBS - _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, -# define _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS -# endif -# ifdef __USE_XOPEN2K - _CS_POSIX_V6_ILP32_OFF32_CFLAGS, -# define _CS_POSIX_V6_ILP32_OFF32_CFLAGS _CS_POSIX_V6_ILP32_OFF32_CFLAGS - _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, -# define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS _CS_POSIX_V6_ILP32_OFF32_LDFLAGS - _CS_POSIX_V6_ILP32_OFF32_LIBS, -# define _CS_POSIX_V6_ILP32_OFF32_LIBS _CS_POSIX_V6_ILP32_OFF32_LIBS - _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, -# define _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS - _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, -# define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS - _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, -# define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS - _CS_POSIX_V6_ILP32_OFFBIG_LIBS, -# define _CS_POSIX_V6_ILP32_OFFBIG_LIBS _CS_POSIX_V6_ILP32_OFFBIG_LIBS - _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, -# define _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS - _CS_POSIX_V6_LP64_OFF64_CFLAGS, -# define _CS_POSIX_V6_LP64_OFF64_CFLAGS _CS_POSIX_V6_LP64_OFF64_CFLAGS - _CS_POSIX_V6_LP64_OFF64_LDFLAGS, -# define _CS_POSIX_V6_LP64_OFF64_LDFLAGS _CS_POSIX_V6_LP64_OFF64_LDFLAGS - _CS_POSIX_V6_LP64_OFF64_LIBS, -# define _CS_POSIX_V6_LP64_OFF64_LIBS _CS_POSIX_V6_LP64_OFF64_LIBS - _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, -# define _CS_POSIX_V6_LP64_OFF64_LINTFLAGS _CS_POSIX_V6_LP64_OFF64_LINTFLAGS - _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, -# define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS - _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, -# define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS - _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, -# define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS _CS_POSIX_V6_LPBIG_OFFBIG_LIBS - _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS, -# define _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS -# endif - - _CS_V6_WIDTH_RESTRICTED_ENVS -# define _CS_V6_WIDTH_RESTRICTED_ENVS _CS_V6_WIDTH_RESTRICTED_ENVS - }; -#endif diff --git a/libc/sysdeps/linux/mips/bits/dirent.h b/libc/sysdeps/linux/mips/bits/dirent.h deleted file mode 100644 index 82d8663f2..000000000 --- a/libc/sysdeps/linux/mips/bits/dirent.h +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright (C) 1996, 1997 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 _DIRENT_H -# error "Never use <bits/dirent.h> directly; include <dirent.h> instead." -#endif - -struct dirent - { -#ifndef __USE_FILE_OFFSET64 - __ino_t d_ino; - __off_t d_off; -#else - __ino64_t d_ino; - __off64_t d_off; -#endif - unsigned short int d_reclen; -#ifdef __USE_FILE_OFFSET64 - unsigned char d_type; -#endif - char d_name[256]; /* We must not include limits.h! */ - }; - -#ifdef __USE_LARGEFILE64 -struct dirent64 - { - __ino64_t d_ino; - __off64_t d_off; - unsigned short int d_reclen; - unsigned char d_type; - char d_name[256]; /* We must not include limits.h! */ - }; -#endif - -#define d_fileno d_ino /* Backwards compatibility. */ - -#undef _DIRENT_HAVE_D_NAMLEN -#define _DIRENT_HAVE_D_RECLEN -#define _DIRENT_HAVE_D_OFF -#undef _DIRENT_HAVE_D_TYPE diff --git a/libc/sysdeps/linux/mips/bits/dlfcn.h b/libc/sysdeps/linux/mips/bits/dlfcn.h index 2380caa9d..c5b4c5950 100644 --- a/libc/sysdeps/linux/mips/bits/dlfcn.h +++ b/libc/sysdeps/linux/mips/bits/dlfcn.h @@ -1,5 +1,5 @@ /* System dependent definitions for run-time dynamic loading. - Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1999, 2000, 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 @@ -52,8 +52,13 @@ foo = DL_CALL_FCT (fctp, (arg1, arg2)); */ # define DL_CALL_FCT(fctp, args) \ - (_dl_mcount_wrapper_check (fctp), (*(fctp)) args) + (_dl_mcount_wrapper_check ((void *) (fctp)), (*(fctp)) args) + +__BEGIN_DECLS /* This function calls the profiling functions. */ extern void _dl_mcount_wrapper_check (void *__selfpc) __THROW; + +__END_DECLS + #endif diff --git a/libc/sysdeps/linux/mips/bits/elfclass.h b/libc/sysdeps/linux/mips/bits/elfclass.h deleted file mode 100644 index 180227d9e..000000000 --- a/libc/sysdeps/linux/mips/bits/elfclass.h +++ /dev/null @@ -1,14 +0,0 @@ -/* This file specifies the native word size of the machine, which indicates - the ELF file class used for executables and shared objects on this - machine. */ - -#ifndef _LINK_H -# error "Never use <bits/elfclass.h> directly; include <link.h> instead." -#endif - -#include <bits/wordsize.h> - -#define __ELF_NATIVE_CLASS __WORDSIZE - -/* The entries in the .hash table always have a size of 32 bits. */ -typedef uint32_t Elf_Symndx; diff --git a/libc/sysdeps/linux/mips/bits/environments.h b/libc/sysdeps/linux/mips/bits/environments.h deleted file mode 100644 index c3829927b..000000000 --- a/libc/sysdeps/linux/mips/bits/environments.h +++ /dev/null @@ -1,75 +0,0 @@ -/* Copyright (C) 1999, 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. */ - -#ifndef _UNISTD_H -# error "Never include this file directly. Use <unistd.h> instead" -#endif - -#include <bits/wordsize.h> - -/* This header should define the following symbols under the described - situations. A value `1' means that the model is always supported, - `-1' means it is never supported. Undefined means it cannot be - statically decided. - - _POSIX_V6_ILP32_OFF32 32bit int, long, pointers, and off_t type - _POSIX_V6_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type - - _POSIX_V6_LP64_OFF32 64bit long and pointers and 32bit off_t type - _POSIX_V6_LPBIG_OFFBIG 64bit long and pointers and large off_t type - - The macros _XBS5_ILP32_OFF32, _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and - _XBS5_LPBIG_OFFBIG were used in previous versions of the Unix standard - and are available only for compatibility. -*/ - -#if __WORDSIZE == 64 - -/* We can never provide environments with 32-bit wide pointers. */ -# define _POSIX_V6_ILP32_OFF32 -1 -# define _POSIX_V6_ILP32_OFFBIG -1 -# define _XBS5_ILP32_OFF32 -1 -# define _XBS5_ILP32_OFFBIG -1 -/* We also have no use (for now) for an environment with bigger pointers - and offsets. */ -# define _POSIX_V6_LPBIG_OFFBIG -1 -# define _XBS5_LPBIG_OFFBIG -1 - -/* By default we have 64-bit wide `long int', pointers and `off_t'. */ -# define _POSIX_V6_LP64_OFF64 1 -# define _XBS5_LP64_OFF64 1 - -#else /* __WORDSIZE == 32 */ - -/* By default we have 32-bit wide `int', `long int', pointers and `off_t' - and all platforms support LFS. */ -# define _POSIX_V6_ILP32_OFF32 1 -# define _POSIX_V6_ILP32_OFFBIG 1 -# define _XBS5_ILP32_OFF32 1 -# define _XBS5_ILP32_OFFBIG 1 - -/* We optionally provide an environment with the above size but an 64-bit - side `off_t'. Therefore we don't define _XBS5_ILP32_OFFBIG. */ - -/* We can never provide environments with 64-bit wide pointers. */ -# define _POSIX_V6_LP64_OFF64 -1 -# define _POSIX_V6_LPBIG_OFFBIG -1 -# define _XBS5_LP64_OFF64 -1 -# define _XBS5_LPBIG_OFFBIG -1 - -#endif /* __WORDSIZE == 32 */ diff --git a/libc/sysdeps/linux/mips/bits/fenvinline.h b/libc/sysdeps/linux/mips/bits/fenvinline.h deleted file mode 100644 index 42f77b561..000000000 --- a/libc/sysdeps/linux/mips/bits/fenvinline.h +++ /dev/null @@ -1,8 +0,0 @@ -/* This file provides inline versions of floating-pint environment - handling functions. If there were any. */ - -#ifndef __NO_MATH_INLINES - -/* Here is where the code would go. */ - -#endif diff --git a/libc/sysdeps/linux/mips/bits/in.h b/libc/sysdeps/linux/mips/bits/in.h deleted file mode 100644 index e6cf57574..000000000 --- a/libc/sysdeps/linux/mips/bits/in.h +++ /dev/null @@ -1,141 +0,0 @@ -/* Copyright (C) 1991-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. */ - -/* Linux version. */ - -#ifndef _NETINET_IN_H -# error "Never use <bits/in.h> directly; include <netinet/in.h> instead." -#endif - -/* Options for use with `getsockopt' and `setsockopt' at the IP level. - The first word in the comment at the right is the data type used; - "bool" means a boolean value stored in an `int'. */ -#define IP_TOS 1 /* int; IP type of service and precedence. */ -#define IP_TTL 2 /* int; IP time to live. */ -#define IP_HDRINCL 3 /* int; Header is included with data. */ -#define IP_OPTIONS 4 /* ip_opts; IP per-packet options. */ -#define IP_ROUTER_ALERT 5 /* bool */ -#define IP_RECVOPTS 6 /* bool */ -#define IP_RETOPTS 7 /* bool */ -#define IP_PKTINFO 8 /* bool */ -#define IP_PKTOPTIONS 9 -#define IP_PMTUDISC 10 /* obsolete name? */ -#define IP_MTU_DISCOVER 10 /* int; see below */ -#define IP_RECVERR 11 /* bool */ -#define IP_RECVTTL 12 /* bool */ -#define IP_RECVTOS 13 /* bool */ -#define IP_MULTICAST_IF 32 /* in_addr; set/get IP multicast i/f */ -#define IP_MULTICAST_TTL 33 /* u_char; set/get IP multicast ttl */ -#define IP_MULTICAST_LOOP 34 /* i_char; set/get IP multicast loopback */ -#define IP_ADD_MEMBERSHIP 35 /* ip_mreq; add an IP group membership */ -#define IP_DROP_MEMBERSHIP 36 /* ip_mreq; drop an IP group membership */ - -/* For BSD compatibility. */ -#define IP_RECVRETOPTS IP_RETOPTS - -/* IP_MTU_DISCOVER arguments. */ -#define IP_PMTUDISC_DONT 0 /* Never send DF frames. */ -#define IP_PMTUDISC_WANT 1 /* Use per route hints. */ -#define IP_PMTUDISC_DO 2 /* Always DF. */ - -/* To select the IP level. */ -#define SOL_IP 0 - -#define IP_DEFAULT_MULTICAST_TTL 1 -#define IP_DEFAULT_MULTICAST_LOOP 1 -#define IP_MAX_MEMBERSHIPS 20 - -/* Structure used to describe IP options for IP_OPTIONS. The `ip_dst' - field is used for the first-hop gateway when using a source route - (this gets put into the header proper). */ -struct ip_opts - { - struct in_addr ip_dst; /* First hop; zero without source route. */ - char ip_opts[40]; /* Actually variable in size. */ - }; - -/* Structure used for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP. */ -struct ip_mreq - { - struct in_addr imr_multiaddr; /* IP multicast address of group */ - struct in_addr imr_interface; /* local IP address of interface */ - }; - -/* As above but including interface specification by index. */ -struct ip_mreqn - { - struct in_addr imr_multiaddr; /* IP multicast address of group */ - struct in_addr imr_address; /* local IP address of interface */ - int imr_ifindex; /* Interface index */ - }; - -/* Structure used for IP_PKTINFO. */ -struct in_pktinfo - { - int ipi_ifindex; /* Interface index */ - struct in_addr ipi_spec_dst; /* Routing destination address */ - struct in_addr ipi_addr; /* Header destination address */ - }; - -/* Options for use with `getsockopt' and `setsockopt' at the IPv6 level. - The first word in the comment at the right is the data type used; - "bool" means a boolean value stored in an `int'. */ -#define IPV6_ADDRFORM 1 -#define IPV6_PKTINFO 2 -#define IPV6_HOPOPTS 3 -#define IPV6_DSTOPTS 4 -#define IPV6_RTHDR 5 -#define IPV6_PKTOPTIONS 6 -#define IPV6_CHECKSUM 7 -#define IPV6_HOPLIMIT 8 -#define IPV6_NEXTHOP 9 -#define IPV6_AUTHHDR 10 -#define IPV6_UNICAST_HOPS 16 -#define IPV6_MULTICAST_IF 17 -#define IPV6_MULTICAST_HOPS 18 -#define IPV6_MULTICAST_LOOP 19 -#define IPV6_JOIN_GROUP 20 -#define IPV6_LEAVE_GROUP 21 -#define IPV6_ROUTER_ALERT 22 -#define IPV6_MTU_DISCOVER 23 -#define IPV6_MTU 24 -#define IPV6_RECVERR 25 - -#define SCM_SRCRT IPV6_RXSRCRT - -/* Obsolete synonyms for the above. */ -#define IPV6_RXHOPOPTS IPV6_HOPOPTS -#define IPV6_RXDSTOPTS IPV6_DSTOPTS -#define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP -#define IPV6_DROP_MEMBERSHIP IPV6_LEAVE_GROUP - - -/* IPV6_MTU_DISCOVER values. */ -#define IPV6_PMTUDISC_DONT 0 /* Never send DF frames. */ -#define IPV6_PMTUDISC_WANT 1 /* Use per route hints. */ -#define IPV6_PMTUDISC_DO 2 /* Always DF. */ - -/* Socket level values for IPv6. */ -#define SOL_IPV6 41 -#define SOL_ICMPV6 58 - -/* Routing header options for IPv6. */ -#define IPV6_RTHDR_LOOSE 0 /* Hop doesn't need to be neighbour. */ -#define IPV6_RTHDR_STRICT 1 /* Hop must be a neighbour. */ - -#define IPV6_RTHDR_TYPE_0 0 /* IPv6 Routing header type 0. */ diff --git a/libc/sysdeps/linux/mips/bits/initspin.h b/libc/sysdeps/linux/mips/bits/initspin.h deleted file mode 100644 index af19d44e6..000000000 --- a/libc/sysdeps/linux/mips/bits/initspin.h +++ /dev/null @@ -1,28 +0,0 @@ -/* Generic definitions for spinlock initializers. - Copyright (C) 2000, 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* Initial value of a spinlock. Most platforms should use zero, - unless they only implement a "test and clear" operation instead of - the usual "test and set". */ -#define __LT_SPINLOCK_INIT 0 - -/* Macros for lock initializers, using the above definition. */ -#define __LOCK_INITIALIZER { 0, __LT_SPINLOCK_INIT } -#define __ALT_LOCK_INITIALIZER { 0, __LT_SPINLOCK_INIT } -#define __ATOMIC_INITIALIZER { 0, __LT_SPINLOCK_INIT } diff --git a/libc/sysdeps/linux/mips/bits/ioctls.h b/libc/sysdeps/linux/mips/bits/ioctls.h deleted file mode 100644 index b49ca2076..000000000 --- a/libc/sysdeps/linux/mips/bits/ioctls.h +++ /dev/null @@ -1,108 +0,0 @@ -/* Copyright (C) 1996, 1997, 1998 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 _SYS_IOCTL_H -# error "Never use <bits/ioctls.h> directly; include <sys/ioctl.h> instead." -#endif - -/* Use the definitions from the kernel header files. */ -#include <asm/ioctls.h> - -/* Routing table calls. */ -#define SIOCADDRT 0x890B /* add routing table entry */ -#define SIOCDELRT 0x890C /* delete routing table entry */ -#define SIOCRTMSG 0x890D /* call to routing system */ - -/* Socket configuration controls. */ -#define SIOCGIFNAME 0x8910 /* get iface name */ -#define SIOCSIFLINK 0x8911 /* set iface channel */ -#define SIOCGIFCONF 0x8912 /* get iface list */ -#define SIOCGIFFLAGS 0x8913 /* get flags */ -#define SIOCSIFFLAGS 0x8914 /* set flags */ -#define SIOCGIFADDR 0x8915 /* get PA address */ -#define SIOCSIFADDR 0x8916 /* set PA address */ -#define SIOCGIFDSTADDR 0x8917 /* get remote PA address */ -#define SIOCSIFDSTADDR 0x8918 /* set remote PA address */ -#define SIOCGIFBRDADDR 0x8919 /* get broadcast PA address */ -#define SIOCSIFBRDADDR 0x891a /* set broadcast PA address */ -#define SIOCGIFNETMASK 0x891b /* get network PA mask */ -#define SIOCSIFNETMASK 0x891c /* set network PA mask */ -#define SIOCGIFMETRIC 0x891d /* get metric */ -#define SIOCSIFMETRIC 0x891e /* set metric */ -#define SIOCGIFMEM 0x891f /* get memory address (BSD) */ -#define SIOCSIFMEM 0x8920 /* set memory address (BSD) */ -#define SIOCGIFMTU 0x8921 /* get MTU size */ -#define SIOCSIFMTU 0x8922 /* set MTU size */ -#define SIOCSIFHWADDR 0x8924 /* set hardware address */ -#define SIOCGIFENCAP 0x8925 /* get/set encapsulations */ -#define SIOCSIFENCAP 0x8926 -#define SIOCGIFHWADDR 0x8927 /* Get hardware address */ -#define SIOCGIFSLAVE 0x8929 /* Driver slaving support */ -#define SIOCSIFSLAVE 0x8930 -#define SIOCADDMULTI 0x8931 /* Multicast address lists */ -#define SIOCDELMULTI 0x8932 -#define SIOCGIFINDEX 0x8933 /* name -> if_index mapping */ -#define SIOGIFINDEX SIOCGIFINDEX /* misprint compatibility :-) */ -#define SIOCSIFPFLAGS 0x8934 /* set/get extended flags set */ -#define SIOCGIFPFLAGS 0x8935 -#define SIOCDIFADDR 0x8936 /* delete PA address */ -#define SIOCSIFHWBROADCAST 0x8937 /* set hardware broadcast addr */ -#define SIOCGIFCOUNT 0x8938 /* get number of devices */ - -#define SIOCGIFBR 0x8940 /* Bridging support */ -#define SIOCSIFBR 0x8941 /* Set bridging options */ - -#define SIOCGIFTXQLEN 0x8942 /* Get the tx queue length */ -#define SIOCSIFTXQLEN 0x8943 /* Set the tx queue length */ - - -/* ARP cache control calls. */ - /* 0x8950 - 0x8952 * obsolete calls, don't re-use */ -#define SIOCDARP 0x8953 /* delete ARP table entry */ -#define SIOCGARP 0x8954 /* get ARP table entry */ -#define SIOCSARP 0x8955 /* set ARP table entry */ - -/* RARP cache control calls. */ -#define SIOCDRARP 0x8960 /* delete RARP table entry */ -#define SIOCGRARP 0x8961 /* get RARP table entry */ -#define SIOCSRARP 0x8962 /* set RARP table entry */ - -/* Driver configuration calls */ - -#define SIOCGIFMAP 0x8970 /* Get device parameters */ -#define SIOCSIFMAP 0x8971 /* Set device parameters */ - -/* DLCI configuration calls */ - -#define SIOCADDDLCI 0x8980 /* Create new DLCI device */ -#define SIOCDELDLCI 0x8981 /* Delete DLCI device */ - -/* Device private ioctl calls. */ - -/* These 16 ioctls are available to devices via the do_ioctl() device - vector. Each device should include this file and redefine these - names as their own. Because these are device dependent it is a good - idea _NOT_ to issue them to random objects and hope. */ - -#define SIOCDEVPRIVATE 0x89F0 /* to 89FF */ - -/* - * These 16 ioctl calls are protocol private - */ - -#define SIOCPROTOPRIVATE 0x89E0 /* to 89EF */ diff --git a/libc/sysdeps/linux/mips/bits/libc-lock.h b/libc/sysdeps/linux/mips/bits/libc-lock.h deleted file mode 100644 index 2c1d16277..000000000 --- a/libc/sysdeps/linux/mips/bits/libc-lock.h +++ /dev/null @@ -1,327 +0,0 @@ -/* libc-internal interface for mutex locks. LinuxThreads version. - Copyright (C) 1996,1997,1998,1999,2000,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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _BITS_LIBC_LOCK_H -#define _BITS_LIBC_LOCK_H 1 - -#include <pthread.h> - -/* Mutex type. */ -#if defined(_LIBC) || defined(_IO_MTSAFE_IO) -typedef pthread_mutex_t __libc_lock_t; -typedef struct { pthread_mutex_t mutex; } __libc_lock_recursive_t; -# ifdef __USE_UNIX98 -typedef pthread_rwlock_t __libc_rwlock_t; -# else -typedef struct __libc_rwlock_opaque__ __libc_rwlock_t; -# endif -#else -typedef struct __libc_lock_opaque__ __libc_lock_t; -typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t; -typedef struct __libc_rwlock_opaque__ __libc_rwlock_t; -#endif - -/* Type for key to thread-specific data. */ -typedef pthread_key_t __libc_key_t; - -/* Define a lock variable NAME with storage class CLASS. The lock must be - initialized with __libc_lock_init before it can be used (or define it - with __libc_lock_define_initialized, below). Use `extern' for CLASS to - declare a lock defined in another module. In public structure - definitions you must use a pointer to the lock structure (i.e., NAME - begins with a `*'), because its storage size will not be known outside - of libc. */ -#define __libc_lock_define(CLASS,NAME) \ - CLASS __libc_lock_t NAME; -#define __libc_rwlock_define(CLASS,NAME) \ - CLASS __libc_rwlock_t NAME; -#define __libc_lock_define_recursive(CLASS,NAME) \ - CLASS __libc_lock_recursive_t NAME; - -/* Define an initialized lock variable NAME with storage class CLASS. - - For the C library we take a deeper look at the initializer. For - this implementation all fields are initialized to zero. Therefore - we don't initialize the variable which allows putting it into the - BSS section. (Except on PA-RISC and other odd architectures, where - initialized locks must be set to one due to the lack of normal - atomic operations.) */ - -#if __LT_SPINLOCK_INIT == 0 -# define __libc_lock_define_initialized(CLASS,NAME) \ - CLASS __libc_lock_t NAME; -#else -# define __libc_lock_define_initialized(CLASS,NAME) \ - CLASS __libc_lock_t NAME = PTHREAD_MUTEX_INITIALIZER; -#endif - -#define __libc_rwlock_define_initialized(CLASS,NAME) \ - CLASS __libc_rwlock_t NAME = PTHREAD_RWLOCK_INITIALIZER; - -/* Define an initialized recursive lock variable NAME with storage - class CLASS. */ -#define __libc_lock_define_initialized_recursive(CLASS,NAME) \ - CLASS __libc_lock_recursive_t NAME = _LIBC_LOCK_RECURSIVE_INITIALIZER; -#define _LIBC_LOCK_RECURSIVE_INITIALIZER \ - {PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP} - -/* Initialize the named lock variable, leaving it in a consistent, unlocked - state. */ -#define __libc_lock_init(NAME) \ - (__pthread_mutex_init != NULL ? __pthread_mutex_init (&(NAME), NULL) : 0); -#define __libc_rwlock_init(NAME) \ - (__pthread_rwlock_init != NULL ? __pthread_rwlock_init (&(NAME), NULL) : 0); - -/* Same as last but this time we initialize a recursive mutex. */ -#define __libc_lock_init_recursive(NAME) \ - do { \ - if (__pthread_mutex_init != NULL) \ - { \ - pthread_mutexattr_t __attr; \ - __pthread_mutexattr_init (&__attr); \ - __pthread_mutexattr_settype (&__attr, PTHREAD_MUTEX_RECURSIVE_NP); \ - __pthread_mutex_init (&(NAME).mutex, &__attr); \ - __pthread_mutexattr_destroy (&__attr); \ - } \ - } while (0); - -/* Finalize the named lock variable, which must be locked. It cannot be - used again until __libc_lock_init is called again on it. This must be - called on a lock variable before the containing storage is reused. */ -#define __libc_lock_fini(NAME) \ - (__pthread_mutex_destroy != NULL ? __pthread_mutex_destroy (&(NAME)) : 0); -#define __libc_rwlock_fini(NAME) \ - (__pthread_rwlock_destroy != NULL ? __pthread_rwlock_destroy (&(NAME)) : 0); - -/* Finalize recursive named lock. */ -#define __libc_lock_fini_recursive(NAME) __libc_lock_fini ((NAME).mutex) - -/* Lock the named lock variable. */ -#define __libc_lock_lock(NAME) \ - (__pthread_mutex_lock != NULL ? __pthread_mutex_lock (&(NAME)) : 0); -#define __libc_rwlock_rdlock(NAME) \ - (__pthread_rwlock_rdlock != NULL ? __pthread_rwlock_rdlock (&(NAME)) : 0); -#define __libc_rwlock_wrlock(NAME) \ - (__pthread_rwlock_wrlock != NULL ? __pthread_rwlock_wrlock (&(NAME)) : 0); - -/* Lock the recursive named lock variable. */ -#define __libc_lock_lock_recursive(NAME) __libc_lock_lock ((NAME).mutex) - -/* Try to lock the named lock variable. */ -#define __libc_lock_trylock(NAME) \ - (__pthread_mutex_trylock != NULL ? __pthread_mutex_trylock (&(NAME)) : 0) -#define __libc_rwlock_tryrdlock(NAME) \ - (__pthread_rwlock_tryrdlock != NULL \ - ? __pthread_rwlock_tryrdlock (&(NAME)) : 0) -#define __libc_rwlock_trywrlock(NAME) \ - (__pthread_rwlock_trywrlock != NULL \ - ? __pthread_rwlock_trywrlock (&(NAME)) : 0) - -/* Try to lock the recursive named lock variable. */ -#define __libc_lock_trylock_recursive(NAME) __libc_lock_trylock ((NAME).mutex) - -/* Unlock the named lock variable. */ -#define __libc_lock_unlock(NAME) \ - (__pthread_mutex_unlock != NULL ? __pthread_mutex_unlock (&(NAME)) : 0); -#define __libc_rwlock_unlock(NAME) \ - (__pthread_rwlock_unlock != NULL ? __pthread_rwlock_unlock (&(NAME)) : 0); - -/* Unlock the recursive named lock variable. */ -#define __libc_lock_unlock_recursive(NAME) __libc_lock_unlock ((NAME).mutex) - - -/* Define once control variable. */ -#if PTHREAD_ONCE_INIT == 0 -/* Special case for static variables where we can avoid the initialization - if it is zero. */ -# define __libc_once_define(CLASS, NAME) \ - CLASS pthread_once_t NAME -#else -# define __libc_once_define(CLASS, NAME) \ - CLASS pthread_once_t NAME = PTHREAD_ONCE_INIT -#endif - -/* Call handler iff the first call. */ -#define __libc_once(ONCE_CONTROL, INIT_FUNCTION) \ - do { \ - if (__pthread_once != NULL) \ - __pthread_once (&(ONCE_CONTROL), (INIT_FUNCTION)); \ - else if ((ONCE_CONTROL) == PTHREAD_ONCE_INIT) { \ - INIT_FUNCTION (); \ - (ONCE_CONTROL) = !PTHREAD_ONCE_INIT; \ - } \ - } while (0) - - -/* Start critical region with cleanup. */ -#define __libc_cleanup_region_start(DOIT, FCT, ARG) \ - { struct _pthread_cleanup_buffer _buffer; \ - int _avail = (DOIT) && _pthread_cleanup_push_defer != NULL; \ - if (_avail) { \ - _pthread_cleanup_push_defer (&_buffer, (FCT), (ARG)); \ - } - -/* End critical region with cleanup. */ -#define __libc_cleanup_region_end(DOIT) \ - if (_avail) { \ - _pthread_cleanup_pop_restore (&_buffer, (DOIT)); \ - } \ - } - -/* Sometimes we have to exit the block in the middle. */ -#define __libc_cleanup_end(DOIT) \ - if (_avail) { \ - _pthread_cleanup_pop_restore (&_buffer, (DOIT)); \ - } - -/* Create thread-specific key. */ -#define __libc_key_create(KEY, DESTRUCTOR) \ - (__pthread_key_create != NULL ? __pthread_key_create (KEY, DESTRUCTOR) : 1) - -/* Get thread-specific data. */ -#define __libc_getspecific(KEY) \ - (__pthread_getspecific != NULL ? __pthread_getspecific (KEY) : NULL) - -/* Set thread-specific data. */ -#define __libc_setspecific(KEY, VALUE) \ - (__pthread_setspecific != NULL ? __pthread_setspecific (KEY, VALUE) : 0) - - -/* Register handlers to execute before and after `fork'. */ -#define __libc_atfork(PREPARE, PARENT, CHILD) \ - (__pthread_atfork != NULL ? __pthread_atfork (PREPARE, PARENT, CHILD) : 0) - -/* Functions that are used by this file and are internal to the GNU C - library. */ - -extern int __pthread_mutex_init (pthread_mutex_t *__mutex, - __const pthread_mutexattr_t *__mutex_attr); - -extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex); - -extern int __pthread_mutex_trylock (pthread_mutex_t *__mutex); - -extern int __pthread_mutex_lock (pthread_mutex_t *__mutex); - -extern int __pthread_mutex_unlock (pthread_mutex_t *__mutex); - -extern int __pthread_mutexattr_init (pthread_mutexattr_t *__attr); - -extern int __pthread_mutexattr_destroy (pthread_mutexattr_t *__attr); - -extern int __pthread_mutexattr_settype (pthread_mutexattr_t *__attr, - int __kind); - -#ifdef __USE_UNIX98 -extern int __pthread_rwlock_init (pthread_rwlock_t *__rwlock, - __const pthread_rwlockattr_t *__attr); - -extern int __pthread_rwlock_destroy (pthread_rwlock_t *__rwlock); - -extern int __pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock); - -extern int __pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock); - -extern int __pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock); - -extern int __pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock); - -extern int __pthread_rwlock_unlock (pthread_rwlock_t *__rwlock); -#endif - -extern int __pthread_key_create (pthread_key_t *__key, - void (*__destr_function) (void *)); - -extern int __pthread_setspecific (pthread_key_t __key, - __const void *__pointer); - -extern void *__pthread_getspecific (pthread_key_t __key); - -extern int __pthread_once (pthread_once_t *__once_control, - void (*__init_routine) (void)); - -extern int __pthread_atfork (void (*__prepare) (void), - void (*__parent) (void), - void (*__child) (void)); - - - -/* Make the pthread functions weak so that we can elide them from - single-threaded processes. */ -#ifndef __NO_WEAK_PTHREAD_ALIASES -# ifdef weak_extern -# if _LIBC -# include <bp-sym.h> -# else -# define BP_SYM (sym) sym -# endif -weak_extern (BP_SYM (__pthread_mutex_init)) -weak_extern (BP_SYM (__pthread_mutex_destroy)) -weak_extern (BP_SYM (__pthread_mutex_lock)) -weak_extern (BP_SYM (__pthread_mutex_trylock)) -weak_extern (BP_SYM (__pthread_mutex_unlock)) -weak_extern (BP_SYM (__pthread_mutexattr_init)) -weak_extern (BP_SYM (__pthread_mutexattr_destroy)) -weak_extern (BP_SYM (__pthread_mutexattr_settype)) -weak_extern (BP_SYM (__pthread_rwlock_init)) -weak_extern (BP_SYM (__pthread_rwlock_destroy)) -weak_extern (BP_SYM (__pthread_rwlock_rdlock)) -weak_extern (BP_SYM (__pthread_rwlock_tryrdlock)) -weak_extern (BP_SYM (__pthread_rwlock_wrlock)) -weak_extern (BP_SYM (__pthread_rwlock_trywrlock)) -weak_extern (BP_SYM (__pthread_rwlock_unlock)) -weak_extern (BP_SYM (__pthread_key_create)) -weak_extern (BP_SYM (__pthread_setspecific)) -weak_extern (BP_SYM (__pthread_getspecific)) -weak_extern (BP_SYM (__pthread_once)) -weak_extern (__pthread_initialize) -weak_extern (__pthread_atfork) -weak_extern (BP_SYM (_pthread_cleanup_push_defer)) -weak_extern (BP_SYM (_pthread_cleanup_pop_restore)) -# else -# pragma weak __pthread_mutex_init -# pragma weak __pthread_mutex_destroy -# pragma weak __pthread_mutex_lock -# pragma weak __pthread_mutex_trylock -# pragma weak __pthread_mutex_unlock -# pragma weak __pthread_mutexattr_init -# pragma weak __pthread_mutexattr_destroy -# pragma weak __pthread_mutexattr_settype -# pragma weak __pthread_rwlock_destroy -# pragma weak __pthread_rwlock_rdlock -# pragma weak __pthread_rwlock_tryrdlock -# pragma weak __pthread_rwlock_wrlock -# pragma weak __pthread_rwlock_trywrlock -# pragma weak __pthread_rwlock_unlock -# pragma weak __pthread_key_create -# pragma weak __pthread_setspecific -# pragma weak __pthread_getspecific -# pragma weak __pthread_once -# pragma weak __pthread_initialize -# pragma weak __pthread_atfork -# pragma weak _pthread_cleanup_push_defer -# pragma weak _pthread_cleanup_pop_restore -# endif -#endif - -/* We need portable names for some functions. E.g., when they are - used as argument to __libc_cleanup_region_start. */ -#define __libc_mutex_unlock __pthread_mutex_unlock - -#endif /* bits/libc-lock.h */ diff --git a/libc/sysdeps/linux/mips/bits/local_lim.h b/libc/sysdeps/linux/mips/bits/local_lim.h deleted file mode 100644 index 0a7c83706..000000000 --- a/libc/sysdeps/linux/mips/bits/local_lim.h +++ /dev/null @@ -1,77 +0,0 @@ -/* Minimum guaranteed maximum values for system limits. Linux version. - Copyright (C) 1993, 94, 95, 96, 97, 98, 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* The kernel header pollutes the namespace with the NR_OPEN symbol - and defines LINK_MAX although filesystems have different maxima. A - similar thing is true for OPEN_MAX: the limit can be changed at - runtime and therefore the macro must not be defined. Remove this - after including the header if necessary. */ -#ifndef NR_OPEN -# define __undef_NR_OPEN -#endif -#ifndef LINK_MAX -# define __undef_LINK_MAX -#endif -#ifndef OPEN_MAX -# define __undef_OPEN_MAX -#endif - -/* The kernel sources contain a file with all the needed information. */ -#include <linux/limits.h> - -/* Have to remove NR_OPEN? */ -#ifdef __undef_NR_OPEN -# undef NR_OPEN -# undef __undef_NR_OPEN -#endif -/* Have to remove LINK_MAX? */ -#ifdef __undef_LINK_MAX -# undef LINK_MAX -# undef __undef_LINK_MAX -#endif -/* Have to remove OPEN_MAX? */ -#ifdef __undef_OPEN_MAX -# undef OPEN_MAX -# undef __undef_OPEN_MAX -#endif - -/* The number of data keys per process. */ -#define _POSIX_THREAD_KEYS_MAX 128 -/* This is the value this implementation supports. */ -#define PTHREAD_KEYS_MAX 1024 - -/* Controlling the iterations of destructors for thread-specific data. */ -#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 -/* Number of iterations this implementation does. */ -#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS - -/* The number of threads per process. */ -#define _POSIX_THREAD_THREADS_MAX 64 -/* This is the value this implementation supports. */ -#define PTHREAD_THREADS_MAX 1024 - -/* Maximum amount by which a process can descrease its asynchronous I/O - priority level. */ -#define AIO_PRIO_DELTA_MAX 20 - -/* Minimum size for a thread. We are free to choose a reasonable value. */ -#define PTHREAD_STACK_MIN 16384 - -/* Maximum number of POSIX timers available. */ -#define TIMER_MAX 256 diff --git a/libc/sysdeps/linux/mips/bits/locale.h b/libc/sysdeps/linux/mips/bits/locale.h deleted file mode 100644 index 50064b53e..000000000 --- a/libc/sysdeps/linux/mips/bits/locale.h +++ /dev/null @@ -1,44 +0,0 @@ -/* Definition of locale category symbol values. - Copyright (C) 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. */ - -#if !defined _LOCALE_H && !defined _LANGINFO_H -# error "Never use <bits/locale.h> directly; include <locale.h> instead." -#endif - -#ifndef _BITS_LOCALE_H -#define _BITS_LOCALE_H 1 - -enum -{ - __LC_CTYPE = 0, - __LC_NUMERIC = 1, - __LC_TIME = 2, - __LC_COLLATE = 3, - __LC_MONETARY = 4, - __LC_MESSAGES = 5, - __LC_ALL = 6, - __LC_PAPER = 7, - __LC_NAME = 8, - __LC_ADDRESS = 9, - __LC_TELEPHONE = 10, - __LC_MEASUREMENT = 11, - __LC_IDENTIFICATION = 12 -}; - -#endif /* bits/locale.h */ diff --git a/libc/sysdeps/linux/mips/bits/mathcalls.h b/libc/sysdeps/linux/mips/bits/mathcalls.h deleted file mode 100644 index c1181f737..000000000 --- a/libc/sysdeps/linux/mips/bits/mathcalls.h +++ /dev/null @@ -1,333 +0,0 @@ -/* Prototype declarations for math functions; helper file for <math.h>. - Copyright (C) 1996,1997,1998,1999,2000,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 <math.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,[_r], (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,[_r], (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. - - Note that there must be no whitespace before the argument passed for - NAME, to make token pasting work with -traditional. */ - -#ifndef _MATH_H - #error "Never include <bits/mathcalls.h> directly; include <math.h> instead." -#endif - - -/* Trigonometric functions. */ - -/* Arc cosine of X. */ -__MATHCALL (acos,, (_Mdouble_ __x)); -/* Arc sine of X. */ -__MATHCALL (asin,, (_Mdouble_ __x)); -/* Arc tangent of X. */ -__MATHCALL (atan,, (_Mdouble_ __x)); -/* Arc tangent of Y/X. */ -__MATHCALL (atan2,, (_Mdouble_ __y, _Mdouble_ __x)); - -/* Cosine of X. */ -__MATHCALL (cos,, (_Mdouble_ __x)); -/* Sine of X. */ -__MATHCALL (sin,, (_Mdouble_ __x)); -/* Tangent of X. */ -__MATHCALL (tan,, (_Mdouble_ __x)); - -#ifdef __USE_GNU -/* Cosine and sine of X. */ -__MATHDECL (void,sincos,, - (_Mdouble_ __x, _Mdouble_ *__sinx, _Mdouble_ *__cosx)); -#endif - -/* Hyperbolic functions. */ - -/* Hyperbolic cosine of X. */ -__MATHCALL (cosh,, (_Mdouble_ __x)); -/* Hyperbolic sine of X. */ -__MATHCALL (sinh,, (_Mdouble_ __x)); -/* Hyperbolic tangent of X. */ -__MATHCALL (tanh,, (_Mdouble_ __x)); - -#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 -/* Hyperbolic arc cosine of X. */ -__MATHCALL (acosh,, (_Mdouble_ __x)); -/* Hyperbolic arc sine of X. */ -__MATHCALL (asinh,, (_Mdouble_ __x)); -/* Hyperbolic arc tangent of X. */ -__MATHCALL (atanh,, (_Mdouble_ __x)); -#endif - -/* Exponential and logarithmic functions. */ - -/* Exponential function of X. */ -__MATHCALL (exp,, (_Mdouble_ __x)); - -#ifdef __USE_GNU -/* A function missing in all standards: compute exponent to base ten. */ -__MATHCALL (exp10,, (_Mdouble_ __x)); -/* Another name occasionally used. */ -__MATHCALL (pow10,, (_Mdouble_ __x)); -#endif - -/* Break VALUE into a normalized fraction and an integral power of 2. */ -__MATHCALL (frexp,, (_Mdouble_ __x, int *__exponent)); - -/* X times (two to the EXP power). */ -__MATHCALL (ldexp,, (_Mdouble_ __x, int __exponent)); - -/* Natural logarithm of X. */ -__MATHCALL (log,, (_Mdouble_ __x)); - -/* Base-ten logarithm of X. */ -__MATHCALL (log10,, (_Mdouble_ __x)); - -/* Break VALUE into integral and fractional parts. */ -__MATHCALL (modf,, (_Mdouble_ __x, _Mdouble_ *__iptr)); - -#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 -/* Return exp(X) - 1. */ -__MATHCALL (expm1,, (_Mdouble_ __x)); - -/* Return log(1 + X). */ -__MATHCALL (log1p,, (_Mdouble_ __x)); - -/* Return the base 2 signed integral exponent of X. */ -__MATHCALL (logb,, (_Mdouble_ __x)); -#endif - -#ifdef __USE_ISOC99 -/* Compute base-2 exponential of X. */ -__MATHCALL (exp2,, (_Mdouble_ __x)); - -/* Compute base-2 logarithm of X. */ -__MATHCALL (log2,, (_Mdouble_ __x)); -#endif - - -/* Power functions. */ - -/* Return X to the Y power. */ -__MATHCALL (pow,, (_Mdouble_ __x, _Mdouble_ __y)); - -/* Return the square root of X. */ -__MATHCALL (sqrt,, (_Mdouble_ __x)); - -#if defined __USE_MISC || defined __USE_XOPEN || defined __USE_ISOC99 -/* Return `sqrt(X*X + Y*Y)'. */ -__MATHCALL (hypot,, (_Mdouble_ __x, _Mdouble_ __y)); -#endif - -#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 -/* Return the cube root of X. */ -__MATHCALL (cbrt,, (_Mdouble_ __x)); -#endif - - -/* Nearest integer, absolute value, and remainder functions. */ - -/* Smallest integral value not less than X. */ -__MATHCALL (ceil,, (_Mdouble_ __x)); - -/* Absolute value of X. */ -__MATHCALLX (fabs,, (_Mdouble_ __x), (__const__)); - -/* Largest integer not greater than X. */ -__MATHCALL (floor,, (_Mdouble_ __x)); - -/* Floating-point modulo remainder of X/Y. */ -__MATHCALL (fmod,, (_Mdouble_ __x, _Mdouble_ __y)); - - -/* Return 0 if VALUE is finite or NaN, +1 if it - is +Infinity, -1 if it is -Infinity. */ -__MATHDECL_1 (int,__isinf,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -/* Return nonzero if VALUE is finite and not NaN. */ -__MATHDECL_1 (int,__finite,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -#ifdef __USE_MISC -/* Return 0 if VALUE is finite or NaN, +1 if it - is +Infinity, -1 if it is -Infinity. */ -__MATHDECL_1 (int,isinf,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -/* Return nonzero if VALUE is finite and not NaN. */ -__MATHDECL_1 (int,finite,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -/* Return the remainder of X/Y. */ -__MATHCALL (drem,, (_Mdouble_ __x, _Mdouble_ __y)); - - -/* Return the fractional part of X after dividing out `ilogb (X)'. */ -__MATHCALL (significand,, (_Mdouble_ __x)); -#endif /* Use misc. */ - -#if defined __USE_MISC || defined __USE_ISOC99 -/* Return X with its signed changed to Y's. */ -__MATHCALLX (copysign,, (_Mdouble_ __x, _Mdouble_ __y), (__const__)); -#endif - -#ifdef __USE_ISOC99 -/* Return representation of NaN for double type. */ -__MATHCALLX (nan,, (__const char *__tagb), (__const__)); -#endif - - -/* Return nonzero if VALUE is not a number. */ -__MATHDECL_1 (int,__isnan,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -#if defined __USE_MISC || defined __USE_XOPEN -/* Return nonzero if VALUE is not a number. */ -__MATHDECL_1 (int,isnan,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -/* Bessel functions. */ -__MATHCALL (j0,, (_Mdouble_)); -__MATHCALL (j1,, (_Mdouble_)); -__MATHCALL (jn,, (int, _Mdouble_)); -__MATHCALL (y0,, (_Mdouble_)); -__MATHCALL (y1,, (_Mdouble_)); -__MATHCALL (yn,, (int, _Mdouble_)); -#endif - - -#if defined __USE_MISC || defined __USE_XOPEN || defined __USE_ISOC99 -/* Error and gamma functions. */ -__MATHCALL (erf,, (_Mdouble_)); -__MATHCALL (erfc,, (_Mdouble_)); -__MATHCALL (lgamma,, (_Mdouble_)); -#endif - -#ifdef __USE_ISOC99 -__MATHCALL (tgamma,, (_Mdouble_)); -#endif - -#if defined __USE_MISC || defined __USE_XOPEN -/* Obsolete alias for `lgamma'. */ -__MATHCALL (gamma,, (_Mdouble_)); -#endif - -#ifdef __USE_MISC -/* Reentrant version of lgamma. This function uses the global variable - `signgam'. The reentrant version instead takes a pointer and stores - the value through it. */ -__MATHCALL (lgamma,_r, (_Mdouble_, int *__signgamp)); -#endif - - -#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 -/* Return the integer nearest X in the direction of the - prevailing rounding mode. */ -__MATHCALL (rint,, (_Mdouble_ __x)); - -/* Return X + epsilon if X < Y, X - epsilon if X > Y. */ -__MATHCALLX (nextafter,, (_Mdouble_ __x, _Mdouble_ __y), (__const__)); -# ifdef __USE_ISOC99 -__MATHCALLX (nexttoward,, (_Mdouble_ __x, long double __y), (__const__)); -# endif - -/* Return the remainder of integer divison X / Y with infinite precision. */ -__MATHCALL (remainder,, (_Mdouble_ __x, _Mdouble_ __y)); - -# if defined __USE_MISC || defined __USE_XOPEN_EXTENDED -/* Return X times (2 to the Nth power). */ -__MATHCALL (scalb,, (_Mdouble_ __x, _Mdouble_ __n)); -# endif - -# if defined __USE_MISC || defined __USE_ISOC99 -/* Return X times (2 to the Nth power). */ -__MATHCALL (scalbn,, (_Mdouble_ __x, int __n)); -# endif - -/* Return the binary exponent of X, which must be nonzero. */ -__MATHDECL (int,ilogb,, (_Mdouble_ __x)); -#endif - -#ifdef __USE_ISOC99 -/* Return X times (2 to the Nth power). */ -__MATHCALL (scalbln,, (_Mdouble_ __x, long int __n)); - -/* Round X to integral value in floating-point format using current - rounding direction, but do not raise inexact exception. */ -__MATHCALL (nearbyint,, (_Mdouble_ __x)); - -/* Round X to nearest integral value, rounding halfway cases away from - zero. */ -__MATHCALL (round,, (_Mdouble_ __x)); - -/* Round X to the integral value in floating-point format nearest but - not larger in magnitude. */ -__MATHCALLX (trunc,, (_Mdouble_ __x), (__const__)); - -/* Compute remainder of X and Y and put in *QUO a value with sign of x/y - and magnitude congruent `mod 2^n' to the magnitude of the integral - quotient x/y, with n >= 3. */ -__MATHCALL (remquo,, (_Mdouble_ __x, _Mdouble_ __y, int *__quo)); - - -/* Conversion functions. */ - -/* Round X to nearest integral value according to current rounding - direction. */ -__MATHDECL (long int,lrint,, (_Mdouble_ __x)); -__MATHDECL (long long int,llrint,, (_Mdouble_ __x)); - -/* Round X to nearest integral value, rounding halfway cases away from - zero. */ -__MATHDECL (long int,lround,, (_Mdouble_ __x)); -__MATHDECL (long long int,llround,, (_Mdouble_ __x)); - - -/* Return positive difference between X and Y. */ -__MATHCALL (fdim,, (_Mdouble_ __x, _Mdouble_ __y)); - -/* Return maximum numeric value from X and Y. */ -__MATHCALL (fmax,, (_Mdouble_ __x, _Mdouble_ __y)); - -/* Return minimum numeric value from X and Y. */ -__MATHCALL (fmin,, (_Mdouble_ __x, _Mdouble_ __y)); - - -/* Classify given number. */ -__MATHDECL_1 (int, __fpclassify,, (_Mdouble_ __value)) - __attribute__ ((__const__)); - -/* Test for negative number. */ -__MATHDECL_1 (int, __signbit,, (_Mdouble_ __value)) - __attribute__ ((__const__)); - - -/* Multiply-add function computed as a ternary operation. */ -__MATHCALL (fma,, (_Mdouble_ __x, _Mdouble_ __y, _Mdouble_ __z)); -#endif /* Use ISO C99. */ diff --git a/libc/sysdeps/linux/mips/bits/mathinline.h b/libc/sysdeps/linux/mips/bits/mathinline.h deleted file mode 100644 index 5498af6b6..000000000 --- a/libc/sysdeps/linux/mips/bits/mathinline.h +++ /dev/null @@ -1,12 +0,0 @@ -/* This file should provide inline versions of math functions. - - Surround GCC-specific parts with #ifdef __GNUC__, and use `extern __inline'. - - This file should define __MATH_INLINES if functions are actually defined as - inlines. */ - -#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__ - -/* Here goes the real code. */ - -#endif diff --git a/libc/sysdeps/linux/mips/bits/msq.h b/libc/sysdeps/linux/mips/bits/msq.h deleted file mode 100644 index 32a49b592..000000000 --- a/libc/sysdeps/linux/mips/bits/msq.h +++ /dev/null @@ -1,77 +0,0 @@ -/* Copyright (C) 1995, 1996, 1997, 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 _SYS_MSG_H -# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead." -#endif - -#include <bits/types.h> - -/* Define options for message queue functions. */ -#define MSG_NOERROR 010000 /* no error if message is too big */ -#ifdef __USE_GNU -# define MSG_EXCEPT 020000 /* recv any msg except of specified type */ -#endif - -/* Types used in the structure definition. */ -typedef unsigned long int msgqnum_t; -typedef unsigned long int msglen_t; - - -/* Structure of record for one message inside the kernel. - The type `struct msg' is opaque. */ -struct msqid_ds -{ - struct ipc_perm msg_perm; /* structure describing operation permission */ - __time_t msg_stime; /* time of last msgsnd command */ - unsigned long int __unused1; - __time_t msg_rtime; /* time of last msgrcv command */ - unsigned long int __unused2; - __time_t msg_ctime; /* time of last change */ - unsigned long int __unused3; - unsigned long int __msg_cbytes; /* current number of bytes on queue */ - msgqnum_t msg_qnum; /* number of messages currently on queue */ - msglen_t msg_qbytes; /* max number of bytes allowed on queue */ - __pid_t msg_lspid; /* pid of last msgsnd() */ - __pid_t msg_lrpid; /* pid of last msgrcv() */ - unsigned long int __unused4; - unsigned long int __unused5; -}; - -#ifdef __USE_MISC - -# define msg_cbytes __msg_cbytes - -/* ipcs ctl commands */ -# define MSG_STAT 11 -# define MSG_INFO 12 - -/* buffer for msgctl calls IPC_INFO, MSG_INFO */ -struct msginfo - { - int msgpool; - int msgmap; - int msgmax; - int msgmnb; - int msgmni; - int msgssz; - int msgtql; - unsigned short int msgseg; - }; - -#endif /* __USE_MISC */ diff --git a/libc/sysdeps/linux/mips/bits/nan.h b/libc/sysdeps/linux/mips/bits/nan.h deleted file mode 100644 index 6d88b551b..000000000 --- a/libc/sysdeps/linux/mips/bits/nan.h +++ /dev/null @@ -1,48 +0,0 @@ -/* `NAN' constant for IEEE 754 machines. - Copyright (C) 1992, 1996, 1997, 1999 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 _MATH_H -# error "Never use <bits/nan.h> directly; include <math.h> instead." -#endif - - -/* IEEE Not A Number. */ - -#ifdef __GNUC__ - -# define NAN \ - (__extension__ \ - ((union { unsigned __l __attribute__((__mode__(__SI__))); float __d; }) \ - { __l: 0x7fc00000UL }).__d) - -#else - -# include <endian.h> - -# if __BYTE_ORDER == __BIG_ENDIAN -# define __nan_bytes { 0x7f, 0xc0, 0, 0 } -# endif -# if __BYTE_ORDER == __LITTLE_ENDIAN -# define __nan_bytes { 0, 0, 0xc0, 0x7f } -# endif - -static union { unsigned char __c[4]; float __d; } __nan_union = { __nan_bytes }; -# define NAN (__nan_union.__d) - -#endif /* GCC. */ diff --git a/libc/sysdeps/linux/mips/bits/netdb.h b/libc/sysdeps/linux/mips/bits/netdb.h deleted file mode 100644 index 41dc73193..000000000 --- a/libc/sysdeps/linux/mips/bits/netdb.h +++ /dev/null @@ -1,33 +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. */ - -#ifndef _NETDB_H -# error "Never include <bits/netdb.h> directly; use <netdb.h> instead." -#endif - - -/* Description of data base entry for a single network. NOTE: here a - poor assumption is made. The network number is expected to fit - into an unsigned long int variable. */ -struct netent -{ - char *n_name; /* Official name of network. */ - char **n_aliases; /* Alias list. */ - int n_addrtype; /* Net address type. */ - uint32_t n_net; /* Network number. */ -}; diff --git a/libc/sysdeps/linux/mips/bits/posix1_lim.h b/libc/sysdeps/linux/mips/bits/posix1_lim.h deleted file mode 100644 index e16f4674d..000000000 --- a/libc/sysdeps/linux/mips/bits/posix1_lim.h +++ /dev/null @@ -1,141 +0,0 @@ -/* Copyright (C) 1991,92,93,96,98,2000,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. */ - -/* - * POSIX Standard: 2.9.2 Minimum Values Added to <limits.h> - * - * Never include this file directly; use <limits.h> instead. - */ - -#ifndef _BITS_POSIX1_LIM_H -#define _BITS_POSIX1_LIM_H 1 - - -/* These are the standard-mandated minimum values. */ - -/* Minimum number of operations in one list I/O call. */ -#define _POSIX_AIO_LISTIO_MAX 2 - -/* Minimal number of outstanding asynchronous I/O operations. */ -#define _POSIX_AIO_MAX 1 - -/* Maximum length of arguments to `execve', including environment. */ -#define _POSIX_ARG_MAX 4096 - -/* Maximum simultaneous processes per real user ID. */ -#define _POSIX_CHILD_MAX 6 - -/* Minimal number of timer expiration overruns. */ -#define _POSIX_DELAYTIMER_MAX 32 - -/* Maximum link count of a file. */ -#define _POSIX_LINK_MAX 8 - -/* Number of bytes in a terminal canonical input queue. */ -#define _POSIX_MAX_CANON 255 - -/* Number of bytes for which space will be - available in a terminal input queue. */ -#define _POSIX_MAX_INPUT 255 - -/* Maximum number of message queues open for a process. */ -#define _POSIX_MQ_OPEN_MAX 8 - -/* Maximum number of supported message priorities. */ -#define _POSIX_MQ_PRIO_MAX 32 - -/* Number of simultaneous supplementary group IDs per process. */ -#define _POSIX_NGROUPS_MAX 0 - -/* Number of files one process can have open at once. */ -#define _POSIX_OPEN_MAX 16 - -/* Number of descriptors that a process may examine with `pselect' or - `select'. */ -#define _POSIX_FD_SETSIZE _POSIX_OPEN_MAX - -/* Number of bytes in a filename. */ -#define _POSIX_NAME_MAX 14 - -/* Number of bytes in a pathname. */ -#define _POSIX_PATH_MAX 256 - -/* Number of bytes than can be written atomically to a pipe. */ -#define _POSIX_PIPE_BUF 512 - -/* Minimal number of realtime signals reserved for the application. */ -#define _POSIX_RTSIG_MAX 8 - -/* Number of semaphores a process can have. */ -#define _POSIX_SEM_NSEMS_MAX 256 - -/* Maximal value of a semaphore. */ -#define _POSIX_SEM_VALUE_MAX 32767 - -/* Number of pending realtime signals. */ -#define _POSIX_SIGQUEUE_MAX 32 - -/* Largest value of a `ssize_t'. */ -#define _POSIX_SSIZE_MAX 32767 - -/* Number of streams a process can have open at once. */ -#define _POSIX_STREAM_MAX 8 - -/* Maximum length of a timezone name (element of `tzname'). */ -#define _POSIX_TZNAME_MAX 6 - -/* Maximum number of connections that can be queued on a socket. */ -#define _POSIX_QLIMIT 1 - -/* Maximum number of bytes that can be buffered on a socket for send - or receive. */ -#define _POSIX_HIWAT _POSIX_PIPE_BUF - -/* Maximum number of elements in an `iovec' array. */ -#define _POSIX_UIO_MAXIOV 16 - -/* Maximum number of characters in a tty name. */ -#define _POSIX_TTY_NAME_MAX 9 - -/* Number of timer for a process. */ -#define _POSIX_TIMER_MAX 32 - -/* Maximum length of login name. */ -#define _POSIX_LOGIN_NAME_MAX 9 - -/* Maximum clock resolution in nanoseconds. */ -#define _POSIX_CLOCKRES_MIN 20000000 - - -/* Get the implementation-specific values for the above. */ -#include <bits/local_lim.h> - - -#ifndef SSIZE_MAX -# define SSIZE_MAX INT_MAX -#endif - - -/* This value is a guaranteed minimum maximum. - The current maximum can be got from `sysconf'. */ - -#ifndef NGROUPS_MAX -# define NGROUPS_MAX _POSIX_NGROUPS_MAX -#endif - -#endif /* bits/posix1_lim.h */ diff --git a/libc/sysdeps/linux/mips/bits/posix2_lim.h b/libc/sysdeps/linux/mips/bits/posix2_lim.h deleted file mode 100644 index 24483a09d..000000000 --- a/libc/sysdeps/linux/mips/bits/posix2_lim.h +++ /dev/null @@ -1,91 +0,0 @@ -/* Copyright (C) 1991, 1996, 1999, 2000, 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. */ - -/* - * Never include this file directly; include <limits.h> instead. - */ - -#ifndef _BITS_POSIX2_LIM_H -#define _BITS_POSIX2_LIM_H 1 - - -/* The maximum `ibase' and `obase' values allowed by the `bc' utility. */ -#define _POSIX2_BC_BASE_MAX 99 - -/* The maximum number of elements allowed in an array by the `bc' utility. */ -#define _POSIX2_BC_DIM_MAX 2048 - -/* The maximum `scale' value allowed by the `bc' utility. */ -#define _POSIX2_BC_SCALE_MAX 99 - -/* The maximum length of a string constant accepted by the `bc' utility. */ -#define _POSIX2_BC_STRING_MAX 1000 - -/* The maximum number of weights that can be assigned to an entry of - the LC_COLLATE `order' keyword in the locale definition file. */ -#define _POSIX2_COLL_WEIGHTS_MAX 2 - -/* The maximum number of expressions that can be nested - within parentheses by the `expr' utility. */ -#define _POSIX2_EXPR_NEST_MAX 32 - -/* The maximum length, in bytes, of an input line. */ -#define _POSIX2_LINE_MAX 2048 - -/* The maximum number of repeated occurrences of a regular expression - permitted when using the interval notation `\{M,N\}'. */ -#define _POSIX2_RE_DUP_MAX 255 - -/* The maximum number of bytes in a character class name. We have no - fixed limit, 2048 is a high number. */ -#define _POSIX2_CHARCLASS_NAME_MAX 14 - - -/* These values are implementation-specific, - and may vary within the implementation. - Their precise values can be obtained from sysconf. */ - -#ifndef BC_BASE_MAX -#define BC_BASE_MAX _POSIX2_BC_BASE_MAX -#endif -#ifndef BC_DIM_MAX -#define BC_DIM_MAX _POSIX2_BC_DIM_MAX -#endif -#ifndef BC_SCALE_MAX -#define BC_SCALE_MAX _POSIX2_BC_SCALE_MAX -#endif -#ifndef BC_STRING_MAX -#define BC_STRING_MAX _POSIX2_BC_STRING_MAX -#endif -#ifndef COLL_WEIGHTS_MAX -#define COLL_WEIGHTS_MAX 255 -#endif -#ifndef EXPR_NEST_MAX -#define EXPR_NEST_MAX _POSIX2_EXPR_NEST_MAX -#endif -#ifndef LINE_MAX -#define LINE_MAX _POSIX2_LINE_MAX -#endif -#ifndef CHARCLASS_NAME_MAX -#define CHARCLASS_NAME_MAX 2048 -#endif - -/* This value is defined like this in regex.h. */ -#define RE_DUP_MAX (0x7fff) - -#endif /* bits/posix2_lim.h */ diff --git a/libc/sysdeps/linux/mips/bits/posix_opt.h b/libc/sysdeps/linux/mips/bits/posix_opt.h deleted file mode 100644 index 54640bb56..000000000 --- a/libc/sysdeps/linux/mips/bits/posix_opt.h +++ /dev/null @@ -1,141 +0,0 @@ -/* Define POSIX options for Linux. - Copyright (C) 1996,1997,1998,1999,2000,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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _POSIX_OPT_H -#define _POSIX_OPT_H 1 - -/* Job control is supported. */ -#define _POSIX_JOB_CONTROL 1 - -/* Processes have a saved set-user-ID and a saved set-group-ID. */ -#define _POSIX_SAVED_IDS 1 - -/* Priority scheduling is supported. */ -#define _POSIX_PRIORITY_SCHEDULING 1 - -/* Synchronizing file data is supported. */ -#define _POSIX_SYNCHRONIZED_IO 1 - -/* The fsync function is present. */ -#define _POSIX_FSYNC 1 - -/* Mapping of files to memory is supported. */ -#define _POSIX_MAPPED_FILES 1 - -/* Locking of all memory is supported. */ -#define _POSIX_MEMLOCK 1 - -/* Locking of ranges of memory is supported. */ -#define _POSIX_MEMLOCK_RANGE 1 - -/* Setting of memory protections is supported. */ -#define _POSIX_MEMORY_PROTECTION 1 - -/* Implementation supports `poll' function. */ -#define _POSIX_POLL 1 - -/* Implementation supports `select' and `pselect' functions. */ -#define _POSIX_SELECT 1 - -/* Only root can change owner of file. */ -#define _POSIX_CHOWN_RESTRICTED 1 - -/* `c_cc' member of 'struct termios' structure can be disabled by - using the value _POSIX_VDISABLE. */ -#define _POSIX_VDISABLE '\0' - -/* Filenames are not silently truncated. */ -#define _POSIX_NO_TRUNC 1 - -/* X/Open realtime support is available. */ -#define _XOPEN_REALTIME 1 - -/* X/Open realtime thread support is available. */ -#define _XOPEN_REALTIME_THREADS 1 - -/* XPG4.2 shared memory is supported. */ -#define _XOPEN_SHM 1 - -/* Tell we have POSIX threads. */ -#define _POSIX_THREADS 1 - -/* We have the reentrant functions described in POSIX. */ -#define _POSIX_REENTRANT_FUNCTIONS 1 -#define _POSIX_THREAD_SAFE_FUNCTIONS 1 - -/* We provide priority scheduling for threads. */ -#define _POSIX_THREAD_PRIORITY_SCHEDULING 1 - -/* We support user-defined stack sizes. */ -#define _POSIX_THREAD_ATTR_STACKSIZE 1 - -/* We support user-defined stacks. */ -#define _POSIX_THREAD_ATTR_STACKADDR 1 - -/* We support POSIX.1b semaphores, but only the non-shared form for now. */ -#define _POSIX_SEMAPHORES 1 - -/* Real-time signals are supported. */ -#define _POSIX_REALTIME_SIGNALS 1 - -/* We support asynchronous I/O. */ -#define _POSIX_ASYNCHRONOUS_IO 1 -#define _POSIX_ASYNC_IO 1 -/* Alternative name for Unix98. */ -#define _LFS_ASYNCHRONOUS_IO 1 - -/* The LFS support in asynchronous I/O is also available. */ -#define _LFS64_ASYNCHRONOUS_IO 1 - -/* The rest of the LFS is also available. */ -#define _LFS_LARGEFILE 1 -#define _LFS64_LARGEFILE 1 -#define _LFS64_STDIO 1 - -/* POSIX shared memory objects are implemented. */ -#define _POSIX_SHARED_MEMORY_OBJECTS 1 - -/* GNU libc provides regular expression handling. */ -#define _POSIX_REGEXP 1 - -/* Reader/Writer locks are available. */ -#define _POSIX_READER_WRITER_LOCKS 200912L - -/* We have a POSIX shell. */ -#define _POSIX_SHELL 1 - -/* We support the Timeouts option. */ -#define _POSIX_TIMEOUTS 200912L - -/* We support spinlocks. */ -#define _POSIX_SPIN_LOCKS 200912L - -/* The `spawn' function family is supported. */ -#define _POSIX_SPAWN 200912L - -/* We have POSIX timers. */ -#define _POSIX_TIMERS 1 - -/* The barrier functions are available. */ -#define _POSIX_BARRIERS 200912L - -/* POSIX message queues are not yet supported. */ -#undef _POSIX_MESSAGE_PASSING - -#endif /* posix_opt.h */ diff --git a/libc/sysdeps/linux/mips/bits/pthreadtypes.h b/libc/sysdeps/linux/mips/bits/pthreadtypes.h deleted file mode 100644 index 3ee5c4813..000000000 --- a/libc/sysdeps/linux/mips/bits/pthreadtypes.h +++ /dev/null @@ -1,142 +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. */ - -#if !defined _BITS_TYPES_H && !defined _PTHREAD_H -# error "Never include <bits/pthreadtypes.h> directly; use <sys/types.h> instead." -#endif - -#ifndef _BITS_PTHREADTYPES_H -#define _BITS_PTHREADTYPES_H 1 - -#define __need_schedparam -#include <bits/sched.h> - -/* Fast locks (not abstract because mutexes and conditions aren't abstract). */ -struct _pthread_fastlock -{ - long int __status; /* "Free" or "taken" or head of waiting list */ - int __spinlock; /* Used by compare_and_swap emulation. Also, - adaptive SMP lock stores spin count here. */ -}; - -#ifndef _PTHREAD_DESCR_DEFINED -/* Thread descriptors */ -typedef struct _pthread_descr_struct *_pthread_descr; -# define _PTHREAD_DESCR_DEFINED -#endif - - -/* Attributes for threads. */ -typedef struct __pthread_attr_s -{ - int __detachstate; - int __schedpolicy; - struct __sched_param __schedparam; - int __inheritsched; - int __scope; - size_t __guardsize; - int __stackaddr_set; - void *__stackaddr; - size_t __stacksize; -} pthread_attr_t; - - -/* Conditions (not abstract because of PTHREAD_COND_INITIALIZER */ -typedef struct -{ - struct _pthread_fastlock __c_lock; /* Protect against concurrent access */ - _pthread_descr __c_waiting; /* Threads waiting on this condition */ -} pthread_cond_t; - - -/* Attribute for conditionally variables. */ -typedef struct -{ - int __dummy; -} pthread_condattr_t; - -/* Keys for thread-specific data */ -typedef unsigned int pthread_key_t; - - -/* Mutexes (not abstract because of PTHREAD_MUTEX_INITIALIZER). */ -/* (The layout is unnatural to maintain binary compatibility - with earlier releases of LinuxThreads.) */ -typedef struct -{ - int __m_reserved; /* Reserved for future use */ - int __m_count; /* Depth of recursive locking */ - _pthread_descr __m_owner; /* Owner thread (if recursive or errcheck) */ - int __m_kind; /* Mutex kind: fast, recursive or errcheck */ - struct _pthread_fastlock __m_lock; /* Underlying fast lock */ -} pthread_mutex_t; - - -/* Attribute for mutex. */ -typedef struct -{ - int __mutexkind; -} pthread_mutexattr_t; - - -/* Once-only execution */ -typedef int pthread_once_t; - - -#ifdef __USE_UNIX98 -/* Read-write locks. */ -typedef struct _pthread_rwlock_t -{ - struct _pthread_fastlock __rw_lock; /* Lock to guarantee mutual exclusion */ - int __rw_readers; /* Number of readers */ - _pthread_descr __rw_writer; /* Identity of writer, or NULL if none */ - _pthread_descr __rw_read_waiting; /* Threads waiting for reading */ - _pthread_descr __rw_write_waiting; /* Threads waiting for writing */ - int __rw_kind; /* Reader/Writer preference selection */ - int __rw_pshared; /* Shared between processes or not */ -} pthread_rwlock_t; - - -/* Attribute for read-write locks. */ -typedef struct -{ - int __lockkind; - int __pshared; -} pthread_rwlockattr_t; -#endif - -#ifdef __USE_XOPEN2K -/* POSIX spinlock data type. */ -typedef volatile int pthread_spinlock_t; - -/* POSIX barrier. */ -typedef struct { - struct _pthread_fastlock __ba_lock; /* Lock to guarantee mutual exclusion */ - int __ba_required; /* Threads needed for completion */ - int __ba_present; /* Threads waiting */ - _pthread_descr __ba_waiting; /* Queue of waiting threads */ -} pthread_barrier_t; - -/* barrier attribute */ -typedef struct { - int __pshared; -} pthread_barrierattr_t; - -#endif - - -/* Thread identifiers */ -typedef unsigned long int pthread_t; - -#endif /* bits/pthreadtypes.h */ diff --git a/libc/sysdeps/linux/mips/bits/sched.h b/libc/sysdeps/linux/mips/bits/sched.h deleted file mode 100644 index 5c10d85d4..000000000 --- a/libc/sysdeps/linux/mips/bits/sched.h +++ /dev/null @@ -1,73 +0,0 @@ -/* Definitions of constants and data structure for POSIX 1003.1b-1993 - scheduling interface. - Copyright (C) 1996, 1997, 1998, 1999, 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. */ - -#ifndef __need_schedparam - -#ifndef _SCHED_H -# error "Never include <bits/sched.h> directly; use <sched.h> instead." -#endif - - -/* Scheduling algorithms. */ -#define SCHED_OTHER 0 -#define SCHED_FIFO 1 -#define SCHED_RR 2 - -#ifdef __USE_MISC -/* Cloning flags. */ -# define CSIGNAL 0x000000ff /* Signal mask to be sent at exit. */ -# define CLONE_VM 0x00000100 /* Set if VM shared between processes. */ -# define CLONE_FS 0x00000200 /* Set if fs info shared between processes. */ -# define CLONE_FILES 0x00000400 /* Set if open files shared between processes. */ -# define CLONE_SIGHAND 0x00000800 /* Set if signal handlers shared. */ -# define CLONE_PID 0x00001000 /* Set if pid shared. */ -# define CLONE_PTRACE 0x00002000 /* Set if tracing continues on the child. */ -# define CLONE_VFORK 0x00004000 /* Set if the parent wants the child to - wake it up on mm_release. */ -#endif - -/* The official definition. */ -struct sched_param - { - int __sched_priority; - }; - -__BEGIN_DECLS - -/* Clone current process. */ -#ifdef __USE_MISC -extern int clone (int (*__fn) (void *__arg), void *__child_stack, - int __flags, void *__arg) __THROW; -#endif - -__END_DECLS - -#endif /* need schedparam */ - -#if !defined __defined_schedparam \ - && (defined __need_schedparam || defined _SCHED_H) -# define __defined_schedparam 1 -/* Data structure to describe a process' schedulability. */ -struct __sched_param - { - int __sched_priority; - }; -# undef __need_schedparam -#endif diff --git a/libc/sysdeps/linux/mips/bits/select.h b/libc/sysdeps/linux/mips/bits/select.h deleted file mode 100644 index 47e7dedc3..000000000 --- a/libc/sysdeps/linux/mips/bits/select.h +++ /dev/null @@ -1,35 +0,0 @@ -/* 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. */ - -#ifndef _SYS_SELECT_H -# error "Never use <bits/select.h> directly; include <sys/select.h> instead." -#endif - - -/* We don't use `memset' because this would require a prototype and - the array isn't too big. */ -#define __FD_ZERO(s) \ - do { \ - unsigned int __i; \ - fd_set *__arr = (s); \ - for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) \ - __FDS_BITS (__arr)[__i] = 0; \ - } while (0) -#define __FD_SET(d, s) (__FDS_BITS (s)[__FDELT(d)] |= __FDMASK(d)) -#define __FD_CLR(d, s) (__FDS_BITS (s)[__FDELT(d)] &= ~__FDMASK(d)) -#define __FD_ISSET(d, s) ((__FDS_BITS (s)[__FDELT(d)] & __FDMASK(d)) != 0) diff --git a/libc/sysdeps/linux/mips/bits/sigcontext.h b/libc/sysdeps/linux/mips/bits/sigcontext.h deleted file mode 100644 index 67dcf9498..000000000 --- a/libc/sysdeps/linux/mips/bits/sigcontext.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 1996, 1997, 1998 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. */ - -#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H -# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead." -#endif - -#ifndef sigcontext_struct -/* Kernel headers before 2.1.1 define a struct sigcontext_struct, but - we need sigcontext. */ -# define sigcontext_struct sigcontext - -# include <asm/sigcontext.h> -#endif diff --git a/libc/sysdeps/linux/mips/bits/sigset.h b/libc/sysdeps/linux/mips/bits/sigset.h deleted file mode 100644 index 7ccadda45..000000000 --- a/libc/sysdeps/linux/mips/bits/sigset.h +++ /dev/null @@ -1,125 +0,0 @@ -/* __sig_atomic_t, __sigset_t, and related definitions. Linux version. - Copyright (C) 1991, 1992, 1994, 1996, 1997 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 _SIGSET_H_types -# define _SIGSET_H_types 1 - -typedef int __sig_atomic_t; - -/* A `sigset_t' has a bit for each signal. */ - -# define _SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int))) -typedef struct - { - unsigned long int __val[_SIGSET_NWORDS]; - } __sigset_t; - -#endif - - -/* We only want to define these functions if <signal.h> was actually - included; otherwise we were included just to define the types. Since we - are namespace-clean, it wouldn't hurt to define extra macros. But - trouble can be caused by functions being defined (e.g., any global - register vars declared later will cause compilation errors). */ - -#if !defined _SIGSET_H_fns && defined _SIGNAL_H -# define _SIGSET_H_fns 1 - -# ifndef _EXTERN_INLINE -# define _EXTERN_INLINE extern __inline -# endif - -/* Return a mask that includes the bit for SIG only. */ -# define __sigmask(sig) \ - (((unsigned long int) 1) << (((sig) - 1) % (8 * sizeof (unsigned long int)))) - -/* Return the word index for SIG. */ -# define __sigword(sig) (((sig) - 1) / (8 * sizeof (unsigned long int))) - -# if defined __GNUC__ && __GNUC__ >= 2 -# define __sigemptyset(set) \ - (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ - sigset_t *__set = (set); \ - while (--__cnt >= 0) __set->__val[__cnt] = 0; \ - 0; })) -# define __sigfillset(set) \ - (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ - sigset_t *__set = (set); \ - while (--__cnt >= 0) __set->__val[__cnt] = ~0UL; \ - 0; })) - -# ifdef __USE_GNU -/* The POSIX does not specify for handling the whole signal set in one - command. This is often wanted and so we define three more functions - here. */ -# define __sigisemptyset(set) \ - (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ - const sigset_t *__set = (set); \ - int __ret = __set->__val[--__cnt]; \ - while (!__ret && --__cnt >= 0) \ - __ret = __set->__val[__cnt]; \ - __ret == 0; })) -# define __sigandset(dest, left, right) \ - (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ - sigset_t *__dest = (dest); \ - const sigset_t *__left = (left); \ - const sigset_t *__right = (right); \ - while (--__cnt >= 0) \ - __dest->__val[__cnt] = (__left->__val[__cnt] \ - & __right->__val[__cnt]); \ - 0; })) -# define __sigorset(dest, left, right) \ - (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ - sigset_t *__dest = (dest); \ - const sigset_t *__left = (left); \ - const sigset_t *__right = (right); \ - while (--__cnt >= 0) \ - __dest->__val[__cnt] = (__left->__val[__cnt] \ - | __right->__val[__cnt]); \ - 0; })) -# endif -# endif - -/* These functions needn't check for a bogus signal number -- error - checking is done in the non __ versions. */ - -extern int __sigismember (__const __sigset_t *, int); -extern int __sigaddset (__sigset_t *, int); -extern int __sigdelset (__sigset_t *, int); - -# ifdef __USE_EXTERN_INLINES -# define __SIGSETFN(NAME, BODY, CONST) \ - _EXTERN_INLINE int \ - NAME (CONST __sigset_t *__set, int __sig) \ - { \ - unsigned long int __mask = __sigmask (__sig); \ - unsigned long int __word = __sigword (__sig); \ - return BODY; \ - } - -__SIGSETFN (__sigismember, (__set->__val[__word] & __mask) ? 1 : 0, __const) -__SIGSETFN (__sigaddset, ((__set->__val[__word] |= __mask), 0), ) -__SIGSETFN (__sigdelset, ((__set->__val[__word] &= ~__mask), 0), ) - -# undef __SIGSETFN -# endif - - -#endif /* ! _SIGSET_H_fns. */ diff --git a/libc/sysdeps/linux/mips/bits/sigthread.h b/libc/sysdeps/linux/mips/bits/sigthread.h deleted file mode 100644 index b86e75f20..000000000 --- a/libc/sysdeps/linux/mips/bits/sigthread.h +++ /dev/null @@ -1,38 +0,0 @@ -/* Signal handling function for threaded programs. - Copyright (C) 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _BITS_SIGTHREAD_H -#define _BITS_SIGTHREAD_H 1 - -#if !defined _SIGNAL_H && !defined _PTHREAD_H -# error "Never include this file directly. Use <pthread.h> instead" -#endif - -/* Functions for handling signals. */ - -/* Modify the signal mask for the calling thread. The arguments have - the same meaning as for sigprocmask(2). */ -extern int pthread_sigmask (int __how, - __const __sigset_t *__restrict __newmask, - __sigset_t *__restrict __oldmask)__THROW; - -/* Send signal SIGNO to the given thread. */ -extern int pthread_kill (pthread_t __thread, int __signo) __THROW; - -#endif /* bits/sigthread.h */ diff --git a/libc/sysdeps/linux/mips/bits/sockaddr.h b/libc/sysdeps/linux/mips/bits/sockaddr.h deleted file mode 100644 index 3e1d1312d..000000000 --- a/libc/sysdeps/linux/mips/bits/sockaddr.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Definition of `struct sockaddr_*' common members. Generic/4.2 BSD version. - Copyright (C) 1995,1996,1997,1998,2000,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. */ - -/* - * Never include this file directly; use <sys/socket.h> instead. - */ - -#ifndef _BITS_SOCKADDR_H -#define _BITS_SOCKADDR_H 1 - - -/* POSIX.1g specifies this type name for the `sa_family' member. */ -typedef unsigned short int sa_family_t; - -/* This macro is used to declare the initial common members - of the data types used for socket addresses, `struct sockaddr', - `struct sockaddr_in', `struct sockaddr_un', etc. */ - -#define __SOCKADDR_COMMON(sa_prefix) \ - sa_family_t sa_prefix##family - -#define __SOCKADDR_COMMON_SIZE (sizeof (unsigned short int)) - -#endif /* bits/sockaddr.h */ diff --git a/libc/sysdeps/linux/mips/bits/stab.def b/libc/sysdeps/linux/mips/bits/stab.def deleted file mode 100644 index 3d54774cf..000000000 --- a/libc/sysdeps/linux/mips/bits/stab.def +++ /dev/null @@ -1,234 +0,0 @@ -/* Table of DBX symbol codes for the GNU system. - Copyright (C) 1988, 1997 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. */ - -/* This contains contribution from Cygnus Support. */ - -/* Global variable. Only the name is significant. - To find the address, look in the corresponding external symbol. */ -__define_stab (N_GSYM, 0x20, "GSYM") - -/* Function name for BSD Fortran. Only the name is significant. - To find the address, look in the corresponding external symbol. */ -__define_stab (N_FNAME, 0x22, "FNAME") - -/* Function name or text-segment variable for C. Value is its address. - Desc is supposedly starting line number, but GCC doesn't set it - and DBX seems not to miss it. */ -__define_stab (N_FUN, 0x24, "FUN") - -/* Data-segment variable with internal linkage. Value is its address. - "Static Sym". */ -__define_stab (N_STSYM, 0x26, "STSYM") - -/* BSS-segment variable with internal linkage. Value is its address. */ -__define_stab (N_LCSYM, 0x28, "LCSYM") - -/* Name of main routine. Only the name is significant. - This is not used in C. */ -__define_stab (N_MAIN, 0x2a, "MAIN") - -/* Global symbol in Pascal. - Supposedly the value is its line number; I'm skeptical. */ -__define_stab (N_PC, 0x30, "PC") - -/* Number of symbols: 0, files,,funcs,lines according to Ultrix V4.0. */ -__define_stab (N_NSYMS, 0x32, "NSYMS") - -/* "No DST map for sym: name, ,0,type,ignored" according to Ultrix V4.0. */ -__define_stab (N_NOMAP, 0x34, "NOMAP") - -/* New stab from Solaris. I don't know what it means, but it - don't seem to contain useful information. */ -__define_stab (N_OBJ, 0x38, "OBJ") - -/* New stab from Solaris. I don't know what it means, but it - don't seem to contain useful information. Possibly related to the - optimization flags used in this module. */ -__define_stab (N_OPT, 0x3c, "OPT") - -/* Register variable. Value is number of register. */ -__define_stab (N_RSYM, 0x40, "RSYM") - -/* Modula-2 compilation unit. Can someone say what info it contains? */ -__define_stab (N_M2C, 0x42, "M2C") - -/* Line number in text segment. Desc is the line number; - value is corresponding address. */ -__define_stab (N_SLINE, 0x44, "SLINE") - -/* Similar, for data segment. */ -__define_stab (N_DSLINE, 0x46, "DSLINE") - -/* Similar, for bss segment. */ -__define_stab (N_BSLINE, 0x48, "BSLINE") - -/* Sun's source-code browser stabs. ?? Don't know what the fields are. - Supposedly the field is "path to associated .cb file". THIS VALUE - OVERLAPS WITH N_BSLINE! */ -__define_stab (N_BROWS, 0x48, "BROWS") - -/* GNU Modula-2 definition module dependency. Value is the modification time - of the definition file. Other is non-zero if it is imported with the - GNU M2 keyword %INITIALIZE. Perhaps N_M2C can be used if there - are enough empty fields? */ -__define_stab(N_DEFD, 0x4a, "DEFD") - -/* THE FOLLOWING TWO STAB VALUES CONFLICT. Happily, one is for Modula-2 - and one is for C++. Still,... */ -/* GNU C++ exception variable. Name is variable name. */ -__define_stab (N_EHDECL, 0x50, "EHDECL") -/* Modula2 info "for imc": name,,0,0,0 according to Ultrix V4.0. */ -__define_stab (N_MOD2, 0x50, "MOD2") - -/* GNU C++ `catch' clause. Value is its address. Desc is nonzero if - this entry is immediately followed by a CAUGHT stab saying what exception - was caught. Multiple CAUGHT stabs means that multiple exceptions - can be caught here. If Desc is 0, it means all exceptions are caught - here. */ -__define_stab (N_CATCH, 0x54, "CATCH") - -/* Structure or union element. Value is offset in the structure. */ -__define_stab (N_SSYM, 0x60, "SSYM") - -/* Name of main source file. - Value is starting text address of the compilation. */ -__define_stab (N_SO, 0x64, "SO") - -/* Automatic variable in the stack. Value is offset from frame pointer. - Also used for type descriptions. */ -__define_stab (N_LSYM, 0x80, "LSYM") - -/* Beginning of an include file. Only Sun uses this. - In an object file, only the name is significant. - The Sun linker puts data into some of the other fields. */ -__define_stab (N_BINCL, 0x82, "BINCL") - -/* Name of sub-source file (#include file). - Value is starting text address of the compilation. */ -__define_stab (N_SOL, 0x84, "SOL") - -/* Parameter variable. Value is offset from argument pointer. - (On most machines the argument pointer is the same as the frame pointer. */ -__define_stab (N_PSYM, 0xa0, "PSYM") - -/* End of an include file. No name. - This and N_BINCL act as brackets around the file's output. - In an object file, there is no significant data in this entry. - The Sun linker puts data into some of the fields. */ -__define_stab (N_EINCL, 0xa2, "EINCL") - -/* Alternate entry point. Value is its address. */ -__define_stab (N_ENTRY, 0xa4, "ENTRY") - -/* Beginning of lexical block. - The desc is the nesting level in lexical blocks. - The value is the address of the start of the text for the block. - The variables declared inside the block *precede* the N_LBRAC symbol. */ -__define_stab (N_LBRAC, 0xc0, "LBRAC") - -/* Place holder for deleted include file. Replaces a N_BINCL and everything - up to the corresponding N_EINCL. The Sun linker generates these when - it finds multiple identical copies of the symbols from an include file. - This appears only in output from the Sun linker. */ -__define_stab (N_EXCL, 0xc2, "EXCL") - -/* Modula-2 scope information. Can someone say what info it contains? */ -__define_stab (N_SCOPE, 0xc4, "SCOPE") - -/* End of a lexical block. Desc matches the N_LBRAC's desc. - The value is the address of the end of the text for the block. */ -__define_stab (N_RBRAC, 0xe0, "RBRAC") - -/* Begin named common block. Only the name is significant. */ -__define_stab (N_BCOMM, 0xe2, "BCOMM") - -/* End named common block. Only the name is significant - (and it should match the N_BCOMM). */ -__define_stab (N_ECOMM, 0xe4, "ECOMM") - -/* End common (local name): value is address. - I'm not sure how this is used. */ -__define_stab (N_ECOML, 0xe8, "ECOML") - -/* These STAB's are used on Gould systems for Non-Base register symbols - or something like that. FIXME. I have assigned the values at random - since I don't have a Gould here. Fixups from Gould folk welcome... */ -__define_stab (N_NBTEXT, 0xF0, "NBTEXT") -__define_stab (N_NBDATA, 0xF2, "NBDATA") -__define_stab (N_NBBSS, 0xF4, "NBBSS") -__define_stab (N_NBSTS, 0xF6, "NBSTS") -__define_stab (N_NBLCS, 0xF8, "NBLCS") - -/* Second symbol entry containing a length-value for the preceding entry. - The value is the length. */ -__define_stab (N_LENG, 0xfe, "LENG") - -/* The above information, in matrix format. - - STAB MATRIX - _________________________________________________ - | 00 - 1F are not dbx stab symbols | - | In most cases, the low bit is the EXTernal bit| - - | 00 UNDEF | 02 ABS | 04 TEXT | 06 DATA | - | 01 |EXT | 03 |EXT | 05 |EXT | 07 |EXT | - - | 08 BSS | 0A INDR | 0C FN_SEQ | 0E | - | 09 |EXT | 0B | 0D | 0F | - - | 10 | 12 COMM | 14 SETA | 16 SETT | - | 11 | 13 | 15 | 17 | - - | 18 SETD | 1A SETB | 1C SETV | 1E WARNING| - | 19 | 1B | 1D | 1F FN | - - |_______________________________________________| - | Debug entries with bit 01 set are unused. | - | 20 GSYM | 22 FNAME | 24 FUN | 26 STSYM | - | 28 LCSYM | 2A MAIN | 2C | 2E | - | 30 PC | 32 NSYMS | 34 NOMAP | 36 | - | 38 OBJ | 3A | 3C OPT | 3E | - | 40 RSYM | 42 M2C | 44 SLINE | 46 DSLINE | - | 48 BSLINE*| 4A DEFD | 4C | 4E | - | 50 EHDECL*| 52 | 54 CATCH | 56 | - | 58 | 5A | 5C | 5E | - | 60 SSYM | 62 | 64 SO | 66 | - | 68 | 6A | 6C | 6E | - | 70 | 72 | 74 | 76 | - | 78 | 7A | 7C | 7E | - | 80 LSYM | 82 BINCL | 84 SOL | 86 | - | 88 | 8A | 8C | 8E | - | 90 | 92 | 94 | 96 | - | 98 | 9A | 9C | 9E | - | A0 PSYM | A2 EINCL | A4 ENTRY | A6 | - | A8 | AA | AC | AE | - | B0 | B2 | B4 | B6 | - | B8 | BA | BC | BE | - | C0 LBRAC | C2 EXCL | C4 SCOPE | C6 | - | C8 | CA | CC | CE | - | D0 | D2 | D4 | D6 | - | D8 | DA | DC | DE | - | E0 RBRAC | E2 BCOMM | E4 ECOMM | E6 | - | E8 ECOML | EA | EC | EE | - | F0 | F2 | F4 | F6 | - | F8 | FA | FC | FE LENG | - +-----------------------------------------------+ - * 50 EHDECL is also MOD2. - * 48 BSLINE is also BROWS. - */ diff --git a/libc/sysdeps/linux/mips/bits/statvfs.h b/libc/sysdeps/linux/mips/bits/statvfs.h deleted file mode 100644 index 32e03f31e..000000000 --- a/libc/sysdeps/linux/mips/bits/statvfs.h +++ /dev/null @@ -1,99 +0,0 @@ -/* Copyright (C) 1997, 1998, 2000, 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. */ - -#ifndef _SYS_STATVFS_H -# error "Never include <bits/statvfs.h> directly; use <sys/statvfs.h> instead." -#endif - -#include <bits/types.h> /* For __fsblkcnt_t and __fsfilcnt_t. */ - -struct statvfs - { - unsigned long int f_bsize; - unsigned long int f_frsize; -#ifndef __USE_FILE_OFFSET64 - __fsblkcnt_t f_blocks; - __fsblkcnt_t f_bfree; - __fsblkcnt_t f_bavail; - __fsfilcnt_t f_files; - __fsfilcnt_t f_ffree; - __fsfilcnt_t f_favail; -#else - __fsblkcnt64_t f_blocks; - __fsblkcnt64_t f_bfree; - __fsblkcnt64_t f_bavail; - __fsfilcnt64_t f_files; - __fsfilcnt64_t f_ffree; - __fsfilcnt64_t f_favail; -#endif - unsigned long int f_fsid; - int __f_unused; - unsigned long int f_flag; - unsigned long int f_namemax; - int __f_spare[6]; - }; -#define _STATVFSBUF_F_UNUSED - -#ifdef __USE_LARGEFILE64 -struct statvfs64 - { - unsigned long int f_bsize; - unsigned long int f_frsize; - __fsblkcnt64_t f_blocks; - __fsblkcnt64_t f_bfree; - __fsblkcnt64_t f_bavail; - __fsfilcnt64_t f_files; - __fsfilcnt64_t f_ffree; - __fsfilcnt64_t f_favail; - unsigned long int f_fsid; - int __f_unused; - unsigned long int f_flag; - unsigned long int f_namemax; - int __f_spare[6]; - }; -#endif - -/* Definitions for the flag in `f_flag'. These definitions should be - kept in sync which the definitions in <sys/mount.h>. */ -enum -{ - ST_RDONLY = 1, /* Mount read-only. */ -#define ST_RDONLY ST_RDONLY - ST_NOSUID = 2, /* Ignore suid and sgid bits. */ -#define ST_NOSUID ST_NOSUID -#ifdef __USE_GNU - ST_NODEV = 4, /* Disallow access to device special files. */ -# define ST_NODEV ST_NODEV - ST_NOEXEC = 8, /* Disallow program execution. */ -# define ST_NOEXEC ST_NOEXEC - ST_SYNCHRONOUS = 16, /* Writes are synced at once. */ -# define ST_SYNCHRONOUS ST_SYNCHRONOUS - ST_MANDLOCK = 64, /* Allow mandatory locks on an FS. */ -# define ST_MANDLOCK ST_MANDLOCK - ST_WRITE = 128, /* Write on file/directory/symlink. */ -# define ST_WRITE ST_WRITE - ST_APPEND = 256, /* Append-only file. */ -# define ST_APPEND ST_APPEND - ST_IMMUTABLE = 512, /* Immutable file. */ -# define ST_IMMUTABLE ST_IMMUTABLE - ST_NOATIME = 1024, /* Do not update access times. */ -# define ST_NOATIME ST_NOATIME - ST_NODIRATIME /* Do not update directory access times. */ -# define ST_NODIRATIME ST_NODIRATIME -#endif /* Use GNU. */ -}; diff --git a/libc/sysdeps/linux/mips/bits/stdio-lock.h b/libc/sysdeps/linux/mips/bits/stdio-lock.h deleted file mode 100644 index 5b1c1b082..000000000 --- a/libc/sysdeps/linux/mips/bits/stdio-lock.h +++ /dev/null @@ -1,48 +0,0 @@ -/* Thread package specific definitions of stream lock type. Generic version. - Copyright (C) 2000, 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. */ - -#ifndef _BITS_STDIO_LOCK_H -#define _BITS_STDIO_LOCK_H 1 - -#include <bits/libc-lock.h> - -__libc_lock_define_recursive (typedef, _IO_lock_t) - -/* We need recursive (counting) mutexes. */ -#ifdef _LIBC_LOCK_RECURSIVE_INITIALIZER -# define _IO_lock_initializer _LIBC_LOCK_RECURSIVE_INITIALIZER -#elif _IO_MTSAFE_IO - #error libio needs recursive mutexes for _IO_MTSAFE_IO -#endif - -#define _IO_lock_init(_name) __libc_lock_init_recursive (_name) -#define _IO_lock_fini(_name) __libc_lock_fini_recursive (_name) -#define _IO_lock_lock(_name) __libc_lock_lock_recursive (_name) -#define _IO_lock_unlock(_name) __libc_lock_unlock_recursive (_name) - - -#define _IO_cleanup_region_start(_fct, _fp) \ - __libc_cleanup_region_start (((_fp)->_flags & _IO_USER_LOCK) == 0, _fct, _fp) -#define _IO_cleanup_region_start_noarg(_fct) \ - __libc_cleanup_region_start (1, _fct, NULL) -#define _IO_cleanup_region_end(_doit) \ - __libc_cleanup_region_end (_doit) - - -#endif /* bits/stdio-lock.h */ diff --git a/libc/sysdeps/linux/mips/bits/stdio.h b/libc/sysdeps/linux/mips/bits/stdio.h deleted file mode 100644 index 118118adc..000000000 --- a/libc/sysdeps/linux/mips/bits/stdio.h +++ /dev/null @@ -1,169 +0,0 @@ -/* Optimizing macros and inline functions for stdio functions. - Copyright (C) 1998, 2000, 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. */ - -#ifndef _STDIO_H -# error "Never include <bits/stdio.h> directly; use <stdio.h> instead." -#endif - -#ifdef __cplusplus -# define __STDIO_INLINE inline -#else -# define __STDIO_INLINE extern __inline -#endif - - -#ifdef __USE_EXTERN_INLINES -/* Write formatted output to stdout from argument list ARG. */ -__STDIO_INLINE int -vprintf (__const char *__restrict __fmt, _G_va_list __arg) __THROW -{ - return vfprintf (stdout, __fmt, __arg); -} - -/* Read a character from stdin. */ -__STDIO_INLINE int -getchar (void) __THROW -{ - return _IO_getc (stdin); -} - - -# if defined __USE_POSIX || defined __USE_MISC -/* This is defined in POSIX.1:1996. */ -__STDIO_INLINE int -getc_unlocked (FILE *__fp) __THROW -{ - return _IO_getc_unlocked (__fp); -} - -/* This is defined in POSIX.1:1996. */ -__STDIO_INLINE int -getchar_unlocked (void) __THROW -{ - return _IO_getc_unlocked (stdin); -} -# endif /* POSIX || misc */ - - -/* Write a character to stdout. */ -__STDIO_INLINE int -putchar (int __c) __THROW -{ - return _IO_putc (__c, stdout); -} - - -# ifdef __USE_MISC -/* Faster version when locking is not necessary. */ -__STDIO_INLINE int -fputc_unlocked (int __c, FILE *__stream) __THROW -{ - return _IO_putc_unlocked (__c, __stream); -} -# endif /* misc */ - - -# if defined __USE_POSIX || defined __USE_MISC -/* This is defined in POSIX.1:1996. */ -__STDIO_INLINE int -putc_unlocked (int __c, FILE *__stream) __THROW -{ - return _IO_putc_unlocked (__c, __stream); -} - -/* This is defined in POSIX.1:1996. */ -__STDIO_INLINE int -putchar_unlocked (int __c) __THROW -{ - return _IO_putc_unlocked (__c, stdout); -} -# endif /* POSIX || misc */ - - -# ifdef __USE_GNU -/* Like `getdelim', but reads up to a newline. */ -__STDIO_INLINE _IO_ssize_t -getline (char **__lineptr, size_t *__n, FILE *__stream) __THROW -{ - return __getdelim (__lineptr, __n, '\n', __stream); -} -# endif /* GNU */ - - -# ifdef __USE_MISC -/* Faster versions when locking is not required. */ -__STDIO_INLINE int -feof_unlocked (FILE *__stream) __THROW -{ - return _IO_feof_unlocked (__stream); -} - -/* Faster versions when locking is not required. */ -__STDIO_INLINE int -ferror_unlocked (FILE *__stream) __THROW -{ - return _IO_ferror_unlocked (__stream); -} -# endif /* misc */ - -#endif /* Use extern inlines. */ - - -#if defined __USE_MISC && defined __GNUC__ && defined __OPTIMIZE__ -/* Perform some simple optimizations. */ -# define fread_unlocked(ptr, size, n, stream) \ - (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) \ - && (size_t) ((size) * (n)) <= 8 && (size) != 0) \ - ? ({ char *__ptr = (char *) (ptr); \ - FILE *__stream = (stream); \ - size_t __cnt; \ - for (__cnt = (size) * (n); __cnt > 0; --__cnt) \ - { \ - int __c = _IO_getc_unlocked (__stream); \ - if (__c == EOF) \ - break; \ - *__ptr++ = __c; \ - } \ - ((size_t) ((size) * (n)) - __cnt) / (size); }) \ - : (((__builtin_constant_p (size) && (size) == 0) \ - || (__builtin_constant_p (n) && (n) == 0)) \ - /* Evaluate all parameters once. */ \ - ? ((void) (ptr), (void) (stream), (void) (size), \ - (void) (n), 0) \ - : fread_unlocked (ptr, size, n, stream)))) - -# define fwrite_unlocked(ptr, size, n, stream) \ - (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) \ - && (size_t) ((size) * (n)) <= 8 && (size) != 0) \ - ? ({ const char *__ptr = (const char *) (ptr); \ - FILE *__stream = (stream); \ - size_t __cnt; \ - for (__cnt = (size) * (n); __cnt > 0; --__cnt) \ - if (_IO_putc_unlocked (*__ptr++, __stream) == EOF) \ - break; \ - ((size_t) ((size) * (n)) - __cnt) / (size); }) \ - : (((__builtin_constant_p (size) && (size) == 0) \ - || (__builtin_constant_p (n) && (n) == 0)) \ - /* Evaluate all parameters once. */ \ - ? ((void) (ptr), (void) (stream), (void) (size), n) \ - : fwrite_unlocked (ptr, size, n, stream)))) -#endif - -/* Define helper macro. */ -#undef __STDIO_INLINE diff --git a/libc/sysdeps/linux/mips/bits/stdio_lim.h b/libc/sysdeps/linux/mips/bits/stdio_lim.h deleted file mode 100644 index ea6d693f5..000000000 --- a/libc/sysdeps/linux/mips/bits/stdio_lim.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (C) 1994, 1997, 1998, 1999 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. */ - -#if !defined _STDIO_H && !defined __need_FOPEN_MAX && !defined __need_IOV_MAX -# error "Never include <bits/stdio_lim.h> directly; use <stdio.h> instead." -#endif - -#ifdef _STDIO_H -# define L_tmpnam 20 -# define TMP_MAX 238328 -# define FILENAME_MAX 4095 - -# ifdef __USE_POSIX -# define L_ctermid 9 -# define L_cuserid 9 -# endif -#endif - -#if defined __need_FOPEN_MAX || defined _STDIO_H -# undef FOPEN_MAX -# define FOPEN_MAX 16 -#endif - -#if defined __need_IOV_MAX && !defined IOV_MAX -# define IOV_MAX 1024 -#endif diff --git a/libc/sysdeps/linux/mips/bits/stropts.h b/libc/sysdeps/linux/mips/bits/stropts.h deleted file mode 100644 index 21538c31d..000000000 --- a/libc/sysdeps/linux/mips/bits/stropts.h +++ /dev/null @@ -1,227 +0,0 @@ -/* Copyright (C) 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. */ - -#ifndef _BITS_STROPTS_H -#define _BITS_STROPTS_H 1 - -#include <bits/types.h> - -/* Macros used as `request' argument to `ioctl'. */ -#define __SID ('S' << 8) - -#define I_NREAD (__SID | 1) /* Counts the number of data bytes in the data - block in the first message. */ -#define I_PUSH (__SID | 2) /* Push STREAMS module onto top of the current - STREAM, just below the STREAM head. */ -#define I_POP (__SID | 3) /* Remove STREAMS module from just below the - STREAM head. */ -#define I_LOOK (__SID | 4) /* Retrieve the name of the module just below - the STREAM head and place it in a character - string. */ -#define I_FLUSH (__SID | 5) /* Flush all input and/or output. */ -#define I_SRDOPT (__SID | 6) /* Sets the read mode. */ -#define I_GRDOPT (__SID | 7) /* Returns the current read mode setting. */ -#define I_STR (__SID | 8) /* Construct an internal STREAMS `ioctl' - message and send that message downstream. */ -#define I_SETSIG (__SID | 9) /* Inform the STREAM head that the process - wants the SIGPOLL signal issued. */ -#define I_GETSIG (__SID |10) /* Return the events for which the calling - process is currently registered to be sent - a SIGPOLL signal. */ -#define I_FIND (__SID |11) /* Compares the names of all modules currently - present in the STREAM to the name pointed to - by `arg'. */ -#define I_LINK (__SID |12) /* Connect two STREAMs. */ -#define I_UNLINK (__SID |13) /* Disconnects the two STREAMs. */ -#define I_PEEK (__SID |15) /* Allows a process to retrieve the information - in the first message on the STREAM head read - queue without taking the message off the - queue. */ -#define I_FDINSERT (__SID |16) /* Create a message from the specified - buffer(s), adds information about another - STREAM, and send the message downstream. */ -#define I_SENDFD (__SID |17) /* Requests the STREAM associated with `fildes' - to send a message, containing a file - pointer, to the STREAM head at the other end - of a STREAMS pipe. */ -#define I_RECVFD (__SID |14) /* Non-EFT definition. */ -#define I_SWROPT (__SID |19) /* Set the write mode. */ -#define I_GWROPT (__SID |20) /* Return the current write mode setting. */ -#define I_LIST (__SID |21) /* List all the module names on the STREAM, up - to and including the topmost driver name. */ -#define I_PLINK (__SID |22) /* Connect two STREAMs with a persistent - link. */ -#define I_PUNLINK (__SID |23) /* Disconnect the two STREAMs that were - connected with a persistent link. */ -#define I_FLUSHBAND (__SID |28) /* Flush only band specified. */ -#define I_CKBAND (__SID |29) /* Check if the message of a given priority - band exists on the STREAM head read - queue. */ -#define I_GETBAND (__SID |30) /* Return the priority band of the first - message on the STREAM head read queue. */ -#define I_ATMARK (__SID |31) /* See if the current message on the STREAM - head read queue is "marked" by some module - downstream. */ -#define I_SETCLTIME (__SID |32) /* Set the time the STREAM head will delay when - a STREAM is closing and there is data on - the write queues. */ -#define I_GETCLTIME (__SID |33) /* Get current value for closing timeout. */ -#define I_CANPUT (__SID |34) /* Check if a certain band is writable. */ - - -/* Used in `I_LOOK' request. */ -#define FMNAMESZ 8 /* compatibility w/UnixWare/Solaris. */ - -/* Flush options. */ -#define FLUSHR 0x01 /* Flush read queues. */ -#define FLUSHW 0x02 /* Flush write queues. */ -#define FLUSHRW 0x03 /* Flush read and write queues. */ -#ifdef __USE_GNU -# define FLUSHBAND 0x04 /* Flush only specified band. */ -#endif - -/* Possible arguments for `I_SETSIG'. */ -#define S_INPUT 0x0001 /* A message, other than a high-priority - message, has arrived. */ -#define S_HIPRI 0x0002 /* A high-priority message is present. */ -#define S_OUTPUT 0x0004 /* The write queue for normal data is no longer - full. */ -#define S_MSG 0x0008 /* A STREAMS signal message that contains the - SIGPOLL signal reaches the front of the - STREAM head read queue. */ -#define S_ERROR 0x0010 /* Notification of an error condition. */ -#define S_HANGUP 0x0020 /* Notification of a hangup. */ -#define S_RDNORM 0x0040 /* A normal message has arrived. */ -#define S_WRNORM S_OUTPUT -#define S_RDBAND 0x0080 /* A message with a non-zero priority has - arrived. */ -#define S_WRBAND 0x0100 /* The write queue for a non-zero priority - band is no longer full. */ -#define S_BANDURG 0x0200 /* When used in conjunction with S_RDBAND, - SIGURG is generated instead of SIGPOLL when - a priority message reaches the front of the - STREAM head read queue. */ - -/* Option for `I_PEEK'. */ -#define RS_HIPRI 0x01 /* Only look for high-priority messages. */ - -/* Options for `I_SRDOPT'. */ -#define RNORM 0x0000 /* Byte-STREAM mode, the default. */ -#define RMSGD 0x0001 /* Message-discard mode. */ -#define RMSGN 0x0002 /* Message-nondiscard mode. */ -#define RPROTDAT 0x0004 /* Deliver the control part of a message as - data. */ -#define RPROTDIS 0x0008 /* Discard the control part of a message, - delivering any data part. */ -#define RPROTNORM 0x0010 /* Fail `read' with EBADMSG if a message - containing a control part is at the front - of the STREAM head read queue. */ -#ifdef __USE_GNU -# define RPROTMASK 0x001C /* The RPROT bits */ -#endif - -/* Possible mode for `I_SWROPT'. */ -#define SNDZERO 0x001 /* Send a zero-length message downstream when a - `write' of 0 bytes occurs. */ -#ifdef __USE_GNU -# define SNDPIPE 0x002 /* Send SIGPIPE on write and putmsg if - sd_werror is set. */ -#endif - -/* Arguments for `I_ATMARK'. */ -#define ANYMARK 0x01 /* Check if the message is marked. */ -#define LASTMARK 0x02 /* Check if the message is the last one marked - on the queue. */ - -/* Argument for `I_UNLINK'. */ -#ifdef __USE_GNU -# define MUXID_ALL (-1) /* Unlink all STREAMs linked to the STREAM - associated with `fildes'. */ -#endif - - -/* Macros for `getmsg', `getpmsg', `putmsg' and `putpmsg'. */ -#define MSG_HIPRI 0x01 /* Send/receive high priority message. */ -#define MSG_ANY 0x02 /* Receive any message. */ -#define MSG_BAND 0x04 /* Receive message from specified band. */ - -/* Values returned by getmsg and getpmsg */ -#define MORECTL 1 /* More control information is left in - message. */ -#define MOREDATA 2 /* More data is left in message. */ - - -/* Structure used for the I_FLUSHBAND ioctl on streams. */ -struct bandinfo - { - unsigned char bi_pri; - int bi_flag; - }; - -struct strbuf - { - int maxlen; /* Maximum buffer length. */ - int len; /* Length of data. */ - char *buf; /* Pointer to buffer. */ - }; - -struct strpeek - { - struct strbuf ctlbuf; - struct strbuf databuf; - t_uscalar_t flags; /* UnixWare/Solaris compatibility. */ - }; - -struct strfdinsert - { - struct strbuf ctlbuf; - struct strbuf databuf; - t_uscalar_t flags; /* UnixWare/Solaris compatibility. */ - int fildes; - int offset; - }; - -struct strioctl - { - int ic_cmd; - int ic_timout; - int ic_len; - char *ic_dp; - }; - -struct strrecvfd - { - int fd; - uid_t uid; - gid_t gid; - char __fill[8]; /* UnixWare/Solaris compatibility */ - }; - - -struct str_mlist - { - char l_name[FMNAMESZ + 1]; - }; - -struct str_list - { - int sl_nmods; - struct str_mlist *sl_modlist; - }; - -#endif /* bits/stropts.h */ diff --git a/libc/sysdeps/linux/mips/bits/time.h b/libc/sysdeps/linux/mips/bits/time.h deleted file mode 100644 index 2a6873f00..000000000 --- a/libc/sysdeps/linux/mips/bits/time.h +++ /dev/null @@ -1,69 +0,0 @@ -/* System-dependent timing definitions. Linux version. - Copyright (C) 1996, 1997, 1999, 2000, 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. */ - -/* - * Never include this file directly; use <time.h> instead. - */ - -#ifndef __need_timeval -# ifndef _BITS_TIME_H -# define _BITS_TIME_H 1 - -/* ISO/IEC 9899:1990 7.12.1: <time.h> - The macro `CLOCKS_PER_SEC' is the number per second of the value - returned by the `clock' function. */ -/* CAE XSH, Issue 4, Version 2: <time.h> - The value of CLOCKS_PER_SEC is required to be 1 million on all - XSI-conformant systems. */ -# define CLOCKS_PER_SEC 1000000l - -# if !defined __STRICT_ANSI__ && !defined __USE_XOPEN2K -/* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK - presents the real value for clock ticks per second for the system. */ -# include <bits/types.h> -extern long int __sysconf (int); -# define CLK_TCK ((__clock_t) __sysconf (2)) /* 2 is _SC_CLK_TCK */ -# endif - -# ifdef __USE_POSIX199309 -/* Identifier for system-wide realtime clock. */ -# define CLOCK_REALTIME 0 - -/* Flag to indicate time is absolute. */ -# define TIMER_ABSTIME 1 -# endif - -# endif /* bits/time.h */ -#endif - -#ifdef __need_timeval -# undef __need_timeval -# ifndef _STRUCT_TIMEVAL -# define _STRUCT_TIMEVAL 1 -# include <bits/types.h> - -/* A time value that is accurate to the nearest - microsecond but also has a range of years. */ -struct timeval - { - __time_t tv_sec; /* Seconds. */ - __suseconds_t tv_usec; /* Microseconds. */ - }; -# endif /* struct timeval */ -#endif /* need timeval */ diff --git a/libc/sysdeps/linux/mips/bits/uio.h b/libc/sysdeps/linux/mips/bits/uio.h deleted file mode 100644 index 84b4805fe..000000000 --- a/libc/sysdeps/linux/mips/bits/uio.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (C) 1996, 1997 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 _SYS_UIO_H -# error "Never include <bits/uio.h> directly; use <sys/uio.h> instead." -#endif - - -#include <sys/types.h> - - -/* We should normally use the Linux kernel header file to define this - type and macros but this calls for trouble because of the header - includes other kernel headers. */ - -/* Size of object which can be written atomically. - - This macro has different values in different kernel versions. The - latest versions of ther kernel use 1024 and this is good choice. Since - the C library implementation of readv/writev is able to emulate the - functionality even if the currently running kernel does not support - this large value the readv/writev call will not fail because of this. */ -#define UIO_MAXIOV 1024 - - -/* Structure for scatter/gather I/O. */ -struct iovec - { - void *iov_base; /* Pointer to data. */ - size_t iov_len; /* Length of data. */ - }; diff --git a/libc/sysdeps/linux/mips/bits/utmp.h b/libc/sysdeps/linux/mips/bits/utmp.h deleted file mode 100644 index 2ed29bbb4..000000000 --- a/libc/sysdeps/linux/mips/bits/utmp.h +++ /dev/null @@ -1,106 +0,0 @@ -/* The `struct utmp' type, describing entries in the utmp file. GNU version. - Copyright (C) 1993, 1996, 1997, 1998, 1999 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 _UTMP_H -# error "Never include <bits/utmp.h> directly; use <utmp.h> instead." -#endif - -#include <paths.h> -#include <sys/time.h> -#include <sys/types.h> - - -#define UT_LINESIZE 32 -#define UT_NAMESIZE 32 -#define UT_HOSTSIZE 256 - - -/* The structure describing an entry in the database of - previous logins. */ -struct lastlog - { - __time_t ll_time; - char ll_line[UT_LINESIZE]; - char ll_host[UT_HOSTSIZE]; - }; - - -/* The structure describing the status of a terminated process. This - type is used in `struct utmp' below. */ -struct exit_status - { - short int e_termination; /* Process termination status. */ - short int e_exit; /* Process exit status. */ - }; - - -/* The structure describing an entry in the user accounting database. */ -struct utmp -{ - short int ut_type; /* Type of login. */ - pid_t ut_pid; /* Process ID of login process. */ - char ut_line[UT_LINESIZE]; /* Devicename. */ - char ut_id[4]; /* Inittab ID. */ - char ut_user[UT_NAMESIZE]; /* Username. */ - char ut_host[UT_HOSTSIZE]; /* Hostname for remote login. */ - struct exit_status ut_exit; /* Exit status of a process marked - as DEAD_PROCESS. */ - long int ut_session; /* Session ID, used for windowing. */ - struct timeval ut_tv; /* Time entry was made. */ - int32_t ut_addr_v6[4]; /* Internet address of remote host. */ - char __unused[20]; /* Reserved for future use. */ -}; - -/* Backwards compatibility hacks. */ -#define ut_name ut_user -#ifndef _NO_UT_TIME -/* We have a problem here: `ut_time' is also used otherwise. Define - _NO_UT_TIME if the compiler complains. */ -# define ut_time ut_tv.tv_sec -#endif -#define ut_xtime ut_tv.tv_sec -#define ut_addr ut_addr_v6[0] - - -/* Values for the `ut_type' field of a `struct utmp'. */ -#define EMPTY 0 /* No valid user accounting information. */ - -#define RUN_LVL 1 /* The system's runlevel. */ -#define BOOT_TIME 2 /* Time of system boot. */ -#define NEW_TIME 3 /* Time after system clock changed. */ -#define OLD_TIME 4 /* Time when system clock changed. */ - -#define INIT_PROCESS 5 /* Process spawned by the init process. */ -#define LOGIN_PROCESS 6 /* Session leader of a logged in user. */ -#define USER_PROCESS 7 /* Normal process. */ -#define DEAD_PROCESS 8 /* Terminated process. */ - -#define ACCOUNTING 9 - -/* Old Linux name for the EMPTY type. */ -#define UT_UNKNOWN EMPTY - - -/* Tell the user that we have a modern system with UT_HOST, UT_PID, - UT_TYPE, UT_ID and UT_TV fields. */ -#define _HAVE_UT_TYPE 1 -#define _HAVE_UT_PID 1 -#define _HAVE_UT_ID 1 -#define _HAVE_UT_TV 1 -#define _HAVE_UT_HOST 1 diff --git a/libc/sysdeps/linux/mips/bits/utmpx.h b/libc/sysdeps/linux/mips/bits/utmpx.h deleted file mode 100644 index 99735370b..000000000 --- a/libc/sysdeps/linux/mips/bits/utmpx.h +++ /dev/null @@ -1,89 +0,0 @@ -/* Structures and definitions for the user accounting database. GNU version. - Copyright (C) 1997, 1998, 2000, 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. */ - -#ifndef _UTMPX_H -# error "Never include <bits/utmpx.h> directly; use <utmpx.h> instead." -#endif - -#include <bits/types.h> -#include <sys/time.h> - - -#ifdef __USE_GNU -# include <paths.h> -# define _PATH_UTMPX _PATH_UTMP -# define _PATH_WTMPX _PATH_WTMP -#endif - - -#define __UT_LINESIZE 32 -#define __UT_NAMESIZE 32 -#define __UT_HOSTSIZE 256 - - -/* The structure describing the status of a terminated process. This - type is used in `struct utmpx' below. */ -struct __exit_status - { -#ifdef __USE_GNU - short int e_termination; /* Process termination status. */ - short int e_exit; /* Process exit status. */ -#else - short int __e_termination; /* Process termination status. */ - short int __e_exit; /* Process exit status. */ -#endif - }; - - -/* The structure describing an entry in the user accounting database. */ -struct utmpx -{ - short int ut_type; /* Type of login. */ - __pid_t ut_pid; /* Process ID of login process. */ - char ut_line[__UT_LINESIZE]; /* Devicename. */ - char ut_id[4]; /* Inittab ID. */ - char ut_user[__UT_NAMESIZE]; /* Username. */ - char ut_host[__UT_HOSTSIZE]; /* Hostname for remote login. */ - struct __exit_status ut_exit; /* Exit status of a process marked - as DEAD_PROCESS. */ - long int ut_session; /* Session ID, used for windowing. */ - struct timeval ut_tv; /* Time entry was made. */ - __int32_t ut_addr_v6[4]; /* Internet address of remote host. */ - char __unused[20]; /* Reserved for future use. */ -}; - - -/* Values for the `ut_type' field of a `struct utmpx'. */ -#define EMPTY 0 /* No valid user accounting information. */ - -#ifdef __USE_GNU -# define RUN_LVL 1 /* The system's runlevel. */ -#endif -#define BOOT_TIME 2 /* Time of system boot. */ -#define NEW_TIME 3 /* Time after system clock changed. */ -#define OLD_TIME 4 /* Time when system clock changed. */ - -#define INIT_PROCESS 5 /* Process spawned by the init process. */ -#define LOGIN_PROCESS 6 /* Session leader of a logged in user. */ -#define USER_PROCESS 7 /* Normal process. */ -#define DEAD_PROCESS 8 /* Terminated process. */ - -#ifdef __USE_GNU -# define ACCOUNTING 9 /* System accounting. */ -#endif diff --git a/libc/sysdeps/linux/mips/bits/utsname.h b/libc/sysdeps/linux/mips/bits/utsname.h deleted file mode 100644 index 35e71e3ba..000000000 --- a/libc/sysdeps/linux/mips/bits/utsname.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 1995, 1996, 1997 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 _SYS_UTSNAME_H -# error "Never include <bits/utsname.h> directly; use <sys/utsname.h> instead." -#endif - -/* Length of the entries in `struct utsname' is 65. */ -#define _UTSNAME_LENGTH 65 - -/* Linux provides as additional information in the `struct utsname' - the name of the current domain. Define _UTSNAME_DOMAIN_LENGTH - to a value != 0 to activate this entry. */ -#define _UTSNAME_DOMAIN_LENGTH _UTSNAME_LENGTH diff --git a/libc/sysdeps/linux/mips/bits/waitflags.h b/libc/sysdeps/linux/mips/bits/waitflags.h deleted file mode 100644 index 1303c6c36..000000000 --- a/libc/sysdeps/linux/mips/bits/waitflags.h +++ /dev/null @@ -1,30 +0,0 @@ -/* Definitions of flag bits for `waitpid' et al. - Copyright (C) 1992, 1996, 1997, 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. */ - -#if !defined _SYS_WAIT_H && !defined _STDLIB_H -# error "Never include <bits/waitflags.h> directly; use <sys/wait.h> instead." -#endif - - -/* Bits in the third argument to `waitpid'. */ -#define WNOHANG 1 /* Don't block waiting. */ -#define WUNTRACED 2 /* Report status of stopped children. */ - -#define __WALL 0x40000000 /* Wait for any child. */ -#define __WCLONE 0x80000000 /* Wait for cloned process. */ diff --git a/libc/sysdeps/linux/mips/bits/waitstatus.h b/libc/sysdeps/linux/mips/bits/waitstatus.h deleted file mode 100644 index 982c9dbb2..000000000 --- a/libc/sysdeps/linux/mips/bits/waitstatus.h +++ /dev/null @@ -1,104 +0,0 @@ -/* Definitions of status bits for `wait' et al. - Copyright (C) 1992, 1994, 1996, 1997, 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. */ - -#if !defined _SYS_WAIT_H && !defined _STDLIB_H -# error "Never include <bits/waitstatus.h> directly; use <sys/wait.h> instead." -#endif - - -/* Everything extant so far uses these same bits. */ - - -/* If WIFEXITED(STATUS), the low-order 8 bits of the status. */ -#define __WEXITSTATUS(status) (((status) & 0xff00) >> 8) - -/* If WIFSIGNALED(STATUS), the terminating signal. */ -#define __WTERMSIG(status) ((status) & 0x7f) - -/* If WIFSTOPPED(STATUS), the signal that stopped the child. */ -#define __WSTOPSIG(status) __WEXITSTATUS(status) - -/* Nonzero if STATUS indicates normal termination. */ -#define __WIFEXITED(status) (__WTERMSIG(status) == 0) - -/* Nonzero if STATUS indicates termination by a signal. */ -#ifdef __GNUC__ -# define __WIFSIGNALED(status) \ - (__extension__ ({ int __status = (status); \ - !__WIFSTOPPED(__status) && !__WIFEXITED(__status); })) -#else /* Not GCC. */ -# define __WIFSIGNALED(status) (!__WIFSTOPPED(status) && !__WIFEXITED(status)) -#endif /* GCC. */ - -/* Nonzero if STATUS indicates the child is stopped. */ -#define __WIFSTOPPED(status) (((status) & 0xff) == 0x7f) - -/* Nonzero if STATUS indicates the child dumped core. */ -#define __WCOREDUMP(status) ((status) & __WCOREFLAG) - -/* Macros for constructing status values. */ -#define __W_EXITCODE(ret, sig) ((ret) << 8 | (sig)) -#define __W_STOPCODE(sig) ((sig) << 8 | 0x7f) -#define __WCOREFLAG 0x80 - - -#ifdef __USE_BSD - -# include <endian.h> - -union wait - { - int w_status; - struct - { -# if __BYTE_ORDER == __LITTLE_ENDIAN - unsigned int __w_termsig:7; /* Terminating signal. */ - unsigned int __w_coredump:1; /* Set if dumped core. */ - unsigned int __w_retcode:8; /* Return code if exited normally. */ - unsigned int:16; -# endif /* Little endian. */ -# if __BYTE_ORDER == __BIG_ENDIAN - unsigned int:16; - unsigned int __w_retcode:8; - unsigned int __w_coredump:1; - unsigned int __w_termsig:7; -# endif /* Big endian. */ - } __wait_terminated; - struct - { -# if __BYTE_ORDER == __LITTLE_ENDIAN - unsigned int __w_stopval:8; /* W_STOPPED if stopped. */ - unsigned int __w_stopsig:8; /* Stopping signal. */ - unsigned int:16; -# endif /* Little endian. */ -# if __BYTE_ORDER == __BIG_ENDIAN - unsigned int:16; - unsigned int __w_stopsig:8; /* Stopping signal. */ - unsigned int __w_stopval:8; /* W_STOPPED if stopped. */ -# endif /* Big endian. */ - } __wait_stopped; - }; - -# define w_termsig __wait_terminated.__w_termsig -# define w_coredump __wait_terminated.__w_coredump -# define w_retcode __wait_terminated.__w_retcode -# define w_stopsig __wait_stopped.__w_stopsig -# define w_stopval __wait_stopped.__w_stopval - -#endif /* Use BSD. */ diff --git a/libc/sysdeps/linux/mips/bits/wchar.h b/libc/sysdeps/linux/mips/bits/wchar.h deleted file mode 100644 index ef1f56363..000000000 --- a/libc/sysdeps/linux/mips/bits/wchar.h +++ /dev/null @@ -1,26 +0,0 @@ -/* wchar_t type related definitions. - Copyright (C) 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 _BITS_WCHAR_H -#define _BITS_WCHAR_H 1 - -#define __WCHAR_MIN (-2147483647 - 1) -#define __WCHAR_MAX (2147483647) - -#endif /* bits/wchar.h */ diff --git a/libc/sysdeps/linux/mips/bits/xopen_lim.h b/libc/sysdeps/linux/mips/bits/xopen_lim.h deleted file mode 100644 index 7f3611860..000000000 --- a/libc/sysdeps/linux/mips/bits/xopen_lim.h +++ /dev/null @@ -1,144 +0,0 @@ -/* Copyright (C) 1996, 1997, 1999, 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. */ - -/* - * Never include this file directly; use <limits.h> instead. - */ - -/* Additional definitions from X/Open Portability Guide, Issue 4, Version 2 - System Interfaces and Headers, 4.16 <limits.h> - - Please note only the values which are not greater than the minimum - stated in the standard document are listed. The `sysconf' functions - should be used to obtain the actual value. */ - -#ifndef _XOPEN_LIM_H -#define _XOPEN_LIM_H 1 - -#define __need_IOV_MAX -#include <bits/stdio_lim.h> - -/* We do not provide fixed values for - - ARG_MAX Maximum length of argument to the `exec' function - including environment data. - - ATEXIT_MAX Maximum number of functions that may be registered - with `atexit'. - - CHILD_MAX Maximum number of simultaneous processes per real - user ID. - - OPEN_MAX Maximum number of files that one process can have open - at anyone time. - - PAGESIZE - PAGE_SIZE Size of bytes of a page. - - PASS_MAX Maximum number of significant bytes in a password. - - We only provide a fixed limit for - - IOV_MAX Maximum number of `iovec' structures that one process has - available for use with `readv' or writev'. - - if this is indeed fixed by the underlying system. -*/ - - -/* Maximum number of `iovec' structures that one process has available - for use with `readv' or writev'. */ -#define _XOPEN_IOV_MAX _POSIX_UIO_MAXIOV - - -/* Maximum value of `digit' in calls to the `printf' and `scanf' - functions. We have no limit, so return a reasonable value. */ -#define NL_ARGMAX _POSIX_ARG_MAX - -/* Maximum number of bytes in a `LANG' name. We have no limit. */ -#define NL_LANGMAX _POSIX2_LINE_MAX - -/* Maximum message number. We have no limit. */ -#define NL_MSGMAX INT_MAX - -/* Maximum number of bytes in N-to-1 collation mapping. We have no - limit. */ -#define NL_NMAX INT_MAX - -/* Maximum set number. We have no limit. */ -#define NL_SETMAX INT_MAX - -/* Maximum number of bytes in a message. We have no limit. */ -#define NL_TEXTMAX INT_MAX - -/* Default process priority. */ -#define NZERO 20 - - -/* Number of bits in a word of type `int'. */ -#ifdef INT_MAX -# if INT_MAX == 32767 -# define WORD_BIT 16 -# else -# if INT_MAX == 2147483647 -# define WORD_BIT 32 -# else -/* Safe assumption. */ -# define WORD_BIT 64 -# endif -# endif -#elif defined __INT_MAX__ -# if __INT_MAX__ == 32767 -# define WORD_BIT 16 -# else -# if __INT_MAX__ == 2147483647 -# define WORD_BIT 32 -# else -/* Safe assumption. */ -# define WORD_BIT 64 -# endif -# endif -#else -# define WORD_BIT 32 -#endif - -/* Number of bits in a word of type `long int'. */ -#ifdef LONG_MAX -# if LONG_MAX == 2147483647 -# define LONG_BIT 32 -# else -/* Safe assumption. */ -# define LONG_BIT 64 -# endif -#elif defined __LONG_MAX__ -# if __LONG_MAX__ == 2147483647 -# define LONG_BIT 32 -# else -/* Safe assumption. */ -# define LONG_BIT 64 -# endif -#else -# include <bits/wordsize.h> -# if __WORDSIZE == 64 -# define LONG_BIT 64 -# else -# define LONG_BIT 32 -# endif -#endif - -#endif /* bits/xopen_lim.h */ diff --git a/libc/sysdeps/linux/i386/bits/stdio_lim.h b/libc/sysdeps/linux/mips/sys/cachectl.h index ea6d693f5..a93e1fb6d 100644 --- a/libc/sysdeps/linux/i386/bits/stdio_lim.h +++ b/libc/sysdeps/linux/mips/sys/cachectl.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 1997, 1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 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 @@ -16,26 +16,27 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#if !defined _STDIO_H && !defined __need_FOPEN_MAX && !defined __need_IOV_MAX -# error "Never include <bits/stdio_lim.h> directly; use <stdio.h> instead." -#endif +#ifndef _SYS_CACHECTL_H +#define _SYS_CACHECTL_H 1 -#ifdef _STDIO_H -# define L_tmpnam 20 -# define TMP_MAX 238328 -# define FILENAME_MAX 4095 +#include <features.h> -# ifdef __USE_POSIX -# define L_ctermid 9 -# define L_cuserid 9 -# endif -#endif +/* + * Get the kernel definition for the op bits. + */ +#include <asm/cachectl.h> -#if defined __need_FOPEN_MAX || defined _STDIO_H -# undef FOPEN_MAX -# define FOPEN_MAX 16 -#endif +__BEGIN_DECLS -#if defined __need_IOV_MAX && !defined IOV_MAX -# define IOV_MAX 1024 +#ifdef __USE_MISC +extern int cachectl (void *addr, __const int nbytes, __const int op) __THROW; #endif +extern int __cachectl (void *addr, __const int nbytes, __const int op) __THROW; +#ifdef __USE_MISC +extern int cacheflush (void *addr, __const int nbytes, __const int op) __THROW; +#endif +extern int _flush_cache (char *addr, __const int nbytes, __const int op) __THROW; + +__END_DECLS + +#endif /* sys/cachectl.h */ diff --git a/libc/sysdeps/linux/mips/sys/procfs.h b/libc/sysdeps/linux/mips/sys/procfs.h new file mode 100644 index 000000000..76dd2bbeb --- /dev/null +++ b/libc/sysdeps/linux/mips/sys/procfs.h @@ -0,0 +1,117 @@ +/* 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 _SYS_PROCFS_H +#define _SYS_PROCFS_H 1 + +/* This is somehow modelled after the file of the same name on SysVr4 + systems. It provides a definition of the core file format for ELF + used on Linux. */ + +#include <features.h> +#include <signal.h> +#include <sys/time.h> +#include <sys/types.h> +#include <sys/ucontext.h> +#include <sys/user.h> +#include <asm/elf.h> + +__BEGIN_DECLS + +struct elf_siginfo + { + int si_signo; /* Signal number. */ + int si_code; /* Extra code. */ + int si_errno; /* Errno. */ + }; + + +/* Definitions to generate Intel SVR4-like core files. These mostly + have the same names as the SVR4 types with "elf_" tacked on the + front to prevent clashes with linux definitions, and the typedef + forms have been avoided. This is mostly like the SVR4 structure, + but more Linuxy, with things that Linux does not support and which + gdb doesn't really use excluded. Fields present but not used are + marked with "XXX". */ +struct elf_prstatus + { +#if 0 + long int pr_flags; /* XXX Process flags. */ + short int pr_why; /* XXX Reason for process halt. */ + short int pr_what; /* XXX More detailed reason. */ +#endif + struct elf_siginfo pr_info; /* Info associated with signal. */ + short int pr_cursig; /* Current signal. */ + unsigned long int pr_sigpend; /* Set of pending signals. */ + unsigned long int pr_sighold; /* Set of held signals. */ +#if 0 + struct sigaltstack pr_altstack; /* Alternate stack info. */ + struct sigaction pr_action; /* Signal action for current sig. */ +#endif + __pid_t pr_pid; + __pid_t pr_ppid; + __pid_t pr_pgrp; + __pid_t pr_sid; + struct timeval pr_utime; /* User time. */ + struct timeval pr_stime; /* System time. */ + struct timeval pr_cutime; /* Cumulative user time. */ + struct timeval pr_cstime; /* Cumulative system time. */ +#if 0 + long int pr_instr; /* Current instruction. */ +#endif + elf_gregset_t pr_reg; /* GP registers. */ + int pr_fpvalid; /* True if math copro being used. */ + }; + + +#define ELF_PRARGSZ (80) /* Number of chars for args */ + +struct elf_prpsinfo + { + char pr_state; /* Numeric process state. */ + char pr_sname; /* Char for pr_state. */ + char pr_zomb; /* Zombie. */ + char pr_nice; /* Nice val. */ + unsigned long int pr_flag; /* Flags. */ + long pr_uid; + long pr_gid; + int pr_pid, pr_ppid, pr_pgrp, pr_sid; + /* Lots missing */ + char pr_fname[16]; /* Filename of executable. */ + char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ + }; + + +/* Addresses. */ +typedef void *psaddr_t; + +/* Register sets. Linux has different names. */ +typedef gregset_t prgregset_t; +typedef fpregset_t prfpregset_t; + +/* We don't have any differences between processes and threads, + therefore habe only ine PID type. */ +typedef __pid_t lwpid_t; + + +typedef struct elf_prstatus prstatus_t; +typedef struct elf_prpsinfo prpsinfo_t; + +__END_DECLS + +#endif /* sys/procfs.h */ diff --git a/libc/sysdeps/linux/h8300/bits/wchar.h b/libc/sysdeps/linux/mips/sys/sysmips.h index ef1f56363..642a31629 100644 --- a/libc/sysdeps/linux/h8300/bits/wchar.h +++ b/libc/sysdeps/linux/mips/sys/sysmips.h @@ -1,5 +1,4 @@ -/* wchar_t type related definitions. - Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 1991, 92, 94, 95, 96, 97, 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 @@ -17,10 +16,21 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#ifndef _BITS_WCHAR_H -#define _BITS_WCHAR_H 1 +#ifndef _SYS_SYSMIPS_H +#define _SYS_SYSMIPS_H 1 -#define __WCHAR_MIN (-2147483647 - 1) -#define __WCHAR_MAX (2147483647) +#include <features.h> -#endif /* bits/wchar.h */ +/* + * Get the kernel definition for sysmips(2) + */ +#include <asm/sysmips.h> + +__BEGIN_DECLS + +extern int sysmips (__const int cmd, __const int arg1, + __const int arg2, __const int arg3) __THROW; + +__END_DECLS + +#endif /* sys/sysmips.h */ diff --git a/libc/sysdeps/linux/mips/sys/tas.h b/libc/sysdeps/linux/mips/sys/tas.h new file mode 100644 index 000000000..0c81dc2de --- /dev/null +++ b/libc/sysdeps/linux/mips/sys/tas.h @@ -0,0 +1,76 @@ +/* Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Maciej W. Rozycki <macro@ds2.pg.gda.pl>, 2000. + + 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 _SYS_TAS_H +#define _SYS_TAS_H 1 + +#include <features.h> +#include <sgidefs.h> +#include <sys/sysmips.h> + +__BEGIN_DECLS + +extern int _test_and_set (int *p, int v) __THROW; + +#ifdef __USE_EXTERN_INLINES + +# ifndef _EXTERN_INLINE +# define _EXTERN_INLINE extern __inline +# endif + +# if (_MIPS_ISA >= _MIPS_ISA_MIPS2) + +_EXTERN_INLINE int +_test_and_set (int *p, int v) __THROW +{ + int r, t; + + __asm__ __volatile__ + ("1:\n\t" + "ll %0,%3\n\t" + ".set push\n\t" + ".set noreorder\n\t" + "beq %0,%4,2f\n\t" + " move %1,%4\n\t" + ".set pop\n\t" + "sc %1,%2\n\t" + "beqz %1,1b\n" + "2:\n" + : "=&r" (r), "=&r" (t), "=m" (*p) + : "m" (*p), "r" (v) + : "memory"); + + return r; +} + +# else /* !(_MIPS_ISA >= _MIPS_ISA_MIPS2) */ + +_EXTERN_INLINE int +_test_and_set (int *p, int v) __THROW +{ + return sysmips (MIPS_ATOMIC_SET, (int) p, v, 0); +} + +# endif /* !(_MIPS_ISA >= _MIPS_ISA_MIPS2) */ + +#endif /* __USE_EXTERN_INLINES */ + +__END_DECLS + +#endif /* sys/tas.h */ diff --git a/libc/sysdeps/linux/mips/sys/ucontext.h b/libc/sysdeps/linux/mips/sys/ucontext.h new file mode 100644 index 000000000..f57b91e4f --- /dev/null +++ b/libc/sysdeps/linux/mips/sys/ucontext.h @@ -0,0 +1,80 @@ +/* Copyright (C) 1997, 1998, 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. */ + +/* Don't rely on this, the interface is currently messed up and may need to + be broken to be fixed. */ +#ifndef _SYS_UCONTEXT_H +#define _SYS_UCONTEXT_H 1 + +#include <features.h> +#include <signal.h> + +/* We need the signal context definitions even if they are not used + included in <signal.h>. */ +#include <bits/sigcontext.h> + + +/* Type for general register. */ +typedef unsigned long int greg_t; + +/* Number of general registers. */ +#define NGREG 37 +#define NFPREG 33 + +/* Container for all general registers. */ +/* gregset_t must be an array. The below declared array corresponds to: +typedef struct gregset { + greg_t g_regs[32]; + greg_t g_hi; + greg_t g_lo; + greg_t g_pad[3]; +} gregset_t; */ +typedef greg_t gregset_t[NGREG]; + +/* Container for all FPU registers. */ +typedef struct fpregset { + union { + double fp_dregs[32]; + struct { + float _fp_fregs; + unsigned int _fp_pad; + } fp_fregs[32]; + } fp_r; + unsigned int fp_csr; + unsigned int fp_pad; +} fpregset_t; + + +/* Context to describe whole processor state. */ +typedef struct + { + gregset_t gregs; + fpregset_t fpregs; + } mcontext_t; + +/* Userlevel context. */ +typedef struct ucontext + { + unsigned long int uc_flags; + struct ucontext *uc_link; + stack_t uc_stack; + mcontext_t uc_mcontext; + __sigset_t uc_sigmask; + } ucontext_t; + +#endif /* sys/ucontext.h */ diff --git a/libc/sysdeps/linux/powerpc/bits/byteswap.h b/libc/sysdeps/linux/powerpc/bits/byteswap.h deleted file mode 100644 index 7866abe9c..000000000 --- a/libc/sysdeps/linux/powerpc/bits/byteswap.h +++ /dev/null @@ -1,79 +0,0 @@ -/* Macros to swap the order of bytes in integer values. - Copyright (C) 1997, 1998, 2000, 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. */ - -#if !defined _BYTESWAP_H && !defined _NETINET_IN_H -# error "Never use <bits/byteswap.h> directly; include <byteswap.h> instead." -#endif - -/* Swap bytes in 16 bit value. */ -#ifdef __GNUC__ -# define __bswap_16(x) \ - (__extension__ \ - ({ unsigned short int __bsx = (x); \ - ((((__bsx) >> 8) & 0xff) | (((__bsx) & 0xff) << 8)); })) -#else -static __inline unsigned short int -__bswap_16 (unsigned short int __bsx) -{ - return ((((__bsx) >> 8) & 0xff) | (((__bsx) & 0xff) << 8)); -} -#endif - -/* Swap bytes in 32 bit value. */ -#ifdef __GNUC__ -# define __bswap_32(x) \ - (__extension__ \ - ({ unsigned int __bsx = (x); \ - ((((__bsx) & 0xff000000) >> 24) | (((__bsx) & 0x00ff0000) >> 8) | \ - (((__bsx) & 0x0000ff00) << 8) | (((__bsx) & 0x000000ff) << 24)); })) -#else -static __inline unsigned int -__bswap_32 (unsigned int __bsx) -{ - return ((((__bsx) & 0xff000000) >> 24) | (((__bsx) & 0x00ff0000) >> 8) | - (((__bsx) & 0x0000ff00) << 8) | (((__bsx) & 0x000000ff) << 24)); -} -#endif - -#if defined __GNUC__ && __GNUC__ >= 2 -/* Swap bytes in 64 bit value. */ -# define __bswap_constant_64(x) \ - ((((x) & 0xff00000000000000ull) >> 56) \ - | (((x) & 0x00ff000000000000ull) >> 40) \ - | (((x) & 0x0000ff0000000000ull) >> 24) \ - | (((x) & 0x000000ff00000000ull) >> 8) \ - | (((x) & 0x00000000ff000000ull) << 8) \ - | (((x) & 0x0000000000ff0000ull) << 24) \ - | (((x) & 0x000000000000ff00ull) << 40) \ - | (((x) & 0x00000000000000ffull) << 56)) - -# define __bswap_64(x) \ - (__extension__ \ - ({ union { __extension__ unsigned long long int __ll; \ - unsigned int __l[2]; } __w, __r; \ - if (__builtin_constant_p (x)) \ - __r.__ll = __bswap_constant_64 (x); \ - else \ - { \ - __w.__ll = (x); \ - __r.__l[0] = __bswap_32 (__w.__l[1]); \ - __r.__l[1] = __bswap_32 (__w.__l[0]); \ - } \ - __r.__ll; })) -#endif diff --git a/libc/sysdeps/linux/powerpc/bits/cmathcalls.h b/libc/sysdeps/linux/powerpc/bits/cmathcalls.h deleted file mode 100644 index c680c6d8e..000000000 --- a/libc/sysdeps/linux/powerpc/bits/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/libc/sysdeps/linux/powerpc/bits/confname.h b/libc/sysdeps/linux/powerpc/bits/confname.h deleted file mode 100644 index ba8868af4..000000000 --- a/libc/sysdeps/linux/powerpc/bits/confname.h +++ /dev/null @@ -1,566 +0,0 @@ -/* `sysconf', `pathconf', and `confstr' NAME values. Generic version. - Copyright (C) 1993, 1995-1998, 2000, 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. */ - -#ifndef _UNISTD_H -# error "Never use <bits/confname.h> directly; include <unistd.h> instead." -#endif - -/* Values for the NAME argument to `pathconf' and `fpathconf'. */ -enum - { - _PC_LINK_MAX, -#define _PC_LINK_MAX _PC_LINK_MAX - _PC_MAX_CANON, -#define _PC_MAX_CANON _PC_MAX_CANON - _PC_MAX_INPUT, -#define _PC_MAX_INPUT _PC_MAX_INPUT - _PC_NAME_MAX, -#define _PC_NAME_MAX _PC_NAME_MAX - _PC_PATH_MAX, -#define _PC_PATH_MAX _PC_PATH_MAX - _PC_PIPE_BUF, -#define _PC_PIPE_BUF _PC_PIPE_BUF - _PC_CHOWN_RESTRICTED, -#define _PC_CHOWN_RESTRICTED _PC_CHOWN_RESTRICTED - _PC_NO_TRUNC, -#define _PC_NO_TRUNC _PC_NO_TRUNC - _PC_VDISABLE, -#define _PC_VDISABLE _PC_VDISABLE - _PC_SYNC_IO, -#define _PC_SYNC_IO _PC_SYNC_IO - _PC_ASYNC_IO, -#define _PC_ASYNC_IO _PC_ASYNC_IO - _PC_PRIO_IO, -#define _PC_PRIO_IO _PC_PRIO_IO - _PC_SOCK_MAXBUF, -#define _PC_SOCK_MAXBUF _PC_SOCK_MAXBUF - _PC_FILESIZEBITS, -#define _PC_FILESIZEBITS _PC_FILESIZEBITS - _PC_REC_INCR_XFER_SIZE, -#define _PC_REC_INCR_XFER_SIZE _PC_REC_INCR_XFER_SIZE - _PC_REC_MAX_XFER_SIZE, -#define _PC_REC_MAX_XFER_SIZE _PC_REC_MAX_XFER_SIZE - _PC_REC_MIN_XFER_SIZE, -#define _PC_REC_MIN_XFER_SIZE _PC_REC_MIN_XFER_SIZE - _PC_REC_XFER_ALIGN, -#define _PC_REC_XFER_ALIGN _PC_REC_XFER_ALIGN - _PC_ALLOC_SIZE_MIN, -#define _PC_ALLOC_SIZE_MIN _PC_ALLOC_SIZE_MIN - _PC_SYMLINK_MAX -#define _PC_SYMLINK_MAX _PC_SYMLINK_MAX - }; - -/* Values for the argument to `sysconf'. */ -enum - { - _SC_ARG_MAX, -#define _SC_ARG_MAX _SC_ARG_MAX - _SC_CHILD_MAX, -#define _SC_CHILD_MAX _SC_CHILD_MAX - _SC_CLK_TCK, -#define _SC_CLK_TCK _SC_CLK_TCK - _SC_NGROUPS_MAX, -#define _SC_NGROUPS_MAX _SC_NGROUPS_MAX - _SC_OPEN_MAX, -#define _SC_OPEN_MAX _SC_OPEN_MAX - _SC_STREAM_MAX, -#define _SC_STREAM_MAX _SC_STREAM_MAX - _SC_TZNAME_MAX, -#define _SC_TZNAME_MAX _SC_TZNAME_MAX - _SC_JOB_CONTROL, -#define _SC_JOB_CONTROL _SC_JOB_CONTROL - _SC_SAVED_IDS, -#define _SC_SAVED_IDS _SC_SAVED_IDS - _SC_REALTIME_SIGNALS, -#define _SC_REALTIME_SIGNALS _SC_REALTIME_SIGNALS - _SC_PRIORITY_SCHEDULING, -#define _SC_PRIORITY_SCHEDULING _SC_PRIORITY_SCHEDULING - _SC_TIMERS, -#define _SC_TIMERS _SC_TIMERS - _SC_ASYNCHRONOUS_IO, -#define _SC_ASYNCHRONOUS_IO _SC_ASYNCHRONOUS_IO - _SC_PRIORITIZED_IO, -#define _SC_PRIORITIZED_IO _SC_PRIORITIZED_IO - _SC_SYNCHRONIZED_IO, -#define _SC_SYNCHRONIZED_IO _SC_SYNCHRONIZED_IO - _SC_FSYNC, -#define _SC_FSYNC _SC_FSYNC - _SC_MAPPED_FILES, -#define _SC_MAPPED_FILES _SC_MAPPED_FILES - _SC_MEMLOCK, -#define _SC_MEMLOCK _SC_MEMLOCK - _SC_MEMLOCK_RANGE, -#define _SC_MEMLOCK_RANGE _SC_MEMLOCK_RANGE - _SC_MEMORY_PROTECTION, -#define _SC_MEMORY_PROTECTION _SC_MEMORY_PROTECTION - _SC_MESSAGE_PASSING, -#define _SC_MESSAGE_PASSING _SC_MESSAGE_PASSING - _SC_SEMAPHORES, -#define _SC_SEMAPHORES _SC_SEMAPHORES - _SC_SHARED_MEMORY_OBJECTS, -#define _SC_SHARED_MEMORY_OBJECTS _SC_SHARED_MEMORY_OBJECTS - _SC_AIO_LISTIO_MAX, -#define _SC_AIO_LISTIO_MAX _SC_AIO_LISTIO_MAX - _SC_AIO_MAX, -#define _SC_AIO_MAX _SC_AIO_MAX - _SC_AIO_PRIO_DELTA_MAX, -#define _SC_AIO_PRIO_DELTA_MAX _SC_AIO_PRIO_DELTA_MAX - _SC_DELAYTIMER_MAX, -#define _SC_DELAYTIMER_MAX _SC_DELAYTIMER_MAX - _SC_MQ_OPEN_MAX, -#define _SC_MQ_OPEN_MAX _SC_MQ_OPEN_MAX - _SC_MQ_PRIO_MAX, -#define _SC_MQ_PRIO_MAX _SC_MQ_PRIO_MAX - _SC_VERSION, -#define _SC_VERSION _SC_VERSION - _SC_PAGESIZE, -#define _SC_PAGESIZE _SC_PAGESIZE -#define _SC_PAGE_SIZE _SC_PAGESIZE - _SC_RTSIG_MAX, -#define _SC_RTSIG_MAX _SC_RTSIG_MAX - _SC_SEM_NSEMS_MAX, -#define _SC_SEM_NSEMS_MAX _SC_SEM_NSEMS_MAX - _SC_SEM_VALUE_MAX, -#define _SC_SEM_VALUE_MAX _SC_SEM_VALUE_MAX - _SC_SIGQUEUE_MAX, -#define _SC_SIGQUEUE_MAX _SC_SIGQUEUE_MAX - _SC_TIMER_MAX, -#define _SC_TIMER_MAX _SC_TIMER_MAX - - /* Values for the argument to `sysconf' - corresponding to _POSIX2_* symbols. */ - _SC_BC_BASE_MAX, -#define _SC_BC_BASE_MAX _SC_BC_BASE_MAX - _SC_BC_DIM_MAX, -#define _SC_BC_DIM_MAX _SC_BC_DIM_MAX - _SC_BC_SCALE_MAX, -#define _SC_BC_SCALE_MAX _SC_BC_SCALE_MAX - _SC_BC_STRING_MAX, -#define _SC_BC_STRING_MAX _SC_BC_STRING_MAX - _SC_COLL_WEIGHTS_MAX, -#define _SC_COLL_WEIGHTS_MAX _SC_COLL_WEIGHTS_MAX - _SC_EQUIV_CLASS_MAX, -#define _SC_EQUIV_CLASS_MAX _SC_EQUIV_CLASS_MAX - _SC_EXPR_NEST_MAX, -#define _SC_EXPR_NEST_MAX _SC_EXPR_NEST_MAX - _SC_LINE_MAX, -#define _SC_LINE_MAX _SC_LINE_MAX - _SC_RE_DUP_MAX, -#define _SC_RE_DUP_MAX _SC_RE_DUP_MAX - _SC_CHARCLASS_NAME_MAX, -#define _SC_CHARCLASS_NAME_MAX _SC_CHARCLASS_NAME_MAX - - _SC_2_VERSION, -#define _SC_2_VERSION _SC_2_VERSION - _SC_2_C_BIND, -#define _SC_2_C_BIND _SC_2_C_BIND - _SC_2_C_DEV, -#define _SC_2_C_DEV _SC_2_C_DEV - _SC_2_FORT_DEV, -#define _SC_2_FORT_DEV _SC_2_FORT_DEV - _SC_2_FORT_RUN, -#define _SC_2_FORT_RUN _SC_2_FORT_RUN - _SC_2_SW_DEV, -#define _SC_2_SW_DEV _SC_2_SW_DEV - _SC_2_LOCALEDEF, -#define _SC_2_LOCALEDEF _SC_2_LOCALEDEF - - _SC_PII, -#define _SC_PII _SC_PII - _SC_PII_XTI, -#define _SC_PII_XTI _SC_PII_XTI - _SC_PII_SOCKET, -#define _SC_PII_SOCKET _SC_PII_SOCKET - _SC_PII_INTERNET, -#define _SC_PII_INTERNET _SC_PII_INTERNET - _SC_PII_OSI, -#define _SC_PII_OSI _SC_PII_OSI - _SC_POLL, -#define _SC_POLL _SC_POLL - _SC_SELECT, -#define _SC_SELECT _SC_SELECT - _SC_UIO_MAXIOV, -#define _SC_UIO_MAXIOV _SC_UIO_MAXIOV - _SC_IOV_MAX = _SC_UIO_MAXIOV, -#define _SC_IOV_MAX _SC_IOV_MAX - _SC_PII_INTERNET_STREAM, -#define _SC_PII_INTERNET_STREAM _SC_PII_INTERNET_STREAM - _SC_PII_INTERNET_DGRAM, -#define _SC_PII_INTERNET_DGRAM _SC_PII_INTERNET_DGRAM - _SC_PII_OSI_COTS, -#define _SC_PII_OSI_COTS _SC_PII_OSI_COTS - _SC_PII_OSI_CLTS, -#define _SC_PII_OSI_CLTS _SC_PII_OSI_CLTS - _SC_PII_OSI_M, -#define _SC_PII_OSI_M _SC_PII_OSI_M - _SC_T_IOV_MAX, -#define _SC_T_IOV_MAX _SC_T_IOV_MAX - - /* Values according to POSIX 1003.1c (POSIX threads). */ - _SC_THREADS, -#define _SC_THREADS _SC_THREADS - _SC_THREAD_SAFE_FUNCTIONS, -#define _SC_THREAD_SAFE_FUNCTIONS _SC_THREAD_SAFE_FUNCTIONS - _SC_GETGR_R_SIZE_MAX, -#define _SC_GETGR_R_SIZE_MAX _SC_GETGR_R_SIZE_MAX - _SC_GETPW_R_SIZE_MAX, -#define _SC_GETPW_R_SIZE_MAX _SC_GETPW_R_SIZE_MAX - _SC_LOGIN_NAME_MAX, -#define _SC_LOGIN_NAME_MAX _SC_LOGIN_NAME_MAX - _SC_TTY_NAME_MAX, -#define _SC_TTY_NAME_MAX _SC_TTY_NAME_MAX - _SC_THREAD_DESTRUCTOR_ITERATIONS, -#define _SC_THREAD_DESTRUCTOR_ITERATIONS _SC_THREAD_DESTRUCTOR_ITERATIONS - _SC_THREAD_KEYS_MAX, -#define _SC_THREAD_KEYS_MAX _SC_THREAD_KEYS_MAX - _SC_THREAD_STACK_MIN, -#define _SC_THREAD_STACK_MIN _SC_THREAD_STACK_MIN - _SC_THREAD_THREADS_MAX, -#define _SC_THREAD_THREADS_MAX _SC_THREAD_THREADS_MAX - _SC_THREAD_ATTR_STACKADDR, -#define _SC_THREAD_ATTR_STACKADDR _SC_THREAD_ATTR_STACKADDR - _SC_THREAD_ATTR_STACKSIZE, -#define _SC_THREAD_ATTR_STACKSIZE _SC_THREAD_ATTR_STACKSIZE - _SC_THREAD_PRIORITY_SCHEDULING, -#define _SC_THREAD_PRIORITY_SCHEDULING _SC_THREAD_PRIORITY_SCHEDULING - _SC_THREAD_PRIO_INHERIT, -#define _SC_THREAD_PRIO_INHERIT _SC_THREAD_PRIO_INHERIT - _SC_THREAD_PRIO_PROTECT, -#define _SC_THREAD_PRIO_PROTECT _SC_THREAD_PRIO_PROTECT - _SC_THREAD_PROCESS_SHARED, -#define _SC_THREAD_PROCESS_SHARED _SC_THREAD_PROCESS_SHARED - - _SC_NPROCESSORS_CONF, -#define _SC_NPROCESSORS_CONF _SC_NPROCESSORS_CONF - _SC_NPROCESSORS_ONLN, -#define _SC_NPROCESSORS_ONLN _SC_NPROCESSORS_ONLN - _SC_PHYS_PAGES, -#define _SC_PHYS_PAGES _SC_PHYS_PAGES - _SC_AVPHYS_PAGES, -#define _SC_AVPHYS_PAGES _SC_AVPHYS_PAGES - _SC_ATEXIT_MAX, -#define _SC_ATEXIT_MAX _SC_ATEXIT_MAX - _SC_PASS_MAX, -#define _SC_PASS_MAX _SC_PASS_MAX - - _SC_XOPEN_VERSION, -#define _SC_XOPEN_VERSION _SC_XOPEN_VERSION - _SC_XOPEN_XCU_VERSION, -#define _SC_XOPEN_XCU_VERSION _SC_XOPEN_XCU_VERSION - _SC_XOPEN_UNIX, -#define _SC_XOPEN_UNIX _SC_XOPEN_UNIX - _SC_XOPEN_CRYPT, -#define _SC_XOPEN_CRYPT _SC_XOPEN_CRYPT - _SC_XOPEN_ENH_I18N, -#define _SC_XOPEN_ENH_I18N _SC_XOPEN_ENH_I18N - _SC_XOPEN_SHM, -#define _SC_XOPEN_SHM _SC_XOPEN_SHM - - _SC_2_CHAR_TERM, -#define _SC_2_CHAR_TERM _SC_2_CHAR_TERM - _SC_2_C_VERSION, -#define _SC_2_C_VERSION _SC_2_C_VERSION - _SC_2_UPE, -#define _SC_2_UPE _SC_2_UPE - - _SC_XOPEN_XPG2, -#define _SC_XOPEN_XPG2 _SC_XOPEN_XPG2 - _SC_XOPEN_XPG3, -#define _SC_XOPEN_XPG3 _SC_XOPEN_XPG3 - _SC_XOPEN_XPG4, -#define _SC_XOPEN_XPG4 _SC_XOPEN_XPG4 - - _SC_CHAR_BIT, -#define _SC_CHAR_BIT _SC_CHAR_BIT - _SC_CHAR_MAX, -#define _SC_CHAR_MAX _SC_CHAR_MAX - _SC_CHAR_MIN, -#define _SC_CHAR_MIN _SC_CHAR_MIN - _SC_INT_MAX, -#define _SC_INT_MAX _SC_INT_MAX - _SC_INT_MIN, -#define _SC_INT_MIN _SC_INT_MIN - _SC_LONG_BIT, -#define _SC_LONG_BIT _SC_LONG_BIT - _SC_WORD_BIT, -#define _SC_WORD_BIT _SC_WORD_BIT - _SC_MB_LEN_MAX, -#define _SC_MB_LEN_MAX _SC_MB_LEN_MAX - _SC_NZERO, -#define _SC_NZERO _SC_NZERO - _SC_SSIZE_MAX, -#define _SC_SSIZE_MAX _SC_SSIZE_MAX - _SC_SCHAR_MAX, -#define _SC_SCHAR_MAX _SC_SCHAR_MAX - _SC_SCHAR_MIN, -#define _SC_SCHAR_MIN _SC_SCHAR_MIN - _SC_SHRT_MAX, -#define _SC_SHRT_MAX _SC_SHRT_MAX - _SC_SHRT_MIN, -#define _SC_SHRT_MIN _SC_SHRT_MIN - _SC_UCHAR_MAX, -#define _SC_UCHAR_MAX _SC_UCHAR_MAX - _SC_UINT_MAX, -#define _SC_UINT_MAX _SC_UINT_MAX - _SC_ULONG_MAX, -#define _SC_ULONG_MAX _SC_ULONG_MAX - _SC_USHRT_MAX, -#define _SC_USHRT_MAX _SC_USHRT_MAX - - _SC_NL_ARGMAX, -#define _SC_NL_ARGMAX _SC_NL_ARGMAX - _SC_NL_LANGMAX, -#define _SC_NL_LANGMAX _SC_NL_LANGMAX - _SC_NL_MSGMAX, -#define _SC_NL_MSGMAX _SC_NL_MSGMAX - _SC_NL_NMAX, -#define _SC_NL_NMAX _SC_NL_NMAX - _SC_NL_SETMAX, -#define _SC_NL_SETMAX _SC_NL_SETMAX - _SC_NL_TEXTMAX, -#define _SC_NL_TEXTMAX _SC_NL_TEXTMAX - - _SC_XBS5_ILP32_OFF32, -#define _SC_XBS5_ILP32_OFF32 _SC_XBS5_ILP32_OFF32 - _SC_XBS5_ILP32_OFFBIG, -#define _SC_XBS5_ILP32_OFFBIG _SC_XBS5_ILP32_OFFBIG - _SC_XBS5_LP64_OFF64, -#define _SC_XBS5_LP64_OFF64 _SC_XBS5_LP64_OFF64 - _SC_XBS5_LPBIG_OFFBIG, -#define _SC_XBS5_LPBIG_OFFBIG _SC_XBS5_LPBIG_OFFBIG - - _SC_XOPEN_LEGACY, -#define _SC_XOPEN_LEGACY _SC_XOPEN_LEGACY - _SC_XOPEN_REALTIME, -#define _SC_XOPEN_REALTIME _SC_XOPEN_REALTIME - _SC_XOPEN_REALTIME_THREADS, -#define _SC_XOPEN_REALTIME_THREADS _SC_XOPEN_REALTIME_THREADS - - _SC_ADVISORY_INFO, -#define _SC_ADVISORY_INFO _SC_ADVISORY_INFO - _SC_BARRIERS, -#define _SC_BARRIERS _SC_BARRIERS - _SC_BASE, -#define _SC_BASE _SC_BASE - _SC_C_LANG_SUPPORT, -#define _SC_C_LANG_SUPPORT _SC_C_LANG_SUPPORT - _SC_C_LANG_SUPPORT_R, -#define _SC_C_LANG_SUPPORT_R _SC_C_LANG_SUPPORT_R - _SC_CLOCK_SELECTION, -#define _SC_CLOCK_SELECTION _SC_CLOCK_SELECTION - _SC_CPUTIME, -#define _SC_CPUTIME _SC_CPUTIME - _SC_THREAD_CPUTIME, -#define _SC_THREAD_CPUTIME _SC_THREAD_CPUTIME - _SC_DEVICE_IO, -#define _SC_DEVICE_IO _SC_DEVICE_IO - _SC_DEVICE_SPECIFIC, -#define _SC_DEVICE_SPECIFIC _SC_DEVICE_SPECIFIC - _SC_DEVICE_SPECIFIC_R, -#define _SC_DEVICE_SPECIFIC_R _SC_DEVICE_SPECIFIC_R - _SC_FD_MGMT, -#define _SC_FD_MGMT _SC_FD_MGMT - _SC_FIFO, -#define _SC_FIFO _SC_FIFO - _SC_PIPE, -#define _SC_PIPE _SC_PIPE - _SC_FILE_ATTRIBUTES, -#define _SC_FILE_ATTRIBUTES _SC_FILE_ATTRIBUTES - _SC_FILE_LOCKING, -#define _SC_FILE_LOCKING _SC_FILE_LOCKING - _SC_FILE_SYSTEM, -#define _SC_FILE_SYSTEM _SC_FILE_SYSTEM - _SC_MONOTONIC_CLOCK, -#define _SC_MONOTONIC_CLOCK _SC_MONOTONIC_CLOCK - _SC_MULTI_PROCESS, -#define _SC_MULTI_PROCESS _SC_MULTI_PROCESS - _SC_SINGLE_PROCESS, -#define _SC_SINGLE_PROCESS _SC_SINGLE_PROCESS - _SC_NETWORKING, -#define _SC_NETWORKING _SC_NETWORKING - _SC_READER_WRITER_LOCKS, -#define _SC_READER_WRITER_LOCKS _SC_READER_WRITER_LOCKS - _SC_SPIN_LOCKS, -#define _SC_SPIN_LOCKS _SC_SPIN_LOCKS - _SC_REGEXP, -#define _SC_REGEXP _SC_REGEXP - _SC_REGEX_VERSION, -#define _SC_REGEX_VERSION _SC_REGEX_VERSION - _SC_SHELL, -#define _SC_SHELL _SC_SHELL - _SC_SIGNALS, -#define _SC_SIGNALS _SC_SIGNALS - _SC_SPAWN, -#define _SC_SPAWN _SC_SPAWN - _SC_SPORADIC_SERVER, -#define _SC_SPORADIC_SERVER _SC_SPORADIC_SERVER - _SC_THREAD_SPORADIC_SERVER, -#define _SC_THREAD_SPORADIC_SERVER _SC_THREAD_SPORADIC_SERVER - _SC_SYSTEM_DATABASE, -#define _SC_SYSTEM_DATABASE _SC_SYSTEM_DATABASE - _SC_SYSTEM_DATABASE_R, -#define _SC_SYSTEM_DATABASE_R _SC_SYSTEM_DATABASE_R - _SC_TIMEOUTS, -#define _SC_TIMEOUTS _SC_TIMEOUTS - _SC_TYPED_MEMORY_OBJECTS, -#define _SC_TYPED_MEMORY_OBJECTS _SC_TYPED_MEMORY_OBJECTS - _SC_USER_GROUPS, -#define _SC_USER_GROUPS _SC_USER_GROUPS - _SC_USER_GROUPS_R, -#define _SC_USER_GROUPS_R _SC_USER_GROUPS_R - _SC_2_PBS, -#define _SC_2_PBS _SC_2_PBS - _SC_2_PBS_ACCOUNTING, -#define _SC_2_PBS_ACCOUNTING _SC_2_PBS_ACCOUNTING - _SC_2_PBS_LOCATE, -#define _SC_2_PBS_LOCATE _SC_2_PBS_LOCATE - _SC_2_PBS_MESSAGE, -#define _SC_2_PBS_MESSAGE _SC_2_PBS_MESSAGE - _SC_2_PBS_TRACK, -#define _SC_2_PBS_TRACK _SC_2_PBS_TRACK - _SC_SYMLOOP_MAX, -#define _SC_SYMLOOP_MAX _SC_SYMLOOP_MAX - _SC_STREAMS, -#define _SC_STREAMS _SC_STREAMS - _SC_2_PBS_CHECKPOINT, -#define _SC_2_PBS_CHECKPOINT _SC_2_PBS_CHECKPOINT - - _SC_V6_ILP32_OFF32, -#define _SC_V6_ILP32_OFF32 _SC_V6_ILP32_OFF32 - _SC_V6_ILP32_OFFBIG, -#define _SC_V6_ILP32_OFFBIG _SC_V6_ILP32_OFFBIG - _SC_V6_LP64_OFF64, -#define _SC_V6_LP64_OFF64 _SC_V6_LP64_OFF64 - _SC_V6_LPBIG_OFFBIG, -#define _SC_V6_LPBIG_OFFBIG _SC_V6_LPBIG_OFFBIG - - _SC_HOST_NAME_MAX, -#define _SC_HOST_NAME_MAX _SC_HOST_NAME_MAX - _SC_TRACE, -#define _SC_TRACE _SC_TRACE - _SC_TRACE_EVENT_FILTER, -#define _SC_TRACE_EVENT_FILTER _SC_TRACE_EVENT_FILTER - _SC_TRACE_INHERIT, -#define _SC_TRACE_INHERIT _SC_TRACE_INHERIT - _SC_TRACE_LOG -#define _SC_TRACE_LOG _SC_TRACE_LOG - }; - -#if (defined __USE_POSIX2 || defined __USE_UNIX98 \ - || defined __USE_FILE_OFFSET64 || defined __USE_LARGEFILE64 \ - || defined __USE_LARGEFILE) -/* Values for the NAME argument to `confstr'. */ -enum - { - _CS_PATH, /* The default search path. */ -#define _CS_PATH _CS_PATH - -# if (defined __USE_FILE_OFFSET64 || defined __USE_LARGEFILE64 \ - || defined __USE_LARGEFILE) - _CS_LFS_CFLAGS = 1000, -# define _CS_LFS_CFLAGS _CS_LFS_CFLAGS - _CS_LFS_LDFLAGS, -# define _CS_LFS_LDFLAGS _CS_LFS_LDFLAGS - _CS_LFS_LIBS, -# define _CS_LFS_LIBS _CS_LFS_LIBS - _CS_LFS_LINTFLAGS, -# define _CS_LFS_LINTFLAGS _CS_LFS_LINTFLAGS - _CS_LFS64_CFLAGS, -# define _CS_LFS64_CFLAGS _CS_LFS64_CFLAGS - _CS_LFS64_LDFLAGS, -# define _CS_LFS64_LDFLAGS _CS_LFS64_LDFLAGS - _CS_LFS64_LIBS, -# define _CS_LFS64_LIBS _CS_LFS64_LIBS - _CS_LFS64_LINTFLAGS, -# define _CS_LFS64_LINTFLAGS _CS_LFS64_LINTFLAGS -# endif - -# ifdef __USE_UNIX98 - _CS_XBS5_ILP32_OFF32_CFLAGS = 1100, -# define _CS_XBS5_ILP32_OFF32_CFLAGS _CS_XBS5_ILP32_OFF32_CFLAGS - _CS_XBS5_ILP32_OFF32_LDFLAGS, -# define _CS_XBS5_ILP32_OFF32_LDFLAGS _CS_XBS5_ILP32_OFF32_LDFLAGS - _CS_XBS5_ILP32_OFF32_LIBS, -# define _CS_XBS5_ILP32_OFF32_LIBS _CS_XBS5_ILP32_OFF32_LIBS - _CS_XBS5_ILP32_OFF32_LINTFLAGS, -# define _CS_XBS5_ILP32_OFF32_LINTFLAGS _CS_XBS5_ILP32_OFF32_LINTFLAGS - _CS_XBS5_ILP32_OFFBIG_CFLAGS, -# define _CS_XBS5_ILP32_OFFBIG_CFLAGS _CS_XBS5_ILP32_OFFBIG_CFLAGS - _CS_XBS5_ILP32_OFFBIG_LDFLAGS, -# define _CS_XBS5_ILP32_OFFBIG_LDFLAGS _CS_XBS5_ILP32_OFFBIG_LDFLAGS - _CS_XBS5_ILP32_OFFBIG_LIBS, -# define _CS_XBS5_ILP32_OFFBIG_LIBS _CS_XBS5_ILP32_OFFBIG_LIBS - _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, -# define _CS_XBS5_ILP32_OFFBIG_LINTFLAGS _CS_XBS5_ILP32_OFFBIG_LINTFLAGS - _CS_XBS5_LP64_OFF64_CFLAGS, -# define _CS_XBS5_LP64_OFF64_CFLAGS _CS_XBS5_LP64_OFF64_CFLAGS - _CS_XBS5_LP64_OFF64_LDFLAGS, -# define _CS_XBS5_LP64_OFF64_LDFLAGS _CS_XBS5_LP64_OFF64_LDFLAGS - _CS_XBS5_LP64_OFF64_LIBS, -# define _CS_XBS5_LP64_OFF64_LIBS _CS_XBS5_LP64_OFF64_LIBS - _CS_XBS5_LP64_OFF64_LINTFLAGS, -# define _CS_XBS5_LP64_OFF64_LINTFLAGS _CS_XBS5_LP64_OFF64_LINTFLAGS - _CS_XBS5_LPBIG_OFFBIG_CFLAGS, -# define _CS_XBS5_LPBIG_OFFBIG_CFLAGS _CS_XBS5_LPBIG_OFFBIG_CFLAGS - _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, -# define _CS_XBS5_LPBIG_OFFBIG_LDFLAGS _CS_XBS5_LPBIG_OFFBIG_LDFLAGS - _CS_XBS5_LPBIG_OFFBIG_LIBS, -# define _CS_XBS5_LPBIG_OFFBIG_LIBS _CS_XBS5_LPBIG_OFFBIG_LIBS - _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, -# define _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS -# endif -# ifdef __USE_XOPEN2K - _CS_POSIX_V6_ILP32_OFF32_CFLAGS, -# define _CS_POSIX_V6_ILP32_OFF32_CFLAGS _CS_POSIX_V6_ILP32_OFF32_CFLAGS - _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, -# define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS _CS_POSIX_V6_ILP32_OFF32_LDFLAGS - _CS_POSIX_V6_ILP32_OFF32_LIBS, -# define _CS_POSIX_V6_ILP32_OFF32_LIBS _CS_POSIX_V6_ILP32_OFF32_LIBS - _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, -# define _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS - _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, -# define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS - _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, -# define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS - _CS_POSIX_V6_ILP32_OFFBIG_LIBS, -# define _CS_POSIX_V6_ILP32_OFFBIG_LIBS _CS_POSIX_V6_ILP32_OFFBIG_LIBS - _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, -# define _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS - _CS_POSIX_V6_LP64_OFF64_CFLAGS, -# define _CS_POSIX_V6_LP64_OFF64_CFLAGS _CS_POSIX_V6_LP64_OFF64_CFLAGS - _CS_POSIX_V6_LP64_OFF64_LDFLAGS, -# define _CS_POSIX_V6_LP64_OFF64_LDFLAGS _CS_POSIX_V6_LP64_OFF64_LDFLAGS - _CS_POSIX_V6_LP64_OFF64_LIBS, -# define _CS_POSIX_V6_LP64_OFF64_LIBS _CS_POSIX_V6_LP64_OFF64_LIBS - _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, -# define _CS_POSIX_V6_LP64_OFF64_LINTFLAGS _CS_POSIX_V6_LP64_OFF64_LINTFLAGS - _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, -# define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS - _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, -# define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS - _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, -# define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS _CS_POSIX_V6_LPBIG_OFFBIG_LIBS - _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS, -# define _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS -# endif - - _CS_V6_WIDTH_RESTRICTED_ENVS -# define _CS_V6_WIDTH_RESTRICTED_ENVS _CS_V6_WIDTH_RESTRICTED_ENVS - }; -#endif diff --git a/libc/sysdeps/linux/powerpc/bits/dirent.h b/libc/sysdeps/linux/powerpc/bits/dirent.h deleted file mode 100644 index 1d41f4dd3..000000000 --- a/libc/sysdeps/linux/powerpc/bits/dirent.h +++ /dev/null @@ -1,65 +0,0 @@ -/* Copyright (C) 1996, 1997 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. */ - -/* - * June 25, 2001 - * - * Removed d_type support for dirent and undefined _DIRENT_HAVE_D_TYPE; - * i.e. match the kernel structs and avoid any translation for now. - * Note: glibc fakes d_type for the dirent case. - * Note: dirent64 still has the d_type field. - */ - - -#ifndef _DIRENT_H -# error "Never use <bits/dirent.h> directly; include <dirent.h> instead." -#endif - -struct dirent - { -#ifndef __USE_FILE_OFFSET64 - __ino_t d_ino; - __off_t d_off; -#else - __ino64_t d_ino; - __off64_t d_off; -#endif - unsigned short int d_reclen; -#ifdef __USE_FILE_OFFSET64 - unsigned char d_type; -#endif - char d_name[256]; /* We must not include limits.h! */ - }; - -#ifdef __USE_LARGEFILE64 -struct dirent64 - { - __ino64_t d_ino; - __off64_t d_off; - unsigned short int d_reclen; - unsigned char d_type; - char d_name[256]; /* We must not include limits.h! */ - }; -#endif - -#define d_fileno d_ino /* Backwards compatibility. */ - -#undef _DIRENT_HAVE_D_NAMLEN -#define _DIRENT_HAVE_D_RECLEN -#define _DIRENT_HAVE_D_OFF -#undef _DIRENT_HAVE_D_TYPE diff --git a/libc/sysdeps/linux/powerpc/bits/dlfcn.h b/libc/sysdeps/linux/powerpc/bits/dlfcn.h deleted file mode 100644 index 2ebee8fbf..000000000 --- a/libc/sysdeps/linux/powerpc/bits/dlfcn.h +++ /dev/null @@ -1,61 +0,0 @@ -/* System dependent definitions for run-time dynamic loading. - 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. */ - -#ifndef _DLFCN_H -# error "Never use <bits/dlfcn.h> directly; include <dlfcn.h> instead." -#endif - -/* The MODE argument to `dlopen' contains one of the following: */ -#define RTLD_LAZY 0x00001 /* Lazy function call binding. */ -#define RTLD_NOW 0x00002 /* Immediate function call binding. */ -#define RTLD_BINDING_MASK 0x3 /* Mask of binding time value. */ -#define RTLD_NOLOAD 0x00004 /* Do not load the object. */ - -/* If the following bit is set in the MODE argument to `dlopen', - the symbols of the loaded object and its dependencies are made - visible as if the object were linked directly into the program. */ -#define RTLD_GLOBAL 0x00100 - -/* Unix98 demands the following flag which is the inverse to RTLD_GLOBAL. - The implementation does this by default and so we can define the - value to zero. */ -#define RTLD_LOCAL 0 - -/* Do not delete object when closed. */ -#define RTLD_NODELETE 0x01000 - -#ifdef __USE_GNU -/* To support profiling of shared objects it is a good idea to call - the function found using `dlsym' using the following macro since - these calls do not use the PLT. But this would mean the dynamic - loader has no chance to find out when the function is called. The - macro applies the necessary magic so that profiling is possible. - Rewrite - foo = (*fctp) (arg1, arg2); - into - foo = DL_CALL_FCT (fctp, (arg1, arg2)); -*/ -# define DL_CALL_FCT(fctp, args) \ - (_dl_mcount_wrapper_check (fctp), (*(fctp)) args) - -/* This function calls the profiling functions. */ -__BEGIN_DECLS -extern void _dl_mcount_wrapper_check (void *__selfpc) __THROW; -__END_DECLS -#endif diff --git a/libc/sysdeps/linux/powerpc/bits/elfclass.h b/libc/sysdeps/linux/powerpc/bits/elfclass.h deleted file mode 100644 index 180227d9e..000000000 --- a/libc/sysdeps/linux/powerpc/bits/elfclass.h +++ /dev/null @@ -1,14 +0,0 @@ -/* This file specifies the native word size of the machine, which indicates - the ELF file class used for executables and shared objects on this - machine. */ - -#ifndef _LINK_H -# error "Never use <bits/elfclass.h> directly; include <link.h> instead." -#endif - -#include <bits/wordsize.h> - -#define __ELF_NATIVE_CLASS __WORDSIZE - -/* The entries in the .hash table always have a size of 32 bits. */ -typedef uint32_t Elf_Symndx; diff --git a/libc/sysdeps/linux/powerpc/bits/environments.h b/libc/sysdeps/linux/powerpc/bits/environments.h deleted file mode 100644 index c3829927b..000000000 --- a/libc/sysdeps/linux/powerpc/bits/environments.h +++ /dev/null @@ -1,75 +0,0 @@ -/* Copyright (C) 1999, 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. */ - -#ifndef _UNISTD_H -# error "Never include this file directly. Use <unistd.h> instead" -#endif - -#include <bits/wordsize.h> - -/* This header should define the following symbols under the described - situations. A value `1' means that the model is always supported, - `-1' means it is never supported. Undefined means it cannot be - statically decided. - - _POSIX_V6_ILP32_OFF32 32bit int, long, pointers, and off_t type - _POSIX_V6_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type - - _POSIX_V6_LP64_OFF32 64bit long and pointers and 32bit off_t type - _POSIX_V6_LPBIG_OFFBIG 64bit long and pointers and large off_t type - - The macros _XBS5_ILP32_OFF32, _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and - _XBS5_LPBIG_OFFBIG were used in previous versions of the Unix standard - and are available only for compatibility. -*/ - -#if __WORDSIZE == 64 - -/* We can never provide environments with 32-bit wide pointers. */ -# define _POSIX_V6_ILP32_OFF32 -1 -# define _POSIX_V6_ILP32_OFFBIG -1 -# define _XBS5_ILP32_OFF32 -1 -# define _XBS5_ILP32_OFFBIG -1 -/* We also have no use (for now) for an environment with bigger pointers - and offsets. */ -# define _POSIX_V6_LPBIG_OFFBIG -1 -# define _XBS5_LPBIG_OFFBIG -1 - -/* By default we have 64-bit wide `long int', pointers and `off_t'. */ -# define _POSIX_V6_LP64_OFF64 1 -# define _XBS5_LP64_OFF64 1 - -#else /* __WORDSIZE == 32 */ - -/* By default we have 32-bit wide `int', `long int', pointers and `off_t' - and all platforms support LFS. */ -# define _POSIX_V6_ILP32_OFF32 1 -# define _POSIX_V6_ILP32_OFFBIG 1 -# define _XBS5_ILP32_OFF32 1 -# define _XBS5_ILP32_OFFBIG 1 - -/* We optionally provide an environment with the above size but an 64-bit - side `off_t'. Therefore we don't define _XBS5_ILP32_OFFBIG. */ - -/* We can never provide environments with 64-bit wide pointers. */ -# define _POSIX_V6_LP64_OFF64 -1 -# define _POSIX_V6_LPBIG_OFFBIG -1 -# define _XBS5_LP64_OFF64 -1 -# define _XBS5_LPBIG_OFFBIG -1 - -#endif /* __WORDSIZE == 32 */ diff --git a/libc/sysdeps/linux/powerpc/bits/errno.h b/libc/sysdeps/linux/powerpc/bits/errno.h deleted file mode 100644 index e1300321d..000000000 --- a/libc/sysdeps/linux/powerpc/bits/errno.h +++ /dev/null @@ -1,66 +0,0 @@ -/* Error constants. Linux specific version. - Copyright (C) 1996, 1997, 1998, 1999 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. */ - -#ifdef _ERRNO_H - -# undef EDOM -# undef EILSEQ -# undef ERANGE -# include <linux/errno.h> - -/* Linux has no ENOTSUP error code. */ -# define ENOTSUP EOPNOTSUPP - -/* Linux also has no ECANCELED error code. Since it is not used here - we define it to an invalid value. */ -# define ECANCELED 125 - -# ifndef __ASSEMBLER__ - -__BEGIN_DECLS - -/* We now need a declaration of the `errno' variable. */ -extern int errno; - -/* Function to get address of global `errno' variable. */ -extern int *__errno_location (void) __THROW __attribute__ ((__const__)); - -# if defined _LIBC -/* We wouldn't need a special macro anymore but it is history. */ -# define __set_errno(val) (*__errno_location ()) = (val) -# endif /* _LIBC */ - -# if !defined _LIBC || defined _LIBC_REENTRANT -/* When using threads, errno is a per-thread value. */ -# define errno (*__errno_location ()) -# endif - -__END_DECLS - -# endif /* !__ASSEMBLER__ */ -#endif /* _ERRNO_H */ - -#if !defined _ERRNO_H && defined __need_Emath -/* This is ugly but the kernel header is not clean enough. We must - define only the values EDOM, EILSEQ and ERANGE in case __need_Emath is - defined. */ -# define EDOM 33 /* Math argument out of domain of function. */ -# define EILSEQ 84 /* Illegal byte sequence. */ -# define ERANGE 34 /* Math result not representable. */ -#endif /* !_ERRNO_H && __need_Emath */ diff --git a/libc/sysdeps/linux/powerpc/bits/huge_val.h b/libc/sysdeps/linux/powerpc/bits/huge_val.h deleted file mode 100644 index b33974364..000000000 --- a/libc/sysdeps/linux/powerpc/bits/huge_val.h +++ /dev/null @@ -1,103 +0,0 @@ -/* `HUGE_VAL' constants for IEEE 754 machines (where it is infinity). - Used by <stdlib.h> and <math.h> functions for overflow. - Copyright (C) 1992, 1995, 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 _MATH_H -# error "Never use <bits/huge_val.h> directly; include <math.h> instead." -#endif - -#include <features.h> - -/* IEEE positive infinity (-HUGE_VAL is negative infinity). */ - -#ifdef __GNUC__ - -# if __GNUC_PREREQ(2,96) - -# define HUGE_VAL (__extension__ 0x1.0p2047) - -# else - -# define HUGE_VAL \ - (__extension__ \ - ((union { unsigned __l __attribute__((__mode__(__DI__))); double __d; }) \ - { __l: 0x7ff0000000000000ULL }).__d) - -# endif - -#else /* not GCC */ - -# include <endian.h> - -typedef union { unsigned char __c[8]; double __d; } __huge_val_t; - -# if __BYTE_ORDER == __BIG_ENDIAN -# define __HUGE_VAL_bytes { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 } -# endif -# if __BYTE_ORDER == __LITTLE_ENDIAN -# define __HUGE_VAL_bytes { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f } -# endif - -static __huge_val_t __huge_val = { __HUGE_VAL_bytes }; -# define HUGE_VAL (__huge_val.__d) - -#endif /* GCC. */ - - -/* ISO C99 extensions: (float) HUGE_VALF and (long double) HUGE_VALL. */ - -#ifdef __USE_ISOC99 - -# ifdef __GNUC__ - -# if __GNUC_PREREQ(2,96) - -# define HUGE_VALF (__extension__ 0x1.0p255f) - -# else - -# define HUGE_VALF \ - (__extension__ \ - ((union { unsigned __l __attribute__((__mode__(__SI__))); float __d; }) \ - { __l: 0x7f800000UL }).__d) - -# endif - -# else /* not GCC */ - -typedef union { unsigned char __c[4]; float __f; } __huge_valf_t; - -# if __BYTE_ORDER == __BIG_ENDIAN -# define __HUGE_VALF_bytes { 0x7f, 0x80, 0, 0 } -# endif -# if __BYTE_ORDER == __LITTLE_ENDIAN -# define __HUGE_VALF_bytes { 0, 0, 0x80, 0x7f } -# endif - -static __huge_valf_t __huge_valf = { __HUGE_VALF_bytes }; -# define HUGE_VALF (__huge_valf.__f) - -# endif /* GCC. */ - - -/* Generally there is no separate `long double' format and it is the - same as `double'. */ -# define HUGE_VALL HUGE_VAL - -#endif /* __USE_ISOC99. */ diff --git a/libc/sysdeps/linux/powerpc/bits/in.h b/libc/sysdeps/linux/powerpc/bits/in.h deleted file mode 100644 index e6cf57574..000000000 --- a/libc/sysdeps/linux/powerpc/bits/in.h +++ /dev/null @@ -1,141 +0,0 @@ -/* Copyright (C) 1991-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. */ - -/* Linux version. */ - -#ifndef _NETINET_IN_H -# error "Never use <bits/in.h> directly; include <netinet/in.h> instead." -#endif - -/* Options for use with `getsockopt' and `setsockopt' at the IP level. - The first word in the comment at the right is the data type used; - "bool" means a boolean value stored in an `int'. */ -#define IP_TOS 1 /* int; IP type of service and precedence. */ -#define IP_TTL 2 /* int; IP time to live. */ -#define IP_HDRINCL 3 /* int; Header is included with data. */ -#define IP_OPTIONS 4 /* ip_opts; IP per-packet options. */ -#define IP_ROUTER_ALERT 5 /* bool */ -#define IP_RECVOPTS 6 /* bool */ -#define IP_RETOPTS 7 /* bool */ -#define IP_PKTINFO 8 /* bool */ -#define IP_PKTOPTIONS 9 -#define IP_PMTUDISC 10 /* obsolete name? */ -#define IP_MTU_DISCOVER 10 /* int; see below */ -#define IP_RECVERR 11 /* bool */ -#define IP_RECVTTL 12 /* bool */ -#define IP_RECVTOS 13 /* bool */ -#define IP_MULTICAST_IF 32 /* in_addr; set/get IP multicast i/f */ -#define IP_MULTICAST_TTL 33 /* u_char; set/get IP multicast ttl */ -#define IP_MULTICAST_LOOP 34 /* i_char; set/get IP multicast loopback */ -#define IP_ADD_MEMBERSHIP 35 /* ip_mreq; add an IP group membership */ -#define IP_DROP_MEMBERSHIP 36 /* ip_mreq; drop an IP group membership */ - -/* For BSD compatibility. */ -#define IP_RECVRETOPTS IP_RETOPTS - -/* IP_MTU_DISCOVER arguments. */ -#define IP_PMTUDISC_DONT 0 /* Never send DF frames. */ -#define IP_PMTUDISC_WANT 1 /* Use per route hints. */ -#define IP_PMTUDISC_DO 2 /* Always DF. */ - -/* To select the IP level. */ -#define SOL_IP 0 - -#define IP_DEFAULT_MULTICAST_TTL 1 -#define IP_DEFAULT_MULTICAST_LOOP 1 -#define IP_MAX_MEMBERSHIPS 20 - -/* Structure used to describe IP options for IP_OPTIONS. The `ip_dst' - field is used for the first-hop gateway when using a source route - (this gets put into the header proper). */ -struct ip_opts - { - struct in_addr ip_dst; /* First hop; zero without source route. */ - char ip_opts[40]; /* Actually variable in size. */ - }; - -/* Structure used for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP. */ -struct ip_mreq - { - struct in_addr imr_multiaddr; /* IP multicast address of group */ - struct in_addr imr_interface; /* local IP address of interface */ - }; - -/* As above but including interface specification by index. */ -struct ip_mreqn - { - struct in_addr imr_multiaddr; /* IP multicast address of group */ - struct in_addr imr_address; /* local IP address of interface */ - int imr_ifindex; /* Interface index */ - }; - -/* Structure used for IP_PKTINFO. */ -struct in_pktinfo - { - int ipi_ifindex; /* Interface index */ - struct in_addr ipi_spec_dst; /* Routing destination address */ - struct in_addr ipi_addr; /* Header destination address */ - }; - -/* Options for use with `getsockopt' and `setsockopt' at the IPv6 level. - The first word in the comment at the right is the data type used; - "bool" means a boolean value stored in an `int'. */ -#define IPV6_ADDRFORM 1 -#define IPV6_PKTINFO 2 -#define IPV6_HOPOPTS 3 -#define IPV6_DSTOPTS 4 -#define IPV6_RTHDR 5 -#define IPV6_PKTOPTIONS 6 -#define IPV6_CHECKSUM 7 -#define IPV6_HOPLIMIT 8 -#define IPV6_NEXTHOP 9 -#define IPV6_AUTHHDR 10 -#define IPV6_UNICAST_HOPS 16 -#define IPV6_MULTICAST_IF 17 -#define IPV6_MULTICAST_HOPS 18 -#define IPV6_MULTICAST_LOOP 19 -#define IPV6_JOIN_GROUP 20 -#define IPV6_LEAVE_GROUP 21 -#define IPV6_ROUTER_ALERT 22 -#define IPV6_MTU_DISCOVER 23 -#define IPV6_MTU 24 -#define IPV6_RECVERR 25 - -#define SCM_SRCRT IPV6_RXSRCRT - -/* Obsolete synonyms for the above. */ -#define IPV6_RXHOPOPTS IPV6_HOPOPTS -#define IPV6_RXDSTOPTS IPV6_DSTOPTS -#define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP -#define IPV6_DROP_MEMBERSHIP IPV6_LEAVE_GROUP - - -/* IPV6_MTU_DISCOVER values. */ -#define IPV6_PMTUDISC_DONT 0 /* Never send DF frames. */ -#define IPV6_PMTUDISC_WANT 1 /* Use per route hints. */ -#define IPV6_PMTUDISC_DO 2 /* Always DF. */ - -/* Socket level values for IPv6. */ -#define SOL_IPV6 41 -#define SOL_ICMPV6 58 - -/* Routing header options for IPv6. */ -#define IPV6_RTHDR_LOOSE 0 /* Hop doesn't need to be neighbour. */ -#define IPV6_RTHDR_STRICT 1 /* Hop must be a neighbour. */ - -#define IPV6_RTHDR_TYPE_0 0 /* IPv6 Routing header type 0. */ diff --git a/libc/sysdeps/linux/powerpc/bits/initspin.h b/libc/sysdeps/linux/powerpc/bits/initspin.h deleted file mode 100644 index af19d44e6..000000000 --- a/libc/sysdeps/linux/powerpc/bits/initspin.h +++ /dev/null @@ -1,28 +0,0 @@ -/* Generic definitions for spinlock initializers. - Copyright (C) 2000, 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* Initial value of a spinlock. Most platforms should use zero, - unless they only implement a "test and clear" operation instead of - the usual "test and set". */ -#define __LT_SPINLOCK_INIT 0 - -/* Macros for lock initializers, using the above definition. */ -#define __LOCK_INITIALIZER { 0, __LT_SPINLOCK_INIT } -#define __ALT_LOCK_INITIALIZER { 0, __LT_SPINLOCK_INIT } -#define __ATOMIC_INITIALIZER { 0, __LT_SPINLOCK_INIT } diff --git a/libc/sysdeps/linux/powerpc/bits/ioctls.h b/libc/sysdeps/linux/powerpc/bits/ioctls.h deleted file mode 100644 index b49ca2076..000000000 --- a/libc/sysdeps/linux/powerpc/bits/ioctls.h +++ /dev/null @@ -1,108 +0,0 @@ -/* Copyright (C) 1996, 1997, 1998 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 _SYS_IOCTL_H -# error "Never use <bits/ioctls.h> directly; include <sys/ioctl.h> instead." -#endif - -/* Use the definitions from the kernel header files. */ -#include <asm/ioctls.h> - -/* Routing table calls. */ -#define SIOCADDRT 0x890B /* add routing table entry */ -#define SIOCDELRT 0x890C /* delete routing table entry */ -#define SIOCRTMSG 0x890D /* call to routing system */ - -/* Socket configuration controls. */ -#define SIOCGIFNAME 0x8910 /* get iface name */ -#define SIOCSIFLINK 0x8911 /* set iface channel */ -#define SIOCGIFCONF 0x8912 /* get iface list */ -#define SIOCGIFFLAGS 0x8913 /* get flags */ -#define SIOCSIFFLAGS 0x8914 /* set flags */ -#define SIOCGIFADDR 0x8915 /* get PA address */ -#define SIOCSIFADDR 0x8916 /* set PA address */ -#define SIOCGIFDSTADDR 0x8917 /* get remote PA address */ -#define SIOCSIFDSTADDR 0x8918 /* set remote PA address */ -#define SIOCGIFBRDADDR 0x8919 /* get broadcast PA address */ -#define SIOCSIFBRDADDR 0x891a /* set broadcast PA address */ -#define SIOCGIFNETMASK 0x891b /* get network PA mask */ -#define SIOCSIFNETMASK 0x891c /* set network PA mask */ -#define SIOCGIFMETRIC 0x891d /* get metric */ -#define SIOCSIFMETRIC 0x891e /* set metric */ -#define SIOCGIFMEM 0x891f /* get memory address (BSD) */ -#define SIOCSIFMEM 0x8920 /* set memory address (BSD) */ -#define SIOCGIFMTU 0x8921 /* get MTU size */ -#define SIOCSIFMTU 0x8922 /* set MTU size */ -#define SIOCSIFHWADDR 0x8924 /* set hardware address */ -#define SIOCGIFENCAP 0x8925 /* get/set encapsulations */ -#define SIOCSIFENCAP 0x8926 -#define SIOCGIFHWADDR 0x8927 /* Get hardware address */ -#define SIOCGIFSLAVE 0x8929 /* Driver slaving support */ -#define SIOCSIFSLAVE 0x8930 -#define SIOCADDMULTI 0x8931 /* Multicast address lists */ -#define SIOCDELMULTI 0x8932 -#define SIOCGIFINDEX 0x8933 /* name -> if_index mapping */ -#define SIOGIFINDEX SIOCGIFINDEX /* misprint compatibility :-) */ -#define SIOCSIFPFLAGS 0x8934 /* set/get extended flags set */ -#define SIOCGIFPFLAGS 0x8935 -#define SIOCDIFADDR 0x8936 /* delete PA address */ -#define SIOCSIFHWBROADCAST 0x8937 /* set hardware broadcast addr */ -#define SIOCGIFCOUNT 0x8938 /* get number of devices */ - -#define SIOCGIFBR 0x8940 /* Bridging support */ -#define SIOCSIFBR 0x8941 /* Set bridging options */ - -#define SIOCGIFTXQLEN 0x8942 /* Get the tx queue length */ -#define SIOCSIFTXQLEN 0x8943 /* Set the tx queue length */ - - -/* ARP cache control calls. */ - /* 0x8950 - 0x8952 * obsolete calls, don't re-use */ -#define SIOCDARP 0x8953 /* delete ARP table entry */ -#define SIOCGARP 0x8954 /* get ARP table entry */ -#define SIOCSARP 0x8955 /* set ARP table entry */ - -/* RARP cache control calls. */ -#define SIOCDRARP 0x8960 /* delete RARP table entry */ -#define SIOCGRARP 0x8961 /* get RARP table entry */ -#define SIOCSRARP 0x8962 /* set RARP table entry */ - -/* Driver configuration calls */ - -#define SIOCGIFMAP 0x8970 /* Get device parameters */ -#define SIOCSIFMAP 0x8971 /* Set device parameters */ - -/* DLCI configuration calls */ - -#define SIOCADDDLCI 0x8980 /* Create new DLCI device */ -#define SIOCDELDLCI 0x8981 /* Delete DLCI device */ - -/* Device private ioctl calls. */ - -/* These 16 ioctls are available to devices via the do_ioctl() device - vector. Each device should include this file and redefine these - names as their own. Because these are device dependent it is a good - idea _NOT_ to issue them to random objects and hope. */ - -#define SIOCDEVPRIVATE 0x89F0 /* to 89FF */ - -/* - * These 16 ioctl calls are protocol private - */ - -#define SIOCPROTOPRIVATE 0x89E0 /* to 89EF */ diff --git a/libc/sysdeps/linux/powerpc/bits/libc-lock.h b/libc/sysdeps/linux/powerpc/bits/libc-lock.h deleted file mode 100644 index dbd9cc14f..000000000 --- a/libc/sysdeps/linux/powerpc/bits/libc-lock.h +++ /dev/null @@ -1,317 +0,0 @@ -/* libc-internal interface for mutex locks. LinuxThreads version. - Copyright (C) 1996,1997,1998,1999,2000,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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _BITS_LIBC_LOCK_H -#define _BITS_LIBC_LOCK_H 1 - -#include <pthread.h> - -/* Mutex type. */ -#ifdef _LIBC -typedef pthread_mutex_t __libc_lock_t; -typedef pthread_rwlock_t __libc_rwlock_t; -#else -typedef struct __libc_lock_opaque__ __libc_lock_t; -typedef struct __libc_rwlock_opaque__ __libc_rwlock_t; -#endif - -/* Type for key to thread-specific data. */ -typedef pthread_key_t __libc_key_t; - -/* Define a lock variable NAME with storage class CLASS. The lock must be - initialized with __libc_lock_init before it can be used (or define it - with __libc_lock_define_initialized, below). Use `extern' for CLASS to - declare a lock defined in another module. In public structure - definitions you must use a pointer to the lock structure (i.e., NAME - begins with a `*'), because its storage size will not be known outside - of libc. */ -#define __libc_lock_define(CLASS,NAME) \ - CLASS __libc_lock_t NAME; -#define __libc_rwlock_define(CLASS,NAME) \ - CLASS __libc_rwlock_t NAME; - -/* Define an initialized lock variable NAME with storage class CLASS. - - For the C library we take a deeper look at the initializer. For - this implementation all fields are initialized to zero. Therefore - we don't initialize the variable which allows putting it into the - BSS section. (Except on PA-RISC and other odd architectures, where - initialized locks must be set to one due to the lack of normal - atomic operations.) */ - -#if __LT_SPINLOCK_INIT == 0 -# define __libc_lock_define_initialized(CLASS,NAME) \ - CLASS __libc_lock_t NAME; -#else -# define __libc_lock_define_initialized(CLASS,NAME) \ - CLASS __libc_lock_t NAME = PTHREAD_MUTEX_INITIALIZER; -#endif - -#define __libc_rwlock_define_initialized(CLASS,NAME) \ - CLASS __libc_rwlock_t NAME = PTHREAD_RWLOCK_INITIALIZER; - -/* Define an initialized recursive lock variable NAME with storage - class CLASS. */ -#define __libc_lock_define_initialized_recursive(CLASS,NAME) \ - CLASS __libc_lock_t NAME = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; - -/* Initialize the named lock variable, leaving it in a consistent, unlocked - state. */ -#define __libc_lock_init(NAME) \ - (__pthread_mutex_init != NULL ? __pthread_mutex_init (&(NAME), NULL) : 0); -#define __libc_rwlock_init(NAME) \ - (__pthread_rwlock_init != NULL ? __pthread_rwlock_init (&(NAME), NULL) : 0); - -/* Same as last but this time we initialize a recursive mutex. */ -#define __libc_lock_init_recursive(NAME) \ - do { \ - if (__pthread_mutex_init != NULL) \ - { \ - pthread_mutexattr_t __attr; \ - __pthread_mutexattr_init (&__attr); \ - __pthread_mutexattr_settype (&__attr, PTHREAD_MUTEX_RECURSIVE_NP); \ - __pthread_mutex_init (&(NAME), &__attr); \ - __pthread_mutexattr_destroy (&__attr); \ - } \ - } while (0); - -/* Finalize the named lock variable, which must be locked. It cannot be - used again until __libc_lock_init is called again on it. This must be - called on a lock variable before the containing storage is reused. */ -#define __libc_lock_fini(NAME) \ - (__pthread_mutex_destroy != NULL ? __pthread_mutex_destroy (&(NAME)) : 0); -#define __libc_rwlock_fini(NAME) \ - (__pthread_rwlock_destroy != NULL ? __pthread_rwlock_destroy (&(NAME)) : 0); - -/* Finalize recursive named lock. */ -#define __libc_lock_fini_recursive(NAME) __libc_lock_fini (NAME) - -/* Lock the named lock variable. */ -#define __libc_lock_lock(NAME) \ - (__pthread_mutex_lock != NULL ? __pthread_mutex_lock (&(NAME)) : 0); -#define __libc_rwlock_rdlock(NAME) \ - (__pthread_rwlock_rdlock != NULL ? __pthread_rwlock_rdlock (&(NAME)) : 0); -#define __libc_rwlock_wrlock(NAME) \ - (__pthread_rwlock_wrlock != NULL ? __pthread_rwlock_wrlock (&(NAME)) : 0); - -/* Lock the recursive named lock variable. */ -#define __libc_lock_lock_recursive(NAME) __libc_lock_lock (NAME) - -/* Try to lock the named lock variable. */ -#define __libc_lock_trylock(NAME) \ - (__pthread_mutex_trylock != NULL ? __pthread_mutex_trylock (&(NAME)) : 0) -#define __libc_rwlock_tryrdlock(NAME) \ - (__pthread_rwlock_tryrdlock != NULL \ - ? __pthread_rwlock_tryrdlock (&(NAME)) : 0) -#define __libc_rwlock_trywrlock(NAME) \ - (__pthread_rwlock_trywrlock != NULL \ - ? __pthread_rwlock_trywrlock (&(NAME)) : 0) - -/* Try to lock the recursive named lock variable. */ -#define __libc_lock_trylock_recursive(NAME) __libc_lock_trylock (NAME) - -/* Unlock the named lock variable. */ -#define __libc_lock_unlock(NAME) \ - (__pthread_mutex_unlock != NULL ? __pthread_mutex_unlock (&(NAME)) : 0); -#define __libc_rwlock_unlock(NAME) \ - (__pthread_rwlock_unlock != NULL ? __pthread_rwlock_unlock (&(NAME)) : 0); - -/* Unlock the recursive named lock variable. */ -#define __libc_lock_unlock_recursive(NAME) __libc_lock_unlock (NAME) - - -/* Define once control variable. */ -#if PTHREAD_ONCE_INIT == 0 -/* Special case for static variables where we can avoid the initialization - if it is zero. */ -# define __libc_once_define(CLASS, NAME) \ - CLASS pthread_once_t NAME -#else -# define __libc_once_define(CLASS, NAME) \ - CLASS pthread_once_t NAME = PTHREAD_ONCE_INIT -#endif - -/* Call handler iff the first call. */ -#define __libc_once(ONCE_CONTROL, INIT_FUNCTION) \ - do { \ - if (__pthread_once != NULL) \ - __pthread_once (&(ONCE_CONTROL), (INIT_FUNCTION)); \ - else if ((ONCE_CONTROL) == PTHREAD_ONCE_INIT) { \ - INIT_FUNCTION (); \ - (ONCE_CONTROL) = !PTHREAD_ONCE_INIT; \ - } \ - } while (0) - - -/* Start critical region with cleanup. */ -#define __libc_cleanup_region_start(FCT, ARG) \ - { struct _pthread_cleanup_buffer _buffer; \ - int _avail = _pthread_cleanup_push_defer != NULL; \ - if (_avail) { \ - _pthread_cleanup_push_defer (&_buffer, (FCT), (ARG)); \ - } - -/* End critical region with cleanup. */ -#define __libc_cleanup_region_end(DOIT) \ - if (_avail) { \ - _pthread_cleanup_pop_restore (&_buffer, (DOIT)); \ - } \ - } - -/* Sometimes we have to exit the block in the middle. */ -#define __libc_cleanup_end(DOIT) \ - if (_avail) { \ - _pthread_cleanup_pop_restore (&_buffer, (DOIT)); \ - } - -/* Create thread-specific key. */ -#define __libc_key_create(KEY, DESTRUCTOR) \ - (__pthread_key_create != NULL ? __pthread_key_create (KEY, DESTRUCTOR) : 1) - -/* Get thread-specific data. */ -#define __libc_getspecific(KEY) \ - (__pthread_getspecific != NULL ? __pthread_getspecific (KEY) : NULL) - -/* Set thread-specific data. */ -#define __libc_setspecific(KEY, VALUE) \ - (__pthread_setspecific != NULL ? __pthread_setspecific (KEY, VALUE) : 0) - - -/* Register handlers to execute before and after `fork'. */ -#define __libc_atfork(PREPARE, PARENT, CHILD) \ - (__pthread_atfork != NULL ? __pthread_atfork (PREPARE, PARENT, CHILD) : 0) - -/* Functions that are used by this file and are internal to the GNU C - library. */ - -extern int __pthread_mutex_init (pthread_mutex_t *__mutex, - __const pthread_mutexattr_t *__mutex_attr); - -extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex); - -extern int __pthread_mutex_trylock (pthread_mutex_t *__mutex); - -extern int __pthread_mutex_lock (pthread_mutex_t *__mutex); - -extern int __pthread_mutex_unlock (pthread_mutex_t *__mutex); - -extern int __pthread_mutexattr_init (pthread_mutexattr_t *__attr); - -extern int __pthread_mutexattr_destroy (pthread_mutexattr_t *__attr); - -extern int __pthread_mutexattr_settype (pthread_mutexattr_t *__attr, - int __kind); - -#ifdef __USE_UNIX98 -extern int __pthread_rwlock_init (pthread_rwlock_t *__rwlock, - __const pthread_rwlockattr_t *__attr); - -extern int __pthread_rwlock_destroy (pthread_rwlock_t *__rwlock); - -extern int __pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock); - -extern int __pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock); - -extern int __pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock); - -extern int __pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock); - -extern int __pthread_rwlock_unlock (pthread_rwlock_t *__rwlock); -#endif - -extern int __pthread_key_create (pthread_key_t *__key, - void (*__destr_function) (void *)); - -extern int __pthread_setspecific (pthread_key_t __key, - __const void *__pointer); - -extern void *__pthread_getspecific (pthread_key_t __key); - -extern int __pthread_once (pthread_once_t *__once_control, - void (*__init_routine) (void)); - -extern int __pthread_atfork (void (*__prepare) (void), - void (*__parent) (void), - void (*__child) (void)); - - - -/* Make the pthread functions weak so that we can elide them from - single-threaded processes. */ -#ifndef __NO_WEAK_PTHREAD_ALIASES -# ifdef weak_extern -# if _LIBC -# include <bp-sym.h> -# else -# define BP_SYM (sym) sym -# endif -weak_extern (BP_SYM (__pthread_mutex_init)) -weak_extern (BP_SYM (__pthread_mutex_destroy)) -weak_extern (BP_SYM (__pthread_mutex_lock)) -weak_extern (BP_SYM (__pthread_mutex_trylock)) -weak_extern (BP_SYM (__pthread_mutex_unlock)) -weak_extern (BP_SYM (__pthread_mutexattr_init)) -weak_extern (BP_SYM (__pthread_mutexattr_destroy)) -weak_extern (BP_SYM (__pthread_mutexattr_settype)) -weak_extern (BP_SYM (__pthread_rwlock_init)) -weak_extern (BP_SYM (__pthread_rwlock_destroy)) -weak_extern (BP_SYM (__pthread_rwlock_rdlock)) -weak_extern (BP_SYM (__pthread_rwlock_tryrdlock)) -weak_extern (BP_SYM (__pthread_rwlock_wrlock)) -weak_extern (BP_SYM (__pthread_rwlock_trywrlock)) -weak_extern (BP_SYM (__pthread_rwlock_unlock)) -weak_extern (BP_SYM (__pthread_key_create)) -weak_extern (BP_SYM (__pthread_setspecific)) -weak_extern (BP_SYM (__pthread_getspecific)) -weak_extern (BP_SYM (__pthread_once)) -weak_extern (__pthread_initialize) -weak_extern (__pthread_atfork) -weak_extern (BP_SYM (_pthread_cleanup_push_defer)) -weak_extern (BP_SYM (_pthread_cleanup_pop_restore)) -# else -# pragma weak __pthread_mutex_init -# pragma weak __pthread_mutex_destroy -# pragma weak __pthread_mutex_lock -# pragma weak __pthread_mutex_trylock -# pragma weak __pthread_mutex_unlock -# pragma weak __pthread_mutexattr_init -# pragma weak __pthread_mutexattr_destroy -# pragma weak __pthread_mutexattr_settype -# pragma weak __pthread_rwlock_destroy -# pragma weak __pthread_rwlock_rdlock -# pragma weak __pthread_rwlock_tryrdlock -# pragma weak __pthread_rwlock_wrlock -# pragma weak __pthread_rwlock_trywrlock -# pragma weak __pthread_rwlock_unlock -# pragma weak __pthread_key_create -# pragma weak __pthread_setspecific -# pragma weak __pthread_getspecific -# pragma weak __pthread_once -# pragma weak __pthread_initialize -# pragma weak __pthread_atfork -# pragma weak _pthread_cleanup_push_defer -# pragma weak _pthread_cleanup_pop_restore -# endif -#endif - -/* We need portable names for some functions. E.g., when they are - used as argument to __libc_cleanup_region_start. */ -#define __libc_mutex_unlock __pthread_mutex_unlock - -#endif /* bits/libc-lock.h */ diff --git a/libc/sysdeps/linux/powerpc/bits/local_lim.h b/libc/sysdeps/linux/powerpc/bits/local_lim.h deleted file mode 100644 index 0a7c83706..000000000 --- a/libc/sysdeps/linux/powerpc/bits/local_lim.h +++ /dev/null @@ -1,77 +0,0 @@ -/* Minimum guaranteed maximum values for system limits. Linux version. - Copyright (C) 1993, 94, 95, 96, 97, 98, 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* The kernel header pollutes the namespace with the NR_OPEN symbol - and defines LINK_MAX although filesystems have different maxima. A - similar thing is true for OPEN_MAX: the limit can be changed at - runtime and therefore the macro must not be defined. Remove this - after including the header if necessary. */ -#ifndef NR_OPEN -# define __undef_NR_OPEN -#endif -#ifndef LINK_MAX -# define __undef_LINK_MAX -#endif -#ifndef OPEN_MAX -# define __undef_OPEN_MAX -#endif - -/* The kernel sources contain a file with all the needed information. */ -#include <linux/limits.h> - -/* Have to remove NR_OPEN? */ -#ifdef __undef_NR_OPEN -# undef NR_OPEN -# undef __undef_NR_OPEN -#endif -/* Have to remove LINK_MAX? */ -#ifdef __undef_LINK_MAX -# undef LINK_MAX -# undef __undef_LINK_MAX -#endif -/* Have to remove OPEN_MAX? */ -#ifdef __undef_OPEN_MAX -# undef OPEN_MAX -# undef __undef_OPEN_MAX -#endif - -/* The number of data keys per process. */ -#define _POSIX_THREAD_KEYS_MAX 128 -/* This is the value this implementation supports. */ -#define PTHREAD_KEYS_MAX 1024 - -/* Controlling the iterations of destructors for thread-specific data. */ -#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 -/* Number of iterations this implementation does. */ -#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS - -/* The number of threads per process. */ -#define _POSIX_THREAD_THREADS_MAX 64 -/* This is the value this implementation supports. */ -#define PTHREAD_THREADS_MAX 1024 - -/* Maximum amount by which a process can descrease its asynchronous I/O - priority level. */ -#define AIO_PRIO_DELTA_MAX 20 - -/* Minimum size for a thread. We are free to choose a reasonable value. */ -#define PTHREAD_STACK_MIN 16384 - -/* Maximum number of POSIX timers available. */ -#define TIMER_MAX 256 diff --git a/libc/sysdeps/linux/powerpc/bits/locale.h b/libc/sysdeps/linux/powerpc/bits/locale.h deleted file mode 100644 index 50064b53e..000000000 --- a/libc/sysdeps/linux/powerpc/bits/locale.h +++ /dev/null @@ -1,44 +0,0 @@ -/* Definition of locale category symbol values. - Copyright (C) 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. */ - -#if !defined _LOCALE_H && !defined _LANGINFO_H -# error "Never use <bits/locale.h> directly; include <locale.h> instead." -#endif - -#ifndef _BITS_LOCALE_H -#define _BITS_LOCALE_H 1 - -enum -{ - __LC_CTYPE = 0, - __LC_NUMERIC = 1, - __LC_TIME = 2, - __LC_COLLATE = 3, - __LC_MONETARY = 4, - __LC_MESSAGES = 5, - __LC_ALL = 6, - __LC_PAPER = 7, - __LC_NAME = 8, - __LC_ADDRESS = 9, - __LC_TELEPHONE = 10, - __LC_MEASUREMENT = 11, - __LC_IDENTIFICATION = 12 -}; - -#endif /* bits/locale.h */ diff --git a/libc/sysdeps/linux/powerpc/bits/mathcalls.h b/libc/sysdeps/linux/powerpc/bits/mathcalls.h deleted file mode 100644 index c1181f737..000000000 --- a/libc/sysdeps/linux/powerpc/bits/mathcalls.h +++ /dev/null @@ -1,333 +0,0 @@ -/* Prototype declarations for math functions; helper file for <math.h>. - Copyright (C) 1996,1997,1998,1999,2000,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 <math.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,[_r], (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,[_r], (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. - - Note that there must be no whitespace before the argument passed for - NAME, to make token pasting work with -traditional. */ - -#ifndef _MATH_H - #error "Never include <bits/mathcalls.h> directly; include <math.h> instead." -#endif - - -/* Trigonometric functions. */ - -/* Arc cosine of X. */ -__MATHCALL (acos,, (_Mdouble_ __x)); -/* Arc sine of X. */ -__MATHCALL (asin,, (_Mdouble_ __x)); -/* Arc tangent of X. */ -__MATHCALL (atan,, (_Mdouble_ __x)); -/* Arc tangent of Y/X. */ -__MATHCALL (atan2,, (_Mdouble_ __y, _Mdouble_ __x)); - -/* Cosine of X. */ -__MATHCALL (cos,, (_Mdouble_ __x)); -/* Sine of X. */ -__MATHCALL (sin,, (_Mdouble_ __x)); -/* Tangent of X. */ -__MATHCALL (tan,, (_Mdouble_ __x)); - -#ifdef __USE_GNU -/* Cosine and sine of X. */ -__MATHDECL (void,sincos,, - (_Mdouble_ __x, _Mdouble_ *__sinx, _Mdouble_ *__cosx)); -#endif - -/* Hyperbolic functions. */ - -/* Hyperbolic cosine of X. */ -__MATHCALL (cosh,, (_Mdouble_ __x)); -/* Hyperbolic sine of X. */ -__MATHCALL (sinh,, (_Mdouble_ __x)); -/* Hyperbolic tangent of X. */ -__MATHCALL (tanh,, (_Mdouble_ __x)); - -#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 -/* Hyperbolic arc cosine of X. */ -__MATHCALL (acosh,, (_Mdouble_ __x)); -/* Hyperbolic arc sine of X. */ -__MATHCALL (asinh,, (_Mdouble_ __x)); -/* Hyperbolic arc tangent of X. */ -__MATHCALL (atanh,, (_Mdouble_ __x)); -#endif - -/* Exponential and logarithmic functions. */ - -/* Exponential function of X. */ -__MATHCALL (exp,, (_Mdouble_ __x)); - -#ifdef __USE_GNU -/* A function missing in all standards: compute exponent to base ten. */ -__MATHCALL (exp10,, (_Mdouble_ __x)); -/* Another name occasionally used. */ -__MATHCALL (pow10,, (_Mdouble_ __x)); -#endif - -/* Break VALUE into a normalized fraction and an integral power of 2. */ -__MATHCALL (frexp,, (_Mdouble_ __x, int *__exponent)); - -/* X times (two to the EXP power). */ -__MATHCALL (ldexp,, (_Mdouble_ __x, int __exponent)); - -/* Natural logarithm of X. */ -__MATHCALL (log,, (_Mdouble_ __x)); - -/* Base-ten logarithm of X. */ -__MATHCALL (log10,, (_Mdouble_ __x)); - -/* Break VALUE into integral and fractional parts. */ -__MATHCALL (modf,, (_Mdouble_ __x, _Mdouble_ *__iptr)); - -#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 -/* Return exp(X) - 1. */ -__MATHCALL (expm1,, (_Mdouble_ __x)); - -/* Return log(1 + X). */ -__MATHCALL (log1p,, (_Mdouble_ __x)); - -/* Return the base 2 signed integral exponent of X. */ -__MATHCALL (logb,, (_Mdouble_ __x)); -#endif - -#ifdef __USE_ISOC99 -/* Compute base-2 exponential of X. */ -__MATHCALL (exp2,, (_Mdouble_ __x)); - -/* Compute base-2 logarithm of X. */ -__MATHCALL (log2,, (_Mdouble_ __x)); -#endif - - -/* Power functions. */ - -/* Return X to the Y power. */ -__MATHCALL (pow,, (_Mdouble_ __x, _Mdouble_ __y)); - -/* Return the square root of X. */ -__MATHCALL (sqrt,, (_Mdouble_ __x)); - -#if defined __USE_MISC || defined __USE_XOPEN || defined __USE_ISOC99 -/* Return `sqrt(X*X + Y*Y)'. */ -__MATHCALL (hypot,, (_Mdouble_ __x, _Mdouble_ __y)); -#endif - -#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 -/* Return the cube root of X. */ -__MATHCALL (cbrt,, (_Mdouble_ __x)); -#endif - - -/* Nearest integer, absolute value, and remainder functions. */ - -/* Smallest integral value not less than X. */ -__MATHCALL (ceil,, (_Mdouble_ __x)); - -/* Absolute value of X. */ -__MATHCALLX (fabs,, (_Mdouble_ __x), (__const__)); - -/* Largest integer not greater than X. */ -__MATHCALL (floor,, (_Mdouble_ __x)); - -/* Floating-point modulo remainder of X/Y. */ -__MATHCALL (fmod,, (_Mdouble_ __x, _Mdouble_ __y)); - - -/* Return 0 if VALUE is finite or NaN, +1 if it - is +Infinity, -1 if it is -Infinity. */ -__MATHDECL_1 (int,__isinf,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -/* Return nonzero if VALUE is finite and not NaN. */ -__MATHDECL_1 (int,__finite,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -#ifdef __USE_MISC -/* Return 0 if VALUE is finite or NaN, +1 if it - is +Infinity, -1 if it is -Infinity. */ -__MATHDECL_1 (int,isinf,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -/* Return nonzero if VALUE is finite and not NaN. */ -__MATHDECL_1 (int,finite,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -/* Return the remainder of X/Y. */ -__MATHCALL (drem,, (_Mdouble_ __x, _Mdouble_ __y)); - - -/* Return the fractional part of X after dividing out `ilogb (X)'. */ -__MATHCALL (significand,, (_Mdouble_ __x)); -#endif /* Use misc. */ - -#if defined __USE_MISC || defined __USE_ISOC99 -/* Return X with its signed changed to Y's. */ -__MATHCALLX (copysign,, (_Mdouble_ __x, _Mdouble_ __y), (__const__)); -#endif - -#ifdef __USE_ISOC99 -/* Return representation of NaN for double type. */ -__MATHCALLX (nan,, (__const char *__tagb), (__const__)); -#endif - - -/* Return nonzero if VALUE is not a number. */ -__MATHDECL_1 (int,__isnan,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -#if defined __USE_MISC || defined __USE_XOPEN -/* Return nonzero if VALUE is not a number. */ -__MATHDECL_1 (int,isnan,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -/* Bessel functions. */ -__MATHCALL (j0,, (_Mdouble_)); -__MATHCALL (j1,, (_Mdouble_)); -__MATHCALL (jn,, (int, _Mdouble_)); -__MATHCALL (y0,, (_Mdouble_)); -__MATHCALL (y1,, (_Mdouble_)); -__MATHCALL (yn,, (int, _Mdouble_)); -#endif - - -#if defined __USE_MISC || defined __USE_XOPEN || defined __USE_ISOC99 -/* Error and gamma functions. */ -__MATHCALL (erf,, (_Mdouble_)); -__MATHCALL (erfc,, (_Mdouble_)); -__MATHCALL (lgamma,, (_Mdouble_)); -#endif - -#ifdef __USE_ISOC99 -__MATHCALL (tgamma,, (_Mdouble_)); -#endif - -#if defined __USE_MISC || defined __USE_XOPEN -/* Obsolete alias for `lgamma'. */ -__MATHCALL (gamma,, (_Mdouble_)); -#endif - -#ifdef __USE_MISC -/* Reentrant version of lgamma. This function uses the global variable - `signgam'. The reentrant version instead takes a pointer and stores - the value through it. */ -__MATHCALL (lgamma,_r, (_Mdouble_, int *__signgamp)); -#endif - - -#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 -/* Return the integer nearest X in the direction of the - prevailing rounding mode. */ -__MATHCALL (rint,, (_Mdouble_ __x)); - -/* Return X + epsilon if X < Y, X - epsilon if X > Y. */ -__MATHCALLX (nextafter,, (_Mdouble_ __x, _Mdouble_ __y), (__const__)); -# ifdef __USE_ISOC99 -__MATHCALLX (nexttoward,, (_Mdouble_ __x, long double __y), (__const__)); -# endif - -/* Return the remainder of integer divison X / Y with infinite precision. */ -__MATHCALL (remainder,, (_Mdouble_ __x, _Mdouble_ __y)); - -# if defined __USE_MISC || defined __USE_XOPEN_EXTENDED -/* Return X times (2 to the Nth power). */ -__MATHCALL (scalb,, (_Mdouble_ __x, _Mdouble_ __n)); -# endif - -# if defined __USE_MISC || defined __USE_ISOC99 -/* Return X times (2 to the Nth power). */ -__MATHCALL (scalbn,, (_Mdouble_ __x, int __n)); -# endif - -/* Return the binary exponent of X, which must be nonzero. */ -__MATHDECL (int,ilogb,, (_Mdouble_ __x)); -#endif - -#ifdef __USE_ISOC99 -/* Return X times (2 to the Nth power). */ -__MATHCALL (scalbln,, (_Mdouble_ __x, long int __n)); - -/* Round X to integral value in floating-point format using current - rounding direction, but do not raise inexact exception. */ -__MATHCALL (nearbyint,, (_Mdouble_ __x)); - -/* Round X to nearest integral value, rounding halfway cases away from - zero. */ -__MATHCALL (round,, (_Mdouble_ __x)); - -/* Round X to the integral value in floating-point format nearest but - not larger in magnitude. */ -__MATHCALLX (trunc,, (_Mdouble_ __x), (__const__)); - -/* Compute remainder of X and Y and put in *QUO a value with sign of x/y - and magnitude congruent `mod 2^n' to the magnitude of the integral - quotient x/y, with n >= 3. */ -__MATHCALL (remquo,, (_Mdouble_ __x, _Mdouble_ __y, int *__quo)); - - -/* Conversion functions. */ - -/* Round X to nearest integral value according to current rounding - direction. */ -__MATHDECL (long int,lrint,, (_Mdouble_ __x)); -__MATHDECL (long long int,llrint,, (_Mdouble_ __x)); - -/* Round X to nearest integral value, rounding halfway cases away from - zero. */ -__MATHDECL (long int,lround,, (_Mdouble_ __x)); -__MATHDECL (long long int,llround,, (_Mdouble_ __x)); - - -/* Return positive difference between X and Y. */ -__MATHCALL (fdim,, (_Mdouble_ __x, _Mdouble_ __y)); - -/* Return maximum numeric value from X and Y. */ -__MATHCALL (fmax,, (_Mdouble_ __x, _Mdouble_ __y)); - -/* Return minimum numeric value from X and Y. */ -__MATHCALL (fmin,, (_Mdouble_ __x, _Mdouble_ __y)); - - -/* Classify given number. */ -__MATHDECL_1 (int, __fpclassify,, (_Mdouble_ __value)) - __attribute__ ((__const__)); - -/* Test for negative number. */ -__MATHDECL_1 (int, __signbit,, (_Mdouble_ __value)) - __attribute__ ((__const__)); - - -/* Multiply-add function computed as a ternary operation. */ -__MATHCALL (fma,, (_Mdouble_ __x, _Mdouble_ __y, _Mdouble_ __z)); -#endif /* Use ISO C99. */ diff --git a/libc/sysdeps/linux/powerpc/bits/nan.h b/libc/sysdeps/linux/powerpc/bits/nan.h deleted file mode 100644 index 6d88b551b..000000000 --- a/libc/sysdeps/linux/powerpc/bits/nan.h +++ /dev/null @@ -1,48 +0,0 @@ -/* `NAN' constant for IEEE 754 machines. - Copyright (C) 1992, 1996, 1997, 1999 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 _MATH_H -# error "Never use <bits/nan.h> directly; include <math.h> instead." -#endif - - -/* IEEE Not A Number. */ - -#ifdef __GNUC__ - -# define NAN \ - (__extension__ \ - ((union { unsigned __l __attribute__((__mode__(__SI__))); float __d; }) \ - { __l: 0x7fc00000UL }).__d) - -#else - -# include <endian.h> - -# if __BYTE_ORDER == __BIG_ENDIAN -# define __nan_bytes { 0x7f, 0xc0, 0, 0 } -# endif -# if __BYTE_ORDER == __LITTLE_ENDIAN -# define __nan_bytes { 0, 0, 0xc0, 0x7f } -# endif - -static union { unsigned char __c[4]; float __d; } __nan_union = { __nan_bytes }; -# define NAN (__nan_union.__d) - -#endif /* GCC. */ diff --git a/libc/sysdeps/linux/powerpc/bits/netdb.h b/libc/sysdeps/linux/powerpc/bits/netdb.h deleted file mode 100644 index 41dc73193..000000000 --- a/libc/sysdeps/linux/powerpc/bits/netdb.h +++ /dev/null @@ -1,33 +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. */ - -#ifndef _NETDB_H -# error "Never include <bits/netdb.h> directly; use <netdb.h> instead." -#endif - - -/* Description of data base entry for a single network. NOTE: here a - poor assumption is made. The network number is expected to fit - into an unsigned long int variable. */ -struct netent -{ - char *n_name; /* Official name of network. */ - char **n_aliases; /* Alias list. */ - int n_addrtype; /* Net address type. */ - uint32_t n_net; /* Network number. */ -}; diff --git a/libc/sysdeps/linux/powerpc/bits/poll.h b/libc/sysdeps/linux/powerpc/bits/poll.h deleted file mode 100644 index dccb8b666..000000000 --- a/libc/sysdeps/linux/powerpc/bits/poll.h +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (C) 1997, 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. */ - -#ifndef _SYS_POLL_H -# error "Never use <bits/poll.h> directly; include <sys/poll.h> instead." -#endif - -/* Event types that can be polled for. These bits may be set in `events' - to indicate the interesting event types; they will appear in `revents' - to indicate the status of the file descriptor. */ -#define POLLIN 0x001 /* There is data to read. */ -#define POLLPRI 0x002 /* There is urgent data to read. */ -#define POLLOUT 0x004 /* Writing now will not block. */ - -#ifdef __USE_XOPEN -/* These values are defined in XPG4.2. */ -# define POLLRDNORM 0x040 /* Normal data may be read. */ -# define POLLRDBAND 0x080 /* Priority data may be read. */ -# define POLLWRNORM 0x100 /* Writing now will not block. */ -# define POLLWRBAND 0x200 /* Priority data may be written. */ -#endif - -#ifdef __USE_GNU -/* This is an extension for Linux. */ -# define POLLMSG 0x400 -#endif - -/* Event types always implicitly polled for. These bits need not be set in - `events', but they will appear in `revents' to indicate the status of - the file descriptor. */ -#define POLLERR 0x008 /* Error condition. */ -#define POLLHUP 0x010 /* Hung up. */ -#define POLLNVAL 0x020 /* Invalid polling request. */ diff --git a/libc/sysdeps/linux/powerpc/bits/posix1_lim.h b/libc/sysdeps/linux/powerpc/bits/posix1_lim.h deleted file mode 100644 index e16f4674d..000000000 --- a/libc/sysdeps/linux/powerpc/bits/posix1_lim.h +++ /dev/null @@ -1,141 +0,0 @@ -/* Copyright (C) 1991,92,93,96,98,2000,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. */ - -/* - * POSIX Standard: 2.9.2 Minimum Values Added to <limits.h> - * - * Never include this file directly; use <limits.h> instead. - */ - -#ifndef _BITS_POSIX1_LIM_H -#define _BITS_POSIX1_LIM_H 1 - - -/* These are the standard-mandated minimum values. */ - -/* Minimum number of operations in one list I/O call. */ -#define _POSIX_AIO_LISTIO_MAX 2 - -/* Minimal number of outstanding asynchronous I/O operations. */ -#define _POSIX_AIO_MAX 1 - -/* Maximum length of arguments to `execve', including environment. */ -#define _POSIX_ARG_MAX 4096 - -/* Maximum simultaneous processes per real user ID. */ -#define _POSIX_CHILD_MAX 6 - -/* Minimal number of timer expiration overruns. */ -#define _POSIX_DELAYTIMER_MAX 32 - -/* Maximum link count of a file. */ -#define _POSIX_LINK_MAX 8 - -/* Number of bytes in a terminal canonical input queue. */ -#define _POSIX_MAX_CANON 255 - -/* Number of bytes for which space will be - available in a terminal input queue. */ -#define _POSIX_MAX_INPUT 255 - -/* Maximum number of message queues open for a process. */ -#define _POSIX_MQ_OPEN_MAX 8 - -/* Maximum number of supported message priorities. */ -#define _POSIX_MQ_PRIO_MAX 32 - -/* Number of simultaneous supplementary group IDs per process. */ -#define _POSIX_NGROUPS_MAX 0 - -/* Number of files one process can have open at once. */ -#define _POSIX_OPEN_MAX 16 - -/* Number of descriptors that a process may examine with `pselect' or - `select'. */ -#define _POSIX_FD_SETSIZE _POSIX_OPEN_MAX - -/* Number of bytes in a filename. */ -#define _POSIX_NAME_MAX 14 - -/* Number of bytes in a pathname. */ -#define _POSIX_PATH_MAX 256 - -/* Number of bytes than can be written atomically to a pipe. */ -#define _POSIX_PIPE_BUF 512 - -/* Minimal number of realtime signals reserved for the application. */ -#define _POSIX_RTSIG_MAX 8 - -/* Number of semaphores a process can have. */ -#define _POSIX_SEM_NSEMS_MAX 256 - -/* Maximal value of a semaphore. */ -#define _POSIX_SEM_VALUE_MAX 32767 - -/* Number of pending realtime signals. */ -#define _POSIX_SIGQUEUE_MAX 32 - -/* Largest value of a `ssize_t'. */ -#define _POSIX_SSIZE_MAX 32767 - -/* Number of streams a process can have open at once. */ -#define _POSIX_STREAM_MAX 8 - -/* Maximum length of a timezone name (element of `tzname'). */ -#define _POSIX_TZNAME_MAX 6 - -/* Maximum number of connections that can be queued on a socket. */ -#define _POSIX_QLIMIT 1 - -/* Maximum number of bytes that can be buffered on a socket for send - or receive. */ -#define _POSIX_HIWAT _POSIX_PIPE_BUF - -/* Maximum number of elements in an `iovec' array. */ -#define _POSIX_UIO_MAXIOV 16 - -/* Maximum number of characters in a tty name. */ -#define _POSIX_TTY_NAME_MAX 9 - -/* Number of timer for a process. */ -#define _POSIX_TIMER_MAX 32 - -/* Maximum length of login name. */ -#define _POSIX_LOGIN_NAME_MAX 9 - -/* Maximum clock resolution in nanoseconds. */ -#define _POSIX_CLOCKRES_MIN 20000000 - - -/* Get the implementation-specific values for the above. */ -#include <bits/local_lim.h> - - -#ifndef SSIZE_MAX -# define SSIZE_MAX INT_MAX -#endif - - -/* This value is a guaranteed minimum maximum. - The current maximum can be got from `sysconf'. */ - -#ifndef NGROUPS_MAX -# define NGROUPS_MAX _POSIX_NGROUPS_MAX -#endif - -#endif /* bits/posix1_lim.h */ diff --git a/libc/sysdeps/linux/powerpc/bits/posix2_lim.h b/libc/sysdeps/linux/powerpc/bits/posix2_lim.h deleted file mode 100644 index 24483a09d..000000000 --- a/libc/sysdeps/linux/powerpc/bits/posix2_lim.h +++ /dev/null @@ -1,91 +0,0 @@ -/* Copyright (C) 1991, 1996, 1999, 2000, 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. */ - -/* - * Never include this file directly; include <limits.h> instead. - */ - -#ifndef _BITS_POSIX2_LIM_H -#define _BITS_POSIX2_LIM_H 1 - - -/* The maximum `ibase' and `obase' values allowed by the `bc' utility. */ -#define _POSIX2_BC_BASE_MAX 99 - -/* The maximum number of elements allowed in an array by the `bc' utility. */ -#define _POSIX2_BC_DIM_MAX 2048 - -/* The maximum `scale' value allowed by the `bc' utility. */ -#define _POSIX2_BC_SCALE_MAX 99 - -/* The maximum length of a string constant accepted by the `bc' utility. */ -#define _POSIX2_BC_STRING_MAX 1000 - -/* The maximum number of weights that can be assigned to an entry of - the LC_COLLATE `order' keyword in the locale definition file. */ -#define _POSIX2_COLL_WEIGHTS_MAX 2 - -/* The maximum number of expressions that can be nested - within parentheses by the `expr' utility. */ -#define _POSIX2_EXPR_NEST_MAX 32 - -/* The maximum length, in bytes, of an input line. */ -#define _POSIX2_LINE_MAX 2048 - -/* The maximum number of repeated occurrences of a regular expression - permitted when using the interval notation `\{M,N\}'. */ -#define _POSIX2_RE_DUP_MAX 255 - -/* The maximum number of bytes in a character class name. We have no - fixed limit, 2048 is a high number. */ -#define _POSIX2_CHARCLASS_NAME_MAX 14 - - -/* These values are implementation-specific, - and may vary within the implementation. - Their precise values can be obtained from sysconf. */ - -#ifndef BC_BASE_MAX -#define BC_BASE_MAX _POSIX2_BC_BASE_MAX -#endif -#ifndef BC_DIM_MAX -#define BC_DIM_MAX _POSIX2_BC_DIM_MAX -#endif -#ifndef BC_SCALE_MAX -#define BC_SCALE_MAX _POSIX2_BC_SCALE_MAX -#endif -#ifndef BC_STRING_MAX -#define BC_STRING_MAX _POSIX2_BC_STRING_MAX -#endif -#ifndef COLL_WEIGHTS_MAX -#define COLL_WEIGHTS_MAX 255 -#endif -#ifndef EXPR_NEST_MAX -#define EXPR_NEST_MAX _POSIX2_EXPR_NEST_MAX -#endif -#ifndef LINE_MAX -#define LINE_MAX _POSIX2_LINE_MAX -#endif -#ifndef CHARCLASS_NAME_MAX -#define CHARCLASS_NAME_MAX 2048 -#endif - -/* This value is defined like this in regex.h. */ -#define RE_DUP_MAX (0x7fff) - -#endif /* bits/posix2_lim.h */ diff --git a/libc/sysdeps/linux/powerpc/bits/posix_opt.h b/libc/sysdeps/linux/powerpc/bits/posix_opt.h deleted file mode 100644 index 41b509575..000000000 --- a/libc/sysdeps/linux/powerpc/bits/posix_opt.h +++ /dev/null @@ -1,143 +0,0 @@ -/* Define POSIX options for Linux. - Copyright (C) 1996,1997,1998,1999,2000,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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _POSIX_OPT_H -#define _POSIX_OPT_H 1 - -/* Job control is supported. */ -#define _POSIX_JOB_CONTROL 1 - -/* Processes have a saved set-user-ID and a saved set-group-ID. */ -#define _POSIX_SAVED_IDS 1 - -/* Priority scheduling is supported. */ -#define _POSIX_PRIORITY_SCHEDULING 1 - -/* Synchronizing file data is supported. */ -#define _POSIX_SYNCHRONIZED_IO 1 - -/* The fsync function is present. */ -#define _POSIX_FSYNC 1 - -/* Mapping of files to memory is supported. */ -#define _POSIX_MAPPED_FILES 1 - -/* Locking of all memory is supported. */ -#define _POSIX_MEMLOCK 1 - -/* Locking of ranges of memory is supported. */ -#define _POSIX_MEMLOCK_RANGE 1 - -/* Setting of memory protections is supported. */ -#define _POSIX_MEMORY_PROTECTION 1 - -/* Implementation supports `poll' function. */ -#define _POSIX_POLL 1 - -/* Implementation supports `select' and `pselect' functions. */ -#define _POSIX_SELECT 1 - -/* Only root can change owner of file. */ -#define _POSIX_CHOWN_RESTRICTED 1 - -/* `c_cc' member of 'struct termios' structure can be disabled by - using the value _POSIX_VDISABLE. */ -#define _POSIX_VDISABLE '\0' - -/* Filenames are not silently truncated. */ -#define _POSIX_NO_TRUNC 1 - -/* X/Open realtime support is available. */ -/* except it's not */ -#undef _XOPEN_REALTIME - -/* X/Open realtime thread support is available. */ -#define _XOPEN_REALTIME_THREADS 1 - -/* XPG4.2 shared memory is supported. */ -#define _XOPEN_SHM 1 - -/* Tell we have POSIX threads. */ -/* except we don't */ -#undef _POSIX_THREADS - -/* We have the reentrant functions described in POSIX. */ -#define _POSIX_REENTRANT_FUNCTIONS 1 -#define _POSIX_THREAD_SAFE_FUNCTIONS 1 - -/* We provide priority scheduling for threads. */ -#define _POSIX_THREAD_PRIORITY_SCHEDULING 1 - -/* We support user-defined stack sizes. */ -#define _POSIX_THREAD_ATTR_STACKSIZE 1 - -/* We support user-defined stacks. */ -#define _POSIX_THREAD_ATTR_STACKADDR 1 - -/* We support POSIX.1b semaphores, but only the non-shared form for now. */ -#define _POSIX_SEMAPHORES 1 - -/* Real-time signals are supported. */ -#define _POSIX_REALTIME_SIGNALS 1 - -/* We support asynchronous I/O. */ -#define _POSIX_ASYNCHRONOUS_IO 1 -#define _POSIX_ASYNC_IO 1 -/* Alternative name for Unix98. */ -#define _LFS_ASYNCHRONOUS_IO 1 - -/* The LFS support in asynchronous I/O is also available. */ -#define _LFS64_ASYNCHRONOUS_IO 1 - -/* The rest of the LFS is also available. */ -#define _LFS_LARGEFILE 1 -#define _LFS64_LARGEFILE 1 -#define _LFS64_STDIO 1 - -/* POSIX shared memory objects are implemented. */ -#define _POSIX_SHARED_MEMORY_OBJECTS 1 - -/* GNU libc provides regular expression handling. */ -#define _POSIX_REGEXP 1 - -/* Reader/Writer locks are available. */ -#define _POSIX_READER_WRITER_LOCKS 200912L - -/* We have a POSIX shell. */ -#define _POSIX_SHELL 1 - -/* We support the Timeouts option. */ -#define _POSIX_TIMEOUTS 200912L - -/* We support spinlocks. */ -#define _POSIX_SPIN_LOCKS 200912L - -/* The `spawn' function family is supported. */ -#define _POSIX_SPAWN 200912L - -/* We have POSIX timers. */ -#define _POSIX_TIMERS 1 - -/* The barrier functions are available. */ -#define _POSIX_BARRIERS 200912L - -/* POSIX message queues are not yet supported. */ -#undef _POSIX_MESSAGE_PASSING - -#endif /* posix_opt.h */ diff --git a/libc/sysdeps/linux/powerpc/bits/pthreadtypes.h b/libc/sysdeps/linux/powerpc/bits/pthreadtypes.h deleted file mode 100644 index 3ee5c4813..000000000 --- a/libc/sysdeps/linux/powerpc/bits/pthreadtypes.h +++ /dev/null @@ -1,142 +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. */ - -#if !defined _BITS_TYPES_H && !defined _PTHREAD_H -# error "Never include <bits/pthreadtypes.h> directly; use <sys/types.h> instead." -#endif - -#ifndef _BITS_PTHREADTYPES_H -#define _BITS_PTHREADTYPES_H 1 - -#define __need_schedparam -#include <bits/sched.h> - -/* Fast locks (not abstract because mutexes and conditions aren't abstract). */ -struct _pthread_fastlock -{ - long int __status; /* "Free" or "taken" or head of waiting list */ - int __spinlock; /* Used by compare_and_swap emulation. Also, - adaptive SMP lock stores spin count here. */ -}; - -#ifndef _PTHREAD_DESCR_DEFINED -/* Thread descriptors */ -typedef struct _pthread_descr_struct *_pthread_descr; -# define _PTHREAD_DESCR_DEFINED -#endif - - -/* Attributes for threads. */ -typedef struct __pthread_attr_s -{ - int __detachstate; - int __schedpolicy; - struct __sched_param __schedparam; - int __inheritsched; - int __scope; - size_t __guardsize; - int __stackaddr_set; - void *__stackaddr; - size_t __stacksize; -} pthread_attr_t; - - -/* Conditions (not abstract because of PTHREAD_COND_INITIALIZER */ -typedef struct -{ - struct _pthread_fastlock __c_lock; /* Protect against concurrent access */ - _pthread_descr __c_waiting; /* Threads waiting on this condition */ -} pthread_cond_t; - - -/* Attribute for conditionally variables. */ -typedef struct -{ - int __dummy; -} pthread_condattr_t; - -/* Keys for thread-specific data */ -typedef unsigned int pthread_key_t; - - -/* Mutexes (not abstract because of PTHREAD_MUTEX_INITIALIZER). */ -/* (The layout is unnatural to maintain binary compatibility - with earlier releases of LinuxThreads.) */ -typedef struct -{ - int __m_reserved; /* Reserved for future use */ - int __m_count; /* Depth of recursive locking */ - _pthread_descr __m_owner; /* Owner thread (if recursive or errcheck) */ - int __m_kind; /* Mutex kind: fast, recursive or errcheck */ - struct _pthread_fastlock __m_lock; /* Underlying fast lock */ -} pthread_mutex_t; - - -/* Attribute for mutex. */ -typedef struct -{ - int __mutexkind; -} pthread_mutexattr_t; - - -/* Once-only execution */ -typedef int pthread_once_t; - - -#ifdef __USE_UNIX98 -/* Read-write locks. */ -typedef struct _pthread_rwlock_t -{ - struct _pthread_fastlock __rw_lock; /* Lock to guarantee mutual exclusion */ - int __rw_readers; /* Number of readers */ - _pthread_descr __rw_writer; /* Identity of writer, or NULL if none */ - _pthread_descr __rw_read_waiting; /* Threads waiting for reading */ - _pthread_descr __rw_write_waiting; /* Threads waiting for writing */ - int __rw_kind; /* Reader/Writer preference selection */ - int __rw_pshared; /* Shared between processes or not */ -} pthread_rwlock_t; - - -/* Attribute for read-write locks. */ -typedef struct -{ - int __lockkind; - int __pshared; -} pthread_rwlockattr_t; -#endif - -#ifdef __USE_XOPEN2K -/* POSIX spinlock data type. */ -typedef volatile int pthread_spinlock_t; - -/* POSIX barrier. */ -typedef struct { - struct _pthread_fastlock __ba_lock; /* Lock to guarantee mutual exclusion */ - int __ba_required; /* Threads needed for completion */ - int __ba_present; /* Threads waiting */ - _pthread_descr __ba_waiting; /* Queue of waiting threads */ -} pthread_barrier_t; - -/* barrier attribute */ -typedef struct { - int __pshared; -} pthread_barrierattr_t; - -#endif - - -/* Thread identifiers */ -typedef unsigned long int pthread_t; - -#endif /* bits/pthreadtypes.h */ diff --git a/libc/sysdeps/linux/powerpc/bits/sched.h b/libc/sysdeps/linux/powerpc/bits/sched.h deleted file mode 100644 index 5c10d85d4..000000000 --- a/libc/sysdeps/linux/powerpc/bits/sched.h +++ /dev/null @@ -1,73 +0,0 @@ -/* Definitions of constants and data structure for POSIX 1003.1b-1993 - scheduling interface. - Copyright (C) 1996, 1997, 1998, 1999, 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. */ - -#ifndef __need_schedparam - -#ifndef _SCHED_H -# error "Never include <bits/sched.h> directly; use <sched.h> instead." -#endif - - -/* Scheduling algorithms. */ -#define SCHED_OTHER 0 -#define SCHED_FIFO 1 -#define SCHED_RR 2 - -#ifdef __USE_MISC -/* Cloning flags. */ -# define CSIGNAL 0x000000ff /* Signal mask to be sent at exit. */ -# define CLONE_VM 0x00000100 /* Set if VM shared between processes. */ -# define CLONE_FS 0x00000200 /* Set if fs info shared between processes. */ -# define CLONE_FILES 0x00000400 /* Set if open files shared between processes. */ -# define CLONE_SIGHAND 0x00000800 /* Set if signal handlers shared. */ -# define CLONE_PID 0x00001000 /* Set if pid shared. */ -# define CLONE_PTRACE 0x00002000 /* Set if tracing continues on the child. */ -# define CLONE_VFORK 0x00004000 /* Set if the parent wants the child to - wake it up on mm_release. */ -#endif - -/* The official definition. */ -struct sched_param - { - int __sched_priority; - }; - -__BEGIN_DECLS - -/* Clone current process. */ -#ifdef __USE_MISC -extern int clone (int (*__fn) (void *__arg), void *__child_stack, - int __flags, void *__arg) __THROW; -#endif - -__END_DECLS - -#endif /* need schedparam */ - -#if !defined __defined_schedparam \ - && (defined __need_schedparam || defined _SCHED_H) -# define __defined_schedparam 1 -/* Data structure to describe a process' schedulability. */ -struct __sched_param - { - int __sched_priority; - }; -# undef __need_schedparam -#endif diff --git a/libc/sysdeps/linux/powerpc/bits/select.h b/libc/sysdeps/linux/powerpc/bits/select.h deleted file mode 100644 index 47e7dedc3..000000000 --- a/libc/sysdeps/linux/powerpc/bits/select.h +++ /dev/null @@ -1,35 +0,0 @@ -/* 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. */ - -#ifndef _SYS_SELECT_H -# error "Never use <bits/select.h> directly; include <sys/select.h> instead." -#endif - - -/* We don't use `memset' because this would require a prototype and - the array isn't too big. */ -#define __FD_ZERO(s) \ - do { \ - unsigned int __i; \ - fd_set *__arr = (s); \ - for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) \ - __FDS_BITS (__arr)[__i] = 0; \ - } while (0) -#define __FD_SET(d, s) (__FDS_BITS (s)[__FDELT(d)] |= __FDMASK(d)) -#define __FD_CLR(d, s) (__FDS_BITS (s)[__FDELT(d)] &= ~__FDMASK(d)) -#define __FD_ISSET(d, s) ((__FDS_BITS (s)[__FDELT(d)] & __FDMASK(d)) != 0) diff --git a/libc/sysdeps/linux/powerpc/bits/sigaction.h b/libc/sysdeps/linux/powerpc/bits/sigaction.h deleted file mode 100644 index 48cc5312f..000000000 --- a/libc/sysdeps/linux/powerpc/bits/sigaction.h +++ /dev/null @@ -1,77 +0,0 @@ -/* The proper definitions for Linux's sigaction. - Copyright (C) 1993-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 _SIGNAL_H -# error "Never include <bits/sigaction.h> directly; use <signal.h> instead." -#endif - -/* Structure describing the action to be taken when a signal arrives. */ -struct sigaction - { - /* Signal handler. */ -#ifdef __USE_POSIX199309 - union - { - /* Used if SA_SIGINFO is not set. */ - __sighandler_t sa_handler; - /* Used if SA_SIGINFO is set. */ - void (*sa_sigaction) (int, siginfo_t *, void *); - } - __sigaction_handler; -# define sa_handler __sigaction_handler.sa_handler -# define sa_sigaction __sigaction_handler.sa_sigaction -#else - __sighandler_t sa_handler; -#endif - - /* Additional set of signals to be blocked. */ - __sigset_t sa_mask; - - /* Special flags. */ - int sa_flags; - - /* Restore handler. */ - void (*sa_restorer) (void); - }; - -/* Bits in `sa_flags'. */ -#define SA_NOCLDSTOP 1 /* Don't send SIGCHLD when children stop. */ -#define SA_NOCLDWAIT 2 /* Don't create zombie on child death. */ -#define SA_SIGINFO 4 /* Invoke signal-catching function with - three arguments instead of one. */ -#if defined __USE_UNIX98 || defined __USE_MISC -# define SA_ONSTACK 0x08000000 /* Use signal stack by using `sa_restorer'. */ -# define SA_RESTART 0x10000000 /* Restart syscall on signal return. */ -# define SA_NODEFER 0x40000000 /* Don't automatically block the signal when - its handler is being executed. */ -# define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler. */ -#endif -#ifdef __USE_MISC -# define SA_INTERRUPT 0x20000000 /* Historical no-op. */ - -/* Some aliases for the SA_ constants. */ -# define SA_NOMASK SA_NODEFER -# define SA_ONESHOT SA_RESETHAND -# define SA_STACK SA_ONSTACK -#endif - -/* Values for the HOW argument to `sigprocmask'. */ -#define SIG_BLOCK 0 /* Block signals. */ -#define SIG_UNBLOCK 1 /* Unblock signals. */ -#define SIG_SETMASK 2 /* Set the set of blocked signals. */ diff --git a/libc/sysdeps/linux/powerpc/bits/sigcontext.h b/libc/sysdeps/linux/powerpc/bits/sigcontext.h deleted file mode 100644 index 67dcf9498..000000000 --- a/libc/sysdeps/linux/powerpc/bits/sigcontext.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 1996, 1997, 1998 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. */ - -#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H -# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead." -#endif - -#ifndef sigcontext_struct -/* Kernel headers before 2.1.1 define a struct sigcontext_struct, but - we need sigcontext. */ -# define sigcontext_struct sigcontext - -# include <asm/sigcontext.h> -#endif diff --git a/libc/sysdeps/linux/powerpc/bits/siginfo.h b/libc/sysdeps/linux/powerpc/bits/siginfo.h deleted file mode 100644 index 70a8c217e..000000000 --- a/libc/sysdeps/linux/powerpc/bits/siginfo.h +++ /dev/null @@ -1,306 +0,0 @@ -/* siginfo_t, sigevent and constants. Linux/SPARC version. - Copyright (C) 1997, 1998, 1999, 2000, 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. */ - -#if !defined _SIGNAL_H && !defined __need_siginfo_t \ - && !defined __need_sigevent_t -# error "Never include this file directly. Use <signal.h> instead" -#endif - -#include <bits/wordsize.h> - -#if (!defined __have_sigval_t \ - && (defined _SIGNAL_H || defined __need_siginfo_t \ - || defined __need_sigevent_t)) -# define __have_sigval_t 1 - -/* Type for data associated with a signal. */ -typedef union sigval - { - int sival_int; - void *sival_ptr; - } sigval_t; -#endif - -#if (!defined __have_siginfo_t \ - && (defined _SIGNAL_H || defined __need_siginfo_t)) -# define __have_siginfo_t 1 - -# define __SI_MAX_SIZE 128 -# if __WORDSIZE == 64 -# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 4) -# else -# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3) -# endif - -typedef struct siginfo - { - int si_signo; /* Signal number. */ - int si_errno; /* If non-zero, an errno value associated with - this signal, as defined in <errno.h>. */ - int si_code; /* Signal code. */ - - union - { - int _pad[__SI_PAD_SIZE]; - - /* kill(). */ - struct - { - __pid_t si_pid; /* Sending process ID. */ - __uid_t si_uid; /* Real user ID of sending process. */ - } _kill; - - /* POSIX.1b timers. */ - struct - { - unsigned int _timer1; - unsigned int _timer2; - } _timer; - - /* POSIX.1b signals. */ - struct - { - __pid_t si_pid; /* Sending process ID. */ - __uid_t si_uid; /* Real user ID of sending process. */ - sigval_t si_sigval; /* Signal value. */ - } _rt; - - /* SIGCHLD. */ - struct - { - __pid_t si_pid; /* Which child. */ - __uid_t si_uid; /* Real user ID of sending process. */ - int si_status; /* Exit value or signal. */ - __clock_t si_utime; - __clock_t si_stime; - } _sigchld; - - /* SIGILL, SIGFPE, SIGSEGV, SIGBUS. */ - struct - { - void *si_addr; /* Faulting insn/memory ref. */ - } _sigfault; - - /* SIGPOLL. */ - struct - { - long int si_band; /* Band event for SIGPOLL. */ - int si_fd; - } _sigpoll; - } _sifields; - } siginfo_t; - - -/* X/Open requires some more fields with fixed names. */ -# define si_pid _sifields._kill.si_pid -# define si_uid _sifields._kill.si_uid -# define si_timer1 _sifields._timer._timer1 -# define si_timer2 _sifields._timer._timer2 -# define si_status _sifields._sigchld.si_status -# define si_utime _sifields._sigchld.si_utime -# define si_stime _sifields._sigchld.si_stime -# define si_value _sifields._rt.si_sigval -# define si_int _sifields._rt.si_sigval.sival_int -# define si_ptr _sifields._rt.si_sigval.sival_ptr -# define si_addr _sifields._sigfault.si_addr -# define si_band _sifields._sigpoll.si_band -# define si_fd _sifields._sigpoll.si_fd - - -/* Values for `si_code'. Positive values are reserved for kernel-generated - signals. */ -enum -{ - SI_ASYNCNL = -6, /* Sent by asynch name lookup completion. */ -# define SI_ASYNCNL SI_ASYNCNL - SI_SIGIO, /* Sent by queued SIGIO. */ -# define SI_SIGIO SI_SIGIO - SI_ASYNCIO, /* Sent by AIO completion. */ -# define SI_ASYNCIO SI_ASYNCIO - SI_MESGQ, /* Sent by real time mesq state change. */ -# define SI_MESGQ SI_MESGQ - SI_TIMER, /* Sent by timer expiration. */ -# define SI_TIMER SI_TIMER - SI_QUEUE, /* Sent by sigqueue. */ -# define SI_QUEUE SI_QUEUE - SI_USER, /* Sent by kill, sigsend, raise. */ -# define SI_USER SI_USER - SI_KERNEL = 0x80 /* Send by kernel. */ -#define SI_KERNEL SI_KERNEL -}; - - -/* `si_code' values for SIGILL signal. */ -enum -{ - ILL_ILLOPC = 1, /* Illegal opcode. */ -# define ILL_ILLOPC ILL_ILLOPC - ILL_ILLOPN, /* Illegal operand. */ -# define ILL_ILLOPN ILL_ILLOPN - ILL_ILLADR, /* Illegal addressing mode. */ -# define ILL_ILLADR ILL_ILLADR - ILL_ILLTRP, /* Illegal trap. */ -# define ILL_ILLTRP ILL_ILLTRP - ILL_PRVOPC, /* Privileged opcode. */ -# define ILL_PRVOPC ILL_PRVOPC - ILL_PRVREG, /* Privileged register. */ -# define ILL_PRVREG ILL_PRVREG - ILL_COPROC, /* Coprocessor error. */ -# define ILL_COPROC ILL_COPROC - ILL_BADSTK /* Internal stack error. */ -# define ILL_BADSTK ILL_BADSTK -}; - -/* `si_code' values for SIGFPE signal. */ -enum -{ - FPE_INTDIV = 1, /* Integer divide by zero. */ -# define FPE_INTDIV FPE_INTDIV - FPE_INTOVF, /* Integer overflow. */ -# define FPE_INTOVF FPE_INTOVF - FPE_FLTDIV, /* Floating point divide by zero. */ -# define FPE_FLTDIV FPE_FLTDIV - FPE_FLTOVF, /* Floating point overflow. */ -# define FPE_FLTOVF FPE_FLTOVF - FPE_FLTUND, /* Floating point underflow. */ -# define FPE_FLTUND FPE_FLTUND - FPE_FLTRES, /* Floating point inexact result. */ -# define FPE_FLTRES FPE_FLTRES - FPE_FLTINV, /* Floating point invalid operation. */ -# define FPE_FLTINV FPE_FLTINV - FPE_FLTSUB /* Subscript out of range. */ -# define FPE_FLTSUB FPE_FLTSUB -}; - -/* `si_code' values for SIGSEGV signal. */ -enum -{ - SEGV_MAPERR = 1, /* Address not mapped to object. */ -# define SEGV_MAPERR SEGV_MAPERR - SEGV_ACCERR /* Invalid permissions for mapped object. */ -# define SEGV_ACCERR SEGV_ACCERR -}; - -/* `si_code' values for SIGBUS signal. */ -enum -{ - BUS_ADRALN = 1, /* Invalid address alignment. */ -# define BUS_ADRALN BUS_ADRALN - BUS_ADRERR, /* Non-existant physical address. */ -# define BUS_ADRERR BUS_ADRERR - BUS_OBJERR /* Object specific hardware error. */ -# define BUS_OBJERR BUS_OBJERR -}; - -/* `si_code' values for SIGTRAP signal. */ -enum -{ - TRAP_BRKPT = 1, /* Process breakpoint. */ -# define TRAP_BRKPT TRAP_BRKPT - TRAP_TRACE /* Process trace trap. */ -# define TRAP_TRACE TRAP_TRACE -}; - -/* `si_code' values for SIGCHLD signal. */ -enum -{ - CLD_EXITED = 1, /* Child has exited. */ -# define CLD_EXITED CLD_EXITED - CLD_KILLED, /* Child was killed. */ -# define CLD_KILLED CLD_KILLED - CLD_DUMPED, /* Child terminated abnormally. */ -# define CLD_DUMPED CLD_DUMPED - CLD_TRAPPED, /* Traced child has trapped. */ -# define CLD_TRAPPED CLD_TRAPPED - CLD_STOPPED, /* Child has stopped. */ -# define CLD_STOPPED CLD_STOPPED - CLD_CONTINUED /* Stopped child has continued. */ -# define CLD_CONTINUED CLD_CONTINUED -}; - -/* `si_code' values for SIGPOLL signal. */ -enum -{ - POLL_IN = 1, /* Data input available. */ -# define POLL_IN POLL_IN - POLL_OUT, /* Output buffers available. */ -# define POLL_OUT POLL_OUT - POLL_MSG, /* Input message available. */ -# define POLL_MSG POLL_MSG - POLL_ERR, /* I/O error. */ -# define POLL_ERR POLL_ERR - POLL_PRI, /* High priority input available. */ -# define POLL_PRI POLL_PRI - POLL_HUP /* Device disconnected. */ -# define POLL_HUP POLL_HUP -}; - -# undef __need_siginfo_t -#endif /* !have siginfo_t && (have _SIGNAL_H || need siginfo_t). */ - - -#if (defined _SIGNAL_H || defined __need_sigevent_t) \ - && !defined __have_sigevent_t -# define __have_sigevent_t 1 - -/* Structure to transport application-defined values with signals. */ -# define __SIGEV_MAX_SIZE 64 -# if __WORDSIZE == 64 -# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4) -# else -# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3) -# endif - -/* Forward declaration of the `pthread_attr_t' type. */ -struct __pthread_attr_s; - -typedef struct sigevent - { - sigval_t sigev_value; - int sigev_signo; - int sigev_notify; - - union - { - int _pad[__SIGEV_PAD_SIZE]; - - struct - { - void (*_function) (sigval_t); /* Function to start. */ - struct __pthread_attr_s *_attribute; /* Really pthread_attr_t. */ - } _sigev_thread; - } _sigev_un; - } sigevent_t; - -/* POSIX names to access some of the members. */ -# define sigev_notify_function _sigev_un._sigev_thread._function -# define sigev_notify_attributes _sigev_un._sigev_thread._attribute - -/* `sigev_notify' values. */ -enum -{ - SIGEV_SIGNAL = 0, /* Notify via signal. */ -# define SIGEV_SIGNAL SIGEV_SIGNAL - SIGEV_NONE, /* Other notification: meaningless. */ -# define SIGEV_NONE SIGEV_NONE - SIGEV_THREAD /* Deliver via thread creation. */ -# define SIGEV_THREAD SIGEV_THREAD -}; - -#endif /* have _SIGNAL_H. */ diff --git a/libc/sysdeps/linux/powerpc/bits/signum.h b/libc/sysdeps/linux/powerpc/bits/signum.h deleted file mode 100644 index 74259b492..000000000 --- a/libc/sysdeps/linux/powerpc/bits/signum.h +++ /dev/null @@ -1,80 +0,0 @@ -/* Signal number definitions. Linux version. - Copyright (C) 1995, 1996, 1997, 1998, 1999 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. */ - -#ifdef _SIGNAL_H - -/* Fake signal functions. */ -#define SIG_ERR ((__sighandler_t) -1) /* Error return. */ -#define SIG_DFL ((__sighandler_t) 0) /* Default action. */ -#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */ - -#ifdef __USE_UNIX98 -# define SIG_HOLD ((__sighandler_t) 2) /* Add signal to hold mask. */ -#endif - - -/* Signals. */ -#define SIGHUP 1 /* Hangup (POSIX). */ -#define SIGINT 2 /* Interrupt (ANSI). */ -#define SIGQUIT 3 /* Quit (POSIX). */ -#define SIGILL 4 /* Illegal instruction (ANSI). */ -#define SIGTRAP 5 /* Trace trap (POSIX). */ -#define SIGABRT 6 /* Abort (ANSI). */ -#define SIGIOT 6 /* IOT trap (4.2 BSD). */ -#define SIGBUS 7 /* BUS error (4.2 BSD). */ -#define SIGFPE 8 /* Floating-point exception (ANSI). */ -#define SIGKILL 9 /* Kill, unblockable (POSIX). */ -#define SIGUSR1 10 /* User-defined signal 1 (POSIX). */ -#define SIGSEGV 11 /* Segmentation violation (ANSI). */ -#define SIGUSR2 12 /* User-defined signal 2 (POSIX). */ -#define SIGPIPE 13 /* Broken pipe (POSIX). */ -#define SIGALRM 14 /* Alarm clock (POSIX). */ -#define SIGTERM 15 /* Termination (ANSI). */ -#define SIGSTKFLT 16 /* Stack fault. */ -#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */ -#define SIGCHLD 17 /* Child status has changed (POSIX). */ -#define SIGCONT 18 /* Continue (POSIX). */ -#define SIGSTOP 19 /* Stop, unblockable (POSIX). */ -#define SIGTSTP 20 /* Keyboard stop (POSIX). */ -#define SIGTTIN 21 /* Background read from tty (POSIX). */ -#define SIGTTOU 22 /* Background write to tty (POSIX). */ -#define SIGURG 23 /* Urgent condition on socket (4.2 BSD). */ -#define SIGXCPU 24 /* CPU limit exceeded (4.2 BSD). */ -#define SIGXFSZ 25 /* File size limit exceeded (4.2 BSD). */ -#define SIGVTALRM 26 /* Virtual alarm clock (4.2 BSD). */ -#define SIGPROF 27 /* Profiling alarm clock (4.2 BSD). */ -#define SIGWINCH 28 /* Window size change (4.3 BSD, Sun). */ -#define SIGPOLL SIGIO /* Pollable event occurred (System V). */ -#define SIGIO 29 /* I/O now possible (4.2 BSD). */ -#define SIGPWR 30 /* Power failure restart (System V). */ -#define SIGSYS 31 /* Bad system call. */ -#define SIGUNUSED 31 - -#define _NSIG 64 /* Biggest signal number + 1 - (including real-time signals). */ - -#define SIGRTMIN (__libc_current_sigrtmin ()) -#define SIGRTMAX (__libc_current_sigrtmax ()) - -/* These are the hard limits of the kernel. These values should not be - used directly at user level. */ -#define __SIGRTMIN 32 -#define __SIGRTMAX (_NSIG - 1) - -#endif /* <signal.h> included. */ diff --git a/libc/sysdeps/linux/powerpc/bits/sigset.h b/libc/sysdeps/linux/powerpc/bits/sigset.h deleted file mode 100644 index 900deadac..000000000 --- a/libc/sysdeps/linux/powerpc/bits/sigset.h +++ /dev/null @@ -1,128 +0,0 @@ -/* __sig_atomic_t, __sigset_t, and related definitions. Linux version. - Copyright (C) 1991, 1992, 1994, 1996, 1997 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 _SIGSET_H_types -# define _SIGSET_H_types 1 - -typedef int __sig_atomic_t; - -/* A `sigset_t' has a bit for each signal. */ - -# define _SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int))) -typedef struct - { - unsigned long int __val[_SIGSET_NWORDS]; - } __sigset_t; - -#endif - - -/* We only want to define these functions if <signal.h> was actually - included; otherwise we were included just to define the types. Since we - are namespace-clean, it wouldn't hurt to define extra macros. But - trouble can be caused by functions being defined (e.g., any global - register vars declared later will cause compilation errors). */ - -#if !defined _SIGSET_H_fns && defined _SIGNAL_H -# define _SIGSET_H_fns 1 - -# ifndef _EXTERN_INLINE -# define _EXTERN_INLINE extern __inline -# endif - -/* Return a mask that includes the bit for SIG only. */ -# define __sigmask(sig) \ - (((unsigned long int) 1) << (((sig) - 1) % (8 * sizeof (unsigned long int)))) - -/* Return the word index for SIG. */ -# define __sigword(sig) (((sig) - 1) / (8 * sizeof (unsigned long int))) - -# if defined __GNUC__ && __GNUC__ >= 2 -# define __sigemptyset(set) \ - (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ - sigset_t *__set = (set); \ - while (--__cnt >= 0) __set->__val[__cnt] = 0; \ - 0; })) -# define __sigfillset(set) \ - (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ - sigset_t *__set = (set); \ - while (--__cnt >= 0) __set->__val[__cnt] = ~0UL; \ - 0; })) - -# ifdef __USE_GNU -/* The POSIX does not specify for handling the whole signal set in one - command. This is often wanted and so we define three more functions - here. */ -# define __sigisemptyset(set) \ - (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ - const sigset_t *__set = (set); \ - int __ret = __set->__val[--__cnt]; \ - while (!__ret && --__cnt >= 0) \ - __ret = __set->__val[__cnt]; \ - __ret == 0; })) -# define __sigandset(dest, left, right) \ - (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ - sigset_t *__dest = (dest); \ - const sigset_t *__left = (left); \ - const sigset_t *__right = (right); \ - while (--__cnt >= 0) \ - __dest->__val[__cnt] = (__left->__val[__cnt] \ - & __right->__val[__cnt]); \ - 0; })) -# define __sigorset(dest, left, right) \ - (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ - sigset_t *__dest = (dest); \ - const sigset_t *__left = (left); \ - const sigset_t *__right = (right); \ - while (--__cnt >= 0) \ - __dest->__val[__cnt] = (__left->__val[__cnt] \ - | __right->__val[__cnt]); \ - 0; })) -# endif -# endif - -__BEGIN_DECLS - -/* These functions needn't check for a bogus signal number -- error - checking is done in the non __ versions. */ - -extern int __sigismember (__const __sigset_t *, int); -extern int __sigaddset (__sigset_t *, int); -extern int __sigdelset (__sigset_t *, int); - -# ifdef __USE_EXTERN_INLINES -# define __SIGSETFN(NAME, BODY, CONST) \ - _EXTERN_INLINE int \ - NAME (CONST __sigset_t *__set, int __sig) \ - { \ - unsigned long int __mask = __sigmask (__sig); \ - unsigned long int __word = __sigword (__sig); \ - return BODY; \ - } - -__SIGSETFN (__sigismember, (__set->__val[__word] & __mask) ? 1 : 0, __const) -__SIGSETFN (__sigaddset, ((__set->__val[__word] |= __mask), 0), ) -__SIGSETFN (__sigdelset, ((__set->__val[__word] &= ~__mask), 0), ) - -# undef __SIGSETFN -# endif - -__END_DECLS - -#endif /* ! _SIGSET_H_fns. */ diff --git a/libc/sysdeps/linux/powerpc/bits/sigstack.h b/libc/sysdeps/linux/powerpc/bits/sigstack.h deleted file mode 100644 index 7f260367b..000000000 --- a/libc/sysdeps/linux/powerpc/bits/sigstack.h +++ /dev/null @@ -1,55 +0,0 @@ -/* sigstack, sigaltstack definitions. - Copyright (C) 1998, 1999 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 _SIGNAL_H -# error "Never include this file directly. Use <signal.h> instead" -#endif - - -/* Structure describing a signal stack (obsolete). */ -struct sigstack - { - void *ss_sp; /* Signal stack pointer. */ - int ss_onstack; /* Nonzero if executing on this stack. */ - }; - - -/* Possible values for `ss_flags.'. */ -enum -{ - SS_ONSTACK = 1, -#define SS_ONSTACK SS_ONSTACK - SS_DISABLE -#define SS_DISABLE SS_DISABLE -}; - -/* Minimum stack size for a signal handler. */ -#define MINSIGSTKSZ 2048 - -/* System default stack size. */ -#define SIGSTKSZ 8192 - - -/* Alternate, preferred interface. */ -typedef struct sigaltstack - { - void *ss_sp; - int ss_flags; - size_t ss_size; - } stack_t; diff --git a/libc/sysdeps/linux/powerpc/bits/sigthread.h b/libc/sysdeps/linux/powerpc/bits/sigthread.h deleted file mode 100644 index 8ca688c59..000000000 --- a/libc/sysdeps/linux/powerpc/bits/sigthread.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Signal handling function for threaded programs. - Copyright (C) 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _BITS_SIGTHREAD_H -#define _BITS_SIGTHREAD_H 1 - -#if !defined _SIGNAL_H && !defined _PTHREAD_H -# error "Never include this file directly. Use <pthread.h> instead" -#endif - -__BEGIN_DECLS - -/* Functions for handling signals. */ - -/* Modify the signal mask for the calling thread. The arguments have - the same meaning as for sigprocmask(2). */ -extern int pthread_sigmask (int __how, - __const __sigset_t *__restrict __newmask, - __sigset_t *__restrict __oldmask)__THROW; - -/* Send signal SIGNO to the given thread. */ -extern int pthread_kill (pthread_t __thread, int __signo) __THROW; - -__END_DECLS - -#endif /* bits/sigthread.h */ diff --git a/libc/sysdeps/linux/powerpc/bits/sockaddr.h b/libc/sysdeps/linux/powerpc/bits/sockaddr.h deleted file mode 100644 index 51325f9ed..000000000 --- a/libc/sysdeps/linux/powerpc/bits/sockaddr.h +++ /dev/null @@ -1,43 +0,0 @@ -/* Definition of `struct sockaddr_*' common members. Generic/4.2 BSD version. - Copyright (C) 1995,1996,1997,1998,2000,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. */ - -/* - * Never include this file directly; use <sys/socket.h> instead. - */ - -#ifndef _BITS_SOCKADDR_H -#define _BITS_SOCKADDR_H 1 - -__BEGIN_DECLS - -/* POSIX.1g specifies this type name for the `sa_family' member. */ -typedef unsigned short int sa_family_t; - -/* This macro is used to declare the initial common members - of the data types used for socket addresses, `struct sockaddr', - `struct sockaddr_in', `struct sockaddr_un', etc. */ - -#define __SOCKADDR_COMMON(sa_prefix) \ - sa_family_t sa_prefix##family - -#define __SOCKADDR_COMMON_SIZE (sizeof (unsigned short int)) - -__END_DECLS - -#endif /* bits/sockaddr.h */ diff --git a/libc/sysdeps/linux/powerpc/bits/socket.h b/libc/sysdeps/linux/powerpc/bits/socket.h deleted file mode 100644 index a7e4040e4..000000000 --- a/libc/sysdeps/linux/powerpc/bits/socket.h +++ /dev/null @@ -1,318 +0,0 @@ -/* System-specific socket constants and types. Linux version. - Copyright (C) 1991,1992,1994-1999,2000,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. */ - -#ifndef __BITS_SOCKET_H -#define __BITS_SOCKET_H - -#if !defined _SYS_SOCKET_H && !defined _NETINET_IN_H -# error "Never include <bits/socket.h> directly; use <sys/socket.h> instead." -#endif - -__BEGIN_DECLS - -#define __need_size_t -#define __need_NULL -#include <stddef.h> - -#include <limits.h> -#include <sys/types.h> - -/* Type for length arguments in socket calls. */ -#ifndef __socklen_t_defined -typedef __socklen_t socklen_t; -# define __socklen_t_defined -#endif - -/* Types of sockets. */ -enum __socket_type -{ - SOCK_STREAM = 1, /* Sequenced, reliable, connection-based - byte streams. */ -#define SOCK_STREAM SOCK_STREAM - SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams - of fixed maximum length. */ -#define SOCK_DGRAM SOCK_DGRAM - SOCK_RAW = 3, /* Raw protocol interface. */ -#define SOCK_RAW SOCK_RAW - SOCK_RDM = 4, /* Reliably-delivered messages. */ -#define SOCK_RDM SOCK_RDM - SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, - datagrams of fixed maximum length. */ -#define SOCK_SEQPACKET SOCK_SEQPACKET - SOCK_PACKET = 10 /* Linux specific way of getting packets - at the dev level. For writing rarp and - other similar things on the user level. */ -#define SOCK_PACKET SOCK_PACKET -}; - -/* Protocol families. */ -#define PF_UNSPEC 0 /* Unspecified. */ -#define PF_LOCAL 1 /* Local to host (pipes and file-domain). */ -#define PF_UNIX PF_LOCAL /* Old BSD name for PF_LOCAL. */ -#define PF_FILE PF_LOCAL /* Another non-standard name for PF_LOCAL. */ -#define PF_INET 2 /* IP protocol family. */ -#define PF_AX25 3 /* Amateur Radio AX.25. */ -#define PF_IPX 4 /* Novell Internet Protocol. */ -#define PF_APPLETALK 5 /* Appletalk DDP. */ -#define PF_NETROM 6 /* Amateur radio NetROM. */ -#define PF_BRIDGE 7 /* Multiprotocol bridge. */ -#define PF_ATMPVC 8 /* ATM PVCs. */ -#define PF_X25 9 /* Reserved for X.25 project. */ -#define PF_INET6 10 /* IP version 6. */ -#define PF_ROSE 11 /* Amateur Radio X.25 PLP. */ -#define PF_DECnet 12 /* Reserved for DECnet project. */ -#define PF_NETBEUI 13 /* Reserved for 802.2LLC project. */ -#define PF_SECURITY 14 /* Security callback pseudo AF. */ -#define PF_KEY 15 /* PF_KEY key management API. */ -#define PF_NETLINK 16 -#define PF_ROUTE PF_NETLINK /* Alias to emulate 4.4BSD. */ -#define PF_PACKET 17 /* Packet family. */ -#define PF_ASH 18 /* Ash. */ -#define PF_ECONET 19 /* Acorn Econet. */ -#define PF_ATMSVC 20 /* ATM SVCs. */ -#define PF_SNA 22 /* Linux SNA Project */ -#define PF_IRDA 23 /* IRDA sockets. */ -#define PF_PPPOX 24 /* PPPoX sockets. */ -#define PF_WANPIPE 25 /* Wanpipe API sockets. */ -#define PF_BLUETOOTH 31 /* Bluetooth sockets. */ -#define PF_MAX 32 /* For now.. */ - -/* Address families. */ -#define AF_UNSPEC PF_UNSPEC -#define AF_LOCAL PF_LOCAL -#define AF_UNIX PF_UNIX -#define AF_FILE PF_FILE -#define AF_INET PF_INET -#define AF_AX25 PF_AX25 -#define AF_IPX PF_IPX -#define AF_APPLETALK PF_APPLETALK -#define AF_NETROM PF_NETROM -#define AF_BRIDGE PF_BRIDGE -#define AF_ATMPVC PF_ATMPVC -#define AF_X25 PF_X25 -#define AF_INET6 PF_INET6 -#define AF_ROSE PF_ROSE -#define AF_DECnet PF_DECnet -#define AF_NETBEUI PF_NETBEUI -#define AF_SECURITY PF_SECURITY -#define AF_KEY PF_KEY -#define AF_NETLINK PF_NETLINK -#define AF_ROUTE PF_ROUTE -#define AF_PACKET PF_PACKET -#define AF_ASH PF_ASH -#define AF_ECONET PF_ECONET -#define AF_ATMSVC PF_ATMSVC -#define AF_SNA PF_SNA -#define AF_IRDA PF_IRDA -#define AF_PPPOX PF_PPPOX -#define AF_WANPIPE PF_WANPIPE -#define AF_BLUETOOTH PF_BLUETOOTH -#define AF_MAX PF_MAX - -/* Socket level values. Others are defined in the appropriate headers. - - XXX These definitions also should go into the appropriate headers as - far as they are available. */ -#define SOL_RAW 255 -#define SOL_DECNET 261 -#define SOL_X25 262 -#define SOL_PACKET 263 -#define SOL_ATM 264 /* ATM layer (cell level). */ -#define SOL_AAL 265 /* ATM Adaption Layer (packet level). */ -#define SOL_IRDA 266 - -/* Maximum queue length specifiable by listen. */ -#define SOMAXCONN 128 - -/* Get the definition of the macro to define the common sockaddr members. */ -#include <bits/sockaddr.h> - -/* Structure describing a generic socket address. */ -struct sockaddr - { - __SOCKADDR_COMMON (sa_); /* Common data: address family and length. */ - char sa_data[14]; /* Address data. */ - }; - - -/* Structure large enough to hold any socket address (with the historical - exception of AF_UNIX). We reserve 128 bytes. */ -#if ULONG_MAX > 0xffffffff -# define __ss_aligntype __uint64_t -#else -# define __ss_aligntype __uint32_t -#endif -#define _SS_SIZE 128 -#define _SS_PADSIZE (_SS_SIZE - (2 * sizeof (__ss_aligntype))) - -struct sockaddr_storage - { - __SOCKADDR_COMMON (ss_); /* Address family, etc. */ - __ss_aligntype __ss_align; /* Force desired alignment. */ - char __ss_padding[_SS_PADSIZE]; - }; - - -/* Bits in the FLAGS argument to `send', `recv', et al. */ -enum - { - MSG_OOB = 0x01, /* Process out-of-band data. */ -#define MSG_OOB MSG_OOB - MSG_PEEK = 0x02, /* Peek at incoming messages. */ -#define MSG_PEEK MSG_PEEK - MSG_DONTROUTE = 0x04, /* Don't use local routing. */ -#define MSG_DONTROUTE MSG_DONTROUTE -#ifdef __USE_GNU - /* DECnet uses a different name. */ - MSG_TRYHARD = MSG_DONTROUTE, -# define MSG_TRYHARD MSG_DONTROUTE -#endif - MSG_CTRUNC = 0x08, /* Control data lost before delivery. */ -#define MSG_CTRUNC MSG_CTRUNC - MSG_PROXY = 0x10, /* Supply or ask second address. */ -#define MSG_PROXY MSG_PROXY - MSG_TRUNC = 0x20, -#define MSG_TRUNC MSG_TRUNC - MSG_DONTWAIT = 0x40, /* Nonblocking IO. */ -#define MSG_DONTWAIT MSG_DONTWAIT - MSG_EOR = 0x80, /* End of record. */ -#define MSG_EOR MSG_EOR - MSG_WAITALL = 0x100, /* Wait for a full request. */ -#define MSG_WAITALL MSG_WAITALL - MSG_FIN = 0x200, -#define MSG_FIN MSG_FIN - MSG_SYN = 0x400, -#define MSG_SYN MSG_SYN - MSG_CONFIRM = 0x800, /* Confirm path validity. */ -#define MSG_CONFIRM MSG_CONFIRM - MSG_RST = 0x1000, -#define MSG_RST MSG_RST - MSG_ERRQUEUE = 0x2000, /* Fetch message from error queue. */ -#define MSG_ERRQUEUE MSG_ERRQUEUE - MSG_NOSIGNAL = 0x4000, /* Do not generate SIGPIPE. */ -#define MSG_NOSIGNAL MSG_NOSIGNAL - MSG_MORE = 0x8000 /* Sender will send more. */ -#define MSG_MORE MSG_MORE - }; - - -/* Structure describing messages sent by - `sendmsg' and received by `recvmsg'. */ -struct msghdr - { - void *msg_name; /* Address to send to/receive from. */ - socklen_t msg_namelen; /* Length of address data. */ - - struct iovec *msg_iov; /* Vector of data to send/receive into. */ - int msg_iovlen; /* Number of elements in the vector. */ - - void *msg_control; /* Ancillary data (eg BSD filedesc passing). */ - socklen_t msg_controllen; /* Ancillary data buffer length. */ - - int msg_flags; /* Flags on received message. */ - }; - -/* Structure used for storage of ancillary data object information. */ -struct cmsghdr - { - size_t cmsg_len; /* Length of data in cmsg_data plus length - of cmsghdr structure. */ - int cmsg_level; /* Originating protocol. */ - int cmsg_type; /* Protocol specific type. */ - __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */ - /* XXX Perhaps this should be removed. */ - }; - -/* Ancillary data object manipulation macros. */ -#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2 -# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data) -#else -# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1)) -#endif -#define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg) -#define CMSG_FIRSTHDR(mhdr) \ - ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \ - ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL) -#define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \ - & (size_t) ~(sizeof (size_t) - 1)) -#define CMSG_SPACE(len) (CMSG_ALIGN (len) \ - + CMSG_ALIGN (sizeof (struct cmsghdr))) -#define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len)) - -extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr, - struct cmsghdr *__cmsg) __THROW; -#ifdef __USE_EXTERN_INLINES -# ifndef _EXTERN_INLINE -# define _EXTERN_INLINE extern __inline -# endif -_EXTERN_INLINE struct cmsghdr * -__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW -{ - if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr)) - /* The kernel header does this so there may be a reason. */ - return 0; - - __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg - + CMSG_ALIGN (__cmsg->cmsg_len)); - if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control - + __mhdr->msg_controllen) - || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len) - > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen))) - /* No more entries. */ - return 0; - return __cmsg; -} -#endif /* Use `extern inline'. */ - -/* Socket level message types. This must match the definitions in - <linux/socket.h>. */ -enum - { - SCM_RIGHTS = 0x01, /* Transfer file descriptors. */ -#define SCM_RIGHTS SCM_RIGHTS -#ifdef __USE_BSD - SCM_CREDENTIALS = 0x02, /* Credentials passing. */ -# define SCM_CREDENTIALS SCM_CREDENTIALS -#endif - __SCM_CONNECT = 0x03 /* Data array is `struct scm_connect'. */ - }; - -/* User visible structure for SCM_CREDENTIALS message */ - -struct ucred -{ - pid_t pid; /* PID of sending process. */ - uid_t uid; /* UID of sending process. */ - gid_t gid; /* GID of sending process. */ -}; - -/* Get socket manipulation related informations from kernel headers. */ -#include <asm/socket.h> - - -/* Structure used to manipulate the SO_LINGER option. */ -struct linger - { - int l_onoff; /* Nonzero to linger on close. */ - int l_linger; /* Time to linger. */ - }; - -__END_DECLS - -#endif /* bits/socket.h */ diff --git a/libc/sysdeps/linux/powerpc/bits/statfs.h b/libc/sysdeps/linux/powerpc/bits/statfs.h deleted file mode 100644 index 78c9bdbbc..000000000 --- a/libc/sysdeps/linux/powerpc/bits/statfs.h +++ /dev/null @@ -1,64 +0,0 @@ -/* Copyright (C) 1997, 1998, 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 _SYS_STATFS_H -# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead." -#endif - -#include <bits/types.h> /* for __fsid_t and __fsblkcnt_t*/ - -struct statfs - { - int f_type; - int f_bsize; -#ifndef __USE_FILE_OFFSET64 - __fsblkcnt_t f_blocks; - __fsblkcnt_t f_bfree; - __fsblkcnt_t f_bavail; - __fsfilcnt_t f_files; - __fsfilcnt_t f_ffree; -#else - __fsblkcnt64_t f_blocks; - __fsblkcnt64_t f_bfree; - __fsblkcnt64_t f_bavail; - __fsfilcnt64_t f_files; - __fsfilcnt64_t f_ffree; -#endif - __fsid_t f_fsid; - int f_namelen; - int f_spare[6]; - }; - -#ifdef __USE_LARGEFILE64 -struct statfs64 - { - int f_type; - int f_bsize; - __fsblkcnt64_t f_blocks; - __fsblkcnt64_t f_bfree; - __fsblkcnt64_t f_bavail; - __fsfilcnt64_t f_files; - __fsfilcnt64_t f_ffree; - __fsid_t f_fsid; - int f_namelen; - int f_spare[6]; - }; -#endif - -/* Tell code we have this member. */ -#define _STATFS_F_NAMELEN diff --git a/libc/sysdeps/linux/powerpc/bits/statvfs.h b/libc/sysdeps/linux/powerpc/bits/statvfs.h deleted file mode 100644 index 32e03f31e..000000000 --- a/libc/sysdeps/linux/powerpc/bits/statvfs.h +++ /dev/null @@ -1,99 +0,0 @@ -/* Copyright (C) 1997, 1998, 2000, 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. */ - -#ifndef _SYS_STATVFS_H -# error "Never include <bits/statvfs.h> directly; use <sys/statvfs.h> instead." -#endif - -#include <bits/types.h> /* For __fsblkcnt_t and __fsfilcnt_t. */ - -struct statvfs - { - unsigned long int f_bsize; - unsigned long int f_frsize; -#ifndef __USE_FILE_OFFSET64 - __fsblkcnt_t f_blocks; - __fsblkcnt_t f_bfree; - __fsblkcnt_t f_bavail; - __fsfilcnt_t f_files; - __fsfilcnt_t f_ffree; - __fsfilcnt_t f_favail; -#else - __fsblkcnt64_t f_blocks; - __fsblkcnt64_t f_bfree; - __fsblkcnt64_t f_bavail; - __fsfilcnt64_t f_files; - __fsfilcnt64_t f_ffree; - __fsfilcnt64_t f_favail; -#endif - unsigned long int f_fsid; - int __f_unused; - unsigned long int f_flag; - unsigned long int f_namemax; - int __f_spare[6]; - }; -#define _STATVFSBUF_F_UNUSED - -#ifdef __USE_LARGEFILE64 -struct statvfs64 - { - unsigned long int f_bsize; - unsigned long int f_frsize; - __fsblkcnt64_t f_blocks; - __fsblkcnt64_t f_bfree; - __fsblkcnt64_t f_bavail; - __fsfilcnt64_t f_files; - __fsfilcnt64_t f_ffree; - __fsfilcnt64_t f_favail; - unsigned long int f_fsid; - int __f_unused; - unsigned long int f_flag; - unsigned long int f_namemax; - int __f_spare[6]; - }; -#endif - -/* Definitions for the flag in `f_flag'. These definitions should be - kept in sync which the definitions in <sys/mount.h>. */ -enum -{ - ST_RDONLY = 1, /* Mount read-only. */ -#define ST_RDONLY ST_RDONLY - ST_NOSUID = 2, /* Ignore suid and sgid bits. */ -#define ST_NOSUID ST_NOSUID -#ifdef __USE_GNU - ST_NODEV = 4, /* Disallow access to device special files. */ -# define ST_NODEV ST_NODEV - ST_NOEXEC = 8, /* Disallow program execution. */ -# define ST_NOEXEC ST_NOEXEC - ST_SYNCHRONOUS = 16, /* Writes are synced at once. */ -# define ST_SYNCHRONOUS ST_SYNCHRONOUS - ST_MANDLOCK = 64, /* Allow mandatory locks on an FS. */ -# define ST_MANDLOCK ST_MANDLOCK - ST_WRITE = 128, /* Write on file/directory/symlink. */ -# define ST_WRITE ST_WRITE - ST_APPEND = 256, /* Append-only file. */ -# define ST_APPEND ST_APPEND - ST_IMMUTABLE = 512, /* Immutable file. */ -# define ST_IMMUTABLE ST_IMMUTABLE - ST_NOATIME = 1024, /* Do not update access times. */ -# define ST_NOATIME ST_NOATIME - ST_NODIRATIME /* Do not update directory access times. */ -# define ST_NODIRATIME ST_NODIRATIME -#endif /* Use GNU. */ -}; diff --git a/libc/sysdeps/linux/powerpc/bits/stdio-lock.h b/libc/sysdeps/linux/powerpc/bits/stdio-lock.h deleted file mode 100644 index a1893c8bd..000000000 --- a/libc/sysdeps/linux/powerpc/bits/stdio-lock.h +++ /dev/null @@ -1,50 +0,0 @@ -/* Thread package specific definitions of stream lock type. - Copyright (C) 1996, 1997, 1998, 2000, 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include <pthread.h> - -typedef pthread_mutex_t _IO_lock_t; - -/* We need recursive (counting) mutexes. */ -#define _IO_lock_initializer PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP - - -#define _IO_cleanup_region_start(_fct, _fp) \ - { struct _pthread_cleanup_buffer _buffer; \ - int _avail = (((_fp)->_flags & _IO_USER_LOCK) == 0 \ - && _pthread_cleanup_push_defer != NULL); \ - if (_avail) { \ - _pthread_cleanup_push_defer (&_buffer, (_fct), (_fp)); \ - } -#define _IO_cleanup_region_start_noarg(_fct) \ - { struct _pthread_cleanup_buffer _buffer; \ - int _avail = _pthread_cleanup_push_defer != NULL; \ - if (_avail) { \ - _pthread_cleanup_push_defer (&_buffer, (_fct), NULL); \ - } -#define _IO_cleanup_region_end(_doit) \ - __libc_cleanup_region_end (_doit) -#define _IO_lock_init(_name) \ - __libc_lock_init_recursive (_name) -#define _IO_lock_fini(_name) \ - __libc_lock_fini_recursive (_name) -#define _IO_lock_lock(_name) \ - __libc_lock_lock (_name) -#define _IO_lock_unlock(_name) \ - __libc_lock_unlock (_name) diff --git a/libc/sysdeps/linux/powerpc/bits/stdio.h b/libc/sysdeps/linux/powerpc/bits/stdio.h deleted file mode 100644 index 118118adc..000000000 --- a/libc/sysdeps/linux/powerpc/bits/stdio.h +++ /dev/null @@ -1,169 +0,0 @@ -/* Optimizing macros and inline functions for stdio functions. - Copyright (C) 1998, 2000, 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. */ - -#ifndef _STDIO_H -# error "Never include <bits/stdio.h> directly; use <stdio.h> instead." -#endif - -#ifdef __cplusplus -# define __STDIO_INLINE inline -#else -# define __STDIO_INLINE extern __inline -#endif - - -#ifdef __USE_EXTERN_INLINES -/* Write formatted output to stdout from argument list ARG. */ -__STDIO_INLINE int -vprintf (__const char *__restrict __fmt, _G_va_list __arg) __THROW -{ - return vfprintf (stdout, __fmt, __arg); -} - -/* Read a character from stdin. */ -__STDIO_INLINE int -getchar (void) __THROW -{ - return _IO_getc (stdin); -} - - -# if defined __USE_POSIX || defined __USE_MISC -/* This is defined in POSIX.1:1996. */ -__STDIO_INLINE int -getc_unlocked (FILE *__fp) __THROW -{ - return _IO_getc_unlocked (__fp); -} - -/* This is defined in POSIX.1:1996. */ -__STDIO_INLINE int -getchar_unlocked (void) __THROW -{ - return _IO_getc_unlocked (stdin); -} -# endif /* POSIX || misc */ - - -/* Write a character to stdout. */ -__STDIO_INLINE int -putchar (int __c) __THROW -{ - return _IO_putc (__c, stdout); -} - - -# ifdef __USE_MISC -/* Faster version when locking is not necessary. */ -__STDIO_INLINE int -fputc_unlocked (int __c, FILE *__stream) __THROW -{ - return _IO_putc_unlocked (__c, __stream); -} -# endif /* misc */ - - -# if defined __USE_POSIX || defined __USE_MISC -/* This is defined in POSIX.1:1996. */ -__STDIO_INLINE int -putc_unlocked (int __c, FILE *__stream) __THROW -{ - return _IO_putc_unlocked (__c, __stream); -} - -/* This is defined in POSIX.1:1996. */ -__STDIO_INLINE int -putchar_unlocked (int __c) __THROW -{ - return _IO_putc_unlocked (__c, stdout); -} -# endif /* POSIX || misc */ - - -# ifdef __USE_GNU -/* Like `getdelim', but reads up to a newline. */ -__STDIO_INLINE _IO_ssize_t -getline (char **__lineptr, size_t *__n, FILE *__stream) __THROW -{ - return __getdelim (__lineptr, __n, '\n', __stream); -} -# endif /* GNU */ - - -# ifdef __USE_MISC -/* Faster versions when locking is not required. */ -__STDIO_INLINE int -feof_unlocked (FILE *__stream) __THROW -{ - return _IO_feof_unlocked (__stream); -} - -/* Faster versions when locking is not required. */ -__STDIO_INLINE int -ferror_unlocked (FILE *__stream) __THROW -{ - return _IO_ferror_unlocked (__stream); -} -# endif /* misc */ - -#endif /* Use extern inlines. */ - - -#if defined __USE_MISC && defined __GNUC__ && defined __OPTIMIZE__ -/* Perform some simple optimizations. */ -# define fread_unlocked(ptr, size, n, stream) \ - (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) \ - && (size_t) ((size) * (n)) <= 8 && (size) != 0) \ - ? ({ char *__ptr = (char *) (ptr); \ - FILE *__stream = (stream); \ - size_t __cnt; \ - for (__cnt = (size) * (n); __cnt > 0; --__cnt) \ - { \ - int __c = _IO_getc_unlocked (__stream); \ - if (__c == EOF) \ - break; \ - *__ptr++ = __c; \ - } \ - ((size_t) ((size) * (n)) - __cnt) / (size); }) \ - : (((__builtin_constant_p (size) && (size) == 0) \ - || (__builtin_constant_p (n) && (n) == 0)) \ - /* Evaluate all parameters once. */ \ - ? ((void) (ptr), (void) (stream), (void) (size), \ - (void) (n), 0) \ - : fread_unlocked (ptr, size, n, stream)))) - -# define fwrite_unlocked(ptr, size, n, stream) \ - (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) \ - && (size_t) ((size) * (n)) <= 8 && (size) != 0) \ - ? ({ const char *__ptr = (const char *) (ptr); \ - FILE *__stream = (stream); \ - size_t __cnt; \ - for (__cnt = (size) * (n); __cnt > 0; --__cnt) \ - if (_IO_putc_unlocked (*__ptr++, __stream) == EOF) \ - break; \ - ((size_t) ((size) * (n)) - __cnt) / (size); }) \ - : (((__builtin_constant_p (size) && (size) == 0) \ - || (__builtin_constant_p (n) && (n) == 0)) \ - /* Evaluate all parameters once. */ \ - ? ((void) (ptr), (void) (stream), (void) (size), n) \ - : fwrite_unlocked (ptr, size, n, stream)))) -#endif - -/* Define helper macro. */ -#undef __STDIO_INLINE diff --git a/libc/sysdeps/linux/powerpc/bits/stdio_lim.h b/libc/sysdeps/linux/powerpc/bits/stdio_lim.h deleted file mode 100644 index c0aabd398..000000000 --- a/libc/sysdeps/linux/powerpc/bits/stdio_lim.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (C) 1994, 1997, 1998, 1999 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. */ - -#if !defined _STDIO_H && !defined __need_FOPEN_MAX && !defined __need_IOV_MAX -# error "Never include <bits/stdio_lim.h> directly; use <stdio.h> instead." -#endif - -#ifdef _STDIO_H -# define L_tmpnam 20 -# define TMP_MAX 238328 -# define FILENAME_MAX 255 - -# ifdef __USE_POSIX -# define L_ctermid 9 -# define L_cuserid 9 -# endif -#endif - -#if defined __need_FOPEN_MAX || defined _STDIO_H -# undef FOPEN_MAX -# define FOPEN_MAX 16 -#endif - -#if defined __need_IOV_MAX && !defined IOV_MAX -# define IOV_MAX 1024 -#endif diff --git a/libc/sysdeps/linux/powerpc/bits/string.h b/libc/sysdeps/linux/powerpc/bits/string.h deleted file mode 100644 index ad68b038b..000000000 --- a/libc/sysdeps/linux/powerpc/bits/string.h +++ /dev/null @@ -1,12 +0,0 @@ -/* This file should provide inline versions of string functions. - - Surround GCC-specific parts with #ifdef __GNUC__, and use `extern __inline'. - - This file should define __STRING_INLINES if functions are actually defined - as inlines. */ - -#ifndef _BITS_STRING_H -#define _BITS_STRING_H 1 - - -#endif /* bits/string.h */ diff --git a/libc/sysdeps/linux/powerpc/bits/string2.h b/libc/sysdeps/linux/powerpc/bits/string2.h deleted file mode 100644 index e2e5c0053..000000000 --- a/libc/sysdeps/linux/powerpc/bits/string2.h +++ /dev/null @@ -1,1244 +0,0 @@ -/* Machine-independant string function optimizations. - Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. - - 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 _STRING_H -# error "Never use <bits/string2.h> directly; include <string.h> instead." -#endif - -#if !defined __NO_STRING_INLINES && !defined __BOUNDED_POINTERS__ - -/* Unlike the definitions in the header <bits/string.h> the - definitions contained here are not optimized down to assembler - level. Those optimizations are not always a good idea since this - means the code size increases a lot. Instead the definitions here - optimize some functions in a way which do not dramatically - increase the code size and which do not use assembler. The main - trick is to use GNU CC's `__builtin_constant_p' function. - - Every function XXX which has a defined version in - <bits/string.h> must be accompanied by a symbol _HAVE_STRING_ARCH_XXX - to make sure we don't get redefinitions. - - We must use here macros instead of inline functions since the - trick won't work with the latter. */ - -#ifndef __STRING_INLINE -# ifdef __cplusplus -# define __STRING_INLINE inline -# else -# define __STRING_INLINE extern __inline -# endif -#endif - -#if _STRING_ARCH_unaligned -/* If we can do unaligned memory accesses we must know the endianess. */ -# include <endian.h> -# include <bits/types.h> - -# if __BYTE_ORDER == __LITTLE_ENDIAN -# define __STRING2_SMALL_GET16(src, idx) \ - (((__const unsigned char *) (__const char *) (src))[idx + 1] << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx]) -# define __STRING2_SMALL_GET32(src, idx) \ - (((((__const unsigned char *) (__const char *) (src))[idx + 3] << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 2]) << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 1]) << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx]) -# else -# define __STRING2_SMALL_GET16(src, idx) \ - (((__const unsigned char *) (__const char *) (src))[idx] << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 1]) -# define __STRING2_SMALL_GET32(src, idx) \ - (((((__const unsigned char *) (__const char *) (src))[idx] << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 1]) << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 2]) << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 3]) -# endif -#else -/* These are a few types we need for the optimizations if we cannot - use unaligned memory accesses. */ -# define __STRING2_COPY_TYPE(N) \ - typedef struct { unsigned char __arr[N]; } \ - __STRING2_COPY_ARR##N __attribute__ ((packed)) -__STRING2_COPY_TYPE (2); -__STRING2_COPY_TYPE (3); -__STRING2_COPY_TYPE (4); -__STRING2_COPY_TYPE (5); -__STRING2_COPY_TYPE (6); -__STRING2_COPY_TYPE (7); -__STRING2_COPY_TYPE (8); -# undef __STRING2_COPY_TYPE -#endif - -/* Dereferencing a pointer arg to run sizeof on it fails for the void - pointer case, so we use this instead. - Note that __x is evaluated twice. */ -#define __string2_1bptr_p(__x) \ - ((size_t)(const void *)((__x) + 1) - (size_t)(const void *)(__x) == 1) - -/* Set N bytes of S to C. */ -#ifndef _HAVE_STRING_ARCH_memset -# if _STRING_ARCH_unaligned -# define memset(s, c, n) \ - (__extension__ (__builtin_constant_p (n) && (n) <= 16 \ - ? ((n) == 1 \ - ? __memset_1 (s, c) \ - : __memset_gc (s, c, n)) \ - : (__builtin_constant_p (c) && (c) == '\0' \ - ? ({ void *__s = (s); __bzero (__s, n); __s; }) \ - : memset (s, c, n)))) - -# define __memset_1(s, c) ({ void *__s = (s); \ - *((__uint8_t *) __s) = (__uint8_t) c; __s; }) - -# define __memset_gc(s, c, n) \ - ({ void *__s = (s); \ - union { \ - unsigned int __ui; \ - unsigned short int __usi; \ - unsigned char __uc; \ - } *__u = __s; \ - __uint8_t __c = (__uint8_t) (c); \ - \ - /* This `switch' statement will be removed at compile-time. */ \ - switch ((unsigned int) (n)) \ - { \ - case 15: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 11: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 7: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 3: \ - __u->__usi = (unsigned short int) __c * 0x0101; \ - __u = __extension__ (void *)((char *) __u + 2); \ - __u->__uc = (unsigned char) __c; \ - break; \ - \ - case 14: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 10: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 6: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 2: \ - __u->__usi = (unsigned short int) __c * 0x0101; \ - break; \ - \ - case 13: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 9: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 5: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 1: \ - __u->__uc = (unsigned char) __c; \ - break; \ - \ - case 16: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 12: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 8: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 4: \ - __u->__ui = __c * 0x01010101; \ - case 0: \ - break; \ - } \ - \ - __s; }) -# else -# define memset(s, c, n) \ - (__extension__ (__builtin_constant_p (c) && (c) == '\0' \ - ? ({ void *__s = (s); __bzero (__s, n); __s; }) \ - : memset (s, c, n))) -# endif - -/* GCC optimizes memset(s, 0, n) but not bzero(s, n). - The optimization is broken before EGCS 1.1. */ -# if __GNUC_PREREQ (2, 91) -# define __bzero(s, n) __builtin_memset (s, '\0', n) -# endif - -#endif - - -/* Copy N bytes from SRC to DEST, returning pointer to byte following the - last copied. */ -#ifdef __USE_GNU -# ifndef _HAVE_STRING_ARCH_mempcpy -# define __mempcpy(dest, src, n) \ - (__extension__ (__builtin_constant_p (src) && __builtin_constant_p (n) \ - && __string2_1bptr_p (src) && n <= 8 \ - ? __mempcpy_small (dest, __mempcpy_args (src), n) \ - : __mempcpy (dest, src, n))) -/* In glibc we use this function frequently but for namespace reasons - we have to use the name `__mempcpy'. */ -# define mempcpy(dest, src, n) __mempcpy (dest, src, n) - -# if _STRING_ARCH_unaligned -# define __mempcpy_args(src) \ - ((__const char *) (src))[0], ((__const char *) (src))[2], \ - ((__const char *) (src))[4], ((__const char *) (src))[6], \ - __extension__ __STRING2_SMALL_GET16 (src, 0), \ - __extension__ __STRING2_SMALL_GET16 (src, 4), \ - __extension__ __STRING2_SMALL_GET32 (src, 0), \ - __extension__ __STRING2_SMALL_GET32 (src, 4) -__STRING_INLINE void *__mempcpy_small (void *, char, char, char, char, - __uint16_t, __uint16_t, __uint32_t, - __uint32_t, size_t); -__STRING_INLINE void * -__mempcpy_small (void *__dest1, - char __src0_1, char __src2_1, char __src4_1, char __src6_1, - __uint16_t __src0_2, __uint16_t __src4_2, - __uint32_t __src0_4, __uint32_t __src4_4, - size_t __srclen) -{ - union { - __uint32_t __ui; - __uint16_t __usi; - unsigned char __uc; - unsigned char __c; - } *__u = __dest1; - switch ((unsigned int) __srclen) - { - case 1: - __u->__c = __src0_1; - __u = __extension__ (void *)((char *) __u + 1); - break; - case 2: - __u->__usi = __src0_2; - __u = __extension__ (void *)((char *) __u + 2); - break; - case 3: - __u->__usi = __src0_2; - __u = __extension__ (void *)((char *) __u + 2); - __u->__c = __src2_1; - __u = __extension__ (void *)((char *) __u + 1); - break; - case 4: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - break; - case 5: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__c = __src4_1; - __u = __extension__ (void *)((char *) __u + 1); - break; - case 6: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__usi = __src4_2; - __u = __extension__ (void *)((char *) __u + 2); - break; - case 7: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__usi = __src4_2; - __u = __extension__ (void *)((char *) __u + 2); - __u->__c = __src6_1; - __u = __extension__ (void *)((char *) __u + 1); - break; - case 8: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__ui = __src4_4; - __u = __extension__ (void *)((char *) __u + 4); - break; - } - return (void *) __u; -} -# else -# define __mempcpy_args(src) \ - ((__const char *) (src))[0], \ - __extension__ ((__STRING2_COPY_ARR2) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1] } }), \ - __extension__ ((__STRING2_COPY_ARR3) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2] } }), \ - __extension__ ((__STRING2_COPY_ARR4) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3] } }), \ - __extension__ ((__STRING2_COPY_ARR5) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4] } }), \ - __extension__ ((__STRING2_COPY_ARR6) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5] } }), \ - __extension__ ((__STRING2_COPY_ARR7) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - ((__const char *) (src))[6] } }), \ - __extension__ ((__STRING2_COPY_ARR8) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - ((__const char *) (src))[6], ((__const char *) (src))[7] } }) -__STRING_INLINE void *__mempcpy_small (void *, char, __STRING2_COPY_ARR2, - __STRING2_COPY_ARR3, - __STRING2_COPY_ARR4, - __STRING2_COPY_ARR5, - __STRING2_COPY_ARR6, - __STRING2_COPY_ARR7, - __STRING2_COPY_ARR8, size_t); -__STRING_INLINE void * -__mempcpy_small (void *__dest, char __src1, - __STRING2_COPY_ARR2 __src2, __STRING2_COPY_ARR3 __src3, - __STRING2_COPY_ARR4 __src4, __STRING2_COPY_ARR5 __src5, - __STRING2_COPY_ARR6 __src6, __STRING2_COPY_ARR7 __src7, - __STRING2_COPY_ARR8 __src8, size_t __srclen) -{ - union { - char __c; - __STRING2_COPY_ARR2 __sca2; - __STRING2_COPY_ARR3 __sca3; - __STRING2_COPY_ARR4 __sca4; - __STRING2_COPY_ARR5 __sca5; - __STRING2_COPY_ARR6 __sca6; - __STRING2_COPY_ARR7 __sca7; - __STRING2_COPY_ARR8 __sca8; - } *__u = __dest; - switch ((unsigned int) __srclen) - { - case 1: - __u->__c = __src1; - break; - case 2: - __extension__ __u->__sca2 = __src2; - break; - case 3: - __extension__ __u->__sca3 = __src3; - break; - case 4: - __extension__ __u->__sca4 = __src4; - break; - case 5: - __extension__ __u->__sca5 = __src5; - break; - case 6: - __extension__ __u->__sca6 = __src6; - break; - case 7: - __extension__ __u->__sca7 = __src7; - break; - case 8: - __extension__ __u->__sca8 = __src8; - break; - } - return __extension__ (void *)((char *) __u + __srclen); -} -# endif -# endif -#endif - - -/* Return pointer to C in S. */ -#ifndef _HAVE_STRING_ARCH_strchr -extern void *__rawmemchr (const void *__s, int __c); -# define strchr(s, c) \ - (__extension__ (__builtin_constant_p (c) && (c) == '\0' \ - ? (char *) __rawmemchr (s, c) \ - : strchr (s, c))) -#endif - - -/* Copy SRC to DEST. */ -#ifndef _HAVE_STRING_ARCH_strcpy -# define strcpy(dest, src) \ - (__extension__ (__builtin_constant_p (src) \ - ? (__string2_1bptr_p (src) && strlen (src) + 1 <= 8 \ - ? __strcpy_small (dest, __strcpy_args (src), \ - strlen (src) + 1) \ - : (char *) memcpy (dest, src, strlen (src) + 1)) \ - : strcpy (dest, src))) - -# if _STRING_ARCH_unaligned -# define __strcpy_args(src) \ - __extension__ __STRING2_SMALL_GET16 (src, 0), \ - __extension__ __STRING2_SMALL_GET16 (src, 4), \ - __extension__ __STRING2_SMALL_GET32 (src, 0), \ - __extension__ __STRING2_SMALL_GET32 (src, 4) -__STRING_INLINE char *__strcpy_small (char *, __uint16_t, __uint16_t, - __uint32_t, __uint32_t, size_t); -__STRING_INLINE char * -__strcpy_small (char *__dest, - __uint16_t __src0_2, __uint16_t __src4_2, - __uint32_t __src0_4, __uint32_t __src4_4, - size_t __srclen) -{ - union { - __uint32_t __ui; - __uint16_t __usi; - unsigned char __uc; - } *__u = (void *) __dest; - switch ((unsigned int) __srclen) - { - case 1: - __u->__uc = '\0'; - break; - case 2: - __u->__usi = __src0_2; - break; - case 3: - __u->__usi = __src0_2; - __u = __extension__ (void *)((char *) __u + 2); - __u->__uc = '\0'; - break; - case 4: - __u->__ui = __src0_4; - break; - case 5: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__uc = '\0'; - break; - case 6: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__usi = __src4_2; - break; - case 7: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__usi = __src4_2; - __u = __extension__ (void *)((char *) __u + 2); - __u->__uc = '\0'; - break; - case 8: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__ui = __src4_4; - break; - } - return __dest; -} -# else -# define __strcpy_args(src) \ - __extension__ ((__STRING2_COPY_ARR2) \ - { { ((__const char *) (src))[0], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR3) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR4) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR5) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR6) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR7) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR8) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - ((__const char *) (src))[6], '\0' } }) -__STRING_INLINE char *__strcpy_small (char *, __STRING2_COPY_ARR2, - __STRING2_COPY_ARR3, - __STRING2_COPY_ARR4, - __STRING2_COPY_ARR5, - __STRING2_COPY_ARR6, - __STRING2_COPY_ARR7, - __STRING2_COPY_ARR8, size_t); -__STRING_INLINE char * -__strcpy_small (char *__dest, - __STRING2_COPY_ARR2 __src2, __STRING2_COPY_ARR3 __src3, - __STRING2_COPY_ARR4 __src4, __STRING2_COPY_ARR5 __src5, - __STRING2_COPY_ARR6 __src6, __STRING2_COPY_ARR7 __src7, - __STRING2_COPY_ARR8 __src8, size_t __srclen) -{ - union { - char __c; - __STRING2_COPY_ARR2 __sca2; - __STRING2_COPY_ARR3 __sca3; - __STRING2_COPY_ARR4 __sca4; - __STRING2_COPY_ARR5 __sca5; - __STRING2_COPY_ARR6 __sca6; - __STRING2_COPY_ARR7 __sca7; - __STRING2_COPY_ARR8 __sca8; - } *__u = (void *) __dest; - switch ((unsigned int) __srclen) - { - case 1: - __u->__c = '\0'; - break; - case 2: - __extension__ __u->__sca2 = __src2; - break; - case 3: - __extension__ __u->__sca3 = __src3; - break; - case 4: - __extension__ __u->__sca4 = __src4; - break; - case 5: - __extension__ __u->__sca5 = __src5; - break; - case 6: - __extension__ __u->__sca6 = __src6; - break; - case 7: - __extension__ __u->__sca7 = __src7; - break; - case 8: - __extension__ __u->__sca8 = __src8; - break; - } - return __dest; -} -# endif -#endif - - -/* Copy SRC to DEST, returning pointer to final NUL byte. */ -#ifdef __USE_GNU -# ifndef _HAVE_STRING_ARCH_stpcpy -# define __stpcpy(dest, src) \ - (__extension__ (__builtin_constant_p (src) \ - ? (__string2_1bptr_p (src) && strlen (src) + 1 <= 8 \ - ? __stpcpy_small (dest, __stpcpy_args (src), \ - strlen (src) + 1) \ - : ((char *) __mempcpy (dest, src, strlen (src) + 1) - 1))\ - : __stpcpy (dest, src))) -/* In glibc we use this function frequently but for namespace reasons - we have to use the name `__stpcpy'. */ -# define stpcpy(dest, src) __stpcpy (dest, src) - -# if _STRING_ARCH_unaligned -# define __stpcpy_args(src) \ - __extension__ __STRING2_SMALL_GET16 (src, 0), \ - __extension__ __STRING2_SMALL_GET16 (src, 4), \ - __extension__ __STRING2_SMALL_GET32 (src, 0), \ - __extension__ __STRING2_SMALL_GET32 (src, 4) -__STRING_INLINE char *__stpcpy_small (char *, __uint16_t, __uint16_t, - __uint32_t, __uint32_t, size_t); -__STRING_INLINE char * -__stpcpy_small (char *__dest, - __uint16_t __src0_2, __uint16_t __src4_2, - __uint32_t __src0_4, __uint32_t __src4_4, - size_t __srclen) -{ - union { - unsigned int __ui; - unsigned short int __usi; - unsigned char __uc; - char __c; - } *__u = (void *) __dest; - switch ((unsigned int) __srclen) - { - case 1: - __u->__uc = '\0'; - break; - case 2: - __u->__usi = __src0_2; - __u = __extension__ (void *)((char *) __u + 1); - break; - case 3: - __u->__usi = __src0_2; - __u = __extension__ (void *)((char *) __u + 2); - __u->__uc = '\0'; - break; - case 4: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 3); - break; - case 5: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__uc = '\0'; - break; - case 6: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__usi = __src4_2; - __u = __extension__ (void *)((char *) __u + 1); - break; - case 7: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__usi = __src4_2; - __u = __extension__ (void *)((char *) __u + 2); - __u->__uc = '\0'; - break; - case 8: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__ui = __src4_4; - __u = __extension__ (void *)((char *) __u + 3); - break; - } - return &__u->__c; -} -# else -# define __stpcpy_args(src) \ - __extension__ ((__STRING2_COPY_ARR2) \ - { { ((__const char *) (src))[0], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR3) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR4) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR5) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR6) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR7) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR8) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - ((__const char *) (src))[6], '\0' } }) -__STRING_INLINE char *__stpcpy_small (char *, __STRING2_COPY_ARR2, - __STRING2_COPY_ARR3, - __STRING2_COPY_ARR4, - __STRING2_COPY_ARR5, - __STRING2_COPY_ARR6, - __STRING2_COPY_ARR7, - __STRING2_COPY_ARR8, size_t); -__STRING_INLINE char * -__stpcpy_small (char *__dest, - __STRING2_COPY_ARR2 __src2, __STRING2_COPY_ARR3 __src3, - __STRING2_COPY_ARR4 __src4, __STRING2_COPY_ARR5 __src5, - __STRING2_COPY_ARR6 __src6, __STRING2_COPY_ARR7 __src7, - __STRING2_COPY_ARR8 __src8, size_t __srclen) -{ - union { - char __c; - __STRING2_COPY_ARR2 __sca2; - __STRING2_COPY_ARR3 __sca3; - __STRING2_COPY_ARR4 __sca4; - __STRING2_COPY_ARR5 __sca5; - __STRING2_COPY_ARR6 __sca6; - __STRING2_COPY_ARR7 __sca7; - __STRING2_COPY_ARR8 __sca8; - } *__u = (void *) __dest; - switch ((unsigned int) __srclen) - { - case 1: - __u->__c = '\0'; - break; - case 2: - __extension__ __u->__sca2 = __src2; - break; - case 3: - __extension__ __u->__sca3 = __src3; - break; - case 4: - __extension__ __u->__sca4 = __src4; - break; - case 5: - __extension__ __u->__sca5 = __src5; - break; - case 6: - __extension__ __u->__sca6 = __src6; - break; - case 7: - __extension__ __u->__sca7 = __src7; - break; - case 8: - __extension__ __u->__sca8 = __src8; - break; - } - return __dest + __srclen - 1; -} -# endif -# endif -#endif - - -/* Copy no more than N characters of SRC to DEST. */ -#ifndef _HAVE_STRING_ARCH_strncpy -# if defined _USE_STRING_ARCH_memset && defined _USE_STRING_ARCH_mempcpy -# define strncpy(dest, src, n) \ - (__extension__ ({ char *__dest = (dest); \ - __builtin_constant_p (src) && __builtin_constant_p (n) \ - ? (strlen (src) + 1 >= ((size_t) (n)) \ - ? (char *) memcpy (__dest, src, n) \ - : (memset (__mempcpy (__dest, src, strlen (src)), \ - '\0', n - strlen (src)), \ - __dest)) \ - : strncpy (__dest, src, n); })) -# else -# define strncpy(dest, src, n) \ - (__extension__ (__builtin_constant_p (src) && __builtin_constant_p (n) \ - ? (strlen (src) + 1 >= ((size_t) (n)) \ - ? (char *) memcpy (dest, src, n) \ - : strncpy (dest, src, n)) \ - : strncpy (dest, src, n))) -# endif -#endif - - -/* Append no more than N characters from SRC onto DEST. */ -#ifndef _HAVE_STRING_ARCH_strncat -# ifdef _USE_STRING_ARCH_strchr -# define strncat(dest, src, n) \ - (__extension__ ({ char *__dest = (dest); \ - __builtin_constant_p (src) && __builtin_constant_p (n) \ - ? (strlen (src) < ((size_t) (n)) \ - ? strcat (__dest, src) \ - : (*((char *) __mempcpy (strchr (__dest, '\0'), \ - src, n)) = '\0', __dest)) \ - : strncat (dest, src, n); })) -# else -# define strncat(dest, src, n) \ - (__extension__ (__builtin_constant_p (src) && __builtin_constant_p (n) \ - ? (strlen (src) < ((size_t) (n)) \ - ? strcat (dest, src) \ - : strncat (dest, src, n)) \ - : strncat (dest, src, n))) -# endif -#endif - - -/* Compare characters of S1 and S2. */ -#ifndef _HAVE_STRING_ARCH_strcmp -# define strcmp(s1, s2) \ - __extension__ \ - ({ size_t __s1_len, __s2_len; \ - (__builtin_constant_p (s1) && __builtin_constant_p (s2) \ - && (__s1_len = strlen (s1), __s2_len = strlen (s2), \ - (!__string2_1bptr_p (s1) || __s1_len >= 4) \ - && (!__string2_1bptr_p (s2) || __s2_len >= 4)) \ - ? memcmp ((__const char *) (s1), (__const char *) (s2), \ - (__s1_len < __s2_len ? __s1_len : __s2_len) + 1) \ - : (__builtin_constant_p (s1) && __string2_1bptr_p (s1) \ - && (__s1_len = strlen (s1), __s1_len < 4) \ - ? (__builtin_constant_p (s2) && __string2_1bptr_p (s2) \ - ? __strcmp_cc (s1, s2, __s1_len) \ - : __strcmp_cg (s1, s2, __s1_len)) \ - : (__builtin_constant_p (s2) && __string2_1bptr_p (s2) \ - && (__s2_len = strlen (s2), __s2_len < 4) \ - ? (__builtin_constant_p (s1) && __string2_1bptr_p (s1) \ - ? __strcmp_cc (s1, s2, __s2_len) \ - : __strcmp_gc (s1, s2, __s2_len)) \ - : strcmp (s1, s2)))); }) - -# define __strcmp_cc(s1, s2, l) \ - (__extension__ ({ register int __result = \ - (((__const unsigned char *) (__const char *) (s1))[0] \ - - ((__const unsigned char *) (__const char *)(s2))[0]);\ - if (l > 0 && __result == 0) \ - { \ - __result = (((__const unsigned char *) \ - (__const char *) (s1))[1] \ - - ((__const unsigned char *) \ - (__const char *) (s2))[1]); \ - if (l > 1 && __result == 0) \ - { \ - __result = \ - (((__const unsigned char *) \ - (__const char *) (s1))[2] \ - - ((__const unsigned char *) \ - (__const char *) (s2))[2]); \ - if (l > 2 && __result == 0) \ - __result = \ - (((__const unsigned char *) \ - (__const char *) (s1))[3] \ - - ((__const unsigned char *) \ - (__const char *) (s2))[3]); \ - } \ - } \ - __result; })) - -# define __strcmp_cg(s1, s2, l1) \ - (__extension__ ({ __const unsigned char *__s2 = \ - (__const unsigned char *) (__const char *) (s2); \ - register int __result = \ - (((__const unsigned char *) (__const char *) (s1))[0] \ - - __s2[0]); \ - if (l1 > 0 && __result == 0) \ - { \ - __result = (((__const unsigned char *) \ - (__const char *) (s1))[1] - __s2[1]); \ - if (l1 > 1 && __result == 0) \ - { \ - __result = (((__const unsigned char *) \ - (__const char *) (s1))[2] - __s2[2]);\ - if (l1 > 2 && __result == 0) \ - __result = (((__const unsigned char *) \ - (__const char *) (s1))[3] \ - - __s2[3]); \ - } \ - } \ - __result; })) - -# define __strcmp_gc(s1, s2, l2) \ - (__extension__ ({ __const unsigned char *__s1 = \ - (__const unsigned char *) (__const char *) (s1); \ - register int __result = \ - __s1[0] - ((__const unsigned char *) \ - (__const char *) (s2))[0]; \ - if (l2 > 0 && __result == 0) \ - { \ - __result = (__s1[1] \ - - ((__const unsigned char *) \ - (__const char *) (s2))[1]); \ - if (l2 > 1 && __result == 0) \ - { \ - __result = \ - (__s1[2] - ((__const unsigned char *) \ - (__const char *) (s2))[2]); \ - if (l2 > 2 && __result == 0) \ - __result = \ - (__s1[3] \ - - ((__const unsigned char *) \ - (__const char *) (s2))[3]); \ - } \ - } \ - __result; })) -#endif - - -/* Compare N characters of S1 and S2. */ -#ifndef _HAVE_STRING_ARCH_strncmp -# define strncmp(s1, s2, n) \ - (__extension__ (__builtin_constant_p (n) \ - && ((__builtin_constant_p (s1) \ - && strlen (s1) < ((size_t) (n))) \ - || (__builtin_constant_p (s2) \ - && strlen (s2) < ((size_t) (n)))) \ - ? strcmp (s1, s2) : strncmp (s1, s2, n))) -#endif - - -/* Return the length of the initial segment of S which - consists entirely of characters not in REJECT. */ -#ifndef _HAVE_STRING_ARCH_strcspn -# define strcspn(s, reject) \ - __extension__ \ - ({ char __r0, __r1, __r2; \ - (__builtin_constant_p (reject) && __string2_1bptr_p (reject) \ - ? ((__r0 = ((__const char *) (reject))[0], __r0 == '\0') \ - ? strlen (s) \ - : ((__r1 = ((__const char *) (reject))[1], __r1 == '\0') \ - ? __strcspn_c1 (s, __r0) \ - : ((__r2 = ((__const char *) (reject))[2], __r2 == '\0') \ - ? __strcspn_c2 (s, __r0, __r1) \ - : (((__const char *) (reject))[3] == '\0' \ - ? __strcspn_c3 (s, __r0, __r1, __r2) \ - : strcspn (s, reject))))) \ - : strcspn (s, reject)); }) - -__STRING_INLINE size_t __strcspn_c1 (__const char *__s, char __reject); -__STRING_INLINE size_t -__strcspn_c1 (__const char *__s, char __reject) -{ - register size_t __result = 0; - while (__s[__result] != '\0' && __s[__result] != __reject) - ++__result; - return __result; -} - -__STRING_INLINE size_t __strcspn_c2 (__const char *__s, char __reject1, - char __reject2); -__STRING_INLINE size_t -__strcspn_c2 (__const char *__s, char __reject1, char __reject2) -{ - register size_t __result = 0; - while (__s[__result] != '\0' && __s[__result] != __reject1 - && __s[__result] != __reject2) - ++__result; - return __result; -} - -__STRING_INLINE size_t __strcspn_c3 (__const char *__s, char __reject1, - char __reject2, char __reject3); -__STRING_INLINE size_t -__strcspn_c3 (__const char *__s, char __reject1, char __reject2, - char __reject3) -{ - register size_t __result = 0; - while (__s[__result] != '\0' && __s[__result] != __reject1 - && __s[__result] != __reject2 && __s[__result] != __reject3) - ++__result; - return __result; -} -#endif - - -/* Return the length of the initial segment of S which - consists entirely of characters in ACCEPT. */ -#ifndef _HAVE_STRING_ARCH_strspn -# define strspn(s, accept) \ - __extension__ \ - ({ char __a0, __a1, __a2; \ - (__builtin_constant_p (accept) && __string2_1bptr_p (accept) \ - ? ((__a0 = ((__const char *) (accept))[0], __a0 == '\0') \ - ? ((void) (s), 0) \ - : ((__a1 = ((__const char *) (accept))[1], __a1 == '\0') \ - ? __strspn_c1 (s, __a0) \ - : ((__a2 = ((__const char *) (accept))[2], __a2 == '\0') \ - ? __strspn_c2 (s, __a0, __a1) \ - : (((__const char *) (accept))[3] == '\0' \ - ? __strspn_c3 (s, __a0, __a1, __a2) \ - : strspn (s, accept))))) \ - : strspn (s, accept)); }) - -__STRING_INLINE size_t __strspn_c1 (__const char *__s, char __accept); -__STRING_INLINE size_t -__strspn_c1 (__const char *__s, char __accept) -{ - register size_t __result = 0; - /* Please note that __accept never can be '\0'. */ - while (__s[__result] == __accept) - ++__result; - return __result; -} - -__STRING_INLINE size_t __strspn_c2 (__const char *__s, char __accept1, - char __accept2); -__STRING_INLINE size_t -__strspn_c2 (__const char *__s, char __accept1, char __accept2) -{ - register size_t __result = 0; - /* Please note that __accept1 and __accept2 never can be '\0'. */ - while (__s[__result] == __accept1 || __s[__result] == __accept2) - ++__result; - return __result; -} - -__STRING_INLINE size_t __strspn_c3 (__const char *__s, char __accept1, - char __accept2, char __accept3); -__STRING_INLINE size_t -__strspn_c3 (__const char *__s, char __accept1, char __accept2, char __accept3) -{ - register size_t __result = 0; - /* Please note that __accept1 to __accept3 never can be '\0'. */ - while (__s[__result] == __accept1 || __s[__result] == __accept2 - || __s[__result] == __accept3) - ++__result; - return __result; -} -#endif - - -/* Find the first occurrence in S of any character in ACCEPT. */ -#ifndef _HAVE_STRING_ARCH_strpbrk -# define strpbrk(s, accept) \ - __extension__ \ - ({ char __a0, __a1, __a2; \ - (__builtin_constant_p (accept) && __string2_1bptr_p (accept) \ - ? ((__a0 = ((__const char *) (accept))[0], __a0 == '\0') \ - ? ((void) (s), NULL) \ - : ((__a1 = ((__const char *) (accept))[1], __a1 == '\0') \ - ? strchr (s, __a0) \ - : ((__a2 = ((__const char *) (accept))[2], __a2 == '\0') \ - ? __strpbrk_c2 (s, __a0, __a1) \ - : (((__const char *) (accept))[3] == '\0' \ - ? __strpbrk_c3 (s, __a0, __a1, __a2) \ - : strpbrk (s, accept))))) \ - : strpbrk (s, accept)); }) - -__STRING_INLINE char *__strpbrk_c2 (__const char *__s, int __accept1, - int __accept2); -__STRING_INLINE char * -__strpbrk_c2 (__const char *__s, int __accept1, int __accept2) -{ - /* Please note that __accept1 and __accept2 never can be '\0'. */ - while (*__s != '\0' && *__s != __accept1 && *__s != __accept2) - ++__s; - return *__s == '\0' ? NULL : (char *) (size_t) __s; -} - -__STRING_INLINE char *__strpbrk_c3 (__const char *__s, int __accept1, - int __accept2, int __accept3); -__STRING_INLINE char * -__strpbrk_c3 (__const char *__s, int __accept1, int __accept2, - int __accept3) -{ - /* Please note that __accept1 to __accept3 never can be '\0'. */ - while (*__s != '\0' && *__s != __accept1 && *__s != __accept2 - && *__s != __accept3) - ++__s; - return *__s == '\0' ? NULL : (char *) (size_t) __s; -} -#endif - - -/* Find the first occurrence of NEEDLE in HAYSTACK. Newer gcc versions - do this itself. */ -#if !defined _HAVE_STRING_ARCH_strstr && !__GNUC_PREREQ (2, 97) -# define strstr(haystack, needle) \ - (__extension__ (__builtin_constant_p (needle) && __string2_1bptr_p (needle) \ - ? (((__const char *) (needle))[0] == '\0' \ - ? (char *) (size_t) (haystack) \ - : (((__const char *) (needle))[1] == '\0' \ - ? strchr (haystack, \ - ((__const char *) (needle))[0]) \ - : strstr (haystack, needle))) \ - : strstr (haystack, needle))) -#endif - - -#if defined __USE_GNU && !defined _FORCE_INLINES -# ifndef _HAVE_STRING_ARCH_strnlen -__STRING_INLINE size_t -strnlen (__const char *__string, size_t __maxlen) -{ - __const char *__end = (__const char *) memchr (__string, '\0', __maxlen); - return __end ? (size_t) (__end - __string) : __maxlen; -} -# endif -#endif - - -#ifndef _HAVE_STRING_ARCH_strtok_r -# define __strtok_r(s, sep, nextp) \ - (__extension__ (__builtin_constant_p (sep) && __string2_1bptr_p (sep) \ - ? (((__const char *) (sep))[0] != '\0' \ - && ((__const char *) (sep))[1] == '\0' \ - ? __strtok_r_1c (s, ((__const char *) (sep))[0], nextp) \ - : __strtok_r (s, sep, nextp)) \ - : __strtok_r (s, sep, nextp))) - -__STRING_INLINE char *__strtok_r_1c (char *__s, char __sep, char **__nextp); -__STRING_INLINE char * -__strtok_r_1c (char *__s, char __sep, char **__nextp) -{ - char *__result; - if (__s == NULL) - __s = *__nextp; - while (*__s == __sep) - ++__s; - if (*__s == '\0') - __result = NULL; - else - { - __result = __s; - while (*__s != '\0' && *__s != __sep) - ++__s; - if (*__s == '\0') - *__nextp = __s; - else - { - *__s = '\0'; - *__nextp = __s + 1; - } - } - return __result; -} -# if defined __USE_POSIX || defined __USE_MISC -# define strtok_r(s, sep, nextp) __strtok_r ((s), (sep), (nextp)) -# endif -#endif - - -#ifndef _HAVE_STRING_ARCH_strsep - -# define __strsep(s, reject) \ - __extension__ \ - ({ char __r0, __r1, __r2; \ - (__builtin_constant_p (reject) && __string2_1bptr_p (reject) \ - && (__r0 = ((__const char *) (reject))[0], \ - ((__const char *) (reject))[0] != '\0') \ - ? ((__r1 = ((__const char *) (reject))[1], \ - ((__const char *) (reject))[1] == '\0') \ - ? __strsep_1c (s, __r0) \ - : ((__r2 = ((__const char *) (reject))[2], __r2 == '\0') \ - ? __strsep_2c (s, __r0, __r1) \ - : (((__const char *) (reject))[3] == '\0' \ - ? __strsep_3c (s, __r0, __r1, __r2) \ - : __strsep_g (s, reject)))) \ - : __strsep_g (s, reject)); }) - -__STRING_INLINE char *__strsep_1c (char **__s, char __reject); -__STRING_INLINE char * -__strsep_1c (char **__s, char __reject) -{ - register char *__retval = *__s; - if (__retval == NULL) - return *__s = NULL; - if (*__retval == __reject) - *(*__s)++ = '\0'; - else - if ((*__s = strchr (__retval, __reject)) != NULL) - *(*__s)++ = '\0'; - else - *__s = NULL; - return __retval; -} - -__STRING_INLINE char *__strsep_2c (char **__s, char __reject1, char __reject2); -__STRING_INLINE char * -__strsep_2c (char **__s, char __reject1, char __reject2) -{ - register char *__retval = *__s; - if (__retval == NULL) - return *__s = NULL; - if (*__retval == __reject1 || *__retval == __reject2) - *(*__s)++ = '\0'; - else - { - register char *__cp = __retval; - while (*__cp != '\0' && *__cp != __reject1 && *__cp != __reject2) - ++__cp; - if (*__cp != '\0') - { - *__s = __cp; - *(*__s)++ = '\0'; - } - else - *__s = NULL; - } - return __retval; -} - -__STRING_INLINE char *__strsep_3c (char **__s, char __reject1, char __reject2, - char __reject3); -__STRING_INLINE char * -__strsep_3c (char **__s, char __reject1, char __reject2, char __reject3) -{ - register char *__retval = *__s; - if (__retval == NULL) - return *__s = NULL; - if (*__retval == __reject1 || *__retval == __reject2 - || *__retval == __reject3) - *(*__s)++ = '\0'; - else - { - register char *__cp = __retval; - while (*__cp != '\0' && *__cp != __reject1 && *__cp != __reject2 - && *__cp != __reject3) - ++__cp; - if (*__cp != '\0') - { - *__s = __cp; - *(*__s)++ = '\0'; - } - else - *__s = NULL; - } - return __retval; -} - -__STRING_INLINE char *__strsep_g (char **__s, __const char *__reject); -__STRING_INLINE char * -__strsep_g (char **__s, __const char *__reject) -{ - register char *__retval = *__s; - if (__retval == NULL) - return NULL; - if ((*__s = strpbrk (__retval, __reject)) != NULL) - *(*__s)++ = '\0'; - return __retval; -} -# ifdef __USE_BSD -# define strsep(s, reject) __strsep ((s), (reject)) -# endif -#endif - -/* We need the memory allocation functions for inline strdup(). - Referring to stdlib.h (even minimally) is not allowed - in any of the tight standards compliant modes. */ -#ifdef __USE_MISC - -# if !defined _HAVE_STRING_ARCH_strdup || !defined _HAVE_STRING_ARCH_strndup -# define __need_malloc_and_calloc -# include <stdlib.h> -# endif - -# ifndef _HAVE_STRING_ARCH_strdup - -extern char *__strdup (__const char *__string) __THROW __attribute_malloc__; -# define __strdup(s) \ - (__extension__ (__builtin_constant_p (s) && __string2_1bptr_p (s) \ - ? (((__const char *) (s))[0] == '\0' \ - ? (char *) calloc (1, 1) \ - : ({ size_t __len = strlen (s) + 1; \ - char *__retval = (char *) malloc (__len); \ - if (__retval != NULL) \ - __retval = (char *) memcpy (__retval, s, __len); \ - __retval; })) \ - : __strdup (s))) - -# if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN_EXTENDED -# define strdup(s) __strdup (s) -# endif -# endif - -# ifndef _HAVE_STRING_ARCH_strndup - -extern char *__strndup (__const char *__string, size_t __n) - __THROW __attribute_malloc__; -# define __strndup(s, n) \ - (__extension__ (__builtin_constant_p (s) && __string2_1bptr_p (s) \ - ? (((__const char *) (s))[0] == '\0' \ - ? (char *) calloc (1, 1) \ - : ({ size_t __len = strlen (s) + 1; \ - size_t __n = (n); \ - char *__retval; \ - if (__n < __len) \ - __len = __n; \ - __retval = (char *) malloc (__len); \ - if (__retval != NULL) \ - { \ - __retval[__len - 1] = '\0'; \ - __retval = (char *) memcpy (__retval, s, \ - __len - 1); \ - } \ - __retval; })) \ - : __strndup ((s), (n)))) - -# ifdef __USE_GNU -# define strndup(s, n) __strndup ((s), (n)) -# endif -# endif - -#endif /* Use misc. or use GNU. */ - -#ifndef _FORCE_INLINES -# undef __STRING_INLINE -#endif - -#endif /* No string inlines. */ diff --git a/libc/sysdeps/linux/powerpc/bits/stropts.h b/libc/sysdeps/linux/powerpc/bits/stropts.h deleted file mode 100644 index 21538c31d..000000000 --- a/libc/sysdeps/linux/powerpc/bits/stropts.h +++ /dev/null @@ -1,227 +0,0 @@ -/* Copyright (C) 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. */ - -#ifndef _BITS_STROPTS_H -#define _BITS_STROPTS_H 1 - -#include <bits/types.h> - -/* Macros used as `request' argument to `ioctl'. */ -#define __SID ('S' << 8) - -#define I_NREAD (__SID | 1) /* Counts the number of data bytes in the data - block in the first message. */ -#define I_PUSH (__SID | 2) /* Push STREAMS module onto top of the current - STREAM, just below the STREAM head. */ -#define I_POP (__SID | 3) /* Remove STREAMS module from just below the - STREAM head. */ -#define I_LOOK (__SID | 4) /* Retrieve the name of the module just below - the STREAM head and place it in a character - string. */ -#define I_FLUSH (__SID | 5) /* Flush all input and/or output. */ -#define I_SRDOPT (__SID | 6) /* Sets the read mode. */ -#define I_GRDOPT (__SID | 7) /* Returns the current read mode setting. */ -#define I_STR (__SID | 8) /* Construct an internal STREAMS `ioctl' - message and send that message downstream. */ -#define I_SETSIG (__SID | 9) /* Inform the STREAM head that the process - wants the SIGPOLL signal issued. */ -#define I_GETSIG (__SID |10) /* Return the events for which the calling - process is currently registered to be sent - a SIGPOLL signal. */ -#define I_FIND (__SID |11) /* Compares the names of all modules currently - present in the STREAM to the name pointed to - by `arg'. */ -#define I_LINK (__SID |12) /* Connect two STREAMs. */ -#define I_UNLINK (__SID |13) /* Disconnects the two STREAMs. */ -#define I_PEEK (__SID |15) /* Allows a process to retrieve the information - in the first message on the STREAM head read - queue without taking the message off the - queue. */ -#define I_FDINSERT (__SID |16) /* Create a message from the specified - buffer(s), adds information about another - STREAM, and send the message downstream. */ -#define I_SENDFD (__SID |17) /* Requests the STREAM associated with `fildes' - to send a message, containing a file - pointer, to the STREAM head at the other end - of a STREAMS pipe. */ -#define I_RECVFD (__SID |14) /* Non-EFT definition. */ -#define I_SWROPT (__SID |19) /* Set the write mode. */ -#define I_GWROPT (__SID |20) /* Return the current write mode setting. */ -#define I_LIST (__SID |21) /* List all the module names on the STREAM, up - to and including the topmost driver name. */ -#define I_PLINK (__SID |22) /* Connect two STREAMs with a persistent - link. */ -#define I_PUNLINK (__SID |23) /* Disconnect the two STREAMs that were - connected with a persistent link. */ -#define I_FLUSHBAND (__SID |28) /* Flush only band specified. */ -#define I_CKBAND (__SID |29) /* Check if the message of a given priority - band exists on the STREAM head read - queue. */ -#define I_GETBAND (__SID |30) /* Return the priority band of the first - message on the STREAM head read queue. */ -#define I_ATMARK (__SID |31) /* See if the current message on the STREAM - head read queue is "marked" by some module - downstream. */ -#define I_SETCLTIME (__SID |32) /* Set the time the STREAM head will delay when - a STREAM is closing and there is data on - the write queues. */ -#define I_GETCLTIME (__SID |33) /* Get current value for closing timeout. */ -#define I_CANPUT (__SID |34) /* Check if a certain band is writable. */ - - -/* Used in `I_LOOK' request. */ -#define FMNAMESZ 8 /* compatibility w/UnixWare/Solaris. */ - -/* Flush options. */ -#define FLUSHR 0x01 /* Flush read queues. */ -#define FLUSHW 0x02 /* Flush write queues. */ -#define FLUSHRW 0x03 /* Flush read and write queues. */ -#ifdef __USE_GNU -# define FLUSHBAND 0x04 /* Flush only specified band. */ -#endif - -/* Possible arguments for `I_SETSIG'. */ -#define S_INPUT 0x0001 /* A message, other than a high-priority - message, has arrived. */ -#define S_HIPRI 0x0002 /* A high-priority message is present. */ -#define S_OUTPUT 0x0004 /* The write queue for normal data is no longer - full. */ -#define S_MSG 0x0008 /* A STREAMS signal message that contains the - SIGPOLL signal reaches the front of the - STREAM head read queue. */ -#define S_ERROR 0x0010 /* Notification of an error condition. */ -#define S_HANGUP 0x0020 /* Notification of a hangup. */ -#define S_RDNORM 0x0040 /* A normal message has arrived. */ -#define S_WRNORM S_OUTPUT -#define S_RDBAND 0x0080 /* A message with a non-zero priority has - arrived. */ -#define S_WRBAND 0x0100 /* The write queue for a non-zero priority - band is no longer full. */ -#define S_BANDURG 0x0200 /* When used in conjunction with S_RDBAND, - SIGURG is generated instead of SIGPOLL when - a priority message reaches the front of the - STREAM head read queue. */ - -/* Option for `I_PEEK'. */ -#define RS_HIPRI 0x01 /* Only look for high-priority messages. */ - -/* Options for `I_SRDOPT'. */ -#define RNORM 0x0000 /* Byte-STREAM mode, the default. */ -#define RMSGD 0x0001 /* Message-discard mode. */ -#define RMSGN 0x0002 /* Message-nondiscard mode. */ -#define RPROTDAT 0x0004 /* Deliver the control part of a message as - data. */ -#define RPROTDIS 0x0008 /* Discard the control part of a message, - delivering any data part. */ -#define RPROTNORM 0x0010 /* Fail `read' with EBADMSG if a message - containing a control part is at the front - of the STREAM head read queue. */ -#ifdef __USE_GNU -# define RPROTMASK 0x001C /* The RPROT bits */ -#endif - -/* Possible mode for `I_SWROPT'. */ -#define SNDZERO 0x001 /* Send a zero-length message downstream when a - `write' of 0 bytes occurs. */ -#ifdef __USE_GNU -# define SNDPIPE 0x002 /* Send SIGPIPE on write and putmsg if - sd_werror is set. */ -#endif - -/* Arguments for `I_ATMARK'. */ -#define ANYMARK 0x01 /* Check if the message is marked. */ -#define LASTMARK 0x02 /* Check if the message is the last one marked - on the queue. */ - -/* Argument for `I_UNLINK'. */ -#ifdef __USE_GNU -# define MUXID_ALL (-1) /* Unlink all STREAMs linked to the STREAM - associated with `fildes'. */ -#endif - - -/* Macros for `getmsg', `getpmsg', `putmsg' and `putpmsg'. */ -#define MSG_HIPRI 0x01 /* Send/receive high priority message. */ -#define MSG_ANY 0x02 /* Receive any message. */ -#define MSG_BAND 0x04 /* Receive message from specified band. */ - -/* Values returned by getmsg and getpmsg */ -#define MORECTL 1 /* More control information is left in - message. */ -#define MOREDATA 2 /* More data is left in message. */ - - -/* Structure used for the I_FLUSHBAND ioctl on streams. */ -struct bandinfo - { - unsigned char bi_pri; - int bi_flag; - }; - -struct strbuf - { - int maxlen; /* Maximum buffer length. */ - int len; /* Length of data. */ - char *buf; /* Pointer to buffer. */ - }; - -struct strpeek - { - struct strbuf ctlbuf; - struct strbuf databuf; - t_uscalar_t flags; /* UnixWare/Solaris compatibility. */ - }; - -struct strfdinsert - { - struct strbuf ctlbuf; - struct strbuf databuf; - t_uscalar_t flags; /* UnixWare/Solaris compatibility. */ - int fildes; - int offset; - }; - -struct strioctl - { - int ic_cmd; - int ic_timout; - int ic_len; - char *ic_dp; - }; - -struct strrecvfd - { - int fd; - uid_t uid; - gid_t gid; - char __fill[8]; /* UnixWare/Solaris compatibility */ - }; - - -struct str_mlist - { - char l_name[FMNAMESZ + 1]; - }; - -struct str_list - { - int sl_nmods; - struct str_mlist *sl_modlist; - }; - -#endif /* bits/stropts.h */ diff --git a/libc/sysdeps/linux/powerpc/bits/termios.h b/libc/sysdeps/linux/powerpc/bits/termios.h index a1cea1df1..f7b89ae59 100644 --- a/libc/sysdeps/linux/powerpc/bits/termios.h +++ b/libc/sysdeps/linux/powerpc/bits/termios.h @@ -1,20 +1,20 @@ -/* Copyright (C) 1997, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1999, 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + 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 _TERMIOS_H # error "Never include <bits/termios.h> directly; use <termios.h> instead." @@ -24,31 +24,28 @@ typedef unsigned char cc_t; typedef unsigned int speed_t; typedef unsigned int tcflag_t; -/* note: this is fixed to be the same as the kernel, not glibc */ +/* + * termios type and macro definitions. Be careful about adding stuff + * to this file since it's used in GNU libc and there are strict rules + * concerning namespace pollution. + */ -struct winsize { - unsigned short int ws_row; - unsigned short int ws_col; - unsigned short int ws_xpixel; - unsigned short int ws_ypixel; -}; - -#define NCCS 19 +#define NCCS 32 struct termios { tcflag_t c_iflag; /* input mode flags */ tcflag_t c_oflag; /* output mode flags */ tcflag_t c_cflag; /* control mode flags */ tcflag_t c_lflag; /* local mode flags */ + cc_t c_line; /* line discipline (== c_cc[19]) */ cc_t c_cc[NCCS]; /* control characters */ - cc_t c_line; /* line discipline */ speed_t c_ispeed; /* input speed */ speed_t c_ospeed; /* output speed */ }; /* c_cc characters */ -#define VINTR 0 -#define VQUIT 1 -#define VERASE 2 +#define VINTR 0 +#define VQUIT 1 +#define VERASE 2 #define VKILL 3 #define VEOF 4 #define VMIN 5 @@ -57,9 +54,9 @@ struct termios { #define VEOL2 8 #define VSWTC 9 -#define VWERASE 10 +#define VWERASE 10 #define VREPRINT 11 -#define VSUSP 12 +#define VSUSP 12 #define VSTART 13 #define VSTOP 14 #define VLNEXT 15 @@ -77,12 +74,9 @@ struct termios { #define ICRNL 0000400 #define IXON 0001000 #define IXOFF 0002000 -/* POSIX.1 doesn't want these... */ -#ifdef __USE_BSD -# define IXANY 0004000 -# define IUCLC 0010000 -# define IMAXBEL 0020000 -#endif +#define IXANY 0004000 +#define IUCLC 0010000 +#define IMAXBEL 0020000 /* c_oflag bits */ #define OPOST 0000001 @@ -242,6 +236,23 @@ struct ltchars { #define TIOCPKT_NOSTOP 16 #define TIOCPKT_DOSTOP 32 +struct winsize { + unsigned short ws_row; + unsigned short ws_col; + unsigned short ws_xpixel; + unsigned short ws_ypixel; +}; + +#define NCC 10 +struct termio { + unsigned short c_iflag; /* input mode flags */ + unsigned short c_oflag; /* output mode flags */ + unsigned short c_cflag; /* control mode flags */ + unsigned short c_lflag; /* local mode flags */ + unsigned char c_line; /* line discipline */ + unsigned char c_cc[NCC]; /* control characters */ +}; + /* c_cc characters */ #define _VINTR 0 #define _VQUIT 1 @@ -286,3 +297,4 @@ struct ltchars { #define N_SMSBLOCK 12 /* SMS block mode */ #define N_HDLC 13 /* synchronous HDLC */ #define N_SYNC_PPP 14 /* synchronous PPP */ +#define N_HCI 15 /* Bluetooth HCI UART */ diff --git a/libc/sysdeps/linux/powerpc/bits/time.h b/libc/sysdeps/linux/powerpc/bits/time.h deleted file mode 100644 index 2a6873f00..000000000 --- a/libc/sysdeps/linux/powerpc/bits/time.h +++ /dev/null @@ -1,69 +0,0 @@ -/* System-dependent timing definitions. Linux version. - Copyright (C) 1996, 1997, 1999, 2000, 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. */ - -/* - * Never include this file directly; use <time.h> instead. - */ - -#ifndef __need_timeval -# ifndef _BITS_TIME_H -# define _BITS_TIME_H 1 - -/* ISO/IEC 9899:1990 7.12.1: <time.h> - The macro `CLOCKS_PER_SEC' is the number per second of the value - returned by the `clock' function. */ -/* CAE XSH, Issue 4, Version 2: <time.h> - The value of CLOCKS_PER_SEC is required to be 1 million on all - XSI-conformant systems. */ -# define CLOCKS_PER_SEC 1000000l - -# if !defined __STRICT_ANSI__ && !defined __USE_XOPEN2K -/* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK - presents the real value for clock ticks per second for the system. */ -# include <bits/types.h> -extern long int __sysconf (int); -# define CLK_TCK ((__clock_t) __sysconf (2)) /* 2 is _SC_CLK_TCK */ -# endif - -# ifdef __USE_POSIX199309 -/* Identifier for system-wide realtime clock. */ -# define CLOCK_REALTIME 0 - -/* Flag to indicate time is absolute. */ -# define TIMER_ABSTIME 1 -# endif - -# endif /* bits/time.h */ -#endif - -#ifdef __need_timeval -# undef __need_timeval -# ifndef _STRUCT_TIMEVAL -# define _STRUCT_TIMEVAL 1 -# include <bits/types.h> - -/* A time value that is accurate to the nearest - microsecond but also has a range of years. */ -struct timeval - { - __time_t tv_sec; /* Seconds. */ - __suseconds_t tv_usec; /* Microseconds. */ - }; -# endif /* struct timeval */ -#endif /* need timeval */ diff --git a/libc/sysdeps/linux/powerpc/bits/types.h b/libc/sysdeps/linux/powerpc/bits/types.h deleted file mode 100644 index 0ad16b969..000000000 --- a/libc/sysdeps/linux/powerpc/bits/types.h +++ /dev/null @@ -1,148 +0,0 @@ -/* Copyright (C) 1991,92,1994-1999,2000,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. */ - -/* - * Never include this file directly; use <sys/types.h> instead. - */ - -#ifndef _BITS_TYPES_H -#define _BITS_TYPES_H 1 - -#include <features.h> - -#define __need_size_t -#include <stddef.h> - -/* Convenience types. */ -typedef unsigned char __u_char; -typedef unsigned short __u_short; -typedef unsigned int __u_int; -typedef unsigned long __u_long; -#ifdef __GNUC__ -__extension__ typedef unsigned long long int __u_quad_t; -__extension__ typedef long long int __quad_t; -#else -typedef struct - { - long int __val[2]; - } __quad_t; -typedef struct - { - __u_long __val[2]; - } __u_quad_t; -#endif -typedef signed char __int8_t; -typedef unsigned char __uint8_t; -typedef signed short int __int16_t; -typedef unsigned short int __uint16_t; -typedef signed int __int32_t; -typedef unsigned int __uint32_t; -#ifdef __GNUC__ -__extension__ typedef signed long long int __int64_t; -__extension__ typedef unsigned long long int __uint64_t; -#endif -typedef __quad_t *__qaddr_t; - -/* These types are modified from glibc to be more compatible with - * the kernel. */ -typedef __u_int __dev_t; /* Type of device numbers. */ -typedef __u_int __uid_t; /* Type of user identifications. */ -typedef __u_int __gid_t; /* Type of group identifications. */ -typedef __u_int __ino_t; /* Type of file serial numbers. */ -typedef __u_int __mode_t; /* Type of file attribute bitmasks. */ -typedef __u_short __nlink_t; /* Type of file link counts. */ -typedef long int __off_t; /* Type of file sizes and offsets. */ -typedef __quad_t __loff_t; /* Type of file sizes and offsets. */ -typedef int __pid_t; /* Type of process identifications. */ -typedef int __ssize_t; /* Type of a byte count, or error. */ -typedef __u_long __rlim_t; /* Type of resource counts. */ -typedef __u_quad_t __rlim64_t; /* Type of resource counts (LFS). */ -typedef __u_int __id_t; /* General type for ID. */ - -typedef struct - { - int __val[2]; - } __fsid_t; /* Type of file system IDs. */ - -/* Everythin' else. */ -typedef int __daddr_t; /* The type of a disk address. */ -typedef char *__caddr_t; -typedef long int __time_t; -typedef unsigned int __useconds_t; -typedef long int __suseconds_t; -typedef long int __swblk_t; /* Type of a swap block maybe? */ - -typedef long int __clock_t; - -/* Clock ID used in clock and timer functions. */ -typedef int __clockid_t; - -/* Timer ID returned by `timer_create'. */ -typedef int __timer_t; - - -/* Number of descriptors that can fit in an `fd_set'. */ -#define __FD_SETSIZE 1024 - - -typedef int __key_t; - -/* Used in `struct shmid_ds'. */ -typedef unsigned short int __ipc_pid_t; - - -/* Type to represent block size. */ -typedef long int __blksize_t; - -/* Types from the Large File Support interface. */ - -/* Type to count number os disk blocks. */ -typedef long int __blkcnt_t; -typedef __quad_t __blkcnt64_t; - -/* Type to count file system blocks. */ -typedef __u_long __fsblkcnt_t; -typedef __u_quad_t __fsblkcnt64_t; - -/* Type to count file system inodes. */ -typedef __u_long __fsfilcnt_t; -typedef __u_quad_t __fsfilcnt64_t; - -/* Type of file serial numbers. */ -typedef __u_quad_t __ino64_t; - -/* Type of file sizes and offsets. */ -typedef __loff_t __off64_t; - -/* Used in XTI. */ -typedef long int __t_scalar_t; -typedef unsigned long int __t_uscalar_t; - -/* Duplicates info from stdint.h but this is used in unistd.h. */ -typedef int __intptr_t; - -/* Duplicate info from sys/socket.h. */ -typedef unsigned int __socklen_t; - - -/* Now add the thread types. */ -#if defined __USE_POSIX199506 || defined __USE_UNIX98 -# include <bits/pthreadtypes.h> -#endif - -#endif /* bits/types.h */ diff --git a/libc/sysdeps/linux/powerpc/bits/uio.h b/libc/sysdeps/linux/powerpc/bits/uio.h deleted file mode 100644 index 84b4805fe..000000000 --- a/libc/sysdeps/linux/powerpc/bits/uio.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (C) 1996, 1997 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 _SYS_UIO_H -# error "Never include <bits/uio.h> directly; use <sys/uio.h> instead." -#endif - - -#include <sys/types.h> - - -/* We should normally use the Linux kernel header file to define this - type and macros but this calls for trouble because of the header - includes other kernel headers. */ - -/* Size of object which can be written atomically. - - This macro has different values in different kernel versions. The - latest versions of ther kernel use 1024 and this is good choice. Since - the C library implementation of readv/writev is able to emulate the - functionality even if the currently running kernel does not support - this large value the readv/writev call will not fail because of this. */ -#define UIO_MAXIOV 1024 - - -/* Structure for scatter/gather I/O. */ -struct iovec - { - void *iov_base; /* Pointer to data. */ - size_t iov_len; /* Length of data. */ - }; diff --git a/libc/sysdeps/linux/powerpc/bits/ustat.h b/libc/sysdeps/linux/powerpc/bits/ustat.h deleted file mode 100644 index aeafc22a5..000000000 --- a/libc/sysdeps/linux/powerpc/bits/ustat.h +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 1997 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. */ - -#include <sys/types.h> - -struct ustat - { - __daddr_t f_tfree; - __ino_t f_tinode; - char f_fname[6]; - char f_fpack[6]; - }; diff --git a/libc/sysdeps/linux/powerpc/bits/utmp.h b/libc/sysdeps/linux/powerpc/bits/utmp.h deleted file mode 100644 index 2ed29bbb4..000000000 --- a/libc/sysdeps/linux/powerpc/bits/utmp.h +++ /dev/null @@ -1,106 +0,0 @@ -/* The `struct utmp' type, describing entries in the utmp file. GNU version. - Copyright (C) 1993, 1996, 1997, 1998, 1999 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 _UTMP_H -# error "Never include <bits/utmp.h> directly; use <utmp.h> instead." -#endif - -#include <paths.h> -#include <sys/time.h> -#include <sys/types.h> - - -#define UT_LINESIZE 32 -#define UT_NAMESIZE 32 -#define UT_HOSTSIZE 256 - - -/* The structure describing an entry in the database of - previous logins. */ -struct lastlog - { - __time_t ll_time; - char ll_line[UT_LINESIZE]; - char ll_host[UT_HOSTSIZE]; - }; - - -/* The structure describing the status of a terminated process. This - type is used in `struct utmp' below. */ -struct exit_status - { - short int e_termination; /* Process termination status. */ - short int e_exit; /* Process exit status. */ - }; - - -/* The structure describing an entry in the user accounting database. */ -struct utmp -{ - short int ut_type; /* Type of login. */ - pid_t ut_pid; /* Process ID of login process. */ - char ut_line[UT_LINESIZE]; /* Devicename. */ - char ut_id[4]; /* Inittab ID. */ - char ut_user[UT_NAMESIZE]; /* Username. */ - char ut_host[UT_HOSTSIZE]; /* Hostname for remote login. */ - struct exit_status ut_exit; /* Exit status of a process marked - as DEAD_PROCESS. */ - long int ut_session; /* Session ID, used for windowing. */ - struct timeval ut_tv; /* Time entry was made. */ - int32_t ut_addr_v6[4]; /* Internet address of remote host. */ - char __unused[20]; /* Reserved for future use. */ -}; - -/* Backwards compatibility hacks. */ -#define ut_name ut_user -#ifndef _NO_UT_TIME -/* We have a problem here: `ut_time' is also used otherwise. Define - _NO_UT_TIME if the compiler complains. */ -# define ut_time ut_tv.tv_sec -#endif -#define ut_xtime ut_tv.tv_sec -#define ut_addr ut_addr_v6[0] - - -/* Values for the `ut_type' field of a `struct utmp'. */ -#define EMPTY 0 /* No valid user accounting information. */ - -#define RUN_LVL 1 /* The system's runlevel. */ -#define BOOT_TIME 2 /* Time of system boot. */ -#define NEW_TIME 3 /* Time after system clock changed. */ -#define OLD_TIME 4 /* Time when system clock changed. */ - -#define INIT_PROCESS 5 /* Process spawned by the init process. */ -#define LOGIN_PROCESS 6 /* Session leader of a logged in user. */ -#define USER_PROCESS 7 /* Normal process. */ -#define DEAD_PROCESS 8 /* Terminated process. */ - -#define ACCOUNTING 9 - -/* Old Linux name for the EMPTY type. */ -#define UT_UNKNOWN EMPTY - - -/* Tell the user that we have a modern system with UT_HOST, UT_PID, - UT_TYPE, UT_ID and UT_TV fields. */ -#define _HAVE_UT_TYPE 1 -#define _HAVE_UT_PID 1 -#define _HAVE_UT_ID 1 -#define _HAVE_UT_TV 1 -#define _HAVE_UT_HOST 1 diff --git a/libc/sysdeps/linux/powerpc/bits/utmpx.h b/libc/sysdeps/linux/powerpc/bits/utmpx.h deleted file mode 100644 index 99735370b..000000000 --- a/libc/sysdeps/linux/powerpc/bits/utmpx.h +++ /dev/null @@ -1,89 +0,0 @@ -/* Structures and definitions for the user accounting database. GNU version. - Copyright (C) 1997, 1998, 2000, 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. */ - -#ifndef _UTMPX_H -# error "Never include <bits/utmpx.h> directly; use <utmpx.h> instead." -#endif - -#include <bits/types.h> -#include <sys/time.h> - - -#ifdef __USE_GNU -# include <paths.h> -# define _PATH_UTMPX _PATH_UTMP -# define _PATH_WTMPX _PATH_WTMP -#endif - - -#define __UT_LINESIZE 32 -#define __UT_NAMESIZE 32 -#define __UT_HOSTSIZE 256 - - -/* The structure describing the status of a terminated process. This - type is used in `struct utmpx' below. */ -struct __exit_status - { -#ifdef __USE_GNU - short int e_termination; /* Process termination status. */ - short int e_exit; /* Process exit status. */ -#else - short int __e_termination; /* Process termination status. */ - short int __e_exit; /* Process exit status. */ -#endif - }; - - -/* The structure describing an entry in the user accounting database. */ -struct utmpx -{ - short int ut_type; /* Type of login. */ - __pid_t ut_pid; /* Process ID of login process. */ - char ut_line[__UT_LINESIZE]; /* Devicename. */ - char ut_id[4]; /* Inittab ID. */ - char ut_user[__UT_NAMESIZE]; /* Username. */ - char ut_host[__UT_HOSTSIZE]; /* Hostname for remote login. */ - struct __exit_status ut_exit; /* Exit status of a process marked - as DEAD_PROCESS. */ - long int ut_session; /* Session ID, used for windowing. */ - struct timeval ut_tv; /* Time entry was made. */ - __int32_t ut_addr_v6[4]; /* Internet address of remote host. */ - char __unused[20]; /* Reserved for future use. */ -}; - - -/* Values for the `ut_type' field of a `struct utmpx'. */ -#define EMPTY 0 /* No valid user accounting information. */ - -#ifdef __USE_GNU -# define RUN_LVL 1 /* The system's runlevel. */ -#endif -#define BOOT_TIME 2 /* Time of system boot. */ -#define NEW_TIME 3 /* Time after system clock changed. */ -#define OLD_TIME 4 /* Time when system clock changed. */ - -#define INIT_PROCESS 5 /* Process spawned by the init process. */ -#define LOGIN_PROCESS 6 /* Session leader of a logged in user. */ -#define USER_PROCESS 7 /* Normal process. */ -#define DEAD_PROCESS 8 /* Terminated process. */ - -#ifdef __USE_GNU -# define ACCOUNTING 9 /* System accounting. */ -#endif diff --git a/libc/sysdeps/linux/powerpc/bits/utsname.h b/libc/sysdeps/linux/powerpc/bits/utsname.h deleted file mode 100644 index 35e71e3ba..000000000 --- a/libc/sysdeps/linux/powerpc/bits/utsname.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 1995, 1996, 1997 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 _SYS_UTSNAME_H -# error "Never include <bits/utsname.h> directly; use <sys/utsname.h> instead." -#endif - -/* Length of the entries in `struct utsname' is 65. */ -#define _UTSNAME_LENGTH 65 - -/* Linux provides as additional information in the `struct utsname' - the name of the current domain. Define _UTSNAME_DOMAIN_LENGTH - to a value != 0 to activate this entry. */ -#define _UTSNAME_DOMAIN_LENGTH _UTSNAME_LENGTH diff --git a/libc/sysdeps/linux/powerpc/bits/waitflags.h b/libc/sysdeps/linux/powerpc/bits/waitflags.h deleted file mode 100644 index 1303c6c36..000000000 --- a/libc/sysdeps/linux/powerpc/bits/waitflags.h +++ /dev/null @@ -1,30 +0,0 @@ -/* Definitions of flag bits for `waitpid' et al. - Copyright (C) 1992, 1996, 1997, 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. */ - -#if !defined _SYS_WAIT_H && !defined _STDLIB_H -# error "Never include <bits/waitflags.h> directly; use <sys/wait.h> instead." -#endif - - -/* Bits in the third argument to `waitpid'. */ -#define WNOHANG 1 /* Don't block waiting. */ -#define WUNTRACED 2 /* Report status of stopped children. */ - -#define __WALL 0x40000000 /* Wait for any child. */ -#define __WCLONE 0x80000000 /* Wait for cloned process. */ diff --git a/libc/sysdeps/linux/powerpc/bits/waitstatus.h b/libc/sysdeps/linux/powerpc/bits/waitstatus.h deleted file mode 100644 index 982c9dbb2..000000000 --- a/libc/sysdeps/linux/powerpc/bits/waitstatus.h +++ /dev/null @@ -1,104 +0,0 @@ -/* Definitions of status bits for `wait' et al. - Copyright (C) 1992, 1994, 1996, 1997, 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. */ - -#if !defined _SYS_WAIT_H && !defined _STDLIB_H -# error "Never include <bits/waitstatus.h> directly; use <sys/wait.h> instead." -#endif - - -/* Everything extant so far uses these same bits. */ - - -/* If WIFEXITED(STATUS), the low-order 8 bits of the status. */ -#define __WEXITSTATUS(status) (((status) & 0xff00) >> 8) - -/* If WIFSIGNALED(STATUS), the terminating signal. */ -#define __WTERMSIG(status) ((status) & 0x7f) - -/* If WIFSTOPPED(STATUS), the signal that stopped the child. */ -#define __WSTOPSIG(status) __WEXITSTATUS(status) - -/* Nonzero if STATUS indicates normal termination. */ -#define __WIFEXITED(status) (__WTERMSIG(status) == 0) - -/* Nonzero if STATUS indicates termination by a signal. */ -#ifdef __GNUC__ -# define __WIFSIGNALED(status) \ - (__extension__ ({ int __status = (status); \ - !__WIFSTOPPED(__status) && !__WIFEXITED(__status); })) -#else /* Not GCC. */ -# define __WIFSIGNALED(status) (!__WIFSTOPPED(status) && !__WIFEXITED(status)) -#endif /* GCC. */ - -/* Nonzero if STATUS indicates the child is stopped. */ -#define __WIFSTOPPED(status) (((status) & 0xff) == 0x7f) - -/* Nonzero if STATUS indicates the child dumped core. */ -#define __WCOREDUMP(status) ((status) & __WCOREFLAG) - -/* Macros for constructing status values. */ -#define __W_EXITCODE(ret, sig) ((ret) << 8 | (sig)) -#define __W_STOPCODE(sig) ((sig) << 8 | 0x7f) -#define __WCOREFLAG 0x80 - - -#ifdef __USE_BSD - -# include <endian.h> - -union wait - { - int w_status; - struct - { -# if __BYTE_ORDER == __LITTLE_ENDIAN - unsigned int __w_termsig:7; /* Terminating signal. */ - unsigned int __w_coredump:1; /* Set if dumped core. */ - unsigned int __w_retcode:8; /* Return code if exited normally. */ - unsigned int:16; -# endif /* Little endian. */ -# if __BYTE_ORDER == __BIG_ENDIAN - unsigned int:16; - unsigned int __w_retcode:8; - unsigned int __w_coredump:1; - unsigned int __w_termsig:7; -# endif /* Big endian. */ - } __wait_terminated; - struct - { -# if __BYTE_ORDER == __LITTLE_ENDIAN - unsigned int __w_stopval:8; /* W_STOPPED if stopped. */ - unsigned int __w_stopsig:8; /* Stopping signal. */ - unsigned int:16; -# endif /* Little endian. */ -# if __BYTE_ORDER == __BIG_ENDIAN - unsigned int:16; - unsigned int __w_stopsig:8; /* Stopping signal. */ - unsigned int __w_stopval:8; /* W_STOPPED if stopped. */ -# endif /* Big endian. */ - } __wait_stopped; - }; - -# define w_termsig __wait_terminated.__w_termsig -# define w_coredump __wait_terminated.__w_coredump -# define w_retcode __wait_terminated.__w_retcode -# define w_stopsig __wait_stopped.__w_stopsig -# define w_stopval __wait_stopped.__w_stopval - -#endif /* Use BSD. */ diff --git a/libc/sysdeps/linux/powerpc/bits/wchar.h b/libc/sysdeps/linux/powerpc/bits/wchar.h deleted file mode 100644 index ef1f56363..000000000 --- a/libc/sysdeps/linux/powerpc/bits/wchar.h +++ /dev/null @@ -1,26 +0,0 @@ -/* wchar_t type related definitions. - Copyright (C) 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 _BITS_WCHAR_H -#define _BITS_WCHAR_H 1 - -#define __WCHAR_MIN (-2147483647 - 1) -#define __WCHAR_MAX (2147483647) - -#endif /* bits/wchar.h */ diff --git a/libc/sysdeps/linux/powerpc/bits/xopen_lim.h b/libc/sysdeps/linux/powerpc/bits/xopen_lim.h deleted file mode 100644 index 7f3611860..000000000 --- a/libc/sysdeps/linux/powerpc/bits/xopen_lim.h +++ /dev/null @@ -1,144 +0,0 @@ -/* Copyright (C) 1996, 1997, 1999, 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. */ - -/* - * Never include this file directly; use <limits.h> instead. - */ - -/* Additional definitions from X/Open Portability Guide, Issue 4, Version 2 - System Interfaces and Headers, 4.16 <limits.h> - - Please note only the values which are not greater than the minimum - stated in the standard document are listed. The `sysconf' functions - should be used to obtain the actual value. */ - -#ifndef _XOPEN_LIM_H -#define _XOPEN_LIM_H 1 - -#define __need_IOV_MAX -#include <bits/stdio_lim.h> - -/* We do not provide fixed values for - - ARG_MAX Maximum length of argument to the `exec' function - including environment data. - - ATEXIT_MAX Maximum number of functions that may be registered - with `atexit'. - - CHILD_MAX Maximum number of simultaneous processes per real - user ID. - - OPEN_MAX Maximum number of files that one process can have open - at anyone time. - - PAGESIZE - PAGE_SIZE Size of bytes of a page. - - PASS_MAX Maximum number of significant bytes in a password. - - We only provide a fixed limit for - - IOV_MAX Maximum number of `iovec' structures that one process has - available for use with `readv' or writev'. - - if this is indeed fixed by the underlying system. -*/ - - -/* Maximum number of `iovec' structures that one process has available - for use with `readv' or writev'. */ -#define _XOPEN_IOV_MAX _POSIX_UIO_MAXIOV - - -/* Maximum value of `digit' in calls to the `printf' and `scanf' - functions. We have no limit, so return a reasonable value. */ -#define NL_ARGMAX _POSIX_ARG_MAX - -/* Maximum number of bytes in a `LANG' name. We have no limit. */ -#define NL_LANGMAX _POSIX2_LINE_MAX - -/* Maximum message number. We have no limit. */ -#define NL_MSGMAX INT_MAX - -/* Maximum number of bytes in N-to-1 collation mapping. We have no - limit. */ -#define NL_NMAX INT_MAX - -/* Maximum set number. We have no limit. */ -#define NL_SETMAX INT_MAX - -/* Maximum number of bytes in a message. We have no limit. */ -#define NL_TEXTMAX INT_MAX - -/* Default process priority. */ -#define NZERO 20 - - -/* Number of bits in a word of type `int'. */ -#ifdef INT_MAX -# if INT_MAX == 32767 -# define WORD_BIT 16 -# else -# if INT_MAX == 2147483647 -# define WORD_BIT 32 -# else -/* Safe assumption. */ -# define WORD_BIT 64 -# endif -# endif -#elif defined __INT_MAX__ -# if __INT_MAX__ == 32767 -# define WORD_BIT 16 -# else -# if __INT_MAX__ == 2147483647 -# define WORD_BIT 32 -# else -/* Safe assumption. */ -# define WORD_BIT 64 -# endif -# endif -#else -# define WORD_BIT 32 -#endif - -/* Number of bits in a word of type `long int'. */ -#ifdef LONG_MAX -# if LONG_MAX == 2147483647 -# define LONG_BIT 32 -# else -/* Safe assumption. */ -# define LONG_BIT 64 -# endif -#elif defined __LONG_MAX__ -# if __LONG_MAX__ == 2147483647 -# define LONG_BIT 32 -# else -/* Safe assumption. */ -# define LONG_BIT 64 -# endif -#else -# include <bits/wordsize.h> -# if __WORDSIZE == 64 -# define LONG_BIT 64 -# else -# define LONG_BIT 32 -# endif -#endif - -#endif /* bits/xopen_lim.h */ diff --git a/libc/sysdeps/linux/powerpc/sys/procfs.h b/libc/sysdeps/linux/powerpc/sys/procfs.h new file mode 100644 index 000000000..b761bf21c --- /dev/null +++ b/libc/sysdeps/linux/powerpc/sys/procfs.h @@ -0,0 +1,138 @@ +/* Copyright (C) 1996, 1997, 1999 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 _SYS_PROCFS_H +#define _SYS_PROCFS_H 1 + +/* This is somehow modelled after the file of the same name on SysVr4 + systems. It provides a definition of the core file format for ELF + used on Linux. */ + +#include <features.h> +#include <signal.h> +#include <sys/time.h> +#include <sys/types.h> +#include <sys/ucontext.h> +#include <sys/user.h> + +__BEGIN_DECLS + +#define ELF_NGREG 48 /* includes nip, msr, lr, etc. */ +#define ELF_NFPREG 33 /* includes fpscr */ +#define ELF_NVRREG 33 /* includes vscr */ + +typedef unsigned long elf_greg_t; +typedef elf_greg_t elf_gregset_t[ELF_NGREG]; + +typedef double elf_fpreg_t; +typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; + +/* gcc doesn't support __TI__ yet */ +#if 0 +typedef unsigned __uint128_t __attribute__ (( __mode__ (__TI__))); +#else +typedef struct { + unsigned long u[4]; +} __attribute((aligned(16))) __uint128_t; +#endif + +/* Altivec registers */ +typedef __uint128_t elf_vrreg_t; +typedef elf_vrreg_t elf_vrregset_t[ELF_NVRREG]; + +struct elf_siginfo + { + int si_signo; /* Signal number. */ + int si_code; /* Extra code. */ + int si_errno; /* Errno. */ + }; + + +/* Definitions to generate Intel SVR4-like core files. These mostly + have the same names as the SVR4 types with "elf_" tacked on the + front to prevent clashes with linux definitions, and the typedef + forms have been avoided. This is mostly like the SVR4 structure, + but more Linuxy, with things that Linux does not support and which + gdb doesn't really use excluded. Fields present but not used are + marked with "XXX". */ +struct elf_prstatus + { +#if 0 + long int pr_flags; /* XXX Process flags. */ + short int pr_why; /* XXX Reason for process halt. */ + short int pr_what; /* XXX More detailed reason. */ +#endif + struct elf_siginfo pr_info; /* Info associated with signal. */ + short int pr_cursig; /* Current signal. */ + unsigned long int pr_sigpend; /* Set of pending signals. */ + unsigned long int pr_sighold; /* Set of held signals. */ +#if 0 + struct sigaltstack pr_altstack; /* Alternate stack info. */ + struct sigaction pr_action; /* Signal action for current sig. */ +#endif + __pid_t pr_pid; + __pid_t pr_ppid; + __pid_t pr_pgrp; + __pid_t pr_sid; + struct timeval pr_utime; /* User time. */ + struct timeval pr_stime; /* System time. */ + struct timeval pr_cutime; /* Cumulative user time. */ + struct timeval pr_cstime; /* Cumulative system time. */ +#if 0 + long int pr_instr; /* Current instruction. */ +#endif + elf_gregset_t pr_reg; /* GP registers. */ + int pr_fpvalid; /* True if math copro being used. */ + }; + + +#define ELF_PRARGSZ (80) /* Number of chars for args */ + +struct elf_prpsinfo + { + char pr_state; /* Numeric process state. */ + char pr_sname; /* Char for pr_state. */ + char pr_zomb; /* Zombie. */ + char pr_nice; /* Nice val. */ + unsigned long int pr_flag; /* Flags. */ + __uid_t pr_uid; + __gid_t pr_gid; + __pid_t pr_pid, pr_ppid, pr_pgrp, pr_sid; + /* Lots missing */ + char pr_fname[16]; /* Filename of executable. */ + char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ + }; + +/* Addresses. */ +typedef void *psaddr_t; + +/* Register sets. Linux has different names. */ +typedef elf_gregset_t prgregset_t; +typedef elf_fpregset_t prfpregset_t; + +/* We don't have any differences between processes and threads, + therefore habe only ine PID type. */ +typedef __pid_t lwpid_t; + + +typedef struct elf_prstatus prstatus_t; +typedef struct elf_prpsinfo prpsinfo_t; + +__END_DECLS + +#endif /* sys/procfs.h */ diff --git a/libc/sysdeps/linux/powerpc/sys/ptrace.h b/libc/sysdeps/linux/powerpc/sys/ptrace.h new file mode 100644 index 000000000..91a87307f --- /dev/null +++ b/libc/sysdeps/linux/powerpc/sys/ptrace.h @@ -0,0 +1,99 @@ +/* `ptrace' debugger support interface. Linux version. + Copyright (C) 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. */ + +#ifndef _SYS_PTRACE_H +#define _SYS_PTRACE_H 1 + +#include <features.h> + +__BEGIN_DECLS + +/* Type of the REQUEST argument to `ptrace.' */ +enum __ptrace_request +{ + /* Indicate that the process making this request should be traced. + All signals received by this process can be intercepted by its + parent, and its parent can use the other `ptrace' requests. */ + PTRACE_TRACEME = 0, +#define PT_TRACE_ME PTRACE_TRACEME + + /* Return the word in the process's text space at address ADDR. */ + PTRACE_PEEKTEXT = 1, +#define PT_READ_I PTRACE_PEEKTEXT + + /* Return the word in the process's data space at address ADDR. */ + PTRACE_PEEKDATA = 2, +#define PT_READ_D PTRACE_PEEKDATA + + /* Return the word in the process's user area at offset ADDR. */ + PTRACE_PEEKUSER = 3, +#define PT_READ_U PTRACE_PEEKUSER + + /* Write the word DATA into the process's text space at address ADDR. */ + PTRACE_POKETEXT = 4, +#define PT_WRITE_I PTRACE_POKETEXT + + /* Write the word DATA into the process's data space at address ADDR. */ + PTRACE_POKEDATA = 5, +#define PT_WRITE_D PTRACE_POKEDATA + + /* Write the word DATA into the process's user area at offset ADDR. */ + PTRACE_POKEUSER = 6, +#define PT_WRITE_U PTRACE_POKEUSER + + /* Continue the process. */ + PTRACE_CONT = 7, +#define PT_CONTINUE PTRACE_CONT + + /* Kill the process. */ + PTRACE_KILL = 8, +#define PT_KILL PTRACE_KILL + + /* Single step the process. + This is not supported on all machines. */ + PTRACE_SINGLESTEP = 9, +#define PT_STEP PTRACE_SINGLESTEP + + /* Attach to a process that is already running. */ + PTRACE_ATTACH = 16, +#define PT_ATTACH PTRACE_ATTACH + + /* Detach from a process attached to with PTRACE_ATTACH. */ + PTRACE_DETACH = 17, +#define PT_DETACH PTRACE_DETACH + + /* Continue and stop at the next (return from) syscall. */ + PTRACE_SYSCALL = 24 +#define PT_SYSCALL PTRACE_SYSCALL +}; + +/* Perform process tracing functions. REQUEST is one of the values + above, and determines the action to be taken. + For all requests except PTRACE_TRACEME, PID specifies the process to be + traced. + + PID and the other arguments described above for the various requests should + appear (those that are used for the particular request) as: + pid_t PID, void *ADDR, int DATA, void *ADDR2 + after REQUEST. */ +extern long int ptrace (enum __ptrace_request __request, ...) __THROW; + +__END_DECLS + +#endif /* _SYS_PTRACE_H */ diff --git a/libc/sysdeps/linux/i386/bits/ustat.h b/libc/sysdeps/linux/powerpc/sys/ucontext.h index aeafc22a5..07f0933ff 100644 --- a/libc/sysdeps/linux/i386/bits/ustat.h +++ b/libc/sysdeps/linux/powerpc/sys/ucontext.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999 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 @@ -16,12 +16,26 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include <sys/types.h> +#ifndef _SYS_UCONTEXT_H +#define _SYS_UCONTEXT_H 1 -struct ustat +#include <features.h> +#include <signal.h> + +/* We need the signal context definitions even if they are not used + included in <signal.h>. */ +#include <bits/sigcontext.h> + +typedef struct sigcontext mcontext_t; + +/* Userlevel context. */ +typedef struct ucontext { - __daddr_t f_tfree; - __ino_t f_tinode; - char f_fname[6]; - char f_fpack[6]; - }; + unsigned long int uc_flags; + struct ucontext *uc_link; + stack_t uc_stack; + mcontext_t uc_mcontext; + __sigset_t uc_sigmask; + } ucontext_t; + +#endif /* sys/ucontext.h */ diff --git a/libc/sysdeps/linux/powerpc/sys/user.h b/libc/sysdeps/linux/powerpc/sys/user.h new file mode 100644 index 000000000..e8a8aaa95 --- /dev/null +++ b/libc/sysdeps/linux/powerpc/sys/user.h @@ -0,0 +1,40 @@ +/* Copyright (C) 1998 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 _SYS_USER_H + +#define _SYS_USER_H 1 +#include <features.h> + +#include <asm/ptrace.h> + +struct user { + struct pt_regs regs; /* entire machine state */ + size_t u_tsize; /* text size (pages) */ + size_t u_dsize; /* data size (pages) */ + size_t u_ssize; /* stack size (pages) */ + unsigned long start_code; /* text starting address */ + unsigned long start_data; /* data starting address */ + unsigned long start_stack; /* stack starting address */ + long int signal; /* signal causing core dump */ + struct regs * u_ar0; /* help gdb find registers */ + unsigned long magic; /* identifies a core file */ + char u_comm[32]; /* user command name */ +}; + +#endif /* sys/user.h */ diff --git a/libc/sysdeps/linux/sh/bits/byteswap.h b/libc/sysdeps/linux/sh/bits/byteswap.h deleted file mode 100644 index 7866abe9c..000000000 --- a/libc/sysdeps/linux/sh/bits/byteswap.h +++ /dev/null @@ -1,79 +0,0 @@ -/* Macros to swap the order of bytes in integer values. - Copyright (C) 1997, 1998, 2000, 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. */ - -#if !defined _BYTESWAP_H && !defined _NETINET_IN_H -# error "Never use <bits/byteswap.h> directly; include <byteswap.h> instead." -#endif - -/* Swap bytes in 16 bit value. */ -#ifdef __GNUC__ -# define __bswap_16(x) \ - (__extension__ \ - ({ unsigned short int __bsx = (x); \ - ((((__bsx) >> 8) & 0xff) | (((__bsx) & 0xff) << 8)); })) -#else -static __inline unsigned short int -__bswap_16 (unsigned short int __bsx) -{ - return ((((__bsx) >> 8) & 0xff) | (((__bsx) & 0xff) << 8)); -} -#endif - -/* Swap bytes in 32 bit value. */ -#ifdef __GNUC__ -# define __bswap_32(x) \ - (__extension__ \ - ({ unsigned int __bsx = (x); \ - ((((__bsx) & 0xff000000) >> 24) | (((__bsx) & 0x00ff0000) >> 8) | \ - (((__bsx) & 0x0000ff00) << 8) | (((__bsx) & 0x000000ff) << 24)); })) -#else -static __inline unsigned int -__bswap_32 (unsigned int __bsx) -{ - return ((((__bsx) & 0xff000000) >> 24) | (((__bsx) & 0x00ff0000) >> 8) | - (((__bsx) & 0x0000ff00) << 8) | (((__bsx) & 0x000000ff) << 24)); -} -#endif - -#if defined __GNUC__ && __GNUC__ >= 2 -/* Swap bytes in 64 bit value. */ -# define __bswap_constant_64(x) \ - ((((x) & 0xff00000000000000ull) >> 56) \ - | (((x) & 0x00ff000000000000ull) >> 40) \ - | (((x) & 0x0000ff0000000000ull) >> 24) \ - | (((x) & 0x000000ff00000000ull) >> 8) \ - | (((x) & 0x00000000ff000000ull) << 8) \ - | (((x) & 0x0000000000ff0000ull) << 24) \ - | (((x) & 0x000000000000ff00ull) << 40) \ - | (((x) & 0x00000000000000ffull) << 56)) - -# define __bswap_64(x) \ - (__extension__ \ - ({ union { __extension__ unsigned long long int __ll; \ - unsigned int __l[2]; } __w, __r; \ - if (__builtin_constant_p (x)) \ - __r.__ll = __bswap_constant_64 (x); \ - else \ - { \ - __w.__ll = (x); \ - __r.__l[0] = __bswap_32 (__w.__l[1]); \ - __r.__l[1] = __bswap_32 (__w.__l[0]); \ - } \ - __r.__ll; })) -#endif diff --git a/libc/sysdeps/linux/sh/bits/cmathcalls.h b/libc/sysdeps/linux/sh/bits/cmathcalls.h deleted file mode 100644 index c680c6d8e..000000000 --- a/libc/sysdeps/linux/sh/bits/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/libc/sysdeps/linux/sh/bits/confname.h b/libc/sysdeps/linux/sh/bits/confname.h deleted file mode 100644 index ba8868af4..000000000 --- a/libc/sysdeps/linux/sh/bits/confname.h +++ /dev/null @@ -1,566 +0,0 @@ -/* `sysconf', `pathconf', and `confstr' NAME values. Generic version. - Copyright (C) 1993, 1995-1998, 2000, 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. */ - -#ifndef _UNISTD_H -# error "Never use <bits/confname.h> directly; include <unistd.h> instead." -#endif - -/* Values for the NAME argument to `pathconf' and `fpathconf'. */ -enum - { - _PC_LINK_MAX, -#define _PC_LINK_MAX _PC_LINK_MAX - _PC_MAX_CANON, -#define _PC_MAX_CANON _PC_MAX_CANON - _PC_MAX_INPUT, -#define _PC_MAX_INPUT _PC_MAX_INPUT - _PC_NAME_MAX, -#define _PC_NAME_MAX _PC_NAME_MAX - _PC_PATH_MAX, -#define _PC_PATH_MAX _PC_PATH_MAX - _PC_PIPE_BUF, -#define _PC_PIPE_BUF _PC_PIPE_BUF - _PC_CHOWN_RESTRICTED, -#define _PC_CHOWN_RESTRICTED _PC_CHOWN_RESTRICTED - _PC_NO_TRUNC, -#define _PC_NO_TRUNC _PC_NO_TRUNC - _PC_VDISABLE, -#define _PC_VDISABLE _PC_VDISABLE - _PC_SYNC_IO, -#define _PC_SYNC_IO _PC_SYNC_IO - _PC_ASYNC_IO, -#define _PC_ASYNC_IO _PC_ASYNC_IO - _PC_PRIO_IO, -#define _PC_PRIO_IO _PC_PRIO_IO - _PC_SOCK_MAXBUF, -#define _PC_SOCK_MAXBUF _PC_SOCK_MAXBUF - _PC_FILESIZEBITS, -#define _PC_FILESIZEBITS _PC_FILESIZEBITS - _PC_REC_INCR_XFER_SIZE, -#define _PC_REC_INCR_XFER_SIZE _PC_REC_INCR_XFER_SIZE - _PC_REC_MAX_XFER_SIZE, -#define _PC_REC_MAX_XFER_SIZE _PC_REC_MAX_XFER_SIZE - _PC_REC_MIN_XFER_SIZE, -#define _PC_REC_MIN_XFER_SIZE _PC_REC_MIN_XFER_SIZE - _PC_REC_XFER_ALIGN, -#define _PC_REC_XFER_ALIGN _PC_REC_XFER_ALIGN - _PC_ALLOC_SIZE_MIN, -#define _PC_ALLOC_SIZE_MIN _PC_ALLOC_SIZE_MIN - _PC_SYMLINK_MAX -#define _PC_SYMLINK_MAX _PC_SYMLINK_MAX - }; - -/* Values for the argument to `sysconf'. */ -enum - { - _SC_ARG_MAX, -#define _SC_ARG_MAX _SC_ARG_MAX - _SC_CHILD_MAX, -#define _SC_CHILD_MAX _SC_CHILD_MAX - _SC_CLK_TCK, -#define _SC_CLK_TCK _SC_CLK_TCK - _SC_NGROUPS_MAX, -#define _SC_NGROUPS_MAX _SC_NGROUPS_MAX - _SC_OPEN_MAX, -#define _SC_OPEN_MAX _SC_OPEN_MAX - _SC_STREAM_MAX, -#define _SC_STREAM_MAX _SC_STREAM_MAX - _SC_TZNAME_MAX, -#define _SC_TZNAME_MAX _SC_TZNAME_MAX - _SC_JOB_CONTROL, -#define _SC_JOB_CONTROL _SC_JOB_CONTROL - _SC_SAVED_IDS, -#define _SC_SAVED_IDS _SC_SAVED_IDS - _SC_REALTIME_SIGNALS, -#define _SC_REALTIME_SIGNALS _SC_REALTIME_SIGNALS - _SC_PRIORITY_SCHEDULING, -#define _SC_PRIORITY_SCHEDULING _SC_PRIORITY_SCHEDULING - _SC_TIMERS, -#define _SC_TIMERS _SC_TIMERS - _SC_ASYNCHRONOUS_IO, -#define _SC_ASYNCHRONOUS_IO _SC_ASYNCHRONOUS_IO - _SC_PRIORITIZED_IO, -#define _SC_PRIORITIZED_IO _SC_PRIORITIZED_IO - _SC_SYNCHRONIZED_IO, -#define _SC_SYNCHRONIZED_IO _SC_SYNCHRONIZED_IO - _SC_FSYNC, -#define _SC_FSYNC _SC_FSYNC - _SC_MAPPED_FILES, -#define _SC_MAPPED_FILES _SC_MAPPED_FILES - _SC_MEMLOCK, -#define _SC_MEMLOCK _SC_MEMLOCK - _SC_MEMLOCK_RANGE, -#define _SC_MEMLOCK_RANGE _SC_MEMLOCK_RANGE - _SC_MEMORY_PROTECTION, -#define _SC_MEMORY_PROTECTION _SC_MEMORY_PROTECTION - _SC_MESSAGE_PASSING, -#define _SC_MESSAGE_PASSING _SC_MESSAGE_PASSING - _SC_SEMAPHORES, -#define _SC_SEMAPHORES _SC_SEMAPHORES - _SC_SHARED_MEMORY_OBJECTS, -#define _SC_SHARED_MEMORY_OBJECTS _SC_SHARED_MEMORY_OBJECTS - _SC_AIO_LISTIO_MAX, -#define _SC_AIO_LISTIO_MAX _SC_AIO_LISTIO_MAX - _SC_AIO_MAX, -#define _SC_AIO_MAX _SC_AIO_MAX - _SC_AIO_PRIO_DELTA_MAX, -#define _SC_AIO_PRIO_DELTA_MAX _SC_AIO_PRIO_DELTA_MAX - _SC_DELAYTIMER_MAX, -#define _SC_DELAYTIMER_MAX _SC_DELAYTIMER_MAX - _SC_MQ_OPEN_MAX, -#define _SC_MQ_OPEN_MAX _SC_MQ_OPEN_MAX - _SC_MQ_PRIO_MAX, -#define _SC_MQ_PRIO_MAX _SC_MQ_PRIO_MAX - _SC_VERSION, -#define _SC_VERSION _SC_VERSION - _SC_PAGESIZE, -#define _SC_PAGESIZE _SC_PAGESIZE -#define _SC_PAGE_SIZE _SC_PAGESIZE - _SC_RTSIG_MAX, -#define _SC_RTSIG_MAX _SC_RTSIG_MAX - _SC_SEM_NSEMS_MAX, -#define _SC_SEM_NSEMS_MAX _SC_SEM_NSEMS_MAX - _SC_SEM_VALUE_MAX, -#define _SC_SEM_VALUE_MAX _SC_SEM_VALUE_MAX - _SC_SIGQUEUE_MAX, -#define _SC_SIGQUEUE_MAX _SC_SIGQUEUE_MAX - _SC_TIMER_MAX, -#define _SC_TIMER_MAX _SC_TIMER_MAX - - /* Values for the argument to `sysconf' - corresponding to _POSIX2_* symbols. */ - _SC_BC_BASE_MAX, -#define _SC_BC_BASE_MAX _SC_BC_BASE_MAX - _SC_BC_DIM_MAX, -#define _SC_BC_DIM_MAX _SC_BC_DIM_MAX - _SC_BC_SCALE_MAX, -#define _SC_BC_SCALE_MAX _SC_BC_SCALE_MAX - _SC_BC_STRING_MAX, -#define _SC_BC_STRING_MAX _SC_BC_STRING_MAX - _SC_COLL_WEIGHTS_MAX, -#define _SC_COLL_WEIGHTS_MAX _SC_COLL_WEIGHTS_MAX - _SC_EQUIV_CLASS_MAX, -#define _SC_EQUIV_CLASS_MAX _SC_EQUIV_CLASS_MAX - _SC_EXPR_NEST_MAX, -#define _SC_EXPR_NEST_MAX _SC_EXPR_NEST_MAX - _SC_LINE_MAX, -#define _SC_LINE_MAX _SC_LINE_MAX - _SC_RE_DUP_MAX, -#define _SC_RE_DUP_MAX _SC_RE_DUP_MAX - _SC_CHARCLASS_NAME_MAX, -#define _SC_CHARCLASS_NAME_MAX _SC_CHARCLASS_NAME_MAX - - _SC_2_VERSION, -#define _SC_2_VERSION _SC_2_VERSION - _SC_2_C_BIND, -#define _SC_2_C_BIND _SC_2_C_BIND - _SC_2_C_DEV, -#define _SC_2_C_DEV _SC_2_C_DEV - _SC_2_FORT_DEV, -#define _SC_2_FORT_DEV _SC_2_FORT_DEV - _SC_2_FORT_RUN, -#define _SC_2_FORT_RUN _SC_2_FORT_RUN - _SC_2_SW_DEV, -#define _SC_2_SW_DEV _SC_2_SW_DEV - _SC_2_LOCALEDEF, -#define _SC_2_LOCALEDEF _SC_2_LOCALEDEF - - _SC_PII, -#define _SC_PII _SC_PII - _SC_PII_XTI, -#define _SC_PII_XTI _SC_PII_XTI - _SC_PII_SOCKET, -#define _SC_PII_SOCKET _SC_PII_SOCKET - _SC_PII_INTERNET, -#define _SC_PII_INTERNET _SC_PII_INTERNET - _SC_PII_OSI, -#define _SC_PII_OSI _SC_PII_OSI - _SC_POLL, -#define _SC_POLL _SC_POLL - _SC_SELECT, -#define _SC_SELECT _SC_SELECT - _SC_UIO_MAXIOV, -#define _SC_UIO_MAXIOV _SC_UIO_MAXIOV - _SC_IOV_MAX = _SC_UIO_MAXIOV, -#define _SC_IOV_MAX _SC_IOV_MAX - _SC_PII_INTERNET_STREAM, -#define _SC_PII_INTERNET_STREAM _SC_PII_INTERNET_STREAM - _SC_PII_INTERNET_DGRAM, -#define _SC_PII_INTERNET_DGRAM _SC_PII_INTERNET_DGRAM - _SC_PII_OSI_COTS, -#define _SC_PII_OSI_COTS _SC_PII_OSI_COTS - _SC_PII_OSI_CLTS, -#define _SC_PII_OSI_CLTS _SC_PII_OSI_CLTS - _SC_PII_OSI_M, -#define _SC_PII_OSI_M _SC_PII_OSI_M - _SC_T_IOV_MAX, -#define _SC_T_IOV_MAX _SC_T_IOV_MAX - - /* Values according to POSIX 1003.1c (POSIX threads). */ - _SC_THREADS, -#define _SC_THREADS _SC_THREADS - _SC_THREAD_SAFE_FUNCTIONS, -#define _SC_THREAD_SAFE_FUNCTIONS _SC_THREAD_SAFE_FUNCTIONS - _SC_GETGR_R_SIZE_MAX, -#define _SC_GETGR_R_SIZE_MAX _SC_GETGR_R_SIZE_MAX - _SC_GETPW_R_SIZE_MAX, -#define _SC_GETPW_R_SIZE_MAX _SC_GETPW_R_SIZE_MAX - _SC_LOGIN_NAME_MAX, -#define _SC_LOGIN_NAME_MAX _SC_LOGIN_NAME_MAX - _SC_TTY_NAME_MAX, -#define _SC_TTY_NAME_MAX _SC_TTY_NAME_MAX - _SC_THREAD_DESTRUCTOR_ITERATIONS, -#define _SC_THREAD_DESTRUCTOR_ITERATIONS _SC_THREAD_DESTRUCTOR_ITERATIONS - _SC_THREAD_KEYS_MAX, -#define _SC_THREAD_KEYS_MAX _SC_THREAD_KEYS_MAX - _SC_THREAD_STACK_MIN, -#define _SC_THREAD_STACK_MIN _SC_THREAD_STACK_MIN - _SC_THREAD_THREADS_MAX, -#define _SC_THREAD_THREADS_MAX _SC_THREAD_THREADS_MAX - _SC_THREAD_ATTR_STACKADDR, -#define _SC_THREAD_ATTR_STACKADDR _SC_THREAD_ATTR_STACKADDR - _SC_THREAD_ATTR_STACKSIZE, -#define _SC_THREAD_ATTR_STACKSIZE _SC_THREAD_ATTR_STACKSIZE - _SC_THREAD_PRIORITY_SCHEDULING, -#define _SC_THREAD_PRIORITY_SCHEDULING _SC_THREAD_PRIORITY_SCHEDULING - _SC_THREAD_PRIO_INHERIT, -#define _SC_THREAD_PRIO_INHERIT _SC_THREAD_PRIO_INHERIT - _SC_THREAD_PRIO_PROTECT, -#define _SC_THREAD_PRIO_PROTECT _SC_THREAD_PRIO_PROTECT - _SC_THREAD_PROCESS_SHARED, -#define _SC_THREAD_PROCESS_SHARED _SC_THREAD_PROCESS_SHARED - - _SC_NPROCESSORS_CONF, -#define _SC_NPROCESSORS_CONF _SC_NPROCESSORS_CONF - _SC_NPROCESSORS_ONLN, -#define _SC_NPROCESSORS_ONLN _SC_NPROCESSORS_ONLN - _SC_PHYS_PAGES, -#define _SC_PHYS_PAGES _SC_PHYS_PAGES - _SC_AVPHYS_PAGES, -#define _SC_AVPHYS_PAGES _SC_AVPHYS_PAGES - _SC_ATEXIT_MAX, -#define _SC_ATEXIT_MAX _SC_ATEXIT_MAX - _SC_PASS_MAX, -#define _SC_PASS_MAX _SC_PASS_MAX - - _SC_XOPEN_VERSION, -#define _SC_XOPEN_VERSION _SC_XOPEN_VERSION - _SC_XOPEN_XCU_VERSION, -#define _SC_XOPEN_XCU_VERSION _SC_XOPEN_XCU_VERSION - _SC_XOPEN_UNIX, -#define _SC_XOPEN_UNIX _SC_XOPEN_UNIX - _SC_XOPEN_CRYPT, -#define _SC_XOPEN_CRYPT _SC_XOPEN_CRYPT - _SC_XOPEN_ENH_I18N, -#define _SC_XOPEN_ENH_I18N _SC_XOPEN_ENH_I18N - _SC_XOPEN_SHM, -#define _SC_XOPEN_SHM _SC_XOPEN_SHM - - _SC_2_CHAR_TERM, -#define _SC_2_CHAR_TERM _SC_2_CHAR_TERM - _SC_2_C_VERSION, -#define _SC_2_C_VERSION _SC_2_C_VERSION - _SC_2_UPE, -#define _SC_2_UPE _SC_2_UPE - - _SC_XOPEN_XPG2, -#define _SC_XOPEN_XPG2 _SC_XOPEN_XPG2 - _SC_XOPEN_XPG3, -#define _SC_XOPEN_XPG3 _SC_XOPEN_XPG3 - _SC_XOPEN_XPG4, -#define _SC_XOPEN_XPG4 _SC_XOPEN_XPG4 - - _SC_CHAR_BIT, -#define _SC_CHAR_BIT _SC_CHAR_BIT - _SC_CHAR_MAX, -#define _SC_CHAR_MAX _SC_CHAR_MAX - _SC_CHAR_MIN, -#define _SC_CHAR_MIN _SC_CHAR_MIN - _SC_INT_MAX, -#define _SC_INT_MAX _SC_INT_MAX - _SC_INT_MIN, -#define _SC_INT_MIN _SC_INT_MIN - _SC_LONG_BIT, -#define _SC_LONG_BIT _SC_LONG_BIT - _SC_WORD_BIT, -#define _SC_WORD_BIT _SC_WORD_BIT - _SC_MB_LEN_MAX, -#define _SC_MB_LEN_MAX _SC_MB_LEN_MAX - _SC_NZERO, -#define _SC_NZERO _SC_NZERO - _SC_SSIZE_MAX, -#define _SC_SSIZE_MAX _SC_SSIZE_MAX - _SC_SCHAR_MAX, -#define _SC_SCHAR_MAX _SC_SCHAR_MAX - _SC_SCHAR_MIN, -#define _SC_SCHAR_MIN _SC_SCHAR_MIN - _SC_SHRT_MAX, -#define _SC_SHRT_MAX _SC_SHRT_MAX - _SC_SHRT_MIN, -#define _SC_SHRT_MIN _SC_SHRT_MIN - _SC_UCHAR_MAX, -#define _SC_UCHAR_MAX _SC_UCHAR_MAX - _SC_UINT_MAX, -#define _SC_UINT_MAX _SC_UINT_MAX - _SC_ULONG_MAX, -#define _SC_ULONG_MAX _SC_ULONG_MAX - _SC_USHRT_MAX, -#define _SC_USHRT_MAX _SC_USHRT_MAX - - _SC_NL_ARGMAX, -#define _SC_NL_ARGMAX _SC_NL_ARGMAX - _SC_NL_LANGMAX, -#define _SC_NL_LANGMAX _SC_NL_LANGMAX - _SC_NL_MSGMAX, -#define _SC_NL_MSGMAX _SC_NL_MSGMAX - _SC_NL_NMAX, -#define _SC_NL_NMAX _SC_NL_NMAX - _SC_NL_SETMAX, -#define _SC_NL_SETMAX _SC_NL_SETMAX - _SC_NL_TEXTMAX, -#define _SC_NL_TEXTMAX _SC_NL_TEXTMAX - - _SC_XBS5_ILP32_OFF32, -#define _SC_XBS5_ILP32_OFF32 _SC_XBS5_ILP32_OFF32 - _SC_XBS5_ILP32_OFFBIG, -#define _SC_XBS5_ILP32_OFFBIG _SC_XBS5_ILP32_OFFBIG - _SC_XBS5_LP64_OFF64, -#define _SC_XBS5_LP64_OFF64 _SC_XBS5_LP64_OFF64 - _SC_XBS5_LPBIG_OFFBIG, -#define _SC_XBS5_LPBIG_OFFBIG _SC_XBS5_LPBIG_OFFBIG - - _SC_XOPEN_LEGACY, -#define _SC_XOPEN_LEGACY _SC_XOPEN_LEGACY - _SC_XOPEN_REALTIME, -#define _SC_XOPEN_REALTIME _SC_XOPEN_REALTIME - _SC_XOPEN_REALTIME_THREADS, -#define _SC_XOPEN_REALTIME_THREADS _SC_XOPEN_REALTIME_THREADS - - _SC_ADVISORY_INFO, -#define _SC_ADVISORY_INFO _SC_ADVISORY_INFO - _SC_BARRIERS, -#define _SC_BARRIERS _SC_BARRIERS - _SC_BASE, -#define _SC_BASE _SC_BASE - _SC_C_LANG_SUPPORT, -#define _SC_C_LANG_SUPPORT _SC_C_LANG_SUPPORT - _SC_C_LANG_SUPPORT_R, -#define _SC_C_LANG_SUPPORT_R _SC_C_LANG_SUPPORT_R - _SC_CLOCK_SELECTION, -#define _SC_CLOCK_SELECTION _SC_CLOCK_SELECTION - _SC_CPUTIME, -#define _SC_CPUTIME _SC_CPUTIME - _SC_THREAD_CPUTIME, -#define _SC_THREAD_CPUTIME _SC_THREAD_CPUTIME - _SC_DEVICE_IO, -#define _SC_DEVICE_IO _SC_DEVICE_IO - _SC_DEVICE_SPECIFIC, -#define _SC_DEVICE_SPECIFIC _SC_DEVICE_SPECIFIC - _SC_DEVICE_SPECIFIC_R, -#define _SC_DEVICE_SPECIFIC_R _SC_DEVICE_SPECIFIC_R - _SC_FD_MGMT, -#define _SC_FD_MGMT _SC_FD_MGMT - _SC_FIFO, -#define _SC_FIFO _SC_FIFO - _SC_PIPE, -#define _SC_PIPE _SC_PIPE - _SC_FILE_ATTRIBUTES, -#define _SC_FILE_ATTRIBUTES _SC_FILE_ATTRIBUTES - _SC_FILE_LOCKING, -#define _SC_FILE_LOCKING _SC_FILE_LOCKING - _SC_FILE_SYSTEM, -#define _SC_FILE_SYSTEM _SC_FILE_SYSTEM - _SC_MONOTONIC_CLOCK, -#define _SC_MONOTONIC_CLOCK _SC_MONOTONIC_CLOCK - _SC_MULTI_PROCESS, -#define _SC_MULTI_PROCESS _SC_MULTI_PROCESS - _SC_SINGLE_PROCESS, -#define _SC_SINGLE_PROCESS _SC_SINGLE_PROCESS - _SC_NETWORKING, -#define _SC_NETWORKING _SC_NETWORKING - _SC_READER_WRITER_LOCKS, -#define _SC_READER_WRITER_LOCKS _SC_READER_WRITER_LOCKS - _SC_SPIN_LOCKS, -#define _SC_SPIN_LOCKS _SC_SPIN_LOCKS - _SC_REGEXP, -#define _SC_REGEXP _SC_REGEXP - _SC_REGEX_VERSION, -#define _SC_REGEX_VERSION _SC_REGEX_VERSION - _SC_SHELL, -#define _SC_SHELL _SC_SHELL - _SC_SIGNALS, -#define _SC_SIGNALS _SC_SIGNALS - _SC_SPAWN, -#define _SC_SPAWN _SC_SPAWN - _SC_SPORADIC_SERVER, -#define _SC_SPORADIC_SERVER _SC_SPORADIC_SERVER - _SC_THREAD_SPORADIC_SERVER, -#define _SC_THREAD_SPORADIC_SERVER _SC_THREAD_SPORADIC_SERVER - _SC_SYSTEM_DATABASE, -#define _SC_SYSTEM_DATABASE _SC_SYSTEM_DATABASE - _SC_SYSTEM_DATABASE_R, -#define _SC_SYSTEM_DATABASE_R _SC_SYSTEM_DATABASE_R - _SC_TIMEOUTS, -#define _SC_TIMEOUTS _SC_TIMEOUTS - _SC_TYPED_MEMORY_OBJECTS, -#define _SC_TYPED_MEMORY_OBJECTS _SC_TYPED_MEMORY_OBJECTS - _SC_USER_GROUPS, -#define _SC_USER_GROUPS _SC_USER_GROUPS - _SC_USER_GROUPS_R, -#define _SC_USER_GROUPS_R _SC_USER_GROUPS_R - _SC_2_PBS, -#define _SC_2_PBS _SC_2_PBS - _SC_2_PBS_ACCOUNTING, -#define _SC_2_PBS_ACCOUNTING _SC_2_PBS_ACCOUNTING - _SC_2_PBS_LOCATE, -#define _SC_2_PBS_LOCATE _SC_2_PBS_LOCATE - _SC_2_PBS_MESSAGE, -#define _SC_2_PBS_MESSAGE _SC_2_PBS_MESSAGE - _SC_2_PBS_TRACK, -#define _SC_2_PBS_TRACK _SC_2_PBS_TRACK - _SC_SYMLOOP_MAX, -#define _SC_SYMLOOP_MAX _SC_SYMLOOP_MAX - _SC_STREAMS, -#define _SC_STREAMS _SC_STREAMS - _SC_2_PBS_CHECKPOINT, -#define _SC_2_PBS_CHECKPOINT _SC_2_PBS_CHECKPOINT - - _SC_V6_ILP32_OFF32, -#define _SC_V6_ILP32_OFF32 _SC_V6_ILP32_OFF32 - _SC_V6_ILP32_OFFBIG, -#define _SC_V6_ILP32_OFFBIG _SC_V6_ILP32_OFFBIG - _SC_V6_LP64_OFF64, -#define _SC_V6_LP64_OFF64 _SC_V6_LP64_OFF64 - _SC_V6_LPBIG_OFFBIG, -#define _SC_V6_LPBIG_OFFBIG _SC_V6_LPBIG_OFFBIG - - _SC_HOST_NAME_MAX, -#define _SC_HOST_NAME_MAX _SC_HOST_NAME_MAX - _SC_TRACE, -#define _SC_TRACE _SC_TRACE - _SC_TRACE_EVENT_FILTER, -#define _SC_TRACE_EVENT_FILTER _SC_TRACE_EVENT_FILTER - _SC_TRACE_INHERIT, -#define _SC_TRACE_INHERIT _SC_TRACE_INHERIT - _SC_TRACE_LOG -#define _SC_TRACE_LOG _SC_TRACE_LOG - }; - -#if (defined __USE_POSIX2 || defined __USE_UNIX98 \ - || defined __USE_FILE_OFFSET64 || defined __USE_LARGEFILE64 \ - || defined __USE_LARGEFILE) -/* Values for the NAME argument to `confstr'. */ -enum - { - _CS_PATH, /* The default search path. */ -#define _CS_PATH _CS_PATH - -# if (defined __USE_FILE_OFFSET64 || defined __USE_LARGEFILE64 \ - || defined __USE_LARGEFILE) - _CS_LFS_CFLAGS = 1000, -# define _CS_LFS_CFLAGS _CS_LFS_CFLAGS - _CS_LFS_LDFLAGS, -# define _CS_LFS_LDFLAGS _CS_LFS_LDFLAGS - _CS_LFS_LIBS, -# define _CS_LFS_LIBS _CS_LFS_LIBS - _CS_LFS_LINTFLAGS, -# define _CS_LFS_LINTFLAGS _CS_LFS_LINTFLAGS - _CS_LFS64_CFLAGS, -# define _CS_LFS64_CFLAGS _CS_LFS64_CFLAGS - _CS_LFS64_LDFLAGS, -# define _CS_LFS64_LDFLAGS _CS_LFS64_LDFLAGS - _CS_LFS64_LIBS, -# define _CS_LFS64_LIBS _CS_LFS64_LIBS - _CS_LFS64_LINTFLAGS, -# define _CS_LFS64_LINTFLAGS _CS_LFS64_LINTFLAGS -# endif - -# ifdef __USE_UNIX98 - _CS_XBS5_ILP32_OFF32_CFLAGS = 1100, -# define _CS_XBS5_ILP32_OFF32_CFLAGS _CS_XBS5_ILP32_OFF32_CFLAGS - _CS_XBS5_ILP32_OFF32_LDFLAGS, -# define _CS_XBS5_ILP32_OFF32_LDFLAGS _CS_XBS5_ILP32_OFF32_LDFLAGS - _CS_XBS5_ILP32_OFF32_LIBS, -# define _CS_XBS5_ILP32_OFF32_LIBS _CS_XBS5_ILP32_OFF32_LIBS - _CS_XBS5_ILP32_OFF32_LINTFLAGS, -# define _CS_XBS5_ILP32_OFF32_LINTFLAGS _CS_XBS5_ILP32_OFF32_LINTFLAGS - _CS_XBS5_ILP32_OFFBIG_CFLAGS, -# define _CS_XBS5_ILP32_OFFBIG_CFLAGS _CS_XBS5_ILP32_OFFBIG_CFLAGS - _CS_XBS5_ILP32_OFFBIG_LDFLAGS, -# define _CS_XBS5_ILP32_OFFBIG_LDFLAGS _CS_XBS5_ILP32_OFFBIG_LDFLAGS - _CS_XBS5_ILP32_OFFBIG_LIBS, -# define _CS_XBS5_ILP32_OFFBIG_LIBS _CS_XBS5_ILP32_OFFBIG_LIBS - _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, -# define _CS_XBS5_ILP32_OFFBIG_LINTFLAGS _CS_XBS5_ILP32_OFFBIG_LINTFLAGS - _CS_XBS5_LP64_OFF64_CFLAGS, -# define _CS_XBS5_LP64_OFF64_CFLAGS _CS_XBS5_LP64_OFF64_CFLAGS - _CS_XBS5_LP64_OFF64_LDFLAGS, -# define _CS_XBS5_LP64_OFF64_LDFLAGS _CS_XBS5_LP64_OFF64_LDFLAGS - _CS_XBS5_LP64_OFF64_LIBS, -# define _CS_XBS5_LP64_OFF64_LIBS _CS_XBS5_LP64_OFF64_LIBS - _CS_XBS5_LP64_OFF64_LINTFLAGS, -# define _CS_XBS5_LP64_OFF64_LINTFLAGS _CS_XBS5_LP64_OFF64_LINTFLAGS - _CS_XBS5_LPBIG_OFFBIG_CFLAGS, -# define _CS_XBS5_LPBIG_OFFBIG_CFLAGS _CS_XBS5_LPBIG_OFFBIG_CFLAGS - _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, -# define _CS_XBS5_LPBIG_OFFBIG_LDFLAGS _CS_XBS5_LPBIG_OFFBIG_LDFLAGS - _CS_XBS5_LPBIG_OFFBIG_LIBS, -# define _CS_XBS5_LPBIG_OFFBIG_LIBS _CS_XBS5_LPBIG_OFFBIG_LIBS - _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, -# define _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS -# endif -# ifdef __USE_XOPEN2K - _CS_POSIX_V6_ILP32_OFF32_CFLAGS, -# define _CS_POSIX_V6_ILP32_OFF32_CFLAGS _CS_POSIX_V6_ILP32_OFF32_CFLAGS - _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, -# define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS _CS_POSIX_V6_ILP32_OFF32_LDFLAGS - _CS_POSIX_V6_ILP32_OFF32_LIBS, -# define _CS_POSIX_V6_ILP32_OFF32_LIBS _CS_POSIX_V6_ILP32_OFF32_LIBS - _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, -# define _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS - _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, -# define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS - _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, -# define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS - _CS_POSIX_V6_ILP32_OFFBIG_LIBS, -# define _CS_POSIX_V6_ILP32_OFFBIG_LIBS _CS_POSIX_V6_ILP32_OFFBIG_LIBS - _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, -# define _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS - _CS_POSIX_V6_LP64_OFF64_CFLAGS, -# define _CS_POSIX_V6_LP64_OFF64_CFLAGS _CS_POSIX_V6_LP64_OFF64_CFLAGS - _CS_POSIX_V6_LP64_OFF64_LDFLAGS, -# define _CS_POSIX_V6_LP64_OFF64_LDFLAGS _CS_POSIX_V6_LP64_OFF64_LDFLAGS - _CS_POSIX_V6_LP64_OFF64_LIBS, -# define _CS_POSIX_V6_LP64_OFF64_LIBS _CS_POSIX_V6_LP64_OFF64_LIBS - _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, -# define _CS_POSIX_V6_LP64_OFF64_LINTFLAGS _CS_POSIX_V6_LP64_OFF64_LINTFLAGS - _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, -# define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS - _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, -# define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS - _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, -# define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS _CS_POSIX_V6_LPBIG_OFFBIG_LIBS - _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS, -# define _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS -# endif - - _CS_V6_WIDTH_RESTRICTED_ENVS -# define _CS_V6_WIDTH_RESTRICTED_ENVS _CS_V6_WIDTH_RESTRICTED_ENVS - }; -#endif diff --git a/libc/sysdeps/linux/sh/bits/dirent.h b/libc/sysdeps/linux/sh/bits/dirent.h deleted file mode 100644 index 82d8663f2..000000000 --- a/libc/sysdeps/linux/sh/bits/dirent.h +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright (C) 1996, 1997 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 _DIRENT_H -# error "Never use <bits/dirent.h> directly; include <dirent.h> instead." -#endif - -struct dirent - { -#ifndef __USE_FILE_OFFSET64 - __ino_t d_ino; - __off_t d_off; -#else - __ino64_t d_ino; - __off64_t d_off; -#endif - unsigned short int d_reclen; -#ifdef __USE_FILE_OFFSET64 - unsigned char d_type; -#endif - char d_name[256]; /* We must not include limits.h! */ - }; - -#ifdef __USE_LARGEFILE64 -struct dirent64 - { - __ino64_t d_ino; - __off64_t d_off; - unsigned short int d_reclen; - unsigned char d_type; - char d_name[256]; /* We must not include limits.h! */ - }; -#endif - -#define d_fileno d_ino /* Backwards compatibility. */ - -#undef _DIRENT_HAVE_D_NAMLEN -#define _DIRENT_HAVE_D_RECLEN -#define _DIRENT_HAVE_D_OFF -#undef _DIRENT_HAVE_D_TYPE diff --git a/libc/sysdeps/linux/sh/bits/dlfcn.h b/libc/sysdeps/linux/sh/bits/dlfcn.h deleted file mode 100644 index 2525fa3d9..000000000 --- a/libc/sysdeps/linux/sh/bits/dlfcn.h +++ /dev/null @@ -1,59 +0,0 @@ -/* System dependent definitions for run-time dynamic loading. - 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. */ - -#ifndef _DLFCN_H -# error "Never use <bits/dlfcn.h> directly; include <dlfcn.h> instead." -#endif - -/* The MODE argument to `dlopen' contains one of the following: */ -#define RTLD_LAZY 0x00001 /* Lazy function call binding. */ -#define RTLD_NOW 0x00002 /* Immediate function call binding. */ -#define RTLD_BINDING_MASK 0x3 /* Mask of binding time value. */ -#define RTLD_NOLOAD 0x00004 /* Do not load the object. */ - -/* If the following bit is set in the MODE argument to `dlopen', - the symbols of the loaded object and its dependencies are made - visible as if the object were linked directly into the program. */ -#define RTLD_GLOBAL 0x00100 - -/* Unix98 demands the following flag which is the inverse to RTLD_GLOBAL. - The implementation does this by default and so we can define the - value to zero. */ -#define RTLD_LOCAL 0 - -/* Do not delete object when closed. */ -#define RTLD_NODELETE 0x01000 - -#ifdef __USE_GNU -/* To support profiling of shared objects it is a good idea to call - the function found using `dlsym' using the following macro since - these calls do not use the PLT. But this would mean the dynamic - loader has no chance to find out when the function is called. The - macro applies the necessary magic so that profiling is possible. - Rewrite - foo = (*fctp) (arg1, arg2); - into - foo = DL_CALL_FCT (fctp, (arg1, arg2)); -*/ -# define DL_CALL_FCT(fctp, args) \ - (_dl_mcount_wrapper_check (fctp), (*(fctp)) args) - -/* This function calls the profiling functions. */ -extern void _dl_mcount_wrapper_check (void *__selfpc) __THROW; -#endif diff --git a/libc/sysdeps/linux/sh/bits/elfclass.h b/libc/sysdeps/linux/sh/bits/elfclass.h deleted file mode 100644 index 180227d9e..000000000 --- a/libc/sysdeps/linux/sh/bits/elfclass.h +++ /dev/null @@ -1,14 +0,0 @@ -/* This file specifies the native word size of the machine, which indicates - the ELF file class used for executables and shared objects on this - machine. */ - -#ifndef _LINK_H -# error "Never use <bits/elfclass.h> directly; include <link.h> instead." -#endif - -#include <bits/wordsize.h> - -#define __ELF_NATIVE_CLASS __WORDSIZE - -/* The entries in the .hash table always have a size of 32 bits. */ -typedef uint32_t Elf_Symndx; diff --git a/libc/sysdeps/linux/sh/bits/environments.h b/libc/sysdeps/linux/sh/bits/environments.h deleted file mode 100644 index c3829927b..000000000 --- a/libc/sysdeps/linux/sh/bits/environments.h +++ /dev/null @@ -1,75 +0,0 @@ -/* Copyright (C) 1999, 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. */ - -#ifndef _UNISTD_H -# error "Never include this file directly. Use <unistd.h> instead" -#endif - -#include <bits/wordsize.h> - -/* This header should define the following symbols under the described - situations. A value `1' means that the model is always supported, - `-1' means it is never supported. Undefined means it cannot be - statically decided. - - _POSIX_V6_ILP32_OFF32 32bit int, long, pointers, and off_t type - _POSIX_V6_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type - - _POSIX_V6_LP64_OFF32 64bit long and pointers and 32bit off_t type - _POSIX_V6_LPBIG_OFFBIG 64bit long and pointers and large off_t type - - The macros _XBS5_ILP32_OFF32, _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and - _XBS5_LPBIG_OFFBIG were used in previous versions of the Unix standard - and are available only for compatibility. -*/ - -#if __WORDSIZE == 64 - -/* We can never provide environments with 32-bit wide pointers. */ -# define _POSIX_V6_ILP32_OFF32 -1 -# define _POSIX_V6_ILP32_OFFBIG -1 -# define _XBS5_ILP32_OFF32 -1 -# define _XBS5_ILP32_OFFBIG -1 -/* We also have no use (for now) for an environment with bigger pointers - and offsets. */ -# define _POSIX_V6_LPBIG_OFFBIG -1 -# define _XBS5_LPBIG_OFFBIG -1 - -/* By default we have 64-bit wide `long int', pointers and `off_t'. */ -# define _POSIX_V6_LP64_OFF64 1 -# define _XBS5_LP64_OFF64 1 - -#else /* __WORDSIZE == 32 */ - -/* By default we have 32-bit wide `int', `long int', pointers and `off_t' - and all platforms support LFS. */ -# define _POSIX_V6_ILP32_OFF32 1 -# define _POSIX_V6_ILP32_OFFBIG 1 -# define _XBS5_ILP32_OFF32 1 -# define _XBS5_ILP32_OFFBIG 1 - -/* We optionally provide an environment with the above size but an 64-bit - side `off_t'. Therefore we don't define _XBS5_ILP32_OFFBIG. */ - -/* We can never provide environments with 64-bit wide pointers. */ -# define _POSIX_V6_LP64_OFF64 -1 -# define _POSIX_V6_LPBIG_OFFBIG -1 -# define _XBS5_LP64_OFF64 -1 -# define _XBS5_LPBIG_OFFBIG -1 - -#endif /* __WORDSIZE == 32 */ diff --git a/libc/sysdeps/linux/sh/bits/errno.h b/libc/sysdeps/linux/sh/bits/errno.h deleted file mode 100644 index ac59d4c9d..000000000 --- a/libc/sysdeps/linux/sh/bits/errno.h +++ /dev/null @@ -1,60 +0,0 @@ -/* Error constants. Linux specific version. - Copyright (C) 1996, 1997, 1998, 1999 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. */ - -#ifdef _ERRNO_H - -# undef EDOM -# undef EILSEQ -# undef ERANGE -# include <linux/errno.h> - -/* Linux has no ENOTSUP error code. */ -# define ENOTSUP EOPNOTSUPP - -/* Linux also has no ECANCELED error code. Since it is not used here - we define it to an invalid value. */ -# define ECANCELED 125 - -# ifndef __ASSEMBLER__ -/* We now need a declaration of the `errno' variable. */ -extern int errno; - -/* Function to get address of global `errno' variable. */ -extern int *__errno_location (void) __THROW __attribute__ ((__const__)); - -# if defined _LIBC -/* We wouldn't need a special macro anymore but it is history. */ -# define __set_errno(val) (*__errno_location ()) = (val) -# endif /* _LIBC */ - -# if !defined _LIBC || defined _LIBC_REENTRANT -/* When using threads, errno is a per-thread value. */ -# define errno (*__errno_location ()) -# endif -# endif /* !__ASSEMBLER__ */ -#endif /* _ERRNO_H */ - -#if !defined _ERRNO_H && defined __need_Emath -/* This is ugly but the kernel header is not clean enough. We must - define only the values EDOM, EILSEQ and ERANGE in case __need_Emath is - defined. */ -# define EDOM 33 /* Math argument out of domain of function. */ -# define EILSEQ 84 /* Illegal byte sequence. */ -# define ERANGE 34 /* Math result not representable. */ -#endif /* !_ERRNO_H && __need_Emath */ diff --git a/libc/sysdeps/linux/sh/bits/fenv.h b/libc/sysdeps/linux/sh/bits/fenv.h deleted file mode 100644 index cbbad92e1..000000000 --- a/libc/sysdeps/linux/sh/bits/fenv.h +++ /dev/null @@ -1,72 +0,0 @@ -/* Copyright (C) 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 _FENV_H -# error "Never use <bits/fenv.h> directly; include <fenv.h> instead." -#endif - - -/* Define bits representing the exception. We use the bit positions - of the appropriate bits in the FPU control word. */ -enum - { - FE_INEXACT = 0x04, -#define FE_INEXACT FE_INEXACT - FE_UNDERFLOW = 0x08, -#define FE_UNDERFLOW FE_UNDERFLOW - FE_OVERFLOW = 0x10, -#define FE_OVERFLOW FE_OVERFLOW - FE_DIVBYZERO = 0x20, -#define FE_DIVBYZERO FE_DIVBYZERO - FE_INVALID = 0x40, -#define FE_INVALID FE_INVALID - }; - -#define FE_ALL_EXCEPT \ - (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID) - -/* The SH FPU supports all of the four defined rounding modes. We - use again the bit positions in the FPU control word as the values - for the appropriate macros. */ -enum - { - FE_TONEAREST = 0x0, -#define FE_TONEAREST FE_TONEAREST - FE_TOWARDZERO = 0x1, -#define FE_TOWARDZERO FE_TOWARDZERO - FE_UPWARD = 0x2, -#define FE_UPWARD FE_UPWARD - FE_DOWNWARD = 0x3 -#define FE_DOWNWARD FE_DOWNWARD - }; - - -/* Type representing exception flags. */ -typedef unsigned short int fexcept_t; - - -/* Type representing floating-point environment. This function corresponds - to the layout of the block written by the `fstenv'. */ -typedef struct - { - unsigned int __fpscr; - } -fenv_t; - -/* If the default argument is used we use this value. */ -#define FE_DFL_ENV ((fenv_t *) -1) diff --git a/libc/sysdeps/linux/sh/bits/fenvinline.h b/libc/sysdeps/linux/sh/bits/fenvinline.h deleted file mode 100644 index 42f77b561..000000000 --- a/libc/sysdeps/linux/sh/bits/fenvinline.h +++ /dev/null @@ -1,8 +0,0 @@ -/* This file provides inline versions of floating-pint environment - handling functions. If there were any. */ - -#ifndef __NO_MATH_INLINES - -/* Here is where the code would go. */ - -#endif diff --git a/libc/sysdeps/linux/sh/bits/huge_val.h b/libc/sysdeps/linux/sh/bits/huge_val.h index 78d316dde..e476d796b 100644 --- a/libc/sysdeps/linux/sh/bits/huge_val.h +++ b/libc/sysdeps/linux/sh/bits/huge_val.h @@ -1,8 +1,7 @@ /* `HUGE_VAL' constants for IEEE 754 machines (where it is infinity). Used by <stdlib.h> and <math.h> functions for overflow. SH version. - Copyright (C) 1992, 1995, 1996, 1997, 1998, 1999, 2000 - Free Software Foundation, Inc. + Copyright (C) 1992, 95, 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 @@ -30,9 +29,9 @@ #ifdef __GNUC__ -# if __GNUC_PREREQ(2,95) +# if __GNUC_PREREQ(2,96) -# define HUGE_VAL (0x1.0p2047) +# define HUGE_VAL (__extension__ 0x1.0p2047) # else @@ -68,9 +67,9 @@ static __huge_val_t __huge_val = { __HUGE_VAL_bytes }; # ifdef __GNUC__ -# if __GNUC_PREREQ(2,95) +# if __GNUC_PREREQ(2,96) -# define HUGE_VALF (0x1.0p255f) +# define HUGE_VALF (__extension__ 0x1.0p255f) # else diff --git a/libc/sysdeps/linux/sh/bits/in.h b/libc/sysdeps/linux/sh/bits/in.h deleted file mode 100644 index e6cf57574..000000000 --- a/libc/sysdeps/linux/sh/bits/in.h +++ /dev/null @@ -1,141 +0,0 @@ -/* Copyright (C) 1991-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. */ - -/* Linux version. */ - -#ifndef _NETINET_IN_H -# error "Never use <bits/in.h> directly; include <netinet/in.h> instead." -#endif - -/* Options for use with `getsockopt' and `setsockopt' at the IP level. - The first word in the comment at the right is the data type used; - "bool" means a boolean value stored in an `int'. */ -#define IP_TOS 1 /* int; IP type of service and precedence. */ -#define IP_TTL 2 /* int; IP time to live. */ -#define IP_HDRINCL 3 /* int; Header is included with data. */ -#define IP_OPTIONS 4 /* ip_opts; IP per-packet options. */ -#define IP_ROUTER_ALERT 5 /* bool */ -#define IP_RECVOPTS 6 /* bool */ -#define IP_RETOPTS 7 /* bool */ -#define IP_PKTINFO 8 /* bool */ -#define IP_PKTOPTIONS 9 -#define IP_PMTUDISC 10 /* obsolete name? */ -#define IP_MTU_DISCOVER 10 /* int; see below */ -#define IP_RECVERR 11 /* bool */ -#define IP_RECVTTL 12 /* bool */ -#define IP_RECVTOS 13 /* bool */ -#define IP_MULTICAST_IF 32 /* in_addr; set/get IP multicast i/f */ -#define IP_MULTICAST_TTL 33 /* u_char; set/get IP multicast ttl */ -#define IP_MULTICAST_LOOP 34 /* i_char; set/get IP multicast loopback */ -#define IP_ADD_MEMBERSHIP 35 /* ip_mreq; add an IP group membership */ -#define IP_DROP_MEMBERSHIP 36 /* ip_mreq; drop an IP group membership */ - -/* For BSD compatibility. */ -#define IP_RECVRETOPTS IP_RETOPTS - -/* IP_MTU_DISCOVER arguments. */ -#define IP_PMTUDISC_DONT 0 /* Never send DF frames. */ -#define IP_PMTUDISC_WANT 1 /* Use per route hints. */ -#define IP_PMTUDISC_DO 2 /* Always DF. */ - -/* To select the IP level. */ -#define SOL_IP 0 - -#define IP_DEFAULT_MULTICAST_TTL 1 -#define IP_DEFAULT_MULTICAST_LOOP 1 -#define IP_MAX_MEMBERSHIPS 20 - -/* Structure used to describe IP options for IP_OPTIONS. The `ip_dst' - field is used for the first-hop gateway when using a source route - (this gets put into the header proper). */ -struct ip_opts - { - struct in_addr ip_dst; /* First hop; zero without source route. */ - char ip_opts[40]; /* Actually variable in size. */ - }; - -/* Structure used for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP. */ -struct ip_mreq - { - struct in_addr imr_multiaddr; /* IP multicast address of group */ - struct in_addr imr_interface; /* local IP address of interface */ - }; - -/* As above but including interface specification by index. */ -struct ip_mreqn - { - struct in_addr imr_multiaddr; /* IP multicast address of group */ - struct in_addr imr_address; /* local IP address of interface */ - int imr_ifindex; /* Interface index */ - }; - -/* Structure used for IP_PKTINFO. */ -struct in_pktinfo - { - int ipi_ifindex; /* Interface index */ - struct in_addr ipi_spec_dst; /* Routing destination address */ - struct in_addr ipi_addr; /* Header destination address */ - }; - -/* Options for use with `getsockopt' and `setsockopt' at the IPv6 level. - The first word in the comment at the right is the data type used; - "bool" means a boolean value stored in an `int'. */ -#define IPV6_ADDRFORM 1 -#define IPV6_PKTINFO 2 -#define IPV6_HOPOPTS 3 -#define IPV6_DSTOPTS 4 -#define IPV6_RTHDR 5 -#define IPV6_PKTOPTIONS 6 -#define IPV6_CHECKSUM 7 -#define IPV6_HOPLIMIT 8 -#define IPV6_NEXTHOP 9 -#define IPV6_AUTHHDR 10 -#define IPV6_UNICAST_HOPS 16 -#define IPV6_MULTICAST_IF 17 -#define IPV6_MULTICAST_HOPS 18 -#define IPV6_MULTICAST_LOOP 19 -#define IPV6_JOIN_GROUP 20 -#define IPV6_LEAVE_GROUP 21 -#define IPV6_ROUTER_ALERT 22 -#define IPV6_MTU_DISCOVER 23 -#define IPV6_MTU 24 -#define IPV6_RECVERR 25 - -#define SCM_SRCRT IPV6_RXSRCRT - -/* Obsolete synonyms for the above. */ -#define IPV6_RXHOPOPTS IPV6_HOPOPTS -#define IPV6_RXDSTOPTS IPV6_DSTOPTS -#define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP -#define IPV6_DROP_MEMBERSHIP IPV6_LEAVE_GROUP - - -/* IPV6_MTU_DISCOVER values. */ -#define IPV6_PMTUDISC_DONT 0 /* Never send DF frames. */ -#define IPV6_PMTUDISC_WANT 1 /* Use per route hints. */ -#define IPV6_PMTUDISC_DO 2 /* Always DF. */ - -/* Socket level values for IPv6. */ -#define SOL_IPV6 41 -#define SOL_ICMPV6 58 - -/* Routing header options for IPv6. */ -#define IPV6_RTHDR_LOOSE 0 /* Hop doesn't need to be neighbour. */ -#define IPV6_RTHDR_STRICT 1 /* Hop must be a neighbour. */ - -#define IPV6_RTHDR_TYPE_0 0 /* IPv6 Routing header type 0. */ diff --git a/libc/sysdeps/linux/sh/bits/initspin.h b/libc/sysdeps/linux/sh/bits/initspin.h deleted file mode 100644 index af19d44e6..000000000 --- a/libc/sysdeps/linux/sh/bits/initspin.h +++ /dev/null @@ -1,28 +0,0 @@ -/* Generic definitions for spinlock initializers. - Copyright (C) 2000, 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* Initial value of a spinlock. Most platforms should use zero, - unless they only implement a "test and clear" operation instead of - the usual "test and set". */ -#define __LT_SPINLOCK_INIT 0 - -/* Macros for lock initializers, using the above definition. */ -#define __LOCK_INITIALIZER { 0, __LT_SPINLOCK_INIT } -#define __ALT_LOCK_INITIALIZER { 0, __LT_SPINLOCK_INIT } -#define __ATOMIC_INITIALIZER { 0, __LT_SPINLOCK_INIT } diff --git a/libc/sysdeps/linux/sh/bits/ioctl-types.h b/libc/sysdeps/linux/sh/bits/ioctl-types.h deleted file mode 100644 index e856a04b4..000000000 --- a/libc/sysdeps/linux/sh/bits/ioctl-types.h +++ /dev/null @@ -1,78 +0,0 @@ -/* Structure types for pre-termios terminal ioctls. Linux version. - Copyright (C) 1996, 1997, 1999, 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. */ - -#ifndef _SYS_IOCTL_H -# error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead." -#endif - -/* Get definition of constants for use with `ioctl'. */ -#include <asm/ioctls.h> - - -struct winsize - { - unsigned short int ws_row; - unsigned short int ws_col; - unsigned short int ws_xpixel; - unsigned short int ws_ypixel; - }; - -#define NCC 8 -struct termio - { - unsigned short int c_iflag; /* input mode flags */ - unsigned short int c_oflag; /* output mode flags */ - unsigned short int c_cflag; /* control mode flags */ - unsigned short int c_lflag; /* local mode flags */ - unsigned char c_line; /* line discipline */ - unsigned char c_cc[NCC]; /* control characters */ -}; - -/* modem lines */ -#define TIOCM_LE 0x001 -#define TIOCM_DTR 0x002 -#define TIOCM_RTS 0x004 -#define TIOCM_ST 0x008 -#define TIOCM_SR 0x010 -#define TIOCM_CTS 0x020 -#define TIOCM_CAR 0x040 -#define TIOCM_RNG 0x080 -#define TIOCM_DSR 0x100 -#define TIOCM_CD TIOCM_CAR -#define TIOCM_RI TIOCM_RNG - -/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ - -/* line disciplines */ -#define N_TTY 0 -#define N_SLIP 1 -#define N_MOUSE 2 -#define N_PPP 3 -#define N_STRIP 4 -#define N_AX25 5 -#define N_X25 6 /* X.25 async */ -#define N_6PACK 7 -#define N_MASC 8 /* Mobitex module */ -#define N_R3964 9 /* Simatic R3964 module */ -#define N_PROFIBUS_FDL 10 /* Profibus */ -#define N_IRDA 11 /* Linux IR */ -#define N_SMSBLOCK 12 /* SMS block mode */ -#define N_HDLC 13 /* synchronous HDLC */ -#define N_SYNC_PPP 14 /* synchronous PPP */ -#define N_HCI 15 /* Bluetooth HCI UART */ diff --git a/libc/sysdeps/linux/sh/bits/ioctls.h b/libc/sysdeps/linux/sh/bits/ioctls.h deleted file mode 100644 index b49ca2076..000000000 --- a/libc/sysdeps/linux/sh/bits/ioctls.h +++ /dev/null @@ -1,108 +0,0 @@ -/* Copyright (C) 1996, 1997, 1998 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 _SYS_IOCTL_H -# error "Never use <bits/ioctls.h> directly; include <sys/ioctl.h> instead." -#endif - -/* Use the definitions from the kernel header files. */ -#include <asm/ioctls.h> - -/* Routing table calls. */ -#define SIOCADDRT 0x890B /* add routing table entry */ -#define SIOCDELRT 0x890C /* delete routing table entry */ -#define SIOCRTMSG 0x890D /* call to routing system */ - -/* Socket configuration controls. */ -#define SIOCGIFNAME 0x8910 /* get iface name */ -#define SIOCSIFLINK 0x8911 /* set iface channel */ -#define SIOCGIFCONF 0x8912 /* get iface list */ -#define SIOCGIFFLAGS 0x8913 /* get flags */ -#define SIOCSIFFLAGS 0x8914 /* set flags */ -#define SIOCGIFADDR 0x8915 /* get PA address */ -#define SIOCSIFADDR 0x8916 /* set PA address */ -#define SIOCGIFDSTADDR 0x8917 /* get remote PA address */ -#define SIOCSIFDSTADDR 0x8918 /* set remote PA address */ -#define SIOCGIFBRDADDR 0x8919 /* get broadcast PA address */ -#define SIOCSIFBRDADDR 0x891a /* set broadcast PA address */ -#define SIOCGIFNETMASK 0x891b /* get network PA mask */ -#define SIOCSIFNETMASK 0x891c /* set network PA mask */ -#define SIOCGIFMETRIC 0x891d /* get metric */ -#define SIOCSIFMETRIC 0x891e /* set metric */ -#define SIOCGIFMEM 0x891f /* get memory address (BSD) */ -#define SIOCSIFMEM 0x8920 /* set memory address (BSD) */ -#define SIOCGIFMTU 0x8921 /* get MTU size */ -#define SIOCSIFMTU 0x8922 /* set MTU size */ -#define SIOCSIFHWADDR 0x8924 /* set hardware address */ -#define SIOCGIFENCAP 0x8925 /* get/set encapsulations */ -#define SIOCSIFENCAP 0x8926 -#define SIOCGIFHWADDR 0x8927 /* Get hardware address */ -#define SIOCGIFSLAVE 0x8929 /* Driver slaving support */ -#define SIOCSIFSLAVE 0x8930 -#define SIOCADDMULTI 0x8931 /* Multicast address lists */ -#define SIOCDELMULTI 0x8932 -#define SIOCGIFINDEX 0x8933 /* name -> if_index mapping */ -#define SIOGIFINDEX SIOCGIFINDEX /* misprint compatibility :-) */ -#define SIOCSIFPFLAGS 0x8934 /* set/get extended flags set */ -#define SIOCGIFPFLAGS 0x8935 -#define SIOCDIFADDR 0x8936 /* delete PA address */ -#define SIOCSIFHWBROADCAST 0x8937 /* set hardware broadcast addr */ -#define SIOCGIFCOUNT 0x8938 /* get number of devices */ - -#define SIOCGIFBR 0x8940 /* Bridging support */ -#define SIOCSIFBR 0x8941 /* Set bridging options */ - -#define SIOCGIFTXQLEN 0x8942 /* Get the tx queue length */ -#define SIOCSIFTXQLEN 0x8943 /* Set the tx queue length */ - - -/* ARP cache control calls. */ - /* 0x8950 - 0x8952 * obsolete calls, don't re-use */ -#define SIOCDARP 0x8953 /* delete ARP table entry */ -#define SIOCGARP 0x8954 /* get ARP table entry */ -#define SIOCSARP 0x8955 /* set ARP table entry */ - -/* RARP cache control calls. */ -#define SIOCDRARP 0x8960 /* delete RARP table entry */ -#define SIOCGRARP 0x8961 /* get RARP table entry */ -#define SIOCSRARP 0x8962 /* set RARP table entry */ - -/* Driver configuration calls */ - -#define SIOCGIFMAP 0x8970 /* Get device parameters */ -#define SIOCSIFMAP 0x8971 /* Set device parameters */ - -/* DLCI configuration calls */ - -#define SIOCADDDLCI 0x8980 /* Create new DLCI device */ -#define SIOCDELDLCI 0x8981 /* Delete DLCI device */ - -/* Device private ioctl calls. */ - -/* These 16 ioctls are available to devices via the do_ioctl() device - vector. Each device should include this file and redefine these - names as their own. Because these are device dependent it is a good - idea _NOT_ to issue them to random objects and hope. */ - -#define SIOCDEVPRIVATE 0x89F0 /* to 89FF */ - -/* - * These 16 ioctl calls are protocol private - */ - -#define SIOCPROTOPRIVATE 0x89E0 /* to 89EF */ diff --git a/libc/sysdeps/linux/sh/bits/ipc.h b/libc/sysdeps/linux/sh/bits/ipc.h deleted file mode 100644 index f1a043fe5..000000000 --- a/libc/sysdeps/linux/sh/bits/ipc.h +++ /dev/null @@ -1,56 +0,0 @@ -/* Copyright (C) 1995-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 _SYS_IPC_H -# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead." -#endif - -#include <bits/types.h> - -/* Mode bits for `msgget', `semget', and `shmget'. */ -#define IPC_CREAT 01000 /* Create key if key does not exist. */ -#define IPC_EXCL 02000 /* Fail if key exists. */ -#define IPC_NOWAIT 04000 /* Return error on wait. */ - -/* Control commands for `msgctl', `semctl', and `shmctl'. */ -#define IPC_RMID 0 /* Remove identifier. */ -#define IPC_SET 1 /* Set `ipc_perm' options. */ -#define IPC_STAT 2 /* Get `ipc_perm' options. */ -#ifdef __USE_GNU -# define IPC_INFO 3 /* See ipcs. */ -#endif - -/* Special key values. */ -#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ - - -/* Data structure used to pass permission information to IPC operations. */ -struct ipc_perm - { - __key_t __key; /* Key. */ - __uid_t uid; /* Owner's user ID. */ - __gid_t gid; /* Owner's group ID. */ - __uid_t cuid; /* Creator's user ID. */ - __gid_t cgid; /* Creator's group ID. */ - unsigned short int mode; /* Read/write permission. */ - unsigned short int __pad1; - unsigned short int __seq; /* Sequence number. */ - unsigned short int __pad2; - unsigned long int __unused1; - unsigned long int __unused2; - }; diff --git a/libc/sysdeps/linux/sh/bits/libc-lock.h b/libc/sysdeps/linux/sh/bits/libc-lock.h deleted file mode 100644 index dbd9cc14f..000000000 --- a/libc/sysdeps/linux/sh/bits/libc-lock.h +++ /dev/null @@ -1,317 +0,0 @@ -/* libc-internal interface for mutex locks. LinuxThreads version. - Copyright (C) 1996,1997,1998,1999,2000,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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _BITS_LIBC_LOCK_H -#define _BITS_LIBC_LOCK_H 1 - -#include <pthread.h> - -/* Mutex type. */ -#ifdef _LIBC -typedef pthread_mutex_t __libc_lock_t; -typedef pthread_rwlock_t __libc_rwlock_t; -#else -typedef struct __libc_lock_opaque__ __libc_lock_t; -typedef struct __libc_rwlock_opaque__ __libc_rwlock_t; -#endif - -/* Type for key to thread-specific data. */ -typedef pthread_key_t __libc_key_t; - -/* Define a lock variable NAME with storage class CLASS. The lock must be - initialized with __libc_lock_init before it can be used (or define it - with __libc_lock_define_initialized, below). Use `extern' for CLASS to - declare a lock defined in another module. In public structure - definitions you must use a pointer to the lock structure (i.e., NAME - begins with a `*'), because its storage size will not be known outside - of libc. */ -#define __libc_lock_define(CLASS,NAME) \ - CLASS __libc_lock_t NAME; -#define __libc_rwlock_define(CLASS,NAME) \ - CLASS __libc_rwlock_t NAME; - -/* Define an initialized lock variable NAME with storage class CLASS. - - For the C library we take a deeper look at the initializer. For - this implementation all fields are initialized to zero. Therefore - we don't initialize the variable which allows putting it into the - BSS section. (Except on PA-RISC and other odd architectures, where - initialized locks must be set to one due to the lack of normal - atomic operations.) */ - -#if __LT_SPINLOCK_INIT == 0 -# define __libc_lock_define_initialized(CLASS,NAME) \ - CLASS __libc_lock_t NAME; -#else -# define __libc_lock_define_initialized(CLASS,NAME) \ - CLASS __libc_lock_t NAME = PTHREAD_MUTEX_INITIALIZER; -#endif - -#define __libc_rwlock_define_initialized(CLASS,NAME) \ - CLASS __libc_rwlock_t NAME = PTHREAD_RWLOCK_INITIALIZER; - -/* Define an initialized recursive lock variable NAME with storage - class CLASS. */ -#define __libc_lock_define_initialized_recursive(CLASS,NAME) \ - CLASS __libc_lock_t NAME = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; - -/* Initialize the named lock variable, leaving it in a consistent, unlocked - state. */ -#define __libc_lock_init(NAME) \ - (__pthread_mutex_init != NULL ? __pthread_mutex_init (&(NAME), NULL) : 0); -#define __libc_rwlock_init(NAME) \ - (__pthread_rwlock_init != NULL ? __pthread_rwlock_init (&(NAME), NULL) : 0); - -/* Same as last but this time we initialize a recursive mutex. */ -#define __libc_lock_init_recursive(NAME) \ - do { \ - if (__pthread_mutex_init != NULL) \ - { \ - pthread_mutexattr_t __attr; \ - __pthread_mutexattr_init (&__attr); \ - __pthread_mutexattr_settype (&__attr, PTHREAD_MUTEX_RECURSIVE_NP); \ - __pthread_mutex_init (&(NAME), &__attr); \ - __pthread_mutexattr_destroy (&__attr); \ - } \ - } while (0); - -/* Finalize the named lock variable, which must be locked. It cannot be - used again until __libc_lock_init is called again on it. This must be - called on a lock variable before the containing storage is reused. */ -#define __libc_lock_fini(NAME) \ - (__pthread_mutex_destroy != NULL ? __pthread_mutex_destroy (&(NAME)) : 0); -#define __libc_rwlock_fini(NAME) \ - (__pthread_rwlock_destroy != NULL ? __pthread_rwlock_destroy (&(NAME)) : 0); - -/* Finalize recursive named lock. */ -#define __libc_lock_fini_recursive(NAME) __libc_lock_fini (NAME) - -/* Lock the named lock variable. */ -#define __libc_lock_lock(NAME) \ - (__pthread_mutex_lock != NULL ? __pthread_mutex_lock (&(NAME)) : 0); -#define __libc_rwlock_rdlock(NAME) \ - (__pthread_rwlock_rdlock != NULL ? __pthread_rwlock_rdlock (&(NAME)) : 0); -#define __libc_rwlock_wrlock(NAME) \ - (__pthread_rwlock_wrlock != NULL ? __pthread_rwlock_wrlock (&(NAME)) : 0); - -/* Lock the recursive named lock variable. */ -#define __libc_lock_lock_recursive(NAME) __libc_lock_lock (NAME) - -/* Try to lock the named lock variable. */ -#define __libc_lock_trylock(NAME) \ - (__pthread_mutex_trylock != NULL ? __pthread_mutex_trylock (&(NAME)) : 0) -#define __libc_rwlock_tryrdlock(NAME) \ - (__pthread_rwlock_tryrdlock != NULL \ - ? __pthread_rwlock_tryrdlock (&(NAME)) : 0) -#define __libc_rwlock_trywrlock(NAME) \ - (__pthread_rwlock_trywrlock != NULL \ - ? __pthread_rwlock_trywrlock (&(NAME)) : 0) - -/* Try to lock the recursive named lock variable. */ -#define __libc_lock_trylock_recursive(NAME) __libc_lock_trylock (NAME) - -/* Unlock the named lock variable. */ -#define __libc_lock_unlock(NAME) \ - (__pthread_mutex_unlock != NULL ? __pthread_mutex_unlock (&(NAME)) : 0); -#define __libc_rwlock_unlock(NAME) \ - (__pthread_rwlock_unlock != NULL ? __pthread_rwlock_unlock (&(NAME)) : 0); - -/* Unlock the recursive named lock variable. */ -#define __libc_lock_unlock_recursive(NAME) __libc_lock_unlock (NAME) - - -/* Define once control variable. */ -#if PTHREAD_ONCE_INIT == 0 -/* Special case for static variables where we can avoid the initialization - if it is zero. */ -# define __libc_once_define(CLASS, NAME) \ - CLASS pthread_once_t NAME -#else -# define __libc_once_define(CLASS, NAME) \ - CLASS pthread_once_t NAME = PTHREAD_ONCE_INIT -#endif - -/* Call handler iff the first call. */ -#define __libc_once(ONCE_CONTROL, INIT_FUNCTION) \ - do { \ - if (__pthread_once != NULL) \ - __pthread_once (&(ONCE_CONTROL), (INIT_FUNCTION)); \ - else if ((ONCE_CONTROL) == PTHREAD_ONCE_INIT) { \ - INIT_FUNCTION (); \ - (ONCE_CONTROL) = !PTHREAD_ONCE_INIT; \ - } \ - } while (0) - - -/* Start critical region with cleanup. */ -#define __libc_cleanup_region_start(FCT, ARG) \ - { struct _pthread_cleanup_buffer _buffer; \ - int _avail = _pthread_cleanup_push_defer != NULL; \ - if (_avail) { \ - _pthread_cleanup_push_defer (&_buffer, (FCT), (ARG)); \ - } - -/* End critical region with cleanup. */ -#define __libc_cleanup_region_end(DOIT) \ - if (_avail) { \ - _pthread_cleanup_pop_restore (&_buffer, (DOIT)); \ - } \ - } - -/* Sometimes we have to exit the block in the middle. */ -#define __libc_cleanup_end(DOIT) \ - if (_avail) { \ - _pthread_cleanup_pop_restore (&_buffer, (DOIT)); \ - } - -/* Create thread-specific key. */ -#define __libc_key_create(KEY, DESTRUCTOR) \ - (__pthread_key_create != NULL ? __pthread_key_create (KEY, DESTRUCTOR) : 1) - -/* Get thread-specific data. */ -#define __libc_getspecific(KEY) \ - (__pthread_getspecific != NULL ? __pthread_getspecific (KEY) : NULL) - -/* Set thread-specific data. */ -#define __libc_setspecific(KEY, VALUE) \ - (__pthread_setspecific != NULL ? __pthread_setspecific (KEY, VALUE) : 0) - - -/* Register handlers to execute before and after `fork'. */ -#define __libc_atfork(PREPARE, PARENT, CHILD) \ - (__pthread_atfork != NULL ? __pthread_atfork (PREPARE, PARENT, CHILD) : 0) - -/* Functions that are used by this file and are internal to the GNU C - library. */ - -extern int __pthread_mutex_init (pthread_mutex_t *__mutex, - __const pthread_mutexattr_t *__mutex_attr); - -extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex); - -extern int __pthread_mutex_trylock (pthread_mutex_t *__mutex); - -extern int __pthread_mutex_lock (pthread_mutex_t *__mutex); - -extern int __pthread_mutex_unlock (pthread_mutex_t *__mutex); - -extern int __pthread_mutexattr_init (pthread_mutexattr_t *__attr); - -extern int __pthread_mutexattr_destroy (pthread_mutexattr_t *__attr); - -extern int __pthread_mutexattr_settype (pthread_mutexattr_t *__attr, - int __kind); - -#ifdef __USE_UNIX98 -extern int __pthread_rwlock_init (pthread_rwlock_t *__rwlock, - __const pthread_rwlockattr_t *__attr); - -extern int __pthread_rwlock_destroy (pthread_rwlock_t *__rwlock); - -extern int __pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock); - -extern int __pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock); - -extern int __pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock); - -extern int __pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock); - -extern int __pthread_rwlock_unlock (pthread_rwlock_t *__rwlock); -#endif - -extern int __pthread_key_create (pthread_key_t *__key, - void (*__destr_function) (void *)); - -extern int __pthread_setspecific (pthread_key_t __key, - __const void *__pointer); - -extern void *__pthread_getspecific (pthread_key_t __key); - -extern int __pthread_once (pthread_once_t *__once_control, - void (*__init_routine) (void)); - -extern int __pthread_atfork (void (*__prepare) (void), - void (*__parent) (void), - void (*__child) (void)); - - - -/* Make the pthread functions weak so that we can elide them from - single-threaded processes. */ -#ifndef __NO_WEAK_PTHREAD_ALIASES -# ifdef weak_extern -# if _LIBC -# include <bp-sym.h> -# else -# define BP_SYM (sym) sym -# endif -weak_extern (BP_SYM (__pthread_mutex_init)) -weak_extern (BP_SYM (__pthread_mutex_destroy)) -weak_extern (BP_SYM (__pthread_mutex_lock)) -weak_extern (BP_SYM (__pthread_mutex_trylock)) -weak_extern (BP_SYM (__pthread_mutex_unlock)) -weak_extern (BP_SYM (__pthread_mutexattr_init)) -weak_extern (BP_SYM (__pthread_mutexattr_destroy)) -weak_extern (BP_SYM (__pthread_mutexattr_settype)) -weak_extern (BP_SYM (__pthread_rwlock_init)) -weak_extern (BP_SYM (__pthread_rwlock_destroy)) -weak_extern (BP_SYM (__pthread_rwlock_rdlock)) -weak_extern (BP_SYM (__pthread_rwlock_tryrdlock)) -weak_extern (BP_SYM (__pthread_rwlock_wrlock)) -weak_extern (BP_SYM (__pthread_rwlock_trywrlock)) -weak_extern (BP_SYM (__pthread_rwlock_unlock)) -weak_extern (BP_SYM (__pthread_key_create)) -weak_extern (BP_SYM (__pthread_setspecific)) -weak_extern (BP_SYM (__pthread_getspecific)) -weak_extern (BP_SYM (__pthread_once)) -weak_extern (__pthread_initialize) -weak_extern (__pthread_atfork) -weak_extern (BP_SYM (_pthread_cleanup_push_defer)) -weak_extern (BP_SYM (_pthread_cleanup_pop_restore)) -# else -# pragma weak __pthread_mutex_init -# pragma weak __pthread_mutex_destroy -# pragma weak __pthread_mutex_lock -# pragma weak __pthread_mutex_trylock -# pragma weak __pthread_mutex_unlock -# pragma weak __pthread_mutexattr_init -# pragma weak __pthread_mutexattr_destroy -# pragma weak __pthread_mutexattr_settype -# pragma weak __pthread_rwlock_destroy -# pragma weak __pthread_rwlock_rdlock -# pragma weak __pthread_rwlock_tryrdlock -# pragma weak __pthread_rwlock_wrlock -# pragma weak __pthread_rwlock_trywrlock -# pragma weak __pthread_rwlock_unlock -# pragma weak __pthread_key_create -# pragma weak __pthread_setspecific -# pragma weak __pthread_getspecific -# pragma weak __pthread_once -# pragma weak __pthread_initialize -# pragma weak __pthread_atfork -# pragma weak _pthread_cleanup_push_defer -# pragma weak _pthread_cleanup_pop_restore -# endif -#endif - -/* We need portable names for some functions. E.g., when they are - used as argument to __libc_cleanup_region_start. */ -#define __libc_mutex_unlock __pthread_mutex_unlock - -#endif /* bits/libc-lock.h */ diff --git a/libc/sysdeps/linux/sh/bits/local_lim.h b/libc/sysdeps/linux/sh/bits/local_lim.h deleted file mode 100644 index 0a7c83706..000000000 --- a/libc/sysdeps/linux/sh/bits/local_lim.h +++ /dev/null @@ -1,77 +0,0 @@ -/* Minimum guaranteed maximum values for system limits. Linux version. - Copyright (C) 1993, 94, 95, 96, 97, 98, 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* The kernel header pollutes the namespace with the NR_OPEN symbol - and defines LINK_MAX although filesystems have different maxima. A - similar thing is true for OPEN_MAX: the limit can be changed at - runtime and therefore the macro must not be defined. Remove this - after including the header if necessary. */ -#ifndef NR_OPEN -# define __undef_NR_OPEN -#endif -#ifndef LINK_MAX -# define __undef_LINK_MAX -#endif -#ifndef OPEN_MAX -# define __undef_OPEN_MAX -#endif - -/* The kernel sources contain a file with all the needed information. */ -#include <linux/limits.h> - -/* Have to remove NR_OPEN? */ -#ifdef __undef_NR_OPEN -# undef NR_OPEN -# undef __undef_NR_OPEN -#endif -/* Have to remove LINK_MAX? */ -#ifdef __undef_LINK_MAX -# undef LINK_MAX -# undef __undef_LINK_MAX -#endif -/* Have to remove OPEN_MAX? */ -#ifdef __undef_OPEN_MAX -# undef OPEN_MAX -# undef __undef_OPEN_MAX -#endif - -/* The number of data keys per process. */ -#define _POSIX_THREAD_KEYS_MAX 128 -/* This is the value this implementation supports. */ -#define PTHREAD_KEYS_MAX 1024 - -/* Controlling the iterations of destructors for thread-specific data. */ -#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 -/* Number of iterations this implementation does. */ -#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS - -/* The number of threads per process. */ -#define _POSIX_THREAD_THREADS_MAX 64 -/* This is the value this implementation supports. */ -#define PTHREAD_THREADS_MAX 1024 - -/* Maximum amount by which a process can descrease its asynchronous I/O - priority level. */ -#define AIO_PRIO_DELTA_MAX 20 - -/* Minimum size for a thread. We are free to choose a reasonable value. */ -#define PTHREAD_STACK_MIN 16384 - -/* Maximum number of POSIX timers available. */ -#define TIMER_MAX 256 diff --git a/libc/sysdeps/linux/sh/bits/locale.h b/libc/sysdeps/linux/sh/bits/locale.h deleted file mode 100644 index 50064b53e..000000000 --- a/libc/sysdeps/linux/sh/bits/locale.h +++ /dev/null @@ -1,44 +0,0 @@ -/* Definition of locale category symbol values. - Copyright (C) 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. */ - -#if !defined _LOCALE_H && !defined _LANGINFO_H -# error "Never use <bits/locale.h> directly; include <locale.h> instead." -#endif - -#ifndef _BITS_LOCALE_H -#define _BITS_LOCALE_H 1 - -enum -{ - __LC_CTYPE = 0, - __LC_NUMERIC = 1, - __LC_TIME = 2, - __LC_COLLATE = 3, - __LC_MONETARY = 4, - __LC_MESSAGES = 5, - __LC_ALL = 6, - __LC_PAPER = 7, - __LC_NAME = 8, - __LC_ADDRESS = 9, - __LC_TELEPHONE = 10, - __LC_MEASUREMENT = 11, - __LC_IDENTIFICATION = 12 -}; - -#endif /* bits/locale.h */ diff --git a/libc/sysdeps/linux/sh/bits/mathcalls.h b/libc/sysdeps/linux/sh/bits/mathcalls.h deleted file mode 100644 index c1181f737..000000000 --- a/libc/sysdeps/linux/sh/bits/mathcalls.h +++ /dev/null @@ -1,333 +0,0 @@ -/* Prototype declarations for math functions; helper file for <math.h>. - Copyright (C) 1996,1997,1998,1999,2000,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 <math.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,[_r], (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,[_r], (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. - - Note that there must be no whitespace before the argument passed for - NAME, to make token pasting work with -traditional. */ - -#ifndef _MATH_H - #error "Never include <bits/mathcalls.h> directly; include <math.h> instead." -#endif - - -/* Trigonometric functions. */ - -/* Arc cosine of X. */ -__MATHCALL (acos,, (_Mdouble_ __x)); -/* Arc sine of X. */ -__MATHCALL (asin,, (_Mdouble_ __x)); -/* Arc tangent of X. */ -__MATHCALL (atan,, (_Mdouble_ __x)); -/* Arc tangent of Y/X. */ -__MATHCALL (atan2,, (_Mdouble_ __y, _Mdouble_ __x)); - -/* Cosine of X. */ -__MATHCALL (cos,, (_Mdouble_ __x)); -/* Sine of X. */ -__MATHCALL (sin,, (_Mdouble_ __x)); -/* Tangent of X. */ -__MATHCALL (tan,, (_Mdouble_ __x)); - -#ifdef __USE_GNU -/* Cosine and sine of X. */ -__MATHDECL (void,sincos,, - (_Mdouble_ __x, _Mdouble_ *__sinx, _Mdouble_ *__cosx)); -#endif - -/* Hyperbolic functions. */ - -/* Hyperbolic cosine of X. */ -__MATHCALL (cosh,, (_Mdouble_ __x)); -/* Hyperbolic sine of X. */ -__MATHCALL (sinh,, (_Mdouble_ __x)); -/* Hyperbolic tangent of X. */ -__MATHCALL (tanh,, (_Mdouble_ __x)); - -#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 -/* Hyperbolic arc cosine of X. */ -__MATHCALL (acosh,, (_Mdouble_ __x)); -/* Hyperbolic arc sine of X. */ -__MATHCALL (asinh,, (_Mdouble_ __x)); -/* Hyperbolic arc tangent of X. */ -__MATHCALL (atanh,, (_Mdouble_ __x)); -#endif - -/* Exponential and logarithmic functions. */ - -/* Exponential function of X. */ -__MATHCALL (exp,, (_Mdouble_ __x)); - -#ifdef __USE_GNU -/* A function missing in all standards: compute exponent to base ten. */ -__MATHCALL (exp10,, (_Mdouble_ __x)); -/* Another name occasionally used. */ -__MATHCALL (pow10,, (_Mdouble_ __x)); -#endif - -/* Break VALUE into a normalized fraction and an integral power of 2. */ -__MATHCALL (frexp,, (_Mdouble_ __x, int *__exponent)); - -/* X times (two to the EXP power). */ -__MATHCALL (ldexp,, (_Mdouble_ __x, int __exponent)); - -/* Natural logarithm of X. */ -__MATHCALL (log,, (_Mdouble_ __x)); - -/* Base-ten logarithm of X. */ -__MATHCALL (log10,, (_Mdouble_ __x)); - -/* Break VALUE into integral and fractional parts. */ -__MATHCALL (modf,, (_Mdouble_ __x, _Mdouble_ *__iptr)); - -#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 -/* Return exp(X) - 1. */ -__MATHCALL (expm1,, (_Mdouble_ __x)); - -/* Return log(1 + X). */ -__MATHCALL (log1p,, (_Mdouble_ __x)); - -/* Return the base 2 signed integral exponent of X. */ -__MATHCALL (logb,, (_Mdouble_ __x)); -#endif - -#ifdef __USE_ISOC99 -/* Compute base-2 exponential of X. */ -__MATHCALL (exp2,, (_Mdouble_ __x)); - -/* Compute base-2 logarithm of X. */ -__MATHCALL (log2,, (_Mdouble_ __x)); -#endif - - -/* Power functions. */ - -/* Return X to the Y power. */ -__MATHCALL (pow,, (_Mdouble_ __x, _Mdouble_ __y)); - -/* Return the square root of X. */ -__MATHCALL (sqrt,, (_Mdouble_ __x)); - -#if defined __USE_MISC || defined __USE_XOPEN || defined __USE_ISOC99 -/* Return `sqrt(X*X + Y*Y)'. */ -__MATHCALL (hypot,, (_Mdouble_ __x, _Mdouble_ __y)); -#endif - -#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 -/* Return the cube root of X. */ -__MATHCALL (cbrt,, (_Mdouble_ __x)); -#endif - - -/* Nearest integer, absolute value, and remainder functions. */ - -/* Smallest integral value not less than X. */ -__MATHCALL (ceil,, (_Mdouble_ __x)); - -/* Absolute value of X. */ -__MATHCALLX (fabs,, (_Mdouble_ __x), (__const__)); - -/* Largest integer not greater than X. */ -__MATHCALL (floor,, (_Mdouble_ __x)); - -/* Floating-point modulo remainder of X/Y. */ -__MATHCALL (fmod,, (_Mdouble_ __x, _Mdouble_ __y)); - - -/* Return 0 if VALUE is finite or NaN, +1 if it - is +Infinity, -1 if it is -Infinity. */ -__MATHDECL_1 (int,__isinf,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -/* Return nonzero if VALUE is finite and not NaN. */ -__MATHDECL_1 (int,__finite,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -#ifdef __USE_MISC -/* Return 0 if VALUE is finite or NaN, +1 if it - is +Infinity, -1 if it is -Infinity. */ -__MATHDECL_1 (int,isinf,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -/* Return nonzero if VALUE is finite and not NaN. */ -__MATHDECL_1 (int,finite,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -/* Return the remainder of X/Y. */ -__MATHCALL (drem,, (_Mdouble_ __x, _Mdouble_ __y)); - - -/* Return the fractional part of X after dividing out `ilogb (X)'. */ -__MATHCALL (significand,, (_Mdouble_ __x)); -#endif /* Use misc. */ - -#if defined __USE_MISC || defined __USE_ISOC99 -/* Return X with its signed changed to Y's. */ -__MATHCALLX (copysign,, (_Mdouble_ __x, _Mdouble_ __y), (__const__)); -#endif - -#ifdef __USE_ISOC99 -/* Return representation of NaN for double type. */ -__MATHCALLX (nan,, (__const char *__tagb), (__const__)); -#endif - - -/* Return nonzero if VALUE is not a number. */ -__MATHDECL_1 (int,__isnan,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -#if defined __USE_MISC || defined __USE_XOPEN -/* Return nonzero if VALUE is not a number. */ -__MATHDECL_1 (int,isnan,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -/* Bessel functions. */ -__MATHCALL (j0,, (_Mdouble_)); -__MATHCALL (j1,, (_Mdouble_)); -__MATHCALL (jn,, (int, _Mdouble_)); -__MATHCALL (y0,, (_Mdouble_)); -__MATHCALL (y1,, (_Mdouble_)); -__MATHCALL (yn,, (int, _Mdouble_)); -#endif - - -#if defined __USE_MISC || defined __USE_XOPEN || defined __USE_ISOC99 -/* Error and gamma functions. */ -__MATHCALL (erf,, (_Mdouble_)); -__MATHCALL (erfc,, (_Mdouble_)); -__MATHCALL (lgamma,, (_Mdouble_)); -#endif - -#ifdef __USE_ISOC99 -__MATHCALL (tgamma,, (_Mdouble_)); -#endif - -#if defined __USE_MISC || defined __USE_XOPEN -/* Obsolete alias for `lgamma'. */ -__MATHCALL (gamma,, (_Mdouble_)); -#endif - -#ifdef __USE_MISC -/* Reentrant version of lgamma. This function uses the global variable - `signgam'. The reentrant version instead takes a pointer and stores - the value through it. */ -__MATHCALL (lgamma,_r, (_Mdouble_, int *__signgamp)); -#endif - - -#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 -/* Return the integer nearest X in the direction of the - prevailing rounding mode. */ -__MATHCALL (rint,, (_Mdouble_ __x)); - -/* Return X + epsilon if X < Y, X - epsilon if X > Y. */ -__MATHCALLX (nextafter,, (_Mdouble_ __x, _Mdouble_ __y), (__const__)); -# ifdef __USE_ISOC99 -__MATHCALLX (nexttoward,, (_Mdouble_ __x, long double __y), (__const__)); -# endif - -/* Return the remainder of integer divison X / Y with infinite precision. */ -__MATHCALL (remainder,, (_Mdouble_ __x, _Mdouble_ __y)); - -# if defined __USE_MISC || defined __USE_XOPEN_EXTENDED -/* Return X times (2 to the Nth power). */ -__MATHCALL (scalb,, (_Mdouble_ __x, _Mdouble_ __n)); -# endif - -# if defined __USE_MISC || defined __USE_ISOC99 -/* Return X times (2 to the Nth power). */ -__MATHCALL (scalbn,, (_Mdouble_ __x, int __n)); -# endif - -/* Return the binary exponent of X, which must be nonzero. */ -__MATHDECL (int,ilogb,, (_Mdouble_ __x)); -#endif - -#ifdef __USE_ISOC99 -/* Return X times (2 to the Nth power). */ -__MATHCALL (scalbln,, (_Mdouble_ __x, long int __n)); - -/* Round X to integral value in floating-point format using current - rounding direction, but do not raise inexact exception. */ -__MATHCALL (nearbyint,, (_Mdouble_ __x)); - -/* Round X to nearest integral value, rounding halfway cases away from - zero. */ -__MATHCALL (round,, (_Mdouble_ __x)); - -/* Round X to the integral value in floating-point format nearest but - not larger in magnitude. */ -__MATHCALLX (trunc,, (_Mdouble_ __x), (__const__)); - -/* Compute remainder of X and Y and put in *QUO a value with sign of x/y - and magnitude congruent `mod 2^n' to the magnitude of the integral - quotient x/y, with n >= 3. */ -__MATHCALL (remquo,, (_Mdouble_ __x, _Mdouble_ __y, int *__quo)); - - -/* Conversion functions. */ - -/* Round X to nearest integral value according to current rounding - direction. */ -__MATHDECL (long int,lrint,, (_Mdouble_ __x)); -__MATHDECL (long long int,llrint,, (_Mdouble_ __x)); - -/* Round X to nearest integral value, rounding halfway cases away from - zero. */ -__MATHDECL (long int,lround,, (_Mdouble_ __x)); -__MATHDECL (long long int,llround,, (_Mdouble_ __x)); - - -/* Return positive difference between X and Y. */ -__MATHCALL (fdim,, (_Mdouble_ __x, _Mdouble_ __y)); - -/* Return maximum numeric value from X and Y. */ -__MATHCALL (fmax,, (_Mdouble_ __x, _Mdouble_ __y)); - -/* Return minimum numeric value from X and Y. */ -__MATHCALL (fmin,, (_Mdouble_ __x, _Mdouble_ __y)); - - -/* Classify given number. */ -__MATHDECL_1 (int, __fpclassify,, (_Mdouble_ __value)) - __attribute__ ((__const__)); - -/* Test for negative number. */ -__MATHDECL_1 (int, __signbit,, (_Mdouble_ __value)) - __attribute__ ((__const__)); - - -/* Multiply-add function computed as a ternary operation. */ -__MATHCALL (fma,, (_Mdouble_ __x, _Mdouble_ __y, _Mdouble_ __z)); -#endif /* Use ISO C99. */ diff --git a/libc/sysdeps/linux/sh/bits/mathdef.h b/libc/sysdeps/linux/sh/bits/mathdef.h deleted file mode 100644 index 64cc79bc2..000000000 --- a/libc/sysdeps/linux/sh/bits/mathdef.h +++ /dev/null @@ -1,78 +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. */ - -#if !defined _MATH_H && !defined _COMPLEX_H -# error "Never use <bits/mathdef.h> directly; include <math.h> instead" -#endif - - -/* FIXME! This file describes properties of the compiler, not the machine; - it should not be part of libc! - - FIXME! This file does not deal with the -fshort-double option of - gcc! */ - -#if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF -# define _MATH_H_MATHDEF 1 - -# ifdef __GNUC__ -# if __STDC__ == 1 - -/* In GNU or ANSI mode, gcc leaves `float' expressions as-is. */ -typedef float float_t; /* `float' expressions are evaluated as - `float'. */ -typedef double double_t; /* `double' expressions are evaluated as - `double'. */ - -/* Define `INFINITY' as value of type `float'. */ -# define INFINITY HUGE_VALF - -# else - -/* For `gcc -traditional', `float' expressions are evaluated as `double'. */ -typedef double float_t; /* `float' expressions are evaluated as - `double'. */ -typedef double double_t; /* `double' expressions are evaluated as - `double'. */ - -/* Define `INFINITY' as value of type `float'. */ -# define INFINITY HUGE_VALF - -# endif -# else - -/* Wild guess at types for float_t and double_t. */ -typedef double float_t; -typedef double double_t; - -/* Define `INFINITY' as value of type `float'. */ -# define INFINITY HUGE_VALF - -# endif - -/* The values returned by `ilogb' for 0 and NaN respectively. */ -# define FP_ILOGB0 0x80000001 -# define FP_ILOGBNAN 0x7fffffff - -#endif /* ISO C99 */ - -#ifndef __NO_LONG_DOUBLE_MATH -/* Signal that we do not really have a `long double'. The disables the - declaration of all the `long double' function variants. */ -# define __NO_LONG_DOUBLE_MATH 1 -#endif diff --git a/libc/sysdeps/linux/sh/bits/mathinline.h b/libc/sysdeps/linux/sh/bits/mathinline.h deleted file mode 100644 index 5498af6b6..000000000 --- a/libc/sysdeps/linux/sh/bits/mathinline.h +++ /dev/null @@ -1,12 +0,0 @@ -/* This file should provide inline versions of math functions. - - Surround GCC-specific parts with #ifdef __GNUC__, and use `extern __inline'. - - This file should define __MATH_INLINES if functions are actually defined as - inlines. */ - -#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__ - -/* Here goes the real code. */ - -#endif diff --git a/libc/sysdeps/linux/sh/bits/msq.h b/libc/sysdeps/linux/sh/bits/msq.h deleted file mode 100644 index 32a49b592..000000000 --- a/libc/sysdeps/linux/sh/bits/msq.h +++ /dev/null @@ -1,77 +0,0 @@ -/* Copyright (C) 1995, 1996, 1997, 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 _SYS_MSG_H -# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead." -#endif - -#include <bits/types.h> - -/* Define options for message queue functions. */ -#define MSG_NOERROR 010000 /* no error if message is too big */ -#ifdef __USE_GNU -# define MSG_EXCEPT 020000 /* recv any msg except of specified type */ -#endif - -/* Types used in the structure definition. */ -typedef unsigned long int msgqnum_t; -typedef unsigned long int msglen_t; - - -/* Structure of record for one message inside the kernel. - The type `struct msg' is opaque. */ -struct msqid_ds -{ - struct ipc_perm msg_perm; /* structure describing operation permission */ - __time_t msg_stime; /* time of last msgsnd command */ - unsigned long int __unused1; - __time_t msg_rtime; /* time of last msgrcv command */ - unsigned long int __unused2; - __time_t msg_ctime; /* time of last change */ - unsigned long int __unused3; - unsigned long int __msg_cbytes; /* current number of bytes on queue */ - msgqnum_t msg_qnum; /* number of messages currently on queue */ - msglen_t msg_qbytes; /* max number of bytes allowed on queue */ - __pid_t msg_lspid; /* pid of last msgsnd() */ - __pid_t msg_lrpid; /* pid of last msgrcv() */ - unsigned long int __unused4; - unsigned long int __unused5; -}; - -#ifdef __USE_MISC - -# define msg_cbytes __msg_cbytes - -/* ipcs ctl commands */ -# define MSG_STAT 11 -# define MSG_INFO 12 - -/* buffer for msgctl calls IPC_INFO, MSG_INFO */ -struct msginfo - { - int msgpool; - int msgmap; - int msgmax; - int msgmnb; - int msgmni; - int msgssz; - int msgtql; - unsigned short int msgseg; - }; - -#endif /* __USE_MISC */ diff --git a/libc/sysdeps/linux/sh/bits/nan.h b/libc/sysdeps/linux/sh/bits/nan.h deleted file mode 100644 index 6d88b551b..000000000 --- a/libc/sysdeps/linux/sh/bits/nan.h +++ /dev/null @@ -1,48 +0,0 @@ -/* `NAN' constant for IEEE 754 machines. - Copyright (C) 1992, 1996, 1997, 1999 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 _MATH_H -# error "Never use <bits/nan.h> directly; include <math.h> instead." -#endif - - -/* IEEE Not A Number. */ - -#ifdef __GNUC__ - -# define NAN \ - (__extension__ \ - ((union { unsigned __l __attribute__((__mode__(__SI__))); float __d; }) \ - { __l: 0x7fc00000UL }).__d) - -#else - -# include <endian.h> - -# if __BYTE_ORDER == __BIG_ENDIAN -# define __nan_bytes { 0x7f, 0xc0, 0, 0 } -# endif -# if __BYTE_ORDER == __LITTLE_ENDIAN -# define __nan_bytes { 0, 0, 0xc0, 0x7f } -# endif - -static union { unsigned char __c[4]; float __d; } __nan_union = { __nan_bytes }; -# define NAN (__nan_union.__d) - -#endif /* GCC. */ diff --git a/libc/sysdeps/linux/sh/bits/netdb.h b/libc/sysdeps/linux/sh/bits/netdb.h deleted file mode 100644 index 41dc73193..000000000 --- a/libc/sysdeps/linux/sh/bits/netdb.h +++ /dev/null @@ -1,33 +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. */ - -#ifndef _NETDB_H -# error "Never include <bits/netdb.h> directly; use <netdb.h> instead." -#endif - - -/* Description of data base entry for a single network. NOTE: here a - poor assumption is made. The network number is expected to fit - into an unsigned long int variable. */ -struct netent -{ - char *n_name; /* Official name of network. */ - char **n_aliases; /* Alias list. */ - int n_addrtype; /* Net address type. */ - uint32_t n_net; /* Network number. */ -}; diff --git a/libc/sysdeps/linux/sh/bits/poll.h b/libc/sysdeps/linux/sh/bits/poll.h deleted file mode 100644 index dccb8b666..000000000 --- a/libc/sysdeps/linux/sh/bits/poll.h +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (C) 1997, 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. */ - -#ifndef _SYS_POLL_H -# error "Never use <bits/poll.h> directly; include <sys/poll.h> instead." -#endif - -/* Event types that can be polled for. These bits may be set in `events' - to indicate the interesting event types; they will appear in `revents' - to indicate the status of the file descriptor. */ -#define POLLIN 0x001 /* There is data to read. */ -#define POLLPRI 0x002 /* There is urgent data to read. */ -#define POLLOUT 0x004 /* Writing now will not block. */ - -#ifdef __USE_XOPEN -/* These values are defined in XPG4.2. */ -# define POLLRDNORM 0x040 /* Normal data may be read. */ -# define POLLRDBAND 0x080 /* Priority data may be read. */ -# define POLLWRNORM 0x100 /* Writing now will not block. */ -# define POLLWRBAND 0x200 /* Priority data may be written. */ -#endif - -#ifdef __USE_GNU -/* This is an extension for Linux. */ -# define POLLMSG 0x400 -#endif - -/* Event types always implicitly polled for. These bits need not be set in - `events', but they will appear in `revents' to indicate the status of - the file descriptor. */ -#define POLLERR 0x008 /* Error condition. */ -#define POLLHUP 0x010 /* Hung up. */ -#define POLLNVAL 0x020 /* Invalid polling request. */ diff --git a/libc/sysdeps/linux/sh/bits/posix1_lim.h b/libc/sysdeps/linux/sh/bits/posix1_lim.h deleted file mode 100644 index e16f4674d..000000000 --- a/libc/sysdeps/linux/sh/bits/posix1_lim.h +++ /dev/null @@ -1,141 +0,0 @@ -/* Copyright (C) 1991,92,93,96,98,2000,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. */ - -/* - * POSIX Standard: 2.9.2 Minimum Values Added to <limits.h> - * - * Never include this file directly; use <limits.h> instead. - */ - -#ifndef _BITS_POSIX1_LIM_H -#define _BITS_POSIX1_LIM_H 1 - - -/* These are the standard-mandated minimum values. */ - -/* Minimum number of operations in one list I/O call. */ -#define _POSIX_AIO_LISTIO_MAX 2 - -/* Minimal number of outstanding asynchronous I/O operations. */ -#define _POSIX_AIO_MAX 1 - -/* Maximum length of arguments to `execve', including environment. */ -#define _POSIX_ARG_MAX 4096 - -/* Maximum simultaneous processes per real user ID. */ -#define _POSIX_CHILD_MAX 6 - -/* Minimal number of timer expiration overruns. */ -#define _POSIX_DELAYTIMER_MAX 32 - -/* Maximum link count of a file. */ -#define _POSIX_LINK_MAX 8 - -/* Number of bytes in a terminal canonical input queue. */ -#define _POSIX_MAX_CANON 255 - -/* Number of bytes for which space will be - available in a terminal input queue. */ -#define _POSIX_MAX_INPUT 255 - -/* Maximum number of message queues open for a process. */ -#define _POSIX_MQ_OPEN_MAX 8 - -/* Maximum number of supported message priorities. */ -#define _POSIX_MQ_PRIO_MAX 32 - -/* Number of simultaneous supplementary group IDs per process. */ -#define _POSIX_NGROUPS_MAX 0 - -/* Number of files one process can have open at once. */ -#define _POSIX_OPEN_MAX 16 - -/* Number of descriptors that a process may examine with `pselect' or - `select'. */ -#define _POSIX_FD_SETSIZE _POSIX_OPEN_MAX - -/* Number of bytes in a filename. */ -#define _POSIX_NAME_MAX 14 - -/* Number of bytes in a pathname. */ -#define _POSIX_PATH_MAX 256 - -/* Number of bytes than can be written atomically to a pipe. */ -#define _POSIX_PIPE_BUF 512 - -/* Minimal number of realtime signals reserved for the application. */ -#define _POSIX_RTSIG_MAX 8 - -/* Number of semaphores a process can have. */ -#define _POSIX_SEM_NSEMS_MAX 256 - -/* Maximal value of a semaphore. */ -#define _POSIX_SEM_VALUE_MAX 32767 - -/* Number of pending realtime signals. */ -#define _POSIX_SIGQUEUE_MAX 32 - -/* Largest value of a `ssize_t'. */ -#define _POSIX_SSIZE_MAX 32767 - -/* Number of streams a process can have open at once. */ -#define _POSIX_STREAM_MAX 8 - -/* Maximum length of a timezone name (element of `tzname'). */ -#define _POSIX_TZNAME_MAX 6 - -/* Maximum number of connections that can be queued on a socket. */ -#define _POSIX_QLIMIT 1 - -/* Maximum number of bytes that can be buffered on a socket for send - or receive. */ -#define _POSIX_HIWAT _POSIX_PIPE_BUF - -/* Maximum number of elements in an `iovec' array. */ -#define _POSIX_UIO_MAXIOV 16 - -/* Maximum number of characters in a tty name. */ -#define _POSIX_TTY_NAME_MAX 9 - -/* Number of timer for a process. */ -#define _POSIX_TIMER_MAX 32 - -/* Maximum length of login name. */ -#define _POSIX_LOGIN_NAME_MAX 9 - -/* Maximum clock resolution in nanoseconds. */ -#define _POSIX_CLOCKRES_MIN 20000000 - - -/* Get the implementation-specific values for the above. */ -#include <bits/local_lim.h> - - -#ifndef SSIZE_MAX -# define SSIZE_MAX INT_MAX -#endif - - -/* This value is a guaranteed minimum maximum. - The current maximum can be got from `sysconf'. */ - -#ifndef NGROUPS_MAX -# define NGROUPS_MAX _POSIX_NGROUPS_MAX -#endif - -#endif /* bits/posix1_lim.h */ diff --git a/libc/sysdeps/linux/sh/bits/posix2_lim.h b/libc/sysdeps/linux/sh/bits/posix2_lim.h deleted file mode 100644 index 24483a09d..000000000 --- a/libc/sysdeps/linux/sh/bits/posix2_lim.h +++ /dev/null @@ -1,91 +0,0 @@ -/* Copyright (C) 1991, 1996, 1999, 2000, 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. */ - -/* - * Never include this file directly; include <limits.h> instead. - */ - -#ifndef _BITS_POSIX2_LIM_H -#define _BITS_POSIX2_LIM_H 1 - - -/* The maximum `ibase' and `obase' values allowed by the `bc' utility. */ -#define _POSIX2_BC_BASE_MAX 99 - -/* The maximum number of elements allowed in an array by the `bc' utility. */ -#define _POSIX2_BC_DIM_MAX 2048 - -/* The maximum `scale' value allowed by the `bc' utility. */ -#define _POSIX2_BC_SCALE_MAX 99 - -/* The maximum length of a string constant accepted by the `bc' utility. */ -#define _POSIX2_BC_STRING_MAX 1000 - -/* The maximum number of weights that can be assigned to an entry of - the LC_COLLATE `order' keyword in the locale definition file. */ -#define _POSIX2_COLL_WEIGHTS_MAX 2 - -/* The maximum number of expressions that can be nested - within parentheses by the `expr' utility. */ -#define _POSIX2_EXPR_NEST_MAX 32 - -/* The maximum length, in bytes, of an input line. */ -#define _POSIX2_LINE_MAX 2048 - -/* The maximum number of repeated occurrences of a regular expression - permitted when using the interval notation `\{M,N\}'. */ -#define _POSIX2_RE_DUP_MAX 255 - -/* The maximum number of bytes in a character class name. We have no - fixed limit, 2048 is a high number. */ -#define _POSIX2_CHARCLASS_NAME_MAX 14 - - -/* These values are implementation-specific, - and may vary within the implementation. - Their precise values can be obtained from sysconf. */ - -#ifndef BC_BASE_MAX -#define BC_BASE_MAX _POSIX2_BC_BASE_MAX -#endif -#ifndef BC_DIM_MAX -#define BC_DIM_MAX _POSIX2_BC_DIM_MAX -#endif -#ifndef BC_SCALE_MAX -#define BC_SCALE_MAX _POSIX2_BC_SCALE_MAX -#endif -#ifndef BC_STRING_MAX -#define BC_STRING_MAX _POSIX2_BC_STRING_MAX -#endif -#ifndef COLL_WEIGHTS_MAX -#define COLL_WEIGHTS_MAX 255 -#endif -#ifndef EXPR_NEST_MAX -#define EXPR_NEST_MAX _POSIX2_EXPR_NEST_MAX -#endif -#ifndef LINE_MAX -#define LINE_MAX _POSIX2_LINE_MAX -#endif -#ifndef CHARCLASS_NAME_MAX -#define CHARCLASS_NAME_MAX 2048 -#endif - -/* This value is defined like this in regex.h. */ -#define RE_DUP_MAX (0x7fff) - -#endif /* bits/posix2_lim.h */ diff --git a/libc/sysdeps/linux/sh/bits/posix_opt.h b/libc/sysdeps/linux/sh/bits/posix_opt.h deleted file mode 100644 index 9e39d8d21..000000000 --- a/libc/sysdeps/linux/sh/bits/posix_opt.h +++ /dev/null @@ -1,141 +0,0 @@ -/* Define POSIX options for Linux. - Copyright (C) 1996,1997,1998,1999,2000,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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _POSIX_OPT_H -#define _POSIX_OPT_H 1 - -/* Job control is supported. */ -#define _POSIX_JOB_CONTROL 1 - -/* Processes have a saved set-user-ID and a saved set-group-ID. */ -#define _POSIX_SAVED_IDS 1 - -/* Priority scheduling is supported. */ -#define _POSIX_PRIORITY_SCHEDULING 1 - -/* Synchronizing file data is supported. */ -#define _POSIX_SYNCHRONIZED_IO 1 - -/* The fsync function is present. */ -#define _POSIX_FSYNC 1 - -/* Mapping of files to memory is supported. */ -#define _POSIX_MAPPED_FILES 1 - -/* Locking of all memory is supported. */ -#define _POSIX_MEMLOCK 1 - -/* Locking of ranges of memory is supported. */ -#define _POSIX_MEMLOCK_RANGE 1 - -/* Setting of memory protections is supported. */ -#define _POSIX_MEMORY_PROTECTION 1 - -/* Implementation supports `poll' function. */ -#define _POSIX_POLL 1 - -/* Implementation supports `select' and `pselect' functions. */ -#define _POSIX_SELECT 1 - -/* Only root can change owner of file. */ -#define _POSIX_CHOWN_RESTRICTED 1 - -/* `c_cc' member of 'struct termios' structure can be disabled by - using the value _POSIX_VDISABLE. */ -#define _POSIX_VDISABLE '\0' - -/* Filenames are not silently truncated. */ -#define _POSIX_NO_TRUNC 1 - -/* X/Open realtime support is available. */ -#define _XOPEN_REALTIME 1 - -/* X/Open realtime thread support is available. */ -#undef _XOPEN_REALTIME_THREADS - -/* XPG4.2 shared memory is supported. */ -#define _XOPEN_SHM 1 - -/* Tell we have POSIX threads. */ -#undef _POSIX_THREADS - -/* We have the reentrant functions described in POSIX. */ -#define _POSIX_REENTRANT_FUNCTIONS 1 -#define _POSIX_THREAD_SAFE_FUNCTIONS 1 - -/* We provide priority scheduling for threads. */ -#define _POSIX_THREAD_PRIORITY_SCHEDULING 1 - -/* We support user-defined stack sizes. */ -#define _POSIX_THREAD_ATTR_STACKSIZE 1 - -/* We support user-defined stacks. */ -#define _POSIX_THREAD_ATTR_STACKADDR 1 - -/* We support POSIX.1b semaphores, but only the non-shared form for now. */ -#define _POSIX_SEMAPHORES 1 - -/* Real-time signals are supported. */ -#define _POSIX_REALTIME_SIGNALS 1 - -/* We support asynchronous I/O. */ -#define _POSIX_ASYNCHRONOUS_IO 1 -#define _POSIX_ASYNC_IO 1 -/* Alternative name for Unix98. */ -#define _LFS_ASYNCHRONOUS_IO 1 - -/* The LFS support in asynchronous I/O is also available. */ -#define _LFS64_ASYNCHRONOUS_IO 1 - -/* The rest of the LFS is also available. */ -#define _LFS_LARGEFILE 1 -#define _LFS64_LARGEFILE 1 -#define _LFS64_STDIO 1 - -/* POSIX shared memory objects are implemented. */ -#define _POSIX_SHARED_MEMORY_OBJECTS 1 - -/* GNU libc provides regular expression handling. */ -#define _POSIX_REGEXP 1 - -/* Reader/Writer locks are available. */ -#define _POSIX_READER_WRITER_LOCKS 200912L - -/* We have a POSIX shell. */ -#define _POSIX_SHELL 1 - -/* We support the Timeouts option. */ -#define _POSIX_TIMEOUTS 200912L - -/* We support spinlocks. */ -#define _POSIX_SPIN_LOCKS 200912L - -/* The `spawn' function family is supported. */ -#define _POSIX_SPAWN 200912L - -/* We have POSIX timers. */ -#define _POSIX_TIMERS 1 - -/* The barrier functions are available. */ -#define _POSIX_BARRIERS 200912L - -/* POSIX message queues are not yet supported. */ -#undef _POSIX_MESSAGE_PASSING - -#endif /* posix_opt.h */ diff --git a/libc/sysdeps/linux/sh/bits/pthreadtypes.h b/libc/sysdeps/linux/sh/bits/pthreadtypes.h deleted file mode 100644 index 3ee5c4813..000000000 --- a/libc/sysdeps/linux/sh/bits/pthreadtypes.h +++ /dev/null @@ -1,142 +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. */ - -#if !defined _BITS_TYPES_H && !defined _PTHREAD_H -# error "Never include <bits/pthreadtypes.h> directly; use <sys/types.h> instead." -#endif - -#ifndef _BITS_PTHREADTYPES_H -#define _BITS_PTHREADTYPES_H 1 - -#define __need_schedparam -#include <bits/sched.h> - -/* Fast locks (not abstract because mutexes and conditions aren't abstract). */ -struct _pthread_fastlock -{ - long int __status; /* "Free" or "taken" or head of waiting list */ - int __spinlock; /* Used by compare_and_swap emulation. Also, - adaptive SMP lock stores spin count here. */ -}; - -#ifndef _PTHREAD_DESCR_DEFINED -/* Thread descriptors */ -typedef struct _pthread_descr_struct *_pthread_descr; -# define _PTHREAD_DESCR_DEFINED -#endif - - -/* Attributes for threads. */ -typedef struct __pthread_attr_s -{ - int __detachstate; - int __schedpolicy; - struct __sched_param __schedparam; - int __inheritsched; - int __scope; - size_t __guardsize; - int __stackaddr_set; - void *__stackaddr; - size_t __stacksize; -} pthread_attr_t; - - -/* Conditions (not abstract because of PTHREAD_COND_INITIALIZER */ -typedef struct -{ - struct _pthread_fastlock __c_lock; /* Protect against concurrent access */ - _pthread_descr __c_waiting; /* Threads waiting on this condition */ -} pthread_cond_t; - - -/* Attribute for conditionally variables. */ -typedef struct -{ - int __dummy; -} pthread_condattr_t; - -/* Keys for thread-specific data */ -typedef unsigned int pthread_key_t; - - -/* Mutexes (not abstract because of PTHREAD_MUTEX_INITIALIZER). */ -/* (The layout is unnatural to maintain binary compatibility - with earlier releases of LinuxThreads.) */ -typedef struct -{ - int __m_reserved; /* Reserved for future use */ - int __m_count; /* Depth of recursive locking */ - _pthread_descr __m_owner; /* Owner thread (if recursive or errcheck) */ - int __m_kind; /* Mutex kind: fast, recursive or errcheck */ - struct _pthread_fastlock __m_lock; /* Underlying fast lock */ -} pthread_mutex_t; - - -/* Attribute for mutex. */ -typedef struct -{ - int __mutexkind; -} pthread_mutexattr_t; - - -/* Once-only execution */ -typedef int pthread_once_t; - - -#ifdef __USE_UNIX98 -/* Read-write locks. */ -typedef struct _pthread_rwlock_t -{ - struct _pthread_fastlock __rw_lock; /* Lock to guarantee mutual exclusion */ - int __rw_readers; /* Number of readers */ - _pthread_descr __rw_writer; /* Identity of writer, or NULL if none */ - _pthread_descr __rw_read_waiting; /* Threads waiting for reading */ - _pthread_descr __rw_write_waiting; /* Threads waiting for writing */ - int __rw_kind; /* Reader/Writer preference selection */ - int __rw_pshared; /* Shared between processes or not */ -} pthread_rwlock_t; - - -/* Attribute for read-write locks. */ -typedef struct -{ - int __lockkind; - int __pshared; -} pthread_rwlockattr_t; -#endif - -#ifdef __USE_XOPEN2K -/* POSIX spinlock data type. */ -typedef volatile int pthread_spinlock_t; - -/* POSIX barrier. */ -typedef struct { - struct _pthread_fastlock __ba_lock; /* Lock to guarantee mutual exclusion */ - int __ba_required; /* Threads needed for completion */ - int __ba_present; /* Threads waiting */ - _pthread_descr __ba_waiting; /* Queue of waiting threads */ -} pthread_barrier_t; - -/* barrier attribute */ -typedef struct { - int __pshared; -} pthread_barrierattr_t; - -#endif - - -/* Thread identifiers */ -typedef unsigned long int pthread_t; - -#endif /* bits/pthreadtypes.h */ diff --git a/libc/sysdeps/linux/sh/bits/sched.h b/libc/sysdeps/linux/sh/bits/sched.h deleted file mode 100644 index 5c10d85d4..000000000 --- a/libc/sysdeps/linux/sh/bits/sched.h +++ /dev/null @@ -1,73 +0,0 @@ -/* Definitions of constants and data structure for POSIX 1003.1b-1993 - scheduling interface. - Copyright (C) 1996, 1997, 1998, 1999, 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. */ - -#ifndef __need_schedparam - -#ifndef _SCHED_H -# error "Never include <bits/sched.h> directly; use <sched.h> instead." -#endif - - -/* Scheduling algorithms. */ -#define SCHED_OTHER 0 -#define SCHED_FIFO 1 -#define SCHED_RR 2 - -#ifdef __USE_MISC -/* Cloning flags. */ -# define CSIGNAL 0x000000ff /* Signal mask to be sent at exit. */ -# define CLONE_VM 0x00000100 /* Set if VM shared between processes. */ -# define CLONE_FS 0x00000200 /* Set if fs info shared between processes. */ -# define CLONE_FILES 0x00000400 /* Set if open files shared between processes. */ -# define CLONE_SIGHAND 0x00000800 /* Set if signal handlers shared. */ -# define CLONE_PID 0x00001000 /* Set if pid shared. */ -# define CLONE_PTRACE 0x00002000 /* Set if tracing continues on the child. */ -# define CLONE_VFORK 0x00004000 /* Set if the parent wants the child to - wake it up on mm_release. */ -#endif - -/* The official definition. */ -struct sched_param - { - int __sched_priority; - }; - -__BEGIN_DECLS - -/* Clone current process. */ -#ifdef __USE_MISC -extern int clone (int (*__fn) (void *__arg), void *__child_stack, - int __flags, void *__arg) __THROW; -#endif - -__END_DECLS - -#endif /* need schedparam */ - -#if !defined __defined_schedparam \ - && (defined __need_schedparam || defined _SCHED_H) -# define __defined_schedparam 1 -/* Data structure to describe a process' schedulability. */ -struct __sched_param - { - int __sched_priority; - }; -# undef __need_schedparam -#endif diff --git a/libc/sysdeps/linux/sh/bits/select.h b/libc/sysdeps/linux/sh/bits/select.h deleted file mode 100644 index 47e7dedc3..000000000 --- a/libc/sysdeps/linux/sh/bits/select.h +++ /dev/null @@ -1,35 +0,0 @@ -/* 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. */ - -#ifndef _SYS_SELECT_H -# error "Never use <bits/select.h> directly; include <sys/select.h> instead." -#endif - - -/* We don't use `memset' because this would require a prototype and - the array isn't too big. */ -#define __FD_ZERO(s) \ - do { \ - unsigned int __i; \ - fd_set *__arr = (s); \ - for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) \ - __FDS_BITS (__arr)[__i] = 0; \ - } while (0) -#define __FD_SET(d, s) (__FDS_BITS (s)[__FDELT(d)] |= __FDMASK(d)) -#define __FD_CLR(d, s) (__FDS_BITS (s)[__FDELT(d)] &= ~__FDMASK(d)) -#define __FD_ISSET(d, s) ((__FDS_BITS (s)[__FDELT(d)] & __FDMASK(d)) != 0) diff --git a/libc/sysdeps/linux/sh/bits/sem.h b/libc/sysdeps/linux/sh/bits/sem.h deleted file mode 100644 index 6193501e2..000000000 --- a/libc/sysdeps/linux/sh/bits/sem.h +++ /dev/null @@ -1,87 +0,0 @@ -/* Copyright (C) 1995, 1996, 1997, 1998, 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 _SYS_SEM_H -# error "Never include <bits/sem.h> directly; use <sys/sem.h> instead." -#endif - -#include <sys/types.h> - -/* Flags for `semop'. */ -#define SEM_UNDO 0x1000 /* undo the operation on exit */ - -/* Commands for `semctl'. */ -#define GETPID 11 /* get sempid */ -#define GETVAL 12 /* get semval */ -#define GETALL 13 /* get all semval's */ -#define GETNCNT 14 /* get semncnt */ -#define GETZCNT 15 /* get semzcnt */ -#define SETVAL 16 /* set semval */ -#define SETALL 17 /* set all semval's */ - - -/* Data structure describing a set of semaphores. */ -struct semid_ds -{ - struct ipc_perm sem_perm; /* operation permission struct */ - __time_t sem_otime; /* last semop() time */ - unsigned long int __unused1; - __time_t sem_ctime; /* last time changed by semctl() */ - unsigned long int __unused2; - unsigned long int sem_nsems; /* number of semaphores in set */ - unsigned long int __unused3; - unsigned long int __unused4; -}; - -/* The user should define a union like the following to use it for arguments - for `semctl'. - - union semun - { - int val; <= value for SETVAL - struct semid_ds *buf; <= buffer for IPC_STAT & IPC_SET - unsigned short int *array; <= array for GETALL & SETALL - struct seminfo *__buf; <= buffer for IPC_INFO - }; - - Previous versions of this file used to define this union but this is - incorrect. One can test the macro _SEM_SEMUN_UNDEFINED to see whether - one must define the union or not. */ -#define _SEM_SEMUN_UNDEFINED 1 - -#ifdef __USE_MISC - -/* ipcs ctl cmds */ -# define SEM_STAT 18 -# define SEM_INFO 19 - -struct seminfo -{ - int semmap; - int semmni; - int semmns; - int semmnu; - int semmsl; - int semopm; - int semume; - int semusz; - int semvmx; - int semaem; -}; - -#endif /* __USE_MISC */ diff --git a/libc/sysdeps/linux/sh/bits/shm.h b/libc/sysdeps/linux/sh/bits/shm.h deleted file mode 100644 index 18246c3bd..000000000 --- a/libc/sysdeps/linux/sh/bits/shm.h +++ /dev/null @@ -1,93 +0,0 @@ -/* Copyright (C) 1995, 1996, 1997, 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 _SYS_SHM_H -# error "Never include <bits/shm.h> directly; use <sys/shm.h> instead." -#endif - -#include <bits/types.h> - -/* Permission flag for shmget. */ -#define SHM_R 0400 /* or S_IRUGO from <linux/stat.h> */ -#define SHM_W 0200 /* or S_IWUGO from <linux/stat.h> */ - -/* Flags for `shmat'. */ -#define SHM_RDONLY 010000 /* attach read-only else read-write */ -#define SHM_RND 020000 /* round attach address to SHMLBA */ -#define SHM_REMAP 040000 /* take-over region on attach */ - -/* Commands for `shmctl'. */ -#define SHM_LOCK 11 /* lock segment (root only) */ -#define SHM_UNLOCK 12 /* unlock segment (root only) */ - - -/* Type to count number of attaches. */ -typedef unsigned long int shmatt_t; - -/* Data structure describing a set of semaphores. */ -struct shmid_ds - { - struct ipc_perm shm_perm; /* operation permission struct */ - size_t shm_segsz; /* size of segment in bytes */ - __time_t shm_atime; /* time of last shmat() */ - unsigned long int __unused1; - __time_t shm_dtime; /* time of last shmdt() */ - unsigned long int __unused2; - __time_t shm_ctime; /* time of last change by shmctl() */ - unsigned long int __unused3; - __pid_t shm_cpid; /* pid of creator */ - __pid_t shm_lpid; /* pid of last shmop */ - shmatt_t shm_nattch; /* number of current attaches */ - unsigned long int __unused4; - unsigned long int __unused5; - }; - -#ifdef __USE_MISC - -/* ipcs ctl commands */ -# define SHM_STAT 13 -# define SHM_INFO 14 - -/* shm_mode upper byte flags */ -# define SHM_DEST 01000 /* segment will be destroyed on last detach */ -# define SHM_LOCKED 02000 /* segment will not be swapped */ - -struct shminfo - { - unsigned long int shmmax; - unsigned long int shmmin; - unsigned long int shmmni; - unsigned long int shmseg; - unsigned long int shmall; - unsigned long int __unused1; - unsigned long int __unused2; - unsigned long int __unused3; - unsigned long int __unused4; - }; - -struct shm_info - { - int used_ids; - unsigned long int shm_tot; /* total allocated shm */ - unsigned long int shm_rss; /* total resident shm */ - unsigned long int shm_swp; /* total swapped shm */ - unsigned long int swap_attempts; - unsigned long int swap_successes; - }; - -#endif /* __USE_MISC */ diff --git a/libc/sysdeps/linux/sh/bits/sigaction.h b/libc/sysdeps/linux/sh/bits/sigaction.h deleted file mode 100644 index 48cc5312f..000000000 --- a/libc/sysdeps/linux/sh/bits/sigaction.h +++ /dev/null @@ -1,77 +0,0 @@ -/* The proper definitions for Linux's sigaction. - Copyright (C) 1993-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 _SIGNAL_H -# error "Never include <bits/sigaction.h> directly; use <signal.h> instead." -#endif - -/* Structure describing the action to be taken when a signal arrives. */ -struct sigaction - { - /* Signal handler. */ -#ifdef __USE_POSIX199309 - union - { - /* Used if SA_SIGINFO is not set. */ - __sighandler_t sa_handler; - /* Used if SA_SIGINFO is set. */ - void (*sa_sigaction) (int, siginfo_t *, void *); - } - __sigaction_handler; -# define sa_handler __sigaction_handler.sa_handler -# define sa_sigaction __sigaction_handler.sa_sigaction -#else - __sighandler_t sa_handler; -#endif - - /* Additional set of signals to be blocked. */ - __sigset_t sa_mask; - - /* Special flags. */ - int sa_flags; - - /* Restore handler. */ - void (*sa_restorer) (void); - }; - -/* Bits in `sa_flags'. */ -#define SA_NOCLDSTOP 1 /* Don't send SIGCHLD when children stop. */ -#define SA_NOCLDWAIT 2 /* Don't create zombie on child death. */ -#define SA_SIGINFO 4 /* Invoke signal-catching function with - three arguments instead of one. */ -#if defined __USE_UNIX98 || defined __USE_MISC -# define SA_ONSTACK 0x08000000 /* Use signal stack by using `sa_restorer'. */ -# define SA_RESTART 0x10000000 /* Restart syscall on signal return. */ -# define SA_NODEFER 0x40000000 /* Don't automatically block the signal when - its handler is being executed. */ -# define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler. */ -#endif -#ifdef __USE_MISC -# define SA_INTERRUPT 0x20000000 /* Historical no-op. */ - -/* Some aliases for the SA_ constants. */ -# define SA_NOMASK SA_NODEFER -# define SA_ONESHOT SA_RESETHAND -# define SA_STACK SA_ONSTACK -#endif - -/* Values for the HOW argument to `sigprocmask'. */ -#define SIG_BLOCK 0 /* Block signals. */ -#define SIG_UNBLOCK 1 /* Unblock signals. */ -#define SIG_SETMASK 2 /* Set the set of blocked signals. */ diff --git a/libc/sysdeps/linux/sh/bits/sigcontext.h b/libc/sysdeps/linux/sh/bits/sigcontext.h deleted file mode 100644 index 67dcf9498..000000000 --- a/libc/sysdeps/linux/sh/bits/sigcontext.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 1996, 1997, 1998 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. */ - -#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H -# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead." -#endif - -#ifndef sigcontext_struct -/* Kernel headers before 2.1.1 define a struct sigcontext_struct, but - we need sigcontext. */ -# define sigcontext_struct sigcontext - -# include <asm/sigcontext.h> -#endif diff --git a/libc/sysdeps/linux/sh/bits/siginfo.h b/libc/sysdeps/linux/sh/bits/siginfo.h deleted file mode 100644 index 70a8c217e..000000000 --- a/libc/sysdeps/linux/sh/bits/siginfo.h +++ /dev/null @@ -1,306 +0,0 @@ -/* siginfo_t, sigevent and constants. Linux/SPARC version. - Copyright (C) 1997, 1998, 1999, 2000, 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. */ - -#if !defined _SIGNAL_H && !defined __need_siginfo_t \ - && !defined __need_sigevent_t -# error "Never include this file directly. Use <signal.h> instead" -#endif - -#include <bits/wordsize.h> - -#if (!defined __have_sigval_t \ - && (defined _SIGNAL_H || defined __need_siginfo_t \ - || defined __need_sigevent_t)) -# define __have_sigval_t 1 - -/* Type for data associated with a signal. */ -typedef union sigval - { - int sival_int; - void *sival_ptr; - } sigval_t; -#endif - -#if (!defined __have_siginfo_t \ - && (defined _SIGNAL_H || defined __need_siginfo_t)) -# define __have_siginfo_t 1 - -# define __SI_MAX_SIZE 128 -# if __WORDSIZE == 64 -# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 4) -# else -# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3) -# endif - -typedef struct siginfo - { - int si_signo; /* Signal number. */ - int si_errno; /* If non-zero, an errno value associated with - this signal, as defined in <errno.h>. */ - int si_code; /* Signal code. */ - - union - { - int _pad[__SI_PAD_SIZE]; - - /* kill(). */ - struct - { - __pid_t si_pid; /* Sending process ID. */ - __uid_t si_uid; /* Real user ID of sending process. */ - } _kill; - - /* POSIX.1b timers. */ - struct - { - unsigned int _timer1; - unsigned int _timer2; - } _timer; - - /* POSIX.1b signals. */ - struct - { - __pid_t si_pid; /* Sending process ID. */ - __uid_t si_uid; /* Real user ID of sending process. */ - sigval_t si_sigval; /* Signal value. */ - } _rt; - - /* SIGCHLD. */ - struct - { - __pid_t si_pid; /* Which child. */ - __uid_t si_uid; /* Real user ID of sending process. */ - int si_status; /* Exit value or signal. */ - __clock_t si_utime; - __clock_t si_stime; - } _sigchld; - - /* SIGILL, SIGFPE, SIGSEGV, SIGBUS. */ - struct - { - void *si_addr; /* Faulting insn/memory ref. */ - } _sigfault; - - /* SIGPOLL. */ - struct - { - long int si_band; /* Band event for SIGPOLL. */ - int si_fd; - } _sigpoll; - } _sifields; - } siginfo_t; - - -/* X/Open requires some more fields with fixed names. */ -# define si_pid _sifields._kill.si_pid -# define si_uid _sifields._kill.si_uid -# define si_timer1 _sifields._timer._timer1 -# define si_timer2 _sifields._timer._timer2 -# define si_status _sifields._sigchld.si_status -# define si_utime _sifields._sigchld.si_utime -# define si_stime _sifields._sigchld.si_stime -# define si_value _sifields._rt.si_sigval -# define si_int _sifields._rt.si_sigval.sival_int -# define si_ptr _sifields._rt.si_sigval.sival_ptr -# define si_addr _sifields._sigfault.si_addr -# define si_band _sifields._sigpoll.si_band -# define si_fd _sifields._sigpoll.si_fd - - -/* Values for `si_code'. Positive values are reserved for kernel-generated - signals. */ -enum -{ - SI_ASYNCNL = -6, /* Sent by asynch name lookup completion. */ -# define SI_ASYNCNL SI_ASYNCNL - SI_SIGIO, /* Sent by queued SIGIO. */ -# define SI_SIGIO SI_SIGIO - SI_ASYNCIO, /* Sent by AIO completion. */ -# define SI_ASYNCIO SI_ASYNCIO - SI_MESGQ, /* Sent by real time mesq state change. */ -# define SI_MESGQ SI_MESGQ - SI_TIMER, /* Sent by timer expiration. */ -# define SI_TIMER SI_TIMER - SI_QUEUE, /* Sent by sigqueue. */ -# define SI_QUEUE SI_QUEUE - SI_USER, /* Sent by kill, sigsend, raise. */ -# define SI_USER SI_USER - SI_KERNEL = 0x80 /* Send by kernel. */ -#define SI_KERNEL SI_KERNEL -}; - - -/* `si_code' values for SIGILL signal. */ -enum -{ - ILL_ILLOPC = 1, /* Illegal opcode. */ -# define ILL_ILLOPC ILL_ILLOPC - ILL_ILLOPN, /* Illegal operand. */ -# define ILL_ILLOPN ILL_ILLOPN - ILL_ILLADR, /* Illegal addressing mode. */ -# define ILL_ILLADR ILL_ILLADR - ILL_ILLTRP, /* Illegal trap. */ -# define ILL_ILLTRP ILL_ILLTRP - ILL_PRVOPC, /* Privileged opcode. */ -# define ILL_PRVOPC ILL_PRVOPC - ILL_PRVREG, /* Privileged register. */ -# define ILL_PRVREG ILL_PRVREG - ILL_COPROC, /* Coprocessor error. */ -# define ILL_COPROC ILL_COPROC - ILL_BADSTK /* Internal stack error. */ -# define ILL_BADSTK ILL_BADSTK -}; - -/* `si_code' values for SIGFPE signal. */ -enum -{ - FPE_INTDIV = 1, /* Integer divide by zero. */ -# define FPE_INTDIV FPE_INTDIV - FPE_INTOVF, /* Integer overflow. */ -# define FPE_INTOVF FPE_INTOVF - FPE_FLTDIV, /* Floating point divide by zero. */ -# define FPE_FLTDIV FPE_FLTDIV - FPE_FLTOVF, /* Floating point overflow. */ -# define FPE_FLTOVF FPE_FLTOVF - FPE_FLTUND, /* Floating point underflow. */ -# define FPE_FLTUND FPE_FLTUND - FPE_FLTRES, /* Floating point inexact result. */ -# define FPE_FLTRES FPE_FLTRES - FPE_FLTINV, /* Floating point invalid operation. */ -# define FPE_FLTINV FPE_FLTINV - FPE_FLTSUB /* Subscript out of range. */ -# define FPE_FLTSUB FPE_FLTSUB -}; - -/* `si_code' values for SIGSEGV signal. */ -enum -{ - SEGV_MAPERR = 1, /* Address not mapped to object. */ -# define SEGV_MAPERR SEGV_MAPERR - SEGV_ACCERR /* Invalid permissions for mapped object. */ -# define SEGV_ACCERR SEGV_ACCERR -}; - -/* `si_code' values for SIGBUS signal. */ -enum -{ - BUS_ADRALN = 1, /* Invalid address alignment. */ -# define BUS_ADRALN BUS_ADRALN - BUS_ADRERR, /* Non-existant physical address. */ -# define BUS_ADRERR BUS_ADRERR - BUS_OBJERR /* Object specific hardware error. */ -# define BUS_OBJERR BUS_OBJERR -}; - -/* `si_code' values for SIGTRAP signal. */ -enum -{ - TRAP_BRKPT = 1, /* Process breakpoint. */ -# define TRAP_BRKPT TRAP_BRKPT - TRAP_TRACE /* Process trace trap. */ -# define TRAP_TRACE TRAP_TRACE -}; - -/* `si_code' values for SIGCHLD signal. */ -enum -{ - CLD_EXITED = 1, /* Child has exited. */ -# define CLD_EXITED CLD_EXITED - CLD_KILLED, /* Child was killed. */ -# define CLD_KILLED CLD_KILLED - CLD_DUMPED, /* Child terminated abnormally. */ -# define CLD_DUMPED CLD_DUMPED - CLD_TRAPPED, /* Traced child has trapped. */ -# define CLD_TRAPPED CLD_TRAPPED - CLD_STOPPED, /* Child has stopped. */ -# define CLD_STOPPED CLD_STOPPED - CLD_CONTINUED /* Stopped child has continued. */ -# define CLD_CONTINUED CLD_CONTINUED -}; - -/* `si_code' values for SIGPOLL signal. */ -enum -{ - POLL_IN = 1, /* Data input available. */ -# define POLL_IN POLL_IN - POLL_OUT, /* Output buffers available. */ -# define POLL_OUT POLL_OUT - POLL_MSG, /* Input message available. */ -# define POLL_MSG POLL_MSG - POLL_ERR, /* I/O error. */ -# define POLL_ERR POLL_ERR - POLL_PRI, /* High priority input available. */ -# define POLL_PRI POLL_PRI - POLL_HUP /* Device disconnected. */ -# define POLL_HUP POLL_HUP -}; - -# undef __need_siginfo_t -#endif /* !have siginfo_t && (have _SIGNAL_H || need siginfo_t). */ - - -#if (defined _SIGNAL_H || defined __need_sigevent_t) \ - && !defined __have_sigevent_t -# define __have_sigevent_t 1 - -/* Structure to transport application-defined values with signals. */ -# define __SIGEV_MAX_SIZE 64 -# if __WORDSIZE == 64 -# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4) -# else -# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3) -# endif - -/* Forward declaration of the `pthread_attr_t' type. */ -struct __pthread_attr_s; - -typedef struct sigevent - { - sigval_t sigev_value; - int sigev_signo; - int sigev_notify; - - union - { - int _pad[__SIGEV_PAD_SIZE]; - - struct - { - void (*_function) (sigval_t); /* Function to start. */ - struct __pthread_attr_s *_attribute; /* Really pthread_attr_t. */ - } _sigev_thread; - } _sigev_un; - } sigevent_t; - -/* POSIX names to access some of the members. */ -# define sigev_notify_function _sigev_un._sigev_thread._function -# define sigev_notify_attributes _sigev_un._sigev_thread._attribute - -/* `sigev_notify' values. */ -enum -{ - SIGEV_SIGNAL = 0, /* Notify via signal. */ -# define SIGEV_SIGNAL SIGEV_SIGNAL - SIGEV_NONE, /* Other notification: meaningless. */ -# define SIGEV_NONE SIGEV_NONE - SIGEV_THREAD /* Deliver via thread creation. */ -# define SIGEV_THREAD SIGEV_THREAD -}; - -#endif /* have _SIGNAL_H. */ diff --git a/libc/sysdeps/linux/sh/bits/signum.h b/libc/sysdeps/linux/sh/bits/signum.h deleted file mode 100644 index 74259b492..000000000 --- a/libc/sysdeps/linux/sh/bits/signum.h +++ /dev/null @@ -1,80 +0,0 @@ -/* Signal number definitions. Linux version. - Copyright (C) 1995, 1996, 1997, 1998, 1999 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. */ - -#ifdef _SIGNAL_H - -/* Fake signal functions. */ -#define SIG_ERR ((__sighandler_t) -1) /* Error return. */ -#define SIG_DFL ((__sighandler_t) 0) /* Default action. */ -#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */ - -#ifdef __USE_UNIX98 -# define SIG_HOLD ((__sighandler_t) 2) /* Add signal to hold mask. */ -#endif - - -/* Signals. */ -#define SIGHUP 1 /* Hangup (POSIX). */ -#define SIGINT 2 /* Interrupt (ANSI). */ -#define SIGQUIT 3 /* Quit (POSIX). */ -#define SIGILL 4 /* Illegal instruction (ANSI). */ -#define SIGTRAP 5 /* Trace trap (POSIX). */ -#define SIGABRT 6 /* Abort (ANSI). */ -#define SIGIOT 6 /* IOT trap (4.2 BSD). */ -#define SIGBUS 7 /* BUS error (4.2 BSD). */ -#define SIGFPE 8 /* Floating-point exception (ANSI). */ -#define SIGKILL 9 /* Kill, unblockable (POSIX). */ -#define SIGUSR1 10 /* User-defined signal 1 (POSIX). */ -#define SIGSEGV 11 /* Segmentation violation (ANSI). */ -#define SIGUSR2 12 /* User-defined signal 2 (POSIX). */ -#define SIGPIPE 13 /* Broken pipe (POSIX). */ -#define SIGALRM 14 /* Alarm clock (POSIX). */ -#define SIGTERM 15 /* Termination (ANSI). */ -#define SIGSTKFLT 16 /* Stack fault. */ -#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */ -#define SIGCHLD 17 /* Child status has changed (POSIX). */ -#define SIGCONT 18 /* Continue (POSIX). */ -#define SIGSTOP 19 /* Stop, unblockable (POSIX). */ -#define SIGTSTP 20 /* Keyboard stop (POSIX). */ -#define SIGTTIN 21 /* Background read from tty (POSIX). */ -#define SIGTTOU 22 /* Background write to tty (POSIX). */ -#define SIGURG 23 /* Urgent condition on socket (4.2 BSD). */ -#define SIGXCPU 24 /* CPU limit exceeded (4.2 BSD). */ -#define SIGXFSZ 25 /* File size limit exceeded (4.2 BSD). */ -#define SIGVTALRM 26 /* Virtual alarm clock (4.2 BSD). */ -#define SIGPROF 27 /* Profiling alarm clock (4.2 BSD). */ -#define SIGWINCH 28 /* Window size change (4.3 BSD, Sun). */ -#define SIGPOLL SIGIO /* Pollable event occurred (System V). */ -#define SIGIO 29 /* I/O now possible (4.2 BSD). */ -#define SIGPWR 30 /* Power failure restart (System V). */ -#define SIGSYS 31 /* Bad system call. */ -#define SIGUNUSED 31 - -#define _NSIG 64 /* Biggest signal number + 1 - (including real-time signals). */ - -#define SIGRTMIN (__libc_current_sigrtmin ()) -#define SIGRTMAX (__libc_current_sigrtmax ()) - -/* These are the hard limits of the kernel. These values should not be - used directly at user level. */ -#define __SIGRTMIN 32 -#define __SIGRTMAX (_NSIG - 1) - -#endif /* <signal.h> included. */ diff --git a/libc/sysdeps/linux/sh/bits/sigset.h b/libc/sysdeps/linux/sh/bits/sigset.h deleted file mode 100644 index 7ccadda45..000000000 --- a/libc/sysdeps/linux/sh/bits/sigset.h +++ /dev/null @@ -1,125 +0,0 @@ -/* __sig_atomic_t, __sigset_t, and related definitions. Linux version. - Copyright (C) 1991, 1992, 1994, 1996, 1997 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 _SIGSET_H_types -# define _SIGSET_H_types 1 - -typedef int __sig_atomic_t; - -/* A `sigset_t' has a bit for each signal. */ - -# define _SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int))) -typedef struct - { - unsigned long int __val[_SIGSET_NWORDS]; - } __sigset_t; - -#endif - - -/* We only want to define these functions if <signal.h> was actually - included; otherwise we were included just to define the types. Since we - are namespace-clean, it wouldn't hurt to define extra macros. But - trouble can be caused by functions being defined (e.g., any global - register vars declared later will cause compilation errors). */ - -#if !defined _SIGSET_H_fns && defined _SIGNAL_H -# define _SIGSET_H_fns 1 - -# ifndef _EXTERN_INLINE -# define _EXTERN_INLINE extern __inline -# endif - -/* Return a mask that includes the bit for SIG only. */ -# define __sigmask(sig) \ - (((unsigned long int) 1) << (((sig) - 1) % (8 * sizeof (unsigned long int)))) - -/* Return the word index for SIG. */ -# define __sigword(sig) (((sig) - 1) / (8 * sizeof (unsigned long int))) - -# if defined __GNUC__ && __GNUC__ >= 2 -# define __sigemptyset(set) \ - (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ - sigset_t *__set = (set); \ - while (--__cnt >= 0) __set->__val[__cnt] = 0; \ - 0; })) -# define __sigfillset(set) \ - (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ - sigset_t *__set = (set); \ - while (--__cnt >= 0) __set->__val[__cnt] = ~0UL; \ - 0; })) - -# ifdef __USE_GNU -/* The POSIX does not specify for handling the whole signal set in one - command. This is often wanted and so we define three more functions - here. */ -# define __sigisemptyset(set) \ - (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ - const sigset_t *__set = (set); \ - int __ret = __set->__val[--__cnt]; \ - while (!__ret && --__cnt >= 0) \ - __ret = __set->__val[__cnt]; \ - __ret == 0; })) -# define __sigandset(dest, left, right) \ - (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ - sigset_t *__dest = (dest); \ - const sigset_t *__left = (left); \ - const sigset_t *__right = (right); \ - while (--__cnt >= 0) \ - __dest->__val[__cnt] = (__left->__val[__cnt] \ - & __right->__val[__cnt]); \ - 0; })) -# define __sigorset(dest, left, right) \ - (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ - sigset_t *__dest = (dest); \ - const sigset_t *__left = (left); \ - const sigset_t *__right = (right); \ - while (--__cnt >= 0) \ - __dest->__val[__cnt] = (__left->__val[__cnt] \ - | __right->__val[__cnt]); \ - 0; })) -# endif -# endif - -/* These functions needn't check for a bogus signal number -- error - checking is done in the non __ versions. */ - -extern int __sigismember (__const __sigset_t *, int); -extern int __sigaddset (__sigset_t *, int); -extern int __sigdelset (__sigset_t *, int); - -# ifdef __USE_EXTERN_INLINES -# define __SIGSETFN(NAME, BODY, CONST) \ - _EXTERN_INLINE int \ - NAME (CONST __sigset_t *__set, int __sig) \ - { \ - unsigned long int __mask = __sigmask (__sig); \ - unsigned long int __word = __sigword (__sig); \ - return BODY; \ - } - -__SIGSETFN (__sigismember, (__set->__val[__word] & __mask) ? 1 : 0, __const) -__SIGSETFN (__sigaddset, ((__set->__val[__word] |= __mask), 0), ) -__SIGSETFN (__sigdelset, ((__set->__val[__word] &= ~__mask), 0), ) - -# undef __SIGSETFN -# endif - - -#endif /* ! _SIGSET_H_fns. */ diff --git a/libc/sysdeps/linux/sh/bits/sigstack.h b/libc/sysdeps/linux/sh/bits/sigstack.h deleted file mode 100644 index 7f260367b..000000000 --- a/libc/sysdeps/linux/sh/bits/sigstack.h +++ /dev/null @@ -1,55 +0,0 @@ -/* sigstack, sigaltstack definitions. - Copyright (C) 1998, 1999 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 _SIGNAL_H -# error "Never include this file directly. Use <signal.h> instead" -#endif - - -/* Structure describing a signal stack (obsolete). */ -struct sigstack - { - void *ss_sp; /* Signal stack pointer. */ - int ss_onstack; /* Nonzero if executing on this stack. */ - }; - - -/* Possible values for `ss_flags.'. */ -enum -{ - SS_ONSTACK = 1, -#define SS_ONSTACK SS_ONSTACK - SS_DISABLE -#define SS_DISABLE SS_DISABLE -}; - -/* Minimum stack size for a signal handler. */ -#define MINSIGSTKSZ 2048 - -/* System default stack size. */ -#define SIGSTKSZ 8192 - - -/* Alternate, preferred interface. */ -typedef struct sigaltstack - { - void *ss_sp; - int ss_flags; - size_t ss_size; - } stack_t; diff --git a/libc/sysdeps/linux/sh/bits/sigthread.h b/libc/sysdeps/linux/sh/bits/sigthread.h deleted file mode 100644 index b86e75f20..000000000 --- a/libc/sysdeps/linux/sh/bits/sigthread.h +++ /dev/null @@ -1,38 +0,0 @@ -/* Signal handling function for threaded programs. - Copyright (C) 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _BITS_SIGTHREAD_H -#define _BITS_SIGTHREAD_H 1 - -#if !defined _SIGNAL_H && !defined _PTHREAD_H -# error "Never include this file directly. Use <pthread.h> instead" -#endif - -/* Functions for handling signals. */ - -/* Modify the signal mask for the calling thread. The arguments have - the same meaning as for sigprocmask(2). */ -extern int pthread_sigmask (int __how, - __const __sigset_t *__restrict __newmask, - __sigset_t *__restrict __oldmask)__THROW; - -/* Send signal SIGNO to the given thread. */ -extern int pthread_kill (pthread_t __thread, int __signo) __THROW; - -#endif /* bits/sigthread.h */ diff --git a/libc/sysdeps/linux/sh/bits/sockaddr.h b/libc/sysdeps/linux/sh/bits/sockaddr.h deleted file mode 100644 index 3e1d1312d..000000000 --- a/libc/sysdeps/linux/sh/bits/sockaddr.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Definition of `struct sockaddr_*' common members. Generic/4.2 BSD version. - Copyright (C) 1995,1996,1997,1998,2000,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. */ - -/* - * Never include this file directly; use <sys/socket.h> instead. - */ - -#ifndef _BITS_SOCKADDR_H -#define _BITS_SOCKADDR_H 1 - - -/* POSIX.1g specifies this type name for the `sa_family' member. */ -typedef unsigned short int sa_family_t; - -/* This macro is used to declare the initial common members - of the data types used for socket addresses, `struct sockaddr', - `struct sockaddr_in', `struct sockaddr_un', etc. */ - -#define __SOCKADDR_COMMON(sa_prefix) \ - sa_family_t sa_prefix##family - -#define __SOCKADDR_COMMON_SIZE (sizeof (unsigned short int)) - -#endif /* bits/sockaddr.h */ diff --git a/libc/sysdeps/linux/sh/bits/socket.h b/libc/sysdeps/linux/sh/bits/socket.h deleted file mode 100644 index 6ad4a5ed9..000000000 --- a/libc/sysdeps/linux/sh/bits/socket.h +++ /dev/null @@ -1,314 +0,0 @@ -/* System-specific socket constants and types. Linux version. - Copyright (C) 1991,1992,1994-1999,2000,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. */ - -#ifndef __BITS_SOCKET_H -#define __BITS_SOCKET_H - -#if !defined _SYS_SOCKET_H && !defined _NETINET_IN_H -# error "Never include <bits/socket.h> directly; use <sys/socket.h> instead." -#endif - -#define __need_size_t -#define __need_NULL -#include <stddef.h> - -#include <limits.h> -#include <sys/types.h> - -/* Type for length arguments in socket calls. */ -#ifndef __socklen_t_defined -typedef __socklen_t socklen_t; -# define __socklen_t_defined -#endif - -/* Types of sockets. */ -enum __socket_type -{ - SOCK_STREAM = 1, /* Sequenced, reliable, connection-based - byte streams. */ -#define SOCK_STREAM SOCK_STREAM - SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams - of fixed maximum length. */ -#define SOCK_DGRAM SOCK_DGRAM - SOCK_RAW = 3, /* Raw protocol interface. */ -#define SOCK_RAW SOCK_RAW - SOCK_RDM = 4, /* Reliably-delivered messages. */ -#define SOCK_RDM SOCK_RDM - SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, - datagrams of fixed maximum length. */ -#define SOCK_SEQPACKET SOCK_SEQPACKET - SOCK_PACKET = 10 /* Linux specific way of getting packets - at the dev level. For writing rarp and - other similar things on the user level. */ -#define SOCK_PACKET SOCK_PACKET -}; - -/* Protocol families. */ -#define PF_UNSPEC 0 /* Unspecified. */ -#define PF_LOCAL 1 /* Local to host (pipes and file-domain). */ -#define PF_UNIX PF_LOCAL /* Old BSD name for PF_LOCAL. */ -#define PF_FILE PF_LOCAL /* Another non-standard name for PF_LOCAL. */ -#define PF_INET 2 /* IP protocol family. */ -#define PF_AX25 3 /* Amateur Radio AX.25. */ -#define PF_IPX 4 /* Novell Internet Protocol. */ -#define PF_APPLETALK 5 /* Appletalk DDP. */ -#define PF_NETROM 6 /* Amateur radio NetROM. */ -#define PF_BRIDGE 7 /* Multiprotocol bridge. */ -#define PF_ATMPVC 8 /* ATM PVCs. */ -#define PF_X25 9 /* Reserved for X.25 project. */ -#define PF_INET6 10 /* IP version 6. */ -#define PF_ROSE 11 /* Amateur Radio X.25 PLP. */ -#define PF_DECnet 12 /* Reserved for DECnet project. */ -#define PF_NETBEUI 13 /* Reserved for 802.2LLC project. */ -#define PF_SECURITY 14 /* Security callback pseudo AF. */ -#define PF_KEY 15 /* PF_KEY key management API. */ -#define PF_NETLINK 16 -#define PF_ROUTE PF_NETLINK /* Alias to emulate 4.4BSD. */ -#define PF_PACKET 17 /* Packet family. */ -#define PF_ASH 18 /* Ash. */ -#define PF_ECONET 19 /* Acorn Econet. */ -#define PF_ATMSVC 20 /* ATM SVCs. */ -#define PF_SNA 22 /* Linux SNA Project */ -#define PF_IRDA 23 /* IRDA sockets. */ -#define PF_PPPOX 24 /* PPPoX sockets. */ -#define PF_WANPIPE 25 /* Wanpipe API sockets. */ -#define PF_BLUETOOTH 31 /* Bluetooth sockets. */ -#define PF_MAX 32 /* For now.. */ - -/* Address families. */ -#define AF_UNSPEC PF_UNSPEC -#define AF_LOCAL PF_LOCAL -#define AF_UNIX PF_UNIX -#define AF_FILE PF_FILE -#define AF_INET PF_INET -#define AF_AX25 PF_AX25 -#define AF_IPX PF_IPX -#define AF_APPLETALK PF_APPLETALK -#define AF_NETROM PF_NETROM -#define AF_BRIDGE PF_BRIDGE -#define AF_ATMPVC PF_ATMPVC -#define AF_X25 PF_X25 -#define AF_INET6 PF_INET6 -#define AF_ROSE PF_ROSE -#define AF_DECnet PF_DECnet -#define AF_NETBEUI PF_NETBEUI -#define AF_SECURITY PF_SECURITY -#define AF_KEY PF_KEY -#define AF_NETLINK PF_NETLINK -#define AF_ROUTE PF_ROUTE -#define AF_PACKET PF_PACKET -#define AF_ASH PF_ASH -#define AF_ECONET PF_ECONET -#define AF_ATMSVC PF_ATMSVC -#define AF_SNA PF_SNA -#define AF_IRDA PF_IRDA -#define AF_PPPOX PF_PPPOX -#define AF_WANPIPE PF_WANPIPE -#define AF_BLUETOOTH PF_BLUETOOTH -#define AF_MAX PF_MAX - -/* Socket level values. Others are defined in the appropriate headers. - - XXX These definitions also should go into the appropriate headers as - far as they are available. */ -#define SOL_RAW 255 -#define SOL_DECNET 261 -#define SOL_X25 262 -#define SOL_PACKET 263 -#define SOL_ATM 264 /* ATM layer (cell level). */ -#define SOL_AAL 265 /* ATM Adaption Layer (packet level). */ -#define SOL_IRDA 266 - -/* Maximum queue length specifiable by listen. */ -#define SOMAXCONN 128 - -/* Get the definition of the macro to define the common sockaddr members. */ -#include <bits/sockaddr.h> - -/* Structure describing a generic socket address. */ -struct sockaddr - { - __SOCKADDR_COMMON (sa_); /* Common data: address family and length. */ - char sa_data[14]; /* Address data. */ - }; - - -/* Structure large enough to hold any socket address (with the historical - exception of AF_UNIX). We reserve 128 bytes. */ -#if ULONG_MAX > 0xffffffff -# define __ss_aligntype __uint64_t -#else -# define __ss_aligntype __uint32_t -#endif -#define _SS_SIZE 128 -#define _SS_PADSIZE (_SS_SIZE - (2 * sizeof (__ss_aligntype))) - -struct sockaddr_storage - { - __SOCKADDR_COMMON (ss_); /* Address family, etc. */ - __ss_aligntype __ss_align; /* Force desired alignment. */ - char __ss_padding[_SS_PADSIZE]; - }; - - -/* Bits in the FLAGS argument to `send', `recv', et al. */ -enum - { - MSG_OOB = 0x01, /* Process out-of-band data. */ -#define MSG_OOB MSG_OOB - MSG_PEEK = 0x02, /* Peek at incoming messages. */ -#define MSG_PEEK MSG_PEEK - MSG_DONTROUTE = 0x04, /* Don't use local routing. */ -#define MSG_DONTROUTE MSG_DONTROUTE -#ifdef __USE_GNU - /* DECnet uses a different name. */ - MSG_TRYHARD = MSG_DONTROUTE, -# define MSG_TRYHARD MSG_DONTROUTE -#endif - MSG_CTRUNC = 0x08, /* Control data lost before delivery. */ -#define MSG_CTRUNC MSG_CTRUNC - MSG_PROXY = 0x10, /* Supply or ask second address. */ -#define MSG_PROXY MSG_PROXY - MSG_TRUNC = 0x20, -#define MSG_TRUNC MSG_TRUNC - MSG_DONTWAIT = 0x40, /* Nonblocking IO. */ -#define MSG_DONTWAIT MSG_DONTWAIT - MSG_EOR = 0x80, /* End of record. */ -#define MSG_EOR MSG_EOR - MSG_WAITALL = 0x100, /* Wait for a full request. */ -#define MSG_WAITALL MSG_WAITALL - MSG_FIN = 0x200, -#define MSG_FIN MSG_FIN - MSG_SYN = 0x400, -#define MSG_SYN MSG_SYN - MSG_CONFIRM = 0x800, /* Confirm path validity. */ -#define MSG_CONFIRM MSG_CONFIRM - MSG_RST = 0x1000, -#define MSG_RST MSG_RST - MSG_ERRQUEUE = 0x2000, /* Fetch message from error queue. */ -#define MSG_ERRQUEUE MSG_ERRQUEUE - MSG_NOSIGNAL = 0x4000, /* Do not generate SIGPIPE. */ -#define MSG_NOSIGNAL MSG_NOSIGNAL - MSG_MORE = 0x8000 /* Sender will send more. */ -#define MSG_MORE MSG_MORE - }; - - -/* Structure describing messages sent by - `sendmsg' and received by `recvmsg'. */ -struct msghdr - { - void *msg_name; /* Address to send to/receive from. */ - socklen_t msg_namelen; /* Length of address data. */ - - struct iovec *msg_iov; /* Vector of data to send/receive into. */ - int msg_iovlen; /* Number of elements in the vector. */ - - void *msg_control; /* Ancillary data (eg BSD filedesc passing). */ - socklen_t msg_controllen; /* Ancillary data buffer length. */ - - int msg_flags; /* Flags on received message. */ - }; - -/* Structure used for storage of ancillary data object information. */ -struct cmsghdr - { - size_t cmsg_len; /* Length of data in cmsg_data plus length - of cmsghdr structure. */ - int cmsg_level; /* Originating protocol. */ - int cmsg_type; /* Protocol specific type. */ - __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */ - /* XXX Perhaps this should be removed. */ - }; - -/* Ancillary data object manipulation macros. */ -#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2 -# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data) -#else -# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1)) -#endif -#define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg) -#define CMSG_FIRSTHDR(mhdr) \ - ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \ - ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL) -#define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \ - & (size_t) ~(sizeof (size_t) - 1)) -#define CMSG_SPACE(len) (CMSG_ALIGN (len) \ - + CMSG_ALIGN (sizeof (struct cmsghdr))) -#define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len)) - -extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr, - struct cmsghdr *__cmsg) __THROW; -#ifdef __USE_EXTERN_INLINES -# ifndef _EXTERN_INLINE -# define _EXTERN_INLINE extern __inline -# endif -_EXTERN_INLINE struct cmsghdr * -__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW -{ - if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr)) - /* The kernel header does this so there may be a reason. */ - return 0; - - __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg - + CMSG_ALIGN (__cmsg->cmsg_len)); - if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control - + __mhdr->msg_controllen) - || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len) - > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen))) - /* No more entries. */ - return 0; - return __cmsg; -} -#endif /* Use `extern inline'. */ - -/* Socket level message types. This must match the definitions in - <linux/socket.h>. */ -enum - { - SCM_RIGHTS = 0x01, /* Transfer file descriptors. */ -#define SCM_RIGHTS SCM_RIGHTS -#ifdef __USE_BSD - SCM_CREDENTIALS = 0x02, /* Credentials passing. */ -# define SCM_CREDENTIALS SCM_CREDENTIALS -#endif - __SCM_CONNECT = 0x03 /* Data array is `struct scm_connect'. */ - }; - -/* User visible structure for SCM_CREDENTIALS message */ - -struct ucred -{ - pid_t pid; /* PID of sending process. */ - uid_t uid; /* UID of sending process. */ - gid_t gid; /* GID of sending process. */ -}; - -/* Get socket manipulation related informations from kernel headers. */ -#include <asm/socket.h> - - -/* Structure used to manipulate the SO_LINGER option. */ -struct linger - { - int l_onoff; /* Nonzero to linger on close. */ - int l_linger; /* Time to linger. */ - }; - -#endif /* bits/socket.h */ diff --git a/libc/sysdeps/linux/sh/bits/stab.def b/libc/sysdeps/linux/sh/bits/stab.def deleted file mode 100644 index 3d54774cf..000000000 --- a/libc/sysdeps/linux/sh/bits/stab.def +++ /dev/null @@ -1,234 +0,0 @@ -/* Table of DBX symbol codes for the GNU system. - Copyright (C) 1988, 1997 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. */ - -/* This contains contribution from Cygnus Support. */ - -/* Global variable. Only the name is significant. - To find the address, look in the corresponding external symbol. */ -__define_stab (N_GSYM, 0x20, "GSYM") - -/* Function name for BSD Fortran. Only the name is significant. - To find the address, look in the corresponding external symbol. */ -__define_stab (N_FNAME, 0x22, "FNAME") - -/* Function name or text-segment variable for C. Value is its address. - Desc is supposedly starting line number, but GCC doesn't set it - and DBX seems not to miss it. */ -__define_stab (N_FUN, 0x24, "FUN") - -/* Data-segment variable with internal linkage. Value is its address. - "Static Sym". */ -__define_stab (N_STSYM, 0x26, "STSYM") - -/* BSS-segment variable with internal linkage. Value is its address. */ -__define_stab (N_LCSYM, 0x28, "LCSYM") - -/* Name of main routine. Only the name is significant. - This is not used in C. */ -__define_stab (N_MAIN, 0x2a, "MAIN") - -/* Global symbol in Pascal. - Supposedly the value is its line number; I'm skeptical. */ -__define_stab (N_PC, 0x30, "PC") - -/* Number of symbols: 0, files,,funcs,lines according to Ultrix V4.0. */ -__define_stab (N_NSYMS, 0x32, "NSYMS") - -/* "No DST map for sym: name, ,0,type,ignored" according to Ultrix V4.0. */ -__define_stab (N_NOMAP, 0x34, "NOMAP") - -/* New stab from Solaris. I don't know what it means, but it - don't seem to contain useful information. */ -__define_stab (N_OBJ, 0x38, "OBJ") - -/* New stab from Solaris. I don't know what it means, but it - don't seem to contain useful information. Possibly related to the - optimization flags used in this module. */ -__define_stab (N_OPT, 0x3c, "OPT") - -/* Register variable. Value is number of register. */ -__define_stab (N_RSYM, 0x40, "RSYM") - -/* Modula-2 compilation unit. Can someone say what info it contains? */ -__define_stab (N_M2C, 0x42, "M2C") - -/* Line number in text segment. Desc is the line number; - value is corresponding address. */ -__define_stab (N_SLINE, 0x44, "SLINE") - -/* Similar, for data segment. */ -__define_stab (N_DSLINE, 0x46, "DSLINE") - -/* Similar, for bss segment. */ -__define_stab (N_BSLINE, 0x48, "BSLINE") - -/* Sun's source-code browser stabs. ?? Don't know what the fields are. - Supposedly the field is "path to associated .cb file". THIS VALUE - OVERLAPS WITH N_BSLINE! */ -__define_stab (N_BROWS, 0x48, "BROWS") - -/* GNU Modula-2 definition module dependency. Value is the modification time - of the definition file. Other is non-zero if it is imported with the - GNU M2 keyword %INITIALIZE. Perhaps N_M2C can be used if there - are enough empty fields? */ -__define_stab(N_DEFD, 0x4a, "DEFD") - -/* THE FOLLOWING TWO STAB VALUES CONFLICT. Happily, one is for Modula-2 - and one is for C++. Still,... */ -/* GNU C++ exception variable. Name is variable name. */ -__define_stab (N_EHDECL, 0x50, "EHDECL") -/* Modula2 info "for imc": name,,0,0,0 according to Ultrix V4.0. */ -__define_stab (N_MOD2, 0x50, "MOD2") - -/* GNU C++ `catch' clause. Value is its address. Desc is nonzero if - this entry is immediately followed by a CAUGHT stab saying what exception - was caught. Multiple CAUGHT stabs means that multiple exceptions - can be caught here. If Desc is 0, it means all exceptions are caught - here. */ -__define_stab (N_CATCH, 0x54, "CATCH") - -/* Structure or union element. Value is offset in the structure. */ -__define_stab (N_SSYM, 0x60, "SSYM") - -/* Name of main source file. - Value is starting text address of the compilation. */ -__define_stab (N_SO, 0x64, "SO") - -/* Automatic variable in the stack. Value is offset from frame pointer. - Also used for type descriptions. */ -__define_stab (N_LSYM, 0x80, "LSYM") - -/* Beginning of an include file. Only Sun uses this. - In an object file, only the name is significant. - The Sun linker puts data into some of the other fields. */ -__define_stab (N_BINCL, 0x82, "BINCL") - -/* Name of sub-source file (#include file). - Value is starting text address of the compilation. */ -__define_stab (N_SOL, 0x84, "SOL") - -/* Parameter variable. Value is offset from argument pointer. - (On most machines the argument pointer is the same as the frame pointer. */ -__define_stab (N_PSYM, 0xa0, "PSYM") - -/* End of an include file. No name. - This and N_BINCL act as brackets around the file's output. - In an object file, there is no significant data in this entry. - The Sun linker puts data into some of the fields. */ -__define_stab (N_EINCL, 0xa2, "EINCL") - -/* Alternate entry point. Value is its address. */ -__define_stab (N_ENTRY, 0xa4, "ENTRY") - -/* Beginning of lexical block. - The desc is the nesting level in lexical blocks. - The value is the address of the start of the text for the block. - The variables declared inside the block *precede* the N_LBRAC symbol. */ -__define_stab (N_LBRAC, 0xc0, "LBRAC") - -/* Place holder for deleted include file. Replaces a N_BINCL and everything - up to the corresponding N_EINCL. The Sun linker generates these when - it finds multiple identical copies of the symbols from an include file. - This appears only in output from the Sun linker. */ -__define_stab (N_EXCL, 0xc2, "EXCL") - -/* Modula-2 scope information. Can someone say what info it contains? */ -__define_stab (N_SCOPE, 0xc4, "SCOPE") - -/* End of a lexical block. Desc matches the N_LBRAC's desc. - The value is the address of the end of the text for the block. */ -__define_stab (N_RBRAC, 0xe0, "RBRAC") - -/* Begin named common block. Only the name is significant. */ -__define_stab (N_BCOMM, 0xe2, "BCOMM") - -/* End named common block. Only the name is significant - (and it should match the N_BCOMM). */ -__define_stab (N_ECOMM, 0xe4, "ECOMM") - -/* End common (local name): value is address. - I'm not sure how this is used. */ -__define_stab (N_ECOML, 0xe8, "ECOML") - -/* These STAB's are used on Gould systems for Non-Base register symbols - or something like that. FIXME. I have assigned the values at random - since I don't have a Gould here. Fixups from Gould folk welcome... */ -__define_stab (N_NBTEXT, 0xF0, "NBTEXT") -__define_stab (N_NBDATA, 0xF2, "NBDATA") -__define_stab (N_NBBSS, 0xF4, "NBBSS") -__define_stab (N_NBSTS, 0xF6, "NBSTS") -__define_stab (N_NBLCS, 0xF8, "NBLCS") - -/* Second symbol entry containing a length-value for the preceding entry. - The value is the length. */ -__define_stab (N_LENG, 0xfe, "LENG") - -/* The above information, in matrix format. - - STAB MATRIX - _________________________________________________ - | 00 - 1F are not dbx stab symbols | - | In most cases, the low bit is the EXTernal bit| - - | 00 UNDEF | 02 ABS | 04 TEXT | 06 DATA | - | 01 |EXT | 03 |EXT | 05 |EXT | 07 |EXT | - - | 08 BSS | 0A INDR | 0C FN_SEQ | 0E | - | 09 |EXT | 0B | 0D | 0F | - - | 10 | 12 COMM | 14 SETA | 16 SETT | - | 11 | 13 | 15 | 17 | - - | 18 SETD | 1A SETB | 1C SETV | 1E WARNING| - | 19 | 1B | 1D | 1F FN | - - |_______________________________________________| - | Debug entries with bit 01 set are unused. | - | 20 GSYM | 22 FNAME | 24 FUN | 26 STSYM | - | 28 LCSYM | 2A MAIN | 2C | 2E | - | 30 PC | 32 NSYMS | 34 NOMAP | 36 | - | 38 OBJ | 3A | 3C OPT | 3E | - | 40 RSYM | 42 M2C | 44 SLINE | 46 DSLINE | - | 48 BSLINE*| 4A DEFD | 4C | 4E | - | 50 EHDECL*| 52 | 54 CATCH | 56 | - | 58 | 5A | 5C | 5E | - | 60 SSYM | 62 | 64 SO | 66 | - | 68 | 6A | 6C | 6E | - | 70 | 72 | 74 | 76 | - | 78 | 7A | 7C | 7E | - | 80 LSYM | 82 BINCL | 84 SOL | 86 | - | 88 | 8A | 8C | 8E | - | 90 | 92 | 94 | 96 | - | 98 | 9A | 9C | 9E | - | A0 PSYM | A2 EINCL | A4 ENTRY | A6 | - | A8 | AA | AC | AE | - | B0 | B2 | B4 | B6 | - | B8 | BA | BC | BE | - | C0 LBRAC | C2 EXCL | C4 SCOPE | C6 | - | C8 | CA | CC | CE | - | D0 | D2 | D4 | D6 | - | D8 | DA | DC | DE | - | E0 RBRAC | E2 BCOMM | E4 ECOMM | E6 | - | E8 ECOML | EA | EC | EE | - | F0 | F2 | F4 | F6 | - | F8 | FA | FC | FE LENG | - +-----------------------------------------------+ - * 50 EHDECL is also MOD2. - * 48 BSLINE is also BROWS. - */ diff --git a/libc/sysdeps/linux/sh/bits/stat.h b/libc/sysdeps/linux/sh/bits/stat.h deleted file mode 100644 index f446a91db..000000000 --- a/libc/sysdeps/linux/sh/bits/stat.h +++ /dev/null @@ -1,134 +0,0 @@ -/* Copyright (C) 1992,95,96,97,98,99,2000,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. */ - -#ifndef _SYS_STAT_H -# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead." -#endif - -/* Versions of the `struct stat' data structure. */ -#define _STAT_VER_LINUX_OLD 1 -#define _STAT_VER_KERNEL 1 -#define _STAT_VER_SVR4 2 -#define _STAT_VER_LINUX 3 -#define _STAT_VER _STAT_VER_LINUX /* The one defined below. */ - -/* Versions of the `xmknod' interface. */ -#define _MKNOD_VER_LINUX 1 -#define _MKNOD_VER_SVR4 2 -#define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */ - - -struct stat - { - __dev_t st_dev; /* Device. */ - unsigned short int __pad1; -#ifndef __USE_FILE_OFFSET64 - __ino_t st_ino; /* File serial number. */ -#else - __ino_t __st_ino; /* 32bit file serial number. */ -#endif - __mode_t st_mode; /* File mode. */ - __nlink_t st_nlink; /* Link count. */ - __uid_t st_uid; /* User ID of the file's owner. */ - __gid_t st_gid; /* Group ID of the file's group.*/ - __dev_t st_rdev; /* Device number, if device. */ - unsigned short int __pad2; -#ifndef __USE_FILE_OFFSET64 - __off_t st_size; /* Size of file, in bytes. */ -#else - __off64_t st_size; /* Size of file, in bytes. */ -#endif - __blksize_t st_blksize; /* Optimal block size for I/O. */ - -#ifndef __USE_FILE_OFFSET64 - __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ -#else - __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ -#endif - __time_t st_atime; /* Time of last access. */ - unsigned long int __unused1; - __time_t st_mtime; /* Time of last modification. */ - unsigned long int __unused2; - __time_t st_ctime; /* Time of last status change. */ - unsigned long int __unused3; -#ifndef __USE_FILE_OFFSET64 - unsigned long int __unused4; - unsigned long int __unused5; -#else - __ino64_t st_ino; /* File serial number. */ -#endif - }; - -#ifdef __USE_LARGEFILE64 -struct stat64 - { - __dev_t st_dev; /* Device. */ - unsigned int __pad1; - - __ino_t __st_ino; /* 32bit file serial number. */ - __mode_t st_mode; /* File mode. */ - __nlink_t st_nlink; /* Link count. */ - __uid_t st_uid; /* User ID of the file's owner. */ - __gid_t st_gid; /* Group ID of the file's group.*/ - __dev_t st_rdev; /* Device number, if device. */ - unsigned int __pad2; - __off64_t st_size; /* Size of file, in bytes. */ - __blksize_t st_blksize; /* Optimal block size for I/O. */ - - __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ - __time_t st_atime; /* Time of last access. */ - unsigned long int __unused1; - __time_t st_mtime; /* Time of last modification. */ - unsigned long int __unused2; - __time_t st_ctime; /* Time of last status change. */ - unsigned long int __unused3; - __ino64_t st_ino; /* File serial number. */ - }; -#endif - -/* Tell code we have these members. */ -#define _STATBUF_ST_BLKSIZE -#define _STATBUF_ST_RDEV - -/* Encoding of the file mode. */ - -#define __S_IFMT 0170000 /* These bits determine file type. */ - -/* File types. */ -#define __S_IFDIR 0040000 /* Directory. */ -#define __S_IFCHR 0020000 /* Character device. */ -#define __S_IFBLK 0060000 /* Block device. */ -#define __S_IFREG 0100000 /* Regular file. */ -#define __S_IFIFO 0010000 /* FIFO. */ -#define __S_IFLNK 0120000 /* Symbolic link. */ -#define __S_IFSOCK 0140000 /* Socket. */ - -/* POSIX.1b objects. Note that these macros always evaluate to zero. But - they do it by enforcing the correct use of the macros. */ -#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode) -#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode) -#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode) - -/* Protection bits. */ - -#define __S_ISUID 04000 /* Set user ID on execution. */ -#define __S_ISGID 02000 /* Set group ID on execution. */ -#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ -#define __S_IREAD 0400 /* Read by owner. */ -#define __S_IWRITE 0200 /* Write by owner. */ -#define __S_IEXEC 0100 /* Execute by owner. */ diff --git a/libc/sysdeps/linux/sh/bits/statfs.h b/libc/sysdeps/linux/sh/bits/statfs.h deleted file mode 100644 index 78c9bdbbc..000000000 --- a/libc/sysdeps/linux/sh/bits/statfs.h +++ /dev/null @@ -1,64 +0,0 @@ -/* Copyright (C) 1997, 1998, 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 _SYS_STATFS_H -# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead." -#endif - -#include <bits/types.h> /* for __fsid_t and __fsblkcnt_t*/ - -struct statfs - { - int f_type; - int f_bsize; -#ifndef __USE_FILE_OFFSET64 - __fsblkcnt_t f_blocks; - __fsblkcnt_t f_bfree; - __fsblkcnt_t f_bavail; - __fsfilcnt_t f_files; - __fsfilcnt_t f_ffree; -#else - __fsblkcnt64_t f_blocks; - __fsblkcnt64_t f_bfree; - __fsblkcnt64_t f_bavail; - __fsfilcnt64_t f_files; - __fsfilcnt64_t f_ffree; -#endif - __fsid_t f_fsid; - int f_namelen; - int f_spare[6]; - }; - -#ifdef __USE_LARGEFILE64 -struct statfs64 - { - int f_type; - int f_bsize; - __fsblkcnt64_t f_blocks; - __fsblkcnt64_t f_bfree; - __fsblkcnt64_t f_bavail; - __fsfilcnt64_t f_files; - __fsfilcnt64_t f_ffree; - __fsid_t f_fsid; - int f_namelen; - int f_spare[6]; - }; -#endif - -/* Tell code we have this member. */ -#define _STATFS_F_NAMELEN diff --git a/libc/sysdeps/linux/sh/bits/statvfs.h b/libc/sysdeps/linux/sh/bits/statvfs.h deleted file mode 100644 index 32e03f31e..000000000 --- a/libc/sysdeps/linux/sh/bits/statvfs.h +++ /dev/null @@ -1,99 +0,0 @@ -/* Copyright (C) 1997, 1998, 2000, 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. */ - -#ifndef _SYS_STATVFS_H -# error "Never include <bits/statvfs.h> directly; use <sys/statvfs.h> instead." -#endif - -#include <bits/types.h> /* For __fsblkcnt_t and __fsfilcnt_t. */ - -struct statvfs - { - unsigned long int f_bsize; - unsigned long int f_frsize; -#ifndef __USE_FILE_OFFSET64 - __fsblkcnt_t f_blocks; - __fsblkcnt_t f_bfree; - __fsblkcnt_t f_bavail; - __fsfilcnt_t f_files; - __fsfilcnt_t f_ffree; - __fsfilcnt_t f_favail; -#else - __fsblkcnt64_t f_blocks; - __fsblkcnt64_t f_bfree; - __fsblkcnt64_t f_bavail; - __fsfilcnt64_t f_files; - __fsfilcnt64_t f_ffree; - __fsfilcnt64_t f_favail; -#endif - unsigned long int f_fsid; - int __f_unused; - unsigned long int f_flag; - unsigned long int f_namemax; - int __f_spare[6]; - }; -#define _STATVFSBUF_F_UNUSED - -#ifdef __USE_LARGEFILE64 -struct statvfs64 - { - unsigned long int f_bsize; - unsigned long int f_frsize; - __fsblkcnt64_t f_blocks; - __fsblkcnt64_t f_bfree; - __fsblkcnt64_t f_bavail; - __fsfilcnt64_t f_files; - __fsfilcnt64_t f_ffree; - __fsfilcnt64_t f_favail; - unsigned long int f_fsid; - int __f_unused; - unsigned long int f_flag; - unsigned long int f_namemax; - int __f_spare[6]; - }; -#endif - -/* Definitions for the flag in `f_flag'. These definitions should be - kept in sync which the definitions in <sys/mount.h>. */ -enum -{ - ST_RDONLY = 1, /* Mount read-only. */ -#define ST_RDONLY ST_RDONLY - ST_NOSUID = 2, /* Ignore suid and sgid bits. */ -#define ST_NOSUID ST_NOSUID -#ifdef __USE_GNU - ST_NODEV = 4, /* Disallow access to device special files. */ -# define ST_NODEV ST_NODEV - ST_NOEXEC = 8, /* Disallow program execution. */ -# define ST_NOEXEC ST_NOEXEC - ST_SYNCHRONOUS = 16, /* Writes are synced at once. */ -# define ST_SYNCHRONOUS ST_SYNCHRONOUS - ST_MANDLOCK = 64, /* Allow mandatory locks on an FS. */ -# define ST_MANDLOCK ST_MANDLOCK - ST_WRITE = 128, /* Write on file/directory/symlink. */ -# define ST_WRITE ST_WRITE - ST_APPEND = 256, /* Append-only file. */ -# define ST_APPEND ST_APPEND - ST_IMMUTABLE = 512, /* Immutable file. */ -# define ST_IMMUTABLE ST_IMMUTABLE - ST_NOATIME = 1024, /* Do not update access times. */ -# define ST_NOATIME ST_NOATIME - ST_NODIRATIME /* Do not update directory access times. */ -# define ST_NODIRATIME ST_NODIRATIME -#endif /* Use GNU. */ -}; diff --git a/libc/sysdeps/linux/sh/bits/stdio-lock.h b/libc/sysdeps/linux/sh/bits/stdio-lock.h deleted file mode 100644 index a1893c8bd..000000000 --- a/libc/sysdeps/linux/sh/bits/stdio-lock.h +++ /dev/null @@ -1,50 +0,0 @@ -/* Thread package specific definitions of stream lock type. - Copyright (C) 1996, 1997, 1998, 2000, 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include <pthread.h> - -typedef pthread_mutex_t _IO_lock_t; - -/* We need recursive (counting) mutexes. */ -#define _IO_lock_initializer PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP - - -#define _IO_cleanup_region_start(_fct, _fp) \ - { struct _pthread_cleanup_buffer _buffer; \ - int _avail = (((_fp)->_flags & _IO_USER_LOCK) == 0 \ - && _pthread_cleanup_push_defer != NULL); \ - if (_avail) { \ - _pthread_cleanup_push_defer (&_buffer, (_fct), (_fp)); \ - } -#define _IO_cleanup_region_start_noarg(_fct) \ - { struct _pthread_cleanup_buffer _buffer; \ - int _avail = _pthread_cleanup_push_defer != NULL; \ - if (_avail) { \ - _pthread_cleanup_push_defer (&_buffer, (_fct), NULL); \ - } -#define _IO_cleanup_region_end(_doit) \ - __libc_cleanup_region_end (_doit) -#define _IO_lock_init(_name) \ - __libc_lock_init_recursive (_name) -#define _IO_lock_fini(_name) \ - __libc_lock_fini_recursive (_name) -#define _IO_lock_lock(_name) \ - __libc_lock_lock (_name) -#define _IO_lock_unlock(_name) \ - __libc_lock_unlock (_name) diff --git a/libc/sysdeps/linux/sh/bits/stdio.h b/libc/sysdeps/linux/sh/bits/stdio.h deleted file mode 100644 index 118118adc..000000000 --- a/libc/sysdeps/linux/sh/bits/stdio.h +++ /dev/null @@ -1,169 +0,0 @@ -/* Optimizing macros and inline functions for stdio functions. - Copyright (C) 1998, 2000, 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. */ - -#ifndef _STDIO_H -# error "Never include <bits/stdio.h> directly; use <stdio.h> instead." -#endif - -#ifdef __cplusplus -# define __STDIO_INLINE inline -#else -# define __STDIO_INLINE extern __inline -#endif - - -#ifdef __USE_EXTERN_INLINES -/* Write formatted output to stdout from argument list ARG. */ -__STDIO_INLINE int -vprintf (__const char *__restrict __fmt, _G_va_list __arg) __THROW -{ - return vfprintf (stdout, __fmt, __arg); -} - -/* Read a character from stdin. */ -__STDIO_INLINE int -getchar (void) __THROW -{ - return _IO_getc (stdin); -} - - -# if defined __USE_POSIX || defined __USE_MISC -/* This is defined in POSIX.1:1996. */ -__STDIO_INLINE int -getc_unlocked (FILE *__fp) __THROW -{ - return _IO_getc_unlocked (__fp); -} - -/* This is defined in POSIX.1:1996. */ -__STDIO_INLINE int -getchar_unlocked (void) __THROW -{ - return _IO_getc_unlocked (stdin); -} -# endif /* POSIX || misc */ - - -/* Write a character to stdout. */ -__STDIO_INLINE int -putchar (int __c) __THROW -{ - return _IO_putc (__c, stdout); -} - - -# ifdef __USE_MISC -/* Faster version when locking is not necessary. */ -__STDIO_INLINE int -fputc_unlocked (int __c, FILE *__stream) __THROW -{ - return _IO_putc_unlocked (__c, __stream); -} -# endif /* misc */ - - -# if defined __USE_POSIX || defined __USE_MISC -/* This is defined in POSIX.1:1996. */ -__STDIO_INLINE int -putc_unlocked (int __c, FILE *__stream) __THROW -{ - return _IO_putc_unlocked (__c, __stream); -} - -/* This is defined in POSIX.1:1996. */ -__STDIO_INLINE int -putchar_unlocked (int __c) __THROW -{ - return _IO_putc_unlocked (__c, stdout); -} -# endif /* POSIX || misc */ - - -# ifdef __USE_GNU -/* Like `getdelim', but reads up to a newline. */ -__STDIO_INLINE _IO_ssize_t -getline (char **__lineptr, size_t *__n, FILE *__stream) __THROW -{ - return __getdelim (__lineptr, __n, '\n', __stream); -} -# endif /* GNU */ - - -# ifdef __USE_MISC -/* Faster versions when locking is not required. */ -__STDIO_INLINE int -feof_unlocked (FILE *__stream) __THROW -{ - return _IO_feof_unlocked (__stream); -} - -/* Faster versions when locking is not required. */ -__STDIO_INLINE int -ferror_unlocked (FILE *__stream) __THROW -{ - return _IO_ferror_unlocked (__stream); -} -# endif /* misc */ - -#endif /* Use extern inlines. */ - - -#if defined __USE_MISC && defined __GNUC__ && defined __OPTIMIZE__ -/* Perform some simple optimizations. */ -# define fread_unlocked(ptr, size, n, stream) \ - (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) \ - && (size_t) ((size) * (n)) <= 8 && (size) != 0) \ - ? ({ char *__ptr = (char *) (ptr); \ - FILE *__stream = (stream); \ - size_t __cnt; \ - for (__cnt = (size) * (n); __cnt > 0; --__cnt) \ - { \ - int __c = _IO_getc_unlocked (__stream); \ - if (__c == EOF) \ - break; \ - *__ptr++ = __c; \ - } \ - ((size_t) ((size) * (n)) - __cnt) / (size); }) \ - : (((__builtin_constant_p (size) && (size) == 0) \ - || (__builtin_constant_p (n) && (n) == 0)) \ - /* Evaluate all parameters once. */ \ - ? ((void) (ptr), (void) (stream), (void) (size), \ - (void) (n), 0) \ - : fread_unlocked (ptr, size, n, stream)))) - -# define fwrite_unlocked(ptr, size, n, stream) \ - (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) \ - && (size_t) ((size) * (n)) <= 8 && (size) != 0) \ - ? ({ const char *__ptr = (const char *) (ptr); \ - FILE *__stream = (stream); \ - size_t __cnt; \ - for (__cnt = (size) * (n); __cnt > 0; --__cnt) \ - if (_IO_putc_unlocked (*__ptr++, __stream) == EOF) \ - break; \ - ((size_t) ((size) * (n)) - __cnt) / (size); }) \ - : (((__builtin_constant_p (size) && (size) == 0) \ - || (__builtin_constant_p (n) && (n) == 0)) \ - /* Evaluate all parameters once. */ \ - ? ((void) (ptr), (void) (stream), (void) (size), n) \ - : fwrite_unlocked (ptr, size, n, stream)))) -#endif - -/* Define helper macro. */ -#undef __STDIO_INLINE diff --git a/libc/sysdeps/linux/sh/bits/stdio_lim.h b/libc/sysdeps/linux/sh/bits/stdio_lim.h deleted file mode 100644 index c35ee601b..000000000 --- a/libc/sysdeps/linux/sh/bits/stdio_lim.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (C) 1994, 1997, 1998, 1999 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. */ - -#if !defined _STDIO_H && !defined __need_FOPEN_MAX && !defined __need_IOV_MAX -# error "Never include <bits/stdio_lim.h> directly; use <stdio.h> instead." -#endif - -#ifdef _STDIO_H -# define L_tmpnam 20 -# define TMP_MAX 238328 -# define FILENAME_MAX 4095 - -# ifdef __USE_POSIX -# define L_ctermid 9 -# define L_cuserid 9 -# endif -#endif - -#if defined __need_FOPEN_MAX || defined _STDIO_H -# undef FOPEN_MAX -# define FOPEN_MAX 16 -#endif - -#if defined __need_IOV_MAX && !defined IOV_MAX -# define IOV_MAX 1024 -#endif diff --git a/libc/sysdeps/linux/sh/bits/string.h b/libc/sysdeps/linux/sh/bits/string.h deleted file mode 100644 index ad68b038b..000000000 --- a/libc/sysdeps/linux/sh/bits/string.h +++ /dev/null @@ -1,12 +0,0 @@ -/* This file should provide inline versions of string functions. - - Surround GCC-specific parts with #ifdef __GNUC__, and use `extern __inline'. - - This file should define __STRING_INLINES if functions are actually defined - as inlines. */ - -#ifndef _BITS_STRING_H -#define _BITS_STRING_H 1 - - -#endif /* bits/string.h */ diff --git a/libc/sysdeps/linux/sh/bits/string2.h b/libc/sysdeps/linux/sh/bits/string2.h deleted file mode 100644 index 213ab2e51..000000000 --- a/libc/sysdeps/linux/sh/bits/string2.h +++ /dev/null @@ -1,1244 +0,0 @@ -/* Machine-independant string function optimizations. - Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. - - 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 _STRING_H -# error "Never use <bits/string2.h> directly; include <string.h> instead." -#endif - -#if !defined __NO_STRING_INLINES && !defined __BOUNDED_POINTERS__ - -/* Unlike the definitions in the header <bits/string.h> the - definitions contained here are not optimized down to assembler - level. Those optimizations are not always a good idea since this - means the code size increases a lot. Instead the definitions here - optimize some functions in a way which do not dramatically - increase the code size and which do not use assembler. The main - trick is to use GNU CC's `__builtin_constant_p' function. - - Every function XXX which has a defined version in - <bits/string.h> must be accompanied by a symbol _HAVE_STRING_ARCH_XXX - to make sure we don't get redefinitions. - - We must use here macros instead of inline functions since the - trick won't work with the latter. */ - -#ifndef __STRING_INLINE -# ifdef __cplusplus -# define __STRING_INLINE inline -# else -# define __STRING_INLINE extern __inline -# endif -#endif - -#if _STRING_ARCH_unaligned -/* If we can do unaligned memory accesses we must know the endianess. */ -# include <endian.h> -# include <bits/types.h> - -# if __BYTE_ORDER == __LITTLE_ENDIAN -# define __STRING2_SMALL_GET16(src, idx) \ - (((__const unsigned char *) (__const char *) (src))[idx + 1] << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx]) -# define __STRING2_SMALL_GET32(src, idx) \ - (((((__const unsigned char *) (__const char *) (src))[idx + 3] << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 2]) << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 1]) << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx]) -# else -# define __STRING2_SMALL_GET16(src, idx) \ - (((__const unsigned char *) (__const char *) (src))[idx] << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 1]) -# define __STRING2_SMALL_GET32(src, idx) \ - (((((__const unsigned char *) (__const char *) (src))[idx] << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 1]) << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 2]) << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 3]) -# endif -#else -/* These are a few types we need for the optimizations if we cannot - use unaligned memory accesses. */ -# define __STRING2_COPY_TYPE(N) \ - typedef struct { unsigned char __arr[N]; } \ - __STRING2_COPY_ARR##N __attribute__ ((packed)) -__STRING2_COPY_TYPE (2); -__STRING2_COPY_TYPE (3); -__STRING2_COPY_TYPE (4); -__STRING2_COPY_TYPE (5); -__STRING2_COPY_TYPE (6); -__STRING2_COPY_TYPE (7); -__STRING2_COPY_TYPE (8); -# undef __STRING2_COPY_TYPE -#endif - -/* Dereferencing a pointer arg to run sizeof on it fails for the void - pointer case, so we use this instead. - Note that __x is evaluated twice. */ -#define __string2_1bptr_p(__x) \ - ((size_t)(const void *)((__x) + 1) - (size_t)(const void *)(__x) == 1) - -/* Set N bytes of S to C. */ -#ifndef _HAVE_STRING_ARCH_memset -# if _STRING_ARCH_unaligned -# define memset(s, c, n) \ - (__extension__ (__builtin_constant_p (n) && (n) <= 16 \ - ? ((n) == 1 \ - ? __memset_1 (s, c) \ - : __memset_gc (s, c, n)) \ - : (__builtin_constant_p (c) && (c) == '\0' \ - ? ({ void *__s = (s); __bzero (__s, n); __s; }) \ - : memset (s, c, n)))) - -# define __memset_1(s, c) ({ void *__s = (s); \ - *((__uint8_t *) __s) = (__uint8_t) c; __s; }) - -# define __memset_gc(s, c, n) \ - ({ void *__s = (s); \ - union { \ - unsigned int __ui; \ - unsigned short int __usi; \ - unsigned char __uc; \ - } *__u = __s; \ - __uint8_t __c = (__uint8_t) (c); \ - \ - /* This `switch' statement will be removed at compile-time. */ \ - switch ((unsigned int) (n)) \ - { \ - case 15: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ ((void *) __u + 4); \ - case 11: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ ((void *) __u + 4); \ - case 7: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ ((void *) __u + 4); \ - case 3: \ - __u->__usi = (unsigned short int) __c * 0x0101; \ - __u = __extension__ ((void *) __u + 2); \ - __u->__uc = (unsigned char) __c; \ - break; \ - \ - case 14: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ ((void *) __u + 4); \ - case 10: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ ((void *) __u + 4); \ - case 6: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ ((void *) __u + 4); \ - case 2: \ - __u->__usi = (unsigned short int) __c * 0x0101; \ - break; \ - \ - case 13: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ ((void *) __u + 4); \ - case 9: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ ((void *) __u + 4); \ - case 5: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ ((void *) __u + 4); \ - case 1: \ - __u->__uc = (unsigned char) __c; \ - break; \ - \ - case 16: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ ((void *) __u + 4); \ - case 12: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ ((void *) __u + 4); \ - case 8: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ ((void *) __u + 4); \ - case 4: \ - __u->__ui = __c * 0x01010101; \ - case 0: \ - break; \ - } \ - \ - __s; }) -# else -# define memset(s, c, n) \ - (__extension__ (__builtin_constant_p (c) && (c) == '\0' \ - ? ({ void *__s = (s); __bzero (__s, n); __s; }) \ - : memset (s, c, n))) -# endif - -/* GCC optimizes memset(s, 0, n) but not bzero(s, n). - The optimization is broken before EGCS 1.1. */ -# if __GNUC_PREREQ (2, 91) -# define __bzero(s, n) __builtin_memset (s, '\0', n) -# endif - -#endif - - -/* Copy N bytes from SRC to DEST, returning pointer to byte following the - last copied. */ -#ifdef __USE_GNU -# ifndef _HAVE_STRING_ARCH_mempcpy -# define __mempcpy(dest, src, n) \ - (__extension__ (__builtin_constant_p (src) && __builtin_constant_p (n) \ - && __string2_1bptr_p (src) && n <= 8 \ - ? __mempcpy_small (dest, __mempcpy_args (src), n) \ - : __mempcpy (dest, src, n))) -/* In glibc we use this function frequently but for namespace reasons - we have to use the name `__mempcpy'. */ -# define mempcpy(dest, src, n) __mempcpy (dest, src, n) - -# if _STRING_ARCH_unaligned -# define __mempcpy_args(src) \ - ((__const char *) (src))[0], ((__const char *) (src))[2], \ - ((__const char *) (src))[4], ((__const char *) (src))[6], \ - __extension__ __STRING2_SMALL_GET16 (src, 0), \ - __extension__ __STRING2_SMALL_GET16 (src, 4), \ - __extension__ __STRING2_SMALL_GET32 (src, 0), \ - __extension__ __STRING2_SMALL_GET32 (src, 4) -__STRING_INLINE void *__mempcpy_small (void *, char, char, char, char, - __uint16_t, __uint16_t, __uint32_t, - __uint32_t, size_t); -__STRING_INLINE void * -__mempcpy_small (void *__dest1, - char __src0_1, char __src2_1, char __src4_1, char __src6_1, - __uint16_t __src0_2, __uint16_t __src4_2, - __uint32_t __src0_4, __uint32_t __src4_4, - size_t __srclen) -{ - union { - __uint32_t __ui; - __uint16_t __usi; - unsigned char __uc; - unsigned char __c; - } *__u = __dest1; - switch ((unsigned int) __srclen) - { - case 1: - __u->__c = __src0_1; - __u = __extension__ ((void *) __u + 1); - break; - case 2: - __u->__usi = __src0_2; - __u = __extension__ ((void *) __u + 2); - break; - case 3: - __u->__usi = __src0_2; - __u = __extension__ ((void *) __u + 2); - __u->__c = __src2_1; - __u = __extension__ ((void *) __u + 1); - break; - case 4: - __u->__ui = __src0_4; - __u = __extension__ ((void *) __u + 4); - break; - case 5: - __u->__ui = __src0_4; - __u = __extension__ ((void *) __u + 4); - __u->__c = __src4_1; - __u = __extension__ ((void *) __u + 1); - break; - case 6: - __u->__ui = __src0_4; - __u = __extension__ ((void *) __u + 4); - __u->__usi = __src4_2; - __u = __extension__ ((void *) __u + 2); - break; - case 7: - __u->__ui = __src0_4; - __u = __extension__ ((void *) __u + 4); - __u->__usi = __src4_2; - __u = __extension__ ((void *) __u + 2); - __u->__c = __src6_1; - __u = __extension__ ((void *) __u + 1); - break; - case 8: - __u->__ui = __src0_4; - __u = __extension__ ((void *) __u + 4); - __u->__ui = __src4_4; - __u = __extension__ ((void *) __u + 4); - break; - } - return (void *) __u; -} -# else -# define __mempcpy_args(src) \ - ((__const char *) (src))[0], \ - __extension__ ((__STRING2_COPY_ARR2) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1] } }), \ - __extension__ ((__STRING2_COPY_ARR3) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2] } }), \ - __extension__ ((__STRING2_COPY_ARR4) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3] } }), \ - __extension__ ((__STRING2_COPY_ARR5) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4] } }), \ - __extension__ ((__STRING2_COPY_ARR6) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5] } }), \ - __extension__ ((__STRING2_COPY_ARR7) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - ((__const char *) (src))[6] } }), \ - __extension__ ((__STRING2_COPY_ARR8) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - ((__const char *) (src))[6], ((__const char *) (src))[7] } }) -__STRING_INLINE void *__mempcpy_small (void *, char, __STRING2_COPY_ARR2, - __STRING2_COPY_ARR3, - __STRING2_COPY_ARR4, - __STRING2_COPY_ARR5, - __STRING2_COPY_ARR6, - __STRING2_COPY_ARR7, - __STRING2_COPY_ARR8, size_t); -__STRING_INLINE void * -__mempcpy_small (void *__dest, char __src1, - __STRING2_COPY_ARR2 __src2, __STRING2_COPY_ARR3 __src3, - __STRING2_COPY_ARR4 __src4, __STRING2_COPY_ARR5 __src5, - __STRING2_COPY_ARR6 __src6, __STRING2_COPY_ARR7 __src7, - __STRING2_COPY_ARR8 __src8, size_t __srclen) -{ - union { - char __c; - __STRING2_COPY_ARR2 __sca2; - __STRING2_COPY_ARR3 __sca3; - __STRING2_COPY_ARR4 __sca4; - __STRING2_COPY_ARR5 __sca5; - __STRING2_COPY_ARR6 __sca6; - __STRING2_COPY_ARR7 __sca7; - __STRING2_COPY_ARR8 __sca8; - } *__u = __dest; - switch ((unsigned int) __srclen) - { - case 1: - __u->__c = __src1; - break; - case 2: - __extension__ __u->__sca2 = __src2; - break; - case 3: - __extension__ __u->__sca3 = __src3; - break; - case 4: - __extension__ __u->__sca4 = __src4; - break; - case 5: - __extension__ __u->__sca5 = __src5; - break; - case 6: - __extension__ __u->__sca6 = __src6; - break; - case 7: - __extension__ __u->__sca7 = __src7; - break; - case 8: - __extension__ __u->__sca8 = __src8; - break; - } - return __extension__ ((void *) __u + __srclen); -} -# endif -# endif -#endif - - -/* Return pointer to C in S. */ -#ifndef _HAVE_STRING_ARCH_strchr -extern void *__rawmemchr (const void *__s, int __c); -# define strchr(s, c) \ - (__extension__ (__builtin_constant_p (c) && (c) == '\0' \ - ? (char *) __rawmemchr (s, c) \ - : strchr (s, c))) -#endif - - -/* Copy SRC to DEST. */ -#ifndef _HAVE_STRING_ARCH_strcpy -# define strcpy(dest, src) \ - (__extension__ (__builtin_constant_p (src) \ - ? (__string2_1bptr_p (src) && strlen (src) + 1 <= 8 \ - ? __strcpy_small (dest, __strcpy_args (src), \ - strlen (src) + 1) \ - : (char *) memcpy (dest, src, strlen (src) + 1)) \ - : strcpy (dest, src))) - -# if _STRING_ARCH_unaligned -# define __strcpy_args(src) \ - __extension__ __STRING2_SMALL_GET16 (src, 0), \ - __extension__ __STRING2_SMALL_GET16 (src, 4), \ - __extension__ __STRING2_SMALL_GET32 (src, 0), \ - __extension__ __STRING2_SMALL_GET32 (src, 4) -__STRING_INLINE char *__strcpy_small (char *, __uint16_t, __uint16_t, - __uint32_t, __uint32_t, size_t); -__STRING_INLINE char * -__strcpy_small (char *__dest, - __uint16_t __src0_2, __uint16_t __src4_2, - __uint32_t __src0_4, __uint32_t __src4_4, - size_t __srclen) -{ - union { - __uint32_t __ui; - __uint16_t __usi; - unsigned char __uc; - } *__u = (void *) __dest; - switch ((unsigned int) __srclen) - { - case 1: - __u->__uc = '\0'; - break; - case 2: - __u->__usi = __src0_2; - break; - case 3: - __u->__usi = __src0_2; - __u = __extension__ ((void *) __u + 2); - __u->__uc = '\0'; - break; - case 4: - __u->__ui = __src0_4; - break; - case 5: - __u->__ui = __src0_4; - __u = __extension__ ((void *) __u + 4); - __u->__uc = '\0'; - break; - case 6: - __u->__ui = __src0_4; - __u = __extension__ ((void *) __u + 4); - __u->__usi = __src4_2; - break; - case 7: - __u->__ui = __src0_4; - __u = __extension__ ((void *) __u + 4); - __u->__usi = __src4_2; - __u = __extension__ ((void *) __u + 2); - __u->__uc = '\0'; - break; - case 8: - __u->__ui = __src0_4; - __u = __extension__ ((void *) __u + 4); - __u->__ui = __src4_4; - break; - } - return __dest; -} -# else -# define __strcpy_args(src) \ - __extension__ ((__STRING2_COPY_ARR2) \ - { { ((__const char *) (src))[0], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR3) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR4) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR5) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR6) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR7) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR8) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - ((__const char *) (src))[6], '\0' } }) -__STRING_INLINE char *__strcpy_small (char *, __STRING2_COPY_ARR2, - __STRING2_COPY_ARR3, - __STRING2_COPY_ARR4, - __STRING2_COPY_ARR5, - __STRING2_COPY_ARR6, - __STRING2_COPY_ARR7, - __STRING2_COPY_ARR8, size_t); -__STRING_INLINE char * -__strcpy_small (char *__dest, - __STRING2_COPY_ARR2 __src2, __STRING2_COPY_ARR3 __src3, - __STRING2_COPY_ARR4 __src4, __STRING2_COPY_ARR5 __src5, - __STRING2_COPY_ARR6 __src6, __STRING2_COPY_ARR7 __src7, - __STRING2_COPY_ARR8 __src8, size_t __srclen) -{ - union { - char __c; - __STRING2_COPY_ARR2 __sca2; - __STRING2_COPY_ARR3 __sca3; - __STRING2_COPY_ARR4 __sca4; - __STRING2_COPY_ARR5 __sca5; - __STRING2_COPY_ARR6 __sca6; - __STRING2_COPY_ARR7 __sca7; - __STRING2_COPY_ARR8 __sca8; - } *__u = (void *) __dest; - switch ((unsigned int) __srclen) - { - case 1: - __u->__c = '\0'; - break; - case 2: - __extension__ __u->__sca2 = __src2; - break; - case 3: - __extension__ __u->__sca3 = __src3; - break; - case 4: - __extension__ __u->__sca4 = __src4; - break; - case 5: - __extension__ __u->__sca5 = __src5; - break; - case 6: - __extension__ __u->__sca6 = __src6; - break; - case 7: - __extension__ __u->__sca7 = __src7; - break; - case 8: - __extension__ __u->__sca8 = __src8; - break; - } - return __dest; -} -# endif -#endif - - -/* Copy SRC to DEST, returning pointer to final NUL byte. */ -#ifdef __USE_GNU -# ifndef _HAVE_STRING_ARCH_stpcpy -# define __stpcpy(dest, src) \ - (__extension__ (__builtin_constant_p (src) \ - ? (__string2_1bptr_p (src) && strlen (src) + 1 <= 8 \ - ? __stpcpy_small (dest, __stpcpy_args (src), \ - strlen (src) + 1) \ - : ((char *) __mempcpy (dest, src, strlen (src) + 1) - 1))\ - : __stpcpy (dest, src))) -/* In glibc we use this function frequently but for namespace reasons - we have to use the name `__stpcpy'. */ -# define stpcpy(dest, src) __stpcpy (dest, src) - -# if _STRING_ARCH_unaligned -# define __stpcpy_args(src) \ - __extension__ __STRING2_SMALL_GET16 (src, 0), \ - __extension__ __STRING2_SMALL_GET16 (src, 4), \ - __extension__ __STRING2_SMALL_GET32 (src, 0), \ - __extension__ __STRING2_SMALL_GET32 (src, 4) -__STRING_INLINE char *__stpcpy_small (char *, __uint16_t, __uint16_t, - __uint32_t, __uint32_t, size_t); -__STRING_INLINE char * -__stpcpy_small (char *__dest, - __uint16_t __src0_2, __uint16_t __src4_2, - __uint32_t __src0_4, __uint32_t __src4_4, - size_t __srclen) -{ - union { - unsigned int __ui; - unsigned short int __usi; - unsigned char __uc; - char __c; - } *__u = (void *) __dest; - switch ((unsigned int) __srclen) - { - case 1: - __u->__uc = '\0'; - break; - case 2: - __u->__usi = __src0_2; - __u = __extension__ ((void *) __u + 1); - break; - case 3: - __u->__usi = __src0_2; - __u = __extension__ ((void *) __u + 2); - __u->__uc = '\0'; - break; - case 4: - __u->__ui = __src0_4; - __u = __extension__ ((void *) __u + 3); - break; - case 5: - __u->__ui = __src0_4; - __u = __extension__ ((void *) __u + 4); - __u->__uc = '\0'; - break; - case 6: - __u->__ui = __src0_4; - __u = __extension__ ((void *) __u + 4); - __u->__usi = __src4_2; - __u = __extension__ ((void *) __u + 1); - break; - case 7: - __u->__ui = __src0_4; - __u = __extension__ ((void *) __u + 4); - __u->__usi = __src4_2; - __u = __extension__ ((void *) __u + 2); - __u->__uc = '\0'; - break; - case 8: - __u->__ui = __src0_4; - __u = __extension__ ((void *) __u + 4); - __u->__ui = __src4_4; - __u = __extension__ ((void *) __u + 3); - break; - } - return &__u->__c; -} -# else -# define __stpcpy_args(src) \ - __extension__ ((__STRING2_COPY_ARR2) \ - { { ((__const char *) (src))[0], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR3) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR4) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR5) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR6) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR7) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR8) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - ((__const char *) (src))[6], '\0' } }) -__STRING_INLINE char *__stpcpy_small (char *, __STRING2_COPY_ARR2, - __STRING2_COPY_ARR3, - __STRING2_COPY_ARR4, - __STRING2_COPY_ARR5, - __STRING2_COPY_ARR6, - __STRING2_COPY_ARR7, - __STRING2_COPY_ARR8, size_t); -__STRING_INLINE char * -__stpcpy_small (char *__dest, - __STRING2_COPY_ARR2 __src2, __STRING2_COPY_ARR3 __src3, - __STRING2_COPY_ARR4 __src4, __STRING2_COPY_ARR5 __src5, - __STRING2_COPY_ARR6 __src6, __STRING2_COPY_ARR7 __src7, - __STRING2_COPY_ARR8 __src8, size_t __srclen) -{ - union { - char __c; - __STRING2_COPY_ARR2 __sca2; - __STRING2_COPY_ARR3 __sca3; - __STRING2_COPY_ARR4 __sca4; - __STRING2_COPY_ARR5 __sca5; - __STRING2_COPY_ARR6 __sca6; - __STRING2_COPY_ARR7 __sca7; - __STRING2_COPY_ARR8 __sca8; - } *__u = (void *) __dest; - switch ((unsigned int) __srclen) - { - case 1: - __u->__c = '\0'; - break; - case 2: - __extension__ __u->__sca2 = __src2; - break; - case 3: - __extension__ __u->__sca3 = __src3; - break; - case 4: - __extension__ __u->__sca4 = __src4; - break; - case 5: - __extension__ __u->__sca5 = __src5; - break; - case 6: - __extension__ __u->__sca6 = __src6; - break; - case 7: - __extension__ __u->__sca7 = __src7; - break; - case 8: - __extension__ __u->__sca8 = __src8; - break; - } - return __dest + __srclen - 1; -} -# endif -# endif -#endif - - -/* Copy no more than N characters of SRC to DEST. */ -#ifndef _HAVE_STRING_ARCH_strncpy -# if defined _USE_STRING_ARCH_memset && defined _USE_STRING_ARCH_mempcpy -# define strncpy(dest, src, n) \ - (__extension__ ({ char *__dest = (dest); \ - __builtin_constant_p (src) && __builtin_constant_p (n) \ - ? (strlen (src) + 1 >= ((size_t) (n)) \ - ? (char *) memcpy (__dest, src, n) \ - : (memset (__mempcpy (__dest, src, strlen (src)), \ - '\0', n - strlen (src)), \ - __dest)) \ - : strncpy (__dest, src, n); })) -# else -# define strncpy(dest, src, n) \ - (__extension__ (__builtin_constant_p (src) && __builtin_constant_p (n) \ - ? (strlen (src) + 1 >= ((size_t) (n)) \ - ? (char *) memcpy (dest, src, n) \ - : strncpy (dest, src, n)) \ - : strncpy (dest, src, n))) -# endif -#endif - - -/* Append no more than N characters from SRC onto DEST. */ -#ifndef _HAVE_STRING_ARCH_strncat -# ifdef _USE_STRING_ARCH_strchr -# define strncat(dest, src, n) \ - (__extension__ ({ char *__dest = (dest); \ - __builtin_constant_p (src) && __builtin_constant_p (n) \ - ? (strlen (src) < ((size_t) (n)) \ - ? strcat (__dest, src) \ - : (*((char *) __mempcpy (strchr (__dest, '\0'), \ - src, n)) = '\0', __dest)) \ - : strncat (dest, src, n); })) -# else -# define strncat(dest, src, n) \ - (__extension__ (__builtin_constant_p (src) && __builtin_constant_p (n) \ - ? (strlen (src) < ((size_t) (n)) \ - ? strcat (dest, src) \ - : strncat (dest, src, n)) \ - : strncat (dest, src, n))) -# endif -#endif - - -/* Compare characters of S1 and S2. */ -#ifndef _HAVE_STRING_ARCH_strcmp -# define strcmp(s1, s2) \ - __extension__ \ - ({ size_t __s1_len, __s2_len; \ - (__builtin_constant_p (s1) && __builtin_constant_p (s2) \ - && (__s1_len = strlen (s1), __s2_len = strlen (s2), \ - (!__string2_1bptr_p (s1) || __s1_len >= 4) \ - && (!__string2_1bptr_p (s2) || __s2_len >= 4)) \ - ? memcmp ((__const char *) (s1), (__const char *) (s2), \ - (__s1_len < __s2_len ? __s1_len : __s2_len) + 1) \ - : (__builtin_constant_p (s1) && __string2_1bptr_p (s1) \ - && (__s1_len = strlen (s1), __s1_len < 4) \ - ? (__builtin_constant_p (s2) && __string2_1bptr_p (s2) \ - ? __strcmp_cc (s1, s2, __s1_len) \ - : __strcmp_cg (s1, s2, __s1_len)) \ - : (__builtin_constant_p (s2) && __string2_1bptr_p (s2) \ - && (__s2_len = strlen (s2), __s2_len < 4) \ - ? (__builtin_constant_p (s1) && __string2_1bptr_p (s1) \ - ? __strcmp_cc (s1, s2, __s2_len) \ - : __strcmp_gc (s1, s2, __s2_len)) \ - : strcmp (s1, s2)))); }) - -# define __strcmp_cc(s1, s2, l) \ - (__extension__ ({ register int __result = \ - (((__const unsigned char *) (__const char *) (s1))[0] \ - - ((__const unsigned char *) (__const char *)(s2))[0]);\ - if (l > 0 && __result == 0) \ - { \ - __result = (((__const unsigned char *) \ - (__const char *) (s1))[1] \ - - ((__const unsigned char *) \ - (__const char *) (s2))[1]); \ - if (l > 1 && __result == 0) \ - { \ - __result = \ - (((__const unsigned char *) \ - (__const char *) (s1))[2] \ - - ((__const unsigned char *) \ - (__const char *) (s2))[2]); \ - if (l > 2 && __result == 0) \ - __result = \ - (((__const unsigned char *) \ - (__const char *) (s1))[3] \ - - ((__const unsigned char *) \ - (__const char *) (s2))[3]); \ - } \ - } \ - __result; })) - -# define __strcmp_cg(s1, s2, l1) \ - (__extension__ ({ __const unsigned char *__s2 = \ - (__const unsigned char *) (__const char *) (s2); \ - register int __result = \ - (((__const unsigned char *) (__const char *) (s1))[0] \ - - __s2[0]); \ - if (l1 > 0 && __result == 0) \ - { \ - __result = (((__const unsigned char *) \ - (__const char *) (s1))[1] - __s2[1]); \ - if (l1 > 1 && __result == 0) \ - { \ - __result = (((__const unsigned char *) \ - (__const char *) (s1))[2] - __s2[2]);\ - if (l1 > 2 && __result == 0) \ - __result = (((__const unsigned char *) \ - (__const char *) (s1))[3] \ - - __s2[3]); \ - } \ - } \ - __result; })) - -# define __strcmp_gc(s1, s2, l2) \ - (__extension__ ({ __const unsigned char *__s1 = \ - (__const unsigned char *) (__const char *) (s1); \ - register int __result = \ - __s1[0] - ((__const unsigned char *) \ - (__const char *) (s2))[0]; \ - if (l2 > 0 && __result == 0) \ - { \ - __result = (__s1[1] \ - - ((__const unsigned char *) \ - (__const char *) (s2))[1]); \ - if (l2 > 1 && __result == 0) \ - { \ - __result = \ - (__s1[2] - ((__const unsigned char *) \ - (__const char *) (s2))[2]); \ - if (l2 > 2 && __result == 0) \ - __result = \ - (__s1[3] \ - - ((__const unsigned char *) \ - (__const char *) (s2))[3]); \ - } \ - } \ - __result; })) -#endif - - -/* Compare N characters of S1 and S2. */ -#ifndef _HAVE_STRING_ARCH_strncmp -# define strncmp(s1, s2, n) \ - (__extension__ (__builtin_constant_p (n) \ - && ((__builtin_constant_p (s1) \ - && strlen (s1) < ((size_t) (n))) \ - || (__builtin_constant_p (s2) \ - && strlen (s2) < ((size_t) (n)))) \ - ? strcmp (s1, s2) : strncmp (s1, s2, n))) -#endif - - -/* Return the length of the initial segment of S which - consists entirely of characters not in REJECT. */ -#ifndef _HAVE_STRING_ARCH_strcspn -# define strcspn(s, reject) \ - __extension__ \ - ({ char __r0, __r1, __r2; \ - (__builtin_constant_p (reject) && __string2_1bptr_p (reject) \ - ? ((__r0 = ((__const char *) (reject))[0], __r0 == '\0') \ - ? strlen (s) \ - : ((__r1 = ((__const char *) (reject))[1], __r1 == '\0') \ - ? __strcspn_c1 (s, __r0) \ - : ((__r2 = ((__const char *) (reject))[2], __r2 == '\0') \ - ? __strcspn_c2 (s, __r0, __r1) \ - : (((__const char *) (reject))[3] == '\0' \ - ? __strcspn_c3 (s, __r0, __r1, __r2) \ - : strcspn (s, reject))))) \ - : strcspn (s, reject)); }) - -__STRING_INLINE size_t __strcspn_c1 (__const char *__s, char __reject); -__STRING_INLINE size_t -__strcspn_c1 (__const char *__s, char __reject) -{ - register size_t __result = 0; - while (__s[__result] != '\0' && __s[__result] != __reject) - ++__result; - return __result; -} - -__STRING_INLINE size_t __strcspn_c2 (__const char *__s, char __reject1, - char __reject2); -__STRING_INLINE size_t -__strcspn_c2 (__const char *__s, char __reject1, char __reject2) -{ - register size_t __result = 0; - while (__s[__result] != '\0' && __s[__result] != __reject1 - && __s[__result] != __reject2) - ++__result; - return __result; -} - -__STRING_INLINE size_t __strcspn_c3 (__const char *__s, char __reject1, - char __reject2, char __reject3); -__STRING_INLINE size_t -__strcspn_c3 (__const char *__s, char __reject1, char __reject2, - char __reject3) -{ - register size_t __result = 0; - while (__s[__result] != '\0' && __s[__result] != __reject1 - && __s[__result] != __reject2 && __s[__result] != __reject3) - ++__result; - return __result; -} -#endif - - -/* Return the length of the initial segment of S which - consists entirely of characters in ACCEPT. */ -#ifndef _HAVE_STRING_ARCH_strspn -# define strspn(s, accept) \ - __extension__ \ - ({ char __a0, __a1, __a2; \ - (__builtin_constant_p (accept) && __string2_1bptr_p (accept) \ - ? ((__a0 = ((__const char *) (accept))[0], __a0 == '\0') \ - ? ((void) (s), 0) \ - : ((__a1 = ((__const char *) (accept))[1], __a1 == '\0') \ - ? __strspn_c1 (s, __a0) \ - : ((__a2 = ((__const char *) (accept))[2], __a2 == '\0') \ - ? __strspn_c2 (s, __a0, __a1) \ - : (((__const char *) (accept))[3] == '\0' \ - ? __strspn_c3 (s, __a0, __a1, __a2) \ - : strspn (s, accept))))) \ - : strspn (s, accept)); }) - -__STRING_INLINE size_t __strspn_c1 (__const char *__s, char __accept); -__STRING_INLINE size_t -__strspn_c1 (__const char *__s, char __accept) -{ - register size_t __result = 0; - /* Please note that __accept never can be '\0'. */ - while (__s[__result] == __accept) - ++__result; - return __result; -} - -__STRING_INLINE size_t __strspn_c2 (__const char *__s, char __accept1, - char __accept2); -__STRING_INLINE size_t -__strspn_c2 (__const char *__s, char __accept1, char __accept2) -{ - register size_t __result = 0; - /* Please note that __accept1 and __accept2 never can be '\0'. */ - while (__s[__result] == __accept1 || __s[__result] == __accept2) - ++__result; - return __result; -} - -__STRING_INLINE size_t __strspn_c3 (__const char *__s, char __accept1, - char __accept2, char __accept3); -__STRING_INLINE size_t -__strspn_c3 (__const char *__s, char __accept1, char __accept2, char __accept3) -{ - register size_t __result = 0; - /* Please note that __accept1 to __accept3 never can be '\0'. */ - while (__s[__result] == __accept1 || __s[__result] == __accept2 - || __s[__result] == __accept3) - ++__result; - return __result; -} -#endif - - -/* Find the first occurrence in S of any character in ACCEPT. */ -#ifndef _HAVE_STRING_ARCH_strpbrk -# define strpbrk(s, accept) \ - __extension__ \ - ({ char __a0, __a1, __a2; \ - (__builtin_constant_p (accept) && __string2_1bptr_p (accept) \ - ? ((__a0 = ((__const char *) (accept))[0], __a0 == '\0') \ - ? ((void) (s), NULL) \ - : ((__a1 = ((__const char *) (accept))[1], __a1 == '\0') \ - ? strchr (s, __a0) \ - : ((__a2 = ((__const char *) (accept))[2], __a2 == '\0') \ - ? __strpbrk_c2 (s, __a0, __a1) \ - : (((__const char *) (accept))[3] == '\0' \ - ? __strpbrk_c3 (s, __a0, __a1, __a2) \ - : strpbrk (s, accept))))) \ - : strpbrk (s, accept)); }) - -__STRING_INLINE char *__strpbrk_c2 (__const char *__s, int __accept1, - int __accept2); -__STRING_INLINE char * -__strpbrk_c2 (__const char *__s, int __accept1, int __accept2) -{ - /* Please note that __accept1 and __accept2 never can be '\0'. */ - while (*__s != '\0' && *__s != __accept1 && *__s != __accept2) - ++__s; - return *__s == '\0' ? NULL : (char *) (size_t) __s; -} - -__STRING_INLINE char *__strpbrk_c3 (__const char *__s, int __accept1, - int __accept2, int __accept3); -__STRING_INLINE char * -__strpbrk_c3 (__const char *__s, int __accept1, int __accept2, - int __accept3) -{ - /* Please note that __accept1 to __accept3 never can be '\0'. */ - while (*__s != '\0' && *__s != __accept1 && *__s != __accept2 - && *__s != __accept3) - ++__s; - return *__s == '\0' ? NULL : (char *) (size_t) __s; -} -#endif - - -/* Find the first occurrence of NEEDLE in HAYSTACK. Newer gcc versions - do this itself. */ -#if !defined _HAVE_STRING_ARCH_strstr && !__GNUC_PREREQ (2, 97) -# define strstr(haystack, needle) \ - (__extension__ (__builtin_constant_p (needle) && __string2_1bptr_p (needle) \ - ? (((__const char *) (needle))[0] == '\0' \ - ? (char *) (size_t) (haystack) \ - : (((__const char *) (needle))[1] == '\0' \ - ? strchr (haystack, \ - ((__const char *) (needle))[0]) \ - : strstr (haystack, needle))) \ - : strstr (haystack, needle))) -#endif - - -#if defined __USE_GNU && !defined _FORCE_INLINES -# ifndef _HAVE_STRING_ARCH_strnlen -__STRING_INLINE size_t -strnlen (__const char *__string, size_t __maxlen) -{ - __const char *__end = (__const char *) memchr (__string, '\0', __maxlen); - return __end ? (size_t) (__end - __string) : __maxlen; -} -# endif -#endif - - -#ifndef _HAVE_STRING_ARCH_strtok_r -# define __strtok_r(s, sep, nextp) \ - (__extension__ (__builtin_constant_p (sep) && __string2_1bptr_p (sep) \ - ? (((__const char *) (sep))[0] != '\0' \ - && ((__const char *) (sep))[1] == '\0' \ - ? __strtok_r_1c (s, ((__const char *) (sep))[0], nextp) \ - : __strtok_r (s, sep, nextp)) \ - : __strtok_r (s, sep, nextp))) - -__STRING_INLINE char *__strtok_r_1c (char *__s, char __sep, char **__nextp); -__STRING_INLINE char * -__strtok_r_1c (char *__s, char __sep, char **__nextp) -{ - char *__result; - if (__s == NULL) - __s = *__nextp; - while (*__s == __sep) - ++__s; - if (*__s == '\0') - __result = NULL; - else - { - __result = __s; - while (*__s != '\0' && *__s != __sep) - ++__s; - if (*__s == '\0') - *__nextp = __s; - else - { - *__s = '\0'; - *__nextp = __s + 1; - } - } - return __result; -} -# if defined __USE_POSIX || defined __USE_MISC -# define strtok_r(s, sep, nextp) __strtok_r ((s), (sep), (nextp)) -# endif -#endif - - -#ifndef _HAVE_STRING_ARCH_strsep - -# define __strsep(s, reject) \ - __extension__ \ - ({ char __r0, __r1, __r2; \ - (__builtin_constant_p (reject) && __string2_1bptr_p (reject) \ - && (__r0 = ((__const char *) (reject))[0], \ - ((__const char *) (reject))[0] != '\0') \ - ? ((__r1 = ((__const char *) (reject))[1], \ - ((__const char *) (reject))[1] == '\0') \ - ? __strsep_1c (s, __r0) \ - : ((__r2 = ((__const char *) (reject))[2], __r2 == '\0') \ - ? __strsep_2c (s, __r0, __r1) \ - : (((__const char *) (reject))[3] == '\0' \ - ? __strsep_3c (s, __r0, __r1, __r2) \ - : __strsep_g (s, reject)))) \ - : __strsep_g (s, reject)); }) - -__STRING_INLINE char *__strsep_1c (char **__s, char __reject); -__STRING_INLINE char * -__strsep_1c (char **__s, char __reject) -{ - register char *__retval = *__s; - if (__retval == NULL) - return *__s = NULL; - if (*__retval == __reject) - *(*__s)++ = '\0'; - else - if ((*__s = strchr (__retval, __reject)) != NULL) - *(*__s)++ = '\0'; - else - *__s = NULL; - return __retval; -} - -__STRING_INLINE char *__strsep_2c (char **__s, char __reject1, char __reject2); -__STRING_INLINE char * -__strsep_2c (char **__s, char __reject1, char __reject2) -{ - register char *__retval = *__s; - if (__retval == NULL) - return *__s = NULL; - if (*__retval == __reject1 || *__retval == __reject2) - *(*__s)++ = '\0'; - else - { - register char *__cp = __retval; - while (*__cp != '\0' && *__cp != __reject1 && *__cp != __reject2) - ++__cp; - if (*__cp != '\0') - { - *__s = __cp; - *(*__s)++ = '\0'; - } - else - *__s = NULL; - } - return __retval; -} - -__STRING_INLINE char *__strsep_3c (char **__s, char __reject1, char __reject2, - char __reject3); -__STRING_INLINE char * -__strsep_3c (char **__s, char __reject1, char __reject2, char __reject3) -{ - register char *__retval = *__s; - if (__retval == NULL) - return *__s = NULL; - if (*__retval == __reject1 || *__retval == __reject2 - || *__retval == __reject3) - *(*__s)++ = '\0'; - else - { - register char *__cp = __retval; - while (*__cp != '\0' && *__cp != __reject1 && *__cp != __reject2 - && *__cp != __reject3) - ++__cp; - if (*__cp != '\0') - { - *__s = __cp; - *(*__s)++ = '\0'; - } - else - *__s = NULL; - } - return __retval; -} - -__STRING_INLINE char *__strsep_g (char **__s, __const char *__reject); -__STRING_INLINE char * -__strsep_g (char **__s, __const char *__reject) -{ - register char *__retval = *__s; - if (__retval == NULL) - return NULL; - if ((*__s = strpbrk (__retval, __reject)) != NULL) - *(*__s)++ = '\0'; - return __retval; -} -# ifdef __USE_BSD -# define strsep(s, reject) __strsep ((s), (reject)) -# endif -#endif - -/* We need the memory allocation functions for inline strdup(). - Referring to stdlib.h (even minimally) is not allowed - in any of the tight standards compliant modes. */ -#ifdef __USE_MISC - -# if !defined _HAVE_STRING_ARCH_strdup || !defined _HAVE_STRING_ARCH_strndup -# define __need_malloc_and_calloc -# include <stdlib.h> -# endif - -# ifndef _HAVE_STRING_ARCH_strdup - -extern char *__strdup (__const char *__string) __THROW __attribute_malloc__; -# define __strdup(s) \ - (__extension__ (__builtin_constant_p (s) && __string2_1bptr_p (s) \ - ? (((__const char *) (s))[0] == '\0' \ - ? (char *) calloc (1, 1) \ - : ({ size_t __len = strlen (s) + 1; \ - char *__retval = (char *) malloc (__len); \ - if (__retval != NULL) \ - __retval = (char *) memcpy (__retval, s, __len); \ - __retval; })) \ - : __strdup (s))) - -# if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN_EXTENDED -# define strdup(s) __strdup (s) -# endif -# endif - -# ifndef _HAVE_STRING_ARCH_strndup - -extern char *__strndup (__const char *__string, size_t __n) - __THROW __attribute_malloc__; -# define __strndup(s, n) \ - (__extension__ (__builtin_constant_p (s) && __string2_1bptr_p (s) \ - ? (((__const char *) (s))[0] == '\0' \ - ? (char *) calloc (1, 1) \ - : ({ size_t __len = strlen (s) + 1; \ - size_t __n = (n); \ - char *__retval; \ - if (__n < __len) \ - __len = __n; \ - __retval = (char *) malloc (__len); \ - if (__retval != NULL) \ - { \ - __retval[__len - 1] = '\0'; \ - __retval = (char *) memcpy (__retval, s, \ - __len - 1); \ - } \ - __retval; })) \ - : __strndup ((s), (n)))) - -# ifdef __USE_GNU -# define strndup(s, n) __strndup ((s), (n)) -# endif -# endif - -#endif /* Use misc. or use GNU. */ - -#ifndef _FORCE_INLINES -# undef __STRING_INLINE -#endif - -#endif /* No string inlines. */ diff --git a/libc/sysdeps/linux/sh/bits/stropts.h b/libc/sysdeps/linux/sh/bits/stropts.h deleted file mode 100644 index 21538c31d..000000000 --- a/libc/sysdeps/linux/sh/bits/stropts.h +++ /dev/null @@ -1,227 +0,0 @@ -/* Copyright (C) 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. */ - -#ifndef _BITS_STROPTS_H -#define _BITS_STROPTS_H 1 - -#include <bits/types.h> - -/* Macros used as `request' argument to `ioctl'. */ -#define __SID ('S' << 8) - -#define I_NREAD (__SID | 1) /* Counts the number of data bytes in the data - block in the first message. */ -#define I_PUSH (__SID | 2) /* Push STREAMS module onto top of the current - STREAM, just below the STREAM head. */ -#define I_POP (__SID | 3) /* Remove STREAMS module from just below the - STREAM head. */ -#define I_LOOK (__SID | 4) /* Retrieve the name of the module just below - the STREAM head and place it in a character - string. */ -#define I_FLUSH (__SID | 5) /* Flush all input and/or output. */ -#define I_SRDOPT (__SID | 6) /* Sets the read mode. */ -#define I_GRDOPT (__SID | 7) /* Returns the current read mode setting. */ -#define I_STR (__SID | 8) /* Construct an internal STREAMS `ioctl' - message and send that message downstream. */ -#define I_SETSIG (__SID | 9) /* Inform the STREAM head that the process - wants the SIGPOLL signal issued. */ -#define I_GETSIG (__SID |10) /* Return the events for which the calling - process is currently registered to be sent - a SIGPOLL signal. */ -#define I_FIND (__SID |11) /* Compares the names of all modules currently - present in the STREAM to the name pointed to - by `arg'. */ -#define I_LINK (__SID |12) /* Connect two STREAMs. */ -#define I_UNLINK (__SID |13) /* Disconnects the two STREAMs. */ -#define I_PEEK (__SID |15) /* Allows a process to retrieve the information - in the first message on the STREAM head read - queue without taking the message off the - queue. */ -#define I_FDINSERT (__SID |16) /* Create a message from the specified - buffer(s), adds information about another - STREAM, and send the message downstream. */ -#define I_SENDFD (__SID |17) /* Requests the STREAM associated with `fildes' - to send a message, containing a file - pointer, to the STREAM head at the other end - of a STREAMS pipe. */ -#define I_RECVFD (__SID |14) /* Non-EFT definition. */ -#define I_SWROPT (__SID |19) /* Set the write mode. */ -#define I_GWROPT (__SID |20) /* Return the current write mode setting. */ -#define I_LIST (__SID |21) /* List all the module names on the STREAM, up - to and including the topmost driver name. */ -#define I_PLINK (__SID |22) /* Connect two STREAMs with a persistent - link. */ -#define I_PUNLINK (__SID |23) /* Disconnect the two STREAMs that were - connected with a persistent link. */ -#define I_FLUSHBAND (__SID |28) /* Flush only band specified. */ -#define I_CKBAND (__SID |29) /* Check if the message of a given priority - band exists on the STREAM head read - queue. */ -#define I_GETBAND (__SID |30) /* Return the priority band of the first - message on the STREAM head read queue. */ -#define I_ATMARK (__SID |31) /* See if the current message on the STREAM - head read queue is "marked" by some module - downstream. */ -#define I_SETCLTIME (__SID |32) /* Set the time the STREAM head will delay when - a STREAM is closing and there is data on - the write queues. */ -#define I_GETCLTIME (__SID |33) /* Get current value for closing timeout. */ -#define I_CANPUT (__SID |34) /* Check if a certain band is writable. */ - - -/* Used in `I_LOOK' request. */ -#define FMNAMESZ 8 /* compatibility w/UnixWare/Solaris. */ - -/* Flush options. */ -#define FLUSHR 0x01 /* Flush read queues. */ -#define FLUSHW 0x02 /* Flush write queues. */ -#define FLUSHRW 0x03 /* Flush read and write queues. */ -#ifdef __USE_GNU -# define FLUSHBAND 0x04 /* Flush only specified band. */ -#endif - -/* Possible arguments for `I_SETSIG'. */ -#define S_INPUT 0x0001 /* A message, other than a high-priority - message, has arrived. */ -#define S_HIPRI 0x0002 /* A high-priority message is present. */ -#define S_OUTPUT 0x0004 /* The write queue for normal data is no longer - full. */ -#define S_MSG 0x0008 /* A STREAMS signal message that contains the - SIGPOLL signal reaches the front of the - STREAM head read queue. */ -#define S_ERROR 0x0010 /* Notification of an error condition. */ -#define S_HANGUP 0x0020 /* Notification of a hangup. */ -#define S_RDNORM 0x0040 /* A normal message has arrived. */ -#define S_WRNORM S_OUTPUT -#define S_RDBAND 0x0080 /* A message with a non-zero priority has - arrived. */ -#define S_WRBAND 0x0100 /* The write queue for a non-zero priority - band is no longer full. */ -#define S_BANDURG 0x0200 /* When used in conjunction with S_RDBAND, - SIGURG is generated instead of SIGPOLL when - a priority message reaches the front of the - STREAM head read queue. */ - -/* Option for `I_PEEK'. */ -#define RS_HIPRI 0x01 /* Only look for high-priority messages. */ - -/* Options for `I_SRDOPT'. */ -#define RNORM 0x0000 /* Byte-STREAM mode, the default. */ -#define RMSGD 0x0001 /* Message-discard mode. */ -#define RMSGN 0x0002 /* Message-nondiscard mode. */ -#define RPROTDAT 0x0004 /* Deliver the control part of a message as - data. */ -#define RPROTDIS 0x0008 /* Discard the control part of a message, - delivering any data part. */ -#define RPROTNORM 0x0010 /* Fail `read' with EBADMSG if a message - containing a control part is at the front - of the STREAM head read queue. */ -#ifdef __USE_GNU -# define RPROTMASK 0x001C /* The RPROT bits */ -#endif - -/* Possible mode for `I_SWROPT'. */ -#define SNDZERO 0x001 /* Send a zero-length message downstream when a - `write' of 0 bytes occurs. */ -#ifdef __USE_GNU -# define SNDPIPE 0x002 /* Send SIGPIPE on write and putmsg if - sd_werror is set. */ -#endif - -/* Arguments for `I_ATMARK'. */ -#define ANYMARK 0x01 /* Check if the message is marked. */ -#define LASTMARK 0x02 /* Check if the message is the last one marked - on the queue. */ - -/* Argument for `I_UNLINK'. */ -#ifdef __USE_GNU -# define MUXID_ALL (-1) /* Unlink all STREAMs linked to the STREAM - associated with `fildes'. */ -#endif - - -/* Macros for `getmsg', `getpmsg', `putmsg' and `putpmsg'. */ -#define MSG_HIPRI 0x01 /* Send/receive high priority message. */ -#define MSG_ANY 0x02 /* Receive any message. */ -#define MSG_BAND 0x04 /* Receive message from specified band. */ - -/* Values returned by getmsg and getpmsg */ -#define MORECTL 1 /* More control information is left in - message. */ -#define MOREDATA 2 /* More data is left in message. */ - - -/* Structure used for the I_FLUSHBAND ioctl on streams. */ -struct bandinfo - { - unsigned char bi_pri; - int bi_flag; - }; - -struct strbuf - { - int maxlen; /* Maximum buffer length. */ - int len; /* Length of data. */ - char *buf; /* Pointer to buffer. */ - }; - -struct strpeek - { - struct strbuf ctlbuf; - struct strbuf databuf; - t_uscalar_t flags; /* UnixWare/Solaris compatibility. */ - }; - -struct strfdinsert - { - struct strbuf ctlbuf; - struct strbuf databuf; - t_uscalar_t flags; /* UnixWare/Solaris compatibility. */ - int fildes; - int offset; - }; - -struct strioctl - { - int ic_cmd; - int ic_timout; - int ic_len; - char *ic_dp; - }; - -struct strrecvfd - { - int fd; - uid_t uid; - gid_t gid; - char __fill[8]; /* UnixWare/Solaris compatibility */ - }; - - -struct str_mlist - { - char l_name[FMNAMESZ + 1]; - }; - -struct str_list - { - int sl_nmods; - struct str_mlist *sl_modlist; - }; - -#endif /* bits/stropts.h */ diff --git a/libc/sysdeps/linux/sh/bits/termios.h b/libc/sysdeps/linux/sh/bits/termios.h deleted file mode 100644 index 887b309ad..000000000 --- a/libc/sysdeps/linux/sh/bits/termios.h +++ /dev/null @@ -1,213 +0,0 @@ -/* termios type and macro definitions. Linux version. - Copyright (C) 1993, 94, 95, 96, 97, 98, 99 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 _TERMIOS_H -# error "Never include <bits/termios.h> directly; use <termios.h> instead." -#endif - -typedef unsigned char cc_t; -typedef unsigned int speed_t; -typedef unsigned int tcflag_t; - -#define NCCS 32 -struct termios - { - tcflag_t c_iflag; /* input mode flags */ - tcflag_t c_oflag; /* output mode flags */ - tcflag_t c_cflag; /* control mode flags */ - tcflag_t c_lflag; /* local mode flags */ - cc_t c_line; /* line discipline */ - cc_t c_cc[NCCS]; /* control characters */ - speed_t c_ispeed; /* input speed */ - speed_t c_ospeed; /* output speed */ - }; - -/* c_cc characters */ -#define VINTR 0 -#define VQUIT 1 -#define VERASE 2 -#define VKILL 3 -#define VEOF 4 -#define VTIME 5 -#define VMIN 6 -#define VSWTC 7 -#define VSTART 8 -#define VSTOP 9 -#define VSUSP 10 -#define VEOL 11 -#define VREPRINT 12 -#define VDISCARD 13 -#define VWERASE 14 -#define VLNEXT 15 -#define VEOL2 16 - -/* c_iflag bits */ -#define IGNBRK 0000001 -#define BRKINT 0000002 -#define IGNPAR 0000004 -#define PARMRK 0000010 -#define INPCK 0000020 -#define ISTRIP 0000040 -#define INLCR 0000100 -#define IGNCR 0000200 -#define ICRNL 0000400 -#define IUCLC 0001000 -#define IXON 0002000 -#define IXANY 0004000 -#define IXOFF 0010000 -#define IMAXBEL 0020000 - -/* c_oflag bits */ -#define OPOST 0000001 -#define OLCUC 0000002 -#define ONLCR 0000004 -#define OCRNL 0000010 -#define ONOCR 0000020 -#define ONLRET 0000040 -#define OFILL 0000100 -#define OFDEL 0000200 -#if defined __USE_MISC || defined __USE_XOPEN -# define NLDLY 0000400 -# define NL0 0000000 -# define NL1 0000400 -# define CRDLY 0003000 -# define CR0 0000000 -# define CR1 0001000 -# define CR2 0002000 -# define CR3 0003000 -# define TABDLY 0014000 -# define TAB0 0000000 -# define TAB1 0004000 -# define TAB2 0010000 -# define TAB3 0014000 -# define BSDLY 0020000 -# define BS0 0000000 -# define BS1 0020000 -# define FFDLY 0100000 -# define FF0 0000000 -# define FF1 0100000 -#endif - -#define VTDLY 0040000 -#define VT0 0000000 -#define VT1 0040000 - -#ifdef __USE_MISC -# define XTABS 0014000 -#endif - -/* c_cflag bit meaning */ -#ifdef __USE_MISC -# define CBAUD 0010017 -#endif -#define B0 0000000 /* hang up */ -#define B50 0000001 -#define B75 0000002 -#define B110 0000003 -#define B134 0000004 -#define B150 0000005 -#define B200 0000006 -#define B300 0000007 -#define B600 0000010 -#define B1200 0000011 -#define B1800 0000012 -#define B2400 0000013 -#define B4800 0000014 -#define B9600 0000015 -#define B19200 0000016 -#define B38400 0000017 -#ifdef __USE_MISC -# define EXTA B19200 -# define EXTB B38400 -#endif -#define CSIZE 0000060 -#define CS5 0000000 -#define CS6 0000020 -#define CS7 0000040 -#define CS8 0000060 -#define CSTOPB 0000100 -#define CREAD 0000200 -#define PARENB 0000400 -#define PARODD 0001000 -#define HUPCL 0002000 -#define CLOCAL 0004000 -#ifdef __USE_MISC -# define CBAUDEX 0010000 -#endif -#define B57600 0010001 -#define B115200 0010002 -#define B230400 0010003 -#define B460800 0010004 -#define B500000 0010005 -#define B576000 0010006 -#define B921600 0010007 -#define B1000000 0010010 -#define B1152000 0010011 -#define B1500000 0010012 -#define B2000000 0010013 -#define B2500000 0010014 -#define B3000000 0010015 -#define B3500000 0010016 -#define B4000000 0010017 -#define __MAX_BAUD B4000000 -#ifdef __USE_MISC -# define CIBAUD 002003600000 /* input baud rate (not used) */ -# define CRTSCTS 020000000000 /* flow control */ -#endif - -/* c_lflag bits */ -#define ISIG 0000001 -#define ICANON 0000002 -#if defined __USE_MISC || defined __USE_XOPEN -# define XCASE 0000004 -#endif -#define ECHO 0000010 -#define ECHOE 0000020 -#define ECHOK 0000040 -#define ECHONL 0000100 -#define NOFLSH 0000200 -#define TOSTOP 0000400 -#ifdef __USE_MISC -# define ECHOCTL 0001000 -# define ECHOPRT 0002000 -# define ECHOKE 0004000 -# define FLUSHO 0010000 -# define PENDIN 0040000 -#endif -#define IEXTEN 0100000 - -/* tcflow() and TCXONC use these */ -#define TCOOFF 0 -#define TCOON 1 -#define TCIOFF 2 -#define TCION 3 - -/* tcflush() and TCFLSH use these */ -#define TCIFLUSH 0 -#define TCOFLUSH 1 -#define TCIOFLUSH 2 - -/* tcsetattr uses these */ -#define TCSANOW 0 -#define TCSADRAIN 1 -#define TCSAFLUSH 2 - - -#define _IOT_termios /* Hurd ioctl type field. */ \ - _IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2) diff --git a/libc/sysdeps/linux/sh/bits/time.h b/libc/sysdeps/linux/sh/bits/time.h deleted file mode 100644 index 2a6873f00..000000000 --- a/libc/sysdeps/linux/sh/bits/time.h +++ /dev/null @@ -1,69 +0,0 @@ -/* System-dependent timing definitions. Linux version. - Copyright (C) 1996, 1997, 1999, 2000, 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. */ - -/* - * Never include this file directly; use <time.h> instead. - */ - -#ifndef __need_timeval -# ifndef _BITS_TIME_H -# define _BITS_TIME_H 1 - -/* ISO/IEC 9899:1990 7.12.1: <time.h> - The macro `CLOCKS_PER_SEC' is the number per second of the value - returned by the `clock' function. */ -/* CAE XSH, Issue 4, Version 2: <time.h> - The value of CLOCKS_PER_SEC is required to be 1 million on all - XSI-conformant systems. */ -# define CLOCKS_PER_SEC 1000000l - -# if !defined __STRICT_ANSI__ && !defined __USE_XOPEN2K -/* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK - presents the real value for clock ticks per second for the system. */ -# include <bits/types.h> -extern long int __sysconf (int); -# define CLK_TCK ((__clock_t) __sysconf (2)) /* 2 is _SC_CLK_TCK */ -# endif - -# ifdef __USE_POSIX199309 -/* Identifier for system-wide realtime clock. */ -# define CLOCK_REALTIME 0 - -/* Flag to indicate time is absolute. */ -# define TIMER_ABSTIME 1 -# endif - -# endif /* bits/time.h */ -#endif - -#ifdef __need_timeval -# undef __need_timeval -# ifndef _STRUCT_TIMEVAL -# define _STRUCT_TIMEVAL 1 -# include <bits/types.h> - -/* A time value that is accurate to the nearest - microsecond but also has a range of years. */ -struct timeval - { - __time_t tv_sec; /* Seconds. */ - __suseconds_t tv_usec; /* Microseconds. */ - }; -# endif /* struct timeval */ -#endif /* need timeval */ diff --git a/libc/sysdeps/linux/sh/bits/types.h b/libc/sysdeps/linux/sh/bits/types.h deleted file mode 100644 index bdda9388a..000000000 --- a/libc/sysdeps/linux/sh/bits/types.h +++ /dev/null @@ -1,146 +0,0 @@ -/* Copyright (C) 1991,92,1994-1999,2000,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. */ - -/* - * Never include this file directly; use <sys/types.h> instead. - */ - -#ifndef _BITS_TYPES_H -#define _BITS_TYPES_H 1 - -#include <features.h> - -#define __need_size_t -#include <stddef.h> - -/* Convenience types. */ -typedef unsigned char __u_char; -typedef unsigned short __u_short; -typedef unsigned int __u_int; -typedef unsigned long __u_long; -#ifdef __GNUC__ -__extension__ typedef unsigned long long int __u_quad_t; -__extension__ typedef long long int __quad_t; -#else -typedef struct - { - long int __val[2]; - } __quad_t; -typedef struct - { - __u_long __val[2]; - } __u_quad_t; -#endif -typedef signed char __int8_t; -typedef unsigned char __uint8_t; -typedef signed short int __int16_t; -typedef unsigned short int __uint16_t; -typedef signed int __int32_t; -typedef unsigned int __uint32_t; -#ifdef __GNUC__ -__extension__ typedef signed long long int __int64_t; -__extension__ typedef unsigned long long int __uint64_t; -#endif -typedef __quad_t *__qaddr_t; - -typedef __u_quad_t __dev_t; /* Type of device numbers. */ -typedef __u_int __uid_t; /* Type of user identifications. */ -typedef __u_int __gid_t; /* Type of group identifications. */ -typedef __u_long __ino_t; /* Type of file serial numbers. */ -typedef __u_int __mode_t; /* Type of file attribute bitmasks. */ -typedef __u_int __nlink_t; /* Type of file link counts. */ -typedef long int __off_t; /* Type of file sizes and offsets. */ -typedef __quad_t __loff_t; /* Type of file sizes and offsets. */ -typedef int __pid_t; /* Type of process identifications. */ -typedef int __ssize_t; /* Type of a byte count, or error. */ -typedef __u_long __rlim_t; /* Type of resource counts. */ -typedef __u_quad_t __rlim64_t; /* Type of resource counts (LFS). */ -typedef __u_int __id_t; /* General type for ID. */ - -typedef struct - { - int __val[2]; - } __fsid_t; /* Type of file system IDs. */ - -/* Everythin' else. */ -typedef int __daddr_t; /* The type of a disk address. */ -typedef char *__caddr_t; -typedef long int __time_t; -typedef unsigned int __useconds_t; -typedef long int __suseconds_t; -typedef long int __swblk_t; /* Type of a swap block maybe? */ - -typedef long int __clock_t; - -/* Clock ID used in clock and timer functions. */ -typedef int __clockid_t; - -/* Timer ID returned by `timer_create'. */ -typedef int __timer_t; - - -/* Number of descriptors that can fit in an `fd_set'. */ -#define __FD_SETSIZE 1024 - - -typedef int __key_t; - -/* Used in `struct shmid_ds'. */ -typedef unsigned short int __ipc_pid_t; - - -/* Type to represent block size. */ -typedef long int __blksize_t; - -/* Types from the Large File Support interface. */ - -/* Type to count number os disk blocks. */ -typedef long int __blkcnt_t; -typedef __quad_t __blkcnt64_t; - -/* Type to count file system blocks. */ -typedef __u_long __fsblkcnt_t; -typedef __u_quad_t __fsblkcnt64_t; - -/* Type to count file system inodes. */ -typedef __u_long __fsfilcnt_t; -typedef __u_quad_t __fsfilcnt64_t; - -/* Type of file serial numbers. */ -typedef __u_quad_t __ino64_t; - -/* Type of file sizes and offsets. */ -typedef __loff_t __off64_t; - -/* Used in XTI. */ -typedef long int __t_scalar_t; -typedef unsigned long int __t_uscalar_t; - -/* Duplicates info from stdint.h but this is used in unistd.h. */ -typedef int __intptr_t; - -/* Duplicate info from sys/socket.h. */ -typedef unsigned int __socklen_t; - - -/* Now add the thread types. */ -#if defined __USE_POSIX199506 || defined __USE_UNIX98 -# include <bits/pthreadtypes.h> -#endif - -#endif /* bits/types.h */ diff --git a/libc/sysdeps/linux/sh/bits/uio.h b/libc/sysdeps/linux/sh/bits/uio.h deleted file mode 100644 index 84b4805fe..000000000 --- a/libc/sysdeps/linux/sh/bits/uio.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (C) 1996, 1997 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 _SYS_UIO_H -# error "Never include <bits/uio.h> directly; use <sys/uio.h> instead." -#endif - - -#include <sys/types.h> - - -/* We should normally use the Linux kernel header file to define this - type and macros but this calls for trouble because of the header - includes other kernel headers. */ - -/* Size of object which can be written atomically. - - This macro has different values in different kernel versions. The - latest versions of ther kernel use 1024 and this is good choice. Since - the C library implementation of readv/writev is able to emulate the - functionality even if the currently running kernel does not support - this large value the readv/writev call will not fail because of this. */ -#define UIO_MAXIOV 1024 - - -/* Structure for scatter/gather I/O. */ -struct iovec - { - void *iov_base; /* Pointer to data. */ - size_t iov_len; /* Length of data. */ - }; diff --git a/libc/sysdeps/linux/sh/bits/ustat.h b/libc/sysdeps/linux/sh/bits/ustat.h deleted file mode 100644 index aeafc22a5..000000000 --- a/libc/sysdeps/linux/sh/bits/ustat.h +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 1997 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. */ - -#include <sys/types.h> - -struct ustat - { - __daddr_t f_tfree; - __ino_t f_tinode; - char f_fname[6]; - char f_fpack[6]; - }; diff --git a/libc/sysdeps/linux/sh/bits/utmp.h b/libc/sysdeps/linux/sh/bits/utmp.h deleted file mode 100644 index 2ed29bbb4..000000000 --- a/libc/sysdeps/linux/sh/bits/utmp.h +++ /dev/null @@ -1,106 +0,0 @@ -/* The `struct utmp' type, describing entries in the utmp file. GNU version. - Copyright (C) 1993, 1996, 1997, 1998, 1999 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 _UTMP_H -# error "Never include <bits/utmp.h> directly; use <utmp.h> instead." -#endif - -#include <paths.h> -#include <sys/time.h> -#include <sys/types.h> - - -#define UT_LINESIZE 32 -#define UT_NAMESIZE 32 -#define UT_HOSTSIZE 256 - - -/* The structure describing an entry in the database of - previous logins. */ -struct lastlog - { - __time_t ll_time; - char ll_line[UT_LINESIZE]; - char ll_host[UT_HOSTSIZE]; - }; - - -/* The structure describing the status of a terminated process. This - type is used in `struct utmp' below. */ -struct exit_status - { - short int e_termination; /* Process termination status. */ - short int e_exit; /* Process exit status. */ - }; - - -/* The structure describing an entry in the user accounting database. */ -struct utmp -{ - short int ut_type; /* Type of login. */ - pid_t ut_pid; /* Process ID of login process. */ - char ut_line[UT_LINESIZE]; /* Devicename. */ - char ut_id[4]; /* Inittab ID. */ - char ut_user[UT_NAMESIZE]; /* Username. */ - char ut_host[UT_HOSTSIZE]; /* Hostname for remote login. */ - struct exit_status ut_exit; /* Exit status of a process marked - as DEAD_PROCESS. */ - long int ut_session; /* Session ID, used for windowing. */ - struct timeval ut_tv; /* Time entry was made. */ - int32_t ut_addr_v6[4]; /* Internet address of remote host. */ - char __unused[20]; /* Reserved for future use. */ -}; - -/* Backwards compatibility hacks. */ -#define ut_name ut_user -#ifndef _NO_UT_TIME -/* We have a problem here: `ut_time' is also used otherwise. Define - _NO_UT_TIME if the compiler complains. */ -# define ut_time ut_tv.tv_sec -#endif -#define ut_xtime ut_tv.tv_sec -#define ut_addr ut_addr_v6[0] - - -/* Values for the `ut_type' field of a `struct utmp'. */ -#define EMPTY 0 /* No valid user accounting information. */ - -#define RUN_LVL 1 /* The system's runlevel. */ -#define BOOT_TIME 2 /* Time of system boot. */ -#define NEW_TIME 3 /* Time after system clock changed. */ -#define OLD_TIME 4 /* Time when system clock changed. */ - -#define INIT_PROCESS 5 /* Process spawned by the init process. */ -#define LOGIN_PROCESS 6 /* Session leader of a logged in user. */ -#define USER_PROCESS 7 /* Normal process. */ -#define DEAD_PROCESS 8 /* Terminated process. */ - -#define ACCOUNTING 9 - -/* Old Linux name for the EMPTY type. */ -#define UT_UNKNOWN EMPTY - - -/* Tell the user that we have a modern system with UT_HOST, UT_PID, - UT_TYPE, UT_ID and UT_TV fields. */ -#define _HAVE_UT_TYPE 1 -#define _HAVE_UT_PID 1 -#define _HAVE_UT_ID 1 -#define _HAVE_UT_TV 1 -#define _HAVE_UT_HOST 1 diff --git a/libc/sysdeps/linux/sh/bits/utmpx.h b/libc/sysdeps/linux/sh/bits/utmpx.h deleted file mode 100644 index 99735370b..000000000 --- a/libc/sysdeps/linux/sh/bits/utmpx.h +++ /dev/null @@ -1,89 +0,0 @@ -/* Structures and definitions for the user accounting database. GNU version. - Copyright (C) 1997, 1998, 2000, 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. */ - -#ifndef _UTMPX_H -# error "Never include <bits/utmpx.h> directly; use <utmpx.h> instead." -#endif - -#include <bits/types.h> -#include <sys/time.h> - - -#ifdef __USE_GNU -# include <paths.h> -# define _PATH_UTMPX _PATH_UTMP -# define _PATH_WTMPX _PATH_WTMP -#endif - - -#define __UT_LINESIZE 32 -#define __UT_NAMESIZE 32 -#define __UT_HOSTSIZE 256 - - -/* The structure describing the status of a terminated process. This - type is used in `struct utmpx' below. */ -struct __exit_status - { -#ifdef __USE_GNU - short int e_termination; /* Process termination status. */ - short int e_exit; /* Process exit status. */ -#else - short int __e_termination; /* Process termination status. */ - short int __e_exit; /* Process exit status. */ -#endif - }; - - -/* The structure describing an entry in the user accounting database. */ -struct utmpx -{ - short int ut_type; /* Type of login. */ - __pid_t ut_pid; /* Process ID of login process. */ - char ut_line[__UT_LINESIZE]; /* Devicename. */ - char ut_id[4]; /* Inittab ID. */ - char ut_user[__UT_NAMESIZE]; /* Username. */ - char ut_host[__UT_HOSTSIZE]; /* Hostname for remote login. */ - struct __exit_status ut_exit; /* Exit status of a process marked - as DEAD_PROCESS. */ - long int ut_session; /* Session ID, used for windowing. */ - struct timeval ut_tv; /* Time entry was made. */ - __int32_t ut_addr_v6[4]; /* Internet address of remote host. */ - char __unused[20]; /* Reserved for future use. */ -}; - - -/* Values for the `ut_type' field of a `struct utmpx'. */ -#define EMPTY 0 /* No valid user accounting information. */ - -#ifdef __USE_GNU -# define RUN_LVL 1 /* The system's runlevel. */ -#endif -#define BOOT_TIME 2 /* Time of system boot. */ -#define NEW_TIME 3 /* Time after system clock changed. */ -#define OLD_TIME 4 /* Time when system clock changed. */ - -#define INIT_PROCESS 5 /* Process spawned by the init process. */ -#define LOGIN_PROCESS 6 /* Session leader of a logged in user. */ -#define USER_PROCESS 7 /* Normal process. */ -#define DEAD_PROCESS 8 /* Terminated process. */ - -#ifdef __USE_GNU -# define ACCOUNTING 9 /* System accounting. */ -#endif diff --git a/libc/sysdeps/linux/sh/bits/utsname.h b/libc/sysdeps/linux/sh/bits/utsname.h deleted file mode 100644 index 35e71e3ba..000000000 --- a/libc/sysdeps/linux/sh/bits/utsname.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 1995, 1996, 1997 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 _SYS_UTSNAME_H -# error "Never include <bits/utsname.h> directly; use <sys/utsname.h> instead." -#endif - -/* Length of the entries in `struct utsname' is 65. */ -#define _UTSNAME_LENGTH 65 - -/* Linux provides as additional information in the `struct utsname' - the name of the current domain. Define _UTSNAME_DOMAIN_LENGTH - to a value != 0 to activate this entry. */ -#define _UTSNAME_DOMAIN_LENGTH _UTSNAME_LENGTH diff --git a/libc/sysdeps/linux/sh/bits/waitflags.h b/libc/sysdeps/linux/sh/bits/waitflags.h deleted file mode 100644 index 1303c6c36..000000000 --- a/libc/sysdeps/linux/sh/bits/waitflags.h +++ /dev/null @@ -1,30 +0,0 @@ -/* Definitions of flag bits for `waitpid' et al. - Copyright (C) 1992, 1996, 1997, 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. */ - -#if !defined _SYS_WAIT_H && !defined _STDLIB_H -# error "Never include <bits/waitflags.h> directly; use <sys/wait.h> instead." -#endif - - -/* Bits in the third argument to `waitpid'. */ -#define WNOHANG 1 /* Don't block waiting. */ -#define WUNTRACED 2 /* Report status of stopped children. */ - -#define __WALL 0x40000000 /* Wait for any child. */ -#define __WCLONE 0x80000000 /* Wait for cloned process. */ diff --git a/libc/sysdeps/linux/sh/bits/waitstatus.h b/libc/sysdeps/linux/sh/bits/waitstatus.h deleted file mode 100644 index 982c9dbb2..000000000 --- a/libc/sysdeps/linux/sh/bits/waitstatus.h +++ /dev/null @@ -1,104 +0,0 @@ -/* Definitions of status bits for `wait' et al. - Copyright (C) 1992, 1994, 1996, 1997, 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. */ - -#if !defined _SYS_WAIT_H && !defined _STDLIB_H -# error "Never include <bits/waitstatus.h> directly; use <sys/wait.h> instead." -#endif - - -/* Everything extant so far uses these same bits. */ - - -/* If WIFEXITED(STATUS), the low-order 8 bits of the status. */ -#define __WEXITSTATUS(status) (((status) & 0xff00) >> 8) - -/* If WIFSIGNALED(STATUS), the terminating signal. */ -#define __WTERMSIG(status) ((status) & 0x7f) - -/* If WIFSTOPPED(STATUS), the signal that stopped the child. */ -#define __WSTOPSIG(status) __WEXITSTATUS(status) - -/* Nonzero if STATUS indicates normal termination. */ -#define __WIFEXITED(status) (__WTERMSIG(status) == 0) - -/* Nonzero if STATUS indicates termination by a signal. */ -#ifdef __GNUC__ -# define __WIFSIGNALED(status) \ - (__extension__ ({ int __status = (status); \ - !__WIFSTOPPED(__status) && !__WIFEXITED(__status); })) -#else /* Not GCC. */ -# define __WIFSIGNALED(status) (!__WIFSTOPPED(status) && !__WIFEXITED(status)) -#endif /* GCC. */ - -/* Nonzero if STATUS indicates the child is stopped. */ -#define __WIFSTOPPED(status) (((status) & 0xff) == 0x7f) - -/* Nonzero if STATUS indicates the child dumped core. */ -#define __WCOREDUMP(status) ((status) & __WCOREFLAG) - -/* Macros for constructing status values. */ -#define __W_EXITCODE(ret, sig) ((ret) << 8 | (sig)) -#define __W_STOPCODE(sig) ((sig) << 8 | 0x7f) -#define __WCOREFLAG 0x80 - - -#ifdef __USE_BSD - -# include <endian.h> - -union wait - { - int w_status; - struct - { -# if __BYTE_ORDER == __LITTLE_ENDIAN - unsigned int __w_termsig:7; /* Terminating signal. */ - unsigned int __w_coredump:1; /* Set if dumped core. */ - unsigned int __w_retcode:8; /* Return code if exited normally. */ - unsigned int:16; -# endif /* Little endian. */ -# if __BYTE_ORDER == __BIG_ENDIAN - unsigned int:16; - unsigned int __w_retcode:8; - unsigned int __w_coredump:1; - unsigned int __w_termsig:7; -# endif /* Big endian. */ - } __wait_terminated; - struct - { -# if __BYTE_ORDER == __LITTLE_ENDIAN - unsigned int __w_stopval:8; /* W_STOPPED if stopped. */ - unsigned int __w_stopsig:8; /* Stopping signal. */ - unsigned int:16; -# endif /* Little endian. */ -# if __BYTE_ORDER == __BIG_ENDIAN - unsigned int:16; - unsigned int __w_stopsig:8; /* Stopping signal. */ - unsigned int __w_stopval:8; /* W_STOPPED if stopped. */ -# endif /* Big endian. */ - } __wait_stopped; - }; - -# define w_termsig __wait_terminated.__w_termsig -# define w_coredump __wait_terminated.__w_coredump -# define w_retcode __wait_terminated.__w_retcode -# define w_stopsig __wait_stopped.__w_stopsig -# define w_stopval __wait_stopped.__w_stopval - -#endif /* Use BSD. */ diff --git a/libc/sysdeps/linux/sh/bits/wchar.h b/libc/sysdeps/linux/sh/bits/wchar.h deleted file mode 100644 index ef1f56363..000000000 --- a/libc/sysdeps/linux/sh/bits/wchar.h +++ /dev/null @@ -1,26 +0,0 @@ -/* wchar_t type related definitions. - Copyright (C) 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 _BITS_WCHAR_H -#define _BITS_WCHAR_H 1 - -#define __WCHAR_MIN (-2147483647 - 1) -#define __WCHAR_MAX (2147483647) - -#endif /* bits/wchar.h */ diff --git a/libc/sysdeps/linux/sh/bits/xopen_lim.h b/libc/sysdeps/linux/sh/bits/xopen_lim.h deleted file mode 100644 index 7f3611860..000000000 --- a/libc/sysdeps/linux/sh/bits/xopen_lim.h +++ /dev/null @@ -1,144 +0,0 @@ -/* Copyright (C) 1996, 1997, 1999, 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. */ - -/* - * Never include this file directly; use <limits.h> instead. - */ - -/* Additional definitions from X/Open Portability Guide, Issue 4, Version 2 - System Interfaces and Headers, 4.16 <limits.h> - - Please note only the values which are not greater than the minimum - stated in the standard document are listed. The `sysconf' functions - should be used to obtain the actual value. */ - -#ifndef _XOPEN_LIM_H -#define _XOPEN_LIM_H 1 - -#define __need_IOV_MAX -#include <bits/stdio_lim.h> - -/* We do not provide fixed values for - - ARG_MAX Maximum length of argument to the `exec' function - including environment data. - - ATEXIT_MAX Maximum number of functions that may be registered - with `atexit'. - - CHILD_MAX Maximum number of simultaneous processes per real - user ID. - - OPEN_MAX Maximum number of files that one process can have open - at anyone time. - - PAGESIZE - PAGE_SIZE Size of bytes of a page. - - PASS_MAX Maximum number of significant bytes in a password. - - We only provide a fixed limit for - - IOV_MAX Maximum number of `iovec' structures that one process has - available for use with `readv' or writev'. - - if this is indeed fixed by the underlying system. -*/ - - -/* Maximum number of `iovec' structures that one process has available - for use with `readv' or writev'. */ -#define _XOPEN_IOV_MAX _POSIX_UIO_MAXIOV - - -/* Maximum value of `digit' in calls to the `printf' and `scanf' - functions. We have no limit, so return a reasonable value. */ -#define NL_ARGMAX _POSIX_ARG_MAX - -/* Maximum number of bytes in a `LANG' name. We have no limit. */ -#define NL_LANGMAX _POSIX2_LINE_MAX - -/* Maximum message number. We have no limit. */ -#define NL_MSGMAX INT_MAX - -/* Maximum number of bytes in N-to-1 collation mapping. We have no - limit. */ -#define NL_NMAX INT_MAX - -/* Maximum set number. We have no limit. */ -#define NL_SETMAX INT_MAX - -/* Maximum number of bytes in a message. We have no limit. */ -#define NL_TEXTMAX INT_MAX - -/* Default process priority. */ -#define NZERO 20 - - -/* Number of bits in a word of type `int'. */ -#ifdef INT_MAX -# if INT_MAX == 32767 -# define WORD_BIT 16 -# else -# if INT_MAX == 2147483647 -# define WORD_BIT 32 -# else -/* Safe assumption. */ -# define WORD_BIT 64 -# endif -# endif -#elif defined __INT_MAX__ -# if __INT_MAX__ == 32767 -# define WORD_BIT 16 -# else -# if __INT_MAX__ == 2147483647 -# define WORD_BIT 32 -# else -/* Safe assumption. */ -# define WORD_BIT 64 -# endif -# endif -#else -# define WORD_BIT 32 -#endif - -/* Number of bits in a word of type `long int'. */ -#ifdef LONG_MAX -# if LONG_MAX == 2147483647 -# define LONG_BIT 32 -# else -/* Safe assumption. */ -# define LONG_BIT 64 -# endif -#elif defined __LONG_MAX__ -# if __LONG_MAX__ == 2147483647 -# define LONG_BIT 32 -# else -/* Safe assumption. */ -# define LONG_BIT 64 -# endif -#else -# include <bits/wordsize.h> -# if __WORDSIZE == 64 -# define LONG_BIT 64 -# else -# define LONG_BIT 32 -# endif -#endif - -#endif /* bits/xopen_lim.h */ diff --git a/libc/sysdeps/linux/sh/sys/io.h b/libc/sysdeps/linux/sh/sys/io.h new file mode 100644 index 000000000..6fdc44ff8 --- /dev/null +++ b/libc/sysdeps/linux/sh/sys/io.h @@ -0,0 +1,48 @@ +/* Copyright (C) 1996, 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. */ + +#ifndef _SYS_IO_H + +#define _SYS_IO_H 1 +#include <features.h> + +__BEGIN_DECLS + +/* If TURN_ON is TRUE, request for permission to do direct i/o on the + port numbers in the range [FROM,FROM+NUM-1]. Otherwise, turn I/O + permission off for that range. This call requires root privileges. */ +extern int ioperm (unsigned long int __from, unsigned long int __num, + int __turn_on) __THROW; + +/* Set the I/O privilege level to LEVEL. If LEVEL is nonzero, + permission to access any I/O port is granted. This call requires + root privileges. */ +extern int iopl (int __level) __THROW; + +/* The functions that actually perform reads and writes. */ +extern unsigned char inb (unsigned long int port) __THROW; +extern unsigned short int inw (unsigned long int port) __THROW; +extern unsigned long int inl (unsigned long int port) __THROW; + +extern void outb (unsigned char value, unsigned long int port) __THROW; +extern void outw (unsigned short value, unsigned long int port) __THROW; +extern void outl (unsigned long value, unsigned long int port) __THROW; + +__END_DECLS + +#endif /* _SYS_IO_H */ diff --git a/libc/sysdeps/linux/sh/sys/ucontext.h b/libc/sysdeps/linux/sh/sys/ucontext.h new file mode 100644 index 000000000..78729c48f --- /dev/null +++ b/libc/sysdeps/linux/sh/sys/ucontext.h @@ -0,0 +1,109 @@ +/* Copyright (C) 1999, 2000, 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. */ + +/* Where is System V/SH ABI? */ + +#ifndef _SYS_UCONTEXT_H +#define _SYS_UCONTEXT_H 1 + +#include <features.h> +#include <signal.h> + +/* We need the signal context definitions even if they are not used + included in <signal.h>. */ +#include <bits/sigcontext.h> + + +typedef int greg_t; + +/* Number of general registers. */ +#define NFPREG 16 + +/* Container for all general registers. */ +typedef greg_t gregset_t[NFPREG]; + +#ifdef __USE_GNU +/* Number of each register is the `gregset_t' array. */ +enum +{ + R0 = 0, +#define R0 R0 + R1 = 1, +#define R1 R1 + R2 = 2, +#define R2 R2 + R3 = 3, +#define R3 R3 + R4 = 4, +#define R4 R4 + R5 = 5, +#define R5 R5 + R6 = 6, +#define R6 R6 + R7 = 7, +#define R7 R7 + R8 = 8, +#define R8 R8 + R9 = 9, +#define R9 R9 + R10 = 10, +#define R10 R10 + R11 = 11, +#define R11 R11 + R12 = 12, +#define R12 R12 + R13 = 13, +#define R13 R13 + R14 = 14, +#define R14 R14 + R15 = 15, +#define R15 R15 +}; +#endif + +typedef int freg_t; + +/* Number of FPU registers. */ +#define NFPREG 16 + +/* Structure to describe FPU registers. */ +typedef freg_t fpregset_t[NFPREG]; + +/* Context to describe whole processor state. */ +typedef struct + { + gregset_t gregs; + fpregset_t fpregs; + fpregset_t xfpregs; + unsigned int fpscr; + unsigned int fpul; + unsigned int macl; + unsigned int mach; + } mcontext_t; + +/* Userlevel context. */ +typedef struct ucontext + { + unsigned long int uc_flags; + struct ucontext *uc_link; + stack_t uc_stack; + mcontext_t uc_mcontext; + __sigset_t uc_sigmask; + } ucontext_t; + +#endif /* sys/ucontext.h */ diff --git a/libc/sysdeps/linux/v850/bits/wordsize.h b/libc/sysdeps/linux/sh/sys/user.h index ba643b60a..522475f79 100644 --- a/libc/sysdeps/linux/v850/bits/wordsize.h +++ b/libc/sysdeps/linux/sh/sys/user.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1999 Free Software Foundation, Inc. +/* Copyright (C) 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 @@ -16,4 +16,11 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#define __WORDSIZE 32 +#ifndef _SYS_USER_H +#define _SYS_USER_H 1 + +#include <features.h> + +#include <asm/user.h> + +#endif /* sys/user.h */ diff --git a/libc/sysdeps/linux/sparc/bits/byteswap.h b/libc/sysdeps/linux/sparc/bits/byteswap.h deleted file mode 100644 index 7866abe9c..000000000 --- a/libc/sysdeps/linux/sparc/bits/byteswap.h +++ /dev/null @@ -1,79 +0,0 @@ -/* Macros to swap the order of bytes in integer values. - Copyright (C) 1997, 1998, 2000, 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. */ - -#if !defined _BYTESWAP_H && !defined _NETINET_IN_H -# error "Never use <bits/byteswap.h> directly; include <byteswap.h> instead." -#endif - -/* Swap bytes in 16 bit value. */ -#ifdef __GNUC__ -# define __bswap_16(x) \ - (__extension__ \ - ({ unsigned short int __bsx = (x); \ - ((((__bsx) >> 8) & 0xff) | (((__bsx) & 0xff) << 8)); })) -#else -static __inline unsigned short int -__bswap_16 (unsigned short int __bsx) -{ - return ((((__bsx) >> 8) & 0xff) | (((__bsx) & 0xff) << 8)); -} -#endif - -/* Swap bytes in 32 bit value. */ -#ifdef __GNUC__ -# define __bswap_32(x) \ - (__extension__ \ - ({ unsigned int __bsx = (x); \ - ((((__bsx) & 0xff000000) >> 24) | (((__bsx) & 0x00ff0000) >> 8) | \ - (((__bsx) & 0x0000ff00) << 8) | (((__bsx) & 0x000000ff) << 24)); })) -#else -static __inline unsigned int -__bswap_32 (unsigned int __bsx) -{ - return ((((__bsx) & 0xff000000) >> 24) | (((__bsx) & 0x00ff0000) >> 8) | - (((__bsx) & 0x0000ff00) << 8) | (((__bsx) & 0x000000ff) << 24)); -} -#endif - -#if defined __GNUC__ && __GNUC__ >= 2 -/* Swap bytes in 64 bit value. */ -# define __bswap_constant_64(x) \ - ((((x) & 0xff00000000000000ull) >> 56) \ - | (((x) & 0x00ff000000000000ull) >> 40) \ - | (((x) & 0x0000ff0000000000ull) >> 24) \ - | (((x) & 0x000000ff00000000ull) >> 8) \ - | (((x) & 0x00000000ff000000ull) << 8) \ - | (((x) & 0x0000000000ff0000ull) << 24) \ - | (((x) & 0x000000000000ff00ull) << 40) \ - | (((x) & 0x00000000000000ffull) << 56)) - -# define __bswap_64(x) \ - (__extension__ \ - ({ union { __extension__ unsigned long long int __ll; \ - unsigned int __l[2]; } __w, __r; \ - if (__builtin_constant_p (x)) \ - __r.__ll = __bswap_constant_64 (x); \ - else \ - { \ - __w.__ll = (x); \ - __r.__l[0] = __bswap_32 (__w.__l[1]); \ - __r.__l[1] = __bswap_32 (__w.__l[0]); \ - } \ - __r.__ll; })) -#endif diff --git a/libc/sysdeps/linux/sparc/bits/cmathcalls.h b/libc/sysdeps/linux/sparc/bits/cmathcalls.h deleted file mode 100644 index c680c6d8e..000000000 --- a/libc/sysdeps/linux/sparc/bits/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/libc/sysdeps/linux/sparc/bits/confname.h b/libc/sysdeps/linux/sparc/bits/confname.h deleted file mode 100644 index ba8868af4..000000000 --- a/libc/sysdeps/linux/sparc/bits/confname.h +++ /dev/null @@ -1,566 +0,0 @@ -/* `sysconf', `pathconf', and `confstr' NAME values. Generic version. - Copyright (C) 1993, 1995-1998, 2000, 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. */ - -#ifndef _UNISTD_H -# error "Never use <bits/confname.h> directly; include <unistd.h> instead." -#endif - -/* Values for the NAME argument to `pathconf' and `fpathconf'. */ -enum - { - _PC_LINK_MAX, -#define _PC_LINK_MAX _PC_LINK_MAX - _PC_MAX_CANON, -#define _PC_MAX_CANON _PC_MAX_CANON - _PC_MAX_INPUT, -#define _PC_MAX_INPUT _PC_MAX_INPUT - _PC_NAME_MAX, -#define _PC_NAME_MAX _PC_NAME_MAX - _PC_PATH_MAX, -#define _PC_PATH_MAX _PC_PATH_MAX - _PC_PIPE_BUF, -#define _PC_PIPE_BUF _PC_PIPE_BUF - _PC_CHOWN_RESTRICTED, -#define _PC_CHOWN_RESTRICTED _PC_CHOWN_RESTRICTED - _PC_NO_TRUNC, -#define _PC_NO_TRUNC _PC_NO_TRUNC - _PC_VDISABLE, -#define _PC_VDISABLE _PC_VDISABLE - _PC_SYNC_IO, -#define _PC_SYNC_IO _PC_SYNC_IO - _PC_ASYNC_IO, -#define _PC_ASYNC_IO _PC_ASYNC_IO - _PC_PRIO_IO, -#define _PC_PRIO_IO _PC_PRIO_IO - _PC_SOCK_MAXBUF, -#define _PC_SOCK_MAXBUF _PC_SOCK_MAXBUF - _PC_FILESIZEBITS, -#define _PC_FILESIZEBITS _PC_FILESIZEBITS - _PC_REC_INCR_XFER_SIZE, -#define _PC_REC_INCR_XFER_SIZE _PC_REC_INCR_XFER_SIZE - _PC_REC_MAX_XFER_SIZE, -#define _PC_REC_MAX_XFER_SIZE _PC_REC_MAX_XFER_SIZE - _PC_REC_MIN_XFER_SIZE, -#define _PC_REC_MIN_XFER_SIZE _PC_REC_MIN_XFER_SIZE - _PC_REC_XFER_ALIGN, -#define _PC_REC_XFER_ALIGN _PC_REC_XFER_ALIGN - _PC_ALLOC_SIZE_MIN, -#define _PC_ALLOC_SIZE_MIN _PC_ALLOC_SIZE_MIN - _PC_SYMLINK_MAX -#define _PC_SYMLINK_MAX _PC_SYMLINK_MAX - }; - -/* Values for the argument to `sysconf'. */ -enum - { - _SC_ARG_MAX, -#define _SC_ARG_MAX _SC_ARG_MAX - _SC_CHILD_MAX, -#define _SC_CHILD_MAX _SC_CHILD_MAX - _SC_CLK_TCK, -#define _SC_CLK_TCK _SC_CLK_TCK - _SC_NGROUPS_MAX, -#define _SC_NGROUPS_MAX _SC_NGROUPS_MAX - _SC_OPEN_MAX, -#define _SC_OPEN_MAX _SC_OPEN_MAX - _SC_STREAM_MAX, -#define _SC_STREAM_MAX _SC_STREAM_MAX - _SC_TZNAME_MAX, -#define _SC_TZNAME_MAX _SC_TZNAME_MAX - _SC_JOB_CONTROL, -#define _SC_JOB_CONTROL _SC_JOB_CONTROL - _SC_SAVED_IDS, -#define _SC_SAVED_IDS _SC_SAVED_IDS - _SC_REALTIME_SIGNALS, -#define _SC_REALTIME_SIGNALS _SC_REALTIME_SIGNALS - _SC_PRIORITY_SCHEDULING, -#define _SC_PRIORITY_SCHEDULING _SC_PRIORITY_SCHEDULING - _SC_TIMERS, -#define _SC_TIMERS _SC_TIMERS - _SC_ASYNCHRONOUS_IO, -#define _SC_ASYNCHRONOUS_IO _SC_ASYNCHRONOUS_IO - _SC_PRIORITIZED_IO, -#define _SC_PRIORITIZED_IO _SC_PRIORITIZED_IO - _SC_SYNCHRONIZED_IO, -#define _SC_SYNCHRONIZED_IO _SC_SYNCHRONIZED_IO - _SC_FSYNC, -#define _SC_FSYNC _SC_FSYNC - _SC_MAPPED_FILES, -#define _SC_MAPPED_FILES _SC_MAPPED_FILES - _SC_MEMLOCK, -#define _SC_MEMLOCK _SC_MEMLOCK - _SC_MEMLOCK_RANGE, -#define _SC_MEMLOCK_RANGE _SC_MEMLOCK_RANGE - _SC_MEMORY_PROTECTION, -#define _SC_MEMORY_PROTECTION _SC_MEMORY_PROTECTION - _SC_MESSAGE_PASSING, -#define _SC_MESSAGE_PASSING _SC_MESSAGE_PASSING - _SC_SEMAPHORES, -#define _SC_SEMAPHORES _SC_SEMAPHORES - _SC_SHARED_MEMORY_OBJECTS, -#define _SC_SHARED_MEMORY_OBJECTS _SC_SHARED_MEMORY_OBJECTS - _SC_AIO_LISTIO_MAX, -#define _SC_AIO_LISTIO_MAX _SC_AIO_LISTIO_MAX - _SC_AIO_MAX, -#define _SC_AIO_MAX _SC_AIO_MAX - _SC_AIO_PRIO_DELTA_MAX, -#define _SC_AIO_PRIO_DELTA_MAX _SC_AIO_PRIO_DELTA_MAX - _SC_DELAYTIMER_MAX, -#define _SC_DELAYTIMER_MAX _SC_DELAYTIMER_MAX - _SC_MQ_OPEN_MAX, -#define _SC_MQ_OPEN_MAX _SC_MQ_OPEN_MAX - _SC_MQ_PRIO_MAX, -#define _SC_MQ_PRIO_MAX _SC_MQ_PRIO_MAX - _SC_VERSION, -#define _SC_VERSION _SC_VERSION - _SC_PAGESIZE, -#define _SC_PAGESIZE _SC_PAGESIZE -#define _SC_PAGE_SIZE _SC_PAGESIZE - _SC_RTSIG_MAX, -#define _SC_RTSIG_MAX _SC_RTSIG_MAX - _SC_SEM_NSEMS_MAX, -#define _SC_SEM_NSEMS_MAX _SC_SEM_NSEMS_MAX - _SC_SEM_VALUE_MAX, -#define _SC_SEM_VALUE_MAX _SC_SEM_VALUE_MAX - _SC_SIGQUEUE_MAX, -#define _SC_SIGQUEUE_MAX _SC_SIGQUEUE_MAX - _SC_TIMER_MAX, -#define _SC_TIMER_MAX _SC_TIMER_MAX - - /* Values for the argument to `sysconf' - corresponding to _POSIX2_* symbols. */ - _SC_BC_BASE_MAX, -#define _SC_BC_BASE_MAX _SC_BC_BASE_MAX - _SC_BC_DIM_MAX, -#define _SC_BC_DIM_MAX _SC_BC_DIM_MAX - _SC_BC_SCALE_MAX, -#define _SC_BC_SCALE_MAX _SC_BC_SCALE_MAX - _SC_BC_STRING_MAX, -#define _SC_BC_STRING_MAX _SC_BC_STRING_MAX - _SC_COLL_WEIGHTS_MAX, -#define _SC_COLL_WEIGHTS_MAX _SC_COLL_WEIGHTS_MAX - _SC_EQUIV_CLASS_MAX, -#define _SC_EQUIV_CLASS_MAX _SC_EQUIV_CLASS_MAX - _SC_EXPR_NEST_MAX, -#define _SC_EXPR_NEST_MAX _SC_EXPR_NEST_MAX - _SC_LINE_MAX, -#define _SC_LINE_MAX _SC_LINE_MAX - _SC_RE_DUP_MAX, -#define _SC_RE_DUP_MAX _SC_RE_DUP_MAX - _SC_CHARCLASS_NAME_MAX, -#define _SC_CHARCLASS_NAME_MAX _SC_CHARCLASS_NAME_MAX - - _SC_2_VERSION, -#define _SC_2_VERSION _SC_2_VERSION - _SC_2_C_BIND, -#define _SC_2_C_BIND _SC_2_C_BIND - _SC_2_C_DEV, -#define _SC_2_C_DEV _SC_2_C_DEV - _SC_2_FORT_DEV, -#define _SC_2_FORT_DEV _SC_2_FORT_DEV - _SC_2_FORT_RUN, -#define _SC_2_FORT_RUN _SC_2_FORT_RUN - _SC_2_SW_DEV, -#define _SC_2_SW_DEV _SC_2_SW_DEV - _SC_2_LOCALEDEF, -#define _SC_2_LOCALEDEF _SC_2_LOCALEDEF - - _SC_PII, -#define _SC_PII _SC_PII - _SC_PII_XTI, -#define _SC_PII_XTI _SC_PII_XTI - _SC_PII_SOCKET, -#define _SC_PII_SOCKET _SC_PII_SOCKET - _SC_PII_INTERNET, -#define _SC_PII_INTERNET _SC_PII_INTERNET - _SC_PII_OSI, -#define _SC_PII_OSI _SC_PII_OSI - _SC_POLL, -#define _SC_POLL _SC_POLL - _SC_SELECT, -#define _SC_SELECT _SC_SELECT - _SC_UIO_MAXIOV, -#define _SC_UIO_MAXIOV _SC_UIO_MAXIOV - _SC_IOV_MAX = _SC_UIO_MAXIOV, -#define _SC_IOV_MAX _SC_IOV_MAX - _SC_PII_INTERNET_STREAM, -#define _SC_PII_INTERNET_STREAM _SC_PII_INTERNET_STREAM - _SC_PII_INTERNET_DGRAM, -#define _SC_PII_INTERNET_DGRAM _SC_PII_INTERNET_DGRAM - _SC_PII_OSI_COTS, -#define _SC_PII_OSI_COTS _SC_PII_OSI_COTS - _SC_PII_OSI_CLTS, -#define _SC_PII_OSI_CLTS _SC_PII_OSI_CLTS - _SC_PII_OSI_M, -#define _SC_PII_OSI_M _SC_PII_OSI_M - _SC_T_IOV_MAX, -#define _SC_T_IOV_MAX _SC_T_IOV_MAX - - /* Values according to POSIX 1003.1c (POSIX threads). */ - _SC_THREADS, -#define _SC_THREADS _SC_THREADS - _SC_THREAD_SAFE_FUNCTIONS, -#define _SC_THREAD_SAFE_FUNCTIONS _SC_THREAD_SAFE_FUNCTIONS - _SC_GETGR_R_SIZE_MAX, -#define _SC_GETGR_R_SIZE_MAX _SC_GETGR_R_SIZE_MAX - _SC_GETPW_R_SIZE_MAX, -#define _SC_GETPW_R_SIZE_MAX _SC_GETPW_R_SIZE_MAX - _SC_LOGIN_NAME_MAX, -#define _SC_LOGIN_NAME_MAX _SC_LOGIN_NAME_MAX - _SC_TTY_NAME_MAX, -#define _SC_TTY_NAME_MAX _SC_TTY_NAME_MAX - _SC_THREAD_DESTRUCTOR_ITERATIONS, -#define _SC_THREAD_DESTRUCTOR_ITERATIONS _SC_THREAD_DESTRUCTOR_ITERATIONS - _SC_THREAD_KEYS_MAX, -#define _SC_THREAD_KEYS_MAX _SC_THREAD_KEYS_MAX - _SC_THREAD_STACK_MIN, -#define _SC_THREAD_STACK_MIN _SC_THREAD_STACK_MIN - _SC_THREAD_THREADS_MAX, -#define _SC_THREAD_THREADS_MAX _SC_THREAD_THREADS_MAX - _SC_THREAD_ATTR_STACKADDR, -#define _SC_THREAD_ATTR_STACKADDR _SC_THREAD_ATTR_STACKADDR - _SC_THREAD_ATTR_STACKSIZE, -#define _SC_THREAD_ATTR_STACKSIZE _SC_THREAD_ATTR_STACKSIZE - _SC_THREAD_PRIORITY_SCHEDULING, -#define _SC_THREAD_PRIORITY_SCHEDULING _SC_THREAD_PRIORITY_SCHEDULING - _SC_THREAD_PRIO_INHERIT, -#define _SC_THREAD_PRIO_INHERIT _SC_THREAD_PRIO_INHERIT - _SC_THREAD_PRIO_PROTECT, -#define _SC_THREAD_PRIO_PROTECT _SC_THREAD_PRIO_PROTECT - _SC_THREAD_PROCESS_SHARED, -#define _SC_THREAD_PROCESS_SHARED _SC_THREAD_PROCESS_SHARED - - _SC_NPROCESSORS_CONF, -#define _SC_NPROCESSORS_CONF _SC_NPROCESSORS_CONF - _SC_NPROCESSORS_ONLN, -#define _SC_NPROCESSORS_ONLN _SC_NPROCESSORS_ONLN - _SC_PHYS_PAGES, -#define _SC_PHYS_PAGES _SC_PHYS_PAGES - _SC_AVPHYS_PAGES, -#define _SC_AVPHYS_PAGES _SC_AVPHYS_PAGES - _SC_ATEXIT_MAX, -#define _SC_ATEXIT_MAX _SC_ATEXIT_MAX - _SC_PASS_MAX, -#define _SC_PASS_MAX _SC_PASS_MAX - - _SC_XOPEN_VERSION, -#define _SC_XOPEN_VERSION _SC_XOPEN_VERSION - _SC_XOPEN_XCU_VERSION, -#define _SC_XOPEN_XCU_VERSION _SC_XOPEN_XCU_VERSION - _SC_XOPEN_UNIX, -#define _SC_XOPEN_UNIX _SC_XOPEN_UNIX - _SC_XOPEN_CRYPT, -#define _SC_XOPEN_CRYPT _SC_XOPEN_CRYPT - _SC_XOPEN_ENH_I18N, -#define _SC_XOPEN_ENH_I18N _SC_XOPEN_ENH_I18N - _SC_XOPEN_SHM, -#define _SC_XOPEN_SHM _SC_XOPEN_SHM - - _SC_2_CHAR_TERM, -#define _SC_2_CHAR_TERM _SC_2_CHAR_TERM - _SC_2_C_VERSION, -#define _SC_2_C_VERSION _SC_2_C_VERSION - _SC_2_UPE, -#define _SC_2_UPE _SC_2_UPE - - _SC_XOPEN_XPG2, -#define _SC_XOPEN_XPG2 _SC_XOPEN_XPG2 - _SC_XOPEN_XPG3, -#define _SC_XOPEN_XPG3 _SC_XOPEN_XPG3 - _SC_XOPEN_XPG4, -#define _SC_XOPEN_XPG4 _SC_XOPEN_XPG4 - - _SC_CHAR_BIT, -#define _SC_CHAR_BIT _SC_CHAR_BIT - _SC_CHAR_MAX, -#define _SC_CHAR_MAX _SC_CHAR_MAX - _SC_CHAR_MIN, -#define _SC_CHAR_MIN _SC_CHAR_MIN - _SC_INT_MAX, -#define _SC_INT_MAX _SC_INT_MAX - _SC_INT_MIN, -#define _SC_INT_MIN _SC_INT_MIN - _SC_LONG_BIT, -#define _SC_LONG_BIT _SC_LONG_BIT - _SC_WORD_BIT, -#define _SC_WORD_BIT _SC_WORD_BIT - _SC_MB_LEN_MAX, -#define _SC_MB_LEN_MAX _SC_MB_LEN_MAX - _SC_NZERO, -#define _SC_NZERO _SC_NZERO - _SC_SSIZE_MAX, -#define _SC_SSIZE_MAX _SC_SSIZE_MAX - _SC_SCHAR_MAX, -#define _SC_SCHAR_MAX _SC_SCHAR_MAX - _SC_SCHAR_MIN, -#define _SC_SCHAR_MIN _SC_SCHAR_MIN - _SC_SHRT_MAX, -#define _SC_SHRT_MAX _SC_SHRT_MAX - _SC_SHRT_MIN, -#define _SC_SHRT_MIN _SC_SHRT_MIN - _SC_UCHAR_MAX, -#define _SC_UCHAR_MAX _SC_UCHAR_MAX - _SC_UINT_MAX, -#define _SC_UINT_MAX _SC_UINT_MAX - _SC_ULONG_MAX, -#define _SC_ULONG_MAX _SC_ULONG_MAX - _SC_USHRT_MAX, -#define _SC_USHRT_MAX _SC_USHRT_MAX - - _SC_NL_ARGMAX, -#define _SC_NL_ARGMAX _SC_NL_ARGMAX - _SC_NL_LANGMAX, -#define _SC_NL_LANGMAX _SC_NL_LANGMAX - _SC_NL_MSGMAX, -#define _SC_NL_MSGMAX _SC_NL_MSGMAX - _SC_NL_NMAX, -#define _SC_NL_NMAX _SC_NL_NMAX - _SC_NL_SETMAX, -#define _SC_NL_SETMAX _SC_NL_SETMAX - _SC_NL_TEXTMAX, -#define _SC_NL_TEXTMAX _SC_NL_TEXTMAX - - _SC_XBS5_ILP32_OFF32, -#define _SC_XBS5_ILP32_OFF32 _SC_XBS5_ILP32_OFF32 - _SC_XBS5_ILP32_OFFBIG, -#define _SC_XBS5_ILP32_OFFBIG _SC_XBS5_ILP32_OFFBIG - _SC_XBS5_LP64_OFF64, -#define _SC_XBS5_LP64_OFF64 _SC_XBS5_LP64_OFF64 - _SC_XBS5_LPBIG_OFFBIG, -#define _SC_XBS5_LPBIG_OFFBIG _SC_XBS5_LPBIG_OFFBIG - - _SC_XOPEN_LEGACY, -#define _SC_XOPEN_LEGACY _SC_XOPEN_LEGACY - _SC_XOPEN_REALTIME, -#define _SC_XOPEN_REALTIME _SC_XOPEN_REALTIME - _SC_XOPEN_REALTIME_THREADS, -#define _SC_XOPEN_REALTIME_THREADS _SC_XOPEN_REALTIME_THREADS - - _SC_ADVISORY_INFO, -#define _SC_ADVISORY_INFO _SC_ADVISORY_INFO - _SC_BARRIERS, -#define _SC_BARRIERS _SC_BARRIERS - _SC_BASE, -#define _SC_BASE _SC_BASE - _SC_C_LANG_SUPPORT, -#define _SC_C_LANG_SUPPORT _SC_C_LANG_SUPPORT - _SC_C_LANG_SUPPORT_R, -#define _SC_C_LANG_SUPPORT_R _SC_C_LANG_SUPPORT_R - _SC_CLOCK_SELECTION, -#define _SC_CLOCK_SELECTION _SC_CLOCK_SELECTION - _SC_CPUTIME, -#define _SC_CPUTIME _SC_CPUTIME - _SC_THREAD_CPUTIME, -#define _SC_THREAD_CPUTIME _SC_THREAD_CPUTIME - _SC_DEVICE_IO, -#define _SC_DEVICE_IO _SC_DEVICE_IO - _SC_DEVICE_SPECIFIC, -#define _SC_DEVICE_SPECIFIC _SC_DEVICE_SPECIFIC - _SC_DEVICE_SPECIFIC_R, -#define _SC_DEVICE_SPECIFIC_R _SC_DEVICE_SPECIFIC_R - _SC_FD_MGMT, -#define _SC_FD_MGMT _SC_FD_MGMT - _SC_FIFO, -#define _SC_FIFO _SC_FIFO - _SC_PIPE, -#define _SC_PIPE _SC_PIPE - _SC_FILE_ATTRIBUTES, -#define _SC_FILE_ATTRIBUTES _SC_FILE_ATTRIBUTES - _SC_FILE_LOCKING, -#define _SC_FILE_LOCKING _SC_FILE_LOCKING - _SC_FILE_SYSTEM, -#define _SC_FILE_SYSTEM _SC_FILE_SYSTEM - _SC_MONOTONIC_CLOCK, -#define _SC_MONOTONIC_CLOCK _SC_MONOTONIC_CLOCK - _SC_MULTI_PROCESS, -#define _SC_MULTI_PROCESS _SC_MULTI_PROCESS - _SC_SINGLE_PROCESS, -#define _SC_SINGLE_PROCESS _SC_SINGLE_PROCESS - _SC_NETWORKING, -#define _SC_NETWORKING _SC_NETWORKING - _SC_READER_WRITER_LOCKS, -#define _SC_READER_WRITER_LOCKS _SC_READER_WRITER_LOCKS - _SC_SPIN_LOCKS, -#define _SC_SPIN_LOCKS _SC_SPIN_LOCKS - _SC_REGEXP, -#define _SC_REGEXP _SC_REGEXP - _SC_REGEX_VERSION, -#define _SC_REGEX_VERSION _SC_REGEX_VERSION - _SC_SHELL, -#define _SC_SHELL _SC_SHELL - _SC_SIGNALS, -#define _SC_SIGNALS _SC_SIGNALS - _SC_SPAWN, -#define _SC_SPAWN _SC_SPAWN - _SC_SPORADIC_SERVER, -#define _SC_SPORADIC_SERVER _SC_SPORADIC_SERVER - _SC_THREAD_SPORADIC_SERVER, -#define _SC_THREAD_SPORADIC_SERVER _SC_THREAD_SPORADIC_SERVER - _SC_SYSTEM_DATABASE, -#define _SC_SYSTEM_DATABASE _SC_SYSTEM_DATABASE - _SC_SYSTEM_DATABASE_R, -#define _SC_SYSTEM_DATABASE_R _SC_SYSTEM_DATABASE_R - _SC_TIMEOUTS, -#define _SC_TIMEOUTS _SC_TIMEOUTS - _SC_TYPED_MEMORY_OBJECTS, -#define _SC_TYPED_MEMORY_OBJECTS _SC_TYPED_MEMORY_OBJECTS - _SC_USER_GROUPS, -#define _SC_USER_GROUPS _SC_USER_GROUPS - _SC_USER_GROUPS_R, -#define _SC_USER_GROUPS_R _SC_USER_GROUPS_R - _SC_2_PBS, -#define _SC_2_PBS _SC_2_PBS - _SC_2_PBS_ACCOUNTING, -#define _SC_2_PBS_ACCOUNTING _SC_2_PBS_ACCOUNTING - _SC_2_PBS_LOCATE, -#define _SC_2_PBS_LOCATE _SC_2_PBS_LOCATE - _SC_2_PBS_MESSAGE, -#define _SC_2_PBS_MESSAGE _SC_2_PBS_MESSAGE - _SC_2_PBS_TRACK, -#define _SC_2_PBS_TRACK _SC_2_PBS_TRACK - _SC_SYMLOOP_MAX, -#define _SC_SYMLOOP_MAX _SC_SYMLOOP_MAX - _SC_STREAMS, -#define _SC_STREAMS _SC_STREAMS - _SC_2_PBS_CHECKPOINT, -#define _SC_2_PBS_CHECKPOINT _SC_2_PBS_CHECKPOINT - - _SC_V6_ILP32_OFF32, -#define _SC_V6_ILP32_OFF32 _SC_V6_ILP32_OFF32 - _SC_V6_ILP32_OFFBIG, -#define _SC_V6_ILP32_OFFBIG _SC_V6_ILP32_OFFBIG - _SC_V6_LP64_OFF64, -#define _SC_V6_LP64_OFF64 _SC_V6_LP64_OFF64 - _SC_V6_LPBIG_OFFBIG, -#define _SC_V6_LPBIG_OFFBIG _SC_V6_LPBIG_OFFBIG - - _SC_HOST_NAME_MAX, -#define _SC_HOST_NAME_MAX _SC_HOST_NAME_MAX - _SC_TRACE, -#define _SC_TRACE _SC_TRACE - _SC_TRACE_EVENT_FILTER, -#define _SC_TRACE_EVENT_FILTER _SC_TRACE_EVENT_FILTER - _SC_TRACE_INHERIT, -#define _SC_TRACE_INHERIT _SC_TRACE_INHERIT - _SC_TRACE_LOG -#define _SC_TRACE_LOG _SC_TRACE_LOG - }; - -#if (defined __USE_POSIX2 || defined __USE_UNIX98 \ - || defined __USE_FILE_OFFSET64 || defined __USE_LARGEFILE64 \ - || defined __USE_LARGEFILE) -/* Values for the NAME argument to `confstr'. */ -enum - { - _CS_PATH, /* The default search path. */ -#define _CS_PATH _CS_PATH - -# if (defined __USE_FILE_OFFSET64 || defined __USE_LARGEFILE64 \ - || defined __USE_LARGEFILE) - _CS_LFS_CFLAGS = 1000, -# define _CS_LFS_CFLAGS _CS_LFS_CFLAGS - _CS_LFS_LDFLAGS, -# define _CS_LFS_LDFLAGS _CS_LFS_LDFLAGS - _CS_LFS_LIBS, -# define _CS_LFS_LIBS _CS_LFS_LIBS - _CS_LFS_LINTFLAGS, -# define _CS_LFS_LINTFLAGS _CS_LFS_LINTFLAGS - _CS_LFS64_CFLAGS, -# define _CS_LFS64_CFLAGS _CS_LFS64_CFLAGS - _CS_LFS64_LDFLAGS, -# define _CS_LFS64_LDFLAGS _CS_LFS64_LDFLAGS - _CS_LFS64_LIBS, -# define _CS_LFS64_LIBS _CS_LFS64_LIBS - _CS_LFS64_LINTFLAGS, -# define _CS_LFS64_LINTFLAGS _CS_LFS64_LINTFLAGS -# endif - -# ifdef __USE_UNIX98 - _CS_XBS5_ILP32_OFF32_CFLAGS = 1100, -# define _CS_XBS5_ILP32_OFF32_CFLAGS _CS_XBS5_ILP32_OFF32_CFLAGS - _CS_XBS5_ILP32_OFF32_LDFLAGS, -# define _CS_XBS5_ILP32_OFF32_LDFLAGS _CS_XBS5_ILP32_OFF32_LDFLAGS - _CS_XBS5_ILP32_OFF32_LIBS, -# define _CS_XBS5_ILP32_OFF32_LIBS _CS_XBS5_ILP32_OFF32_LIBS - _CS_XBS5_ILP32_OFF32_LINTFLAGS, -# define _CS_XBS5_ILP32_OFF32_LINTFLAGS _CS_XBS5_ILP32_OFF32_LINTFLAGS - _CS_XBS5_ILP32_OFFBIG_CFLAGS, -# define _CS_XBS5_ILP32_OFFBIG_CFLAGS _CS_XBS5_ILP32_OFFBIG_CFLAGS - _CS_XBS5_ILP32_OFFBIG_LDFLAGS, -# define _CS_XBS5_ILP32_OFFBIG_LDFLAGS _CS_XBS5_ILP32_OFFBIG_LDFLAGS - _CS_XBS5_ILP32_OFFBIG_LIBS, -# define _CS_XBS5_ILP32_OFFBIG_LIBS _CS_XBS5_ILP32_OFFBIG_LIBS - _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, -# define _CS_XBS5_ILP32_OFFBIG_LINTFLAGS _CS_XBS5_ILP32_OFFBIG_LINTFLAGS - _CS_XBS5_LP64_OFF64_CFLAGS, -# define _CS_XBS5_LP64_OFF64_CFLAGS _CS_XBS5_LP64_OFF64_CFLAGS - _CS_XBS5_LP64_OFF64_LDFLAGS, -# define _CS_XBS5_LP64_OFF64_LDFLAGS _CS_XBS5_LP64_OFF64_LDFLAGS - _CS_XBS5_LP64_OFF64_LIBS, -# define _CS_XBS5_LP64_OFF64_LIBS _CS_XBS5_LP64_OFF64_LIBS - _CS_XBS5_LP64_OFF64_LINTFLAGS, -# define _CS_XBS5_LP64_OFF64_LINTFLAGS _CS_XBS5_LP64_OFF64_LINTFLAGS - _CS_XBS5_LPBIG_OFFBIG_CFLAGS, -# define _CS_XBS5_LPBIG_OFFBIG_CFLAGS _CS_XBS5_LPBIG_OFFBIG_CFLAGS - _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, -# define _CS_XBS5_LPBIG_OFFBIG_LDFLAGS _CS_XBS5_LPBIG_OFFBIG_LDFLAGS - _CS_XBS5_LPBIG_OFFBIG_LIBS, -# define _CS_XBS5_LPBIG_OFFBIG_LIBS _CS_XBS5_LPBIG_OFFBIG_LIBS - _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, -# define _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS -# endif -# ifdef __USE_XOPEN2K - _CS_POSIX_V6_ILP32_OFF32_CFLAGS, -# define _CS_POSIX_V6_ILP32_OFF32_CFLAGS _CS_POSIX_V6_ILP32_OFF32_CFLAGS - _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, -# define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS _CS_POSIX_V6_ILP32_OFF32_LDFLAGS - _CS_POSIX_V6_ILP32_OFF32_LIBS, -# define _CS_POSIX_V6_ILP32_OFF32_LIBS _CS_POSIX_V6_ILP32_OFF32_LIBS - _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, -# define _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS - _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, -# define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS - _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, -# define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS - _CS_POSIX_V6_ILP32_OFFBIG_LIBS, -# define _CS_POSIX_V6_ILP32_OFFBIG_LIBS _CS_POSIX_V6_ILP32_OFFBIG_LIBS - _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, -# define _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS - _CS_POSIX_V6_LP64_OFF64_CFLAGS, -# define _CS_POSIX_V6_LP64_OFF64_CFLAGS _CS_POSIX_V6_LP64_OFF64_CFLAGS - _CS_POSIX_V6_LP64_OFF64_LDFLAGS, -# define _CS_POSIX_V6_LP64_OFF64_LDFLAGS _CS_POSIX_V6_LP64_OFF64_LDFLAGS - _CS_POSIX_V6_LP64_OFF64_LIBS, -# define _CS_POSIX_V6_LP64_OFF64_LIBS _CS_POSIX_V6_LP64_OFF64_LIBS - _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, -# define _CS_POSIX_V6_LP64_OFF64_LINTFLAGS _CS_POSIX_V6_LP64_OFF64_LINTFLAGS - _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, -# define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS - _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, -# define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS - _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, -# define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS _CS_POSIX_V6_LPBIG_OFFBIG_LIBS - _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS, -# define _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS -# endif - - _CS_V6_WIDTH_RESTRICTED_ENVS -# define _CS_V6_WIDTH_RESTRICTED_ENVS _CS_V6_WIDTH_RESTRICTED_ENVS - }; -#endif diff --git a/libc/sysdeps/linux/sparc/bits/dirent.h b/libc/sysdeps/linux/sparc/bits/dirent.h deleted file mode 100644 index 82d8663f2..000000000 --- a/libc/sysdeps/linux/sparc/bits/dirent.h +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright (C) 1996, 1997 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 _DIRENT_H -# error "Never use <bits/dirent.h> directly; include <dirent.h> instead." -#endif - -struct dirent - { -#ifndef __USE_FILE_OFFSET64 - __ino_t d_ino; - __off_t d_off; -#else - __ino64_t d_ino; - __off64_t d_off; -#endif - unsigned short int d_reclen; -#ifdef __USE_FILE_OFFSET64 - unsigned char d_type; -#endif - char d_name[256]; /* We must not include limits.h! */ - }; - -#ifdef __USE_LARGEFILE64 -struct dirent64 - { - __ino64_t d_ino; - __off64_t d_off; - unsigned short int d_reclen; - unsigned char d_type; - char d_name[256]; /* We must not include limits.h! */ - }; -#endif - -#define d_fileno d_ino /* Backwards compatibility. */ - -#undef _DIRENT_HAVE_D_NAMLEN -#define _DIRENT_HAVE_D_RECLEN -#define _DIRENT_HAVE_D_OFF -#undef _DIRENT_HAVE_D_TYPE diff --git a/libc/sysdeps/linux/sparc/bits/elfclass.h b/libc/sysdeps/linux/sparc/bits/elfclass.h deleted file mode 100644 index 180227d9e..000000000 --- a/libc/sysdeps/linux/sparc/bits/elfclass.h +++ /dev/null @@ -1,14 +0,0 @@ -/* This file specifies the native word size of the machine, which indicates - the ELF file class used for executables and shared objects on this - machine. */ - -#ifndef _LINK_H -# error "Never use <bits/elfclass.h> directly; include <link.h> instead." -#endif - -#include <bits/wordsize.h> - -#define __ELF_NATIVE_CLASS __WORDSIZE - -/* The entries in the .hash table always have a size of 32 bits. */ -typedef uint32_t Elf_Symndx; diff --git a/libc/sysdeps/linux/sparc/bits/environments.h b/libc/sysdeps/linux/sparc/bits/environments.h deleted file mode 100644 index c3829927b..000000000 --- a/libc/sysdeps/linux/sparc/bits/environments.h +++ /dev/null @@ -1,75 +0,0 @@ -/* Copyright (C) 1999, 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. */ - -#ifndef _UNISTD_H -# error "Never include this file directly. Use <unistd.h> instead" -#endif - -#include <bits/wordsize.h> - -/* This header should define the following symbols under the described - situations. A value `1' means that the model is always supported, - `-1' means it is never supported. Undefined means it cannot be - statically decided. - - _POSIX_V6_ILP32_OFF32 32bit int, long, pointers, and off_t type - _POSIX_V6_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type - - _POSIX_V6_LP64_OFF32 64bit long and pointers and 32bit off_t type - _POSIX_V6_LPBIG_OFFBIG 64bit long and pointers and large off_t type - - The macros _XBS5_ILP32_OFF32, _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and - _XBS5_LPBIG_OFFBIG were used in previous versions of the Unix standard - and are available only for compatibility. -*/ - -#if __WORDSIZE == 64 - -/* We can never provide environments with 32-bit wide pointers. */ -# define _POSIX_V6_ILP32_OFF32 -1 -# define _POSIX_V6_ILP32_OFFBIG -1 -# define _XBS5_ILP32_OFF32 -1 -# define _XBS5_ILP32_OFFBIG -1 -/* We also have no use (for now) for an environment with bigger pointers - and offsets. */ -# define _POSIX_V6_LPBIG_OFFBIG -1 -# define _XBS5_LPBIG_OFFBIG -1 - -/* By default we have 64-bit wide `long int', pointers and `off_t'. */ -# define _POSIX_V6_LP64_OFF64 1 -# define _XBS5_LP64_OFF64 1 - -#else /* __WORDSIZE == 32 */ - -/* By default we have 32-bit wide `int', `long int', pointers and `off_t' - and all platforms support LFS. */ -# define _POSIX_V6_ILP32_OFF32 1 -# define _POSIX_V6_ILP32_OFFBIG 1 -# define _XBS5_ILP32_OFF32 1 -# define _XBS5_ILP32_OFFBIG 1 - -/* We optionally provide an environment with the above size but an 64-bit - side `off_t'. Therefore we don't define _XBS5_ILP32_OFFBIG. */ - -/* We can never provide environments with 64-bit wide pointers. */ -# define _POSIX_V6_LP64_OFF64 -1 -# define _POSIX_V6_LPBIG_OFFBIG -1 -# define _XBS5_LP64_OFF64 -1 -# define _XBS5_LPBIG_OFFBIG -1 - -#endif /* __WORDSIZE == 32 */ diff --git a/libc/sysdeps/linux/sparc/bits/errno.h b/libc/sysdeps/linux/sparc/bits/errno.h deleted file mode 100644 index ac59d4c9d..000000000 --- a/libc/sysdeps/linux/sparc/bits/errno.h +++ /dev/null @@ -1,60 +0,0 @@ -/* Error constants. Linux specific version. - Copyright (C) 1996, 1997, 1998, 1999 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. */ - -#ifdef _ERRNO_H - -# undef EDOM -# undef EILSEQ -# undef ERANGE -# include <linux/errno.h> - -/* Linux has no ENOTSUP error code. */ -# define ENOTSUP EOPNOTSUPP - -/* Linux also has no ECANCELED error code. Since it is not used here - we define it to an invalid value. */ -# define ECANCELED 125 - -# ifndef __ASSEMBLER__ -/* We now need a declaration of the `errno' variable. */ -extern int errno; - -/* Function to get address of global `errno' variable. */ -extern int *__errno_location (void) __THROW __attribute__ ((__const__)); - -# if defined _LIBC -/* We wouldn't need a special macro anymore but it is history. */ -# define __set_errno(val) (*__errno_location ()) = (val) -# endif /* _LIBC */ - -# if !defined _LIBC || defined _LIBC_REENTRANT -/* When using threads, errno is a per-thread value. */ -# define errno (*__errno_location ()) -# endif -# endif /* !__ASSEMBLER__ */ -#endif /* _ERRNO_H */ - -#if !defined _ERRNO_H && defined __need_Emath -/* This is ugly but the kernel header is not clean enough. We must - define only the values EDOM, EILSEQ and ERANGE in case __need_Emath is - defined. */ -# define EDOM 33 /* Math argument out of domain of function. */ -# define EILSEQ 84 /* Illegal byte sequence. */ -# define ERANGE 34 /* Math result not representable. */ -#endif /* !_ERRNO_H && __need_Emath */ diff --git a/libc/sysdeps/linux/sparc/bits/fenvinline.h b/libc/sysdeps/linux/sparc/bits/fenvinline.h deleted file mode 100644 index 42f77b561..000000000 --- a/libc/sysdeps/linux/sparc/bits/fenvinline.h +++ /dev/null @@ -1,8 +0,0 @@ -/* This file provides inline versions of floating-pint environment - handling functions. If there were any. */ - -#ifndef __NO_MATH_INLINES - -/* Here is where the code would go. */ - -#endif diff --git a/libc/sysdeps/linux/sparc/bits/huge_val.h b/libc/sysdeps/linux/sparc/bits/huge_val.h deleted file mode 100644 index 2cc3c10b2..000000000 --- a/libc/sysdeps/linux/sparc/bits/huge_val.h +++ /dev/null @@ -1,122 +0,0 @@ -/* `HUGE_VAL' constants for IEEE 754 machines (where it is infinity). - Used by <stdlib.h> and <math.h> functions for overflow. - Copyright (C) 1992, 1995, 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 _MATH_H -# error "Never use <bits/huge_val.h> directly; include <math.h> instead." -#endif - -#include <features.h> -#include <bits/wordsize.h> - -/* IEEE positive infinity (-HUGE_VAL is negative infinity). */ - -#ifdef __GNUC__ - -# if __GNUC_PREREQ(2,96) - -# define HUGE_VAL (__extension__ 0x1.0p2047) - -# else - -# define HUGE_VAL \ - (__extension__ \ - ((union { unsigned __l __attribute__((__mode__(__DI__))); double __d; }) \ - { __l: 0x7ff0000000000000ULL }).__d) - -# endif - -#else /* not GCC */ - -typedef union { unsigned char __c[8]; double __d; } __huge_val_t; - -# define __HUGE_VAL_bytes { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 } - -static __huge_val_t __huge_val = { __HUGE_VAL_bytes }; -# define HUGE_VAL (__huge_val.__d) - -#endif /* GCC. */ - - -/* ISO C99 extensions: (float) HUGE_VALF and (long double) HUGE_VALL. */ - -#ifdef __USE_ISOC99 - -# if __GNUC_PREREQ(2,96) - -# define HUGE_VALF (__extension__ 0x1.0p255f) -# if __WORDSIZE == 32 -# define HUGE_VALL HUGE_VAL -# else -/* Sparc64 uses IEEE 754 128bit long double */ -# define HUGE_VALL (__extension__ 0x1.0p32767L) -# endif - -# else - -# ifdef __GNUC__ - -# define HUGE_VALF \ - (__extension__ \ - ((union { unsigned __l __attribute__((__mode__(__SI__))); float __d; }) \ - { __l: 0x7f800000UL }).__d) - -# else /* not GCC */ - -typedef union { unsigned char __c[4]; float __f; } __huge_valf_t; - -# define __HUGE_VALF_bytes { 0x7f, 0x80, 0, 0 } - -static __huge_valf_t __huge_valf = { __HUGE_VALF_bytes }; -# define HUGE_VALF (__huge_valf.__f) - -# endif /* GCC. */ - -# if __WORDSIZE == 32 - -/* Sparc32 has IEEE 754 64bit long double */ -# define HUGE_VALL HUGE_VAL - -# else - -/* Sparc64 uses IEEE 754 128bit long double */ - -# ifdef __GNUC__ - -# define HUGE_VALL \ - (__extension__ \ - ((union { struct { unsigned long __h, __l; } __i; long double __d; }) \ - { __i: { __h: 0x7fff000000000000UL, __l: 0 } }).__d) - -# else /* not GCC */ - -typedef union { unsigned char __c[16]; long double __d; } __huge_vall_t; - -# define __HUGE_VALL_bytes { 0x7f, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } - -static __huge_vall_t __huge_vall = { __HUGE_VALL_bytes }; -# define HUGE_VALL (__huge_vall.__d) - -# endif /* GCC. */ - -# endif - -# endif /* GCC 2.95. */ - -#endif /* __USE_ISOC99. */ diff --git a/libc/sysdeps/linux/sparc/bits/in.h b/libc/sysdeps/linux/sparc/bits/in.h deleted file mode 100644 index e6cf57574..000000000 --- a/libc/sysdeps/linux/sparc/bits/in.h +++ /dev/null @@ -1,141 +0,0 @@ -/* Copyright (C) 1991-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. */ - -/* Linux version. */ - -#ifndef _NETINET_IN_H -# error "Never use <bits/in.h> directly; include <netinet/in.h> instead." -#endif - -/* Options for use with `getsockopt' and `setsockopt' at the IP level. - The first word in the comment at the right is the data type used; - "bool" means a boolean value stored in an `int'. */ -#define IP_TOS 1 /* int; IP type of service and precedence. */ -#define IP_TTL 2 /* int; IP time to live. */ -#define IP_HDRINCL 3 /* int; Header is included with data. */ -#define IP_OPTIONS 4 /* ip_opts; IP per-packet options. */ -#define IP_ROUTER_ALERT 5 /* bool */ -#define IP_RECVOPTS 6 /* bool */ -#define IP_RETOPTS 7 /* bool */ -#define IP_PKTINFO 8 /* bool */ -#define IP_PKTOPTIONS 9 -#define IP_PMTUDISC 10 /* obsolete name? */ -#define IP_MTU_DISCOVER 10 /* int; see below */ -#define IP_RECVERR 11 /* bool */ -#define IP_RECVTTL 12 /* bool */ -#define IP_RECVTOS 13 /* bool */ -#define IP_MULTICAST_IF 32 /* in_addr; set/get IP multicast i/f */ -#define IP_MULTICAST_TTL 33 /* u_char; set/get IP multicast ttl */ -#define IP_MULTICAST_LOOP 34 /* i_char; set/get IP multicast loopback */ -#define IP_ADD_MEMBERSHIP 35 /* ip_mreq; add an IP group membership */ -#define IP_DROP_MEMBERSHIP 36 /* ip_mreq; drop an IP group membership */ - -/* For BSD compatibility. */ -#define IP_RECVRETOPTS IP_RETOPTS - -/* IP_MTU_DISCOVER arguments. */ -#define IP_PMTUDISC_DONT 0 /* Never send DF frames. */ -#define IP_PMTUDISC_WANT 1 /* Use per route hints. */ -#define IP_PMTUDISC_DO 2 /* Always DF. */ - -/* To select the IP level. */ -#define SOL_IP 0 - -#define IP_DEFAULT_MULTICAST_TTL 1 -#define IP_DEFAULT_MULTICAST_LOOP 1 -#define IP_MAX_MEMBERSHIPS 20 - -/* Structure used to describe IP options for IP_OPTIONS. The `ip_dst' - field is used for the first-hop gateway when using a source route - (this gets put into the header proper). */ -struct ip_opts - { - struct in_addr ip_dst; /* First hop; zero without source route. */ - char ip_opts[40]; /* Actually variable in size. */ - }; - -/* Structure used for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP. */ -struct ip_mreq - { - struct in_addr imr_multiaddr; /* IP multicast address of group */ - struct in_addr imr_interface; /* local IP address of interface */ - }; - -/* As above but including interface specification by index. */ -struct ip_mreqn - { - struct in_addr imr_multiaddr; /* IP multicast address of group */ - struct in_addr imr_address; /* local IP address of interface */ - int imr_ifindex; /* Interface index */ - }; - -/* Structure used for IP_PKTINFO. */ -struct in_pktinfo - { - int ipi_ifindex; /* Interface index */ - struct in_addr ipi_spec_dst; /* Routing destination address */ - struct in_addr ipi_addr; /* Header destination address */ - }; - -/* Options for use with `getsockopt' and `setsockopt' at the IPv6 level. - The first word in the comment at the right is the data type used; - "bool" means a boolean value stored in an `int'. */ -#define IPV6_ADDRFORM 1 -#define IPV6_PKTINFO 2 -#define IPV6_HOPOPTS 3 -#define IPV6_DSTOPTS 4 -#define IPV6_RTHDR 5 -#define IPV6_PKTOPTIONS 6 -#define IPV6_CHECKSUM 7 -#define IPV6_HOPLIMIT 8 -#define IPV6_NEXTHOP 9 -#define IPV6_AUTHHDR 10 -#define IPV6_UNICAST_HOPS 16 -#define IPV6_MULTICAST_IF 17 -#define IPV6_MULTICAST_HOPS 18 -#define IPV6_MULTICAST_LOOP 19 -#define IPV6_JOIN_GROUP 20 -#define IPV6_LEAVE_GROUP 21 -#define IPV6_ROUTER_ALERT 22 -#define IPV6_MTU_DISCOVER 23 -#define IPV6_MTU 24 -#define IPV6_RECVERR 25 - -#define SCM_SRCRT IPV6_RXSRCRT - -/* Obsolete synonyms for the above. */ -#define IPV6_RXHOPOPTS IPV6_HOPOPTS -#define IPV6_RXDSTOPTS IPV6_DSTOPTS -#define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP -#define IPV6_DROP_MEMBERSHIP IPV6_LEAVE_GROUP - - -/* IPV6_MTU_DISCOVER values. */ -#define IPV6_PMTUDISC_DONT 0 /* Never send DF frames. */ -#define IPV6_PMTUDISC_WANT 1 /* Use per route hints. */ -#define IPV6_PMTUDISC_DO 2 /* Always DF. */ - -/* Socket level values for IPv6. */ -#define SOL_IPV6 41 -#define SOL_ICMPV6 58 - -/* Routing header options for IPv6. */ -#define IPV6_RTHDR_LOOSE 0 /* Hop doesn't need to be neighbour. */ -#define IPV6_RTHDR_STRICT 1 /* Hop must be a neighbour. */ - -#define IPV6_RTHDR_TYPE_0 0 /* IPv6 Routing header type 0. */ diff --git a/libc/sysdeps/linux/sparc/bits/initspin.h b/libc/sysdeps/linux/sparc/bits/initspin.h deleted file mode 100644 index af19d44e6..000000000 --- a/libc/sysdeps/linux/sparc/bits/initspin.h +++ /dev/null @@ -1,28 +0,0 @@ -/* Generic definitions for spinlock initializers. - Copyright (C) 2000, 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* Initial value of a spinlock. Most platforms should use zero, - unless they only implement a "test and clear" operation instead of - the usual "test and set". */ -#define __LT_SPINLOCK_INIT 0 - -/* Macros for lock initializers, using the above definition. */ -#define __LOCK_INITIALIZER { 0, __LT_SPINLOCK_INIT } -#define __ALT_LOCK_INITIALIZER { 0, __LT_SPINLOCK_INIT } -#define __ATOMIC_INITIALIZER { 0, __LT_SPINLOCK_INIT } diff --git a/libc/sysdeps/linux/sparc/bits/ioctl-types.h b/libc/sysdeps/linux/sparc/bits/ioctl-types.h deleted file mode 100644 index e856a04b4..000000000 --- a/libc/sysdeps/linux/sparc/bits/ioctl-types.h +++ /dev/null @@ -1,78 +0,0 @@ -/* Structure types for pre-termios terminal ioctls. Linux version. - Copyright (C) 1996, 1997, 1999, 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. */ - -#ifndef _SYS_IOCTL_H -# error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead." -#endif - -/* Get definition of constants for use with `ioctl'. */ -#include <asm/ioctls.h> - - -struct winsize - { - unsigned short int ws_row; - unsigned short int ws_col; - unsigned short int ws_xpixel; - unsigned short int ws_ypixel; - }; - -#define NCC 8 -struct termio - { - unsigned short int c_iflag; /* input mode flags */ - unsigned short int c_oflag; /* output mode flags */ - unsigned short int c_cflag; /* control mode flags */ - unsigned short int c_lflag; /* local mode flags */ - unsigned char c_line; /* line discipline */ - unsigned char c_cc[NCC]; /* control characters */ -}; - -/* modem lines */ -#define TIOCM_LE 0x001 -#define TIOCM_DTR 0x002 -#define TIOCM_RTS 0x004 -#define TIOCM_ST 0x008 -#define TIOCM_SR 0x010 -#define TIOCM_CTS 0x020 -#define TIOCM_CAR 0x040 -#define TIOCM_RNG 0x080 -#define TIOCM_DSR 0x100 -#define TIOCM_CD TIOCM_CAR -#define TIOCM_RI TIOCM_RNG - -/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ - -/* line disciplines */ -#define N_TTY 0 -#define N_SLIP 1 -#define N_MOUSE 2 -#define N_PPP 3 -#define N_STRIP 4 -#define N_AX25 5 -#define N_X25 6 /* X.25 async */ -#define N_6PACK 7 -#define N_MASC 8 /* Mobitex module */ -#define N_R3964 9 /* Simatic R3964 module */ -#define N_PROFIBUS_FDL 10 /* Profibus */ -#define N_IRDA 11 /* Linux IR */ -#define N_SMSBLOCK 12 /* SMS block mode */ -#define N_HDLC 13 /* synchronous HDLC */ -#define N_SYNC_PPP 14 /* synchronous PPP */ -#define N_HCI 15 /* Bluetooth HCI UART */ diff --git a/libc/sysdeps/linux/sparc/bits/libc-lock.h b/libc/sysdeps/linux/sparc/bits/libc-lock.h deleted file mode 100644 index 2c1d16277..000000000 --- a/libc/sysdeps/linux/sparc/bits/libc-lock.h +++ /dev/null @@ -1,327 +0,0 @@ -/* libc-internal interface for mutex locks. LinuxThreads version. - Copyright (C) 1996,1997,1998,1999,2000,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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _BITS_LIBC_LOCK_H -#define _BITS_LIBC_LOCK_H 1 - -#include <pthread.h> - -/* Mutex type. */ -#if defined(_LIBC) || defined(_IO_MTSAFE_IO) -typedef pthread_mutex_t __libc_lock_t; -typedef struct { pthread_mutex_t mutex; } __libc_lock_recursive_t; -# ifdef __USE_UNIX98 -typedef pthread_rwlock_t __libc_rwlock_t; -# else -typedef struct __libc_rwlock_opaque__ __libc_rwlock_t; -# endif -#else -typedef struct __libc_lock_opaque__ __libc_lock_t; -typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t; -typedef struct __libc_rwlock_opaque__ __libc_rwlock_t; -#endif - -/* Type for key to thread-specific data. */ -typedef pthread_key_t __libc_key_t; - -/* Define a lock variable NAME with storage class CLASS. The lock must be - initialized with __libc_lock_init before it can be used (or define it - with __libc_lock_define_initialized, below). Use `extern' for CLASS to - declare a lock defined in another module. In public structure - definitions you must use a pointer to the lock structure (i.e., NAME - begins with a `*'), because its storage size will not be known outside - of libc. */ -#define __libc_lock_define(CLASS,NAME) \ - CLASS __libc_lock_t NAME; -#define __libc_rwlock_define(CLASS,NAME) \ - CLASS __libc_rwlock_t NAME; -#define __libc_lock_define_recursive(CLASS,NAME) \ - CLASS __libc_lock_recursive_t NAME; - -/* Define an initialized lock variable NAME with storage class CLASS. - - For the C library we take a deeper look at the initializer. For - this implementation all fields are initialized to zero. Therefore - we don't initialize the variable which allows putting it into the - BSS section. (Except on PA-RISC and other odd architectures, where - initialized locks must be set to one due to the lack of normal - atomic operations.) */ - -#if __LT_SPINLOCK_INIT == 0 -# define __libc_lock_define_initialized(CLASS,NAME) \ - CLASS __libc_lock_t NAME; -#else -# define __libc_lock_define_initialized(CLASS,NAME) \ - CLASS __libc_lock_t NAME = PTHREAD_MUTEX_INITIALIZER; -#endif - -#define __libc_rwlock_define_initialized(CLASS,NAME) \ - CLASS __libc_rwlock_t NAME = PTHREAD_RWLOCK_INITIALIZER; - -/* Define an initialized recursive lock variable NAME with storage - class CLASS. */ -#define __libc_lock_define_initialized_recursive(CLASS,NAME) \ - CLASS __libc_lock_recursive_t NAME = _LIBC_LOCK_RECURSIVE_INITIALIZER; -#define _LIBC_LOCK_RECURSIVE_INITIALIZER \ - {PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP} - -/* Initialize the named lock variable, leaving it in a consistent, unlocked - state. */ -#define __libc_lock_init(NAME) \ - (__pthread_mutex_init != NULL ? __pthread_mutex_init (&(NAME), NULL) : 0); -#define __libc_rwlock_init(NAME) \ - (__pthread_rwlock_init != NULL ? __pthread_rwlock_init (&(NAME), NULL) : 0); - -/* Same as last but this time we initialize a recursive mutex. */ -#define __libc_lock_init_recursive(NAME) \ - do { \ - if (__pthread_mutex_init != NULL) \ - { \ - pthread_mutexattr_t __attr; \ - __pthread_mutexattr_init (&__attr); \ - __pthread_mutexattr_settype (&__attr, PTHREAD_MUTEX_RECURSIVE_NP); \ - __pthread_mutex_init (&(NAME).mutex, &__attr); \ - __pthread_mutexattr_destroy (&__attr); \ - } \ - } while (0); - -/* Finalize the named lock variable, which must be locked. It cannot be - used again until __libc_lock_init is called again on it. This must be - called on a lock variable before the containing storage is reused. */ -#define __libc_lock_fini(NAME) \ - (__pthread_mutex_destroy != NULL ? __pthread_mutex_destroy (&(NAME)) : 0); -#define __libc_rwlock_fini(NAME) \ - (__pthread_rwlock_destroy != NULL ? __pthread_rwlock_destroy (&(NAME)) : 0); - -/* Finalize recursive named lock. */ -#define __libc_lock_fini_recursive(NAME) __libc_lock_fini ((NAME).mutex) - -/* Lock the named lock variable. */ -#define __libc_lock_lock(NAME) \ - (__pthread_mutex_lock != NULL ? __pthread_mutex_lock (&(NAME)) : 0); -#define __libc_rwlock_rdlock(NAME) \ - (__pthread_rwlock_rdlock != NULL ? __pthread_rwlock_rdlock (&(NAME)) : 0); -#define __libc_rwlock_wrlock(NAME) \ - (__pthread_rwlock_wrlock != NULL ? __pthread_rwlock_wrlock (&(NAME)) : 0); - -/* Lock the recursive named lock variable. */ -#define __libc_lock_lock_recursive(NAME) __libc_lock_lock ((NAME).mutex) - -/* Try to lock the named lock variable. */ -#define __libc_lock_trylock(NAME) \ - (__pthread_mutex_trylock != NULL ? __pthread_mutex_trylock (&(NAME)) : 0) -#define __libc_rwlock_tryrdlock(NAME) \ - (__pthread_rwlock_tryrdlock != NULL \ - ? __pthread_rwlock_tryrdlock (&(NAME)) : 0) -#define __libc_rwlock_trywrlock(NAME) \ - (__pthread_rwlock_trywrlock != NULL \ - ? __pthread_rwlock_trywrlock (&(NAME)) : 0) - -/* Try to lock the recursive named lock variable. */ -#define __libc_lock_trylock_recursive(NAME) __libc_lock_trylock ((NAME).mutex) - -/* Unlock the named lock variable. */ -#define __libc_lock_unlock(NAME) \ - (__pthread_mutex_unlock != NULL ? __pthread_mutex_unlock (&(NAME)) : 0); -#define __libc_rwlock_unlock(NAME) \ - (__pthread_rwlock_unlock != NULL ? __pthread_rwlock_unlock (&(NAME)) : 0); - -/* Unlock the recursive named lock variable. */ -#define __libc_lock_unlock_recursive(NAME) __libc_lock_unlock ((NAME).mutex) - - -/* Define once control variable. */ -#if PTHREAD_ONCE_INIT == 0 -/* Special case for static variables where we can avoid the initialization - if it is zero. */ -# define __libc_once_define(CLASS, NAME) \ - CLASS pthread_once_t NAME -#else -# define __libc_once_define(CLASS, NAME) \ - CLASS pthread_once_t NAME = PTHREAD_ONCE_INIT -#endif - -/* Call handler iff the first call. */ -#define __libc_once(ONCE_CONTROL, INIT_FUNCTION) \ - do { \ - if (__pthread_once != NULL) \ - __pthread_once (&(ONCE_CONTROL), (INIT_FUNCTION)); \ - else if ((ONCE_CONTROL) == PTHREAD_ONCE_INIT) { \ - INIT_FUNCTION (); \ - (ONCE_CONTROL) = !PTHREAD_ONCE_INIT; \ - } \ - } while (0) - - -/* Start critical region with cleanup. */ -#define __libc_cleanup_region_start(DOIT, FCT, ARG) \ - { struct _pthread_cleanup_buffer _buffer; \ - int _avail = (DOIT) && _pthread_cleanup_push_defer != NULL; \ - if (_avail) { \ - _pthread_cleanup_push_defer (&_buffer, (FCT), (ARG)); \ - } - -/* End critical region with cleanup. */ -#define __libc_cleanup_region_end(DOIT) \ - if (_avail) { \ - _pthread_cleanup_pop_restore (&_buffer, (DOIT)); \ - } \ - } - -/* Sometimes we have to exit the block in the middle. */ -#define __libc_cleanup_end(DOIT) \ - if (_avail) { \ - _pthread_cleanup_pop_restore (&_buffer, (DOIT)); \ - } - -/* Create thread-specific key. */ -#define __libc_key_create(KEY, DESTRUCTOR) \ - (__pthread_key_create != NULL ? __pthread_key_create (KEY, DESTRUCTOR) : 1) - -/* Get thread-specific data. */ -#define __libc_getspecific(KEY) \ - (__pthread_getspecific != NULL ? __pthread_getspecific (KEY) : NULL) - -/* Set thread-specific data. */ -#define __libc_setspecific(KEY, VALUE) \ - (__pthread_setspecific != NULL ? __pthread_setspecific (KEY, VALUE) : 0) - - -/* Register handlers to execute before and after `fork'. */ -#define __libc_atfork(PREPARE, PARENT, CHILD) \ - (__pthread_atfork != NULL ? __pthread_atfork (PREPARE, PARENT, CHILD) : 0) - -/* Functions that are used by this file and are internal to the GNU C - library. */ - -extern int __pthread_mutex_init (pthread_mutex_t *__mutex, - __const pthread_mutexattr_t *__mutex_attr); - -extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex); - -extern int __pthread_mutex_trylock (pthread_mutex_t *__mutex); - -extern int __pthread_mutex_lock (pthread_mutex_t *__mutex); - -extern int __pthread_mutex_unlock (pthread_mutex_t *__mutex); - -extern int __pthread_mutexattr_init (pthread_mutexattr_t *__attr); - -extern int __pthread_mutexattr_destroy (pthread_mutexattr_t *__attr); - -extern int __pthread_mutexattr_settype (pthread_mutexattr_t *__attr, - int __kind); - -#ifdef __USE_UNIX98 -extern int __pthread_rwlock_init (pthread_rwlock_t *__rwlock, - __const pthread_rwlockattr_t *__attr); - -extern int __pthread_rwlock_destroy (pthread_rwlock_t *__rwlock); - -extern int __pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock); - -extern int __pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock); - -extern int __pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock); - -extern int __pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock); - -extern int __pthread_rwlock_unlock (pthread_rwlock_t *__rwlock); -#endif - -extern int __pthread_key_create (pthread_key_t *__key, - void (*__destr_function) (void *)); - -extern int __pthread_setspecific (pthread_key_t __key, - __const void *__pointer); - -extern void *__pthread_getspecific (pthread_key_t __key); - -extern int __pthread_once (pthread_once_t *__once_control, - void (*__init_routine) (void)); - -extern int __pthread_atfork (void (*__prepare) (void), - void (*__parent) (void), - void (*__child) (void)); - - - -/* Make the pthread functions weak so that we can elide them from - single-threaded processes. */ -#ifndef __NO_WEAK_PTHREAD_ALIASES -# ifdef weak_extern -# if _LIBC -# include <bp-sym.h> -# else -# define BP_SYM (sym) sym -# endif -weak_extern (BP_SYM (__pthread_mutex_init)) -weak_extern (BP_SYM (__pthread_mutex_destroy)) -weak_extern (BP_SYM (__pthread_mutex_lock)) -weak_extern (BP_SYM (__pthread_mutex_trylock)) -weak_extern (BP_SYM (__pthread_mutex_unlock)) -weak_extern (BP_SYM (__pthread_mutexattr_init)) -weak_extern (BP_SYM (__pthread_mutexattr_destroy)) -weak_extern (BP_SYM (__pthread_mutexattr_settype)) -weak_extern (BP_SYM (__pthread_rwlock_init)) -weak_extern (BP_SYM (__pthread_rwlock_destroy)) -weak_extern (BP_SYM (__pthread_rwlock_rdlock)) -weak_extern (BP_SYM (__pthread_rwlock_tryrdlock)) -weak_extern (BP_SYM (__pthread_rwlock_wrlock)) -weak_extern (BP_SYM (__pthread_rwlock_trywrlock)) -weak_extern (BP_SYM (__pthread_rwlock_unlock)) -weak_extern (BP_SYM (__pthread_key_create)) -weak_extern (BP_SYM (__pthread_setspecific)) -weak_extern (BP_SYM (__pthread_getspecific)) -weak_extern (BP_SYM (__pthread_once)) -weak_extern (__pthread_initialize) -weak_extern (__pthread_atfork) -weak_extern (BP_SYM (_pthread_cleanup_push_defer)) -weak_extern (BP_SYM (_pthread_cleanup_pop_restore)) -# else -# pragma weak __pthread_mutex_init -# pragma weak __pthread_mutex_destroy -# pragma weak __pthread_mutex_lock -# pragma weak __pthread_mutex_trylock -# pragma weak __pthread_mutex_unlock -# pragma weak __pthread_mutexattr_init -# pragma weak __pthread_mutexattr_destroy -# pragma weak __pthread_mutexattr_settype -# pragma weak __pthread_rwlock_destroy -# pragma weak __pthread_rwlock_rdlock -# pragma weak __pthread_rwlock_tryrdlock -# pragma weak __pthread_rwlock_wrlock -# pragma weak __pthread_rwlock_trywrlock -# pragma weak __pthread_rwlock_unlock -# pragma weak __pthread_key_create -# pragma weak __pthread_setspecific -# pragma weak __pthread_getspecific -# pragma weak __pthread_once -# pragma weak __pthread_initialize -# pragma weak __pthread_atfork -# pragma weak _pthread_cleanup_push_defer -# pragma weak _pthread_cleanup_pop_restore -# endif -#endif - -/* We need portable names for some functions. E.g., when they are - used as argument to __libc_cleanup_region_start. */ -#define __libc_mutex_unlock __pthread_mutex_unlock - -#endif /* bits/libc-lock.h */ diff --git a/libc/sysdeps/linux/sparc/bits/local_lim.h b/libc/sysdeps/linux/sparc/bits/local_lim.h deleted file mode 100644 index 0a7c83706..000000000 --- a/libc/sysdeps/linux/sparc/bits/local_lim.h +++ /dev/null @@ -1,77 +0,0 @@ -/* Minimum guaranteed maximum values for system limits. Linux version. - Copyright (C) 1993, 94, 95, 96, 97, 98, 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* The kernel header pollutes the namespace with the NR_OPEN symbol - and defines LINK_MAX although filesystems have different maxima. A - similar thing is true for OPEN_MAX: the limit can be changed at - runtime and therefore the macro must not be defined. Remove this - after including the header if necessary. */ -#ifndef NR_OPEN -# define __undef_NR_OPEN -#endif -#ifndef LINK_MAX -# define __undef_LINK_MAX -#endif -#ifndef OPEN_MAX -# define __undef_OPEN_MAX -#endif - -/* The kernel sources contain a file with all the needed information. */ -#include <linux/limits.h> - -/* Have to remove NR_OPEN? */ -#ifdef __undef_NR_OPEN -# undef NR_OPEN -# undef __undef_NR_OPEN -#endif -/* Have to remove LINK_MAX? */ -#ifdef __undef_LINK_MAX -# undef LINK_MAX -# undef __undef_LINK_MAX -#endif -/* Have to remove OPEN_MAX? */ -#ifdef __undef_OPEN_MAX -# undef OPEN_MAX -# undef __undef_OPEN_MAX -#endif - -/* The number of data keys per process. */ -#define _POSIX_THREAD_KEYS_MAX 128 -/* This is the value this implementation supports. */ -#define PTHREAD_KEYS_MAX 1024 - -/* Controlling the iterations of destructors for thread-specific data. */ -#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 -/* Number of iterations this implementation does. */ -#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS - -/* The number of threads per process. */ -#define _POSIX_THREAD_THREADS_MAX 64 -/* This is the value this implementation supports. */ -#define PTHREAD_THREADS_MAX 1024 - -/* Maximum amount by which a process can descrease its asynchronous I/O - priority level. */ -#define AIO_PRIO_DELTA_MAX 20 - -/* Minimum size for a thread. We are free to choose a reasonable value. */ -#define PTHREAD_STACK_MIN 16384 - -/* Maximum number of POSIX timers available. */ -#define TIMER_MAX 256 diff --git a/libc/sysdeps/linux/sparc/bits/locale.h b/libc/sysdeps/linux/sparc/bits/locale.h deleted file mode 100644 index 50064b53e..000000000 --- a/libc/sysdeps/linux/sparc/bits/locale.h +++ /dev/null @@ -1,44 +0,0 @@ -/* Definition of locale category symbol values. - Copyright (C) 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. */ - -#if !defined _LOCALE_H && !defined _LANGINFO_H -# error "Never use <bits/locale.h> directly; include <locale.h> instead." -#endif - -#ifndef _BITS_LOCALE_H -#define _BITS_LOCALE_H 1 - -enum -{ - __LC_CTYPE = 0, - __LC_NUMERIC = 1, - __LC_TIME = 2, - __LC_COLLATE = 3, - __LC_MONETARY = 4, - __LC_MESSAGES = 5, - __LC_ALL = 6, - __LC_PAPER = 7, - __LC_NAME = 8, - __LC_ADDRESS = 9, - __LC_TELEPHONE = 10, - __LC_MEASUREMENT = 11, - __LC_IDENTIFICATION = 12 -}; - -#endif /* bits/locale.h */ diff --git a/libc/sysdeps/linux/sparc/bits/mathcalls.h b/libc/sysdeps/linux/sparc/bits/mathcalls.h deleted file mode 100644 index c1181f737..000000000 --- a/libc/sysdeps/linux/sparc/bits/mathcalls.h +++ /dev/null @@ -1,333 +0,0 @@ -/* Prototype declarations for math functions; helper file for <math.h>. - Copyright (C) 1996,1997,1998,1999,2000,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 <math.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,[_r], (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,[_r], (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. - - Note that there must be no whitespace before the argument passed for - NAME, to make token pasting work with -traditional. */ - -#ifndef _MATH_H - #error "Never include <bits/mathcalls.h> directly; include <math.h> instead." -#endif - - -/* Trigonometric functions. */ - -/* Arc cosine of X. */ -__MATHCALL (acos,, (_Mdouble_ __x)); -/* Arc sine of X. */ -__MATHCALL (asin,, (_Mdouble_ __x)); -/* Arc tangent of X. */ -__MATHCALL (atan,, (_Mdouble_ __x)); -/* Arc tangent of Y/X. */ -__MATHCALL (atan2,, (_Mdouble_ __y, _Mdouble_ __x)); - -/* Cosine of X. */ -__MATHCALL (cos,, (_Mdouble_ __x)); -/* Sine of X. */ -__MATHCALL (sin,, (_Mdouble_ __x)); -/* Tangent of X. */ -__MATHCALL (tan,, (_Mdouble_ __x)); - -#ifdef __USE_GNU -/* Cosine and sine of X. */ -__MATHDECL (void,sincos,, - (_Mdouble_ __x, _Mdouble_ *__sinx, _Mdouble_ *__cosx)); -#endif - -/* Hyperbolic functions. */ - -/* Hyperbolic cosine of X. */ -__MATHCALL (cosh,, (_Mdouble_ __x)); -/* Hyperbolic sine of X. */ -__MATHCALL (sinh,, (_Mdouble_ __x)); -/* Hyperbolic tangent of X. */ -__MATHCALL (tanh,, (_Mdouble_ __x)); - -#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 -/* Hyperbolic arc cosine of X. */ -__MATHCALL (acosh,, (_Mdouble_ __x)); -/* Hyperbolic arc sine of X. */ -__MATHCALL (asinh,, (_Mdouble_ __x)); -/* Hyperbolic arc tangent of X. */ -__MATHCALL (atanh,, (_Mdouble_ __x)); -#endif - -/* Exponential and logarithmic functions. */ - -/* Exponential function of X. */ -__MATHCALL (exp,, (_Mdouble_ __x)); - -#ifdef __USE_GNU -/* A function missing in all standards: compute exponent to base ten. */ -__MATHCALL (exp10,, (_Mdouble_ __x)); -/* Another name occasionally used. */ -__MATHCALL (pow10,, (_Mdouble_ __x)); -#endif - -/* Break VALUE into a normalized fraction and an integral power of 2. */ -__MATHCALL (frexp,, (_Mdouble_ __x, int *__exponent)); - -/* X times (two to the EXP power). */ -__MATHCALL (ldexp,, (_Mdouble_ __x, int __exponent)); - -/* Natural logarithm of X. */ -__MATHCALL (log,, (_Mdouble_ __x)); - -/* Base-ten logarithm of X. */ -__MATHCALL (log10,, (_Mdouble_ __x)); - -/* Break VALUE into integral and fractional parts. */ -__MATHCALL (modf,, (_Mdouble_ __x, _Mdouble_ *__iptr)); - -#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 -/* Return exp(X) - 1. */ -__MATHCALL (expm1,, (_Mdouble_ __x)); - -/* Return log(1 + X). */ -__MATHCALL (log1p,, (_Mdouble_ __x)); - -/* Return the base 2 signed integral exponent of X. */ -__MATHCALL (logb,, (_Mdouble_ __x)); -#endif - -#ifdef __USE_ISOC99 -/* Compute base-2 exponential of X. */ -__MATHCALL (exp2,, (_Mdouble_ __x)); - -/* Compute base-2 logarithm of X. */ -__MATHCALL (log2,, (_Mdouble_ __x)); -#endif - - -/* Power functions. */ - -/* Return X to the Y power. */ -__MATHCALL (pow,, (_Mdouble_ __x, _Mdouble_ __y)); - -/* Return the square root of X. */ -__MATHCALL (sqrt,, (_Mdouble_ __x)); - -#if defined __USE_MISC || defined __USE_XOPEN || defined __USE_ISOC99 -/* Return `sqrt(X*X + Y*Y)'. */ -__MATHCALL (hypot,, (_Mdouble_ __x, _Mdouble_ __y)); -#endif - -#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 -/* Return the cube root of X. */ -__MATHCALL (cbrt,, (_Mdouble_ __x)); -#endif - - -/* Nearest integer, absolute value, and remainder functions. */ - -/* Smallest integral value not less than X. */ -__MATHCALL (ceil,, (_Mdouble_ __x)); - -/* Absolute value of X. */ -__MATHCALLX (fabs,, (_Mdouble_ __x), (__const__)); - -/* Largest integer not greater than X. */ -__MATHCALL (floor,, (_Mdouble_ __x)); - -/* Floating-point modulo remainder of X/Y. */ -__MATHCALL (fmod,, (_Mdouble_ __x, _Mdouble_ __y)); - - -/* Return 0 if VALUE is finite or NaN, +1 if it - is +Infinity, -1 if it is -Infinity. */ -__MATHDECL_1 (int,__isinf,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -/* Return nonzero if VALUE is finite and not NaN. */ -__MATHDECL_1 (int,__finite,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -#ifdef __USE_MISC -/* Return 0 if VALUE is finite or NaN, +1 if it - is +Infinity, -1 if it is -Infinity. */ -__MATHDECL_1 (int,isinf,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -/* Return nonzero if VALUE is finite and not NaN. */ -__MATHDECL_1 (int,finite,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -/* Return the remainder of X/Y. */ -__MATHCALL (drem,, (_Mdouble_ __x, _Mdouble_ __y)); - - -/* Return the fractional part of X after dividing out `ilogb (X)'. */ -__MATHCALL (significand,, (_Mdouble_ __x)); -#endif /* Use misc. */ - -#if defined __USE_MISC || defined __USE_ISOC99 -/* Return X with its signed changed to Y's. */ -__MATHCALLX (copysign,, (_Mdouble_ __x, _Mdouble_ __y), (__const__)); -#endif - -#ifdef __USE_ISOC99 -/* Return representation of NaN for double type. */ -__MATHCALLX (nan,, (__const char *__tagb), (__const__)); -#endif - - -/* Return nonzero if VALUE is not a number. */ -__MATHDECL_1 (int,__isnan,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -#if defined __USE_MISC || defined __USE_XOPEN -/* Return nonzero if VALUE is not a number. */ -__MATHDECL_1 (int,isnan,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -/* Bessel functions. */ -__MATHCALL (j0,, (_Mdouble_)); -__MATHCALL (j1,, (_Mdouble_)); -__MATHCALL (jn,, (int, _Mdouble_)); -__MATHCALL (y0,, (_Mdouble_)); -__MATHCALL (y1,, (_Mdouble_)); -__MATHCALL (yn,, (int, _Mdouble_)); -#endif - - -#if defined __USE_MISC || defined __USE_XOPEN || defined __USE_ISOC99 -/* Error and gamma functions. */ -__MATHCALL (erf,, (_Mdouble_)); -__MATHCALL (erfc,, (_Mdouble_)); -__MATHCALL (lgamma,, (_Mdouble_)); -#endif - -#ifdef __USE_ISOC99 -__MATHCALL (tgamma,, (_Mdouble_)); -#endif - -#if defined __USE_MISC || defined __USE_XOPEN -/* Obsolete alias for `lgamma'. */ -__MATHCALL (gamma,, (_Mdouble_)); -#endif - -#ifdef __USE_MISC -/* Reentrant version of lgamma. This function uses the global variable - `signgam'. The reentrant version instead takes a pointer and stores - the value through it. */ -__MATHCALL (lgamma,_r, (_Mdouble_, int *__signgamp)); -#endif - - -#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 -/* Return the integer nearest X in the direction of the - prevailing rounding mode. */ -__MATHCALL (rint,, (_Mdouble_ __x)); - -/* Return X + epsilon if X < Y, X - epsilon if X > Y. */ -__MATHCALLX (nextafter,, (_Mdouble_ __x, _Mdouble_ __y), (__const__)); -# ifdef __USE_ISOC99 -__MATHCALLX (nexttoward,, (_Mdouble_ __x, long double __y), (__const__)); -# endif - -/* Return the remainder of integer divison X / Y with infinite precision. */ -__MATHCALL (remainder,, (_Mdouble_ __x, _Mdouble_ __y)); - -# if defined __USE_MISC || defined __USE_XOPEN_EXTENDED -/* Return X times (2 to the Nth power). */ -__MATHCALL (scalb,, (_Mdouble_ __x, _Mdouble_ __n)); -# endif - -# if defined __USE_MISC || defined __USE_ISOC99 -/* Return X times (2 to the Nth power). */ -__MATHCALL (scalbn,, (_Mdouble_ __x, int __n)); -# endif - -/* Return the binary exponent of X, which must be nonzero. */ -__MATHDECL (int,ilogb,, (_Mdouble_ __x)); -#endif - -#ifdef __USE_ISOC99 -/* Return X times (2 to the Nth power). */ -__MATHCALL (scalbln,, (_Mdouble_ __x, long int __n)); - -/* Round X to integral value in floating-point format using current - rounding direction, but do not raise inexact exception. */ -__MATHCALL (nearbyint,, (_Mdouble_ __x)); - -/* Round X to nearest integral value, rounding halfway cases away from - zero. */ -__MATHCALL (round,, (_Mdouble_ __x)); - -/* Round X to the integral value in floating-point format nearest but - not larger in magnitude. */ -__MATHCALLX (trunc,, (_Mdouble_ __x), (__const__)); - -/* Compute remainder of X and Y and put in *QUO a value with sign of x/y - and magnitude congruent `mod 2^n' to the magnitude of the integral - quotient x/y, with n >= 3. */ -__MATHCALL (remquo,, (_Mdouble_ __x, _Mdouble_ __y, int *__quo)); - - -/* Conversion functions. */ - -/* Round X to nearest integral value according to current rounding - direction. */ -__MATHDECL (long int,lrint,, (_Mdouble_ __x)); -__MATHDECL (long long int,llrint,, (_Mdouble_ __x)); - -/* Round X to nearest integral value, rounding halfway cases away from - zero. */ -__MATHDECL (long int,lround,, (_Mdouble_ __x)); -__MATHDECL (long long int,llround,, (_Mdouble_ __x)); - - -/* Return positive difference between X and Y. */ -__MATHCALL (fdim,, (_Mdouble_ __x, _Mdouble_ __y)); - -/* Return maximum numeric value from X and Y. */ -__MATHCALL (fmax,, (_Mdouble_ __x, _Mdouble_ __y)); - -/* Return minimum numeric value from X and Y. */ -__MATHCALL (fmin,, (_Mdouble_ __x, _Mdouble_ __y)); - - -/* Classify given number. */ -__MATHDECL_1 (int, __fpclassify,, (_Mdouble_ __value)) - __attribute__ ((__const__)); - -/* Test for negative number. */ -__MATHDECL_1 (int, __signbit,, (_Mdouble_ __value)) - __attribute__ ((__const__)); - - -/* Multiply-add function computed as a ternary operation. */ -__MATHCALL (fma,, (_Mdouble_ __x, _Mdouble_ __y, _Mdouble_ __z)); -#endif /* Use ISO C99. */ diff --git a/libc/sysdeps/linux/sparc/bits/mathinline.h b/libc/sysdeps/linux/sparc/bits/mathinline.h index 4ee861e80..92ecd5e83 100644 --- a/libc/sysdeps/linux/sparc/bits/mathinline.h +++ b/libc/sysdeps/linux/sparc/bits/mathinline.h @@ -1,5 +1,5 @@ /* Inline math functions for SPARC. - Copyright (C) 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>. @@ -24,13 +24,13 @@ #include <bits/wordsize.h> -#if defined __GNUC__ +#ifdef __GNUC__ #ifdef __USE_ISOC99 -#if __WORDSIZE == 32 +# if __WORDSIZE == 32 -# define __unordered_cmp(x, y) \ +# define __unordered_cmp(x, y) \ (__extension__ \ ({ unsigned __r; \ if (sizeof(x) == 4 && sizeof(y) == 4) \ @@ -47,16 +47,16 @@ } \ __r; })) -# define isgreater(x, y) ((__unordered_cmp (x, y) & (3 << 10)) == (2 << 10)) -# define isgreaterequal(x, y) ((__unordered_cmp (x, y) & (1 << 10)) == 0) -# define isless(x, y) ((__unordered_cmp (x, y) & (3 << 10)) == (1 << 10)) -# define islessequal(x, y) ((__unordered_cmp (x, y) & (2 << 10)) == 0) -# define islessgreater(x, y) (((__unordered_cmp (x, y) + (1 << 10)) & (2 << 10)) != 0) -# define isunordered(x, y) ((__unordered_cmp (x, y) & (3 << 10)) == (3 << 10)) +# define isgreater(x, y) ((__unordered_cmp (x, y) & (3 << 10)) == (2 << 10)) +# define isgreaterequal(x, y) ((__unordered_cmp (x, y) & (1 << 10)) == 0) +# define isless(x, y) ((__unordered_cmp (x, y) & (3 << 10)) == (1 << 10)) +# define islessequal(x, y) ((__unordered_cmp (x, y) & (2 << 10)) == 0) +# define islessgreater(x, y) (((__unordered_cmp (x, y) + (1 << 10)) & (2 << 10)) != 0) +# define isunordered(x, y) ((__unordered_cmp (x, y) & (3 << 10)) == (3 << 10)) -#else /* sparc64 */ +# else /* sparc64 */ -# define __unordered_v9cmp(x, y, op, qop) \ +# define __unordered_v9cmp(x, y, op, qop) \ (__extension__ \ ({ unsigned __r; \ if (sizeof(x) == 4 && sizeof(y) == 4) \ @@ -79,29 +79,32 @@ } \ __r; })) -# define isgreater(x, y) __unordered_v9cmp(x, y, "g", _Qp_cmp (&__x, &__y) == 2) -# define isgreaterequal(x, y) __unordered_v9cmp(x, y, "ge", (_Qp_cmp (&__x, &__y) & 1) == 0) -# define isless(x, y) __unordered_v9cmp(x, y, "l", _Qp_cmp (&__x, &__y) == 1) -# define islessequal(x, y) __unordered_v9cmp(x, y, "le", (_Qp_cmp (&__x, &__y) & 2) == 0) -# define islessgreater(x, y) __unordered_v9cmp(x, y, "lg", ((_Qp_cmp (&__x, &__y) + 1) & 2) != 0) -# define isunordered(x, y) __unordered_v9cmp(x, y, "u", _Qp_cmp (&__x, &__y) == 3) +# define isgreater(x, y) __unordered_v9cmp(x, y, "g", _Qp_cmp (&__x, &__y) == 2) +# define isgreaterequal(x, y) __unordered_v9cmp(x, y, "ge", (_Qp_cmp (&__x, &__y) & 1) == 0) +# define isless(x, y) __unordered_v9cmp(x, y, "l", _Qp_cmp (&__x, &__y) == 1) +# define islessequal(x, y) __unordered_v9cmp(x, y, "le", (_Qp_cmp (&__x, &__y) & 2) == 0) +# define islessgreater(x, y) __unordered_v9cmp(x, y, "lg", ((_Qp_cmp (&__x, &__y) + 1) & 2) != 0) +# define isunordered(x, y) __unordered_v9cmp(x, y, "u", _Qp_cmp (&__x, &__y) == 3) -#endif /* sparc64 */ +# endif /* sparc64 */ #endif /* __USE_ISOC99 */ #if (!defined __NO_MATH_INLINES || defined __LIBC_INTERNAL_MATH_INLINES) && defined __OPTIMIZE__ -#ifdef __cplusplus -# define __MATH_INLINE __inline -#else -# define __MATH_INLINE extern __inline -#endif /* __cplusplus */ +# ifdef __cplusplus +# define __MATH_INLINE __inline +# else +# define __MATH_INLINE extern __inline +# endif /* __cplusplus */ /* The gcc, version 2.7 or below, has problems with all this inlining code. So disable it for this version of the compiler. */ # if __GNUC_PREREQ (2, 8) - /* Test for negative number. Used in the signbit() macro. */ + +# ifdef __USE_ISOC99 + +/* Test for negative number. Used in the signbit() macro. */ __MATH_INLINE int __signbitf (float __x) __THROW { @@ -109,7 +112,7 @@ __signbitf (float __x) __THROW return __u.__i < 0; } -#if __WORDSIZE == 32 +# if __WORDSIZE == 32 __MATH_INLINE int __signbit (double __x) __THROW @@ -124,28 +127,30 @@ __signbitl (long double __x) __THROW return __signbit ((double)__x); } -#else /* sparc64 */ +# else /* sparc64 */ __MATH_INLINE int __signbit (double __x) __THROW { - __extension__ union { double __d; long __i; } __u = { __d: __x }; + __extension__ union { double __d; long int __i; } __u = { __d: __x }; return __u.__i < 0; } __MATH_INLINE int __signbitl (long double __x) __THROW { - __extension__ union { long double __l; long __i[2]; } __u = { __l: __x }; + __extension__ union { long double __l; long int __i[2]; } __u = { __l: __x }; return __u.__i[0] < 0; } -#endif /* sparc64 */ +# endif /* sparc64 */ -#ifndef __NO_MATH_INLINES +# endif /* __USE_ISOC99 */ + +# ifndef __NO_MATH_INLINES __MATH_INLINE double -sqrt(double __x) __THROW +sqrt (double __x) __THROW { register double __r; __asm ("fsqrtd %1,%0" : "=f" (__r) : "f" (__x)); @@ -153,30 +158,30 @@ sqrt(double __x) __THROW } __MATH_INLINE float -sqrtf(float __x) __THROW +sqrtf (float __x) __THROW { register float __r; __asm ("fsqrts %1,%0" : "=f" (__r) : "f" (__x)); return __r; } -#if __WORDSIZE == 64 +# if __WORDSIZE == 64 __MATH_INLINE long double -sqrtl(long double __x) __THROW +sqrtl (long double __x) __THROW { long double __r; - extern void _Qp_sqrt(long double *, __const__ long double *); - _Qp_sqrt(&__r, &__x); + extern void _Qp_sqrt (long double *, __const__ long double *); + _Qp_sqrt (&__r, &__x); return __r; } -#endif /* sparc64 */ +# endif /* sparc64 */ -#endif +# endif /* !__NO_MATH_INLINES */ /* This code is used internally in the GNU libc. */ -#ifdef __LIBC_INTERNAL_MATH_INLINES +# ifdef __LIBC_INTERNAL_MATH_INLINES __MATH_INLINE double -__ieee754_sqrt(double __x) +__ieee754_sqrt (double __x) { register double __r; __asm ("fsqrtd %1,%0" : "=f" (__r) : "f" (__x)); @@ -184,29 +189,29 @@ __ieee754_sqrt(double __x) } __MATH_INLINE float -__ieee754_sqrtf(float __x) +__ieee754_sqrtf (float __x) { register float __r; __asm ("fsqrts %1,%0" : "=f" (__r) : "f" (__x)); return __r; } -#if __WORDSIZE == 64 +# if __WORDSIZE == 64 __MATH_INLINE long double -__ieee754_sqrtl(long double __x) +__ieee754_sqrtl (long double __x) { long double __r; - extern void _Qp_sqrt(long double *, __const__ long double *); + extern void _Qp_sqrt (long double *, __const__ long double *); _Qp_sqrt(&__r, &__x); return __r; } -#endif /* sparc64 */ -#endif /* __LIBC_INTERNAL_MATH_INLINES */ -#endif /* gcc 2.8+ */ +# endif /* sparc64 */ +# endif /* __LIBC_INTERNAL_MATH_INLINES */ +# endif /* gcc 2.8+ */ -#ifdef __USE_ISOC99 +# ifdef __USE_ISOC99 -#ifndef __NO_MATH_INLINES +# ifndef __NO_MATH_INLINES __MATH_INLINE double fdim (double __x, double __y); __MATH_INLINE double @@ -222,7 +227,7 @@ fdimf (float __x, float __y) return __x < __y ? 0 : __x - __y; } -#endif /* !__NO_MATH_INLINES */ -#endif /* __USE_ISOC99 */ +# endif /* !__NO_MATH_INLINES */ +# endif /* __USE_ISOC99 */ #endif /* !__NO_MATH_INLINES && __OPTIMIZE__ */ #endif /* __GNUC__ */ diff --git a/libc/sysdeps/linux/sparc/bits/nan.h b/libc/sysdeps/linux/sparc/bits/nan.h deleted file mode 100644 index 6d88b551b..000000000 --- a/libc/sysdeps/linux/sparc/bits/nan.h +++ /dev/null @@ -1,48 +0,0 @@ -/* `NAN' constant for IEEE 754 machines. - Copyright (C) 1992, 1996, 1997, 1999 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 _MATH_H -# error "Never use <bits/nan.h> directly; include <math.h> instead." -#endif - - -/* IEEE Not A Number. */ - -#ifdef __GNUC__ - -# define NAN \ - (__extension__ \ - ((union { unsigned __l __attribute__((__mode__(__SI__))); float __d; }) \ - { __l: 0x7fc00000UL }).__d) - -#else - -# include <endian.h> - -# if __BYTE_ORDER == __BIG_ENDIAN -# define __nan_bytes { 0x7f, 0xc0, 0, 0 } -# endif -# if __BYTE_ORDER == __LITTLE_ENDIAN -# define __nan_bytes { 0, 0, 0xc0, 0x7f } -# endif - -static union { unsigned char __c[4]; float __d; } __nan_union = { __nan_bytes }; -# define NAN (__nan_union.__d) - -#endif /* GCC. */ diff --git a/libc/sysdeps/linux/sparc/bits/netdb.h b/libc/sysdeps/linux/sparc/bits/netdb.h deleted file mode 100644 index 41dc73193..000000000 --- a/libc/sysdeps/linux/sparc/bits/netdb.h +++ /dev/null @@ -1,33 +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. */ - -#ifndef _NETDB_H -# error "Never include <bits/netdb.h> directly; use <netdb.h> instead." -#endif - - -/* Description of data base entry for a single network. NOTE: here a - poor assumption is made. The network number is expected to fit - into an unsigned long int variable. */ -struct netent -{ - char *n_name; /* Official name of network. */ - char **n_aliases; /* Alias list. */ - int n_addrtype; /* Net address type. */ - uint32_t n_net; /* Network number. */ -}; diff --git a/libc/sysdeps/linux/sparc/bits/posix1_lim.h b/libc/sysdeps/linux/sparc/bits/posix1_lim.h deleted file mode 100644 index e16f4674d..000000000 --- a/libc/sysdeps/linux/sparc/bits/posix1_lim.h +++ /dev/null @@ -1,141 +0,0 @@ -/* Copyright (C) 1991,92,93,96,98,2000,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. */ - -/* - * POSIX Standard: 2.9.2 Minimum Values Added to <limits.h> - * - * Never include this file directly; use <limits.h> instead. - */ - -#ifndef _BITS_POSIX1_LIM_H -#define _BITS_POSIX1_LIM_H 1 - - -/* These are the standard-mandated minimum values. */ - -/* Minimum number of operations in one list I/O call. */ -#define _POSIX_AIO_LISTIO_MAX 2 - -/* Minimal number of outstanding asynchronous I/O operations. */ -#define _POSIX_AIO_MAX 1 - -/* Maximum length of arguments to `execve', including environment. */ -#define _POSIX_ARG_MAX 4096 - -/* Maximum simultaneous processes per real user ID. */ -#define _POSIX_CHILD_MAX 6 - -/* Minimal number of timer expiration overruns. */ -#define _POSIX_DELAYTIMER_MAX 32 - -/* Maximum link count of a file. */ -#define _POSIX_LINK_MAX 8 - -/* Number of bytes in a terminal canonical input queue. */ -#define _POSIX_MAX_CANON 255 - -/* Number of bytes for which space will be - available in a terminal input queue. */ -#define _POSIX_MAX_INPUT 255 - -/* Maximum number of message queues open for a process. */ -#define _POSIX_MQ_OPEN_MAX 8 - -/* Maximum number of supported message priorities. */ -#define _POSIX_MQ_PRIO_MAX 32 - -/* Number of simultaneous supplementary group IDs per process. */ -#define _POSIX_NGROUPS_MAX 0 - -/* Number of files one process can have open at once. */ -#define _POSIX_OPEN_MAX 16 - -/* Number of descriptors that a process may examine with `pselect' or - `select'. */ -#define _POSIX_FD_SETSIZE _POSIX_OPEN_MAX - -/* Number of bytes in a filename. */ -#define _POSIX_NAME_MAX 14 - -/* Number of bytes in a pathname. */ -#define _POSIX_PATH_MAX 256 - -/* Number of bytes than can be written atomically to a pipe. */ -#define _POSIX_PIPE_BUF 512 - -/* Minimal number of realtime signals reserved for the application. */ -#define _POSIX_RTSIG_MAX 8 - -/* Number of semaphores a process can have. */ -#define _POSIX_SEM_NSEMS_MAX 256 - -/* Maximal value of a semaphore. */ -#define _POSIX_SEM_VALUE_MAX 32767 - -/* Number of pending realtime signals. */ -#define _POSIX_SIGQUEUE_MAX 32 - -/* Largest value of a `ssize_t'. */ -#define _POSIX_SSIZE_MAX 32767 - -/* Number of streams a process can have open at once. */ -#define _POSIX_STREAM_MAX 8 - -/* Maximum length of a timezone name (element of `tzname'). */ -#define _POSIX_TZNAME_MAX 6 - -/* Maximum number of connections that can be queued on a socket. */ -#define _POSIX_QLIMIT 1 - -/* Maximum number of bytes that can be buffered on a socket for send - or receive. */ -#define _POSIX_HIWAT _POSIX_PIPE_BUF - -/* Maximum number of elements in an `iovec' array. */ -#define _POSIX_UIO_MAXIOV 16 - -/* Maximum number of characters in a tty name. */ -#define _POSIX_TTY_NAME_MAX 9 - -/* Number of timer for a process. */ -#define _POSIX_TIMER_MAX 32 - -/* Maximum length of login name. */ -#define _POSIX_LOGIN_NAME_MAX 9 - -/* Maximum clock resolution in nanoseconds. */ -#define _POSIX_CLOCKRES_MIN 20000000 - - -/* Get the implementation-specific values for the above. */ -#include <bits/local_lim.h> - - -#ifndef SSIZE_MAX -# define SSIZE_MAX INT_MAX -#endif - - -/* This value is a guaranteed minimum maximum. - The current maximum can be got from `sysconf'. */ - -#ifndef NGROUPS_MAX -# define NGROUPS_MAX _POSIX_NGROUPS_MAX -#endif - -#endif /* bits/posix1_lim.h */ diff --git a/libc/sysdeps/linux/sparc/bits/posix2_lim.h b/libc/sysdeps/linux/sparc/bits/posix2_lim.h deleted file mode 100644 index 24483a09d..000000000 --- a/libc/sysdeps/linux/sparc/bits/posix2_lim.h +++ /dev/null @@ -1,91 +0,0 @@ -/* Copyright (C) 1991, 1996, 1999, 2000, 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. */ - -/* - * Never include this file directly; include <limits.h> instead. - */ - -#ifndef _BITS_POSIX2_LIM_H -#define _BITS_POSIX2_LIM_H 1 - - -/* The maximum `ibase' and `obase' values allowed by the `bc' utility. */ -#define _POSIX2_BC_BASE_MAX 99 - -/* The maximum number of elements allowed in an array by the `bc' utility. */ -#define _POSIX2_BC_DIM_MAX 2048 - -/* The maximum `scale' value allowed by the `bc' utility. */ -#define _POSIX2_BC_SCALE_MAX 99 - -/* The maximum length of a string constant accepted by the `bc' utility. */ -#define _POSIX2_BC_STRING_MAX 1000 - -/* The maximum number of weights that can be assigned to an entry of - the LC_COLLATE `order' keyword in the locale definition file. */ -#define _POSIX2_COLL_WEIGHTS_MAX 2 - -/* The maximum number of expressions that can be nested - within parentheses by the `expr' utility. */ -#define _POSIX2_EXPR_NEST_MAX 32 - -/* The maximum length, in bytes, of an input line. */ -#define _POSIX2_LINE_MAX 2048 - -/* The maximum number of repeated occurrences of a regular expression - permitted when using the interval notation `\{M,N\}'. */ -#define _POSIX2_RE_DUP_MAX 255 - -/* The maximum number of bytes in a character class name. We have no - fixed limit, 2048 is a high number. */ -#define _POSIX2_CHARCLASS_NAME_MAX 14 - - -/* These values are implementation-specific, - and may vary within the implementation. - Their precise values can be obtained from sysconf. */ - -#ifndef BC_BASE_MAX -#define BC_BASE_MAX _POSIX2_BC_BASE_MAX -#endif -#ifndef BC_DIM_MAX -#define BC_DIM_MAX _POSIX2_BC_DIM_MAX -#endif -#ifndef BC_SCALE_MAX -#define BC_SCALE_MAX _POSIX2_BC_SCALE_MAX -#endif -#ifndef BC_STRING_MAX -#define BC_STRING_MAX _POSIX2_BC_STRING_MAX -#endif -#ifndef COLL_WEIGHTS_MAX -#define COLL_WEIGHTS_MAX 255 -#endif -#ifndef EXPR_NEST_MAX -#define EXPR_NEST_MAX _POSIX2_EXPR_NEST_MAX -#endif -#ifndef LINE_MAX -#define LINE_MAX _POSIX2_LINE_MAX -#endif -#ifndef CHARCLASS_NAME_MAX -#define CHARCLASS_NAME_MAX 2048 -#endif - -/* This value is defined like this in regex.h. */ -#define RE_DUP_MAX (0x7fff) - -#endif /* bits/posix2_lim.h */ diff --git a/libc/sysdeps/linux/sparc/bits/posix_opt.h b/libc/sysdeps/linux/sparc/bits/posix_opt.h deleted file mode 100644 index 54640bb56..000000000 --- a/libc/sysdeps/linux/sparc/bits/posix_opt.h +++ /dev/null @@ -1,141 +0,0 @@ -/* Define POSIX options for Linux. - Copyright (C) 1996,1997,1998,1999,2000,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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _POSIX_OPT_H -#define _POSIX_OPT_H 1 - -/* Job control is supported. */ -#define _POSIX_JOB_CONTROL 1 - -/* Processes have a saved set-user-ID and a saved set-group-ID. */ -#define _POSIX_SAVED_IDS 1 - -/* Priority scheduling is supported. */ -#define _POSIX_PRIORITY_SCHEDULING 1 - -/* Synchronizing file data is supported. */ -#define _POSIX_SYNCHRONIZED_IO 1 - -/* The fsync function is present. */ -#define _POSIX_FSYNC 1 - -/* Mapping of files to memory is supported. */ -#define _POSIX_MAPPED_FILES 1 - -/* Locking of all memory is supported. */ -#define _POSIX_MEMLOCK 1 - -/* Locking of ranges of memory is supported. */ -#define _POSIX_MEMLOCK_RANGE 1 - -/* Setting of memory protections is supported. */ -#define _POSIX_MEMORY_PROTECTION 1 - -/* Implementation supports `poll' function. */ -#define _POSIX_POLL 1 - -/* Implementation supports `select' and `pselect' functions. */ -#define _POSIX_SELECT 1 - -/* Only root can change owner of file. */ -#define _POSIX_CHOWN_RESTRICTED 1 - -/* `c_cc' member of 'struct termios' structure can be disabled by - using the value _POSIX_VDISABLE. */ -#define _POSIX_VDISABLE '\0' - -/* Filenames are not silently truncated. */ -#define _POSIX_NO_TRUNC 1 - -/* X/Open realtime support is available. */ -#define _XOPEN_REALTIME 1 - -/* X/Open realtime thread support is available. */ -#define _XOPEN_REALTIME_THREADS 1 - -/* XPG4.2 shared memory is supported. */ -#define _XOPEN_SHM 1 - -/* Tell we have POSIX threads. */ -#define _POSIX_THREADS 1 - -/* We have the reentrant functions described in POSIX. */ -#define _POSIX_REENTRANT_FUNCTIONS 1 -#define _POSIX_THREAD_SAFE_FUNCTIONS 1 - -/* We provide priority scheduling for threads. */ -#define _POSIX_THREAD_PRIORITY_SCHEDULING 1 - -/* We support user-defined stack sizes. */ -#define _POSIX_THREAD_ATTR_STACKSIZE 1 - -/* We support user-defined stacks. */ -#define _POSIX_THREAD_ATTR_STACKADDR 1 - -/* We support POSIX.1b semaphores, but only the non-shared form for now. */ -#define _POSIX_SEMAPHORES 1 - -/* Real-time signals are supported. */ -#define _POSIX_REALTIME_SIGNALS 1 - -/* We support asynchronous I/O. */ -#define _POSIX_ASYNCHRONOUS_IO 1 -#define _POSIX_ASYNC_IO 1 -/* Alternative name for Unix98. */ -#define _LFS_ASYNCHRONOUS_IO 1 - -/* The LFS support in asynchronous I/O is also available. */ -#define _LFS64_ASYNCHRONOUS_IO 1 - -/* The rest of the LFS is also available. */ -#define _LFS_LARGEFILE 1 -#define _LFS64_LARGEFILE 1 -#define _LFS64_STDIO 1 - -/* POSIX shared memory objects are implemented. */ -#define _POSIX_SHARED_MEMORY_OBJECTS 1 - -/* GNU libc provides regular expression handling. */ -#define _POSIX_REGEXP 1 - -/* Reader/Writer locks are available. */ -#define _POSIX_READER_WRITER_LOCKS 200912L - -/* We have a POSIX shell. */ -#define _POSIX_SHELL 1 - -/* We support the Timeouts option. */ -#define _POSIX_TIMEOUTS 200912L - -/* We support spinlocks. */ -#define _POSIX_SPIN_LOCKS 200912L - -/* The `spawn' function family is supported. */ -#define _POSIX_SPAWN 200912L - -/* We have POSIX timers. */ -#define _POSIX_TIMERS 1 - -/* The barrier functions are available. */ -#define _POSIX_BARRIERS 200912L - -/* POSIX message queues are not yet supported. */ -#undef _POSIX_MESSAGE_PASSING - -#endif /* posix_opt.h */ diff --git a/libc/sysdeps/linux/sparc/bits/pthreadtypes.h b/libc/sysdeps/linux/sparc/bits/pthreadtypes.h deleted file mode 100644 index 3ee5c4813..000000000 --- a/libc/sysdeps/linux/sparc/bits/pthreadtypes.h +++ /dev/null @@ -1,142 +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. */ - -#if !defined _BITS_TYPES_H && !defined _PTHREAD_H -# error "Never include <bits/pthreadtypes.h> directly; use <sys/types.h> instead." -#endif - -#ifndef _BITS_PTHREADTYPES_H -#define _BITS_PTHREADTYPES_H 1 - -#define __need_schedparam -#include <bits/sched.h> - -/* Fast locks (not abstract because mutexes and conditions aren't abstract). */ -struct _pthread_fastlock -{ - long int __status; /* "Free" or "taken" or head of waiting list */ - int __spinlock; /* Used by compare_and_swap emulation. Also, - adaptive SMP lock stores spin count here. */ -}; - -#ifndef _PTHREAD_DESCR_DEFINED -/* Thread descriptors */ -typedef struct _pthread_descr_struct *_pthread_descr; -# define _PTHREAD_DESCR_DEFINED -#endif - - -/* Attributes for threads. */ -typedef struct __pthread_attr_s -{ - int __detachstate; - int __schedpolicy; - struct __sched_param __schedparam; - int __inheritsched; - int __scope; - size_t __guardsize; - int __stackaddr_set; - void *__stackaddr; - size_t __stacksize; -} pthread_attr_t; - - -/* Conditions (not abstract because of PTHREAD_COND_INITIALIZER */ -typedef struct -{ - struct _pthread_fastlock __c_lock; /* Protect against concurrent access */ - _pthread_descr __c_waiting; /* Threads waiting on this condition */ -} pthread_cond_t; - - -/* Attribute for conditionally variables. */ -typedef struct -{ - int __dummy; -} pthread_condattr_t; - -/* Keys for thread-specific data */ -typedef unsigned int pthread_key_t; - - -/* Mutexes (not abstract because of PTHREAD_MUTEX_INITIALIZER). */ -/* (The layout is unnatural to maintain binary compatibility - with earlier releases of LinuxThreads.) */ -typedef struct -{ - int __m_reserved; /* Reserved for future use */ - int __m_count; /* Depth of recursive locking */ - _pthread_descr __m_owner; /* Owner thread (if recursive or errcheck) */ - int __m_kind; /* Mutex kind: fast, recursive or errcheck */ - struct _pthread_fastlock __m_lock; /* Underlying fast lock */ -} pthread_mutex_t; - - -/* Attribute for mutex. */ -typedef struct -{ - int __mutexkind; -} pthread_mutexattr_t; - - -/* Once-only execution */ -typedef int pthread_once_t; - - -#ifdef __USE_UNIX98 -/* Read-write locks. */ -typedef struct _pthread_rwlock_t -{ - struct _pthread_fastlock __rw_lock; /* Lock to guarantee mutual exclusion */ - int __rw_readers; /* Number of readers */ - _pthread_descr __rw_writer; /* Identity of writer, or NULL if none */ - _pthread_descr __rw_read_waiting; /* Threads waiting for reading */ - _pthread_descr __rw_write_waiting; /* Threads waiting for writing */ - int __rw_kind; /* Reader/Writer preference selection */ - int __rw_pshared; /* Shared between processes or not */ -} pthread_rwlock_t; - - -/* Attribute for read-write locks. */ -typedef struct -{ - int __lockkind; - int __pshared; -} pthread_rwlockattr_t; -#endif - -#ifdef __USE_XOPEN2K -/* POSIX spinlock data type. */ -typedef volatile int pthread_spinlock_t; - -/* POSIX barrier. */ -typedef struct { - struct _pthread_fastlock __ba_lock; /* Lock to guarantee mutual exclusion */ - int __ba_required; /* Threads needed for completion */ - int __ba_present; /* Threads waiting */ - _pthread_descr __ba_waiting; /* Queue of waiting threads */ -} pthread_barrier_t; - -/* barrier attribute */ -typedef struct { - int __pshared; -} pthread_barrierattr_t; - -#endif - - -/* Thread identifiers */ -typedef unsigned long int pthread_t; - -#endif /* bits/pthreadtypes.h */ diff --git a/libc/sysdeps/linux/sparc/bits/sched.h b/libc/sysdeps/linux/sparc/bits/sched.h deleted file mode 100644 index 5c10d85d4..000000000 --- a/libc/sysdeps/linux/sparc/bits/sched.h +++ /dev/null @@ -1,73 +0,0 @@ -/* Definitions of constants and data structure for POSIX 1003.1b-1993 - scheduling interface. - Copyright (C) 1996, 1997, 1998, 1999, 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. */ - -#ifndef __need_schedparam - -#ifndef _SCHED_H -# error "Never include <bits/sched.h> directly; use <sched.h> instead." -#endif - - -/* Scheduling algorithms. */ -#define SCHED_OTHER 0 -#define SCHED_FIFO 1 -#define SCHED_RR 2 - -#ifdef __USE_MISC -/* Cloning flags. */ -# define CSIGNAL 0x000000ff /* Signal mask to be sent at exit. */ -# define CLONE_VM 0x00000100 /* Set if VM shared between processes. */ -# define CLONE_FS 0x00000200 /* Set if fs info shared between processes. */ -# define CLONE_FILES 0x00000400 /* Set if open files shared between processes. */ -# define CLONE_SIGHAND 0x00000800 /* Set if signal handlers shared. */ -# define CLONE_PID 0x00001000 /* Set if pid shared. */ -# define CLONE_PTRACE 0x00002000 /* Set if tracing continues on the child. */ -# define CLONE_VFORK 0x00004000 /* Set if the parent wants the child to - wake it up on mm_release. */ -#endif - -/* The official definition. */ -struct sched_param - { - int __sched_priority; - }; - -__BEGIN_DECLS - -/* Clone current process. */ -#ifdef __USE_MISC -extern int clone (int (*__fn) (void *__arg), void *__child_stack, - int __flags, void *__arg) __THROW; -#endif - -__END_DECLS - -#endif /* need schedparam */ - -#if !defined __defined_schedparam \ - && (defined __need_schedparam || defined _SCHED_H) -# define __defined_schedparam 1 -/* Data structure to describe a process' schedulability. */ -struct __sched_param - { - int __sched_priority; - }; -# undef __need_schedparam -#endif diff --git a/libc/sysdeps/linux/sparc/bits/select.h b/libc/sysdeps/linux/sparc/bits/select.h deleted file mode 100644 index 47e7dedc3..000000000 --- a/libc/sysdeps/linux/sparc/bits/select.h +++ /dev/null @@ -1,35 +0,0 @@ -/* 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. */ - -#ifndef _SYS_SELECT_H -# error "Never use <bits/select.h> directly; include <sys/select.h> instead." -#endif - - -/* We don't use `memset' because this would require a prototype and - the array isn't too big. */ -#define __FD_ZERO(s) \ - do { \ - unsigned int __i; \ - fd_set *__arr = (s); \ - for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) \ - __FDS_BITS (__arr)[__i] = 0; \ - } while (0) -#define __FD_SET(d, s) (__FDS_BITS (s)[__FDELT(d)] |= __FDMASK(d)) -#define __FD_CLR(d, s) (__FDS_BITS (s)[__FDELT(d)] &= ~__FDMASK(d)) -#define __FD_ISSET(d, s) ((__FDS_BITS (s)[__FDELT(d)] & __FDMASK(d)) != 0) diff --git a/libc/sysdeps/linux/sparc/bits/sigset.h b/libc/sysdeps/linux/sparc/bits/sigset.h deleted file mode 100644 index 7ccadda45..000000000 --- a/libc/sysdeps/linux/sparc/bits/sigset.h +++ /dev/null @@ -1,125 +0,0 @@ -/* __sig_atomic_t, __sigset_t, and related definitions. Linux version. - Copyright (C) 1991, 1992, 1994, 1996, 1997 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 _SIGSET_H_types -# define _SIGSET_H_types 1 - -typedef int __sig_atomic_t; - -/* A `sigset_t' has a bit for each signal. */ - -# define _SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int))) -typedef struct - { - unsigned long int __val[_SIGSET_NWORDS]; - } __sigset_t; - -#endif - - -/* We only want to define these functions if <signal.h> was actually - included; otherwise we were included just to define the types. Since we - are namespace-clean, it wouldn't hurt to define extra macros. But - trouble can be caused by functions being defined (e.g., any global - register vars declared later will cause compilation errors). */ - -#if !defined _SIGSET_H_fns && defined _SIGNAL_H -# define _SIGSET_H_fns 1 - -# ifndef _EXTERN_INLINE -# define _EXTERN_INLINE extern __inline -# endif - -/* Return a mask that includes the bit for SIG only. */ -# define __sigmask(sig) \ - (((unsigned long int) 1) << (((sig) - 1) % (8 * sizeof (unsigned long int)))) - -/* Return the word index for SIG. */ -# define __sigword(sig) (((sig) - 1) / (8 * sizeof (unsigned long int))) - -# if defined __GNUC__ && __GNUC__ >= 2 -# define __sigemptyset(set) \ - (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ - sigset_t *__set = (set); \ - while (--__cnt >= 0) __set->__val[__cnt] = 0; \ - 0; })) -# define __sigfillset(set) \ - (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ - sigset_t *__set = (set); \ - while (--__cnt >= 0) __set->__val[__cnt] = ~0UL; \ - 0; })) - -# ifdef __USE_GNU -/* The POSIX does not specify for handling the whole signal set in one - command. This is often wanted and so we define three more functions - here. */ -# define __sigisemptyset(set) \ - (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ - const sigset_t *__set = (set); \ - int __ret = __set->__val[--__cnt]; \ - while (!__ret && --__cnt >= 0) \ - __ret = __set->__val[__cnt]; \ - __ret == 0; })) -# define __sigandset(dest, left, right) \ - (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ - sigset_t *__dest = (dest); \ - const sigset_t *__left = (left); \ - const sigset_t *__right = (right); \ - while (--__cnt >= 0) \ - __dest->__val[__cnt] = (__left->__val[__cnt] \ - & __right->__val[__cnt]); \ - 0; })) -# define __sigorset(dest, left, right) \ - (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ - sigset_t *__dest = (dest); \ - const sigset_t *__left = (left); \ - const sigset_t *__right = (right); \ - while (--__cnt >= 0) \ - __dest->__val[__cnt] = (__left->__val[__cnt] \ - | __right->__val[__cnt]); \ - 0; })) -# endif -# endif - -/* These functions needn't check for a bogus signal number -- error - checking is done in the non __ versions. */ - -extern int __sigismember (__const __sigset_t *, int); -extern int __sigaddset (__sigset_t *, int); -extern int __sigdelset (__sigset_t *, int); - -# ifdef __USE_EXTERN_INLINES -# define __SIGSETFN(NAME, BODY, CONST) \ - _EXTERN_INLINE int \ - NAME (CONST __sigset_t *__set, int __sig) \ - { \ - unsigned long int __mask = __sigmask (__sig); \ - unsigned long int __word = __sigword (__sig); \ - return BODY; \ - } - -__SIGSETFN (__sigismember, (__set->__val[__word] & __mask) ? 1 : 0, __const) -__SIGSETFN (__sigaddset, ((__set->__val[__word] |= __mask), 0), ) -__SIGSETFN (__sigdelset, ((__set->__val[__word] &= ~__mask), 0), ) - -# undef __SIGSETFN -# endif - - -#endif /* ! _SIGSET_H_fns. */ diff --git a/libc/sysdeps/linux/sparc/bits/sigstack.h b/libc/sysdeps/linux/sparc/bits/sigstack.h deleted file mode 100644 index 7f260367b..000000000 --- a/libc/sysdeps/linux/sparc/bits/sigstack.h +++ /dev/null @@ -1,55 +0,0 @@ -/* sigstack, sigaltstack definitions. - Copyright (C) 1998, 1999 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 _SIGNAL_H -# error "Never include this file directly. Use <signal.h> instead" -#endif - - -/* Structure describing a signal stack (obsolete). */ -struct sigstack - { - void *ss_sp; /* Signal stack pointer. */ - int ss_onstack; /* Nonzero if executing on this stack. */ - }; - - -/* Possible values for `ss_flags.'. */ -enum -{ - SS_ONSTACK = 1, -#define SS_ONSTACK SS_ONSTACK - SS_DISABLE -#define SS_DISABLE SS_DISABLE -}; - -/* Minimum stack size for a signal handler. */ -#define MINSIGSTKSZ 2048 - -/* System default stack size. */ -#define SIGSTKSZ 8192 - - -/* Alternate, preferred interface. */ -typedef struct sigaltstack - { - void *ss_sp; - int ss_flags; - size_t ss_size; - } stack_t; diff --git a/libc/sysdeps/linux/sparc/bits/sigthread.h b/libc/sysdeps/linux/sparc/bits/sigthread.h deleted file mode 100644 index b86e75f20..000000000 --- a/libc/sysdeps/linux/sparc/bits/sigthread.h +++ /dev/null @@ -1,38 +0,0 @@ -/* Signal handling function for threaded programs. - Copyright (C) 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _BITS_SIGTHREAD_H -#define _BITS_SIGTHREAD_H 1 - -#if !defined _SIGNAL_H && !defined _PTHREAD_H -# error "Never include this file directly. Use <pthread.h> instead" -#endif - -/* Functions for handling signals. */ - -/* Modify the signal mask for the calling thread. The arguments have - the same meaning as for sigprocmask(2). */ -extern int pthread_sigmask (int __how, - __const __sigset_t *__restrict __newmask, - __sigset_t *__restrict __oldmask)__THROW; - -/* Send signal SIGNO to the given thread. */ -extern int pthread_kill (pthread_t __thread, int __signo) __THROW; - -#endif /* bits/sigthread.h */ diff --git a/libc/sysdeps/linux/sparc/bits/sockaddr.h b/libc/sysdeps/linux/sparc/bits/sockaddr.h deleted file mode 100644 index 3e1d1312d..000000000 --- a/libc/sysdeps/linux/sparc/bits/sockaddr.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Definition of `struct sockaddr_*' common members. Generic/4.2 BSD version. - Copyright (C) 1995,1996,1997,1998,2000,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. */ - -/* - * Never include this file directly; use <sys/socket.h> instead. - */ - -#ifndef _BITS_SOCKADDR_H -#define _BITS_SOCKADDR_H 1 - - -/* POSIX.1g specifies this type name for the `sa_family' member. */ -typedef unsigned short int sa_family_t; - -/* This macro is used to declare the initial common members - of the data types used for socket addresses, `struct sockaddr', - `struct sockaddr_in', `struct sockaddr_un', etc. */ - -#define __SOCKADDR_COMMON(sa_prefix) \ - sa_family_t sa_prefix##family - -#define __SOCKADDR_COMMON_SIZE (sizeof (unsigned short int)) - -#endif /* bits/sockaddr.h */ diff --git a/libc/sysdeps/linux/sparc/bits/stab.def b/libc/sysdeps/linux/sparc/bits/stab.def deleted file mode 100644 index 3d54774cf..000000000 --- a/libc/sysdeps/linux/sparc/bits/stab.def +++ /dev/null @@ -1,234 +0,0 @@ -/* Table of DBX symbol codes for the GNU system. - Copyright (C) 1988, 1997 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. */ - -/* This contains contribution from Cygnus Support. */ - -/* Global variable. Only the name is significant. - To find the address, look in the corresponding external symbol. */ -__define_stab (N_GSYM, 0x20, "GSYM") - -/* Function name for BSD Fortran. Only the name is significant. - To find the address, look in the corresponding external symbol. */ -__define_stab (N_FNAME, 0x22, "FNAME") - -/* Function name or text-segment variable for C. Value is its address. - Desc is supposedly starting line number, but GCC doesn't set it - and DBX seems not to miss it. */ -__define_stab (N_FUN, 0x24, "FUN") - -/* Data-segment variable with internal linkage. Value is its address. - "Static Sym". */ -__define_stab (N_STSYM, 0x26, "STSYM") - -/* BSS-segment variable with internal linkage. Value is its address. */ -__define_stab (N_LCSYM, 0x28, "LCSYM") - -/* Name of main routine. Only the name is significant. - This is not used in C. */ -__define_stab (N_MAIN, 0x2a, "MAIN") - -/* Global symbol in Pascal. - Supposedly the value is its line number; I'm skeptical. */ -__define_stab (N_PC, 0x30, "PC") - -/* Number of symbols: 0, files,,funcs,lines according to Ultrix V4.0. */ -__define_stab (N_NSYMS, 0x32, "NSYMS") - -/* "No DST map for sym: name, ,0,type,ignored" according to Ultrix V4.0. */ -__define_stab (N_NOMAP, 0x34, "NOMAP") - -/* New stab from Solaris. I don't know what it means, but it - don't seem to contain useful information. */ -__define_stab (N_OBJ, 0x38, "OBJ") - -/* New stab from Solaris. I don't know what it means, but it - don't seem to contain useful information. Possibly related to the - optimization flags used in this module. */ -__define_stab (N_OPT, 0x3c, "OPT") - -/* Register variable. Value is number of register. */ -__define_stab (N_RSYM, 0x40, "RSYM") - -/* Modula-2 compilation unit. Can someone say what info it contains? */ -__define_stab (N_M2C, 0x42, "M2C") - -/* Line number in text segment. Desc is the line number; - value is corresponding address. */ -__define_stab (N_SLINE, 0x44, "SLINE") - -/* Similar, for data segment. */ -__define_stab (N_DSLINE, 0x46, "DSLINE") - -/* Similar, for bss segment. */ -__define_stab (N_BSLINE, 0x48, "BSLINE") - -/* Sun's source-code browser stabs. ?? Don't know what the fields are. - Supposedly the field is "path to associated .cb file". THIS VALUE - OVERLAPS WITH N_BSLINE! */ -__define_stab (N_BROWS, 0x48, "BROWS") - -/* GNU Modula-2 definition module dependency. Value is the modification time - of the definition file. Other is non-zero if it is imported with the - GNU M2 keyword %INITIALIZE. Perhaps N_M2C can be used if there - are enough empty fields? */ -__define_stab(N_DEFD, 0x4a, "DEFD") - -/* THE FOLLOWING TWO STAB VALUES CONFLICT. Happily, one is for Modula-2 - and one is for C++. Still,... */ -/* GNU C++ exception variable. Name is variable name. */ -__define_stab (N_EHDECL, 0x50, "EHDECL") -/* Modula2 info "for imc": name,,0,0,0 according to Ultrix V4.0. */ -__define_stab (N_MOD2, 0x50, "MOD2") - -/* GNU C++ `catch' clause. Value is its address. Desc is nonzero if - this entry is immediately followed by a CAUGHT stab saying what exception - was caught. Multiple CAUGHT stabs means that multiple exceptions - can be caught here. If Desc is 0, it means all exceptions are caught - here. */ -__define_stab (N_CATCH, 0x54, "CATCH") - -/* Structure or union element. Value is offset in the structure. */ -__define_stab (N_SSYM, 0x60, "SSYM") - -/* Name of main source file. - Value is starting text address of the compilation. */ -__define_stab (N_SO, 0x64, "SO") - -/* Automatic variable in the stack. Value is offset from frame pointer. - Also used for type descriptions. */ -__define_stab (N_LSYM, 0x80, "LSYM") - -/* Beginning of an include file. Only Sun uses this. - In an object file, only the name is significant. - The Sun linker puts data into some of the other fields. */ -__define_stab (N_BINCL, 0x82, "BINCL") - -/* Name of sub-source file (#include file). - Value is starting text address of the compilation. */ -__define_stab (N_SOL, 0x84, "SOL") - -/* Parameter variable. Value is offset from argument pointer. - (On most machines the argument pointer is the same as the frame pointer. */ -__define_stab (N_PSYM, 0xa0, "PSYM") - -/* End of an include file. No name. - This and N_BINCL act as brackets around the file's output. - In an object file, there is no significant data in this entry. - The Sun linker puts data into some of the fields. */ -__define_stab (N_EINCL, 0xa2, "EINCL") - -/* Alternate entry point. Value is its address. */ -__define_stab (N_ENTRY, 0xa4, "ENTRY") - -/* Beginning of lexical block. - The desc is the nesting level in lexical blocks. - The value is the address of the start of the text for the block. - The variables declared inside the block *precede* the N_LBRAC symbol. */ -__define_stab (N_LBRAC, 0xc0, "LBRAC") - -/* Place holder for deleted include file. Replaces a N_BINCL and everything - up to the corresponding N_EINCL. The Sun linker generates these when - it finds multiple identical copies of the symbols from an include file. - This appears only in output from the Sun linker. */ -__define_stab (N_EXCL, 0xc2, "EXCL") - -/* Modula-2 scope information. Can someone say what info it contains? */ -__define_stab (N_SCOPE, 0xc4, "SCOPE") - -/* End of a lexical block. Desc matches the N_LBRAC's desc. - The value is the address of the end of the text for the block. */ -__define_stab (N_RBRAC, 0xe0, "RBRAC") - -/* Begin named common block. Only the name is significant. */ -__define_stab (N_BCOMM, 0xe2, "BCOMM") - -/* End named common block. Only the name is significant - (and it should match the N_BCOMM). */ -__define_stab (N_ECOMM, 0xe4, "ECOMM") - -/* End common (local name): value is address. - I'm not sure how this is used. */ -__define_stab (N_ECOML, 0xe8, "ECOML") - -/* These STAB's are used on Gould systems for Non-Base register symbols - or something like that. FIXME. I have assigned the values at random - since I don't have a Gould here. Fixups from Gould folk welcome... */ -__define_stab (N_NBTEXT, 0xF0, "NBTEXT") -__define_stab (N_NBDATA, 0xF2, "NBDATA") -__define_stab (N_NBBSS, 0xF4, "NBBSS") -__define_stab (N_NBSTS, 0xF6, "NBSTS") -__define_stab (N_NBLCS, 0xF8, "NBLCS") - -/* Second symbol entry containing a length-value for the preceding entry. - The value is the length. */ -__define_stab (N_LENG, 0xfe, "LENG") - -/* The above information, in matrix format. - - STAB MATRIX - _________________________________________________ - | 00 - 1F are not dbx stab symbols | - | In most cases, the low bit is the EXTernal bit| - - | 00 UNDEF | 02 ABS | 04 TEXT | 06 DATA | - | 01 |EXT | 03 |EXT | 05 |EXT | 07 |EXT | - - | 08 BSS | 0A INDR | 0C FN_SEQ | 0E | - | 09 |EXT | 0B | 0D | 0F | - - | 10 | 12 COMM | 14 SETA | 16 SETT | - | 11 | 13 | 15 | 17 | - - | 18 SETD | 1A SETB | 1C SETV | 1E WARNING| - | 19 | 1B | 1D | 1F FN | - - |_______________________________________________| - | Debug entries with bit 01 set are unused. | - | 20 GSYM | 22 FNAME | 24 FUN | 26 STSYM | - | 28 LCSYM | 2A MAIN | 2C | 2E | - | 30 PC | 32 NSYMS | 34 NOMAP | 36 | - | 38 OBJ | 3A | 3C OPT | 3E | - | 40 RSYM | 42 M2C | 44 SLINE | 46 DSLINE | - | 48 BSLINE*| 4A DEFD | 4C | 4E | - | 50 EHDECL*| 52 | 54 CATCH | 56 | - | 58 | 5A | 5C | 5E | - | 60 SSYM | 62 | 64 SO | 66 | - | 68 | 6A | 6C | 6E | - | 70 | 72 | 74 | 76 | - | 78 | 7A | 7C | 7E | - | 80 LSYM | 82 BINCL | 84 SOL | 86 | - | 88 | 8A | 8C | 8E | - | 90 | 92 | 94 | 96 | - | 98 | 9A | 9C | 9E | - | A0 PSYM | A2 EINCL | A4 ENTRY | A6 | - | A8 | AA | AC | AE | - | B0 | B2 | B4 | B6 | - | B8 | BA | BC | BE | - | C0 LBRAC | C2 EXCL | C4 SCOPE | C6 | - | C8 | CA | CC | CE | - | D0 | D2 | D4 | D6 | - | D8 | DA | DC | DE | - | E0 RBRAC | E2 BCOMM | E4 ECOMM | E6 | - | E8 ECOML | EA | EC | EE | - | F0 | F2 | F4 | F6 | - | F8 | FA | FC | FE LENG | - +-----------------------------------------------+ - * 50 EHDECL is also MOD2. - * 48 BSLINE is also BROWS. - */ diff --git a/libc/sysdeps/linux/sparc/bits/stdio-lock.h b/libc/sysdeps/linux/sparc/bits/stdio-lock.h deleted file mode 100644 index 5b1c1b082..000000000 --- a/libc/sysdeps/linux/sparc/bits/stdio-lock.h +++ /dev/null @@ -1,48 +0,0 @@ -/* Thread package specific definitions of stream lock type. Generic version. - Copyright (C) 2000, 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. */ - -#ifndef _BITS_STDIO_LOCK_H -#define _BITS_STDIO_LOCK_H 1 - -#include <bits/libc-lock.h> - -__libc_lock_define_recursive (typedef, _IO_lock_t) - -/* We need recursive (counting) mutexes. */ -#ifdef _LIBC_LOCK_RECURSIVE_INITIALIZER -# define _IO_lock_initializer _LIBC_LOCK_RECURSIVE_INITIALIZER -#elif _IO_MTSAFE_IO - #error libio needs recursive mutexes for _IO_MTSAFE_IO -#endif - -#define _IO_lock_init(_name) __libc_lock_init_recursive (_name) -#define _IO_lock_fini(_name) __libc_lock_fini_recursive (_name) -#define _IO_lock_lock(_name) __libc_lock_lock_recursive (_name) -#define _IO_lock_unlock(_name) __libc_lock_unlock_recursive (_name) - - -#define _IO_cleanup_region_start(_fct, _fp) \ - __libc_cleanup_region_start (((_fp)->_flags & _IO_USER_LOCK) == 0, _fct, _fp) -#define _IO_cleanup_region_start_noarg(_fct) \ - __libc_cleanup_region_start (1, _fct, NULL) -#define _IO_cleanup_region_end(_doit) \ - __libc_cleanup_region_end (_doit) - - -#endif /* bits/stdio-lock.h */ diff --git a/libc/sysdeps/linux/sparc/bits/stdio.h b/libc/sysdeps/linux/sparc/bits/stdio.h deleted file mode 100644 index 118118adc..000000000 --- a/libc/sysdeps/linux/sparc/bits/stdio.h +++ /dev/null @@ -1,169 +0,0 @@ -/* Optimizing macros and inline functions for stdio functions. - Copyright (C) 1998, 2000, 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. */ - -#ifndef _STDIO_H -# error "Never include <bits/stdio.h> directly; use <stdio.h> instead." -#endif - -#ifdef __cplusplus -# define __STDIO_INLINE inline -#else -# define __STDIO_INLINE extern __inline -#endif - - -#ifdef __USE_EXTERN_INLINES -/* Write formatted output to stdout from argument list ARG. */ -__STDIO_INLINE int -vprintf (__const char *__restrict __fmt, _G_va_list __arg) __THROW -{ - return vfprintf (stdout, __fmt, __arg); -} - -/* Read a character from stdin. */ -__STDIO_INLINE int -getchar (void) __THROW -{ - return _IO_getc (stdin); -} - - -# if defined __USE_POSIX || defined __USE_MISC -/* This is defined in POSIX.1:1996. */ -__STDIO_INLINE int -getc_unlocked (FILE *__fp) __THROW -{ - return _IO_getc_unlocked (__fp); -} - -/* This is defined in POSIX.1:1996. */ -__STDIO_INLINE int -getchar_unlocked (void) __THROW -{ - return _IO_getc_unlocked (stdin); -} -# endif /* POSIX || misc */ - - -/* Write a character to stdout. */ -__STDIO_INLINE int -putchar (int __c) __THROW -{ - return _IO_putc (__c, stdout); -} - - -# ifdef __USE_MISC -/* Faster version when locking is not necessary. */ -__STDIO_INLINE int -fputc_unlocked (int __c, FILE *__stream) __THROW -{ - return _IO_putc_unlocked (__c, __stream); -} -# endif /* misc */ - - -# if defined __USE_POSIX || defined __USE_MISC -/* This is defined in POSIX.1:1996. */ -__STDIO_INLINE int -putc_unlocked (int __c, FILE *__stream) __THROW -{ - return _IO_putc_unlocked (__c, __stream); -} - -/* This is defined in POSIX.1:1996. */ -__STDIO_INLINE int -putchar_unlocked (int __c) __THROW -{ - return _IO_putc_unlocked (__c, stdout); -} -# endif /* POSIX || misc */ - - -# ifdef __USE_GNU -/* Like `getdelim', but reads up to a newline. */ -__STDIO_INLINE _IO_ssize_t -getline (char **__lineptr, size_t *__n, FILE *__stream) __THROW -{ - return __getdelim (__lineptr, __n, '\n', __stream); -} -# endif /* GNU */ - - -# ifdef __USE_MISC -/* Faster versions when locking is not required. */ -__STDIO_INLINE int -feof_unlocked (FILE *__stream) __THROW -{ - return _IO_feof_unlocked (__stream); -} - -/* Faster versions when locking is not required. */ -__STDIO_INLINE int -ferror_unlocked (FILE *__stream) __THROW -{ - return _IO_ferror_unlocked (__stream); -} -# endif /* misc */ - -#endif /* Use extern inlines. */ - - -#if defined __USE_MISC && defined __GNUC__ && defined __OPTIMIZE__ -/* Perform some simple optimizations. */ -# define fread_unlocked(ptr, size, n, stream) \ - (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) \ - && (size_t) ((size) * (n)) <= 8 && (size) != 0) \ - ? ({ char *__ptr = (char *) (ptr); \ - FILE *__stream = (stream); \ - size_t __cnt; \ - for (__cnt = (size) * (n); __cnt > 0; --__cnt) \ - { \ - int __c = _IO_getc_unlocked (__stream); \ - if (__c == EOF) \ - break; \ - *__ptr++ = __c; \ - } \ - ((size_t) ((size) * (n)) - __cnt) / (size); }) \ - : (((__builtin_constant_p (size) && (size) == 0) \ - || (__builtin_constant_p (n) && (n) == 0)) \ - /* Evaluate all parameters once. */ \ - ? ((void) (ptr), (void) (stream), (void) (size), \ - (void) (n), 0) \ - : fread_unlocked (ptr, size, n, stream)))) - -# define fwrite_unlocked(ptr, size, n, stream) \ - (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) \ - && (size_t) ((size) * (n)) <= 8 && (size) != 0) \ - ? ({ const char *__ptr = (const char *) (ptr); \ - FILE *__stream = (stream); \ - size_t __cnt; \ - for (__cnt = (size) * (n); __cnt > 0; --__cnt) \ - if (_IO_putc_unlocked (*__ptr++, __stream) == EOF) \ - break; \ - ((size_t) ((size) * (n)) - __cnt) / (size); }) \ - : (((__builtin_constant_p (size) && (size) == 0) \ - || (__builtin_constant_p (n) && (n) == 0)) \ - /* Evaluate all parameters once. */ \ - ? ((void) (ptr), (void) (stream), (void) (size), n) \ - : fwrite_unlocked (ptr, size, n, stream)))) -#endif - -/* Define helper macro. */ -#undef __STDIO_INLINE diff --git a/libc/sysdeps/linux/sparc/bits/stdio_lim.h b/libc/sysdeps/linux/sparc/bits/stdio_lim.h deleted file mode 100644 index ea6d693f5..000000000 --- a/libc/sysdeps/linux/sparc/bits/stdio_lim.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (C) 1994, 1997, 1998, 1999 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. */ - -#if !defined _STDIO_H && !defined __need_FOPEN_MAX && !defined __need_IOV_MAX -# error "Never include <bits/stdio_lim.h> directly; use <stdio.h> instead." -#endif - -#ifdef _STDIO_H -# define L_tmpnam 20 -# define TMP_MAX 238328 -# define FILENAME_MAX 4095 - -# ifdef __USE_POSIX -# define L_ctermid 9 -# define L_cuserid 9 -# endif -#endif - -#if defined __need_FOPEN_MAX || defined _STDIO_H -# undef FOPEN_MAX -# define FOPEN_MAX 16 -#endif - -#if defined __need_IOV_MAX && !defined IOV_MAX -# define IOV_MAX 1024 -#endif diff --git a/libc/sysdeps/linux/sparc/bits/string2.h b/libc/sysdeps/linux/sparc/bits/string2.h deleted file mode 100644 index 9e522cedf..000000000 --- a/libc/sysdeps/linux/sparc/bits/string2.h +++ /dev/null @@ -1,1241 +0,0 @@ -/* Machine-independant string function optimizations. - Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. - - 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 _STRING_H -# error "Never use <bits/string2.h> directly; include <string.h> instead." -#endif - -#if !defined __NO_STRING_INLINES && !defined __BOUNDED_POINTERS__ - -/* Unlike the definitions in the header <bits/string.h> the - definitions contained here are not optimized down to assembler - level. Those optimizations are not always a good idea since this - means the code size increases a lot. Instead the definitions here - optimize some functions in a way which do not dramatically - increase the code size and which do not use assembler. The main - trick is to use GNU CC's `__builtin_constant_p' function. - - Every function XXX which has a defined version in - <bits/string.h> must be accompanied by a symbol _HAVE_STRING_ARCH_XXX - to make sure we don't get redefinitions. - - We must use here macros instead of inline functions since the - trick won't work with the latter. */ - -#ifndef __STRING_INLINE -# ifdef __cplusplus -# define __STRING_INLINE inline -# else -# define __STRING_INLINE extern __inline -# endif -#endif - -#if _STRING_ARCH_unaligned -/* If we can do unaligned memory accesses we must know the endianess. */ -# include <endian.h> -# include <bits/types.h> - -# if __BYTE_ORDER == __LITTLE_ENDIAN -# define __STRING2_SMALL_GET16(src, idx) \ - (((__const unsigned char *) (__const char *) (src))[idx + 1] << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx]) -# define __STRING2_SMALL_GET32(src, idx) \ - (((((__const unsigned char *) (__const char *) (src))[idx + 3] << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 2]) << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 1]) << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx]) -# else -# define __STRING2_SMALL_GET16(src, idx) \ - (((__const unsigned char *) (__const char *) (src))[idx] << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 1]) -# define __STRING2_SMALL_GET32(src, idx) \ - (((((__const unsigned char *) (__const char *) (src))[idx] << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 1]) << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 2]) << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 3]) -# endif -#else -/* These are a few types we need for the optimizations if we cannot - use unaligned memory accesses. */ -# define __STRING2_COPY_TYPE(N) \ - typedef struct { unsigned char __arr[N]; } \ - __STRING2_COPY_ARR##N __attribute__ ((packed)) -__STRING2_COPY_TYPE (2); -__STRING2_COPY_TYPE (3); -__STRING2_COPY_TYPE (4); -__STRING2_COPY_TYPE (5); -__STRING2_COPY_TYPE (6); -__STRING2_COPY_TYPE (7); -__STRING2_COPY_TYPE (8); -# undef __STRING2_COPY_TYPE -#endif - -/* Dereferencing a pointer arg to run sizeof on it fails for the void - pointer case, so we use this instead. - Note that __x is evaluated twice. */ -#define __string2_1bptr_p(__x) \ - ((size_t)(const void *)((__x) + 1) - (size_t)(const void *)(__x) == 1) - -/* Set N bytes of S to C. */ -#ifndef _HAVE_STRING_ARCH_memset -# if _STRING_ARCH_unaligned -# define memset(s, c, n) \ - (__extension__ (__builtin_constant_p (n) && (n) <= 16 \ - ? ((n) == 1 \ - ? __memset_1 (s, c) \ - : __memset_gc (s, c, n)) \ - : (__builtin_constant_p (c) && (c) == '\0' \ - ? ({ void *__s = (s); __bzero (__s, n); __s; }) \ - : memset (s, c, n)))) - -# define __memset_1(s, c) ({ void *__s = (s); \ - *((__uint8_t *) __s) = (__uint8_t) c; __s; }) - -# define __memset_gc(s, c, n) \ - ({ void *__s = (s); \ - union { \ - unsigned int __ui; \ - unsigned short int __usi; \ - unsigned char __uc; \ - } *__u = __s; \ - __uint8_t __c = (__uint8_t) (c); \ - \ - /* This `switch' statement will be removed at compile-time. */ \ - switch ((unsigned int) (n)) \ - { \ - case 15: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 11: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 7: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 3: \ - __u->__usi = (unsigned short int) __c * 0x0101; \ - __u = __extension__ (void *)((char *) __u + 2); \ - __u->__uc = (unsigned char) __c; \ - break; \ - \ - case 14: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 10: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 6: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 2: \ - __u->__usi = (unsigned short int) __c * 0x0101; \ - break; \ - \ - case 13: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 9: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 5: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 1: \ - __u->__uc = (unsigned char) __c; \ - break; \ - \ - case 16: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 12: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 8: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ (void *)((char *) __u + 4); \ - case 4: \ - __u->__ui = __c * 0x01010101; \ - case 0: \ - break; \ - } \ - \ - __s; }) -# else -# define memset(s, c, n) \ - (__extension__ (__builtin_constant_p (c) && (c) == '\0' \ - ? ({ void *__s = (s); __bzero (__s, n); __s; }) \ - : memset (s, c, n))) -# endif - -/* GCC optimizes memset(s, 0, n) but not bzero(s, n). - The optimization is broken before EGCS 1.1. */ -# if __GNUC_PREREQ (2, 91) -# define __bzero(s, n) __builtin_memset (s, '\0', n) -# endif - -#endif - - -/* Copy N bytes from SRC to DEST, returning pointer to byte following the - last copied. */ -#ifdef __USE_GNU -# if !defined _HAVE_STRING_ARCH_mempcpy || defined _FORCE_INLINES -# ifndef _HAVE_STRING_ARCH_mempcpy -# define __mempcpy(dest, src, n) \ - (__extension__ (__builtin_constant_p (src) && __builtin_constant_p (n) \ - && __string2_1bptr_p (src) && n <= 8 \ - ? __mempcpy_small (dest, __mempcpy_args (src), n) \ - : __mempcpy (dest, src, n))) -/* In glibc we use this function frequently but for namespace reasons - we have to use the name `__mempcpy'. */ -# define mempcpy(dest, src, n) __mempcpy (dest, src, n) -# endif - -# if _STRING_ARCH_unaligned -# ifndef _FORCE_INLINES -# define __mempcpy_args(src) \ - ((__const char *) (src))[0], ((__const char *) (src))[2], \ - ((__const char *) (src))[4], ((__const char *) (src))[6], \ - __extension__ __STRING2_SMALL_GET16 (src, 0), \ - __extension__ __STRING2_SMALL_GET16 (src, 4), \ - __extension__ __STRING2_SMALL_GET32 (src, 0), \ - __extension__ __STRING2_SMALL_GET32 (src, 4) -# endif -__STRING_INLINE void *__mempcpy_small (void *, char, char, char, char, - __uint16_t, __uint16_t, __uint32_t, - __uint32_t, size_t); -__STRING_INLINE void * -__mempcpy_small (void *__dest1, - char __src0_1, char __src2_1, char __src4_1, char __src6_1, - __uint16_t __src0_2, __uint16_t __src4_2, - __uint32_t __src0_4, __uint32_t __src4_4, - size_t __srclen) -{ - union { - __uint32_t __ui; - __uint16_t __usi; - unsigned char __uc; - unsigned char __c; - } *__u = __dest1; - switch ((unsigned int) __srclen) - { - case 1: - __u->__c = __src0_1; - __u = __extension__ (void *)((char *) __u + 1); - break; - case 2: - __u->__usi = __src0_2; - __u = __extension__ (void *)((char *) __u + 2); - break; - case 3: - __u->__usi = __src0_2; - __u = __extension__ (void *)((char *) __u + 2); - __u->__c = __src2_1; - __u = __extension__ (void *)((char *) __u + 1); - break; - case 4: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - break; - case 5: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__c = __src4_1; - __u = __extension__ (void *)((char *) __u + 1); - break; - case 6: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__usi = __src4_2; - __u = __extension__ (void *)((char *) __u + 2); - break; - case 7: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__usi = __src4_2; - __u = __extension__ (void *)((char *) __u + 2); - __u->__c = __src6_1; - __u = __extension__ (void *)((char *) __u + 1); - break; - case 8: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__ui = __src4_4; - __u = __extension__ (void *)((char *) __u + 4); - break; - } - return (void *) __u; -} -# else -# ifndef _FORCE_INLINES -# define __mempcpy_args(src) \ - ((__const char *) (src))[0], \ - __extension__ ((__STRING2_COPY_ARR2) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1] } }), \ - __extension__ ((__STRING2_COPY_ARR3) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2] } }), \ - __extension__ ((__STRING2_COPY_ARR4) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3] } }), \ - __extension__ ((__STRING2_COPY_ARR5) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4] } }), \ - __extension__ ((__STRING2_COPY_ARR6) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5] } }), \ - __extension__ ((__STRING2_COPY_ARR7) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - ((__const char *) (src))[6] } }), \ - __extension__ ((__STRING2_COPY_ARR8) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - ((__const char *) (src))[6], ((__const char *) (src))[7] } }) -# endif -__STRING_INLINE void *__mempcpy_small (void *, char, __STRING2_COPY_ARR2, - __STRING2_COPY_ARR3, - __STRING2_COPY_ARR4, - __STRING2_COPY_ARR5, - __STRING2_COPY_ARR6, - __STRING2_COPY_ARR7, - __STRING2_COPY_ARR8, size_t); -__STRING_INLINE void * -__mempcpy_small (void *__dest, char __src1, - __STRING2_COPY_ARR2 __src2, __STRING2_COPY_ARR3 __src3, - __STRING2_COPY_ARR4 __src4, __STRING2_COPY_ARR5 __src5, - __STRING2_COPY_ARR6 __src6, __STRING2_COPY_ARR7 __src7, - __STRING2_COPY_ARR8 __src8, size_t __srclen) -{ - union { - char __c; - __STRING2_COPY_ARR2 __sca2; - __STRING2_COPY_ARR3 __sca3; - __STRING2_COPY_ARR4 __sca4; - __STRING2_COPY_ARR5 __sca5; - __STRING2_COPY_ARR6 __sca6; - __STRING2_COPY_ARR7 __sca7; - __STRING2_COPY_ARR8 __sca8; - } *__u = __dest; - switch ((unsigned int) __srclen) - { - case 1: - __u->__c = __src1; - break; - case 2: - __extension__ __u->__sca2 = __src2; - break; - case 3: - __extension__ __u->__sca3 = __src3; - break; - case 4: - __extension__ __u->__sca4 = __src4; - break; - case 5: - __extension__ __u->__sca5 = __src5; - break; - case 6: - __extension__ __u->__sca6 = __src6; - break; - case 7: - __extension__ __u->__sca7 = __src7; - break; - case 8: - __extension__ __u->__sca8 = __src8; - break; - } - return __extension__ (void *)((char *) __u + __srclen); -} -# endif -# endif -#endif - - -/* Return pointer to C in S. */ -#ifndef _HAVE_STRING_ARCH_strchr -extern void *__rawmemchr (const void *__s, int __c); -# define strchr(s, c) \ - (__extension__ (__builtin_constant_p (c) && (c) == '\0' \ - ? (char *) __rawmemchr (s, c) \ - : strchr (s, c))) -#endif - - -/* Copy SRC to DEST. */ -#if !defined _HAVE_STRING_ARCH_strcpy || defined _FORCE_INLINES -# ifndef _HAVE_STRING_ARCH_strcpy -# define strcpy(dest, src) \ - (__extension__ (__builtin_constant_p (src) \ - ? (__string2_1bptr_p (src) && strlen (src) + 1 <= 8 \ - ? __strcpy_small (dest, __strcpy_args (src), \ - strlen (src) + 1) \ - : (char *) memcpy (dest, src, strlen (src) + 1)) \ - : strcpy (dest, src))) -# endif - -# if _STRING_ARCH_unaligned -# ifndef _FORCE_INLINES -# define __strcpy_args(src) \ - __extension__ __STRING2_SMALL_GET16 (src, 0), \ - __extension__ __STRING2_SMALL_GET16 (src, 4), \ - __extension__ __STRING2_SMALL_GET32 (src, 0), \ - __extension__ __STRING2_SMALL_GET32 (src, 4) -# endif -__STRING_INLINE char *__strcpy_small (char *, __uint16_t, __uint16_t, - __uint32_t, __uint32_t, size_t); -__STRING_INLINE char * -__strcpy_small (char *__dest, - __uint16_t __src0_2, __uint16_t __src4_2, - __uint32_t __src0_4, __uint32_t __src4_4, - size_t __srclen) -{ - union { - __uint32_t __ui; - __uint16_t __usi; - unsigned char __uc; - } *__u = (void *) __dest; - switch ((unsigned int) __srclen) - { - case 1: - __u->__uc = '\0'; - break; - case 2: - __u->__usi = __src0_2; - break; - case 3: - __u->__usi = __src0_2; - __u = __extension__ (void *)((char *) __u + 2); - __u->__uc = '\0'; - break; - case 4: - __u->__ui = __src0_4; - break; - case 5: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__uc = '\0'; - break; - case 6: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__usi = __src4_2; - break; - case 7: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__usi = __src4_2; - __u = __extension__ (void *)((char *) __u + 2); - __u->__uc = '\0'; - break; - case 8: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__ui = __src4_4; - break; - } - return __dest; -} -# else -# ifndef _FORCE_INLINES -# define __strcpy_args(src) \ - __extension__ ((__STRING2_COPY_ARR2) \ - { { ((__const char *) (src))[0], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR3) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR4) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR5) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR6) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR7) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR8) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - ((__const char *) (src))[6], '\0' } }) -# endif -__STRING_INLINE char *__strcpy_small (char *, __STRING2_COPY_ARR2, - __STRING2_COPY_ARR3, - __STRING2_COPY_ARR4, - __STRING2_COPY_ARR5, - __STRING2_COPY_ARR6, - __STRING2_COPY_ARR7, - __STRING2_COPY_ARR8, size_t); -__STRING_INLINE char * -__strcpy_small (char *__dest, - __STRING2_COPY_ARR2 __src2, __STRING2_COPY_ARR3 __src3, - __STRING2_COPY_ARR4 __src4, __STRING2_COPY_ARR5 __src5, - __STRING2_COPY_ARR6 __src6, __STRING2_COPY_ARR7 __src7, - __STRING2_COPY_ARR8 __src8, size_t __srclen) -{ - union { - char __c; - __STRING2_COPY_ARR2 __sca2; - __STRING2_COPY_ARR3 __sca3; - __STRING2_COPY_ARR4 __sca4; - __STRING2_COPY_ARR5 __sca5; - __STRING2_COPY_ARR6 __sca6; - __STRING2_COPY_ARR7 __sca7; - __STRING2_COPY_ARR8 __sca8; - } *__u = (void *) __dest; - switch ((unsigned int) __srclen) - { - case 1: - __u->__c = '\0'; - break; - case 2: - __extension__ __u->__sca2 = __src2; - break; - case 3: - __extension__ __u->__sca3 = __src3; - break; - case 4: - __extension__ __u->__sca4 = __src4; - break; - case 5: - __extension__ __u->__sca5 = __src5; - break; - case 6: - __extension__ __u->__sca6 = __src6; - break; - case 7: - __extension__ __u->__sca7 = __src7; - break; - case 8: - __extension__ __u->__sca8 = __src8; - break; - } - return __dest; -} -# endif -#endif - - -/* Copy SRC to DEST, returning pointer to final NUL byte. */ -#ifdef __USE_GNU -# if !defined _HAVE_STRING_ARCH_stpcpy || defined _FORCE_INLINES -# ifndef _HAVE_STRING_ARCH_stpcpy -# define __stpcpy(dest, src) \ - (__extension__ (__builtin_constant_p (src) \ - ? (__string2_1bptr_p (src) && strlen (src) + 1 <= 8 \ - ? __stpcpy_small (dest, __stpcpy_args (src), \ - strlen (src) + 1) \ - : ((char *) __mempcpy (dest, src, strlen (src) + 1) - 1))\ - : __stpcpy (dest, src))) -/* In glibc we use this function frequently but for namespace reasons - we have to use the name `__stpcpy'. */ -# define stpcpy(dest, src) __stpcpy (dest, src) -# endif - -# if _STRING_ARCH_unaligned -# ifndef _FORCE_INLINES -# define __stpcpy_args(src) \ - __extension__ __STRING2_SMALL_GET16 (src, 0), \ - __extension__ __STRING2_SMALL_GET16 (src, 4), \ - __extension__ __STRING2_SMALL_GET32 (src, 0), \ - __extension__ __STRING2_SMALL_GET32 (src, 4) -# endif -__STRING_INLINE char *__stpcpy_small (char *, __uint16_t, __uint16_t, - __uint32_t, __uint32_t, size_t); -__STRING_INLINE char * -__stpcpy_small (char *__dest, - __uint16_t __src0_2, __uint16_t __src4_2, - __uint32_t __src0_4, __uint32_t __src4_4, - size_t __srclen) -{ - union { - unsigned int __ui; - unsigned short int __usi; - unsigned char __uc; - char __c; - } *__u = (void *) __dest; - switch ((unsigned int) __srclen) - { - case 1: - __u->__uc = '\0'; - break; - case 2: - __u->__usi = __src0_2; - __u = __extension__ (void *)((char *) __u + 1); - break; - case 3: - __u->__usi = __src0_2; - __u = __extension__ (void *)((char *) __u + 2); - __u->__uc = '\0'; - break; - case 4: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 3); - break; - case 5: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__uc = '\0'; - break; - case 6: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__usi = __src4_2; - __u = __extension__ (void *)((char *) __u + 1); - break; - case 7: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__usi = __src4_2; - __u = __extension__ (void *)((char *) __u + 2); - __u->__uc = '\0'; - break; - case 8: - __u->__ui = __src0_4; - __u = __extension__ (void *)((char *) __u + 4); - __u->__ui = __src4_4; - __u = __extension__ (void *)((char *) __u + 3); - break; - } - return &__u->__c; -} -# else -# ifndef _FORCE_INLINES -# define __stpcpy_args(src) \ - __extension__ ((__STRING2_COPY_ARR2) \ - { { ((__const char *) (src))[0], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR3) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR4) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR5) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR6) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR7) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR8) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - ((__const char *) (src))[6], '\0' } }) -# endif -__STRING_INLINE char *__stpcpy_small (char *, __STRING2_COPY_ARR2, - __STRING2_COPY_ARR3, - __STRING2_COPY_ARR4, - __STRING2_COPY_ARR5, - __STRING2_COPY_ARR6, - __STRING2_COPY_ARR7, - __STRING2_COPY_ARR8, size_t); -__STRING_INLINE char * -__stpcpy_small (char *__dest, - __STRING2_COPY_ARR2 __src2, __STRING2_COPY_ARR3 __src3, - __STRING2_COPY_ARR4 __src4, __STRING2_COPY_ARR5 __src5, - __STRING2_COPY_ARR6 __src6, __STRING2_COPY_ARR7 __src7, - __STRING2_COPY_ARR8 __src8, size_t __srclen) -{ - union { - char __c; - __STRING2_COPY_ARR2 __sca2; - __STRING2_COPY_ARR3 __sca3; - __STRING2_COPY_ARR4 __sca4; - __STRING2_COPY_ARR5 __sca5; - __STRING2_COPY_ARR6 __sca6; - __STRING2_COPY_ARR7 __sca7; - __STRING2_COPY_ARR8 __sca8; - } *__u = (void *) __dest; - switch ((unsigned int) __srclen) - { - case 1: - __u->__c = '\0'; - break; - case 2: - __extension__ __u->__sca2 = __src2; - break; - case 3: - __extension__ __u->__sca3 = __src3; - break; - case 4: - __extension__ __u->__sca4 = __src4; - break; - case 5: - __extension__ __u->__sca5 = __src5; - break; - case 6: - __extension__ __u->__sca6 = __src6; - break; - case 7: - __extension__ __u->__sca7 = __src7; - break; - case 8: - __extension__ __u->__sca8 = __src8; - break; - } - return __dest + __srclen - 1; -} -# endif -# endif -#endif - - -/* Copy no more than N characters of SRC to DEST. */ -#ifndef _HAVE_STRING_ARCH_strncpy -# if defined _USE_STRING_ARCH_memset && defined _USE_STRING_ARCH_mempcpy -# define strncpy(dest, src, n) \ - (__extension__ ({ char *__dest = (dest); \ - __builtin_constant_p (src) && __builtin_constant_p (n) \ - ? (strlen (src) + 1 >= ((size_t) (n)) \ - ? (char *) memcpy (__dest, src, n) \ - : (memset (__mempcpy (__dest, src, strlen (src)), \ - '\0', n - strlen (src)), \ - __dest)) \ - : strncpy (__dest, src, n); })) -# else -# define strncpy(dest, src, n) \ - (__extension__ (__builtin_constant_p (src) && __builtin_constant_p (n) \ - ? (strlen (src) + 1 >= ((size_t) (n)) \ - ? (char *) memcpy (dest, src, n) \ - : strncpy (dest, src, n)) \ - : strncpy (dest, src, n))) -# endif -#endif - - -/* Append no more than N characters from SRC onto DEST. */ -#ifndef _HAVE_STRING_ARCH_strncat -# ifdef _USE_STRING_ARCH_strchr -# define strncat(dest, src, n) \ - (__extension__ ({ char *__dest = (dest); \ - __builtin_constant_p (src) && __builtin_constant_p (n) \ - ? (strlen (src) < ((size_t) (n)) \ - ? strcat (__dest, src) \ - : (*((char *) __mempcpy (strchr (__dest, '\0'), \ - src, n)) = '\0', __dest)) \ - : strncat (dest, src, n); })) -# else -# define strncat(dest, src, n) \ - (__extension__ (__builtin_constant_p (src) && __builtin_constant_p (n) \ - ? (strlen (src) < ((size_t) (n)) \ - ? strcat (dest, src) \ - : strncat (dest, src, n)) \ - : strncat (dest, src, n))) -# endif -#endif - - -/* Compare characters of S1 and S2. */ -#ifndef _HAVE_STRING_ARCH_strcmp -# define strcmp(s1, s2) \ - __extension__ \ - ({ size_t __s1_len, __s2_len; \ - (__builtin_constant_p (s1) && __builtin_constant_p (s2) \ - && (__s1_len = strlen (s1), __s2_len = strlen (s2), \ - (!__string2_1bptr_p (s1) || __s1_len >= 4) \ - && (!__string2_1bptr_p (s2) || __s2_len >= 4)) \ - ? memcmp ((__const char *) (s1), (__const char *) (s2), \ - (__s1_len < __s2_len ? __s1_len : __s2_len) + 1) \ - : (__builtin_constant_p (s1) && __string2_1bptr_p (s1) \ - && (__s1_len = strlen (s1), __s1_len < 4) \ - ? (__builtin_constant_p (s2) && __string2_1bptr_p (s2) \ - ? __strcmp_cc (s1, s2, __s1_len) \ - : __strcmp_cg (s1, s2, __s1_len)) \ - : (__builtin_constant_p (s2) && __string2_1bptr_p (s2) \ - && (__s2_len = strlen (s2), __s2_len < 4) \ - ? (__builtin_constant_p (s1) && __string2_1bptr_p (s1) \ - ? __strcmp_cc (s1, s2, __s2_len) \ - : __strcmp_gc (s1, s2, __s2_len)) \ - : strcmp (s1, s2)))); }) - -# define __strcmp_cc(s1, s2, l) \ - (__extension__ ({ register int __result = \ - (((__const unsigned char *) (__const char *) (s1))[0] \ - - ((__const unsigned char *) (__const char *)(s2))[0]);\ - if (l > 0 && __result == 0) \ - { \ - __result = (((__const unsigned char *) \ - (__const char *) (s1))[1] \ - - ((__const unsigned char *) \ - (__const char *) (s2))[1]); \ - if (l > 1 && __result == 0) \ - { \ - __result = \ - (((__const unsigned char *) \ - (__const char *) (s1))[2] \ - - ((__const unsigned char *) \ - (__const char *) (s2))[2]); \ - if (l > 2 && __result == 0) \ - __result = \ - (((__const unsigned char *) \ - (__const char *) (s1))[3] \ - - ((__const unsigned char *) \ - (__const char *) (s2))[3]); \ - } \ - } \ - __result; })) - -# define __strcmp_cg(s1, s2, l1) \ - (__extension__ ({ __const unsigned char *__s2 = \ - (__const unsigned char *) (__const char *) (s2); \ - register int __result = \ - (((__const unsigned char *) (__const char *) (s1))[0] \ - - __s2[0]); \ - if (l1 > 0 && __result == 0) \ - { \ - __result = (((__const unsigned char *) \ - (__const char *) (s1))[1] - __s2[1]); \ - if (l1 > 1 && __result == 0) \ - { \ - __result = (((__const unsigned char *) \ - (__const char *) (s1))[2] - __s2[2]);\ - if (l1 > 2 && __result == 0) \ - __result = (((__const unsigned char *) \ - (__const char *) (s1))[3] \ - - __s2[3]); \ - } \ - } \ - __result; })) - -# define __strcmp_gc(s1, s2, l2) \ - (__extension__ ({ __const unsigned char *__s1 = \ - (__const unsigned char *) (__const char *) (s1); \ - register int __result = \ - __s1[0] - ((__const unsigned char *) \ - (__const char *) (s2))[0]; \ - if (l2 > 0 && __result == 0) \ - { \ - __result = (__s1[1] \ - - ((__const unsigned char *) \ - (__const char *) (s2))[1]); \ - if (l2 > 1 && __result == 0) \ - { \ - __result = \ - (__s1[2] - ((__const unsigned char *) \ - (__const char *) (s2))[2]); \ - if (l2 > 2 && __result == 0) \ - __result = \ - (__s1[3] \ - - ((__const unsigned char *) \ - (__const char *) (s2))[3]); \ - } \ - } \ - __result; })) -#endif - - -/* Compare N characters of S1 and S2. */ -#ifndef _HAVE_STRING_ARCH_strncmp -# define strncmp(s1, s2, n) \ - (__extension__ (__builtin_constant_p (n) \ - && ((__builtin_constant_p (s1) \ - && strlen (s1) < ((size_t) (n))) \ - || (__builtin_constant_p (s2) \ - && strlen (s2) < ((size_t) (n)))) \ - ? strcmp (s1, s2) : strncmp (s1, s2, n))) -#endif - - -/* Return the length of the initial segment of S which - consists entirely of characters not in REJECT. */ -#if !defined _HAVE_STRING_ARCH_strcspn || defined _FORCE_INLINES -# ifndef _HAVE_STRING_ARCH_strcspn -# define strcspn(s, reject) \ - __extension__ \ - ({ char __r0, __r1, __r2; \ - (__builtin_constant_p (reject) && __string2_1bptr_p (reject) \ - ? ((__r0 = ((__const char *) (reject))[0], __r0 == '\0') \ - ? strlen (s) \ - : ((__r1 = ((__const char *) (reject))[1], __r1 == '\0') \ - ? __strcspn_c1 (s, __r0) \ - : ((__r2 = ((__const char *) (reject))[2], __r2 == '\0') \ - ? __strcspn_c2 (s, __r0, __r1) \ - : (((__const char *) (reject))[3] == '\0' \ - ? __strcspn_c3 (s, __r0, __r1, __r2) \ - : strcspn (s, reject))))) \ - : strcspn (s, reject)); }) -# endif - -__STRING_INLINE size_t __strcspn_c1 (__const char *__s, int __reject); -__STRING_INLINE size_t -__strcspn_c1 (__const char *__s, int __reject) -{ - register size_t __result = 0; - while (__s[__result] != '\0' && __s[__result] != __reject) - ++__result; - return __result; -} - -__STRING_INLINE size_t __strcspn_c2 (__const char *__s, int __reject1, - int __reject2); -__STRING_INLINE size_t -__strcspn_c2 (__const char *__s, int __reject1, int __reject2) -{ - register size_t __result = 0; - while (__s[__result] != '\0' && __s[__result] != __reject1 - && __s[__result] != __reject2) - ++__result; - return __result; -} - -__STRING_INLINE size_t __strcspn_c3 (__const char *__s, int __reject1, - int __reject2, int __reject3); -__STRING_INLINE size_t -__strcspn_c3 (__const char *__s, int __reject1, int __reject2, - int __reject3) -{ - register size_t __result = 0; - while (__s[__result] != '\0' && __s[__result] != __reject1 - && __s[__result] != __reject2 && __s[__result] != __reject3) - ++__result; - return __result; -} -#endif - - -/* Return the length of the initial segment of S which - consists entirely of characters in ACCEPT. */ -#if !defined _HAVE_STRING_ARCH_strspn || defined _FORCE_INLINES -# ifndef _HAVE_STRING_ARCH_strspn -# define strspn(s, accept) \ - __extension__ \ - ({ char __a0, __a1, __a2; \ - (__builtin_constant_p (accept) && __string2_1bptr_p (accept) \ - ? ((__a0 = ((__const char *) (accept))[0], __a0 == '\0') \ - ? ((void) (s), 0) \ - : ((__a1 = ((__const char *) (accept))[1], __a1 == '\0') \ - ? __strspn_c1 (s, __a0) \ - : ((__a2 = ((__const char *) (accept))[2], __a2 == '\0') \ - ? __strspn_c2 (s, __a0, __a1) \ - : (((__const char *) (accept))[3] == '\0' \ - ? __strspn_c3 (s, __a0, __a1, __a2) \ - : strspn (s, accept))))) \ - : strspn (s, accept)); }) -# endif - -__STRING_INLINE size_t __strspn_c1 (__const char *__s, int __accept); -__STRING_INLINE size_t -__strspn_c1 (__const char *__s, int __accept) -{ - register size_t __result = 0; - /* Please note that __accept never can be '\0'. */ - while (__s[__result] == __accept) - ++__result; - return __result; -} - -__STRING_INLINE size_t __strspn_c2 (__const char *__s, int __accept1, - int __accept2); -__STRING_INLINE size_t -__strspn_c2 (__const char *__s, int __accept1, int __accept2) -{ - register size_t __result = 0; - /* Please note that __accept1 and __accept2 never can be '\0'. */ - while (__s[__result] == __accept1 || __s[__result] == __accept2) - ++__result; - return __result; -} - -__STRING_INLINE size_t __strspn_c3 (__const char *__s, int __accept1, - int __accept2, int __accept3); -__STRING_INLINE size_t -__strspn_c3 (__const char *__s, int __accept1, int __accept2, int __accept3) -{ - register size_t __result = 0; - /* Please note that __accept1 to __accept3 never can be '\0'. */ - while (__s[__result] == __accept1 || __s[__result] == __accept2 - || __s[__result] == __accept3) - ++__result; - return __result; -} -#endif - - -/* Find the first occurrence in S of any character in ACCEPT. */ -#if !defined _HAVE_STRING_ARCH_strpbrk || defined _FORCE_INLINES -# ifndef _HAVE_STRING_ARCH_strpbrk -# define strpbrk(s, accept) \ - __extension__ \ - ({ char __a0, __a1, __a2; \ - (__builtin_constant_p (accept) && __string2_1bptr_p (accept) \ - ? ((__a0 = ((__const char *) (accept))[0], __a0 == '\0') \ - ? ((void) (s), NULL) \ - : ((__a1 = ((__const char *) (accept))[1], __a1 == '\0') \ - ? strchr (s, __a0) \ - : ((__a2 = ((__const char *) (accept))[2], __a2 == '\0') \ - ? __strpbrk_c2 (s, __a0, __a1) \ - : (((__const char *) (accept))[3] == '\0' \ - ? __strpbrk_c3 (s, __a0, __a1, __a2) \ - : strpbrk (s, accept))))) \ - : strpbrk (s, accept)); }) -# endif - -__STRING_INLINE char *__strpbrk_c2 (__const char *__s, int __accept1, - int __accept2); -__STRING_INLINE char * -__strpbrk_c2 (__const char *__s, int __accept1, int __accept2) -{ - /* Please note that __accept1 and __accept2 never can be '\0'. */ - while (*__s != '\0' && *__s != __accept1 && *__s != __accept2) - ++__s; - return *__s == '\0' ? NULL : (char *) (size_t) __s; -} - -__STRING_INLINE char *__strpbrk_c3 (__const char *__s, int __accept1, - int __accept2, int __accept3); -__STRING_INLINE char * -__strpbrk_c3 (__const char *__s, int __accept1, int __accept2, - int __accept3) -{ - /* Please note that __accept1 to __accept3 never can be '\0'. */ - while (*__s != '\0' && *__s != __accept1 && *__s != __accept2 - && *__s != __accept3) - ++__s; - return *__s == '\0' ? NULL : (char *) (size_t) __s; -} -#endif - - -/* Find the first occurrence of NEEDLE in HAYSTACK. Newer gcc versions - do this itself. */ -#if !defined _HAVE_STRING_ARCH_strstr && !__GNUC_PREREQ (2, 97) -# define strstr(haystack, needle) \ - (__extension__ (__builtin_constant_p (needle) && __string2_1bptr_p (needle) \ - ? (((__const char *) (needle))[0] == '\0' \ - ? (char *) (size_t) (haystack) \ - : (((__const char *) (needle))[1] == '\0' \ - ? strchr (haystack, \ - ((__const char *) (needle))[0]) \ - : strstr (haystack, needle))) \ - : strstr (haystack, needle))) -#endif - - -#if !defined _HAVE_STRING_ARCH_strtok_r || defined _FORCE_INLINES -# ifndef _HAVE_STRING_ARCH_strtok_r -# define __strtok_r(s, sep, nextp) \ - (__extension__ (__builtin_constant_p (sep) && __string2_1bptr_p (sep) \ - ? (((__const char *) (sep))[0] != '\0' \ - && ((__const char *) (sep))[1] == '\0' \ - ? __strtok_r_1c (s, ((__const char *) (sep))[0], nextp) \ - : __strtok_r (s, sep, nextp)) \ - : __strtok_r (s, sep, nextp))) -# endif - -__STRING_INLINE char *__strtok_r_1c (char *__s, char __sep, char **__nextp); -__STRING_INLINE char * -__strtok_r_1c (char *__s, char __sep, char **__nextp) -{ - char *__result; - if (__s == NULL) - __s = *__nextp; - while (*__s == __sep) - ++__s; - __result = NULL; - if (*__s != '\0') - { - __result = __s++; - while (*__s != '\0') - if (*__s++ == __sep) - { - __s[-1] = '\0'; - break; - } - *__nextp = __s; - } - return __result; -} -# if defined __USE_POSIX || defined __USE_MISC -# define strtok_r(s, sep, nextp) __strtok_r (s, sep, nextp) -# endif -#endif - - -#if !defined _HAVE_STRING_ARCH_strsep || defined _FORCE_INLINES -# ifndef _HAVE_STRING_ARCH_strsep - -extern char *__strsep_g (char **__stringp, __const char *__delim); -# define __strsep(s, reject) \ - __extension__ \ - ({ char __r0, __r1, __r2; \ - (__builtin_constant_p (reject) && __string2_1bptr_p (reject) \ - && (__r0 = ((__const char *) (reject))[0], \ - ((__const char *) (reject))[0] != '\0') \ - ? ((__r1 = ((__const char *) (reject))[1], \ - ((__const char *) (reject))[1] == '\0') \ - ? __strsep_1c (s, __r0) \ - : ((__r2 = ((__const char *) (reject))[2], __r2 == '\0') \ - ? __strsep_2c (s, __r0, __r1) \ - : (((__const char *) (reject))[3] == '\0' \ - ? __strsep_3c (s, __r0, __r1, __r2) \ - : __strsep_g (s, reject)))) \ - : __strsep_g (s, reject)); }) -# endif - -__STRING_INLINE char *__strsep_1c (char **__s, char __reject); -__STRING_INLINE char * -__strsep_1c (char **__s, char __reject) -{ - register char *__retval = *__s; - if (__retval != NULL && (*__s = strchr (__retval, __reject)) != NULL) - *(*__s)++ = '\0'; - return __retval; -} - -__STRING_INLINE char *__strsep_2c (char **__s, char __reject1, char __reject2); -__STRING_INLINE char * -__strsep_2c (char **__s, char __reject1, char __reject2) -{ - register char *__retval = *__s; - if (__retval != NULL) - { - register char *__cp = __retval; - while (1) - { - if (*__cp == '\0') - { - __cp = NULL; - break; - } - if (*__cp == __reject1 || *__cp == __reject2) - { - *__cp++ = '\0'; - break; - } - ++__cp; - } - *__s = __cp; - } - return __retval; -} - -__STRING_INLINE char *__strsep_3c (char **__s, char __reject1, char __reject2, - char __reject3); -__STRING_INLINE char * -__strsep_3c (char **__s, char __reject1, char __reject2, char __reject3) -{ - register char *__retval = *__s; - if (__retval != NULL) - { - register char *__cp = __retval; - while (1) - { - if (*__cp == '\0') - { - __cp = NULL; - break; - } - if (*__cp == __reject1 || *__cp == __reject2 || *__cp == __reject3) - { - *__cp++ = '\0'; - break; - } - ++__cp; - } - *__s = __cp; - } - return __retval; -} -# ifdef __USE_BSD -# define strsep(s, reject) __strsep (s, reject) -# endif -#endif - -/* We need the memory allocation functions for inline strdup(). - Referring to stdlib.h (even minimally) is not allowed - in any of the tight standards compliant modes. */ -#ifdef __USE_MISC - -# if !defined _HAVE_STRING_ARCH_strdup || !defined _HAVE_STRING_ARCH_strndup -# define __need_malloc_and_calloc -# include <stdlib.h> -# endif - -# ifndef _HAVE_STRING_ARCH_strdup - -extern char *__strdup (__const char *__string) __THROW __attribute_malloc__; -# define __strdup(s) \ - (__extension__ (__builtin_constant_p (s) && __string2_1bptr_p (s) \ - ? (((__const char *) (s))[0] == '\0' \ - ? (char *) calloc (1, 1) \ - : ({ size_t __len = strlen (s) + 1; \ - char *__retval = (char *) malloc (__len); \ - if (__retval != NULL) \ - __retval = (char *) memcpy (__retval, s, __len); \ - __retval; })) \ - : __strdup (s))) - -# if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN_EXTENDED -# define strdup(s) __strdup (s) -# endif -# endif - -# ifndef _HAVE_STRING_ARCH_strndup - -extern char *__strndup (__const char *__string, size_t __n) - __THROW __attribute_malloc__; -# define __strndup(s, n) \ - (__extension__ (__builtin_constant_p (s) && __string2_1bptr_p (s) \ - ? (((__const char *) (s))[0] == '\0' \ - ? (char *) calloc (1, 1) \ - : ({ size_t __len = strlen (s) + 1; \ - size_t __n = (n); \ - char *__retval; \ - if (__n < __len) \ - __len = __n; \ - __retval = (char *) malloc (__len); \ - if (__retval != NULL) \ - { \ - __retval[__len - 1] = '\0'; \ - __retval = (char *) memcpy (__retval, s, \ - __len - 1); \ - } \ - __retval; })) \ - : __strndup (s, n))) - -# ifdef __USE_GNU -# define strndup(s, n) __strndup (s, n) -# endif -# endif - -#endif /* Use misc. or use GNU. */ - -#ifndef _FORCE_INLINES -# undef __STRING_INLINE -#endif - -#endif /* No string inlines. */ diff --git a/libc/sysdeps/linux/sparc/bits/stropts.h b/libc/sysdeps/linux/sparc/bits/stropts.h deleted file mode 100644 index 21538c31d..000000000 --- a/libc/sysdeps/linux/sparc/bits/stropts.h +++ /dev/null @@ -1,227 +0,0 @@ -/* Copyright (C) 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. */ - -#ifndef _BITS_STROPTS_H -#define _BITS_STROPTS_H 1 - -#include <bits/types.h> - -/* Macros used as `request' argument to `ioctl'. */ -#define __SID ('S' << 8) - -#define I_NREAD (__SID | 1) /* Counts the number of data bytes in the data - block in the first message. */ -#define I_PUSH (__SID | 2) /* Push STREAMS module onto top of the current - STREAM, just below the STREAM head. */ -#define I_POP (__SID | 3) /* Remove STREAMS module from just below the - STREAM head. */ -#define I_LOOK (__SID | 4) /* Retrieve the name of the module just below - the STREAM head and place it in a character - string. */ -#define I_FLUSH (__SID | 5) /* Flush all input and/or output. */ -#define I_SRDOPT (__SID | 6) /* Sets the read mode. */ -#define I_GRDOPT (__SID | 7) /* Returns the current read mode setting. */ -#define I_STR (__SID | 8) /* Construct an internal STREAMS `ioctl' - message and send that message downstream. */ -#define I_SETSIG (__SID | 9) /* Inform the STREAM head that the process - wants the SIGPOLL signal issued. */ -#define I_GETSIG (__SID |10) /* Return the events for which the calling - process is currently registered to be sent - a SIGPOLL signal. */ -#define I_FIND (__SID |11) /* Compares the names of all modules currently - present in the STREAM to the name pointed to - by `arg'. */ -#define I_LINK (__SID |12) /* Connect two STREAMs. */ -#define I_UNLINK (__SID |13) /* Disconnects the two STREAMs. */ -#define I_PEEK (__SID |15) /* Allows a process to retrieve the information - in the first message on the STREAM head read - queue without taking the message off the - queue. */ -#define I_FDINSERT (__SID |16) /* Create a message from the specified - buffer(s), adds information about another - STREAM, and send the message downstream. */ -#define I_SENDFD (__SID |17) /* Requests the STREAM associated with `fildes' - to send a message, containing a file - pointer, to the STREAM head at the other end - of a STREAMS pipe. */ -#define I_RECVFD (__SID |14) /* Non-EFT definition. */ -#define I_SWROPT (__SID |19) /* Set the write mode. */ -#define I_GWROPT (__SID |20) /* Return the current write mode setting. */ -#define I_LIST (__SID |21) /* List all the module names on the STREAM, up - to and including the topmost driver name. */ -#define I_PLINK (__SID |22) /* Connect two STREAMs with a persistent - link. */ -#define I_PUNLINK (__SID |23) /* Disconnect the two STREAMs that were - connected with a persistent link. */ -#define I_FLUSHBAND (__SID |28) /* Flush only band specified. */ -#define I_CKBAND (__SID |29) /* Check if the message of a given priority - band exists on the STREAM head read - queue. */ -#define I_GETBAND (__SID |30) /* Return the priority band of the first - message on the STREAM head read queue. */ -#define I_ATMARK (__SID |31) /* See if the current message on the STREAM - head read queue is "marked" by some module - downstream. */ -#define I_SETCLTIME (__SID |32) /* Set the time the STREAM head will delay when - a STREAM is closing and there is data on - the write queues. */ -#define I_GETCLTIME (__SID |33) /* Get current value for closing timeout. */ -#define I_CANPUT (__SID |34) /* Check if a certain band is writable. */ - - -/* Used in `I_LOOK' request. */ -#define FMNAMESZ 8 /* compatibility w/UnixWare/Solaris. */ - -/* Flush options. */ -#define FLUSHR 0x01 /* Flush read queues. */ -#define FLUSHW 0x02 /* Flush write queues. */ -#define FLUSHRW 0x03 /* Flush read and write queues. */ -#ifdef __USE_GNU -# define FLUSHBAND 0x04 /* Flush only specified band. */ -#endif - -/* Possible arguments for `I_SETSIG'. */ -#define S_INPUT 0x0001 /* A message, other than a high-priority - message, has arrived. */ -#define S_HIPRI 0x0002 /* A high-priority message is present. */ -#define S_OUTPUT 0x0004 /* The write queue for normal data is no longer - full. */ -#define S_MSG 0x0008 /* A STREAMS signal message that contains the - SIGPOLL signal reaches the front of the - STREAM head read queue. */ -#define S_ERROR 0x0010 /* Notification of an error condition. */ -#define S_HANGUP 0x0020 /* Notification of a hangup. */ -#define S_RDNORM 0x0040 /* A normal message has arrived. */ -#define S_WRNORM S_OUTPUT -#define S_RDBAND 0x0080 /* A message with a non-zero priority has - arrived. */ -#define S_WRBAND 0x0100 /* The write queue for a non-zero priority - band is no longer full. */ -#define S_BANDURG 0x0200 /* When used in conjunction with S_RDBAND, - SIGURG is generated instead of SIGPOLL when - a priority message reaches the front of the - STREAM head read queue. */ - -/* Option for `I_PEEK'. */ -#define RS_HIPRI 0x01 /* Only look for high-priority messages. */ - -/* Options for `I_SRDOPT'. */ -#define RNORM 0x0000 /* Byte-STREAM mode, the default. */ -#define RMSGD 0x0001 /* Message-discard mode. */ -#define RMSGN 0x0002 /* Message-nondiscard mode. */ -#define RPROTDAT 0x0004 /* Deliver the control part of a message as - data. */ -#define RPROTDIS 0x0008 /* Discard the control part of a message, - delivering any data part. */ -#define RPROTNORM 0x0010 /* Fail `read' with EBADMSG if a message - containing a control part is at the front - of the STREAM head read queue. */ -#ifdef __USE_GNU -# define RPROTMASK 0x001C /* The RPROT bits */ -#endif - -/* Possible mode for `I_SWROPT'. */ -#define SNDZERO 0x001 /* Send a zero-length message downstream when a - `write' of 0 bytes occurs. */ -#ifdef __USE_GNU -# define SNDPIPE 0x002 /* Send SIGPIPE on write and putmsg if - sd_werror is set. */ -#endif - -/* Arguments for `I_ATMARK'. */ -#define ANYMARK 0x01 /* Check if the message is marked. */ -#define LASTMARK 0x02 /* Check if the message is the last one marked - on the queue. */ - -/* Argument for `I_UNLINK'. */ -#ifdef __USE_GNU -# define MUXID_ALL (-1) /* Unlink all STREAMs linked to the STREAM - associated with `fildes'. */ -#endif - - -/* Macros for `getmsg', `getpmsg', `putmsg' and `putpmsg'. */ -#define MSG_HIPRI 0x01 /* Send/receive high priority message. */ -#define MSG_ANY 0x02 /* Receive any message. */ -#define MSG_BAND 0x04 /* Receive message from specified band. */ - -/* Values returned by getmsg and getpmsg */ -#define MORECTL 1 /* More control information is left in - message. */ -#define MOREDATA 2 /* More data is left in message. */ - - -/* Structure used for the I_FLUSHBAND ioctl on streams. */ -struct bandinfo - { - unsigned char bi_pri; - int bi_flag; - }; - -struct strbuf - { - int maxlen; /* Maximum buffer length. */ - int len; /* Length of data. */ - char *buf; /* Pointer to buffer. */ - }; - -struct strpeek - { - struct strbuf ctlbuf; - struct strbuf databuf; - t_uscalar_t flags; /* UnixWare/Solaris compatibility. */ - }; - -struct strfdinsert - { - struct strbuf ctlbuf; - struct strbuf databuf; - t_uscalar_t flags; /* UnixWare/Solaris compatibility. */ - int fildes; - int offset; - }; - -struct strioctl - { - int ic_cmd; - int ic_timout; - int ic_len; - char *ic_dp; - }; - -struct strrecvfd - { - int fd; - uid_t uid; - gid_t gid; - char __fill[8]; /* UnixWare/Solaris compatibility */ - }; - - -struct str_mlist - { - char l_name[FMNAMESZ + 1]; - }; - -struct str_list - { - int sl_nmods; - struct str_mlist *sl_modlist; - }; - -#endif /* bits/stropts.h */ diff --git a/libc/sysdeps/linux/sparc/bits/uio.h b/libc/sysdeps/linux/sparc/bits/uio.h deleted file mode 100644 index 84b4805fe..000000000 --- a/libc/sysdeps/linux/sparc/bits/uio.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (C) 1996, 1997 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 _SYS_UIO_H -# error "Never include <bits/uio.h> directly; use <sys/uio.h> instead." -#endif - - -#include <sys/types.h> - - -/* We should normally use the Linux kernel header file to define this - type and macros but this calls for trouble because of the header - includes other kernel headers. */ - -/* Size of object which can be written atomically. - - This macro has different values in different kernel versions. The - latest versions of ther kernel use 1024 and this is good choice. Since - the C library implementation of readv/writev is able to emulate the - functionality even if the currently running kernel does not support - this large value the readv/writev call will not fail because of this. */ -#define UIO_MAXIOV 1024 - - -/* Structure for scatter/gather I/O. */ -struct iovec - { - void *iov_base; /* Pointer to data. */ - size_t iov_len; /* Length of data. */ - }; diff --git a/libc/sysdeps/linux/sparc/bits/ustat.h b/libc/sysdeps/linux/sparc/bits/ustat.h deleted file mode 100644 index aeafc22a5..000000000 --- a/libc/sysdeps/linux/sparc/bits/ustat.h +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 1997 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. */ - -#include <sys/types.h> - -struct ustat - { - __daddr_t f_tfree; - __ino_t f_tinode; - char f_fname[6]; - char f_fpack[6]; - }; diff --git a/libc/sysdeps/linux/sparc/bits/utmp.h b/libc/sysdeps/linux/sparc/bits/utmp.h deleted file mode 100644 index 2ed29bbb4..000000000 --- a/libc/sysdeps/linux/sparc/bits/utmp.h +++ /dev/null @@ -1,106 +0,0 @@ -/* The `struct utmp' type, describing entries in the utmp file. GNU version. - Copyright (C) 1993, 1996, 1997, 1998, 1999 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 _UTMP_H -# error "Never include <bits/utmp.h> directly; use <utmp.h> instead." -#endif - -#include <paths.h> -#include <sys/time.h> -#include <sys/types.h> - - -#define UT_LINESIZE 32 -#define UT_NAMESIZE 32 -#define UT_HOSTSIZE 256 - - -/* The structure describing an entry in the database of - previous logins. */ -struct lastlog - { - __time_t ll_time; - char ll_line[UT_LINESIZE]; - char ll_host[UT_HOSTSIZE]; - }; - - -/* The structure describing the status of a terminated process. This - type is used in `struct utmp' below. */ -struct exit_status - { - short int e_termination; /* Process termination status. */ - short int e_exit; /* Process exit status. */ - }; - - -/* The structure describing an entry in the user accounting database. */ -struct utmp -{ - short int ut_type; /* Type of login. */ - pid_t ut_pid; /* Process ID of login process. */ - char ut_line[UT_LINESIZE]; /* Devicename. */ - char ut_id[4]; /* Inittab ID. */ - char ut_user[UT_NAMESIZE]; /* Username. */ - char ut_host[UT_HOSTSIZE]; /* Hostname for remote login. */ - struct exit_status ut_exit; /* Exit status of a process marked - as DEAD_PROCESS. */ - long int ut_session; /* Session ID, used for windowing. */ - struct timeval ut_tv; /* Time entry was made. */ - int32_t ut_addr_v6[4]; /* Internet address of remote host. */ - char __unused[20]; /* Reserved for future use. */ -}; - -/* Backwards compatibility hacks. */ -#define ut_name ut_user -#ifndef _NO_UT_TIME -/* We have a problem here: `ut_time' is also used otherwise. Define - _NO_UT_TIME if the compiler complains. */ -# define ut_time ut_tv.tv_sec -#endif -#define ut_xtime ut_tv.tv_sec -#define ut_addr ut_addr_v6[0] - - -/* Values for the `ut_type' field of a `struct utmp'. */ -#define EMPTY 0 /* No valid user accounting information. */ - -#define RUN_LVL 1 /* The system's runlevel. */ -#define BOOT_TIME 2 /* Time of system boot. */ -#define NEW_TIME 3 /* Time after system clock changed. */ -#define OLD_TIME 4 /* Time when system clock changed. */ - -#define INIT_PROCESS 5 /* Process spawned by the init process. */ -#define LOGIN_PROCESS 6 /* Session leader of a logged in user. */ -#define USER_PROCESS 7 /* Normal process. */ -#define DEAD_PROCESS 8 /* Terminated process. */ - -#define ACCOUNTING 9 - -/* Old Linux name for the EMPTY type. */ -#define UT_UNKNOWN EMPTY - - -/* Tell the user that we have a modern system with UT_HOST, UT_PID, - UT_TYPE, UT_ID and UT_TV fields. */ -#define _HAVE_UT_TYPE 1 -#define _HAVE_UT_PID 1 -#define _HAVE_UT_ID 1 -#define _HAVE_UT_TV 1 -#define _HAVE_UT_HOST 1 diff --git a/libc/sysdeps/linux/sparc/bits/utmpx.h b/libc/sysdeps/linux/sparc/bits/utmpx.h deleted file mode 100644 index 99735370b..000000000 --- a/libc/sysdeps/linux/sparc/bits/utmpx.h +++ /dev/null @@ -1,89 +0,0 @@ -/* Structures and definitions for the user accounting database. GNU version. - Copyright (C) 1997, 1998, 2000, 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. */ - -#ifndef _UTMPX_H -# error "Never include <bits/utmpx.h> directly; use <utmpx.h> instead." -#endif - -#include <bits/types.h> -#include <sys/time.h> - - -#ifdef __USE_GNU -# include <paths.h> -# define _PATH_UTMPX _PATH_UTMP -# define _PATH_WTMPX _PATH_WTMP -#endif - - -#define __UT_LINESIZE 32 -#define __UT_NAMESIZE 32 -#define __UT_HOSTSIZE 256 - - -/* The structure describing the status of a terminated process. This - type is used in `struct utmpx' below. */ -struct __exit_status - { -#ifdef __USE_GNU - short int e_termination; /* Process termination status. */ - short int e_exit; /* Process exit status. */ -#else - short int __e_termination; /* Process termination status. */ - short int __e_exit; /* Process exit status. */ -#endif - }; - - -/* The structure describing an entry in the user accounting database. */ -struct utmpx -{ - short int ut_type; /* Type of login. */ - __pid_t ut_pid; /* Process ID of login process. */ - char ut_line[__UT_LINESIZE]; /* Devicename. */ - char ut_id[4]; /* Inittab ID. */ - char ut_user[__UT_NAMESIZE]; /* Username. */ - char ut_host[__UT_HOSTSIZE]; /* Hostname for remote login. */ - struct __exit_status ut_exit; /* Exit status of a process marked - as DEAD_PROCESS. */ - long int ut_session; /* Session ID, used for windowing. */ - struct timeval ut_tv; /* Time entry was made. */ - __int32_t ut_addr_v6[4]; /* Internet address of remote host. */ - char __unused[20]; /* Reserved for future use. */ -}; - - -/* Values for the `ut_type' field of a `struct utmpx'. */ -#define EMPTY 0 /* No valid user accounting information. */ - -#ifdef __USE_GNU -# define RUN_LVL 1 /* The system's runlevel. */ -#endif -#define BOOT_TIME 2 /* Time of system boot. */ -#define NEW_TIME 3 /* Time after system clock changed. */ -#define OLD_TIME 4 /* Time when system clock changed. */ - -#define INIT_PROCESS 5 /* Process spawned by the init process. */ -#define LOGIN_PROCESS 6 /* Session leader of a logged in user. */ -#define USER_PROCESS 7 /* Normal process. */ -#define DEAD_PROCESS 8 /* Terminated process. */ - -#ifdef __USE_GNU -# define ACCOUNTING 9 /* System accounting. */ -#endif diff --git a/libc/sysdeps/linux/sparc/bits/utsname.h b/libc/sysdeps/linux/sparc/bits/utsname.h deleted file mode 100644 index 35e71e3ba..000000000 --- a/libc/sysdeps/linux/sparc/bits/utsname.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 1995, 1996, 1997 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 _SYS_UTSNAME_H -# error "Never include <bits/utsname.h> directly; use <sys/utsname.h> instead." -#endif - -/* Length of the entries in `struct utsname' is 65. */ -#define _UTSNAME_LENGTH 65 - -/* Linux provides as additional information in the `struct utsname' - the name of the current domain. Define _UTSNAME_DOMAIN_LENGTH - to a value != 0 to activate this entry. */ -#define _UTSNAME_DOMAIN_LENGTH _UTSNAME_LENGTH diff --git a/libc/sysdeps/linux/sparc/bits/waitflags.h b/libc/sysdeps/linux/sparc/bits/waitflags.h deleted file mode 100644 index 1303c6c36..000000000 --- a/libc/sysdeps/linux/sparc/bits/waitflags.h +++ /dev/null @@ -1,30 +0,0 @@ -/* Definitions of flag bits for `waitpid' et al. - Copyright (C) 1992, 1996, 1997, 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. */ - -#if !defined _SYS_WAIT_H && !defined _STDLIB_H -# error "Never include <bits/waitflags.h> directly; use <sys/wait.h> instead." -#endif - - -/* Bits in the third argument to `waitpid'. */ -#define WNOHANG 1 /* Don't block waiting. */ -#define WUNTRACED 2 /* Report status of stopped children. */ - -#define __WALL 0x40000000 /* Wait for any child. */ -#define __WCLONE 0x80000000 /* Wait for cloned process. */ diff --git a/libc/sysdeps/linux/sparc/bits/waitstatus.h b/libc/sysdeps/linux/sparc/bits/waitstatus.h deleted file mode 100644 index 982c9dbb2..000000000 --- a/libc/sysdeps/linux/sparc/bits/waitstatus.h +++ /dev/null @@ -1,104 +0,0 @@ -/* Definitions of status bits for `wait' et al. - Copyright (C) 1992, 1994, 1996, 1997, 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. */ - -#if !defined _SYS_WAIT_H && !defined _STDLIB_H -# error "Never include <bits/waitstatus.h> directly; use <sys/wait.h> instead." -#endif - - -/* Everything extant so far uses these same bits. */ - - -/* If WIFEXITED(STATUS), the low-order 8 bits of the status. */ -#define __WEXITSTATUS(status) (((status) & 0xff00) >> 8) - -/* If WIFSIGNALED(STATUS), the terminating signal. */ -#define __WTERMSIG(status) ((status) & 0x7f) - -/* If WIFSTOPPED(STATUS), the signal that stopped the child. */ -#define __WSTOPSIG(status) __WEXITSTATUS(status) - -/* Nonzero if STATUS indicates normal termination. */ -#define __WIFEXITED(status) (__WTERMSIG(status) == 0) - -/* Nonzero if STATUS indicates termination by a signal. */ -#ifdef __GNUC__ -# define __WIFSIGNALED(status) \ - (__extension__ ({ int __status = (status); \ - !__WIFSTOPPED(__status) && !__WIFEXITED(__status); })) -#else /* Not GCC. */ -# define __WIFSIGNALED(status) (!__WIFSTOPPED(status) && !__WIFEXITED(status)) -#endif /* GCC. */ - -/* Nonzero if STATUS indicates the child is stopped. */ -#define __WIFSTOPPED(status) (((status) & 0xff) == 0x7f) - -/* Nonzero if STATUS indicates the child dumped core. */ -#define __WCOREDUMP(status) ((status) & __WCOREFLAG) - -/* Macros for constructing status values. */ -#define __W_EXITCODE(ret, sig) ((ret) << 8 | (sig)) -#define __W_STOPCODE(sig) ((sig) << 8 | 0x7f) -#define __WCOREFLAG 0x80 - - -#ifdef __USE_BSD - -# include <endian.h> - -union wait - { - int w_status; - struct - { -# if __BYTE_ORDER == __LITTLE_ENDIAN - unsigned int __w_termsig:7; /* Terminating signal. */ - unsigned int __w_coredump:1; /* Set if dumped core. */ - unsigned int __w_retcode:8; /* Return code if exited normally. */ - unsigned int:16; -# endif /* Little endian. */ -# if __BYTE_ORDER == __BIG_ENDIAN - unsigned int:16; - unsigned int __w_retcode:8; - unsigned int __w_coredump:1; - unsigned int __w_termsig:7; -# endif /* Big endian. */ - } __wait_terminated; - struct - { -# if __BYTE_ORDER == __LITTLE_ENDIAN - unsigned int __w_stopval:8; /* W_STOPPED if stopped. */ - unsigned int __w_stopsig:8; /* Stopping signal. */ - unsigned int:16; -# endif /* Little endian. */ -# if __BYTE_ORDER == __BIG_ENDIAN - unsigned int:16; - unsigned int __w_stopsig:8; /* Stopping signal. */ - unsigned int __w_stopval:8; /* W_STOPPED if stopped. */ -# endif /* Big endian. */ - } __wait_stopped; - }; - -# define w_termsig __wait_terminated.__w_termsig -# define w_coredump __wait_terminated.__w_coredump -# define w_retcode __wait_terminated.__w_retcode -# define w_stopsig __wait_stopped.__w_stopsig -# define w_stopval __wait_stopped.__w_stopval - -#endif /* Use BSD. */ diff --git a/libc/sysdeps/linux/sparc/bits/wchar.h b/libc/sysdeps/linux/sparc/bits/wchar.h deleted file mode 100644 index ef1f56363..000000000 --- a/libc/sysdeps/linux/sparc/bits/wchar.h +++ /dev/null @@ -1,26 +0,0 @@ -/* wchar_t type related definitions. - Copyright (C) 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 _BITS_WCHAR_H -#define _BITS_WCHAR_H 1 - -#define __WCHAR_MIN (-2147483647 - 1) -#define __WCHAR_MAX (2147483647) - -#endif /* bits/wchar.h */ diff --git a/libc/sysdeps/linux/sparc/bits/wordsize.h b/libc/sysdeps/linux/sparc/bits/wordsize.h index 98c588450..cbe862f50 100644 --- a/libc/sysdeps/linux/sparc/bits/wordsize.h +++ b/libc/sysdeps/linux/sparc/bits/wordsize.h @@ -1,7 +1,24 @@ -/* Determine the wordsize from the preprocessor defines. */ +/* Copyright (C) 1999 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. */ #if defined __arch64__ || defined __sparcv9 -# define __WORDSIZE 64 +# define __WORDSIZE 64 #else -# define __WORDSIZE 32 +# define __WORDSIZE 32 #endif + diff --git a/libc/sysdeps/linux/sparc/bits/xopen_lim.h b/libc/sysdeps/linux/sparc/bits/xopen_lim.h deleted file mode 100644 index 7f3611860..000000000 --- a/libc/sysdeps/linux/sparc/bits/xopen_lim.h +++ /dev/null @@ -1,144 +0,0 @@ -/* Copyright (C) 1996, 1997, 1999, 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. */ - -/* - * Never include this file directly; use <limits.h> instead. - */ - -/* Additional definitions from X/Open Portability Guide, Issue 4, Version 2 - System Interfaces and Headers, 4.16 <limits.h> - - Please note only the values which are not greater than the minimum - stated in the standard document are listed. The `sysconf' functions - should be used to obtain the actual value. */ - -#ifndef _XOPEN_LIM_H -#define _XOPEN_LIM_H 1 - -#define __need_IOV_MAX -#include <bits/stdio_lim.h> - -/* We do not provide fixed values for - - ARG_MAX Maximum length of argument to the `exec' function - including environment data. - - ATEXIT_MAX Maximum number of functions that may be registered - with `atexit'. - - CHILD_MAX Maximum number of simultaneous processes per real - user ID. - - OPEN_MAX Maximum number of files that one process can have open - at anyone time. - - PAGESIZE - PAGE_SIZE Size of bytes of a page. - - PASS_MAX Maximum number of significant bytes in a password. - - We only provide a fixed limit for - - IOV_MAX Maximum number of `iovec' structures that one process has - available for use with `readv' or writev'. - - if this is indeed fixed by the underlying system. -*/ - - -/* Maximum number of `iovec' structures that one process has available - for use with `readv' or writev'. */ -#define _XOPEN_IOV_MAX _POSIX_UIO_MAXIOV - - -/* Maximum value of `digit' in calls to the `printf' and `scanf' - functions. We have no limit, so return a reasonable value. */ -#define NL_ARGMAX _POSIX_ARG_MAX - -/* Maximum number of bytes in a `LANG' name. We have no limit. */ -#define NL_LANGMAX _POSIX2_LINE_MAX - -/* Maximum message number. We have no limit. */ -#define NL_MSGMAX INT_MAX - -/* Maximum number of bytes in N-to-1 collation mapping. We have no - limit. */ -#define NL_NMAX INT_MAX - -/* Maximum set number. We have no limit. */ -#define NL_SETMAX INT_MAX - -/* Maximum number of bytes in a message. We have no limit. */ -#define NL_TEXTMAX INT_MAX - -/* Default process priority. */ -#define NZERO 20 - - -/* Number of bits in a word of type `int'. */ -#ifdef INT_MAX -# if INT_MAX == 32767 -# define WORD_BIT 16 -# else -# if INT_MAX == 2147483647 -# define WORD_BIT 32 -# else -/* Safe assumption. */ -# define WORD_BIT 64 -# endif -# endif -#elif defined __INT_MAX__ -# if __INT_MAX__ == 32767 -# define WORD_BIT 16 -# else -# if __INT_MAX__ == 2147483647 -# define WORD_BIT 32 -# else -/* Safe assumption. */ -# define WORD_BIT 64 -# endif -# endif -#else -# define WORD_BIT 32 -#endif - -/* Number of bits in a word of type `long int'. */ -#ifdef LONG_MAX -# if LONG_MAX == 2147483647 -# define LONG_BIT 32 -# else -/* Safe assumption. */ -# define LONG_BIT 64 -# endif -#elif defined __LONG_MAX__ -# if __LONG_MAX__ == 2147483647 -# define LONG_BIT 32 -# else -/* Safe assumption. */ -# define LONG_BIT 64 -# endif -#else -# include <bits/wordsize.h> -# if __WORDSIZE == 64 -# define LONG_BIT 64 -# else -# define LONG_BIT 32 -# endif -#endif - -#endif /* bits/xopen_lim.h */ diff --git a/libc/sysdeps/linux/sparc/sys/procfs.h b/libc/sysdeps/linux/sparc/sys/procfs.h new file mode 100644 index 000000000..e5d35f524 --- /dev/null +++ b/libc/sysdeps/linux/sparc/sys/procfs.h @@ -0,0 +1,144 @@ +/* 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 _SYS_PROCFS_H +#define _SYS_PROCFS_H 1 + +/* This is somehow modelled after the file of the same name on SysVr4 + systems. It provides a definition of the core file format for ELF + used on Linux. */ + +#include <features.h> +#include <signal.h> +#include <sys/time.h> +#include <sys/types.h> +#include <sys/ucontext.h> +#include <sys/user.h> +#include <bits/wordsize.h> + +__BEGIN_DECLS + +#if __WORDSIZE == 64 + +#define ELF_NGREG 20 + +typedef struct + { + unsigned long pr_regs[32]; + unsigned long pr_fsr; + unsigned long pr_gsr; + unsigned long pr_fprs; + } elf_fpregset_t; + +#else /* sparc32 */ + +#define ELF_NGREG 38 + +typedef struct + { + union + { + unsigned long pr_regs[32]; + double pr_dregs[16]; + } pr_fr; + unsigned long __unused; + unsigned long pr_fsr; + unsigned char pr_qcnt; + unsigned char pr_q_entrysize; + unsigned char pr_en; + unsigned int pr_q[64]; + } elf_fpregset_t; + +#endif /* sparc32 */ + +typedef unsigned long elf_greg_t; +typedef elf_greg_t elf_gregset_t[ELF_NGREG]; + +struct elf_siginfo + { + int si_signo; /* Signal number. */ + int si_code; /* Extra code. */ + int si_errno; /* Errno. */ + }; + +/* Definitions to generate Intel SVR4-like core files. These mostly + have the same names as the SVR4 types with "elf_" tacked on the + front to prevent clashes with linux definitions, and the typedef + forms have been avoided. This is mostly like the SVR4 structure, + but more Linuxy, with things that Linux does not support and which + gdb doesn't really use excluded. Fields present but not used are + marked with "XXX". */ +struct elf_prstatus + { + struct elf_siginfo pr_info; /* Info associated with signal. */ + short int pr_cursig; /* Current signal. */ + unsigned long int pr_sigpend; /* Set of pending signals. */ + unsigned long int pr_sighold; /* Set of held signals. */ + __pid_t pr_pid; + __pid_t pr_ppid; + __pid_t pr_pgrp; + __pid_t pr_sid; + struct timeval pr_utime; /* User time. */ + struct timeval pr_stime; /* System time. */ + struct timeval pr_cutime; /* Cumulative user time. */ + struct timeval pr_cstime; /* Cumulative system time. */ + elf_gregset_t pr_reg; /* GP registers. */ + int pr_fpvalid; /* True if math copro being used. */ + }; + + +#define ELF_PRARGSZ (80) /* Number of chars for args */ + +struct elf_prpsinfo + { + char pr_state; /* Numeric process state. */ + char pr_sname; /* Char for pr_state. */ + char pr_zomb; /* Zombie. */ + char pr_nice; /* Nice val. */ + unsigned long int pr_flag; /* Flags. */ +#if __WORDSIZE == 64 + unsigned int pr_uid; + unsigned int pr_gid; +#else + unsigned short int pr_uid; + unsigned short int pr_gid; +#endif + int pr_pid, pr_ppid, pr_pgrp, pr_sid; + /* Lots missing */ + char pr_fname[16]; /* Filename of executable. */ + char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ + }; + +/* Addresses. */ +typedef void *psaddr_t; + +/* Register sets. Linux has different names. */ +typedef elf_gregset_t prgregset_t; +typedef elf_fpregset_t prfpregset_t; + +/* We don't have any differences between processes and threads, + therefore have only one PID type. */ +typedef __pid_t lwpid_t; + + +typedef struct elf_prstatus prstatus_t; +typedef struct elf_prpsinfo prpsinfo_t; + +__END_DECLS + +#endif /* sys/procfs.h */ diff --git a/libc/sysdeps/linux/sparc/sys/ptrace.h b/libc/sysdeps/linux/sparc/sys/ptrace.h new file mode 100644 index 000000000..d573f0e99 --- /dev/null +++ b/libc/sysdeps/linux/sparc/sys/ptrace.h @@ -0,0 +1,183 @@ +/* `ptrace' debugger support interface. Linux/SPARC version. + 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. */ + +#ifndef _SYS_PTRACE_H +#define _SYS_PTRACE_H 1 + +#include <features.h> + +#include <bits/wordsize.h> + +/* Linux/SPARC kernels up to 2.3.18 do not care much + about what namespace polution, so use a kludge now. */ +#undef PTRACE_GETREGS +#undef PTRACE_SETREGS +#undef PTRACE_GETFPREGS +#undef PTRACE_SETFPREGS +#undef PTRACE_READDATA +#undef PTRACE_WRITEDATA +#undef PTRACE_READTEXT +#undef PTRACE_WRITETEXT +#undef PTRACE_SUNDETACH + +__BEGIN_DECLS + +/* Type of the REQUEST argument to `ptrace.' */ +enum __ptrace_request +{ + /* Indicate that the process making this request should be traced. + All signals received by this process can be intercepted by its + parent, and its parent can use the other `ptrace' requests. */ + PTRACE_TRACEME = 0, +#define PT_TRACE_ME PTRACE_TRACEME + + /* Return the word in the process's text space at address ADDR. */ + PTRACE_PEEKTEXT = 1, +#define PT_READ_I PTRACE_PEEKTEXT + + /* Return the word in the process's data space at address ADDR. */ + PTRACE_PEEKDATA = 2, +#define PT_READ_D PTRACE_PEEKDATA + + /* Return the word in the process's user area at offset ADDR. */ + PTRACE_PEEKUSER = 3, +#define PT_READ_U PTRACE_PEEKUSER + + /* Write the word DATA into the process's text space at address ADDR. */ + PTRACE_POKETEXT = 4, +#define PT_WRITE_I PTRACE_POKETEXT + + /* Write the word DATA into the process's data space at address ADDR. */ + PTRACE_POKEDATA = 5, +#define PT_WRITE_D PTRACE_POKEDATA + + /* Write the word DATA into the process's user area at offset ADDR. */ + PTRACE_POKEUSER = 6, +#define PT_WRITE_U PTRACE_POKEUSER + + /* Continue the process. */ + PTRACE_CONT = 7, +#define PT_CONTINUE PTRACE_CONT + + /* Kill the process. */ + PTRACE_KILL = 8, +#define PT_KILL PTRACE_KILL + + /* Single step the process. + This is not supported on all machines. */ + PTRACE_SINGLESTEP = 9, +#define PT_STEP PTRACE_SINGLESTEP + + /* Detach from a process attached to with PTRACE_ATTACH. */ + PTRACE_DETACH = 11, +#define PT_DETACH PTRACE_DETACH + + /* This define is needed for older programs which were + trying to work around sparc-linux ptrace nastiness. */ +#define PTRACE_SUNDETACH PTRACE_DETACH + +#if __WORDSIZE == 32 + + /* Get all general purpose registers used by a processes. + This is not supported on all machines. */ + PTRACE_GETREGS = 12, +#define PT_GETREGS PTRACE_GETREGS + + /* Set all general purpose registers used by a processes. + This is not supported on all machines. */ + PTRACE_SETREGS = 13, +#define PT_SETREGS PTRACE_SETREGS + + /* Get all floating point registers used by a processes. + This is not supported on all machines. */ + PTRACE_GETFPREGS = 14, +#define PT_GETFPREGS PTRACE_GETFPREGS + + /* Set all floating point registers used by a processes. + This is not supported on all machines. */ + PTRACE_SETFPREGS = 15, +#define PT_SETFPREGS PTRACE_SETFPREGS + +#endif + + /* Attach to a process that is already running. */ + PTRACE_ATTACH = 16, +#define PT_ATTACH PTRACE_ATTACH + + /* Write several bytes at a time. */ + PTRACE_WRITEDATA = 17, +#define PTRACE_WRITEDATA PTRACE_WRITEDATA + + /* Read several bytes at a time. */ + PTRACE_READTEXT = 18, +#define PTRACE_READTEXT PTRACE_READTEXT +#define PTRACE_READDATA PTRACE_READTEXT + + /* Write several bytes at a time. */ + PTRACE_WRITETEXT = 19, +#define PTRACE_WRITETEXT PTRACE_WRITETEXT + +#if __WORDSIZE == 64 + + /* Get all general purpose registers used by a processes. + This is not supported on all machines. */ + PTRACE_GETREGS = 22, +#define PT_GETREGS PTRACE_GETREGS + + /* Set all general purpose registers used by a processes. + This is not supported on all machines. */ + PTRACE_SETREGS = 23, +#define PT_SETREGS PTRACE_SETREGS + +#endif + + /* Continue and stop at the next (return from) syscall. */ + PTRACE_SYSCALL = 24 +#define PTRACE_SYSCALL PTRACE_SYSCALL + +#if __WORDSIZE == 64 + + , + /* Get all floating point registers used by a processes. + This is not supported on all machines. */ + PTRACE_GETFPREGS = 25, +#define PT_GETFPREGS PTRACE_GETFPREGS + + /* Set all floating point registers used by a processes. + This is not supported on all machines. */ + PTRACE_SETFPREGS = 26 +#define PT_SETFPREGS PTRACE_SETFPREGS + +#endif +}; + +/* Perform process tracing functions. REQUEST is one of the values + above, and determines the action to be taken. + For all requests except PTRACE_TRACEME, PID specifies the process to be + traced. + + PID and the other arguments described above for the various requests should + appear (those that are used for the particular request) as: + pid_t PID, void *ADDR, int DATA, void *ADDR2 + after REQUEST. */ +extern long int ptrace (enum __ptrace_request __request, ...) __THROW; + +__END_DECLS + +#endif /* _SYS_PTRACE_H */ diff --git a/libc/sysdeps/linux/sparc/sys/sysmacros.h b/libc/sysdeps/linux/sparc/sys/sysmacros.h new file mode 100644 index 000000000..3a2c44d98 --- /dev/null +++ b/libc/sysdeps/linux/sparc/sys/sysmacros.h @@ -0,0 +1,41 @@ +/* Definitions of macros to access `dev_t' values. + Copyright (C) 1996, 1997, 1999 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 _SYS_SYSMACROS_H +#define _SYS_SYSMACROS_H 1 + +#include <bits/wordsize.h> + +/* For compatibility we provide alternative names. + + The problem here is that compilers other than GCC probably don't + have the `long long' type and so `dev_t' is actually an array. */ +#if __WORDSIZE == 64 || (defined __GNUC__ && __GNUC__ >= 2) +# define major(dev) ((int)(((dev) >> 8) & 0xff)) +# define minor(dev) ((int)((dev) & 0xff)) +# define makedev(major, minor) ((((unsigned int) (major)) << 8) \ + | ((unsigned int) (minor))) +#else +# define major(dev) (((dev).__val[1] >> 8) & 0xff) +# define minor(dev) ((dev).__val[1] & 0xff) +# define makedev(major, minor) { 0, ((((unsigned int) (major)) << 8) \ + | ((unsigned int) (minor))) } +#endif + +#endif /* sys/sysmacros.h */ diff --git a/libc/sysdeps/linux/sparc/sys/trap.h b/libc/sysdeps/linux/sparc/sys/trap.h new file mode 100644 index 000000000..99b9c60e0 --- /dev/null +++ b/libc/sysdeps/linux/sparc/sys/trap.h @@ -0,0 +1,7 @@ +/* Include Linux/SPARC specific trap definitions. */ +#ifndef _SYS_TRAP_H +#define _SYS_TRAP_H 1 + +#include <asm/traps.h> + +#endif /* sys/trap.h */ diff --git a/libc/sysdeps/linux/sparc/sys/ucontext.h b/libc/sysdeps/linux/sparc/sys/ucontext.h new file mode 100644 index 000000000..b1102b04c --- /dev/null +++ b/libc/sysdeps/linux/sparc/sys/ucontext.h @@ -0,0 +1,270 @@ +/* Copyright (C) 1998, 1999 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 _SYS_UCONTEXT_H +#define _SYS_UCONTEXT_H 1 + +#include <features.h> +#include <signal.h> +#include <bits/wordsize.h> + +#if __WORDSIZE == 64 + +#define MC_TSTATE 0 +#define MC_PC 1 +#define MC_NPC 2 +#define MC_Y 3 +#define MC_G1 4 +#define MC_G2 5 +#define MC_G3 6 +#define MC_G4 7 +#define MC_G5 8 +#define MC_G6 9 +#define MC_G7 10 +#define MC_O0 11 +#define MC_O1 12 +#define MC_O2 13 +#define MC_O3 14 +#define MC_O4 15 +#define MC_O5 16 +#define MC_O6 17 +#define MC_O7 18 +#define MC_NGREG 19 + +typedef unsigned long mc_greg_t; +typedef mc_greg_t mc_gregset_t[MC_NGREG]; + +#define MC_MAXFPQ 16 +struct mc_fq { + unsigned long *mcfq_addr; + unsigned int mcfq_insn; +}; + +struct mc_fpu { + union { + unsigned int sregs[32]; + unsigned long dregs[32]; + long double qregs[16]; + } mcfpu_fregs; + unsigned long mcfpu_fsr; + unsigned long mcfpu_fprs; + unsigned long mcfpu_gsr; + struct mc_fq *mcfpu_fq; + unsigned char mcfpu_qcnt; + unsigned char mcfpu_qentsz; + unsigned char mcfpu_enab; +}; +typedef struct mc_fpu mc_fpu_t; + +typedef struct { + mc_gregset_t mc_gregs; + mc_greg_t mc_fp; + mc_greg_t mc_i7; + mc_fpu_t mc_fpregs; +} mcontext_t; + +typedef struct ucontext { + struct ucontext *uc_link; + unsigned long uc_flags; + unsigned long __uc_sigmask; + mcontext_t uc_mcontext; + stack_t uc_stack; + __sigset_t uc_sigmask; +} ucontext_t; + +#endif /* __WORDISIZE == 64 */ + +/* + * Location of the users' stored registers relative to R0. + * Usage is as an index into a gregset_t array or as u.u_ar0[XX]. + */ +#define REG_PSR (0) +#define REG_PC (1) +#define REG_nPC (2) +#define REG_Y (3) +#define REG_G1 (4) +#define REG_G2 (5) +#define REG_G3 (6) +#define REG_G4 (7) +#define REG_G5 (8) +#define REG_G6 (9) +#define REG_G7 (10) +#define REG_O0 (11) +#define REG_O1 (12) +#define REG_O2 (13) +#define REG_O3 (14) +#define REG_O4 (15) +#define REG_O5 (16) +#define REG_O6 (17) +#define REG_O7 (18) + +/* + * A gregset_t is defined as an array type for compatibility with the reference + * source. This is important due to differences in the way the C language + * treats arrays and structures as parameters. + * + * Note that NGREG is really (sizeof (struct regs) / sizeof (greg_t)), + * but that the ABI defines it absolutely to be 21 (resp. 19). + */ + +#if __WORDSIZE == 64 + +#define REG_ASI (19) +#define REG_FPRS (20) + +#define NGREG 21 +typedef long greg_t; + +#else /* __WORDSIZE == 32 */ + +#define NGREG 19 +typedef int greg_t; + +#endif /* __WORDSIZE == 32 */ + +typedef greg_t gregset_t[NGREG]; + +/* + * The following structures define how a register window can appear on the + * stack. This structure is available (when required) through the `gwins' + * field of an mcontext (nested within ucontext). SPARC_MAXWINDOW is the + * maximum number of outstanding regiters window defined in the SPARC + * architecture (*not* implementation). + */ +#define SPARC_MAXREGWINDOW 31 /* max windows in SPARC arch. */ +struct rwindow + { + greg_t rw_local[8]; /* locals */ + greg_t rw_in[8]; /* ins */ + }; + +#define rw_fp rw_in[6] /* frame pointer */ +#define rw_rtn rw_in[7] /* return address */ + +typedef struct gwindows + { + int wbcnt; + int *spbuf[SPARC_MAXREGWINDOW]; + struct rwindow wbuf[SPARC_MAXREGWINDOW]; + } gwindows_t; + +/* + * Floating point definitions. + */ + +#define MAXFPQ 16 /* max # of fpu queue entries currently supported */ + +/* + * struct fq defines the minimal format of a floating point instruction queue + * entry. The size of entries in the floating point queue are implementation + * dependent. The union FQu is guarenteed to be the first field in any ABI + * conformant system implementation. Any additional fields provided by an + * implementation should not be used applications designed to be ABI conformant. */ + +struct fpq + { + unsigned long *fpq_addr; /* address */ + unsigned long fpq_instr; /* instruction */ + }; + +struct fq + { + union /* FPU inst/addr queue */ + { + double whole; + struct fpq fpq; + } FQu; + }; + +#define FPU_REGS_TYPE unsigned +#define FPU_DREGS_TYPE unsigned long long +#define V7_FPU_FSR_TYPE unsigned +#define V9_FPU_FSR_TYPE unsigned long long +#define V9_FPU_FPRS_TYPE unsigned + +#if __WORDSIZE == 64 + +typedef struct fpu + { + union { /* FPU floating point regs */ + unsigned fpu_regs[32]; /* 32 singles */ + double fpu_dregs[16]; /* 32 doubles */ + long double fpu_qregs[16]; /* 16 quads */ + } fpu_fr; + struct fq *fpu_q; /* ptr to array of FQ entries */ + unsigned long fpu_fsr; /* FPU status register */ + unsigned char fpu_qcnt; /* # of entries in saved FQ */ + unsigned char fpu_q_entrysize; /* # of bytes per FQ entry */ + unsigned char fpu_en; /* flag signifying fpu in use */ + } fpregset_t; + +#else /* __WORDSIZE == 32 */ + +typedef struct fpu + { + union { /* FPU floating point regs */ + unsigned long long fpu_regs[32]; /* 32 singles */ + double fpu_dregs[16]; /* 16 doubles */ + } fpu_fr; + struct fq *fpu_q; /* ptr to array of FQ entries */ + unsigned fpu_fsr; /* FPU status register */ + unsigned char fpu_qcnt; /* # of entries in saved FQ */ + unsigned char fpu_q_entrysize; /* # of bytes per FQ entry */ + unsigned char fpu_en; /* flag signifying fpu in use */ + } fpregset_t; + +/* + * The following structure is for associating extra register state with + * the ucontext structure and is kept within the uc_mcontext filler area. + * + * If (xrs_id == XRS_ID) then the xrs_ptr field is a valid pointer to + * extra register state. The exact format of the extra register state + * pointed to by xrs_ptr is platform-dependent. + * + * Note: a platform may or may not manage extra register state. + */ +typedef struct + { + unsigned int xrs_id; /* indicates xrs_ptr validity */ + void * xrs_ptr; /* ptr to extra reg state */ + } xrs_t; + +#define XRS_ID 0x78727300 /* the string "xrs" */ + +typedef struct + { + gregset_t gregs; /* general register set */ + gwindows_t *gwins; /* POSSIBLE pointer to register windows */ + fpregset_t fpregs; /* floating point register set */ + xrs_t xrs; /* POSSIBLE extra register state association */ + long filler[19]; + } mcontext_t; + + +/* Userlevel context. */ +typedef struct ucontext + { + unsigned long uc_flags; + struct ucontext *uc_link; + __sigset_t uc_sigmask; + stack_t uc_stack; + mcontext_t uc_mcontext; + } ucontext_t; + +#endif /* __WORDSIZE == 32 */ +#endif /* sys/ucontext.h */ diff --git a/libc/sysdeps/linux/v850/bits/byteswap.h b/libc/sysdeps/linux/v850/bits/byteswap.h deleted file mode 100644 index 44fbee488..000000000 --- a/libc/sysdeps/linux/v850/bits/byteswap.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * libc/sysdeps/linux/v850/bits/byteswap.h -- Macros to swap the order - * of bytes in integer values - * - * Copyright (C) 2001 NEC Corporation - * Copyright (C) 2001 Miles Bader <miles@gnu.org> - * Copyright (C) 1997,1998,2001 Free Software Foundation, Inc. - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License. See the file COPYING.LIB in the main - * directory of this archive for more details. - */ - -#if !defined _BYTESWAP_H && !defined _NETINET_IN_H -# error "Never use <bits/byteswap.h> directly; include <byteswap.h> instead." -#endif - -/* Swap bytes in 16 bit value. */ -#define __bswap_constant_16(x) \ - ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)) - -#ifdef __GNUC__ -# define __bswap_16(x) \ - (__extension__ \ - ({ unsigned long int __bswap_16_v; \ - if (__builtin_constant_p (x)) \ - __bswap_16_v = __bswap_constant_16 (x); \ - else \ - __asm__ ("bsh %1, %0" : "=r" (__bswap_16_v) : "r" (x)); \ - __bswap_16_v; })) -#else -# define __bswap_16(x) __bswap_constant_16 (x) -#endif - -/* Swap bytes in 32 bit value. */ -#define __bswap_constant_32(x) \ - ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \ - (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24)) - -#ifdef __GNUC__ -# define __bswap_32(x) \ - (__extension__ \ - ({ unsigned long int __bswap_32_v; \ - if (__builtin_constant_p (x)) \ - __bswap_32_v = __bswap_constant_32 (x); \ - else \ - __asm__ ("bsw %1, %0" : "=r" (__bswap_32_v) : "r" (x)); \ - __bswap_32_v; })) -#else -# define __bswap_32(x) __bswap_constant_32 (x) -#endif - -#if defined __GNUC__ && __GNUC__ >= 2 -/* Swap bytes in 64 bit value. */ -# define __bswap_64(x) \ - (__extension__ \ - ({ union { unsigned long long int __ll; \ - unsigned long int __l[2]; } __bswap_64_v, __bswap_64_r; \ - __bswap_64_v.__ll = (x); \ - __bswap_64_r.__l[0] = __bswap_32 (__bswap_64_v.__l[1]); \ - __bswap_64_r.__l[1] = __bswap_32 (__bswap_64_v.__l[0]); \ - __bswap_64_r.__ll; })) -#endif diff --git a/libc/sysdeps/linux/v850/bits/cmathcalls.h b/libc/sysdeps/linux/v850/bits/cmathcalls.h deleted file mode 100644 index a3c0d3b63..000000000 --- a/libc/sysdeps/linux/v850/bits/cmathcalls.h +++ /dev/null @@ -1,160 +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/libc/sysdeps/linux/v850/bits/confname.h b/libc/sysdeps/linux/v850/bits/confname.h deleted file mode 100644 index ba8868af4..000000000 --- a/libc/sysdeps/linux/v850/bits/confname.h +++ /dev/null @@ -1,566 +0,0 @@ -/* `sysconf', `pathconf', and `confstr' NAME values. Generic version. - Copyright (C) 1993, 1995-1998, 2000, 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. */ - -#ifndef _UNISTD_H -# error "Never use <bits/confname.h> directly; include <unistd.h> instead." -#endif - -/* Values for the NAME argument to `pathconf' and `fpathconf'. */ -enum - { - _PC_LINK_MAX, -#define _PC_LINK_MAX _PC_LINK_MAX - _PC_MAX_CANON, -#define _PC_MAX_CANON _PC_MAX_CANON - _PC_MAX_INPUT, -#define _PC_MAX_INPUT _PC_MAX_INPUT - _PC_NAME_MAX, -#define _PC_NAME_MAX _PC_NAME_MAX - _PC_PATH_MAX, -#define _PC_PATH_MAX _PC_PATH_MAX - _PC_PIPE_BUF, -#define _PC_PIPE_BUF _PC_PIPE_BUF - _PC_CHOWN_RESTRICTED, -#define _PC_CHOWN_RESTRICTED _PC_CHOWN_RESTRICTED - _PC_NO_TRUNC, -#define _PC_NO_TRUNC _PC_NO_TRUNC - _PC_VDISABLE, -#define _PC_VDISABLE _PC_VDISABLE - _PC_SYNC_IO, -#define _PC_SYNC_IO _PC_SYNC_IO - _PC_ASYNC_IO, -#define _PC_ASYNC_IO _PC_ASYNC_IO - _PC_PRIO_IO, -#define _PC_PRIO_IO _PC_PRIO_IO - _PC_SOCK_MAXBUF, -#define _PC_SOCK_MAXBUF _PC_SOCK_MAXBUF - _PC_FILESIZEBITS, -#define _PC_FILESIZEBITS _PC_FILESIZEBITS - _PC_REC_INCR_XFER_SIZE, -#define _PC_REC_INCR_XFER_SIZE _PC_REC_INCR_XFER_SIZE - _PC_REC_MAX_XFER_SIZE, -#define _PC_REC_MAX_XFER_SIZE _PC_REC_MAX_XFER_SIZE - _PC_REC_MIN_XFER_SIZE, -#define _PC_REC_MIN_XFER_SIZE _PC_REC_MIN_XFER_SIZE - _PC_REC_XFER_ALIGN, -#define _PC_REC_XFER_ALIGN _PC_REC_XFER_ALIGN - _PC_ALLOC_SIZE_MIN, -#define _PC_ALLOC_SIZE_MIN _PC_ALLOC_SIZE_MIN - _PC_SYMLINK_MAX -#define _PC_SYMLINK_MAX _PC_SYMLINK_MAX - }; - -/* Values for the argument to `sysconf'. */ -enum - { - _SC_ARG_MAX, -#define _SC_ARG_MAX _SC_ARG_MAX - _SC_CHILD_MAX, -#define _SC_CHILD_MAX _SC_CHILD_MAX - _SC_CLK_TCK, -#define _SC_CLK_TCK _SC_CLK_TCK - _SC_NGROUPS_MAX, -#define _SC_NGROUPS_MAX _SC_NGROUPS_MAX - _SC_OPEN_MAX, -#define _SC_OPEN_MAX _SC_OPEN_MAX - _SC_STREAM_MAX, -#define _SC_STREAM_MAX _SC_STREAM_MAX - _SC_TZNAME_MAX, -#define _SC_TZNAME_MAX _SC_TZNAME_MAX - _SC_JOB_CONTROL, -#define _SC_JOB_CONTROL _SC_JOB_CONTROL - _SC_SAVED_IDS, -#define _SC_SAVED_IDS _SC_SAVED_IDS - _SC_REALTIME_SIGNALS, -#define _SC_REALTIME_SIGNALS _SC_REALTIME_SIGNALS - _SC_PRIORITY_SCHEDULING, -#define _SC_PRIORITY_SCHEDULING _SC_PRIORITY_SCHEDULING - _SC_TIMERS, -#define _SC_TIMERS _SC_TIMERS - _SC_ASYNCHRONOUS_IO, -#define _SC_ASYNCHRONOUS_IO _SC_ASYNCHRONOUS_IO - _SC_PRIORITIZED_IO, -#define _SC_PRIORITIZED_IO _SC_PRIORITIZED_IO - _SC_SYNCHRONIZED_IO, -#define _SC_SYNCHRONIZED_IO _SC_SYNCHRONIZED_IO - _SC_FSYNC, -#define _SC_FSYNC _SC_FSYNC - _SC_MAPPED_FILES, -#define _SC_MAPPED_FILES _SC_MAPPED_FILES - _SC_MEMLOCK, -#define _SC_MEMLOCK _SC_MEMLOCK - _SC_MEMLOCK_RANGE, -#define _SC_MEMLOCK_RANGE _SC_MEMLOCK_RANGE - _SC_MEMORY_PROTECTION, -#define _SC_MEMORY_PROTECTION _SC_MEMORY_PROTECTION - _SC_MESSAGE_PASSING, -#define _SC_MESSAGE_PASSING _SC_MESSAGE_PASSING - _SC_SEMAPHORES, -#define _SC_SEMAPHORES _SC_SEMAPHORES - _SC_SHARED_MEMORY_OBJECTS, -#define _SC_SHARED_MEMORY_OBJECTS _SC_SHARED_MEMORY_OBJECTS - _SC_AIO_LISTIO_MAX, -#define _SC_AIO_LISTIO_MAX _SC_AIO_LISTIO_MAX - _SC_AIO_MAX, -#define _SC_AIO_MAX _SC_AIO_MAX - _SC_AIO_PRIO_DELTA_MAX, -#define _SC_AIO_PRIO_DELTA_MAX _SC_AIO_PRIO_DELTA_MAX - _SC_DELAYTIMER_MAX, -#define _SC_DELAYTIMER_MAX _SC_DELAYTIMER_MAX - _SC_MQ_OPEN_MAX, -#define _SC_MQ_OPEN_MAX _SC_MQ_OPEN_MAX - _SC_MQ_PRIO_MAX, -#define _SC_MQ_PRIO_MAX _SC_MQ_PRIO_MAX - _SC_VERSION, -#define _SC_VERSION _SC_VERSION - _SC_PAGESIZE, -#define _SC_PAGESIZE _SC_PAGESIZE -#define _SC_PAGE_SIZE _SC_PAGESIZE - _SC_RTSIG_MAX, -#define _SC_RTSIG_MAX _SC_RTSIG_MAX - _SC_SEM_NSEMS_MAX, -#define _SC_SEM_NSEMS_MAX _SC_SEM_NSEMS_MAX - _SC_SEM_VALUE_MAX, -#define _SC_SEM_VALUE_MAX _SC_SEM_VALUE_MAX - _SC_SIGQUEUE_MAX, -#define _SC_SIGQUEUE_MAX _SC_SIGQUEUE_MAX - _SC_TIMER_MAX, -#define _SC_TIMER_MAX _SC_TIMER_MAX - - /* Values for the argument to `sysconf' - corresponding to _POSIX2_* symbols. */ - _SC_BC_BASE_MAX, -#define _SC_BC_BASE_MAX _SC_BC_BASE_MAX - _SC_BC_DIM_MAX, -#define _SC_BC_DIM_MAX _SC_BC_DIM_MAX - _SC_BC_SCALE_MAX, -#define _SC_BC_SCALE_MAX _SC_BC_SCALE_MAX - _SC_BC_STRING_MAX, -#define _SC_BC_STRING_MAX _SC_BC_STRING_MAX - _SC_COLL_WEIGHTS_MAX, -#define _SC_COLL_WEIGHTS_MAX _SC_COLL_WEIGHTS_MAX - _SC_EQUIV_CLASS_MAX, -#define _SC_EQUIV_CLASS_MAX _SC_EQUIV_CLASS_MAX - _SC_EXPR_NEST_MAX, -#define _SC_EXPR_NEST_MAX _SC_EXPR_NEST_MAX - _SC_LINE_MAX, -#define _SC_LINE_MAX _SC_LINE_MAX - _SC_RE_DUP_MAX, -#define _SC_RE_DUP_MAX _SC_RE_DUP_MAX - _SC_CHARCLASS_NAME_MAX, -#define _SC_CHARCLASS_NAME_MAX _SC_CHARCLASS_NAME_MAX - - _SC_2_VERSION, -#define _SC_2_VERSION _SC_2_VERSION - _SC_2_C_BIND, -#define _SC_2_C_BIND _SC_2_C_BIND - _SC_2_C_DEV, -#define _SC_2_C_DEV _SC_2_C_DEV - _SC_2_FORT_DEV, -#define _SC_2_FORT_DEV _SC_2_FORT_DEV - _SC_2_FORT_RUN, -#define _SC_2_FORT_RUN _SC_2_FORT_RUN - _SC_2_SW_DEV, -#define _SC_2_SW_DEV _SC_2_SW_DEV - _SC_2_LOCALEDEF, -#define _SC_2_LOCALEDEF _SC_2_LOCALEDEF - - _SC_PII, -#define _SC_PII _SC_PII - _SC_PII_XTI, -#define _SC_PII_XTI _SC_PII_XTI - _SC_PII_SOCKET, -#define _SC_PII_SOCKET _SC_PII_SOCKET - _SC_PII_INTERNET, -#define _SC_PII_INTERNET _SC_PII_INTERNET - _SC_PII_OSI, -#define _SC_PII_OSI _SC_PII_OSI - _SC_POLL, -#define _SC_POLL _SC_POLL - _SC_SELECT, -#define _SC_SELECT _SC_SELECT - _SC_UIO_MAXIOV, -#define _SC_UIO_MAXIOV _SC_UIO_MAXIOV - _SC_IOV_MAX = _SC_UIO_MAXIOV, -#define _SC_IOV_MAX _SC_IOV_MAX - _SC_PII_INTERNET_STREAM, -#define _SC_PII_INTERNET_STREAM _SC_PII_INTERNET_STREAM - _SC_PII_INTERNET_DGRAM, -#define _SC_PII_INTERNET_DGRAM _SC_PII_INTERNET_DGRAM - _SC_PII_OSI_COTS, -#define _SC_PII_OSI_COTS _SC_PII_OSI_COTS - _SC_PII_OSI_CLTS, -#define _SC_PII_OSI_CLTS _SC_PII_OSI_CLTS - _SC_PII_OSI_M, -#define _SC_PII_OSI_M _SC_PII_OSI_M - _SC_T_IOV_MAX, -#define _SC_T_IOV_MAX _SC_T_IOV_MAX - - /* Values according to POSIX 1003.1c (POSIX threads). */ - _SC_THREADS, -#define _SC_THREADS _SC_THREADS - _SC_THREAD_SAFE_FUNCTIONS, -#define _SC_THREAD_SAFE_FUNCTIONS _SC_THREAD_SAFE_FUNCTIONS - _SC_GETGR_R_SIZE_MAX, -#define _SC_GETGR_R_SIZE_MAX _SC_GETGR_R_SIZE_MAX - _SC_GETPW_R_SIZE_MAX, -#define _SC_GETPW_R_SIZE_MAX _SC_GETPW_R_SIZE_MAX - _SC_LOGIN_NAME_MAX, -#define _SC_LOGIN_NAME_MAX _SC_LOGIN_NAME_MAX - _SC_TTY_NAME_MAX, -#define _SC_TTY_NAME_MAX _SC_TTY_NAME_MAX - _SC_THREAD_DESTRUCTOR_ITERATIONS, -#define _SC_THREAD_DESTRUCTOR_ITERATIONS _SC_THREAD_DESTRUCTOR_ITERATIONS - _SC_THREAD_KEYS_MAX, -#define _SC_THREAD_KEYS_MAX _SC_THREAD_KEYS_MAX - _SC_THREAD_STACK_MIN, -#define _SC_THREAD_STACK_MIN _SC_THREAD_STACK_MIN - _SC_THREAD_THREADS_MAX, -#define _SC_THREAD_THREADS_MAX _SC_THREAD_THREADS_MAX - _SC_THREAD_ATTR_STACKADDR, -#define _SC_THREAD_ATTR_STACKADDR _SC_THREAD_ATTR_STACKADDR - _SC_THREAD_ATTR_STACKSIZE, -#define _SC_THREAD_ATTR_STACKSIZE _SC_THREAD_ATTR_STACKSIZE - _SC_THREAD_PRIORITY_SCHEDULING, -#define _SC_THREAD_PRIORITY_SCHEDULING _SC_THREAD_PRIORITY_SCHEDULING - _SC_THREAD_PRIO_INHERIT, -#define _SC_THREAD_PRIO_INHERIT _SC_THREAD_PRIO_INHERIT - _SC_THREAD_PRIO_PROTECT, -#define _SC_THREAD_PRIO_PROTECT _SC_THREAD_PRIO_PROTECT - _SC_THREAD_PROCESS_SHARED, -#define _SC_THREAD_PROCESS_SHARED _SC_THREAD_PROCESS_SHARED - - _SC_NPROCESSORS_CONF, -#define _SC_NPROCESSORS_CONF _SC_NPROCESSORS_CONF - _SC_NPROCESSORS_ONLN, -#define _SC_NPROCESSORS_ONLN _SC_NPROCESSORS_ONLN - _SC_PHYS_PAGES, -#define _SC_PHYS_PAGES _SC_PHYS_PAGES - _SC_AVPHYS_PAGES, -#define _SC_AVPHYS_PAGES _SC_AVPHYS_PAGES - _SC_ATEXIT_MAX, -#define _SC_ATEXIT_MAX _SC_ATEXIT_MAX - _SC_PASS_MAX, -#define _SC_PASS_MAX _SC_PASS_MAX - - _SC_XOPEN_VERSION, -#define _SC_XOPEN_VERSION _SC_XOPEN_VERSION - _SC_XOPEN_XCU_VERSION, -#define _SC_XOPEN_XCU_VERSION _SC_XOPEN_XCU_VERSION - _SC_XOPEN_UNIX, -#define _SC_XOPEN_UNIX _SC_XOPEN_UNIX - _SC_XOPEN_CRYPT, -#define _SC_XOPEN_CRYPT _SC_XOPEN_CRYPT - _SC_XOPEN_ENH_I18N, -#define _SC_XOPEN_ENH_I18N _SC_XOPEN_ENH_I18N - _SC_XOPEN_SHM, -#define _SC_XOPEN_SHM _SC_XOPEN_SHM - - _SC_2_CHAR_TERM, -#define _SC_2_CHAR_TERM _SC_2_CHAR_TERM - _SC_2_C_VERSION, -#define _SC_2_C_VERSION _SC_2_C_VERSION - _SC_2_UPE, -#define _SC_2_UPE _SC_2_UPE - - _SC_XOPEN_XPG2, -#define _SC_XOPEN_XPG2 _SC_XOPEN_XPG2 - _SC_XOPEN_XPG3, -#define _SC_XOPEN_XPG3 _SC_XOPEN_XPG3 - _SC_XOPEN_XPG4, -#define _SC_XOPEN_XPG4 _SC_XOPEN_XPG4 - - _SC_CHAR_BIT, -#define _SC_CHAR_BIT _SC_CHAR_BIT - _SC_CHAR_MAX, -#define _SC_CHAR_MAX _SC_CHAR_MAX - _SC_CHAR_MIN, -#define _SC_CHAR_MIN _SC_CHAR_MIN - _SC_INT_MAX, -#define _SC_INT_MAX _SC_INT_MAX - _SC_INT_MIN, -#define _SC_INT_MIN _SC_INT_MIN - _SC_LONG_BIT, -#define _SC_LONG_BIT _SC_LONG_BIT - _SC_WORD_BIT, -#define _SC_WORD_BIT _SC_WORD_BIT - _SC_MB_LEN_MAX, -#define _SC_MB_LEN_MAX _SC_MB_LEN_MAX - _SC_NZERO, -#define _SC_NZERO _SC_NZERO - _SC_SSIZE_MAX, -#define _SC_SSIZE_MAX _SC_SSIZE_MAX - _SC_SCHAR_MAX, -#define _SC_SCHAR_MAX _SC_SCHAR_MAX - _SC_SCHAR_MIN, -#define _SC_SCHAR_MIN _SC_SCHAR_MIN - _SC_SHRT_MAX, -#define _SC_SHRT_MAX _SC_SHRT_MAX - _SC_SHRT_MIN, -#define _SC_SHRT_MIN _SC_SHRT_MIN - _SC_UCHAR_MAX, -#define _SC_UCHAR_MAX _SC_UCHAR_MAX - _SC_UINT_MAX, -#define _SC_UINT_MAX _SC_UINT_MAX - _SC_ULONG_MAX, -#define _SC_ULONG_MAX _SC_ULONG_MAX - _SC_USHRT_MAX, -#define _SC_USHRT_MAX _SC_USHRT_MAX - - _SC_NL_ARGMAX, -#define _SC_NL_ARGMAX _SC_NL_ARGMAX - _SC_NL_LANGMAX, -#define _SC_NL_LANGMAX _SC_NL_LANGMAX - _SC_NL_MSGMAX, -#define _SC_NL_MSGMAX _SC_NL_MSGMAX - _SC_NL_NMAX, -#define _SC_NL_NMAX _SC_NL_NMAX - _SC_NL_SETMAX, -#define _SC_NL_SETMAX _SC_NL_SETMAX - _SC_NL_TEXTMAX, -#define _SC_NL_TEXTMAX _SC_NL_TEXTMAX - - _SC_XBS5_ILP32_OFF32, -#define _SC_XBS5_ILP32_OFF32 _SC_XBS5_ILP32_OFF32 - _SC_XBS5_ILP32_OFFBIG, -#define _SC_XBS5_ILP32_OFFBIG _SC_XBS5_ILP32_OFFBIG - _SC_XBS5_LP64_OFF64, -#define _SC_XBS5_LP64_OFF64 _SC_XBS5_LP64_OFF64 - _SC_XBS5_LPBIG_OFFBIG, -#define _SC_XBS5_LPBIG_OFFBIG _SC_XBS5_LPBIG_OFFBIG - - _SC_XOPEN_LEGACY, -#define _SC_XOPEN_LEGACY _SC_XOPEN_LEGACY - _SC_XOPEN_REALTIME, -#define _SC_XOPEN_REALTIME _SC_XOPEN_REALTIME - _SC_XOPEN_REALTIME_THREADS, -#define _SC_XOPEN_REALTIME_THREADS _SC_XOPEN_REALTIME_THREADS - - _SC_ADVISORY_INFO, -#define _SC_ADVISORY_INFO _SC_ADVISORY_INFO - _SC_BARRIERS, -#define _SC_BARRIERS _SC_BARRIERS - _SC_BASE, -#define _SC_BASE _SC_BASE - _SC_C_LANG_SUPPORT, -#define _SC_C_LANG_SUPPORT _SC_C_LANG_SUPPORT - _SC_C_LANG_SUPPORT_R, -#define _SC_C_LANG_SUPPORT_R _SC_C_LANG_SUPPORT_R - _SC_CLOCK_SELECTION, -#define _SC_CLOCK_SELECTION _SC_CLOCK_SELECTION - _SC_CPUTIME, -#define _SC_CPUTIME _SC_CPUTIME - _SC_THREAD_CPUTIME, -#define _SC_THREAD_CPUTIME _SC_THREAD_CPUTIME - _SC_DEVICE_IO, -#define _SC_DEVICE_IO _SC_DEVICE_IO - _SC_DEVICE_SPECIFIC, -#define _SC_DEVICE_SPECIFIC _SC_DEVICE_SPECIFIC - _SC_DEVICE_SPECIFIC_R, -#define _SC_DEVICE_SPECIFIC_R _SC_DEVICE_SPECIFIC_R - _SC_FD_MGMT, -#define _SC_FD_MGMT _SC_FD_MGMT - _SC_FIFO, -#define _SC_FIFO _SC_FIFO - _SC_PIPE, -#define _SC_PIPE _SC_PIPE - _SC_FILE_ATTRIBUTES, -#define _SC_FILE_ATTRIBUTES _SC_FILE_ATTRIBUTES - _SC_FILE_LOCKING, -#define _SC_FILE_LOCKING _SC_FILE_LOCKING - _SC_FILE_SYSTEM, -#define _SC_FILE_SYSTEM _SC_FILE_SYSTEM - _SC_MONOTONIC_CLOCK, -#define _SC_MONOTONIC_CLOCK _SC_MONOTONIC_CLOCK - _SC_MULTI_PROCESS, -#define _SC_MULTI_PROCESS _SC_MULTI_PROCESS - _SC_SINGLE_PROCESS, -#define _SC_SINGLE_PROCESS _SC_SINGLE_PROCESS - _SC_NETWORKING, -#define _SC_NETWORKING _SC_NETWORKING - _SC_READER_WRITER_LOCKS, -#define _SC_READER_WRITER_LOCKS _SC_READER_WRITER_LOCKS - _SC_SPIN_LOCKS, -#define _SC_SPIN_LOCKS _SC_SPIN_LOCKS - _SC_REGEXP, -#define _SC_REGEXP _SC_REGEXP - _SC_REGEX_VERSION, -#define _SC_REGEX_VERSION _SC_REGEX_VERSION - _SC_SHELL, -#define _SC_SHELL _SC_SHELL - _SC_SIGNALS, -#define _SC_SIGNALS _SC_SIGNALS - _SC_SPAWN, -#define _SC_SPAWN _SC_SPAWN - _SC_SPORADIC_SERVER, -#define _SC_SPORADIC_SERVER _SC_SPORADIC_SERVER - _SC_THREAD_SPORADIC_SERVER, -#define _SC_THREAD_SPORADIC_SERVER _SC_THREAD_SPORADIC_SERVER - _SC_SYSTEM_DATABASE, -#define _SC_SYSTEM_DATABASE _SC_SYSTEM_DATABASE - _SC_SYSTEM_DATABASE_R, -#define _SC_SYSTEM_DATABASE_R _SC_SYSTEM_DATABASE_R - _SC_TIMEOUTS, -#define _SC_TIMEOUTS _SC_TIMEOUTS - _SC_TYPED_MEMORY_OBJECTS, -#define _SC_TYPED_MEMORY_OBJECTS _SC_TYPED_MEMORY_OBJECTS - _SC_USER_GROUPS, -#define _SC_USER_GROUPS _SC_USER_GROUPS - _SC_USER_GROUPS_R, -#define _SC_USER_GROUPS_R _SC_USER_GROUPS_R - _SC_2_PBS, -#define _SC_2_PBS _SC_2_PBS - _SC_2_PBS_ACCOUNTING, -#define _SC_2_PBS_ACCOUNTING _SC_2_PBS_ACCOUNTING - _SC_2_PBS_LOCATE, -#define _SC_2_PBS_LOCATE _SC_2_PBS_LOCATE - _SC_2_PBS_MESSAGE, -#define _SC_2_PBS_MESSAGE _SC_2_PBS_MESSAGE - _SC_2_PBS_TRACK, -#define _SC_2_PBS_TRACK _SC_2_PBS_TRACK - _SC_SYMLOOP_MAX, -#define _SC_SYMLOOP_MAX _SC_SYMLOOP_MAX - _SC_STREAMS, -#define _SC_STREAMS _SC_STREAMS - _SC_2_PBS_CHECKPOINT, -#define _SC_2_PBS_CHECKPOINT _SC_2_PBS_CHECKPOINT - - _SC_V6_ILP32_OFF32, -#define _SC_V6_ILP32_OFF32 _SC_V6_ILP32_OFF32 - _SC_V6_ILP32_OFFBIG, -#define _SC_V6_ILP32_OFFBIG _SC_V6_ILP32_OFFBIG - _SC_V6_LP64_OFF64, -#define _SC_V6_LP64_OFF64 _SC_V6_LP64_OFF64 - _SC_V6_LPBIG_OFFBIG, -#define _SC_V6_LPBIG_OFFBIG _SC_V6_LPBIG_OFFBIG - - _SC_HOST_NAME_MAX, -#define _SC_HOST_NAME_MAX _SC_HOST_NAME_MAX - _SC_TRACE, -#define _SC_TRACE _SC_TRACE - _SC_TRACE_EVENT_FILTER, -#define _SC_TRACE_EVENT_FILTER _SC_TRACE_EVENT_FILTER - _SC_TRACE_INHERIT, -#define _SC_TRACE_INHERIT _SC_TRACE_INHERIT - _SC_TRACE_LOG -#define _SC_TRACE_LOG _SC_TRACE_LOG - }; - -#if (defined __USE_POSIX2 || defined __USE_UNIX98 \ - || defined __USE_FILE_OFFSET64 || defined __USE_LARGEFILE64 \ - || defined __USE_LARGEFILE) -/* Values for the NAME argument to `confstr'. */ -enum - { - _CS_PATH, /* The default search path. */ -#define _CS_PATH _CS_PATH - -# if (defined __USE_FILE_OFFSET64 || defined __USE_LARGEFILE64 \ - || defined __USE_LARGEFILE) - _CS_LFS_CFLAGS = 1000, -# define _CS_LFS_CFLAGS _CS_LFS_CFLAGS - _CS_LFS_LDFLAGS, -# define _CS_LFS_LDFLAGS _CS_LFS_LDFLAGS - _CS_LFS_LIBS, -# define _CS_LFS_LIBS _CS_LFS_LIBS - _CS_LFS_LINTFLAGS, -# define _CS_LFS_LINTFLAGS _CS_LFS_LINTFLAGS - _CS_LFS64_CFLAGS, -# define _CS_LFS64_CFLAGS _CS_LFS64_CFLAGS - _CS_LFS64_LDFLAGS, -# define _CS_LFS64_LDFLAGS _CS_LFS64_LDFLAGS - _CS_LFS64_LIBS, -# define _CS_LFS64_LIBS _CS_LFS64_LIBS - _CS_LFS64_LINTFLAGS, -# define _CS_LFS64_LINTFLAGS _CS_LFS64_LINTFLAGS -# endif - -# ifdef __USE_UNIX98 - _CS_XBS5_ILP32_OFF32_CFLAGS = 1100, -# define _CS_XBS5_ILP32_OFF32_CFLAGS _CS_XBS5_ILP32_OFF32_CFLAGS - _CS_XBS5_ILP32_OFF32_LDFLAGS, -# define _CS_XBS5_ILP32_OFF32_LDFLAGS _CS_XBS5_ILP32_OFF32_LDFLAGS - _CS_XBS5_ILP32_OFF32_LIBS, -# define _CS_XBS5_ILP32_OFF32_LIBS _CS_XBS5_ILP32_OFF32_LIBS - _CS_XBS5_ILP32_OFF32_LINTFLAGS, -# define _CS_XBS5_ILP32_OFF32_LINTFLAGS _CS_XBS5_ILP32_OFF32_LINTFLAGS - _CS_XBS5_ILP32_OFFBIG_CFLAGS, -# define _CS_XBS5_ILP32_OFFBIG_CFLAGS _CS_XBS5_ILP32_OFFBIG_CFLAGS - _CS_XBS5_ILP32_OFFBIG_LDFLAGS, -# define _CS_XBS5_ILP32_OFFBIG_LDFLAGS _CS_XBS5_ILP32_OFFBIG_LDFLAGS - _CS_XBS5_ILP32_OFFBIG_LIBS, -# define _CS_XBS5_ILP32_OFFBIG_LIBS _CS_XBS5_ILP32_OFFBIG_LIBS - _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, -# define _CS_XBS5_ILP32_OFFBIG_LINTFLAGS _CS_XBS5_ILP32_OFFBIG_LINTFLAGS - _CS_XBS5_LP64_OFF64_CFLAGS, -# define _CS_XBS5_LP64_OFF64_CFLAGS _CS_XBS5_LP64_OFF64_CFLAGS - _CS_XBS5_LP64_OFF64_LDFLAGS, -# define _CS_XBS5_LP64_OFF64_LDFLAGS _CS_XBS5_LP64_OFF64_LDFLAGS - _CS_XBS5_LP64_OFF64_LIBS, -# define _CS_XBS5_LP64_OFF64_LIBS _CS_XBS5_LP64_OFF64_LIBS - _CS_XBS5_LP64_OFF64_LINTFLAGS, -# define _CS_XBS5_LP64_OFF64_LINTFLAGS _CS_XBS5_LP64_OFF64_LINTFLAGS - _CS_XBS5_LPBIG_OFFBIG_CFLAGS, -# define _CS_XBS5_LPBIG_OFFBIG_CFLAGS _CS_XBS5_LPBIG_OFFBIG_CFLAGS - _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, -# define _CS_XBS5_LPBIG_OFFBIG_LDFLAGS _CS_XBS5_LPBIG_OFFBIG_LDFLAGS - _CS_XBS5_LPBIG_OFFBIG_LIBS, -# define _CS_XBS5_LPBIG_OFFBIG_LIBS _CS_XBS5_LPBIG_OFFBIG_LIBS - _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, -# define _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS -# endif -# ifdef __USE_XOPEN2K - _CS_POSIX_V6_ILP32_OFF32_CFLAGS, -# define _CS_POSIX_V6_ILP32_OFF32_CFLAGS _CS_POSIX_V6_ILP32_OFF32_CFLAGS - _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, -# define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS _CS_POSIX_V6_ILP32_OFF32_LDFLAGS - _CS_POSIX_V6_ILP32_OFF32_LIBS, -# define _CS_POSIX_V6_ILP32_OFF32_LIBS _CS_POSIX_V6_ILP32_OFF32_LIBS - _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, -# define _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS - _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, -# define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS - _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, -# define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS - _CS_POSIX_V6_ILP32_OFFBIG_LIBS, -# define _CS_POSIX_V6_ILP32_OFFBIG_LIBS _CS_POSIX_V6_ILP32_OFFBIG_LIBS - _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, -# define _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS - _CS_POSIX_V6_LP64_OFF64_CFLAGS, -# define _CS_POSIX_V6_LP64_OFF64_CFLAGS _CS_POSIX_V6_LP64_OFF64_CFLAGS - _CS_POSIX_V6_LP64_OFF64_LDFLAGS, -# define _CS_POSIX_V6_LP64_OFF64_LDFLAGS _CS_POSIX_V6_LP64_OFF64_LDFLAGS - _CS_POSIX_V6_LP64_OFF64_LIBS, -# define _CS_POSIX_V6_LP64_OFF64_LIBS _CS_POSIX_V6_LP64_OFF64_LIBS - _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, -# define _CS_POSIX_V6_LP64_OFF64_LINTFLAGS _CS_POSIX_V6_LP64_OFF64_LINTFLAGS - _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, -# define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS - _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, -# define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS - _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, -# define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS _CS_POSIX_V6_LPBIG_OFFBIG_LIBS - _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS, -# define _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS -# endif - - _CS_V6_WIDTH_RESTRICTED_ENVS -# define _CS_V6_WIDTH_RESTRICTED_ENVS _CS_V6_WIDTH_RESTRICTED_ENVS - }; -#endif diff --git a/libc/sysdeps/linux/v850/bits/dirent.h b/libc/sysdeps/linux/v850/bits/dirent.h deleted file mode 100644 index 82d8663f2..000000000 --- a/libc/sysdeps/linux/v850/bits/dirent.h +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright (C) 1996, 1997 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 _DIRENT_H -# error "Never use <bits/dirent.h> directly; include <dirent.h> instead." -#endif - -struct dirent - { -#ifndef __USE_FILE_OFFSET64 - __ino_t d_ino; - __off_t d_off; -#else - __ino64_t d_ino; - __off64_t d_off; -#endif - unsigned short int d_reclen; -#ifdef __USE_FILE_OFFSET64 - unsigned char d_type; -#endif - char d_name[256]; /* We must not include limits.h! */ - }; - -#ifdef __USE_LARGEFILE64 -struct dirent64 - { - __ino64_t d_ino; - __off64_t d_off; - unsigned short int d_reclen; - unsigned char d_type; - char d_name[256]; /* We must not include limits.h! */ - }; -#endif - -#define d_fileno d_ino /* Backwards compatibility. */ - -#undef _DIRENT_HAVE_D_NAMLEN -#define _DIRENT_HAVE_D_RECLEN -#define _DIRENT_HAVE_D_OFF -#undef _DIRENT_HAVE_D_TYPE diff --git a/libc/sysdeps/linux/v850/bits/dlfcn.h b/libc/sysdeps/linux/v850/bits/dlfcn.h deleted file mode 100644 index 2525fa3d9..000000000 --- a/libc/sysdeps/linux/v850/bits/dlfcn.h +++ /dev/null @@ -1,59 +0,0 @@ -/* System dependent definitions for run-time dynamic loading. - 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. */ - -#ifndef _DLFCN_H -# error "Never use <bits/dlfcn.h> directly; include <dlfcn.h> instead." -#endif - -/* The MODE argument to `dlopen' contains one of the following: */ -#define RTLD_LAZY 0x00001 /* Lazy function call binding. */ -#define RTLD_NOW 0x00002 /* Immediate function call binding. */ -#define RTLD_BINDING_MASK 0x3 /* Mask of binding time value. */ -#define RTLD_NOLOAD 0x00004 /* Do not load the object. */ - -/* If the following bit is set in the MODE argument to `dlopen', - the symbols of the loaded object and its dependencies are made - visible as if the object were linked directly into the program. */ -#define RTLD_GLOBAL 0x00100 - -/* Unix98 demands the following flag which is the inverse to RTLD_GLOBAL. - The implementation does this by default and so we can define the - value to zero. */ -#define RTLD_LOCAL 0 - -/* Do not delete object when closed. */ -#define RTLD_NODELETE 0x01000 - -#ifdef __USE_GNU -/* To support profiling of shared objects it is a good idea to call - the function found using `dlsym' using the following macro since - these calls do not use the PLT. But this would mean the dynamic - loader has no chance to find out when the function is called. The - macro applies the necessary magic so that profiling is possible. - Rewrite - foo = (*fctp) (arg1, arg2); - into - foo = DL_CALL_FCT (fctp, (arg1, arg2)); -*/ -# define DL_CALL_FCT(fctp, args) \ - (_dl_mcount_wrapper_check (fctp), (*(fctp)) args) - -/* This function calls the profiling functions. */ -extern void _dl_mcount_wrapper_check (void *__selfpc) __THROW; -#endif diff --git a/libc/sysdeps/linux/v850/bits/elfclass.h b/libc/sysdeps/linux/v850/bits/elfclass.h deleted file mode 100644 index 180227d9e..000000000 --- a/libc/sysdeps/linux/v850/bits/elfclass.h +++ /dev/null @@ -1,14 +0,0 @@ -/* This file specifies the native word size of the machine, which indicates - the ELF file class used for executables and shared objects on this - machine. */ - -#ifndef _LINK_H -# error "Never use <bits/elfclass.h> directly; include <link.h> instead." -#endif - -#include <bits/wordsize.h> - -#define __ELF_NATIVE_CLASS __WORDSIZE - -/* The entries in the .hash table always have a size of 32 bits. */ -typedef uint32_t Elf_Symndx; diff --git a/libc/sysdeps/linux/v850/bits/endian.h b/libc/sysdeps/linux/v850/bits/endian.h deleted file mode 100644 index 8fdd95520..000000000 --- a/libc/sysdeps/linux/v850/bits/endian.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - * libc/sysdeps/linux/v850/bits/endian.h -- Define processor endianess - * - * Copyright (C) 2001 NEC Corporation - * Copyright (C) 2001 Miles Bader <miles@gnu.org> - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License. See the file COPYING.LIB in the main - * directory of this archive for more details. - * - * Written by Miles Bader <miles@gnu.org> - */ - -#ifndef _ENDIAN_H -# error "Never use <bits/endian.h> directly; include <endian.h> instead." -#endif - -#define __BYTE_ORDER __LITTLE_ENDIAN diff --git a/libc/sysdeps/linux/v850/bits/environments.h b/libc/sysdeps/linux/v850/bits/environments.h deleted file mode 100644 index c3829927b..000000000 --- a/libc/sysdeps/linux/v850/bits/environments.h +++ /dev/null @@ -1,75 +0,0 @@ -/* Copyright (C) 1999, 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. */ - -#ifndef _UNISTD_H -# error "Never include this file directly. Use <unistd.h> instead" -#endif - -#include <bits/wordsize.h> - -/* This header should define the following symbols under the described - situations. A value `1' means that the model is always supported, - `-1' means it is never supported. Undefined means it cannot be - statically decided. - - _POSIX_V6_ILP32_OFF32 32bit int, long, pointers, and off_t type - _POSIX_V6_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type - - _POSIX_V6_LP64_OFF32 64bit long and pointers and 32bit off_t type - _POSIX_V6_LPBIG_OFFBIG 64bit long and pointers and large off_t type - - The macros _XBS5_ILP32_OFF32, _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and - _XBS5_LPBIG_OFFBIG were used in previous versions of the Unix standard - and are available only for compatibility. -*/ - -#if __WORDSIZE == 64 - -/* We can never provide environments with 32-bit wide pointers. */ -# define _POSIX_V6_ILP32_OFF32 -1 -# define _POSIX_V6_ILP32_OFFBIG -1 -# define _XBS5_ILP32_OFF32 -1 -# define _XBS5_ILP32_OFFBIG -1 -/* We also have no use (for now) for an environment with bigger pointers - and offsets. */ -# define _POSIX_V6_LPBIG_OFFBIG -1 -# define _XBS5_LPBIG_OFFBIG -1 - -/* By default we have 64-bit wide `long int', pointers and `off_t'. */ -# define _POSIX_V6_LP64_OFF64 1 -# define _XBS5_LP64_OFF64 1 - -#else /* __WORDSIZE == 32 */ - -/* By default we have 32-bit wide `int', `long int', pointers and `off_t' - and all platforms support LFS. */ -# define _POSIX_V6_ILP32_OFF32 1 -# define _POSIX_V6_ILP32_OFFBIG 1 -# define _XBS5_ILP32_OFF32 1 -# define _XBS5_ILP32_OFFBIG 1 - -/* We optionally provide an environment with the above size but an 64-bit - side `off_t'. Therefore we don't define _XBS5_ILP32_OFFBIG. */ - -/* We can never provide environments with 64-bit wide pointers. */ -# define _POSIX_V6_LP64_OFF64 -1 -# define _POSIX_V6_LPBIG_OFFBIG -1 -# define _XBS5_LP64_OFF64 -1 -# define _XBS5_LPBIG_OFFBIG -1 - -#endif /* __WORDSIZE == 32 */ diff --git a/libc/sysdeps/linux/v850/bits/errno.h b/libc/sysdeps/linux/v850/bits/errno.h deleted file mode 100644 index c5130ffb9..000000000 --- a/libc/sysdeps/linux/v850/bits/errno.h +++ /dev/null @@ -1,64 +0,0 @@ -/* Error constants. Linux specific version. - Copyright (C) 1996, 1997, 1998, 1999, 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. */ - -#ifdef _ERRNO_H - -# undef EDOM -# undef EILSEQ -# undef ERANGE -# include <linux/errno.h> - -/* Linux has no ENOTSUP error code. */ -# define ENOTSUP EOPNOTSUPP - -/* Linux also has no ECANCELED error code. Since it is not used here - we define it to an invalid value. */ -# define ECANCELED 125 - -# ifndef __ASSEMBLER__ - -__BEGIN_DECLS - -/* We now need a declaration of the `errno' variable. */ -extern int errno; - -/* Function to get address of global `errno' variable. */ -extern int *__errno_location (void) __THROW __attribute__ ((__const__)); - -# if defined _LIBC -/* We wouldn't need a special macro anymore but it is history. */ -# define __set_errno(val) (*__errno_location ()) = (val) -# endif /* _LIBC */ - -# if !defined _LIBC || defined _LIBC_REENTRANT -/* When using threads, errno is a per-thread value. */ -# define errno (*__errno_location ()) -# endif - -# endif /* !__ASSEMBLER__ */ -#endif /* _ERRNO_H */ - -#if !defined _ERRNO_H && defined __need_Emath -/* This is ugly but the kernel header is not clean enough. We must - define only the values EDOM, EILSEQ and ERANGE in case __need_Emath is - defined. */ -# define EDOM 33 /* Math argument out of domain of function. */ -# define EILSEQ 84 /* Illegal byte sequence. */ -# define ERANGE 34 /* Math result not representable. */ -#endif /* !_ERRNO_H && __need_Emath */ diff --git a/libc/sysdeps/linux/v850/bits/fcntl.h b/libc/sysdeps/linux/v850/bits/fcntl.h deleted file mode 100644 index 7de111adb..000000000 --- a/libc/sysdeps/linux/v850/bits/fcntl.h +++ /dev/null @@ -1,179 +0,0 @@ -/* O_*, F_*, FD_* bit values for Linux. - Copyright (C) 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 _FCNTL_H -# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead." -#endif - - -#include <sys/types.h> - -/* open/fcntl - O_SYNC is only implemented on blocks devices and on files - located on an ext2 file system */ -#define O_ACCMODE 0003 -#define O_RDONLY 00 -#define O_WRONLY 01 -#define O_RDWR 02 -#define O_CREAT 0100 /* not fcntl */ -#define O_EXCL 0200 /* not fcntl */ -#define O_NOCTTY 0400 /* not fcntl */ -#define O_TRUNC 01000 /* not fcntl */ -#define O_APPEND 02000 -#define O_NONBLOCK 04000 -#define O_NDELAY O_NONBLOCK -#define O_SYNC 010000 -#define O_FSYNC O_SYNC -#define O_ASYNC 020000 - -#ifdef __USE_GNU -# define O_DIRECTORY 040000 /* Must be a directory. */ -# define O_NOFOLLOW 0100000 /* Do not follow links. */ -# define O_DIRECT 0200000 /* Direct disk access. */ -#endif - -/* For now Linux has synchronisity options for data and read operations. - We define the symbols here but let them do the same as O_SYNC since - this is a superset. */ -#if defined __USE_POSIX199309 || defined __USE_UNIX98 -# define O_DSYNC O_SYNC /* Synchronize data. */ -# define O_RSYNC O_SYNC /* Synchronize read operations. */ -#endif - -#ifdef __USE_LARGEFILE64 -# define O_LARGEFILE 0400000 -#endif - -/* Values for the second argument to `fcntl'. */ -#define F_DUPFD 0 /* Duplicate file descriptor. */ -#define F_GETFD 1 /* Get file descriptor flags. */ -#define F_SETFD 2 /* Set file descriptor flags. */ -#define F_GETFL 3 /* Get file status flags. */ -#define F_SETFL 4 /* Set file status flags. */ -#ifndef __USE_FILE_OFFSET64 -# define F_GETLK 5 /* Get record locking info. */ -# define F_SETLK 6 /* Set record locking info (non-blocking). */ -# define F_SETLKW 7 /* Set record locking info (blocking). */ -#else -# define F_GETLK F_GETLK64 /* Get record locking info. */ -# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/ -# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */ -#endif -#define F_GETLK64 12 /* Get record locking info. */ -#define F_SETLK64 13 /* Set record locking info (non-blocking). */ -#define F_SETLKW64 14 /* Set record locking info (blocking). */ - -#if defined __USE_BSD || defined __USE_XOPEN2K -# define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */ -# define F_GETOWN 9 /* Set owner of socket (receiver of SIGIO). */ -#endif - -#ifdef __USE_GNU -# define F_SETSIG 10 /* Set number of signal to be sent. */ -# define F_GETSIG 11 /* Get number of signal to be sent. */ -#endif - -#ifdef __USE_GNU -# define F_SETLEASE 1024 /* Set a lease. */ -# define F_GETLEASE 1025 /* Enquire what lease is active. */ -# define F_NOTIFY 1026 /* Request notfications on a directory. */ -#endif - -/* For F_[GET|SET]FL. */ -#define FD_CLOEXEC 1 /* actually anything with low bit set goes */ - -/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */ -#define F_RDLCK 0 /* Read lock. */ -#define F_WRLCK 1 /* Write lock. */ -#define F_UNLCK 2 /* Remove lock. */ - -/* For old implementation of bsd flock(). */ -#define F_EXLCK 4 /* or 3 */ -#define F_SHLCK 8 /* or 4 */ - -#ifdef __USE_BSD -/* Operations for bsd flock(), also used by the kernel implementation. */ -# define LOCK_SH 1 /* shared lock */ -# define LOCK_EX 2 /* exclusive lock */ -# define LOCK_NB 4 /* or'd with one of the above to prevent - blocking */ -# define LOCK_UN 8 /* remove lock */ -#endif - -#ifdef __USE_GNU -# define LOCK_MAND 32 /* This is a mandatory flock: */ -# define LOCK_READ 64 /* ... which allows concurrent read operations. */ -# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */ -# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */ -#endif - -#ifdef __USE_GNU -/* Types of directory notifications that may be requested with F_NOTIFY. */ -# define DN_ACCESS 0x00000001 /* File accessed. */ -# define DN_MODIFY 0x00000002 /* File modified. */ -# define DN_CREATE 0x00000004 /* File created. */ -# define DN_DELETE 0x00000008 /* File removed. */ -# define DN_RENAME 0x00000010 /* File renamed. */ -# define DN_ATTRIB 0x00000020 /* File changed attibutes. */ -# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */ -#endif - -struct flock - { - short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ - short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ -#ifndef __USE_FILE_OFFSET64 - __off_t l_start; /* Offset where the lock begins. */ - __off_t l_len; /* Size of the locked area; zero means until EOF. */ -#else - __off64_t l_start; /* Offset where the lock begins. */ - __off64_t l_len; /* Size of the locked area; zero means until EOF. */ -#endif - __pid_t l_pid; /* Process holding the lock. */ - }; - -#ifdef __USE_LARGEFILE64 -struct flock64 - { - short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ - short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ - __off64_t l_start; /* Offset where the lock begins. */ - __off64_t l_len; /* Size of the locked area; zero means until EOF. */ - __pid_t l_pid; /* Process holding the lock. */ - }; -#endif - -/* Define some more compatibility macros to be backward compatible with - BSD systems which did not managed to hide these kernel macros. */ -#ifdef __USE_BSD -# define FAPPEND O_APPEND -# define FFSYNC O_FSYNC -# define FASYNC O_ASYNC -# define FNONBLOCK O_NONBLOCK -# define FNDELAY O_NDELAY -#endif /* Use BSD. */ - -/* Advise to `posix_fadvise'. */ -#ifdef __USE_XOPEN2K -# define POSIX_FADV_NORMAL 0 /* No further special treatment. */ -# define POSIX_FADV_RANDOM 1 /* Expect random page references. */ -# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */ -# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */ -# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */ -# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ -#endif diff --git a/libc/sysdeps/linux/v850/bits/huge_val.h b/libc/sysdeps/linux/v850/bits/huge_val.h deleted file mode 100644 index 8ec457c63..000000000 --- a/libc/sysdeps/linux/v850/bits/huge_val.h +++ /dev/null @@ -1,104 +0,0 @@ -/* `HUGE_VAL' constants for IEEE 754 machines (where it is infinity). - Used by <stdlib.h> and <math.h> functions for overflow. - v850e version. - Copyright (C) 1992, 95, 96, 97, 98, 99, 2000, 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. */ - -#ifndef _MATH_H -# error "Never use <bits/huge_val.h> directly; include <math.h> instead." -#endif - -#include <features.h> - -/* IEEE positive infinity (-HUGE_VAL is negative infinity). */ - -#ifdef __GNUC__ - -# if __GNUC_PREREQ(2,96) - -# define HUGE_VAL (__extension__ 0x1.0p2047) - -# else - -# define HUGE_VAL \ - (__extension__ \ - ((union { unsigned __l __attribute__((__mode__(__DI__))); double __d; }) \ - { __l: 0x000000007ff00000ULL }).__d) - -# endif - -#else /* not GCC */ - -# include <endian.h> - -typedef union { unsigned char __c[8]; double __d; } __huge_val_t; - -# if __BYTE_ORDER == __BIG_ENDIAN -# define __HUGE_VAL_bytes { 0, 0, 0, 0, 0x7f, 0xf0, 0, 0 } -# endif -# if __BYTE_ORDER == __LITTLE_ENDIAN -# define __HUGE_VAL_bytes { 0, 0, 0xf0, 0x7f, 0, 0, 0, 0 } -# endif - -static __huge_val_t __huge_val = { __HUGE_VAL_bytes }; -# define HUGE_VAL (__huge_val.__d) - -#endif /* GCC. */ - - -/* ISO C 99 extensions: (float) HUGE_VALF and (long double) HUGE_VALL. */ - -#ifdef __USE_ISOC99 - -# if __GNUC_PREREQ(2,96) - -# define HUGE_VALF (__extension__ 0x1.0p255f) -# define HUGE_VALL (__extension__ 0x1.0p32767L) - -# else - -# ifdef __GNUC__ - -# define HUGE_VALF \ - (__extension__ \ - ((union { unsigned __l __attribute__((__mode__(__SI__))); float __d; }) \ - { __l: 0x7f800000UL }).__d) - -# else /* not GCC */ - -typedef union { unsigned char __c[4]; float __f; } __huge_valf_t; - -# if __BYTE_ORDER == __BIG_ENDIAN -# define __HUGE_VALF_bytes { 0x7f, 0x80, 0, 0 } -# endif -# if __BYTE_ORDER == __LITTLE_ENDIAN -# define __HUGE_VALF_bytes { 0, 0, 0x80, 0x7f } -# endif - -static __huge_valf_t __huge_valf = { __HUGE_VALF_bytes }; -# define HUGE_VALF (__huge_valf.__f) - -# endif /* GCC. */ - -/* Generally there is no separate `long double' format and it is the - same as `double'. */ -# define HUGE_VALL HUGE_VAL - -# endif /* GCC 2.95. */ - -#endif /* __USE_ISOC99. */ diff --git a/libc/sysdeps/linux/v850/bits/in.h b/libc/sysdeps/linux/v850/bits/in.h deleted file mode 100644 index e6cf57574..000000000 --- a/libc/sysdeps/linux/v850/bits/in.h +++ /dev/null @@ -1,141 +0,0 @@ -/* Copyright (C) 1991-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. */ - -/* Linux version. */ - -#ifndef _NETINET_IN_H -# error "Never use <bits/in.h> directly; include <netinet/in.h> instead." -#endif - -/* Options for use with `getsockopt' and `setsockopt' at the IP level. - The first word in the comment at the right is the data type used; - "bool" means a boolean value stored in an `int'. */ -#define IP_TOS 1 /* int; IP type of service and precedence. */ -#define IP_TTL 2 /* int; IP time to live. */ -#define IP_HDRINCL 3 /* int; Header is included with data. */ -#define IP_OPTIONS 4 /* ip_opts; IP per-packet options. */ -#define IP_ROUTER_ALERT 5 /* bool */ -#define IP_RECVOPTS 6 /* bool */ -#define IP_RETOPTS 7 /* bool */ -#define IP_PKTINFO 8 /* bool */ -#define IP_PKTOPTIONS 9 -#define IP_PMTUDISC 10 /* obsolete name? */ -#define IP_MTU_DISCOVER 10 /* int; see below */ -#define IP_RECVERR 11 /* bool */ -#define IP_RECVTTL 12 /* bool */ -#define IP_RECVTOS 13 /* bool */ -#define IP_MULTICAST_IF 32 /* in_addr; set/get IP multicast i/f */ -#define IP_MULTICAST_TTL 33 /* u_char; set/get IP multicast ttl */ -#define IP_MULTICAST_LOOP 34 /* i_char; set/get IP multicast loopback */ -#define IP_ADD_MEMBERSHIP 35 /* ip_mreq; add an IP group membership */ -#define IP_DROP_MEMBERSHIP 36 /* ip_mreq; drop an IP group membership */ - -/* For BSD compatibility. */ -#define IP_RECVRETOPTS IP_RETOPTS - -/* IP_MTU_DISCOVER arguments. */ -#define IP_PMTUDISC_DONT 0 /* Never send DF frames. */ -#define IP_PMTUDISC_WANT 1 /* Use per route hints. */ -#define IP_PMTUDISC_DO 2 /* Always DF. */ - -/* To select the IP level. */ -#define SOL_IP 0 - -#define IP_DEFAULT_MULTICAST_TTL 1 -#define IP_DEFAULT_MULTICAST_LOOP 1 -#define IP_MAX_MEMBERSHIPS 20 - -/* Structure used to describe IP options for IP_OPTIONS. The `ip_dst' - field is used for the first-hop gateway when using a source route - (this gets put into the header proper). */ -struct ip_opts - { - struct in_addr ip_dst; /* First hop; zero without source route. */ - char ip_opts[40]; /* Actually variable in size. */ - }; - -/* Structure used for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP. */ -struct ip_mreq - { - struct in_addr imr_multiaddr; /* IP multicast address of group */ - struct in_addr imr_interface; /* local IP address of interface */ - }; - -/* As above but including interface specification by index. */ -struct ip_mreqn - { - struct in_addr imr_multiaddr; /* IP multicast address of group */ - struct in_addr imr_address; /* local IP address of interface */ - int imr_ifindex; /* Interface index */ - }; - -/* Structure used for IP_PKTINFO. */ -struct in_pktinfo - { - int ipi_ifindex; /* Interface index */ - struct in_addr ipi_spec_dst; /* Routing destination address */ - struct in_addr ipi_addr; /* Header destination address */ - }; - -/* Options for use with `getsockopt' and `setsockopt' at the IPv6 level. - The first word in the comment at the right is the data type used; - "bool" means a boolean value stored in an `int'. */ -#define IPV6_ADDRFORM 1 -#define IPV6_PKTINFO 2 -#define IPV6_HOPOPTS 3 -#define IPV6_DSTOPTS 4 -#define IPV6_RTHDR 5 -#define IPV6_PKTOPTIONS 6 -#define IPV6_CHECKSUM 7 -#define IPV6_HOPLIMIT 8 -#define IPV6_NEXTHOP 9 -#define IPV6_AUTHHDR 10 -#define IPV6_UNICAST_HOPS 16 -#define IPV6_MULTICAST_IF 17 -#define IPV6_MULTICAST_HOPS 18 -#define IPV6_MULTICAST_LOOP 19 -#define IPV6_JOIN_GROUP 20 -#define IPV6_LEAVE_GROUP 21 -#define IPV6_ROUTER_ALERT 22 -#define IPV6_MTU_DISCOVER 23 -#define IPV6_MTU 24 -#define IPV6_RECVERR 25 - -#define SCM_SRCRT IPV6_RXSRCRT - -/* Obsolete synonyms for the above. */ -#define IPV6_RXHOPOPTS IPV6_HOPOPTS -#define IPV6_RXDSTOPTS IPV6_DSTOPTS -#define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP -#define IPV6_DROP_MEMBERSHIP IPV6_LEAVE_GROUP - - -/* IPV6_MTU_DISCOVER values. */ -#define IPV6_PMTUDISC_DONT 0 /* Never send DF frames. */ -#define IPV6_PMTUDISC_WANT 1 /* Use per route hints. */ -#define IPV6_PMTUDISC_DO 2 /* Always DF. */ - -/* Socket level values for IPv6. */ -#define SOL_IPV6 41 -#define SOL_ICMPV6 58 - -/* Routing header options for IPv6. */ -#define IPV6_RTHDR_LOOSE 0 /* Hop doesn't need to be neighbour. */ -#define IPV6_RTHDR_STRICT 1 /* Hop must be a neighbour. */ - -#define IPV6_RTHDR_TYPE_0 0 /* IPv6 Routing header type 0. */ diff --git a/libc/sysdeps/linux/v850/bits/ioctl-types.h b/libc/sysdeps/linux/v850/bits/ioctl-types.h deleted file mode 100644 index e856a04b4..000000000 --- a/libc/sysdeps/linux/v850/bits/ioctl-types.h +++ /dev/null @@ -1,78 +0,0 @@ -/* Structure types for pre-termios terminal ioctls. Linux version. - Copyright (C) 1996, 1997, 1999, 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. */ - -#ifndef _SYS_IOCTL_H -# error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead." -#endif - -/* Get definition of constants for use with `ioctl'. */ -#include <asm/ioctls.h> - - -struct winsize - { - unsigned short int ws_row; - unsigned short int ws_col; - unsigned short int ws_xpixel; - unsigned short int ws_ypixel; - }; - -#define NCC 8 -struct termio - { - unsigned short int c_iflag; /* input mode flags */ - unsigned short int c_oflag; /* output mode flags */ - unsigned short int c_cflag; /* control mode flags */ - unsigned short int c_lflag; /* local mode flags */ - unsigned char c_line; /* line discipline */ - unsigned char c_cc[NCC]; /* control characters */ -}; - -/* modem lines */ -#define TIOCM_LE 0x001 -#define TIOCM_DTR 0x002 -#define TIOCM_RTS 0x004 -#define TIOCM_ST 0x008 -#define TIOCM_SR 0x010 -#define TIOCM_CTS 0x020 -#define TIOCM_CAR 0x040 -#define TIOCM_RNG 0x080 -#define TIOCM_DSR 0x100 -#define TIOCM_CD TIOCM_CAR -#define TIOCM_RI TIOCM_RNG - -/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ - -/* line disciplines */ -#define N_TTY 0 -#define N_SLIP 1 -#define N_MOUSE 2 -#define N_PPP 3 -#define N_STRIP 4 -#define N_AX25 5 -#define N_X25 6 /* X.25 async */ -#define N_6PACK 7 -#define N_MASC 8 /* Mobitex module */ -#define N_R3964 9 /* Simatic R3964 module */ -#define N_PROFIBUS_FDL 10 /* Profibus */ -#define N_IRDA 11 /* Linux IR */ -#define N_SMSBLOCK 12 /* SMS block mode */ -#define N_HDLC 13 /* synchronous HDLC */ -#define N_SYNC_PPP 14 /* synchronous PPP */ -#define N_HCI 15 /* Bluetooth HCI UART */ diff --git a/libc/sysdeps/linux/v850/bits/ioctls.h b/libc/sysdeps/linux/v850/bits/ioctls.h deleted file mode 100644 index b49ca2076..000000000 --- a/libc/sysdeps/linux/v850/bits/ioctls.h +++ /dev/null @@ -1,108 +0,0 @@ -/* Copyright (C) 1996, 1997, 1998 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 _SYS_IOCTL_H -# error "Never use <bits/ioctls.h> directly; include <sys/ioctl.h> instead." -#endif - -/* Use the definitions from the kernel header files. */ -#include <asm/ioctls.h> - -/* Routing table calls. */ -#define SIOCADDRT 0x890B /* add routing table entry */ -#define SIOCDELRT 0x890C /* delete routing table entry */ -#define SIOCRTMSG 0x890D /* call to routing system */ - -/* Socket configuration controls. */ -#define SIOCGIFNAME 0x8910 /* get iface name */ -#define SIOCSIFLINK 0x8911 /* set iface channel */ -#define SIOCGIFCONF 0x8912 /* get iface list */ -#define SIOCGIFFLAGS 0x8913 /* get flags */ -#define SIOCSIFFLAGS 0x8914 /* set flags */ -#define SIOCGIFADDR 0x8915 /* get PA address */ -#define SIOCSIFADDR 0x8916 /* set PA address */ -#define SIOCGIFDSTADDR 0x8917 /* get remote PA address */ -#define SIOCSIFDSTADDR 0x8918 /* set remote PA address */ -#define SIOCGIFBRDADDR 0x8919 /* get broadcast PA address */ -#define SIOCSIFBRDADDR 0x891a /* set broadcast PA address */ -#define SIOCGIFNETMASK 0x891b /* get network PA mask */ -#define SIOCSIFNETMASK 0x891c /* set network PA mask */ -#define SIOCGIFMETRIC 0x891d /* get metric */ -#define SIOCSIFMETRIC 0x891e /* set metric */ -#define SIOCGIFMEM 0x891f /* get memory address (BSD) */ -#define SIOCSIFMEM 0x8920 /* set memory address (BSD) */ -#define SIOCGIFMTU 0x8921 /* get MTU size */ -#define SIOCSIFMTU 0x8922 /* set MTU size */ -#define SIOCSIFHWADDR 0x8924 /* set hardware address */ -#define SIOCGIFENCAP 0x8925 /* get/set encapsulations */ -#define SIOCSIFENCAP 0x8926 -#define SIOCGIFHWADDR 0x8927 /* Get hardware address */ -#define SIOCGIFSLAVE 0x8929 /* Driver slaving support */ -#define SIOCSIFSLAVE 0x8930 -#define SIOCADDMULTI 0x8931 /* Multicast address lists */ -#define SIOCDELMULTI 0x8932 -#define SIOCGIFINDEX 0x8933 /* name -> if_index mapping */ -#define SIOGIFINDEX SIOCGIFINDEX /* misprint compatibility :-) */ -#define SIOCSIFPFLAGS 0x8934 /* set/get extended flags set */ -#define SIOCGIFPFLAGS 0x8935 -#define SIOCDIFADDR 0x8936 /* delete PA address */ -#define SIOCSIFHWBROADCAST 0x8937 /* set hardware broadcast addr */ -#define SIOCGIFCOUNT 0x8938 /* get number of devices */ - -#define SIOCGIFBR 0x8940 /* Bridging support */ -#define SIOCSIFBR 0x8941 /* Set bridging options */ - -#define SIOCGIFTXQLEN 0x8942 /* Get the tx queue length */ -#define SIOCSIFTXQLEN 0x8943 /* Set the tx queue length */ - - -/* ARP cache control calls. */ - /* 0x8950 - 0x8952 * obsolete calls, don't re-use */ -#define SIOCDARP 0x8953 /* delete ARP table entry */ -#define SIOCGARP 0x8954 /* get ARP table entry */ -#define SIOCSARP 0x8955 /* set ARP table entry */ - -/* RARP cache control calls. */ -#define SIOCDRARP 0x8960 /* delete RARP table entry */ -#define SIOCGRARP 0x8961 /* get RARP table entry */ -#define SIOCSRARP 0x8962 /* set RARP table entry */ - -/* Driver configuration calls */ - -#define SIOCGIFMAP 0x8970 /* Get device parameters */ -#define SIOCSIFMAP 0x8971 /* Set device parameters */ - -/* DLCI configuration calls */ - -#define SIOCADDDLCI 0x8980 /* Create new DLCI device */ -#define SIOCDELDLCI 0x8981 /* Delete DLCI device */ - -/* Device private ioctl calls. */ - -/* These 16 ioctls are available to devices via the do_ioctl() device - vector. Each device should include this file and redefine these - names as their own. Because these are device dependent it is a good - idea _NOT_ to issue them to random objects and hope. */ - -#define SIOCDEVPRIVATE 0x89F0 /* to 89FF */ - -/* - * These 16 ioctl calls are protocol private - */ - -#define SIOCPROTOPRIVATE 0x89E0 /* to 89EF */ diff --git a/libc/sysdeps/linux/v850/bits/ipc.h b/libc/sysdeps/linux/v850/bits/ipc.h deleted file mode 100644 index f1a043fe5..000000000 --- a/libc/sysdeps/linux/v850/bits/ipc.h +++ /dev/null @@ -1,56 +0,0 @@ -/* Copyright (C) 1995-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 _SYS_IPC_H -# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead." -#endif - -#include <bits/types.h> - -/* Mode bits for `msgget', `semget', and `shmget'. */ -#define IPC_CREAT 01000 /* Create key if key does not exist. */ -#define IPC_EXCL 02000 /* Fail if key exists. */ -#define IPC_NOWAIT 04000 /* Return error on wait. */ - -/* Control commands for `msgctl', `semctl', and `shmctl'. */ -#define IPC_RMID 0 /* Remove identifier. */ -#define IPC_SET 1 /* Set `ipc_perm' options. */ -#define IPC_STAT 2 /* Get `ipc_perm' options. */ -#ifdef __USE_GNU -# define IPC_INFO 3 /* See ipcs. */ -#endif - -/* Special key values. */ -#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ - - -/* Data structure used to pass permission information to IPC operations. */ -struct ipc_perm - { - __key_t __key; /* Key. */ - __uid_t uid; /* Owner's user ID. */ - __gid_t gid; /* Owner's group ID. */ - __uid_t cuid; /* Creator's user ID. */ - __gid_t cgid; /* Creator's group ID. */ - unsigned short int mode; /* Read/write permission. */ - unsigned short int __pad1; - unsigned short int __seq; /* Sequence number. */ - unsigned short int __pad2; - unsigned long int __unused1; - unsigned long int __unused2; - }; diff --git a/libc/sysdeps/linux/v850/bits/libc-lock.h b/libc/sysdeps/linux/v850/bits/libc-lock.h deleted file mode 100644 index 2c1d16277..000000000 --- a/libc/sysdeps/linux/v850/bits/libc-lock.h +++ /dev/null @@ -1,327 +0,0 @@ -/* libc-internal interface for mutex locks. LinuxThreads version. - Copyright (C) 1996,1997,1998,1999,2000,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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _BITS_LIBC_LOCK_H -#define _BITS_LIBC_LOCK_H 1 - -#include <pthread.h> - -/* Mutex type. */ -#if defined(_LIBC) || defined(_IO_MTSAFE_IO) -typedef pthread_mutex_t __libc_lock_t; -typedef struct { pthread_mutex_t mutex; } __libc_lock_recursive_t; -# ifdef __USE_UNIX98 -typedef pthread_rwlock_t __libc_rwlock_t; -# else -typedef struct __libc_rwlock_opaque__ __libc_rwlock_t; -# endif -#else -typedef struct __libc_lock_opaque__ __libc_lock_t; -typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t; -typedef struct __libc_rwlock_opaque__ __libc_rwlock_t; -#endif - -/* Type for key to thread-specific data. */ -typedef pthread_key_t __libc_key_t; - -/* Define a lock variable NAME with storage class CLASS. The lock must be - initialized with __libc_lock_init before it can be used (or define it - with __libc_lock_define_initialized, below). Use `extern' for CLASS to - declare a lock defined in another module. In public structure - definitions you must use a pointer to the lock structure (i.e., NAME - begins with a `*'), because its storage size will not be known outside - of libc. */ -#define __libc_lock_define(CLASS,NAME) \ - CLASS __libc_lock_t NAME; -#define __libc_rwlock_define(CLASS,NAME) \ - CLASS __libc_rwlock_t NAME; -#define __libc_lock_define_recursive(CLASS,NAME) \ - CLASS __libc_lock_recursive_t NAME; - -/* Define an initialized lock variable NAME with storage class CLASS. - - For the C library we take a deeper look at the initializer. For - this implementation all fields are initialized to zero. Therefore - we don't initialize the variable which allows putting it into the - BSS section. (Except on PA-RISC and other odd architectures, where - initialized locks must be set to one due to the lack of normal - atomic operations.) */ - -#if __LT_SPINLOCK_INIT == 0 -# define __libc_lock_define_initialized(CLASS,NAME) \ - CLASS __libc_lock_t NAME; -#else -# define __libc_lock_define_initialized(CLASS,NAME) \ - CLASS __libc_lock_t NAME = PTHREAD_MUTEX_INITIALIZER; -#endif - -#define __libc_rwlock_define_initialized(CLASS,NAME) \ - CLASS __libc_rwlock_t NAME = PTHREAD_RWLOCK_INITIALIZER; - -/* Define an initialized recursive lock variable NAME with storage - class CLASS. */ -#define __libc_lock_define_initialized_recursive(CLASS,NAME) \ - CLASS __libc_lock_recursive_t NAME = _LIBC_LOCK_RECURSIVE_INITIALIZER; -#define _LIBC_LOCK_RECURSIVE_INITIALIZER \ - {PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP} - -/* Initialize the named lock variable, leaving it in a consistent, unlocked - state. */ -#define __libc_lock_init(NAME) \ - (__pthread_mutex_init != NULL ? __pthread_mutex_init (&(NAME), NULL) : 0); -#define __libc_rwlock_init(NAME) \ - (__pthread_rwlock_init != NULL ? __pthread_rwlock_init (&(NAME), NULL) : 0); - -/* Same as last but this time we initialize a recursive mutex. */ -#define __libc_lock_init_recursive(NAME) \ - do { \ - if (__pthread_mutex_init != NULL) \ - { \ - pthread_mutexattr_t __attr; \ - __pthread_mutexattr_init (&__attr); \ - __pthread_mutexattr_settype (&__attr, PTHREAD_MUTEX_RECURSIVE_NP); \ - __pthread_mutex_init (&(NAME).mutex, &__attr); \ - __pthread_mutexattr_destroy (&__attr); \ - } \ - } while (0); - -/* Finalize the named lock variable, which must be locked. It cannot be - used again until __libc_lock_init is called again on it. This must be - called on a lock variable before the containing storage is reused. */ -#define __libc_lock_fini(NAME) \ - (__pthread_mutex_destroy != NULL ? __pthread_mutex_destroy (&(NAME)) : 0); -#define __libc_rwlock_fini(NAME) \ - (__pthread_rwlock_destroy != NULL ? __pthread_rwlock_destroy (&(NAME)) : 0); - -/* Finalize recursive named lock. */ -#define __libc_lock_fini_recursive(NAME) __libc_lock_fini ((NAME).mutex) - -/* Lock the named lock variable. */ -#define __libc_lock_lock(NAME) \ - (__pthread_mutex_lock != NULL ? __pthread_mutex_lock (&(NAME)) : 0); -#define __libc_rwlock_rdlock(NAME) \ - (__pthread_rwlock_rdlock != NULL ? __pthread_rwlock_rdlock (&(NAME)) : 0); -#define __libc_rwlock_wrlock(NAME) \ - (__pthread_rwlock_wrlock != NULL ? __pthread_rwlock_wrlock (&(NAME)) : 0); - -/* Lock the recursive named lock variable. */ -#define __libc_lock_lock_recursive(NAME) __libc_lock_lock ((NAME).mutex) - -/* Try to lock the named lock variable. */ -#define __libc_lock_trylock(NAME) \ - (__pthread_mutex_trylock != NULL ? __pthread_mutex_trylock (&(NAME)) : 0) -#define __libc_rwlock_tryrdlock(NAME) \ - (__pthread_rwlock_tryrdlock != NULL \ - ? __pthread_rwlock_tryrdlock (&(NAME)) : 0) -#define __libc_rwlock_trywrlock(NAME) \ - (__pthread_rwlock_trywrlock != NULL \ - ? __pthread_rwlock_trywrlock (&(NAME)) : 0) - -/* Try to lock the recursive named lock variable. */ -#define __libc_lock_trylock_recursive(NAME) __libc_lock_trylock ((NAME).mutex) - -/* Unlock the named lock variable. */ -#define __libc_lock_unlock(NAME) \ - (__pthread_mutex_unlock != NULL ? __pthread_mutex_unlock (&(NAME)) : 0); -#define __libc_rwlock_unlock(NAME) \ - (__pthread_rwlock_unlock != NULL ? __pthread_rwlock_unlock (&(NAME)) : 0); - -/* Unlock the recursive named lock variable. */ -#define __libc_lock_unlock_recursive(NAME) __libc_lock_unlock ((NAME).mutex) - - -/* Define once control variable. */ -#if PTHREAD_ONCE_INIT == 0 -/* Special case for static variables where we can avoid the initialization - if it is zero. */ -# define __libc_once_define(CLASS, NAME) \ - CLASS pthread_once_t NAME -#else -# define __libc_once_define(CLASS, NAME) \ - CLASS pthread_once_t NAME = PTHREAD_ONCE_INIT -#endif - -/* Call handler iff the first call. */ -#define __libc_once(ONCE_CONTROL, INIT_FUNCTION) \ - do { \ - if (__pthread_once != NULL) \ - __pthread_once (&(ONCE_CONTROL), (INIT_FUNCTION)); \ - else if ((ONCE_CONTROL) == PTHREAD_ONCE_INIT) { \ - INIT_FUNCTION (); \ - (ONCE_CONTROL) = !PTHREAD_ONCE_INIT; \ - } \ - } while (0) - - -/* Start critical region with cleanup. */ -#define __libc_cleanup_region_start(DOIT, FCT, ARG) \ - { struct _pthread_cleanup_buffer _buffer; \ - int _avail = (DOIT) && _pthread_cleanup_push_defer != NULL; \ - if (_avail) { \ - _pthread_cleanup_push_defer (&_buffer, (FCT), (ARG)); \ - } - -/* End critical region with cleanup. */ -#define __libc_cleanup_region_end(DOIT) \ - if (_avail) { \ - _pthread_cleanup_pop_restore (&_buffer, (DOIT)); \ - } \ - } - -/* Sometimes we have to exit the block in the middle. */ -#define __libc_cleanup_end(DOIT) \ - if (_avail) { \ - _pthread_cleanup_pop_restore (&_buffer, (DOIT)); \ - } - -/* Create thread-specific key. */ -#define __libc_key_create(KEY, DESTRUCTOR) \ - (__pthread_key_create != NULL ? __pthread_key_create (KEY, DESTRUCTOR) : 1) - -/* Get thread-specific data. */ -#define __libc_getspecific(KEY) \ - (__pthread_getspecific != NULL ? __pthread_getspecific (KEY) : NULL) - -/* Set thread-specific data. */ -#define __libc_setspecific(KEY, VALUE) \ - (__pthread_setspecific != NULL ? __pthread_setspecific (KEY, VALUE) : 0) - - -/* Register handlers to execute before and after `fork'. */ -#define __libc_atfork(PREPARE, PARENT, CHILD) \ - (__pthread_atfork != NULL ? __pthread_atfork (PREPARE, PARENT, CHILD) : 0) - -/* Functions that are used by this file and are internal to the GNU C - library. */ - -extern int __pthread_mutex_init (pthread_mutex_t *__mutex, - __const pthread_mutexattr_t *__mutex_attr); - -extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex); - -extern int __pthread_mutex_trylock (pthread_mutex_t *__mutex); - -extern int __pthread_mutex_lock (pthread_mutex_t *__mutex); - -extern int __pthread_mutex_unlock (pthread_mutex_t *__mutex); - -extern int __pthread_mutexattr_init (pthread_mutexattr_t *__attr); - -extern int __pthread_mutexattr_destroy (pthread_mutexattr_t *__attr); - -extern int __pthread_mutexattr_settype (pthread_mutexattr_t *__attr, - int __kind); - -#ifdef __USE_UNIX98 -extern int __pthread_rwlock_init (pthread_rwlock_t *__rwlock, - __const pthread_rwlockattr_t *__attr); - -extern int __pthread_rwlock_destroy (pthread_rwlock_t *__rwlock); - -extern int __pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock); - -extern int __pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock); - -extern int __pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock); - -extern int __pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock); - -extern int __pthread_rwlock_unlock (pthread_rwlock_t *__rwlock); -#endif - -extern int __pthread_key_create (pthread_key_t *__key, - void (*__destr_function) (void *)); - -extern int __pthread_setspecific (pthread_key_t __key, - __const void *__pointer); - -extern void *__pthread_getspecific (pthread_key_t __key); - -extern int __pthread_once (pthread_once_t *__once_control, - void (*__init_routine) (void)); - -extern int __pthread_atfork (void (*__prepare) (void), - void (*__parent) (void), - void (*__child) (void)); - - - -/* Make the pthread functions weak so that we can elide them from - single-threaded processes. */ -#ifndef __NO_WEAK_PTHREAD_ALIASES -# ifdef weak_extern -# if _LIBC -# include <bp-sym.h> -# else -# define BP_SYM (sym) sym -# endif -weak_extern (BP_SYM (__pthread_mutex_init)) -weak_extern (BP_SYM (__pthread_mutex_destroy)) -weak_extern (BP_SYM (__pthread_mutex_lock)) -weak_extern (BP_SYM (__pthread_mutex_trylock)) -weak_extern (BP_SYM (__pthread_mutex_unlock)) -weak_extern (BP_SYM (__pthread_mutexattr_init)) -weak_extern (BP_SYM (__pthread_mutexattr_destroy)) -weak_extern (BP_SYM (__pthread_mutexattr_settype)) -weak_extern (BP_SYM (__pthread_rwlock_init)) -weak_extern (BP_SYM (__pthread_rwlock_destroy)) -weak_extern (BP_SYM (__pthread_rwlock_rdlock)) -weak_extern (BP_SYM (__pthread_rwlock_tryrdlock)) -weak_extern (BP_SYM (__pthread_rwlock_wrlock)) -weak_extern (BP_SYM (__pthread_rwlock_trywrlock)) -weak_extern (BP_SYM (__pthread_rwlock_unlock)) -weak_extern (BP_SYM (__pthread_key_create)) -weak_extern (BP_SYM (__pthread_setspecific)) -weak_extern (BP_SYM (__pthread_getspecific)) -weak_extern (BP_SYM (__pthread_once)) -weak_extern (__pthread_initialize) -weak_extern (__pthread_atfork) -weak_extern (BP_SYM (_pthread_cleanup_push_defer)) -weak_extern (BP_SYM (_pthread_cleanup_pop_restore)) -# else -# pragma weak __pthread_mutex_init -# pragma weak __pthread_mutex_destroy -# pragma weak __pthread_mutex_lock -# pragma weak __pthread_mutex_trylock -# pragma weak __pthread_mutex_unlock -# pragma weak __pthread_mutexattr_init -# pragma weak __pthread_mutexattr_destroy -# pragma weak __pthread_mutexattr_settype -# pragma weak __pthread_rwlock_destroy -# pragma weak __pthread_rwlock_rdlock -# pragma weak __pthread_rwlock_tryrdlock -# pragma weak __pthread_rwlock_wrlock -# pragma weak __pthread_rwlock_trywrlock -# pragma weak __pthread_rwlock_unlock -# pragma weak __pthread_key_create -# pragma weak __pthread_setspecific -# pragma weak __pthread_getspecific -# pragma weak __pthread_once -# pragma weak __pthread_initialize -# pragma weak __pthread_atfork -# pragma weak _pthread_cleanup_push_defer -# pragma weak _pthread_cleanup_pop_restore -# endif -#endif - -/* We need portable names for some functions. E.g., when they are - used as argument to __libc_cleanup_region_start. */ -#define __libc_mutex_unlock __pthread_mutex_unlock - -#endif /* bits/libc-lock.h */ diff --git a/libc/sysdeps/linux/v850/bits/local_lim.h b/libc/sysdeps/linux/v850/bits/local_lim.h deleted file mode 100644 index 0a7c83706..000000000 --- a/libc/sysdeps/linux/v850/bits/local_lim.h +++ /dev/null @@ -1,77 +0,0 @@ -/* Minimum guaranteed maximum values for system limits. Linux version. - Copyright (C) 1993, 94, 95, 96, 97, 98, 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* The kernel header pollutes the namespace with the NR_OPEN symbol - and defines LINK_MAX although filesystems have different maxima. A - similar thing is true for OPEN_MAX: the limit can be changed at - runtime and therefore the macro must not be defined. Remove this - after including the header if necessary. */ -#ifndef NR_OPEN -# define __undef_NR_OPEN -#endif -#ifndef LINK_MAX -# define __undef_LINK_MAX -#endif -#ifndef OPEN_MAX -# define __undef_OPEN_MAX -#endif - -/* The kernel sources contain a file with all the needed information. */ -#include <linux/limits.h> - -/* Have to remove NR_OPEN? */ -#ifdef __undef_NR_OPEN -# undef NR_OPEN -# undef __undef_NR_OPEN -#endif -/* Have to remove LINK_MAX? */ -#ifdef __undef_LINK_MAX -# undef LINK_MAX -# undef __undef_LINK_MAX -#endif -/* Have to remove OPEN_MAX? */ -#ifdef __undef_OPEN_MAX -# undef OPEN_MAX -# undef __undef_OPEN_MAX -#endif - -/* The number of data keys per process. */ -#define _POSIX_THREAD_KEYS_MAX 128 -/* This is the value this implementation supports. */ -#define PTHREAD_KEYS_MAX 1024 - -/* Controlling the iterations of destructors for thread-specific data. */ -#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 -/* Number of iterations this implementation does. */ -#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS - -/* The number of threads per process. */ -#define _POSIX_THREAD_THREADS_MAX 64 -/* This is the value this implementation supports. */ -#define PTHREAD_THREADS_MAX 1024 - -/* Maximum amount by which a process can descrease its asynchronous I/O - priority level. */ -#define AIO_PRIO_DELTA_MAX 20 - -/* Minimum size for a thread. We are free to choose a reasonable value. */ -#define PTHREAD_STACK_MIN 16384 - -/* Maximum number of POSIX timers available. */ -#define TIMER_MAX 256 diff --git a/libc/sysdeps/linux/v850/bits/mathcalls.h b/libc/sysdeps/linux/v850/bits/mathcalls.h deleted file mode 100644 index c1181f737..000000000 --- a/libc/sysdeps/linux/v850/bits/mathcalls.h +++ /dev/null @@ -1,333 +0,0 @@ -/* Prototype declarations for math functions; helper file for <math.h>. - Copyright (C) 1996,1997,1998,1999,2000,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 <math.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,[_r], (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,[_r], (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. - - Note that there must be no whitespace before the argument passed for - NAME, to make token pasting work with -traditional. */ - -#ifndef _MATH_H - #error "Never include <bits/mathcalls.h> directly; include <math.h> instead." -#endif - - -/* Trigonometric functions. */ - -/* Arc cosine of X. */ -__MATHCALL (acos,, (_Mdouble_ __x)); -/* Arc sine of X. */ -__MATHCALL (asin,, (_Mdouble_ __x)); -/* Arc tangent of X. */ -__MATHCALL (atan,, (_Mdouble_ __x)); -/* Arc tangent of Y/X. */ -__MATHCALL (atan2,, (_Mdouble_ __y, _Mdouble_ __x)); - -/* Cosine of X. */ -__MATHCALL (cos,, (_Mdouble_ __x)); -/* Sine of X. */ -__MATHCALL (sin,, (_Mdouble_ __x)); -/* Tangent of X. */ -__MATHCALL (tan,, (_Mdouble_ __x)); - -#ifdef __USE_GNU -/* Cosine and sine of X. */ -__MATHDECL (void,sincos,, - (_Mdouble_ __x, _Mdouble_ *__sinx, _Mdouble_ *__cosx)); -#endif - -/* Hyperbolic functions. */ - -/* Hyperbolic cosine of X. */ -__MATHCALL (cosh,, (_Mdouble_ __x)); -/* Hyperbolic sine of X. */ -__MATHCALL (sinh,, (_Mdouble_ __x)); -/* Hyperbolic tangent of X. */ -__MATHCALL (tanh,, (_Mdouble_ __x)); - -#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 -/* Hyperbolic arc cosine of X. */ -__MATHCALL (acosh,, (_Mdouble_ __x)); -/* Hyperbolic arc sine of X. */ -__MATHCALL (asinh,, (_Mdouble_ __x)); -/* Hyperbolic arc tangent of X. */ -__MATHCALL (atanh,, (_Mdouble_ __x)); -#endif - -/* Exponential and logarithmic functions. */ - -/* Exponential function of X. */ -__MATHCALL (exp,, (_Mdouble_ __x)); - -#ifdef __USE_GNU -/* A function missing in all standards: compute exponent to base ten. */ -__MATHCALL (exp10,, (_Mdouble_ __x)); -/* Another name occasionally used. */ -__MATHCALL (pow10,, (_Mdouble_ __x)); -#endif - -/* Break VALUE into a normalized fraction and an integral power of 2. */ -__MATHCALL (frexp,, (_Mdouble_ __x, int *__exponent)); - -/* X times (two to the EXP power). */ -__MATHCALL (ldexp,, (_Mdouble_ __x, int __exponent)); - -/* Natural logarithm of X. */ -__MATHCALL (log,, (_Mdouble_ __x)); - -/* Base-ten logarithm of X. */ -__MATHCALL (log10,, (_Mdouble_ __x)); - -/* Break VALUE into integral and fractional parts. */ -__MATHCALL (modf,, (_Mdouble_ __x, _Mdouble_ *__iptr)); - -#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 -/* Return exp(X) - 1. */ -__MATHCALL (expm1,, (_Mdouble_ __x)); - -/* Return log(1 + X). */ -__MATHCALL (log1p,, (_Mdouble_ __x)); - -/* Return the base 2 signed integral exponent of X. */ -__MATHCALL (logb,, (_Mdouble_ __x)); -#endif - -#ifdef __USE_ISOC99 -/* Compute base-2 exponential of X. */ -__MATHCALL (exp2,, (_Mdouble_ __x)); - -/* Compute base-2 logarithm of X. */ -__MATHCALL (log2,, (_Mdouble_ __x)); -#endif - - -/* Power functions. */ - -/* Return X to the Y power. */ -__MATHCALL (pow,, (_Mdouble_ __x, _Mdouble_ __y)); - -/* Return the square root of X. */ -__MATHCALL (sqrt,, (_Mdouble_ __x)); - -#if defined __USE_MISC || defined __USE_XOPEN || defined __USE_ISOC99 -/* Return `sqrt(X*X + Y*Y)'. */ -__MATHCALL (hypot,, (_Mdouble_ __x, _Mdouble_ __y)); -#endif - -#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 -/* Return the cube root of X. */ -__MATHCALL (cbrt,, (_Mdouble_ __x)); -#endif - - -/* Nearest integer, absolute value, and remainder functions. */ - -/* Smallest integral value not less than X. */ -__MATHCALL (ceil,, (_Mdouble_ __x)); - -/* Absolute value of X. */ -__MATHCALLX (fabs,, (_Mdouble_ __x), (__const__)); - -/* Largest integer not greater than X. */ -__MATHCALL (floor,, (_Mdouble_ __x)); - -/* Floating-point modulo remainder of X/Y. */ -__MATHCALL (fmod,, (_Mdouble_ __x, _Mdouble_ __y)); - - -/* Return 0 if VALUE is finite or NaN, +1 if it - is +Infinity, -1 if it is -Infinity. */ -__MATHDECL_1 (int,__isinf,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -/* Return nonzero if VALUE is finite and not NaN. */ -__MATHDECL_1 (int,__finite,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -#ifdef __USE_MISC -/* Return 0 if VALUE is finite or NaN, +1 if it - is +Infinity, -1 if it is -Infinity. */ -__MATHDECL_1 (int,isinf,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -/* Return nonzero if VALUE is finite and not NaN. */ -__MATHDECL_1 (int,finite,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -/* Return the remainder of X/Y. */ -__MATHCALL (drem,, (_Mdouble_ __x, _Mdouble_ __y)); - - -/* Return the fractional part of X after dividing out `ilogb (X)'. */ -__MATHCALL (significand,, (_Mdouble_ __x)); -#endif /* Use misc. */ - -#if defined __USE_MISC || defined __USE_ISOC99 -/* Return X with its signed changed to Y's. */ -__MATHCALLX (copysign,, (_Mdouble_ __x, _Mdouble_ __y), (__const__)); -#endif - -#ifdef __USE_ISOC99 -/* Return representation of NaN for double type. */ -__MATHCALLX (nan,, (__const char *__tagb), (__const__)); -#endif - - -/* Return nonzero if VALUE is not a number. */ -__MATHDECL_1 (int,__isnan,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -#if defined __USE_MISC || defined __USE_XOPEN -/* Return nonzero if VALUE is not a number. */ -__MATHDECL_1 (int,isnan,, (_Mdouble_ __value)) __attribute__ ((__const__)); - -/* Bessel functions. */ -__MATHCALL (j0,, (_Mdouble_)); -__MATHCALL (j1,, (_Mdouble_)); -__MATHCALL (jn,, (int, _Mdouble_)); -__MATHCALL (y0,, (_Mdouble_)); -__MATHCALL (y1,, (_Mdouble_)); -__MATHCALL (yn,, (int, _Mdouble_)); -#endif - - -#if defined __USE_MISC || defined __USE_XOPEN || defined __USE_ISOC99 -/* Error and gamma functions. */ -__MATHCALL (erf,, (_Mdouble_)); -__MATHCALL (erfc,, (_Mdouble_)); -__MATHCALL (lgamma,, (_Mdouble_)); -#endif - -#ifdef __USE_ISOC99 -__MATHCALL (tgamma,, (_Mdouble_)); -#endif - -#if defined __USE_MISC || defined __USE_XOPEN -/* Obsolete alias for `lgamma'. */ -__MATHCALL (gamma,, (_Mdouble_)); -#endif - -#ifdef __USE_MISC -/* Reentrant version of lgamma. This function uses the global variable - `signgam'. The reentrant version instead takes a pointer and stores - the value through it. */ -__MATHCALL (lgamma,_r, (_Mdouble_, int *__signgamp)); -#endif - - -#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99 -/* Return the integer nearest X in the direction of the - prevailing rounding mode. */ -__MATHCALL (rint,, (_Mdouble_ __x)); - -/* Return X + epsilon if X < Y, X - epsilon if X > Y. */ -__MATHCALLX (nextafter,, (_Mdouble_ __x, _Mdouble_ __y), (__const__)); -# ifdef __USE_ISOC99 -__MATHCALLX (nexttoward,, (_Mdouble_ __x, long double __y), (__const__)); -# endif - -/* Return the remainder of integer divison X / Y with infinite precision. */ -__MATHCALL (remainder,, (_Mdouble_ __x, _Mdouble_ __y)); - -# if defined __USE_MISC || defined __USE_XOPEN_EXTENDED -/* Return X times (2 to the Nth power). */ -__MATHCALL (scalb,, (_Mdouble_ __x, _Mdouble_ __n)); -# endif - -# if defined __USE_MISC || defined __USE_ISOC99 -/* Return X times (2 to the Nth power). */ -__MATHCALL (scalbn,, (_Mdouble_ __x, int __n)); -# endif - -/* Return the binary exponent of X, which must be nonzero. */ -__MATHDECL (int,ilogb,, (_Mdouble_ __x)); -#endif - -#ifdef __USE_ISOC99 -/* Return X times (2 to the Nth power). */ -__MATHCALL (scalbln,, (_Mdouble_ __x, long int __n)); - -/* Round X to integral value in floating-point format using current - rounding direction, but do not raise inexact exception. */ -__MATHCALL (nearbyint,, (_Mdouble_ __x)); - -/* Round X to nearest integral value, rounding halfway cases away from - zero. */ -__MATHCALL (round,, (_Mdouble_ __x)); - -/* Round X to the integral value in floating-point format nearest but - not larger in magnitude. */ -__MATHCALLX (trunc,, (_Mdouble_ __x), (__const__)); - -/* Compute remainder of X and Y and put in *QUO a value with sign of x/y - and magnitude congruent `mod 2^n' to the magnitude of the integral - quotient x/y, with n >= 3. */ -__MATHCALL (remquo,, (_Mdouble_ __x, _Mdouble_ __y, int *__quo)); - - -/* Conversion functions. */ - -/* Round X to nearest integral value according to current rounding - direction. */ -__MATHDECL (long int,lrint,, (_Mdouble_ __x)); -__MATHDECL (long long int,llrint,, (_Mdouble_ __x)); - -/* Round X to nearest integral value, rounding halfway cases away from - zero. */ -__MATHDECL (long int,lround,, (_Mdouble_ __x)); -__MATHDECL (long long int,llround,, (_Mdouble_ __x)); - - -/* Return positive difference between X and Y. */ -__MATHCALL (fdim,, (_Mdouble_ __x, _Mdouble_ __y)); - -/* Return maximum numeric value from X and Y. */ -__MATHCALL (fmax,, (_Mdouble_ __x, _Mdouble_ __y)); - -/* Return minimum numeric value from X and Y. */ -__MATHCALL (fmin,, (_Mdouble_ __x, _Mdouble_ __y)); - - -/* Classify given number. */ -__MATHDECL_1 (int, __fpclassify,, (_Mdouble_ __value)) - __attribute__ ((__const__)); - -/* Test for negative number. */ -__MATHDECL_1 (int, __signbit,, (_Mdouble_ __value)) - __attribute__ ((__const__)); - - -/* Multiply-add function computed as a ternary operation. */ -__MATHCALL (fma,, (_Mdouble_ __x, _Mdouble_ __y, _Mdouble_ __z)); -#endif /* Use ISO C99. */ diff --git a/libc/sysdeps/linux/v850/bits/mathdef.h b/libc/sysdeps/linux/v850/bits/mathdef.h deleted file mode 100644 index 4895d0c51..000000000 --- a/libc/sysdeps/linux/v850/bits/mathdef.h +++ /dev/null @@ -1,53 +0,0 @@ -/* Copyright (C) 1997, 1998, 1999, 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. */ - -#if !defined _MATH_H && !defined _COMPLEX_H -# error "Never use <bits/mathdef.h> directly; include <math.h> instead" -#endif - -#if defined __USE_ISOC9X && defined _MATH_H && !defined _MATH_H_MATHDEF -# define _MATH_H_MATHDEF 1 - -/* Normally, there is no long double type and the `float' and `double' - expressions are evaluated as `double'. */ -typedef double float_t; /* `float' expressions are evaluated as - `double'. */ -typedef double double_t; /* `double' expressions are evaluated as - `double'. */ - -/* Signal that both types are `double'. */ -# define FLT_EVAL_METHOD 1 - -/* Define `INFINITY' as value of type `float'. */ -# define INFINITY HUGE_VALF - - -/* The values returned by `ilogb' for 0 and NaN respectively. */ -# define FP_ILOGB0 0x80000001 -# define FP_ILOGBNAN 0x7fffffff - -/* Number of decimal digits for the `double' type. */ -# define DECIMAL_DIG 15 - -#endif /* ISO C9X */ - -#ifndef __NO_LONG_DOUBLE_MATH -/* Signal that we do not really have a `long double'. The disables the - declaration of all the `long double' function variants. */ -# define __NO_LONG_DOUBLE_MATH 1 -#endif diff --git a/libc/sysdeps/linux/v850/bits/mathinline.h b/libc/sysdeps/linux/v850/bits/mathinline.h deleted file mode 100644 index 5498af6b6..000000000 --- a/libc/sysdeps/linux/v850/bits/mathinline.h +++ /dev/null @@ -1,12 +0,0 @@ -/* This file should provide inline versions of math functions. - - Surround GCC-specific parts with #ifdef __GNUC__, and use `extern __inline'. - - This file should define __MATH_INLINES if functions are actually defined as - inlines. */ - -#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__ - -/* Here goes the real code. */ - -#endif diff --git a/libc/sysdeps/linux/v850/bits/mman.h b/libc/sysdeps/linux/v850/bits/mman.h deleted file mode 100644 index 7e10f8d17..000000000 --- a/libc/sysdeps/linux/v850/bits/mman.h +++ /dev/null @@ -1,75 +0,0 @@ -/* Definitions for POSIX memory map interface. Linux/v850e version. - Copyright (C) 1997, 1999, 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. */ - -#ifndef _SYS_MMAN_H -# error "Never include this file directly. Use <sys/mman.h> instead" -#endif - -/* The following definitions basically come from the kernel headers. - But the kernel header is not namespace clean. */ - - -/* Protections are chosen from these bits, OR'd together. The - implementation does not necessarily support PROT_EXEC or PROT_WRITE - without PROT_READ. The only guarantees are that no writing will be - allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ - -#define PROT_READ 0x1 /* Page can be read. */ -#define PROT_WRITE 0x2 /* Page can be written. */ -#define PROT_EXEC 0x4 /* Page can be executed. */ -#define PROT_NONE 0x0 /* Page can not be accessed. */ - -/* Sharing types (must choose one and only one of these). */ -#define MAP_SHARED 0x01 /* Share changes. */ -#define MAP_PRIVATE 0x02 /* Changes are private. */ -#ifdef __USE_MISC -# define MAP_TYPE 0x0f /* Mask for type of mapping. */ -#endif - -/* Other flags. */ -#define MAP_FIXED 0x10 /* Interpret addr exactly. */ -#ifdef __USE_MISC -# define MAP_FILE 0 -# define MAP_ANONYMOUS 0x20 /* Don't use a file. */ -# define MAP_ANON MAP_ANONYMOUS -#endif - -/* These are Linux-specific. */ -#ifdef __USE_MISC -# define MAP_GROWSDOWN 0x0100 /* Stack-like segment. */ -# define MAP_DENYWRITE 0x0800 /* ETXTBSY */ -# define MAP_EXECUTABLE 0x1000 /* Mark it as an executable. */ -# define MAP_LOCKED 0x2000 /* Lock the mapping. */ -# define MAP_NORESERVE 0x4000 /* Don't check for reservations. */ -#endif - -/* Flags to `msync'. */ -#define MS_ASYNC 1 /* Sync memory asynchronously. */ -#define MS_SYNC 4 /* Synchronous memory sync. */ -#define MS_INVALIDATE 2 /* Invalidate the caches. */ - -/* Flags for `mlockall'. */ -#define MCL_CURRENT 1 /* Lock all currently mapped pages. */ -#define MCL_FUTURE 2 /* Lock all additions to address - space. */ - -/* Flags for `mremap'. */ -#ifdef __USE_GNU -# define MREMAP_MAYMOVE 1 -#endif diff --git a/libc/sysdeps/linux/v850/bits/msq.h b/libc/sysdeps/linux/v850/bits/msq.h deleted file mode 100644 index 32a49b592..000000000 --- a/libc/sysdeps/linux/v850/bits/msq.h +++ /dev/null @@ -1,77 +0,0 @@ -/* Copyright (C) 1995, 1996, 1997, 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 _SYS_MSG_H -# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead." -#endif - -#include <bits/types.h> - -/* Define options for message queue functions. */ -#define MSG_NOERROR 010000 /* no error if message is too big */ -#ifdef __USE_GNU -# define MSG_EXCEPT 020000 /* recv any msg except of specified type */ -#endif - -/* Types used in the structure definition. */ -typedef unsigned long int msgqnum_t; -typedef unsigned long int msglen_t; - - -/* Structure of record for one message inside the kernel. - The type `struct msg' is opaque. */ -struct msqid_ds -{ - struct ipc_perm msg_perm; /* structure describing operation permission */ - __time_t msg_stime; /* time of last msgsnd command */ - unsigned long int __unused1; - __time_t msg_rtime; /* time of last msgrcv command */ - unsigned long int __unused2; - __time_t msg_ctime; /* time of last change */ - unsigned long int __unused3; - unsigned long int __msg_cbytes; /* current number of bytes on queue */ - msgqnum_t msg_qnum; /* number of messages currently on queue */ - msglen_t msg_qbytes; /* max number of bytes allowed on queue */ - __pid_t msg_lspid; /* pid of last msgsnd() */ - __pid_t msg_lrpid; /* pid of last msgrcv() */ - unsigned long int __unused4; - unsigned long int __unused5; -}; - -#ifdef __USE_MISC - -# define msg_cbytes __msg_cbytes - -/* ipcs ctl commands */ -# define MSG_STAT 11 -# define MSG_INFO 12 - -/* buffer for msgctl calls IPC_INFO, MSG_INFO */ -struct msginfo - { - int msgpool; - int msgmap; - int msgmax; - int msgmnb; - int msgmni; - int msgssz; - int msgtql; - unsigned short int msgseg; - }; - -#endif /* __USE_MISC */ diff --git a/libc/sysdeps/linux/v850/bits/nan.h b/libc/sysdeps/linux/v850/bits/nan.h deleted file mode 100644 index 6d88b551b..000000000 --- a/libc/sysdeps/linux/v850/bits/nan.h +++ /dev/null @@ -1,48 +0,0 @@ -/* `NAN' constant for IEEE 754 machines. - Copyright (C) 1992, 1996, 1997, 1999 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 _MATH_H -# error "Never use <bits/nan.h> directly; include <math.h> instead." -#endif - - -/* IEEE Not A Number. */ - -#ifdef __GNUC__ - -# define NAN \ - (__extension__ \ - ((union { unsigned __l __attribute__((__mode__(__SI__))); float __d; }) \ - { __l: 0x7fc00000UL }).__d) - -#else - -# include <endian.h> - -# if __BYTE_ORDER == __BIG_ENDIAN -# define __nan_bytes { 0x7f, 0xc0, 0, 0 } -# endif -# if __BYTE_ORDER == __LITTLE_ENDIAN -# define __nan_bytes { 0, 0, 0xc0, 0x7f } -# endif - -static union { unsigned char __c[4]; float __d; } __nan_union = { __nan_bytes }; -# define NAN (__nan_union.__d) - -#endif /* GCC. */ diff --git a/libc/sysdeps/linux/v850/bits/netdb.h b/libc/sysdeps/linux/v850/bits/netdb.h deleted file mode 100644 index 41dc73193..000000000 --- a/libc/sysdeps/linux/v850/bits/netdb.h +++ /dev/null @@ -1,33 +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. */ - -#ifndef _NETDB_H -# error "Never include <bits/netdb.h> directly; use <netdb.h> instead." -#endif - - -/* Description of data base entry for a single network. NOTE: here a - poor assumption is made. The network number is expected to fit - into an unsigned long int variable. */ -struct netent -{ - char *n_name; /* Official name of network. */ - char **n_aliases; /* Alias list. */ - int n_addrtype; /* Net address type. */ - uint32_t n_net; /* Network number. */ -}; diff --git a/libc/sysdeps/linux/v850/bits/poll.h b/libc/sysdeps/linux/v850/bits/poll.h deleted file mode 100644 index f7a739315..000000000 --- a/libc/sysdeps/linux/v850/bits/poll.h +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright (C) 1997, 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. */ - -#ifndef _SYS_POLL_H -# error "Never use <bits/poll.h> directly; include <sys/poll.h> instead." -#endif - -/* Event types that can be polled for. These bits may be set in `events' - to indicate the interesting event types; they will appear in `revents' - to indicate the status of the file descriptor. */ -#define POLLIN 0x001 /* There is data to read. */ -#define POLLPRI 0x002 /* There is urgent data to read. */ -#define POLLOUT 0x004 /* Writing now will not block. */ - -#ifdef __USE_XOPEN -/* These values are defined in XPG4.2. */ -# define POLLRDNORM 0x040 /* Normal data may be read. */ -# define POLLRDBAND 0x080 /* Priority data may be read. */ -# define POLLWRNORM POLLOUT /* Writing now will not block. */ -# define POLLWRBAND 0x100 /* Priority data may be written. */ -#endif - -/* Event types always implicitly polled for. These bits need not be set in - `events', but they will appear in `revents' to indicate the status of - the file descriptor. */ -#define POLLERR 0x008 /* Error condition. */ -#define POLLHUP 0x010 /* Hung up. */ -#define POLLNVAL 0x020 /* Invalid polling request. */ diff --git a/libc/sysdeps/linux/v850/bits/posix1_lim.h b/libc/sysdeps/linux/v850/bits/posix1_lim.h deleted file mode 100644 index e16f4674d..000000000 --- a/libc/sysdeps/linux/v850/bits/posix1_lim.h +++ /dev/null @@ -1,141 +0,0 @@ -/* Copyright (C) 1991,92,93,96,98,2000,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. */ - -/* - * POSIX Standard: 2.9.2 Minimum Values Added to <limits.h> - * - * Never include this file directly; use <limits.h> instead. - */ - -#ifndef _BITS_POSIX1_LIM_H -#define _BITS_POSIX1_LIM_H 1 - - -/* These are the standard-mandated minimum values. */ - -/* Minimum number of operations in one list I/O call. */ -#define _POSIX_AIO_LISTIO_MAX 2 - -/* Minimal number of outstanding asynchronous I/O operations. */ -#define _POSIX_AIO_MAX 1 - -/* Maximum length of arguments to `execve', including environment. */ -#define _POSIX_ARG_MAX 4096 - -/* Maximum simultaneous processes per real user ID. */ -#define _POSIX_CHILD_MAX 6 - -/* Minimal number of timer expiration overruns. */ -#define _POSIX_DELAYTIMER_MAX 32 - -/* Maximum link count of a file. */ -#define _POSIX_LINK_MAX 8 - -/* Number of bytes in a terminal canonical input queue. */ -#define _POSIX_MAX_CANON 255 - -/* Number of bytes for which space will be - available in a terminal input queue. */ -#define _POSIX_MAX_INPUT 255 - -/* Maximum number of message queues open for a process. */ -#define _POSIX_MQ_OPEN_MAX 8 - -/* Maximum number of supported message priorities. */ -#define _POSIX_MQ_PRIO_MAX 32 - -/* Number of simultaneous supplementary group IDs per process. */ -#define _POSIX_NGROUPS_MAX 0 - -/* Number of files one process can have open at once. */ -#define _POSIX_OPEN_MAX 16 - -/* Number of descriptors that a process may examine with `pselect' or - `select'. */ -#define _POSIX_FD_SETSIZE _POSIX_OPEN_MAX - -/* Number of bytes in a filename. */ -#define _POSIX_NAME_MAX 14 - -/* Number of bytes in a pathname. */ -#define _POSIX_PATH_MAX 256 - -/* Number of bytes than can be written atomically to a pipe. */ -#define _POSIX_PIPE_BUF 512 - -/* Minimal number of realtime signals reserved for the application. */ -#define _POSIX_RTSIG_MAX 8 - -/* Number of semaphores a process can have. */ -#define _POSIX_SEM_NSEMS_MAX 256 - -/* Maximal value of a semaphore. */ -#define _POSIX_SEM_VALUE_MAX 32767 - -/* Number of pending realtime signals. */ -#define _POSIX_SIGQUEUE_MAX 32 - -/* Largest value of a `ssize_t'. */ -#define _POSIX_SSIZE_MAX 32767 - -/* Number of streams a process can have open at once. */ -#define _POSIX_STREAM_MAX 8 - -/* Maximum length of a timezone name (element of `tzname'). */ -#define _POSIX_TZNAME_MAX 6 - -/* Maximum number of connections that can be queued on a socket. */ -#define _POSIX_QLIMIT 1 - -/* Maximum number of bytes that can be buffered on a socket for send - or receive. */ -#define _POSIX_HIWAT _POSIX_PIPE_BUF - -/* Maximum number of elements in an `iovec' array. */ -#define _POSIX_UIO_MAXIOV 16 - -/* Maximum number of characters in a tty name. */ -#define _POSIX_TTY_NAME_MAX 9 - -/* Number of timer for a process. */ -#define _POSIX_TIMER_MAX 32 - -/* Maximum length of login name. */ -#define _POSIX_LOGIN_NAME_MAX 9 - -/* Maximum clock resolution in nanoseconds. */ -#define _POSIX_CLOCKRES_MIN 20000000 - - -/* Get the implementation-specific values for the above. */ -#include <bits/local_lim.h> - - -#ifndef SSIZE_MAX -# define SSIZE_MAX INT_MAX -#endif - - -/* This value is a guaranteed minimum maximum. - The current maximum can be got from `sysconf'. */ - -#ifndef NGROUPS_MAX -# define NGROUPS_MAX _POSIX_NGROUPS_MAX -#endif - -#endif /* bits/posix1_lim.h */ diff --git a/libc/sysdeps/linux/v850/bits/posix2_lim.h b/libc/sysdeps/linux/v850/bits/posix2_lim.h deleted file mode 100644 index 24483a09d..000000000 --- a/libc/sysdeps/linux/v850/bits/posix2_lim.h +++ /dev/null @@ -1,91 +0,0 @@ -/* Copyright (C) 1991, 1996, 1999, 2000, 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. */ - -/* - * Never include this file directly; include <limits.h> instead. - */ - -#ifndef _BITS_POSIX2_LIM_H -#define _BITS_POSIX2_LIM_H 1 - - -/* The maximum `ibase' and `obase' values allowed by the `bc' utility. */ -#define _POSIX2_BC_BASE_MAX 99 - -/* The maximum number of elements allowed in an array by the `bc' utility. */ -#define _POSIX2_BC_DIM_MAX 2048 - -/* The maximum `scale' value allowed by the `bc' utility. */ -#define _POSIX2_BC_SCALE_MAX 99 - -/* The maximum length of a string constant accepted by the `bc' utility. */ -#define _POSIX2_BC_STRING_MAX 1000 - -/* The maximum number of weights that can be assigned to an entry of - the LC_COLLATE `order' keyword in the locale definition file. */ -#define _POSIX2_COLL_WEIGHTS_MAX 2 - -/* The maximum number of expressions that can be nested - within parentheses by the `expr' utility. */ -#define _POSIX2_EXPR_NEST_MAX 32 - -/* The maximum length, in bytes, of an input line. */ -#define _POSIX2_LINE_MAX 2048 - -/* The maximum number of repeated occurrences of a regular expression - permitted when using the interval notation `\{M,N\}'. */ -#define _POSIX2_RE_DUP_MAX 255 - -/* The maximum number of bytes in a character class name. We have no - fixed limit, 2048 is a high number. */ -#define _POSIX2_CHARCLASS_NAME_MAX 14 - - -/* These values are implementation-specific, - and may vary within the implementation. - Their precise values can be obtained from sysconf. */ - -#ifndef BC_BASE_MAX -#define BC_BASE_MAX _POSIX2_BC_BASE_MAX -#endif -#ifndef BC_DIM_MAX -#define BC_DIM_MAX _POSIX2_BC_DIM_MAX -#endif -#ifndef BC_SCALE_MAX -#define BC_SCALE_MAX _POSIX2_BC_SCALE_MAX -#endif -#ifndef BC_STRING_MAX -#define BC_STRING_MAX _POSIX2_BC_STRING_MAX -#endif -#ifndef COLL_WEIGHTS_MAX -#define COLL_WEIGHTS_MAX 255 -#endif -#ifndef EXPR_NEST_MAX -#define EXPR_NEST_MAX _POSIX2_EXPR_NEST_MAX -#endif -#ifndef LINE_MAX -#define LINE_MAX _POSIX2_LINE_MAX -#endif -#ifndef CHARCLASS_NAME_MAX -#define CHARCLASS_NAME_MAX 2048 -#endif - -/* This value is defined like this in regex.h. */ -#define RE_DUP_MAX (0x7fff) - -#endif /* bits/posix2_lim.h */ diff --git a/libc/sysdeps/linux/v850/bits/posix_opt.h b/libc/sysdeps/linux/v850/bits/posix_opt.h deleted file mode 100644 index 68f200f84..000000000 --- a/libc/sysdeps/linux/v850/bits/posix_opt.h +++ /dev/null @@ -1,141 +0,0 @@ -/* Define POSIX options for Linux. - Copyright (C) 1996,1997,1998,1999,2000,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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _POSIX_OPT_H -#define _POSIX_OPT_H 1 - -/* Job control is supported. */ -#define _POSIX_JOB_CONTROL 1 - -/* Processes have a saved set-user-ID and a saved set-group-ID. */ -#define _POSIX_SAVED_IDS 1 - -/* Priority scheduling is supported. */ -#define _POSIX_PRIORITY_SCHEDULING 1 - -/* Synchronizing file data is supported. */ -#define _POSIX_SYNCHRONIZED_IO 1 - -/* The fsync function is present. */ -#define _POSIX_FSYNC 1 - -/* Mapping of files to memory is supported. */ -#define _POSIX_MAPPED_FILES 1 - -/* Locking of all memory is supported. */ -#define _POSIX_MEMLOCK 1 - -/* Locking of ranges of memory is supported. */ -#define _POSIX_MEMLOCK_RANGE 1 - -/* Setting of memory protections is supported. */ -#define _POSIX_MEMORY_PROTECTION 1 - -/* Implementation supports `poll' function. */ -#define _POSIX_POLL 1 - -/* Implementation supports `select' and `pselect' functions. */ -#define _POSIX_SELECT 1 - -/* Only root can change owner of file. */ -#define _POSIX_CHOWN_RESTRICTED 1 - -/* `c_cc' member of 'struct termios' structure can be disabled by - using the value _POSIX_VDISABLE. */ -#define _POSIX_VDISABLE '\0' - -/* Filenames are not silently truncated. */ -#define _POSIX_NO_TRUNC 1 - -/* X/Open realtime support is available. */ -#define _XOPEN_REALTIME 1 - -/* X/Open realtime thread support is available. */ -#undef _XOPEN_REALTIME_THREADS 1 - -/* XPG4.2 shared memory is supported. */ -#define _XOPEN_SHM 1 - -/* Tell we have POSIX threads. */ -#undef _POSIX_THREADS 1 - -/* We have the reentrant functions described in POSIX. */ -#define _POSIX_REENTRANT_FUNCTIONS 1 -#define _POSIX_THREAD_SAFE_FUNCTIONS 1 - -/* We provide priority scheduling for threads. */ -#define _POSIX_THREAD_PRIORITY_SCHEDULING 1 - -/* We support user-defined stack sizes. */ -#define _POSIX_THREAD_ATTR_STACKSIZE 1 - -/* We support user-defined stacks. */ -#define _POSIX_THREAD_ATTR_STACKADDR 1 - -/* We support POSIX.1b semaphores, but only the non-shared form for now. */ -#define _POSIX_SEMAPHORES 1 - -/* Real-time signals are supported. */ -#define _POSIX_REALTIME_SIGNALS 1 - -/* We support asynchronous I/O. */ -#define _POSIX_ASYNCHRONOUS_IO 1 -#define _POSIX_ASYNC_IO 1 -/* Alternative name for Unix98. */ -#define _LFS_ASYNCHRONOUS_IO 1 - -/* The LFS support in asynchronous I/O is also available. */ -#define _LFS64_ASYNCHRONOUS_IO 1 - -/* The rest of the LFS is also available. */ -#define _LFS_LARGEFILE 1 -#define _LFS64_LARGEFILE 1 -#define _LFS64_STDIO 1 - -/* POSIX shared memory objects are implemented. */ -#define _POSIX_SHARED_MEMORY_OBJECTS 1 - -/* GNU libc provides regular expression handling. */ -#define _POSIX_REGEXP 1 - -/* Reader/Writer locks are available. */ -#define _POSIX_READER_WRITER_LOCKS 200912L - -/* We have a POSIX shell. */ -#define _POSIX_SHELL 1 - -/* We support the Timeouts option. */ -#define _POSIX_TIMEOUTS 200912L - -/* We support spinlocks. */ -#define _POSIX_SPIN_LOCKS 200912L - -/* The `spawn' function family is supported. */ -#define _POSIX_SPAWN 200912L - -/* We have POSIX timers. */ -#define _POSIX_TIMERS 1 - -/* The barrier functions are available. */ -#define _POSIX_BARRIERS 200912L - -/* POSIX message queues are not yet supported. */ -#undef _POSIX_MESSAGE_PASSING - -#endif /* posix_opt.h */ diff --git a/libc/sysdeps/linux/v850/bits/pthreadtypes.h b/libc/sysdeps/linux/v850/bits/pthreadtypes.h deleted file mode 100644 index 7f9d92f8d..000000000 --- a/libc/sysdeps/linux/v850/bits/pthreadtypes.h +++ /dev/null @@ -1,142 +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. */ - -#if !defined _BITS_TYPES_H && !defined _PTHREAD_H -# error "Never include <bits/pthreadtypes.h> directly; use <sys/types.h> instead." -#endif - -#ifndef _BITS_PTHREADTYPES_H -#define _BITS_PTHREADTYPES_H 1 - -#define __need_schedparam -#include <bits/sched.h> - -/* Fast locks (not abstract because mutexes and conditions aren't abstract). */ -struct _pthread_fastlock -{ - long int __status; /* "Free" or "taken" or head of waiting list */ - int __spinlock; /* Used by compare_and_swap emulation. Also, - adaptive SMP lock stores spin count here. */ -}; - -#ifndef _PTHREAD_DESCR_DEFINED -/* Thread descriptors */ -typedef struct _pthread_descr_struct *_pthread_descr; -# define _PTHREAD_DESCR_DEFINED -#endif - - -/* Attributes for threads. */ -typedef struct __pthread_attr_s -{ - int __detachstate; - int __schedpolicy; - struct __sched_param __schedparam; - int __inheritsched; - int __scope; - size_t __guardsize; - int __stackaddr_set; - void *__stackaddr; - size_t __stacksize; -} pthread_attr_t; - - -/* Conditions (not abstract because of PTHREAD_COND_INITIALIZER */ -typedef struct -{ - struct _pthread_fastlock __c_lock; /* Protect against concurrent access */ - _pthread_descr __c_waiting; /* Threads waiting on this condition */ -} pthread_cond_t; - - -/* Attribute for conditionally variables. */ -typedef struct -{ - int __dummy; -} pthread_condattr_t; - -/* Keys for thread-specific data */ -typedef unsigned int pthread_key_t; - - -/* Mutexes (not abstract because of PTHREAD_MUTEX_INITIALIZER). */ -/* (The layout is unnatural to maintain binary compatibility - with earlier releases of LinuxThreads.) */ -typedef struct -{ - int __m_reserved; /* Reserved for future use */ - int __m_count; /* Depth of recursive locking */ - _pthread_descr __m_owner; /* Owner thread (if recursive or errcheck) */ - int __m_kind; /* Mutex kind: fast, recursive or errcheck */ - struct _pthread_fastlock __m_lock; /* Underlying fast lock */ -} pthread_mutex_t; - - -/* Attribute for mutex. */ -typedef struct -{ - int __mutexkind; -} pthread_mutexattr_t; - - -/* Once-only execution */ -typedef int pthread_once_t; - - -#ifdef __USE_UNIX98 -/* Read-write locks. */ -typedef struct -{ - struct _pthread_fastlock __rw_lock; /* Lock to guarantee mutual exclusion */ - int __rw_readers; /* Number of readers */ - _pthread_descr __rw_writer; /* Identity of writer, or NULL if none */ - _pthread_descr __rw_read_waiting; /* Threads waiting for reading */ - _pthread_descr __rw_write_waiting; /* Threads waiting for writing */ - int __rw_kind; /* Reader/Writer preference selection */ - int __rw_pshared; /* Shared between processes or not */ -} pthread_rwlock_t; - - -/* Attribute for read-write locks. */ -typedef struct -{ - int __lockkind; - int __pshared; -} pthread_rwlockattr_t; -#endif - -#ifdef __USE_XOPEN2K -/* POSIX spinlock data type. */ -typedef volatile int pthread_spinlock_t; - -/* POSIX barrier. */ -typedef struct { - struct _pthread_fastlock __ba_lock; /* Lock to guarantee mutual exclusion */ - int __ba_required; /* Threads needed for completion */ - int __ba_present; /* Threads waiting */ - _pthread_descr __ba_waiting; /* Queue of waiting threads */ -} pthread_barrier_t; - -/* barrier attribute */ -typedef struct { - int __pshared; -} pthread_barrierattr_t; - -#endif - - -/* Thread identifiers */ -typedef unsigned long int pthread_t; - -#endif /* bits/pthreadtypes.h */ diff --git a/libc/sysdeps/linux/v850/bits/sched.h b/libc/sysdeps/linux/v850/bits/sched.h deleted file mode 100644 index 5c10d85d4..000000000 --- a/libc/sysdeps/linux/v850/bits/sched.h +++ /dev/null @@ -1,73 +0,0 @@ -/* Definitions of constants and data structure for POSIX 1003.1b-1993 - scheduling interface. - Copyright (C) 1996, 1997, 1998, 1999, 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. */ - -#ifndef __need_schedparam - -#ifndef _SCHED_H -# error "Never include <bits/sched.h> directly; use <sched.h> instead." -#endif - - -/* Scheduling algorithms. */ -#define SCHED_OTHER 0 -#define SCHED_FIFO 1 -#define SCHED_RR 2 - -#ifdef __USE_MISC -/* Cloning flags. */ -# define CSIGNAL 0x000000ff /* Signal mask to be sent at exit. */ -# define CLONE_VM 0x00000100 /* Set if VM shared between processes. */ -# define CLONE_FS 0x00000200 /* Set if fs info shared between processes. */ -# define CLONE_FILES 0x00000400 /* Set if open files shared between processes. */ -# define CLONE_SIGHAND 0x00000800 /* Set if signal handlers shared. */ -# define CLONE_PID 0x00001000 /* Set if pid shared. */ -# define CLONE_PTRACE 0x00002000 /* Set if tracing continues on the child. */ -# define CLONE_VFORK 0x00004000 /* Set if the parent wants the child to - wake it up on mm_release. */ -#endif - -/* The official definition. */ -struct sched_param - { - int __sched_priority; - }; - -__BEGIN_DECLS - -/* Clone current process. */ -#ifdef __USE_MISC -extern int clone (int (*__fn) (void *__arg), void *__child_stack, - int __flags, void *__arg) __THROW; -#endif - -__END_DECLS - -#endif /* need schedparam */ - -#if !defined __defined_schedparam \ - && (defined __need_schedparam || defined _SCHED_H) -# define __defined_schedparam 1 -/* Data structure to describe a process' schedulability. */ -struct __sched_param - { - int __sched_priority; - }; -# undef __need_schedparam -#endif diff --git a/libc/sysdeps/linux/v850/bits/select.h b/libc/sysdeps/linux/v850/bits/select.h deleted file mode 100644 index b6bb05452..000000000 --- a/libc/sysdeps/linux/v850/bits/select.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * include/bits/select.h -- fd_set operations - * - * Copyright (C) 2001 NEC Corporation - * Copyright (C) 2001 Miles Bader <miles@gnu.org> - * Copyright (C) 1997, 1998 Free Software Foundation, Inc. - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License. See the file COPYING.LIB in the main - * directory of this archive for more details. - */ - -#ifndef _SYS_SELECT_H -# error "Never use <bits/select.h> directly; include <sys/select.h> instead." -#endif - -#ifdef __GNUC__ - -/* We don't use `memset' because this would require a prototype and - the array isn't too big. */ -#define __FD_ZERO(s) \ - do { \ - unsigned int __i; \ - fd_set *__arr = (s); \ - for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) \ - __FDS_BITS (__arr)[__i] = 0; \ - } while (0) - -#define __FD_SET(fd, s) \ - do { \ - int __fd = (fd); \ - void *__addr = (void *)&__FDS_BITS (s); \ - __asm__ __volatile__ ("set1 %0, [%1]" \ - : /*nothing*/ \ - : "r" (__fd & 0x7), "r" (__addr + (__fd >> 3)));\ - } while (0) - -#define __FD_CLR(fd, s) \ - do { \ - int __fd = (fd); \ - void *__addr = (void *)&__FDS_BITS (s); \ - __asm__ __volatile__ ("clr1 %0, [%1]" \ - : /*nothing*/ \ - : "r" (__fd & 0x7), "r" (__addr + (__fd >> 3)));\ - } while (0) - -#define __FD_ISSET(fd, s) \ - ({ \ - int __fd = (fd); \ - void *__addr = (void *)&__FDS_BITS (s); \ - int res; \ - __asm__ ("tst1 %1, [%2]; setf nz, %0" \ - : "=r" (res) \ - : "r" (__fd & 0x7), "r" (__addr + (__fd >> 3))); \ - res; \ - }) - -#else /* !__GNUC__ */ - -#define __FD_SET(d, s) (__FDS_BITS (s)[__FDELT(d)] |= __FDMASK(d)) -#define __FD_CLR(d, s) (__FDS_BITS (s)[__FDELT(d)] &= ~__FDMASK(d)) -#define __FD_ISSET(d, s) ((__FDS_BITS (s)[__FDELT(d)] & __FDMASK(d)) != 0) - -#endif /* __GNUC__ */ diff --git a/libc/sysdeps/linux/v850/bits/sem.h b/libc/sysdeps/linux/v850/bits/sem.h deleted file mode 100644 index 6193501e2..000000000 --- a/libc/sysdeps/linux/v850/bits/sem.h +++ /dev/null @@ -1,87 +0,0 @@ -/* Copyright (C) 1995, 1996, 1997, 1998, 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 _SYS_SEM_H -# error "Never include <bits/sem.h> directly; use <sys/sem.h> instead." -#endif - -#include <sys/types.h> - -/* Flags for `semop'. */ -#define SEM_UNDO 0x1000 /* undo the operation on exit */ - -/* Commands for `semctl'. */ -#define GETPID 11 /* get sempid */ -#define GETVAL 12 /* get semval */ -#define GETALL 13 /* get all semval's */ -#define GETNCNT 14 /* get semncnt */ -#define GETZCNT 15 /* get semzcnt */ -#define SETVAL 16 /* set semval */ -#define SETALL 17 /* set all semval's */ - - -/* Data structure describing a set of semaphores. */ -struct semid_ds -{ - struct ipc_perm sem_perm; /* operation permission struct */ - __time_t sem_otime; /* last semop() time */ - unsigned long int __unused1; - __time_t sem_ctime; /* last time changed by semctl() */ - unsigned long int __unused2; - unsigned long int sem_nsems; /* number of semaphores in set */ - unsigned long int __unused3; - unsigned long int __unused4; -}; - -/* The user should define a union like the following to use it for arguments - for `semctl'. - - union semun - { - int val; <= value for SETVAL - struct semid_ds *buf; <= buffer for IPC_STAT & IPC_SET - unsigned short int *array; <= array for GETALL & SETALL - struct seminfo *__buf; <= buffer for IPC_INFO - }; - - Previous versions of this file used to define this union but this is - incorrect. One can test the macro _SEM_SEMUN_UNDEFINED to see whether - one must define the union or not. */ -#define _SEM_SEMUN_UNDEFINED 1 - -#ifdef __USE_MISC - -/* ipcs ctl cmds */ -# define SEM_STAT 18 -# define SEM_INFO 19 - -struct seminfo -{ - int semmap; - int semmni; - int semmns; - int semmnu; - int semmsl; - int semopm; - int semume; - int semusz; - int semvmx; - int semaem; -}; - -#endif /* __USE_MISC */ diff --git a/libc/sysdeps/linux/v850/bits/setjmp.h b/libc/sysdeps/linux/v850/bits/setjmp.h deleted file mode 100644 index 3e4214a27..000000000 --- a/libc/sysdeps/linux/v850/bits/setjmp.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * libc/sysdeps/linux/v850/bits/setjmp.h -- v850 version of `jmp_buf' type - * - * Copyright (C) 2001 NEC Corporation - * Copyright (C) 2001 Miles Bader <miles@gnu.org> - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License. See the file COPYING.LIB in the main - * directory of this archive for more details. - * - * Written by Miles Bader <miles@gnu.org> - */ - -#ifndef _SETJMP_H -# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead." -#endif - -#ifndef _ASM -typedef struct - { - /* Stack pointer. */ - void *__sp; - - /* Link pointer. */ - void *__lp; - - /* Callee-saved registers r2 and r20-r29. */ - int __regs[11]; - } __jmp_buf[1]; -#endif - -#define JB_SIZE (4 * 13) - -/* Test if longjmp to JMPBUF would unwind the frame - containing a local variable at ADDRESS. */ -#define _JMPBUF_UNWINDS(jmpbuf, address) \ - ((__ptr_t) (address) < &(jmpbuf)[0].__sp) diff --git a/libc/sysdeps/linux/v850/bits/shm.h b/libc/sysdeps/linux/v850/bits/shm.h deleted file mode 100644 index 18246c3bd..000000000 --- a/libc/sysdeps/linux/v850/bits/shm.h +++ /dev/null @@ -1,93 +0,0 @@ -/* Copyright (C) 1995, 1996, 1997, 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 _SYS_SHM_H -# error "Never include <bits/shm.h> directly; use <sys/shm.h> instead." -#endif - -#include <bits/types.h> - -/* Permission flag for shmget. */ -#define SHM_R 0400 /* or S_IRUGO from <linux/stat.h> */ -#define SHM_W 0200 /* or S_IWUGO from <linux/stat.h> */ - -/* Flags for `shmat'. */ -#define SHM_RDONLY 010000 /* attach read-only else read-write */ -#define SHM_RND 020000 /* round attach address to SHMLBA */ -#define SHM_REMAP 040000 /* take-over region on attach */ - -/* Commands for `shmctl'. */ -#define SHM_LOCK 11 /* lock segment (root only) */ -#define SHM_UNLOCK 12 /* unlock segment (root only) */ - - -/* Type to count number of attaches. */ -typedef unsigned long int shmatt_t; - -/* Data structure describing a set of semaphores. */ -struct shmid_ds - { - struct ipc_perm shm_perm; /* operation permission struct */ - size_t shm_segsz; /* size of segment in bytes */ - __time_t shm_atime; /* time of last shmat() */ - unsigned long int __unused1; - __time_t shm_dtime; /* time of last shmdt() */ - unsigned long int __unused2; - __time_t shm_ctime; /* time of last change by shmctl() */ - unsigned long int __unused3; - __pid_t shm_cpid; /* pid of creator */ - __pid_t shm_lpid; /* pid of last shmop */ - shmatt_t shm_nattch; /* number of current attaches */ - unsigned long int __unused4; - unsigned long int __unused5; - }; - -#ifdef __USE_MISC - -/* ipcs ctl commands */ -# define SHM_STAT 13 -# define SHM_INFO 14 - -/* shm_mode upper byte flags */ -# define SHM_DEST 01000 /* segment will be destroyed on last detach */ -# define SHM_LOCKED 02000 /* segment will not be swapped */ - -struct shminfo - { - unsigned long int shmmax; - unsigned long int shmmin; - unsigned long int shmmni; - unsigned long int shmseg; - unsigned long int shmall; - unsigned long int __unused1; - unsigned long int __unused2; - unsigned long int __unused3; - unsigned long int __unused4; - }; - -struct shm_info - { - int used_ids; - unsigned long int shm_tot; /* total allocated shm */ - unsigned long int shm_rss; /* total resident shm */ - unsigned long int shm_swp; /* total swapped shm */ - unsigned long int swap_attempts; - unsigned long int swap_successes; - }; - -#endif /* __USE_MISC */ diff --git a/libc/sysdeps/linux/v850/bits/sigaction.h b/libc/sysdeps/linux/v850/bits/sigaction.h deleted file mode 100644 index 48cc5312f..000000000 --- a/libc/sysdeps/linux/v850/bits/sigaction.h +++ /dev/null @@ -1,77 +0,0 @@ -/* The proper definitions for Linux's sigaction. - Copyright (C) 1993-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 _SIGNAL_H -# error "Never include <bits/sigaction.h> directly; use <signal.h> instead." -#endif - -/* Structure describing the action to be taken when a signal arrives. */ -struct sigaction - { - /* Signal handler. */ -#ifdef __USE_POSIX199309 - union - { - /* Used if SA_SIGINFO is not set. */ - __sighandler_t sa_handler; - /* Used if SA_SIGINFO is set. */ - void (*sa_sigaction) (int, siginfo_t *, void *); - } - __sigaction_handler; -# define sa_handler __sigaction_handler.sa_handler -# define sa_sigaction __sigaction_handler.sa_sigaction -#else - __sighandler_t sa_handler; -#endif - - /* Additional set of signals to be blocked. */ - __sigset_t sa_mask; - - /* Special flags. */ - int sa_flags; - - /* Restore handler. */ - void (*sa_restorer) (void); - }; - -/* Bits in `sa_flags'. */ -#define SA_NOCLDSTOP 1 /* Don't send SIGCHLD when children stop. */ -#define SA_NOCLDWAIT 2 /* Don't create zombie on child death. */ -#define SA_SIGINFO 4 /* Invoke signal-catching function with - three arguments instead of one. */ -#if defined __USE_UNIX98 || defined __USE_MISC -# define SA_ONSTACK 0x08000000 /* Use signal stack by using `sa_restorer'. */ -# define SA_RESTART 0x10000000 /* Restart syscall on signal return. */ -# define SA_NODEFER 0x40000000 /* Don't automatically block the signal when - its handler is being executed. */ -# define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler. */ -#endif -#ifdef __USE_MISC -# define SA_INTERRUPT 0x20000000 /* Historical no-op. */ - -/* Some aliases for the SA_ constants. */ -# define SA_NOMASK SA_NODEFER -# define SA_ONESHOT SA_RESETHAND -# define SA_STACK SA_ONSTACK -#endif - -/* Values for the HOW argument to `sigprocmask'. */ -#define SIG_BLOCK 0 /* Block signals. */ -#define SIG_UNBLOCK 1 /* Unblock signals. */ -#define SIG_SETMASK 2 /* Set the set of blocked signals. */ diff --git a/libc/sysdeps/linux/v850/bits/sigcontext.h b/libc/sysdeps/linux/v850/bits/sigcontext.h deleted file mode 100644 index 67dcf9498..000000000 --- a/libc/sysdeps/linux/v850/bits/sigcontext.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 1996, 1997, 1998 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. */ - -#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H -# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead." -#endif - -#ifndef sigcontext_struct -/* Kernel headers before 2.1.1 define a struct sigcontext_struct, but - we need sigcontext. */ -# define sigcontext_struct sigcontext - -# include <asm/sigcontext.h> -#endif diff --git a/libc/sysdeps/linux/v850/bits/siginfo.h b/libc/sysdeps/linux/v850/bits/siginfo.h deleted file mode 100644 index 70a8c217e..000000000 --- a/libc/sysdeps/linux/v850/bits/siginfo.h +++ /dev/null @@ -1,306 +0,0 @@ -/* siginfo_t, sigevent and constants. Linux/SPARC version. - Copyright (C) 1997, 1998, 1999, 2000, 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. */ - -#if !defined _SIGNAL_H && !defined __need_siginfo_t \ - && !defined __need_sigevent_t -# error "Never include this file directly. Use <signal.h> instead" -#endif - -#include <bits/wordsize.h> - -#if (!defined __have_sigval_t \ - && (defined _SIGNAL_H || defined __need_siginfo_t \ - || defined __need_sigevent_t)) -# define __have_sigval_t 1 - -/* Type for data associated with a signal. */ -typedef union sigval - { - int sival_int; - void *sival_ptr; - } sigval_t; -#endif - -#if (!defined __have_siginfo_t \ - && (defined _SIGNAL_H || defined __need_siginfo_t)) -# define __have_siginfo_t 1 - -# define __SI_MAX_SIZE 128 -# if __WORDSIZE == 64 -# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 4) -# else -# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3) -# endif - -typedef struct siginfo - { - int si_signo; /* Signal number. */ - int si_errno; /* If non-zero, an errno value associated with - this signal, as defined in <errno.h>. */ - int si_code; /* Signal code. */ - - union - { - int _pad[__SI_PAD_SIZE]; - - /* kill(). */ - struct - { - __pid_t si_pid; /* Sending process ID. */ - __uid_t si_uid; /* Real user ID of sending process. */ - } _kill; - - /* POSIX.1b timers. */ - struct - { - unsigned int _timer1; - unsigned int _timer2; - } _timer; - - /* POSIX.1b signals. */ - struct - { - __pid_t si_pid; /* Sending process ID. */ - __uid_t si_uid; /* Real user ID of sending process. */ - sigval_t si_sigval; /* Signal value. */ - } _rt; - - /* SIGCHLD. */ - struct - { - __pid_t si_pid; /* Which child. */ - __uid_t si_uid; /* Real user ID of sending process. */ - int si_status; /* Exit value or signal. */ - __clock_t si_utime; - __clock_t si_stime; - } _sigchld; - - /* SIGILL, SIGFPE, SIGSEGV, SIGBUS. */ - struct - { - void *si_addr; /* Faulting insn/memory ref. */ - } _sigfault; - - /* SIGPOLL. */ - struct - { - long int si_band; /* Band event for SIGPOLL. */ - int si_fd; - } _sigpoll; - } _sifields; - } siginfo_t; - - -/* X/Open requires some more fields with fixed names. */ -# define si_pid _sifields._kill.si_pid -# define si_uid _sifields._kill.si_uid -# define si_timer1 _sifields._timer._timer1 -# define si_timer2 _sifields._timer._timer2 -# define si_status _sifields._sigchld.si_status -# define si_utime _sifields._sigchld.si_utime -# define si_stime _sifields._sigchld.si_stime -# define si_value _sifields._rt.si_sigval -# define si_int _sifields._rt.si_sigval.sival_int -# define si_ptr _sifields._rt.si_sigval.sival_ptr -# define si_addr _sifields._sigfault.si_addr -# define si_band _sifields._sigpoll.si_band -# define si_fd _sifields._sigpoll.si_fd - - -/* Values for `si_code'. Positive values are reserved for kernel-generated - signals. */ -enum -{ - SI_ASYNCNL = -6, /* Sent by asynch name lookup completion. */ -# define SI_ASYNCNL SI_ASYNCNL - SI_SIGIO, /* Sent by queued SIGIO. */ -# define SI_SIGIO SI_SIGIO - SI_ASYNCIO, /* Sent by AIO completion. */ -# define SI_ASYNCIO SI_ASYNCIO - SI_MESGQ, /* Sent by real time mesq state change. */ -# define SI_MESGQ SI_MESGQ - SI_TIMER, /* Sent by timer expiration. */ -# define SI_TIMER SI_TIMER - SI_QUEUE, /* Sent by sigqueue. */ -# define SI_QUEUE SI_QUEUE - SI_USER, /* Sent by kill, sigsend, raise. */ -# define SI_USER SI_USER - SI_KERNEL = 0x80 /* Send by kernel. */ -#define SI_KERNEL SI_KERNEL -}; - - -/* `si_code' values for SIGILL signal. */ -enum -{ - ILL_ILLOPC = 1, /* Illegal opcode. */ -# define ILL_ILLOPC ILL_ILLOPC - ILL_ILLOPN, /* Illegal operand. */ -# define ILL_ILLOPN ILL_ILLOPN - ILL_ILLADR, /* Illegal addressing mode. */ -# define ILL_ILLADR ILL_ILLADR - ILL_ILLTRP, /* Illegal trap. */ -# define ILL_ILLTRP ILL_ILLTRP - ILL_PRVOPC, /* Privileged opcode. */ -# define ILL_PRVOPC ILL_PRVOPC - ILL_PRVREG, /* Privileged register. */ -# define ILL_PRVREG ILL_PRVREG - ILL_COPROC, /* Coprocessor error. */ -# define ILL_COPROC ILL_COPROC - ILL_BADSTK /* Internal stack error. */ -# define ILL_BADSTK ILL_BADSTK -}; - -/* `si_code' values for SIGFPE signal. */ -enum -{ - FPE_INTDIV = 1, /* Integer divide by zero. */ -# define FPE_INTDIV FPE_INTDIV - FPE_INTOVF, /* Integer overflow. */ -# define FPE_INTOVF FPE_INTOVF - FPE_FLTDIV, /* Floating point divide by zero. */ -# define FPE_FLTDIV FPE_FLTDIV - FPE_FLTOVF, /* Floating point overflow. */ -# define FPE_FLTOVF FPE_FLTOVF - FPE_FLTUND, /* Floating point underflow. */ -# define FPE_FLTUND FPE_FLTUND - FPE_FLTRES, /* Floating point inexact result. */ -# define FPE_FLTRES FPE_FLTRES - FPE_FLTINV, /* Floating point invalid operation. */ -# define FPE_FLTINV FPE_FLTINV - FPE_FLTSUB /* Subscript out of range. */ -# define FPE_FLTSUB FPE_FLTSUB -}; - -/* `si_code' values for SIGSEGV signal. */ -enum -{ - SEGV_MAPERR = 1, /* Address not mapped to object. */ -# define SEGV_MAPERR SEGV_MAPERR - SEGV_ACCERR /* Invalid permissions for mapped object. */ -# define SEGV_ACCERR SEGV_ACCERR -}; - -/* `si_code' values for SIGBUS signal. */ -enum -{ - BUS_ADRALN = 1, /* Invalid address alignment. */ -# define BUS_ADRALN BUS_ADRALN - BUS_ADRERR, /* Non-existant physical address. */ -# define BUS_ADRERR BUS_ADRERR - BUS_OBJERR /* Object specific hardware error. */ -# define BUS_OBJERR BUS_OBJERR -}; - -/* `si_code' values for SIGTRAP signal. */ -enum -{ - TRAP_BRKPT = 1, /* Process breakpoint. */ -# define TRAP_BRKPT TRAP_BRKPT - TRAP_TRACE /* Process trace trap. */ -# define TRAP_TRACE TRAP_TRACE -}; - -/* `si_code' values for SIGCHLD signal. */ -enum -{ - CLD_EXITED = 1, /* Child has exited. */ -# define CLD_EXITED CLD_EXITED - CLD_KILLED, /* Child was killed. */ -# define CLD_KILLED CLD_KILLED - CLD_DUMPED, /* Child terminated abnormally. */ -# define CLD_DUMPED CLD_DUMPED - CLD_TRAPPED, /* Traced child has trapped. */ -# define CLD_TRAPPED CLD_TRAPPED - CLD_STOPPED, /* Child has stopped. */ -# define CLD_STOPPED CLD_STOPPED - CLD_CONTINUED /* Stopped child has continued. */ -# define CLD_CONTINUED CLD_CONTINUED -}; - -/* `si_code' values for SIGPOLL signal. */ -enum -{ - POLL_IN = 1, /* Data input available. */ -# define POLL_IN POLL_IN - POLL_OUT, /* Output buffers available. */ -# define POLL_OUT POLL_OUT - POLL_MSG, /* Input message available. */ -# define POLL_MSG POLL_MSG - POLL_ERR, /* I/O error. */ -# define POLL_ERR POLL_ERR - POLL_PRI, /* High priority input available. */ -# define POLL_PRI POLL_PRI - POLL_HUP /* Device disconnected. */ -# define POLL_HUP POLL_HUP -}; - -# undef __need_siginfo_t -#endif /* !have siginfo_t && (have _SIGNAL_H || need siginfo_t). */ - - -#if (defined _SIGNAL_H || defined __need_sigevent_t) \ - && !defined __have_sigevent_t -# define __have_sigevent_t 1 - -/* Structure to transport application-defined values with signals. */ -# define __SIGEV_MAX_SIZE 64 -# if __WORDSIZE == 64 -# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4) -# else -# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3) -# endif - -/* Forward declaration of the `pthread_attr_t' type. */ -struct __pthread_attr_s; - -typedef struct sigevent - { - sigval_t sigev_value; - int sigev_signo; - int sigev_notify; - - union - { - int _pad[__SIGEV_PAD_SIZE]; - - struct - { - void (*_function) (sigval_t); /* Function to start. */ - struct __pthread_attr_s *_attribute; /* Really pthread_attr_t. */ - } _sigev_thread; - } _sigev_un; - } sigevent_t; - -/* POSIX names to access some of the members. */ -# define sigev_notify_function _sigev_un._sigev_thread._function -# define sigev_notify_attributes _sigev_un._sigev_thread._attribute - -/* `sigev_notify' values. */ -enum -{ - SIGEV_SIGNAL = 0, /* Notify via signal. */ -# define SIGEV_SIGNAL SIGEV_SIGNAL - SIGEV_NONE, /* Other notification: meaningless. */ -# define SIGEV_NONE SIGEV_NONE - SIGEV_THREAD /* Deliver via thread creation. */ -# define SIGEV_THREAD SIGEV_THREAD -}; - -#endif /* have _SIGNAL_H. */ diff --git a/libc/sysdeps/linux/v850/bits/signum.h b/libc/sysdeps/linux/v850/bits/signum.h deleted file mode 100644 index 74259b492..000000000 --- a/libc/sysdeps/linux/v850/bits/signum.h +++ /dev/null @@ -1,80 +0,0 @@ -/* Signal number definitions. Linux version. - Copyright (C) 1995, 1996, 1997, 1998, 1999 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. */ - -#ifdef _SIGNAL_H - -/* Fake signal functions. */ -#define SIG_ERR ((__sighandler_t) -1) /* Error return. */ -#define SIG_DFL ((__sighandler_t) 0) /* Default action. */ -#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */ - -#ifdef __USE_UNIX98 -# define SIG_HOLD ((__sighandler_t) 2) /* Add signal to hold mask. */ -#endif - - -/* Signals. */ -#define SIGHUP 1 /* Hangup (POSIX). */ -#define SIGINT 2 /* Interrupt (ANSI). */ -#define SIGQUIT 3 /* Quit (POSIX). */ -#define SIGILL 4 /* Illegal instruction (ANSI). */ -#define SIGTRAP 5 /* Trace trap (POSIX). */ -#define SIGABRT 6 /* Abort (ANSI). */ -#define SIGIOT 6 /* IOT trap (4.2 BSD). */ -#define SIGBUS 7 /* BUS error (4.2 BSD). */ -#define SIGFPE 8 /* Floating-point exception (ANSI). */ -#define SIGKILL 9 /* Kill, unblockable (POSIX). */ -#define SIGUSR1 10 /* User-defined signal 1 (POSIX). */ -#define SIGSEGV 11 /* Segmentation violation (ANSI). */ -#define SIGUSR2 12 /* User-defined signal 2 (POSIX). */ -#define SIGPIPE 13 /* Broken pipe (POSIX). */ -#define SIGALRM 14 /* Alarm clock (POSIX). */ -#define SIGTERM 15 /* Termination (ANSI). */ -#define SIGSTKFLT 16 /* Stack fault. */ -#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */ -#define SIGCHLD 17 /* Child status has changed (POSIX). */ -#define SIGCONT 18 /* Continue (POSIX). */ -#define SIGSTOP 19 /* Stop, unblockable (POSIX). */ -#define SIGTSTP 20 /* Keyboard stop (POSIX). */ -#define SIGTTIN 21 /* Background read from tty (POSIX). */ -#define SIGTTOU 22 /* Background write to tty (POSIX). */ -#define SIGURG 23 /* Urgent condition on socket (4.2 BSD). */ -#define SIGXCPU 24 /* CPU limit exceeded (4.2 BSD). */ -#define SIGXFSZ 25 /* File size limit exceeded (4.2 BSD). */ -#define SIGVTALRM 26 /* Virtual alarm clock (4.2 BSD). */ -#define SIGPROF 27 /* Profiling alarm clock (4.2 BSD). */ -#define SIGWINCH 28 /* Window size change (4.3 BSD, Sun). */ -#define SIGPOLL SIGIO /* Pollable event occurred (System V). */ -#define SIGIO 29 /* I/O now possible (4.2 BSD). */ -#define SIGPWR 30 /* Power failure restart (System V). */ -#define SIGSYS 31 /* Bad system call. */ -#define SIGUNUSED 31 - -#define _NSIG 64 /* Biggest signal number + 1 - (including real-time signals). */ - -#define SIGRTMIN (__libc_current_sigrtmin ()) -#define SIGRTMAX (__libc_current_sigrtmax ()) - -/* These are the hard limits of the kernel. These values should not be - used directly at user level. */ -#define __SIGRTMIN 32 -#define __SIGRTMAX (_NSIG - 1) - -#endif /* <signal.h> included. */ diff --git a/libc/sysdeps/linux/v850/bits/sigset.h b/libc/sysdeps/linux/v850/bits/sigset.h deleted file mode 100644 index c559b1a85..000000000 --- a/libc/sysdeps/linux/v850/bits/sigset.h +++ /dev/null @@ -1,124 +0,0 @@ -/* __sig_atomic_t, __sigset_t, and related definitions. Linux version. - Copyright (C) 1991, 1992, 1994, 1996, 1997, 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. */ - -#ifndef _SIGSET_H_types -# define _SIGSET_H_types 1 - -typedef int __sig_atomic_t; - -/* A `sigset_t' has a bit for each signal. */ - -# define _SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int))) -typedef struct - { - unsigned long int __val[_SIGSET_NWORDS]; - } __sigset_t; - -#endif - - -/* We only want to define these functions if <signal.h> was actually - included; otherwise we were included just to define the types. Since we - are namespace-clean, it wouldn't hurt to define extra macros. But - trouble can be caused by functions being defined (e.g., any global - register vars declared later will cause compilation errors). */ - -#if !defined _SIGSET_H_fns && defined _SIGNAL_H -# define _SIGSET_H_fns 1 - -# ifndef _EXTERN_INLINE -# define _EXTERN_INLINE extern __inline -# endif - -/* Return a mask that includes the bit for SIG only. */ -# define __sigmask(sig) \ - (((unsigned long int) 1) << (((sig) - 1) % (8 * sizeof (unsigned long int)))) - -/* Return the word index for SIG. */ -# define __sigword(sig) (((sig) - 1) / (8 * sizeof (unsigned long int))) - -# if defined __GNUC__ && __GNUC__ >= 2 -# define __sigemptyset(set) \ - (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ - sigset_t *__set = (set); \ - while (--__cnt >= 0) __set->__val[__cnt] = 0; \ - 0; })) -# define __sigfillset(set) \ - (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ - sigset_t *__set = (set); \ - while (--__cnt >= 0) __set->__val[__cnt] = ~0UL; \ - 0; })) - -# ifdef __USE_GNU -/* The POSIX does not specify for handling the whole signal set in one - command. This is often wanted and so we define three more functions - here. */ -# define __sigisemptyset(set) \ - (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ - const sigset_t *__set = (set); \ - int __ret = __set->__val[--__cnt]; \ - while (!__ret && --__cnt >= 0) \ - __ret = __set->__val[__cnt]; \ - __ret == 0; })) -# define __sigandset(dest, left, right) \ - (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ - sigset_t *__dest = (dest); \ - const sigset_t *__left = (left); \ - const sigset_t *__right = (right); \ - while (--__cnt >= 0) \ - __dest->__val[__cnt] = (__left->__val[__cnt] \ - & __right->__val[__cnt]); \ - 0; })) -# define __sigorset(dest, left, right) \ - (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ - sigset_t *__dest = (dest); \ - const sigset_t *__left = (left); \ - const sigset_t *__right = (right); \ - while (--__cnt >= 0) \ - __dest->__val[__cnt] = (__left->__val[__cnt] \ - | __right->__val[__cnt]); \ - 0; })) -# endif -# endif - -/* These functions needn't check for a bogus signal number -- error - checking is done in the non __ versions. */ - -extern int __sigismember (__const __sigset_t *, int); -extern int __sigaddset (__sigset_t *, int); -extern int __sigdelset (__sigset_t *, int); - -# ifdef __USE_EXTERN_INLINES -# define __SIGSETFN(NAME, BODY, CONST) \ - _EXTERN_INLINE int \ - NAME (CONST __sigset_t *__set, int __sig) \ - { \ - unsigned long int __mask = __sigmask (__sig); \ - unsigned long int __word = __sigword (__sig); \ - return BODY; \ - } - -__SIGSETFN (__sigismember, (__set->__val[__word] & __mask) ? 1 : 0, __const) -__SIGSETFN (__sigaddset, ((__set->__val[__word] |= __mask), 0), ) -__SIGSETFN (__sigdelset, ((__set->__val[__word] &= ~__mask), 0), ) - -# undef __SIGSETFN -# endif - -#endif /* ! _SIGSET_H_fns. */ diff --git a/libc/sysdeps/linux/v850/bits/sigstack.h b/libc/sysdeps/linux/v850/bits/sigstack.h deleted file mode 100644 index 7f260367b..000000000 --- a/libc/sysdeps/linux/v850/bits/sigstack.h +++ /dev/null @@ -1,55 +0,0 @@ -/* sigstack, sigaltstack definitions. - Copyright (C) 1998, 1999 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 _SIGNAL_H -# error "Never include this file directly. Use <signal.h> instead" -#endif - - -/* Structure describing a signal stack (obsolete). */ -struct sigstack - { - void *ss_sp; /* Signal stack pointer. */ - int ss_onstack; /* Nonzero if executing on this stack. */ - }; - - -/* Possible values for `ss_flags.'. */ -enum -{ - SS_ONSTACK = 1, -#define SS_ONSTACK SS_ONSTACK - SS_DISABLE -#define SS_DISABLE SS_DISABLE -}; - -/* Minimum stack size for a signal handler. */ -#define MINSIGSTKSZ 2048 - -/* System default stack size. */ -#define SIGSTKSZ 8192 - - -/* Alternate, preferred interface. */ -typedef struct sigaltstack - { - void *ss_sp; - int ss_flags; - size_t ss_size; - } stack_t; diff --git a/libc/sysdeps/linux/v850/bits/sigthread.h b/libc/sysdeps/linux/v850/bits/sigthread.h deleted file mode 100644 index b86e75f20..000000000 --- a/libc/sysdeps/linux/v850/bits/sigthread.h +++ /dev/null @@ -1,38 +0,0 @@ -/* Signal handling function for threaded programs. - Copyright (C) 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 Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef _BITS_SIGTHREAD_H -#define _BITS_SIGTHREAD_H 1 - -#if !defined _SIGNAL_H && !defined _PTHREAD_H -# error "Never include this file directly. Use <pthread.h> instead" -#endif - -/* Functions for handling signals. */ - -/* Modify the signal mask for the calling thread. The arguments have - the same meaning as for sigprocmask(2). */ -extern int pthread_sigmask (int __how, - __const __sigset_t *__restrict __newmask, - __sigset_t *__restrict __oldmask)__THROW; - -/* Send signal SIGNO to the given thread. */ -extern int pthread_kill (pthread_t __thread, int __signo) __THROW; - -#endif /* bits/sigthread.h */ diff --git a/libc/sysdeps/linux/v850/bits/sockaddr.h b/libc/sysdeps/linux/v850/bits/sockaddr.h deleted file mode 100644 index 3e1d1312d..000000000 --- a/libc/sysdeps/linux/v850/bits/sockaddr.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Definition of `struct sockaddr_*' common members. Generic/4.2 BSD version. - Copyright (C) 1995,1996,1997,1998,2000,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. */ - -/* - * Never include this file directly; use <sys/socket.h> instead. - */ - -#ifndef _BITS_SOCKADDR_H -#define _BITS_SOCKADDR_H 1 - - -/* POSIX.1g specifies this type name for the `sa_family' member. */ -typedef unsigned short int sa_family_t; - -/* This macro is used to declare the initial common members - of the data types used for socket addresses, `struct sockaddr', - `struct sockaddr_in', `struct sockaddr_un', etc. */ - -#define __SOCKADDR_COMMON(sa_prefix) \ - sa_family_t sa_prefix##family - -#define __SOCKADDR_COMMON_SIZE (sizeof (unsigned short int)) - -#endif /* bits/sockaddr.h */ diff --git a/libc/sysdeps/linux/v850/bits/socket.h b/libc/sysdeps/linux/v850/bits/socket.h deleted file mode 100644 index f869b3c94..000000000 --- a/libc/sysdeps/linux/v850/bits/socket.h +++ /dev/null @@ -1,315 +0,0 @@ -/* System-specific socket constants and types. Linux version. - Copyright (C) 1991,1992,1994-1999,2000,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. */ - -#ifndef __BITS_SOCKET_H -#define __BITS_SOCKET_H - -#if !defined _SYS_SOCKET_H && !defined _NETINET_IN_H -# error "Never include <bits/socket.h> directly; use <sys/socket.h> instead." -#endif - -#define __need_size_t -#define __need_NULL -#include <stddef.h> - -#include <limits.h> -#include <sys/types.h> - -/* Type for length arguments in socket calls. */ -#ifndef __socklen_t_defined -typedef __socklen_t socklen_t; -# define __socklen_t_defined -#endif - -/* Types of sockets. */ -enum __socket_type -{ - SOCK_STREAM = 1, /* Sequenced, reliable, connection-based - byte streams. */ -#define SOCK_STREAM SOCK_STREAM - SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams - of fixed maximum length. */ -#define SOCK_DGRAM SOCK_DGRAM - SOCK_RAW = 3, /* Raw protocol interface. */ -#define SOCK_RAW SOCK_RAW - SOCK_RDM = 4, /* Reliably-delivered messages. */ -#define SOCK_RDM SOCK_RDM - SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, - datagrams of fixed maximum length. */ -#define SOCK_SEQPACKET SOCK_SEQPACKET - SOCK_PACKET = 10 /* Linux specific way of getting packets - at the dev level. For writing rarp and - other similar things on the user level. */ -#define SOCK_PACKET SOCK_PACKET -}; - -/* Protocol families. */ -#define PF_UNSPEC 0 /* Unspecified. */ -#define PF_LOCAL 1 /* Local to host (pipes and file-domain). */ -#define PF_UNIX PF_LOCAL /* Old BSD name for PF_LOCAL. */ -#define PF_FILE PF_LOCAL /* Another non-standard name for PF_LOCAL. */ -#define PF_INET 2 /* IP protocol family. */ -#define PF_AX25 3 /* Amateur Radio AX.25. */ -#define PF_IPX 4 /* Novell Internet Protocol. */ -#define PF_APPLETALK 5 /* Appletalk DDP. */ -#define PF_NETROM 6 /* Amateur radio NetROM. */ -#define PF_BRIDGE 7 /* Multiprotocol bridge. */ -#define PF_ATMPVC 8 /* ATM PVCs. */ -#define PF_X25 9 /* Reserved for X.25 project. */ -#define PF_INET6 10 /* IP version 6. */ -#define PF_ROSE 11 /* Amateur Radio X.25 PLP. */ -#define PF_DECnet 12 /* Reserved for DECnet project. */ -#define PF_NETBEUI 13 /* Reserved for 802.2LLC project. */ -#define PF_SECURITY 14 /* Security callback pseudo AF. */ -#define PF_KEY 15 /* PF_KEY key management API. */ -#define PF_NETLINK 16 -#define PF_ROUTE PF_NETLINK /* Alias to emulate 4.4BSD. */ -#define PF_PACKET 17 /* Packet family. */ -#define PF_ASH 18 /* Ash. */ -#define PF_ECONET 19 /* Acorn Econet. */ -#define PF_ATMSVC 20 /* ATM SVCs. */ -#define PF_SNA 22 /* Linux SNA Project */ -#define PF_IRDA 23 /* IRDA sockets. */ -#define PF_PPPOX 24 /* PPPoX sockets. */ -#define PF_WANPIPE 25 /* Wanpipe API sockets. */ -#define PF_BLUETOOTH 31 /* Bluetooth sockets. */ -#define PF_MAX 32 /* For now.. */ - -/* Address families. */ -#define AF_UNSPEC PF_UNSPEC -#define AF_LOCAL PF_LOCAL -#define AF_UNIX PF_UNIX -#define AF_FILE PF_FILE -#define AF_INET PF_INET -#define AF_AX25 PF_AX25 -#define AF_IPX PF_IPX -#define AF_APPLETALK PF_APPLETALK -#define AF_NETROM PF_NETROM -#define AF_BRIDGE PF_BRIDGE -#define AF_ATMPVC PF_ATMPVC -#define AF_X25 PF_X25 -#define AF_INET6 PF_INET6 -#define AF_ROSE PF_ROSE -#define AF_DECnet PF_DECnet -#define AF_NETBEUI PF_NETBEUI -#define AF_SECURITY PF_SECURITY -#define AF_KEY PF_KEY -#define AF_NETLINK PF_NETLINK -#define AF_ROUTE PF_ROUTE -#define AF_PACKET PF_PACKET -#define AF_ASH PF_ASH -#define AF_ECONET PF_ECONET -#define AF_ATMSVC PF_ATMSVC -#define AF_SNA PF_SNA -#define AF_IRDA PF_IRDA -#define AF_PPPOX PF_PPPOX -#define AF_WANPIPE PF_WANPIPE -#define AF_BLUETOOTH PF_BLUETOOTH -#define AF_MAX PF_MAX - -/* Socket level values. Others are defined in the appropriate headers. - - XXX These definitions also should go into the appropriate headers as - far as they are available. */ -#define SOL_RAW 255 -#define SOL_DECNET 261 -#define SOL_X25 262 -#define SOL_PACKET 263 -#define SOL_ATM 264 /* ATM layer (cell level). */ -#define SOL_AAL 265 /* ATM Adaption Layer (packet level). */ -#define SOL_IRDA 266 - -/* Maximum queue length specifiable by listen. */ -#define SOMAXCONN 128 - -/* Get the definition of the macro to define the common sockaddr members. */ -#include <bits/sockaddr.h> - -/* Structure describing a generic socket address. */ -struct sockaddr - { - __SOCKADDR_COMMON (sa_); /* Common data: address family and length. */ - char sa_data[14]; /* Address data. */ - }; - - -/* Structure large enough to hold any socket address (with the historical - exception of AF_UNIX). We reserve 128 bytes. */ -#if ULONG_MAX > 0xffffffff -# define __ss_aligntype __uint64_t -#else -# define __ss_aligntype __uint32_t -#endif -#define _SS_SIZE 128 -#define _SS_PADSIZE (_SS_SIZE - (2 * sizeof (__ss_aligntype))) - -struct sockaddr_storage - { - __SOCKADDR_COMMON (ss_); /* Address family, etc. */ - __ss_aligntype __ss_align; /* Force desired alignment. */ - char __ss_padding[_SS_PADSIZE]; - }; - - -/* Bits in the FLAGS argument to `send', `recv', et al. */ -enum - { - MSG_OOB = 0x01, /* Process out-of-band data. */ -#define MSG_OOB MSG_OOB - MSG_PEEK = 0x02, /* Peek at incoming messages. */ -#define MSG_PEEK MSG_PEEK - MSG_DONTROUTE = 0x04, /* Don't use local routing. */ -#define MSG_DONTROUTE MSG_DONTROUTE -#ifdef __USE_GNU - /* DECnet uses a different name. */ - MSG_TRYHARD = MSG_DONTROUTE, -# define MSG_TRYHARD MSG_DONTROUTE -#endif - MSG_CTRUNC = 0x08, /* Control data lost before delivery. */ -#define MSG_CTRUNC MSG_CTRUNC - MSG_PROXY = 0x10, /* Supply or ask second address. */ -#define MSG_PROXY MSG_PROXY - MSG_TRUNC = 0x20, -#define MSG_TRUNC MSG_TRUNC - MSG_DONTWAIT = 0x40, /* Nonblocking IO. */ -#define MSG_DONTWAIT MSG_DONTWAIT - MSG_EOR = 0x80, /* End of record. */ -#define MSG_EOR MSG_EOR - MSG_WAITALL = 0x100, /* Wait for a full request. */ -#define MSG_WAITALL MSG_WAITALL - MSG_FIN = 0x200, -#define MSG_FIN MSG_FIN - MSG_SYN = 0x400, -#define MSG_SYN MSG_SYN - MSG_CONFIRM = 0x800, /* Confirm path validity. */ -#define MSG_CONFIRM MSG_CONFIRM - MSG_RST = 0x1000, -#define MSG_RST MSG_RST - MSG_ERRQUEUE = 0x2000, /* Fetch message from error queue. */ -#define MSG_ERRQUEUE MSG_ERRQUEUE - MSG_NOSIGNAL = 0x4000, /* Do not generate SIGPIPE. */ -#define MSG_NOSIGNAL MSG_NOSIGNAL - MSG_MORE = 0x8000 /* Sender will send more. */ -#define MSG_MORE MSG_MORE - }; - - -/* Structure describing messages sent by - `sendmsg' and received by `recvmsg'. */ -struct msghdr - { - void *msg_name; /* Address to send to/receive from. */ - socklen_t msg_namelen; /* Length of address data. */ - - struct iovec *msg_iov; /* Vector of data to send/receive into. */ - int msg_iovlen; /* Number of elements in the vector. */ - - void *msg_control; /* Ancillary data (eg BSD filedesc passing). */ - socklen_t msg_controllen; /* Ancillary data buffer length. */ - - int msg_flags; /* Flags on received message. */ - }; - -/* Structure used for storage of ancillary data object information. */ -struct cmsghdr - { - size_t cmsg_len; /* Length of data in cmsg_data plus length - of cmsghdr structure. */ - int cmsg_level; /* Originating protocol. */ - int cmsg_type; /* Protocol specific type. */ -#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L - __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */ -#endif - }; - -/* Ancillary data object manipulation macros. */ -#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L -# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data) -#else -# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1)) -#endif -#define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg) -#define CMSG_FIRSTHDR(mhdr) \ - ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \ - ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL) -#define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \ - & (size_t) ~(sizeof (size_t) - 1)) -#define CMSG_SPACE(len) (CMSG_ALIGN (len) \ - + CMSG_ALIGN (sizeof (struct cmsghdr))) -#define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len)) - -extern struct cmsghdr *__cmsg_nxthdr __P ((struct msghdr *__mhdr, - struct cmsghdr *__cmsg)) __THROW; -#ifdef __USE_EXTERN_INLINES -# ifndef _EXTERN_INLINE -# define _EXTERN_INLINE extern __inline -# endif -_EXTERN_INLINE struct cmsghdr * -__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW -{ - if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr)) - /* The kernel header does this so there may be a reason. */ - return 0; - - __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg - + CMSG_ALIGN (__cmsg->cmsg_len)); - if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control - + __mhdr->msg_controllen) - || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len) - > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen))) - /* No more entries. */ - return 0; - return __cmsg; -} -#endif /* Use `extern inline'. */ - -/* Socket level message types. This must match the definitions in - <linux/socket.h>. */ -enum - { - SCM_RIGHTS = 0x01, /* Transfer file descriptors. */ -#define SCM_RIGHTS SCM_RIGHTS -#ifdef __USE_BSD - SCM_CREDENTIALS = 0x02, /* Credentials passing. */ -# define SCM_CREDENTIALS SCM_CREDENTIALS -#endif - __SCM_CONNECT = 0x03 /* Data array is `struct scm_connect'. */ - }; - -/* User visible structure for SCM_CREDENTIALS message */ - -struct ucred -{ - pid_t pid; /* PID of sending process. */ - uid_t uid; /* UID of sending process. */ - gid_t gid; /* GID of sending process. */ -}; - -/* Get socket manipulation related informations from kernel headers. */ -#include <asm/socket.h> - - -/* Structure used to manipulate the SO_LINGER option. */ -struct linger - { - int l_onoff; /* Nonzero to linger on close. */ - int l_linger; /* Time to linger. */ - }; - -#endif /* bits/socket.h */ diff --git a/libc/sysdeps/linux/v850/bits/stab.def b/libc/sysdeps/linux/v850/bits/stab.def deleted file mode 100644 index 3d54774cf..000000000 --- a/libc/sysdeps/linux/v850/bits/stab.def +++ /dev/null @@ -1,234 +0,0 @@ -/* Table of DBX symbol codes for the GNU system. - Copyright (C) 1988, 1997 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. */ - -/* This contains contribution from Cygnus Support. */ - -/* Global variable. Only the name is significant. - To find the address, look in the corresponding external symbol. */ -__define_stab (N_GSYM, 0x20, "GSYM") - -/* Function name for BSD Fortran. Only the name is significant. - To find the address, look in the corresponding external symbol. */ -__define_stab (N_FNAME, 0x22, "FNAME") - -/* Function name or text-segment variable for C. Value is its address. - Desc is supposedly starting line number, but GCC doesn't set it - and DBX seems not to miss it. */ -__define_stab (N_FUN, 0x24, "FUN") - -/* Data-segment variable with internal linkage. Value is its address. - "Static Sym". */ -__define_stab (N_STSYM, 0x26, "STSYM") - -/* BSS-segment variable with internal linkage. Value is its address. */ -__define_stab (N_LCSYM, 0x28, "LCSYM") - -/* Name of main routine. Only the name is significant. - This is not used in C. */ -__define_stab (N_MAIN, 0x2a, "MAIN") - -/* Global symbol in Pascal. - Supposedly the value is its line number; I'm skeptical. */ -__define_stab (N_PC, 0x30, "PC") - -/* Number of symbols: 0, files,,funcs,lines according to Ultrix V4.0. */ -__define_stab (N_NSYMS, 0x32, "NSYMS") - -/* "No DST map for sym: name, ,0,type,ignored" according to Ultrix V4.0. */ -__define_stab (N_NOMAP, 0x34, "NOMAP") - -/* New stab from Solaris. I don't know what it means, but it - don't seem to contain useful information. */ -__define_stab (N_OBJ, 0x38, "OBJ") - -/* New stab from Solaris. I don't know what it means, but it - don't seem to contain useful information. Possibly related to the - optimization flags used in this module. */ -__define_stab (N_OPT, 0x3c, "OPT") - -/* Register variable. Value is number of register. */ -__define_stab (N_RSYM, 0x40, "RSYM") - -/* Modula-2 compilation unit. Can someone say what info it contains? */ -__define_stab (N_M2C, 0x42, "M2C") - -/* Line number in text segment. Desc is the line number; - value is corresponding address. */ -__define_stab (N_SLINE, 0x44, "SLINE") - -/* Similar, for data segment. */ -__define_stab (N_DSLINE, 0x46, "DSLINE") - -/* Similar, for bss segment. */ -__define_stab (N_BSLINE, 0x48, "BSLINE") - -/* Sun's source-code browser stabs. ?? Don't know what the fields are. - Supposedly the field is "path to associated .cb file". THIS VALUE - OVERLAPS WITH N_BSLINE! */ -__define_stab (N_BROWS, 0x48, "BROWS") - -/* GNU Modula-2 definition module dependency. Value is the modification time - of the definition file. Other is non-zero if it is imported with the - GNU M2 keyword %INITIALIZE. Perhaps N_M2C can be used if there - are enough empty fields? */ -__define_stab(N_DEFD, 0x4a, "DEFD") - -/* THE FOLLOWING TWO STAB VALUES CONFLICT. Happily, one is for Modula-2 - and one is for C++. Still,... */ -/* GNU C++ exception variable. Name is variable name. */ -__define_stab (N_EHDECL, 0x50, "EHDECL") -/* Modula2 info "for imc": name,,0,0,0 according to Ultrix V4.0. */ -__define_stab (N_MOD2, 0x50, "MOD2") - -/* GNU C++ `catch' clause. Value is its address. Desc is nonzero if - this entry is immediately followed by a CAUGHT stab saying what exception - was caught. Multiple CAUGHT stabs means that multiple exceptions - can be caught here. If Desc is 0, it means all exceptions are caught - here. */ -__define_stab (N_CATCH, 0x54, "CATCH") - -/* Structure or union element. Value is offset in the structure. */ -__define_stab (N_SSYM, 0x60, "SSYM") - -/* Name of main source file. - Value is starting text address of the compilation. */ -__define_stab (N_SO, 0x64, "SO") - -/* Automatic variable in the stack. Value is offset from frame pointer. - Also used for type descriptions. */ -__define_stab (N_LSYM, 0x80, "LSYM") - -/* Beginning of an include file. Only Sun uses this. - In an object file, only the name is significant. - The Sun linker puts data into some of the other fields. */ -__define_stab (N_BINCL, 0x82, "BINCL") - -/* Name of sub-source file (#include file). - Value is starting text address of the compilation. */ -__define_stab (N_SOL, 0x84, "SOL") - -/* Parameter variable. Value is offset from argument pointer. - (On most machines the argument pointer is the same as the frame pointer. */ -__define_stab (N_PSYM, 0xa0, "PSYM") - -/* End of an include file. No name. - This and N_BINCL act as brackets around the file's output. - In an object file, there is no significant data in this entry. - The Sun linker puts data into some of the fields. */ -__define_stab (N_EINCL, 0xa2, "EINCL") - -/* Alternate entry point. Value is its address. */ -__define_stab (N_ENTRY, 0xa4, "ENTRY") - -/* Beginning of lexical block. - The desc is the nesting level in lexical blocks. - The value is the address of the start of the text for the block. - The variables declared inside the block *precede* the N_LBRAC symbol. */ -__define_stab (N_LBRAC, 0xc0, "LBRAC") - -/* Place holder for deleted include file. Replaces a N_BINCL and everything - up to the corresponding N_EINCL. The Sun linker generates these when - it finds multiple identical copies of the symbols from an include file. - This appears only in output from the Sun linker. */ -__define_stab (N_EXCL, 0xc2, "EXCL") - -/* Modula-2 scope information. Can someone say what info it contains? */ -__define_stab (N_SCOPE, 0xc4, "SCOPE") - -/* End of a lexical block. Desc matches the N_LBRAC's desc. - The value is the address of the end of the text for the block. */ -__define_stab (N_RBRAC, 0xe0, "RBRAC") - -/* Begin named common block. Only the name is significant. */ -__define_stab (N_BCOMM, 0xe2, "BCOMM") - -/* End named common block. Only the name is significant - (and it should match the N_BCOMM). */ -__define_stab (N_ECOMM, 0xe4, "ECOMM") - -/* End common (local name): value is address. - I'm not sure how this is used. */ -__define_stab (N_ECOML, 0xe8, "ECOML") - -/* These STAB's are used on Gould systems for Non-Base register symbols - or something like that. FIXME. I have assigned the values at random - since I don't have a Gould here. Fixups from Gould folk welcome... */ -__define_stab (N_NBTEXT, 0xF0, "NBTEXT") -__define_stab (N_NBDATA, 0xF2, "NBDATA") -__define_stab (N_NBBSS, 0xF4, "NBBSS") -__define_stab (N_NBSTS, 0xF6, "NBSTS") -__define_stab (N_NBLCS, 0xF8, "NBLCS") - -/* Second symbol entry containing a length-value for the preceding entry. - The value is the length. */ -__define_stab (N_LENG, 0xfe, "LENG") - -/* The above information, in matrix format. - - STAB MATRIX - _________________________________________________ - | 00 - 1F are not dbx stab symbols | - | In most cases, the low bit is the EXTernal bit| - - | 00 UNDEF | 02 ABS | 04 TEXT | 06 DATA | - | 01 |EXT | 03 |EXT | 05 |EXT | 07 |EXT | - - | 08 BSS | 0A INDR | 0C FN_SEQ | 0E | - | 09 |EXT | 0B | 0D | 0F | - - | 10 | 12 COMM | 14 SETA | 16 SETT | - | 11 | 13 | 15 | 17 | - - | 18 SETD | 1A SETB | 1C SETV | 1E WARNING| - | 19 | 1B | 1D | 1F FN | - - |_______________________________________________| - | Debug entries with bit 01 set are unused. | - | 20 GSYM | 22 FNAME | 24 FUN | 26 STSYM | - | 28 LCSYM | 2A MAIN | 2C | 2E | - | 30 PC | 32 NSYMS | 34 NOMAP | 36 | - | 38 OBJ | 3A | 3C OPT | 3E | - | 40 RSYM | 42 M2C | 44 SLINE | 46 DSLINE | - | 48 BSLINE*| 4A DEFD | 4C | 4E | - | 50 EHDECL*| 52 | 54 CATCH | 56 | - | 58 | 5A | 5C | 5E | - | 60 SSYM | 62 | 64 SO | 66 | - | 68 | 6A | 6C | 6E | - | 70 | 72 | 74 | 76 | - | 78 | 7A | 7C | 7E | - | 80 LSYM | 82 BINCL | 84 SOL | 86 | - | 88 | 8A | 8C | 8E | - | 90 | 92 | 94 | 96 | - | 98 | 9A | 9C | 9E | - | A0 PSYM | A2 EINCL | A4 ENTRY | A6 | - | A8 | AA | AC | AE | - | B0 | B2 | B4 | B6 | - | B8 | BA | BC | BE | - | C0 LBRAC | C2 EXCL | C4 SCOPE | C6 | - | C8 | CA | CC | CE | - | D0 | D2 | D4 | D6 | - | D8 | DA | DC | DE | - | E0 RBRAC | E2 BCOMM | E4 ECOMM | E6 | - | E8 ECOML | EA | EC | EE | - | F0 | F2 | F4 | F6 | - | F8 | FA | FC | FE LENG | - +-----------------------------------------------+ - * 50 EHDECL is also MOD2. - * 48 BSLINE is also BROWS. - */ diff --git a/libc/sysdeps/linux/v850/bits/stat.h b/libc/sysdeps/linux/v850/bits/stat.h deleted file mode 100644 index 213dbe267..000000000 --- a/libc/sysdeps/linux/v850/bits/stat.h +++ /dev/null @@ -1,134 +0,0 @@ -/* Copyright (C) 1992,95,96,97,98,99,2000,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. */ - -#ifndef _SYS_STAT_H -# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead." -#endif - -/* Versions of the `struct stat' data structure. */ -#define _STAT_VER_LINUX_OLD 1 -#define _STAT_VER_KERNEL 1 -#define _STAT_VER_SVR4 2 -#define _STAT_VER_LINUX 3 -#define _STAT_VER _STAT_VER_LINUX /* The one defined below. */ - -/* Versions of the `xmknod' interface. */ -#define _MKNOD_VER_LINUX 1 -#define _MKNOD_VER_SVR4 2 -#define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */ - - -struct stat - { - __dev_t st_dev; /* Device. */ - unsigned short int __pad1; -#ifndef __USE_FILE_OFFSET64 - __ino_t st_ino; /* File serial number. */ -#else - __ino_t __st_ino; /* 32bit file serial number. */ -#endif - __mode_t st_mode; /* File mode. */ - __nlink_t st_nlink; /* Link count. */ - __uid_t st_uid; /* User ID of the file's owner. */ - __gid_t st_gid; /* Group ID of the file's group.*/ - __dev_t st_rdev; /* Device number, if device. */ - unsigned short int __pad2; -#ifndef __USE_FILE_OFFSET64 - __off_t st_size; /* Size of file, in bytes. */ -#else - __off64_t st_size; /* Size of file, in bytes. */ -#endif - __blksize_t st_blksize; /* Optimal block size for I/O. */ - -#ifndef __USE_FILE_OFFSET64 - __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ -#else - __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ -#endif - __time_t st_atime; /* Time of last access. */ - unsigned long int __unused1; - __time_t st_mtime; /* Time of last modification. */ - unsigned long int __unused2; - __time_t st_ctime; /* Time of last status change. */ - unsigned long int __unused3; -#ifndef __USE_FILE_OFFSET64 - unsigned long int __unused4; - unsigned long int __unused5; -#else - __ino64_t st_ino; /* File serial number. */ -#endif - }; - -#ifdef __USE_LARGEFILE64 -struct stat64 - { - __dev_t st_dev; /* Device. */ - unsigned short int __pad1; - - __ino_t __st_ino; /* 32bit file serial number. */ - __mode_t st_mode; /* File mode. */ - __nlink_t st_nlink; /* Link count. */ - __uid_t st_uid; /* User ID of the file's owner. */ - __gid_t st_gid; /* Group ID of the file's group.*/ - __dev_t st_rdev; /* Device number, if device. */ - unsigned short int __pad2; - __off64_t st_size; /* Size of file, in bytes. */ - __blksize_t st_blksize; /* Optimal block size for I/O. */ - - __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ - __time_t st_atime; /* Time of last access. */ - unsigned long int __unused1; - __time_t st_mtime; /* Time of last modification. */ - unsigned long int __unused2; - __time_t st_ctime; /* Time of last status change. */ - unsigned long int __unused3; - __ino64_t st_ino; /* File serial number. */ - }; -#endif - -/* Tell code we have these members. */ -#define _STATBUF_ST_BLKSIZE -#define _STATBUF_ST_RDEV - -/* Encoding of the file mode. */ - -#define __S_IFMT 0170000 /* These bits determine file type. */ - -/* File types. */ -#define __S_IFDIR 0040000 /* Directory. */ -#define __S_IFCHR 0020000 /* Character device. */ -#define __S_IFBLK 0060000 /* Block device. */ -#define __S_IFREG 0100000 /* Regular file. */ -#define __S_IFIFO 0010000 /* FIFO. */ -#define __S_IFLNK 0120000 /* Symbolic link. */ -#define __S_IFSOCK 0140000 /* Socket. */ - -/* POSIX.1b objects. Note that these macros always evaluate to zero. But - they do it by enforcing the correct use of the macros. */ -#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode) -#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode) -#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode) - -/* Protection bits. */ - -#define __S_ISUID 04000 /* Set user ID on execution. */ -#define __S_ISGID 02000 /* Set group ID on execution. */ -#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ -#define __S_IREAD 0400 /* Read by owner. */ -#define __S_IWRITE 0200 /* Write by owner. */ -#define __S_IEXEC 0100 /* Execute by owner. */ diff --git a/libc/sysdeps/linux/v850/bits/statfs.h b/libc/sysdeps/linux/v850/bits/statfs.h deleted file mode 100644 index 78c9bdbbc..000000000 --- a/libc/sysdeps/linux/v850/bits/statfs.h +++ /dev/null @@ -1,64 +0,0 @@ -/* Copyright (C) 1997, 1998, 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 _SYS_STATFS_H -# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead." -#endif - -#include <bits/types.h> /* for __fsid_t and __fsblkcnt_t*/ - -struct statfs - { - int f_type; - int f_bsize; -#ifndef __USE_FILE_OFFSET64 - __fsblkcnt_t f_blocks; - __fsblkcnt_t f_bfree; - __fsblkcnt_t f_bavail; - __fsfilcnt_t f_files; - __fsfilcnt_t f_ffree; -#else - __fsblkcnt64_t f_blocks; - __fsblkcnt64_t f_bfree; - __fsblkcnt64_t f_bavail; - __fsfilcnt64_t f_files; - __fsfilcnt64_t f_ffree; -#endif - __fsid_t f_fsid; - int f_namelen; - int f_spare[6]; - }; - -#ifdef __USE_LARGEFILE64 -struct statfs64 - { - int f_type; - int f_bsize; - __fsblkcnt64_t f_blocks; - __fsblkcnt64_t f_bfree; - __fsblkcnt64_t f_bavail; - __fsfilcnt64_t f_files; - __fsfilcnt64_t f_ffree; - __fsid_t f_fsid; - int f_namelen; - int f_spare[6]; - }; -#endif - -/* Tell code we have this member. */ -#define _STATFS_F_NAMELEN diff --git a/libc/sysdeps/linux/v850/bits/statvfs.h b/libc/sysdeps/linux/v850/bits/statvfs.h deleted file mode 100644 index 32e03f31e..000000000 --- a/libc/sysdeps/linux/v850/bits/statvfs.h +++ /dev/null @@ -1,99 +0,0 @@ -/* Copyright (C) 1997, 1998, 2000, 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. */ - -#ifndef _SYS_STATVFS_H -# error "Never include <bits/statvfs.h> directly; use <sys/statvfs.h> instead." -#endif - -#include <bits/types.h> /* For __fsblkcnt_t and __fsfilcnt_t. */ - -struct statvfs - { - unsigned long int f_bsize; - unsigned long int f_frsize; -#ifndef __USE_FILE_OFFSET64 - __fsblkcnt_t f_blocks; - __fsblkcnt_t f_bfree; - __fsblkcnt_t f_bavail; - __fsfilcnt_t f_files; - __fsfilcnt_t f_ffree; - __fsfilcnt_t f_favail; -#else - __fsblkcnt64_t f_blocks; - __fsblkcnt64_t f_bfree; - __fsblkcnt64_t f_bavail; - __fsfilcnt64_t f_files; - __fsfilcnt64_t f_ffree; - __fsfilcnt64_t f_favail; -#endif - unsigned long int f_fsid; - int __f_unused; - unsigned long int f_flag; - unsigned long int f_namemax; - int __f_spare[6]; - }; -#define _STATVFSBUF_F_UNUSED - -#ifdef __USE_LARGEFILE64 -struct statvfs64 - { - unsigned long int f_bsize; - unsigned long int f_frsize; - __fsblkcnt64_t f_blocks; - __fsblkcnt64_t f_bfree; - __fsblkcnt64_t f_bavail; - __fsfilcnt64_t f_files; - __fsfilcnt64_t f_ffree; - __fsfilcnt64_t f_favail; - unsigned long int f_fsid; - int __f_unused; - unsigned long int f_flag; - unsigned long int f_namemax; - int __f_spare[6]; - }; -#endif - -/* Definitions for the flag in `f_flag'. These definitions should be - kept in sync which the definitions in <sys/mount.h>. */ -enum -{ - ST_RDONLY = 1, /* Mount read-only. */ -#define ST_RDONLY ST_RDONLY - ST_NOSUID = 2, /* Ignore suid and sgid bits. */ -#define ST_NOSUID ST_NOSUID -#ifdef __USE_GNU - ST_NODEV = 4, /* Disallow access to device special files. */ -# define ST_NODEV ST_NODEV - ST_NOEXEC = 8, /* Disallow program execution. */ -# define ST_NOEXEC ST_NOEXEC - ST_SYNCHRONOUS = 16, /* Writes are synced at once. */ -# define ST_SYNCHRONOUS ST_SYNCHRONOUS - ST_MANDLOCK = 64, /* Allow mandatory locks on an FS. */ -# define ST_MANDLOCK ST_MANDLOCK - ST_WRITE = 128, /* Write on file/directory/symlink. */ -# define ST_WRITE ST_WRITE - ST_APPEND = 256, /* Append-only file. */ -# define ST_APPEND ST_APPEND - ST_IMMUTABLE = 512, /* Immutable file. */ -# define ST_IMMUTABLE ST_IMMUTABLE - ST_NOATIME = 1024, /* Do not update access times. */ -# define ST_NOATIME ST_NOATIME - ST_NODIRATIME /* Do not update directory access times. */ -# define ST_NODIRATIME ST_NODIRATIME -#endif /* Use GNU. */ -}; diff --git a/libc/sysdeps/linux/v850/bits/stdio-lock.h b/libc/sysdeps/linux/v850/bits/stdio-lock.h deleted file mode 100644 index 5b1c1b082..000000000 --- a/libc/sysdeps/linux/v850/bits/stdio-lock.h +++ /dev/null @@ -1,48 +0,0 @@ -/* Thread package specific definitions of stream lock type. Generic version. - Copyright (C) 2000, 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. */ - -#ifndef _BITS_STDIO_LOCK_H -#define _BITS_STDIO_LOCK_H 1 - -#include <bits/libc-lock.h> - -__libc_lock_define_recursive (typedef, _IO_lock_t) - -/* We need recursive (counting) mutexes. */ -#ifdef _LIBC_LOCK_RECURSIVE_INITIALIZER -# define _IO_lock_initializer _LIBC_LOCK_RECURSIVE_INITIALIZER -#elif _IO_MTSAFE_IO - #error libio needs recursive mutexes for _IO_MTSAFE_IO -#endif - -#define _IO_lock_init(_name) __libc_lock_init_recursive (_name) -#define _IO_lock_fini(_name) __libc_lock_fini_recursive (_name) -#define _IO_lock_lock(_name) __libc_lock_lock_recursive (_name) -#define _IO_lock_unlock(_name) __libc_lock_unlock_recursive (_name) - - -#define _IO_cleanup_region_start(_fct, _fp) \ - __libc_cleanup_region_start (((_fp)->_flags & _IO_USER_LOCK) == 0, _fct, _fp) -#define _IO_cleanup_region_start_noarg(_fct) \ - __libc_cleanup_region_start (1, _fct, NULL) -#define _IO_cleanup_region_end(_doit) \ - __libc_cleanup_region_end (_doit) - - -#endif /* bits/stdio-lock.h */ diff --git a/libc/sysdeps/linux/v850/bits/stdio.h b/libc/sysdeps/linux/v850/bits/stdio.h deleted file mode 100644 index 118118adc..000000000 --- a/libc/sysdeps/linux/v850/bits/stdio.h +++ /dev/null @@ -1,169 +0,0 @@ -/* Optimizing macros and inline functions for stdio functions. - Copyright (C) 1998, 2000, 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. */ - -#ifndef _STDIO_H -# error "Never include <bits/stdio.h> directly; use <stdio.h> instead." -#endif - -#ifdef __cplusplus -# define __STDIO_INLINE inline -#else -# define __STDIO_INLINE extern __inline -#endif - - -#ifdef __USE_EXTERN_INLINES -/* Write formatted output to stdout from argument list ARG. */ -__STDIO_INLINE int -vprintf (__const char *__restrict __fmt, _G_va_list __arg) __THROW -{ - return vfprintf (stdout, __fmt, __arg); -} - -/* Read a character from stdin. */ -__STDIO_INLINE int -getchar (void) __THROW -{ - return _IO_getc (stdin); -} - - -# if defined __USE_POSIX || defined __USE_MISC -/* This is defined in POSIX.1:1996. */ -__STDIO_INLINE int -getc_unlocked (FILE *__fp) __THROW -{ - return _IO_getc_unlocked (__fp); -} - -/* This is defined in POSIX.1:1996. */ -__STDIO_INLINE int -getchar_unlocked (void) __THROW -{ - return _IO_getc_unlocked (stdin); -} -# endif /* POSIX || misc */ - - -/* Write a character to stdout. */ -__STDIO_INLINE int -putchar (int __c) __THROW -{ - return _IO_putc (__c, stdout); -} - - -# ifdef __USE_MISC -/* Faster version when locking is not necessary. */ -__STDIO_INLINE int -fputc_unlocked (int __c, FILE *__stream) __THROW -{ - return _IO_putc_unlocked (__c, __stream); -} -# endif /* misc */ - - -# if defined __USE_POSIX || defined __USE_MISC -/* This is defined in POSIX.1:1996. */ -__STDIO_INLINE int -putc_unlocked (int __c, FILE *__stream) __THROW -{ - return _IO_putc_unlocked (__c, __stream); -} - -/* This is defined in POSIX.1:1996. */ -__STDIO_INLINE int -putchar_unlocked (int __c) __THROW -{ - return _IO_putc_unlocked (__c, stdout); -} -# endif /* POSIX || misc */ - - -# ifdef __USE_GNU -/* Like `getdelim', but reads up to a newline. */ -__STDIO_INLINE _IO_ssize_t -getline (char **__lineptr, size_t *__n, FILE *__stream) __THROW -{ - return __getdelim (__lineptr, __n, '\n', __stream); -} -# endif /* GNU */ - - -# ifdef __USE_MISC -/* Faster versions when locking is not required. */ -__STDIO_INLINE int -feof_unlocked (FILE *__stream) __THROW -{ - return _IO_feof_unlocked (__stream); -} - -/* Faster versions when locking is not required. */ -__STDIO_INLINE int -ferror_unlocked (FILE *__stream) __THROW -{ - return _IO_ferror_unlocked (__stream); -} -# endif /* misc */ - -#endif /* Use extern inlines. */ - - -#if defined __USE_MISC && defined __GNUC__ && defined __OPTIMIZE__ -/* Perform some simple optimizations. */ -# define fread_unlocked(ptr, size, n, stream) \ - (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) \ - && (size_t) ((size) * (n)) <= 8 && (size) != 0) \ - ? ({ char *__ptr = (char *) (ptr); \ - FILE *__stream = (stream); \ - size_t __cnt; \ - for (__cnt = (size) * (n); __cnt > 0; --__cnt) \ - { \ - int __c = _IO_getc_unlocked (__stream); \ - if (__c == EOF) \ - break; \ - *__ptr++ = __c; \ - } \ - ((size_t) ((size) * (n)) - __cnt) / (size); }) \ - : (((__builtin_constant_p (size) && (size) == 0) \ - || (__builtin_constant_p (n) && (n) == 0)) \ - /* Evaluate all parameters once. */ \ - ? ((void) (ptr), (void) (stream), (void) (size), \ - (void) (n), 0) \ - : fread_unlocked (ptr, size, n, stream)))) - -# define fwrite_unlocked(ptr, size, n, stream) \ - (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) \ - && (size_t) ((size) * (n)) <= 8 && (size) != 0) \ - ? ({ const char *__ptr = (const char *) (ptr); \ - FILE *__stream = (stream); \ - size_t __cnt; \ - for (__cnt = (size) * (n); __cnt > 0; --__cnt) \ - if (_IO_putc_unlocked (*__ptr++, __stream) == EOF) \ - break; \ - ((size_t) ((size) * (n)) - __cnt) / (size); }) \ - : (((__builtin_constant_p (size) && (size) == 0) \ - || (__builtin_constant_p (n) && (n) == 0)) \ - /* Evaluate all parameters once. */ \ - ? ((void) (ptr), (void) (stream), (void) (size), n) \ - : fwrite_unlocked (ptr, size, n, stream)))) -#endif - -/* Define helper macro. */ -#undef __STDIO_INLINE diff --git a/libc/sysdeps/linux/v850/bits/stdio_lim.h b/libc/sysdeps/linux/v850/bits/stdio_lim.h deleted file mode 100644 index ea6d693f5..000000000 --- a/libc/sysdeps/linux/v850/bits/stdio_lim.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (C) 1994, 1997, 1998, 1999 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. */ - -#if !defined _STDIO_H && !defined __need_FOPEN_MAX && !defined __need_IOV_MAX -# error "Never include <bits/stdio_lim.h> directly; use <stdio.h> instead." -#endif - -#ifdef _STDIO_H -# define L_tmpnam 20 -# define TMP_MAX 238328 -# define FILENAME_MAX 4095 - -# ifdef __USE_POSIX -# define L_ctermid 9 -# define L_cuserid 9 -# endif -#endif - -#if defined __need_FOPEN_MAX || defined _STDIO_H -# undef FOPEN_MAX -# define FOPEN_MAX 16 -#endif - -#if defined __need_IOV_MAX && !defined IOV_MAX -# define IOV_MAX 1024 -#endif diff --git a/libc/sysdeps/linux/v850/bits/string.h b/libc/sysdeps/linux/v850/bits/string.h deleted file mode 100644 index 8456f0f87..000000000 --- a/libc/sysdeps/linux/v850/bits/string.h +++ /dev/null @@ -1,10 +0,0 @@ -/* - * libc/sysdeps/linux/v850/bits/string.h -- Machine-dependent string op defs - * - * Copyright (C) 2001 NEC Corporation - * Copyright (C) 2001 Miles Bader <miles@gnu.org> - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License. See the file COPYING.LIB in the main - * directory of this archive for more details. - */ diff --git a/libc/sysdeps/linux/v850/bits/string2.h b/libc/sysdeps/linux/v850/bits/string2.h deleted file mode 100644 index aafb57891..000000000 --- a/libc/sysdeps/linux/v850/bits/string2.h +++ /dev/null @@ -1,1241 +0,0 @@ -/* Machine-independant string function optimizations. - Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. - - 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 _STRING_H -# error "Never use <bits/string2.h> directly; include <string.h> instead." -#endif - -#if !defined __NO_STRING_INLINES && !defined __BOUNDED_POINTERS__ - -/* Unlike the definitions in the header <bits/string.h> the - definitions contained here are not optimized down to assembler - level. Those optimizations are not always a good idea since this - means the code size increases a lot. Instead the definitions here - optimize some functions in a way which do not dramatically - increase the code size and which do not use assembler. The main - trick is to use GNU CC's `__builtin_constant_p' function. - - Every function XXX which has a defined version in - <bits/string.h> must be accompanied by a symbol _HAVE_STRING_ARCH_XXX - to make sure we don't get redefinitions. - - We must use here macros instead of inline functions since the - trick won't work with the latter. */ - -#ifndef __STRING_INLINE -# ifdef __cplusplus -# define __STRING_INLINE inline -# else -# define __STRING_INLINE extern __inline -# endif -#endif - -#if _STRING_ARCH_unaligned -/* If we can do unaligned memory accesses we must know the endianess. */ -# include <endian.h> -# include <bits/types.h> - -# if __BYTE_ORDER == __LITTLE_ENDIAN -# define __STRING2_SMALL_GET16(src, idx) \ - (((__const unsigned char *) (__const char *) (src))[idx + 1] << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx]) -# define __STRING2_SMALL_GET32(src, idx) \ - (((((__const unsigned char *) (__const char *) (src))[idx + 3] << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 2]) << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 1]) << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx]) -# else -# define __STRING2_SMALL_GET16(src, idx) \ - (((__const unsigned char *) (__const char *) (src))[idx] << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 1]) -# define __STRING2_SMALL_GET32(src, idx) \ - (((((__const unsigned char *) (__const char *) (src))[idx] << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 1]) << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 2]) << 8 \ - | ((__const unsigned char *) (__const char *) (src))[idx + 3]) -# endif -#else -/* These are a few types we need for the optimizations if we cannot - use unaligned memory accesses. */ -# define __STRING2_COPY_TYPE(N) \ - typedef struct { unsigned char __arr[N]; } \ - __STRING2_COPY_ARR##N __attribute__ ((packed)) -__STRING2_COPY_TYPE (2); -__STRING2_COPY_TYPE (3); -__STRING2_COPY_TYPE (4); -__STRING2_COPY_TYPE (5); -__STRING2_COPY_TYPE (6); -__STRING2_COPY_TYPE (7); -__STRING2_COPY_TYPE (8); -# undef __STRING2_COPY_TYPE -#endif - -/* Dereferencing a pointer arg to run sizeof on it fails for the void - pointer case, so we use this instead. - Note that __x is evaluated twice. */ -#define __string2_1bptr_p(__x) \ - ((size_t)(const void *)((__x) + 1) - (size_t)(const void *)(__x) == 1) - -/* Set N bytes of S to C. */ -#ifndef _HAVE_STRING_ARCH_memset -# if _STRING_ARCH_unaligned -# define memset(s, c, n) \ - (__extension__ (__builtin_constant_p (n) && (n) <= 16 \ - ? ((n) == 1 \ - ? __memset_1 (s, c) \ - : __memset_gc (s, c, n)) \ - : (__builtin_constant_p (c) && (c) == '\0' \ - ? ({ void *__s = (s); __bzero (__s, n); __s; }) \ - : memset (s, c, n)))) - -# define __memset_1(s, c) ({ void *__s = (s); \ - *((__uint8_t *) __s) = (__uint8_t) c; __s; }) - -# define __memset_gc(s, c, n) \ - ({ void *__s = (s); \ - union { \ - unsigned int __ui; \ - unsigned short int __usi; \ - unsigned char __uc; \ - } *__u = __s; \ - __uint8_t __c = (__uint8_t) (c); \ - \ - /* This `switch' statement will be removed at compile-time. */ \ - switch ((unsigned int) (n)) \ - { \ - case 15: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ ((void *) __u + 4); \ - case 11: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ ((void *) __u + 4); \ - case 7: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ ((void *) __u + 4); \ - case 3: \ - __u->__usi = (unsigned short int) __c * 0x0101; \ - __u = __extension__ ((void *) __u + 2); \ - __u->__uc = (unsigned char) __c; \ - break; \ - \ - case 14: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ ((void *) __u + 4); \ - case 10: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ ((void *) __u + 4); \ - case 6: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ ((void *) __u + 4); \ - case 2: \ - __u->__usi = (unsigned short int) __c * 0x0101; \ - break; \ - \ - case 13: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ ((void *) __u + 4); \ - case 9: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ ((void *) __u + 4); \ - case 5: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ ((void *) __u + 4); \ - case 1: \ - __u->__uc = (unsigned char) __c; \ - break; \ - \ - case 16: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ ((void *) __u + 4); \ - case 12: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ ((void *) __u + 4); \ - case 8: \ - __u->__ui = __c * 0x01010101; \ - __u = __extension__ ((void *) __u + 4); \ - case 4: \ - __u->__ui = __c * 0x01010101; \ - case 0: \ - break; \ - } \ - \ - __s; }) -# else -# define memset(s, c, n) \ - (__extension__ (__builtin_constant_p (c) && (c) == '\0' \ - ? ({ void *__s = (s); __bzero (__s, n); __s; }) \ - : memset (s, c, n))) -# endif - -/* GCC optimizes memset(s, 0, n) but not bzero(s, n). - The optimization is broken before EGCS 1.1. */ -# if __GNUC_PREREQ (2, 91) -# define __bzero(s, n) __builtin_memset (s, '\0', n) -# endif - -#endif - - -/* Copy N bytes from SRC to DEST, returning pointer to byte following the - last copied. */ -#ifdef __USE_GNU -# if !defined _HAVE_STRING_ARCH_mempcpy || defined _FORCE_INLINES -# ifndef _HAVE_STRING_ARCH_mempcpy -# define __mempcpy(dest, src, n) \ - (__extension__ (__builtin_constant_p (src) && __builtin_constant_p (n) \ - && __string2_1bptr_p (src) && n <= 8 \ - ? __mempcpy_small (dest, __mempcpy_args (src), n) \ - : __mempcpy (dest, src, n))) -/* In glibc we use this function frequently but for namespace reasons - we have to use the name `__mempcpy'. */ -# define mempcpy(dest, src, n) __mempcpy (dest, src, n) -# endif - -# if _STRING_ARCH_unaligned -# ifndef _FORCE_INLINES -# define __mempcpy_args(src) \ - ((__const char *) (src))[0], ((__const char *) (src))[2], \ - ((__const char *) (src))[4], ((__const char *) (src))[6], \ - __extension__ __STRING2_SMALL_GET16 (src, 0), \ - __extension__ __STRING2_SMALL_GET16 (src, 4), \ - __extension__ __STRING2_SMALL_GET32 (src, 0), \ - __extension__ __STRING2_SMALL_GET32 (src, 4) -# endif -__STRING_INLINE void *__mempcpy_small (void *, char, char, char, char, - __uint16_t, __uint16_t, __uint32_t, - __uint32_t, size_t); -__STRING_INLINE void * -__mempcpy_small (void *__dest1, - char __src0_1, char __src2_1, char __src4_1, char __src6_1, - __uint16_t __src0_2, __uint16_t __src4_2, - __uint32_t __src0_4, __uint32_t __src4_4, - size_t __srclen) -{ - union { - __uint32_t __ui; - __uint16_t __usi; - unsigned char __uc; - unsigned char __c; - } *__u = __dest1; - switch ((unsigned int) __srclen) - { - case 1: - __u->__c = __src0_1; - __u = __extension__ ((void *) __u + 1); - break; - case 2: - __u->__usi = __src0_2; - __u = __extension__ ((void *) __u + 2); - break; - case 3: - __u->__usi = __src0_2; - __u = __extension__ ((void *) __u + 2); - __u->__c = __src2_1; - __u = __extension__ ((void *) __u + 1); - break; - case 4: - __u->__ui = __src0_4; - __u = __extension__ ((void *) __u + 4); - break; - case 5: - __u->__ui = __src0_4; - __u = __extension__ ((void *) __u + 4); - __u->__c = __src4_1; - __u = __extension__ ((void *) __u + 1); - break; - case 6: - __u->__ui = __src0_4; - __u = __extension__ ((void *) __u + 4); - __u->__usi = __src4_2; - __u = __extension__ ((void *) __u + 2); - break; - case 7: - __u->__ui = __src0_4; - __u = __extension__ ((void *) __u + 4); - __u->__usi = __src4_2; - __u = __extension__ ((void *) __u + 2); - __u->__c = __src6_1; - __u = __extension__ ((void *) __u + 1); - break; - case 8: - __u->__ui = __src0_4; - __u = __extension__ ((void *) __u + 4); - __u->__ui = __src4_4; - __u = __extension__ ((void *) __u + 4); - break; - } - return (void *) __u; -} -# else -# ifndef _FORCE_INLINES -# define __mempcpy_args(src) \ - ((__const char *) (src))[0], \ - __extension__ ((__STRING2_COPY_ARR2) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1] } }), \ - __extension__ ((__STRING2_COPY_ARR3) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2] } }), \ - __extension__ ((__STRING2_COPY_ARR4) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3] } }), \ - __extension__ ((__STRING2_COPY_ARR5) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4] } }), \ - __extension__ ((__STRING2_COPY_ARR6) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5] } }), \ - __extension__ ((__STRING2_COPY_ARR7) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - ((__const char *) (src))[6] } }), \ - __extension__ ((__STRING2_COPY_ARR8) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - ((__const char *) (src))[6], ((__const char *) (src))[7] } }) -# endif -__STRING_INLINE void *__mempcpy_small (void *, char, __STRING2_COPY_ARR2, - __STRING2_COPY_ARR3, - __STRING2_COPY_ARR4, - __STRING2_COPY_ARR5, - __STRING2_COPY_ARR6, - __STRING2_COPY_ARR7, - __STRING2_COPY_ARR8, size_t); -__STRING_INLINE void * -__mempcpy_small (void *__dest, char __src1, - __STRING2_COPY_ARR2 __src2, __STRING2_COPY_ARR3 __src3, - __STRING2_COPY_ARR4 __src4, __STRING2_COPY_ARR5 __src5, - __STRING2_COPY_ARR6 __src6, __STRING2_COPY_ARR7 __src7, - __STRING2_COPY_ARR8 __src8, size_t __srclen) -{ - union { - char __c; - __STRING2_COPY_ARR2 __sca2; - __STRING2_COPY_ARR3 __sca3; - __STRING2_COPY_ARR4 __sca4; - __STRING2_COPY_ARR5 __sca5; - __STRING2_COPY_ARR6 __sca6; - __STRING2_COPY_ARR7 __sca7; - __STRING2_COPY_ARR8 __sca8; - } *__u = __dest; - switch ((unsigned int) __srclen) - { - case 1: - __u->__c = __src1; - break; - case 2: - __extension__ __u->__sca2 = __src2; - break; - case 3: - __extension__ __u->__sca3 = __src3; - break; - case 4: - __extension__ __u->__sca4 = __src4; - break; - case 5: - __extension__ __u->__sca5 = __src5; - break; - case 6: - __extension__ __u->__sca6 = __src6; - break; - case 7: - __extension__ __u->__sca7 = __src7; - break; - case 8: - __extension__ __u->__sca8 = __src8; - break; - } - return __extension__ ((void *) __u + __srclen); -} -# endif -# endif -#endif - - -/* Return pointer to C in S. */ -#ifndef _HAVE_STRING_ARCH_strchr -extern void *__rawmemchr (const void *__s, int __c); -# define strchr(s, c) \ - (__extension__ (__builtin_constant_p (c) && (c) == '\0' \ - ? (char *) __rawmemchr (s, c) \ - : strchr (s, c))) -#endif - - -/* Copy SRC to DEST. */ -#if !defined _HAVE_STRING_ARCH_strcpy || defined _FORCE_INLINES -# ifndef _HAVE_STRING_ARCH_strcpy -# define strcpy(dest, src) \ - (__extension__ (__builtin_constant_p (src) \ - ? (__string2_1bptr_p (src) && strlen (src) + 1 <= 8 \ - ? __strcpy_small (dest, __strcpy_args (src), \ - strlen (src) + 1) \ - : (char *) memcpy (dest, src, strlen (src) + 1)) \ - : strcpy (dest, src))) -# endif - -# if _STRING_ARCH_unaligned -# ifndef _FORCE_INLINES -# define __strcpy_args(src) \ - __extension__ __STRING2_SMALL_GET16 (src, 0), \ - __extension__ __STRING2_SMALL_GET16 (src, 4), \ - __extension__ __STRING2_SMALL_GET32 (src, 0), \ - __extension__ __STRING2_SMALL_GET32 (src, 4) -# endif -__STRING_INLINE char *__strcpy_small (char *, __uint16_t, __uint16_t, - __uint32_t, __uint32_t, size_t); -__STRING_INLINE char * -__strcpy_small (char *__dest, - __uint16_t __src0_2, __uint16_t __src4_2, - __uint32_t __src0_4, __uint32_t __src4_4, - size_t __srclen) -{ - union { - __uint32_t __ui; - __uint16_t __usi; - unsigned char __uc; - } *__u = (void *) __dest; - switch ((unsigned int) __srclen) - { - case 1: - __u->__uc = '\0'; - break; - case 2: - __u->__usi = __src0_2; - break; - case 3: - __u->__usi = __src0_2; - __u = __extension__ ((void *) __u + 2); - __u->__uc = '\0'; - break; - case 4: - __u->__ui = __src0_4; - break; - case 5: - __u->__ui = __src0_4; - __u = __extension__ ((void *) __u + 4); - __u->__uc = '\0'; - break; - case 6: - __u->__ui = __src0_4; - __u = __extension__ ((void *) __u + 4); - __u->__usi = __src4_2; - break; - case 7: - __u->__ui = __src0_4; - __u = __extension__ ((void *) __u + 4); - __u->__usi = __src4_2; - __u = __extension__ ((void *) __u + 2); - __u->__uc = '\0'; - break; - case 8: - __u->__ui = __src0_4; - __u = __extension__ ((void *) __u + 4); - __u->__ui = __src4_4; - break; - } - return __dest; -} -# else -# ifndef _FORCE_INLINES -# define __strcpy_args(src) \ - __extension__ ((__STRING2_COPY_ARR2) \ - { { ((__const char *) (src))[0], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR3) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR4) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR5) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR6) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR7) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR8) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - ((__const char *) (src))[6], '\0' } }) -# endif -__STRING_INLINE char *__strcpy_small (char *, __STRING2_COPY_ARR2, - __STRING2_COPY_ARR3, - __STRING2_COPY_ARR4, - __STRING2_COPY_ARR5, - __STRING2_COPY_ARR6, - __STRING2_COPY_ARR7, - __STRING2_COPY_ARR8, size_t); -__STRING_INLINE char * -__strcpy_small (char *__dest, - __STRING2_COPY_ARR2 __src2, __STRING2_COPY_ARR3 __src3, - __STRING2_COPY_ARR4 __src4, __STRING2_COPY_ARR5 __src5, - __STRING2_COPY_ARR6 __src6, __STRING2_COPY_ARR7 __src7, - __STRING2_COPY_ARR8 __src8, size_t __srclen) -{ - union { - char __c; - __STRING2_COPY_ARR2 __sca2; - __STRING2_COPY_ARR3 __sca3; - __STRING2_COPY_ARR4 __sca4; - __STRING2_COPY_ARR5 __sca5; - __STRING2_COPY_ARR6 __sca6; - __STRING2_COPY_ARR7 __sca7; - __STRING2_COPY_ARR8 __sca8; - } *__u = (void *) __dest; - switch ((unsigned int) __srclen) - { - case 1: - __u->__c = '\0'; - break; - case 2: - __extension__ __u->__sca2 = __src2; - break; - case 3: - __extension__ __u->__sca3 = __src3; - break; - case 4: - __extension__ __u->__sca4 = __src4; - break; - case 5: - __extension__ __u->__sca5 = __src5; - break; - case 6: - __extension__ __u->__sca6 = __src6; - break; - case 7: - __extension__ __u->__sca7 = __src7; - break; - case 8: - __extension__ __u->__sca8 = __src8; - break; - } - return __dest; -} -# endif -#endif - - -/* Copy SRC to DEST, returning pointer to final NUL byte. */ -#ifdef __USE_GNU -# if !defined _HAVE_STRING_ARCH_stpcpy || defined _FORCE_INLINES -# ifndef _HAVE_STRING_ARCH_stpcpy -# define __stpcpy(dest, src) \ - (__extension__ (__builtin_constant_p (src) \ - ? (__string2_1bptr_p (src) && strlen (src) + 1 <= 8 \ - ? __stpcpy_small (dest, __stpcpy_args (src), \ - strlen (src) + 1) \ - : ((char *) __mempcpy (dest, src, strlen (src) + 1) - 1))\ - : __stpcpy (dest, src))) -/* In glibc we use this function frequently but for namespace reasons - we have to use the name `__stpcpy'. */ -# define stpcpy(dest, src) __stpcpy (dest, src) -# endif - -# if _STRING_ARCH_unaligned -# ifndef _FORCE_INLINES -# define __stpcpy_args(src) \ - __extension__ __STRING2_SMALL_GET16 (src, 0), \ - __extension__ __STRING2_SMALL_GET16 (src, 4), \ - __extension__ __STRING2_SMALL_GET32 (src, 0), \ - __extension__ __STRING2_SMALL_GET32 (src, 4) -# endif -__STRING_INLINE char *__stpcpy_small (char *, __uint16_t, __uint16_t, - __uint32_t, __uint32_t, size_t); -__STRING_INLINE char * -__stpcpy_small (char *__dest, - __uint16_t __src0_2, __uint16_t __src4_2, - __uint32_t __src0_4, __uint32_t __src4_4, - size_t __srclen) -{ - union { - unsigned int __ui; - unsigned short int __usi; - unsigned char __uc; - char __c; - } *__u = (void *) __dest; - switch ((unsigned int) __srclen) - { - case 1: - __u->__uc = '\0'; - break; - case 2: - __u->__usi = __src0_2; - __u = __extension__ ((void *) __u + 1); - break; - case 3: - __u->__usi = __src0_2; - __u = __extension__ ((void *) __u + 2); - __u->__uc = '\0'; - break; - case 4: - __u->__ui = __src0_4; - __u = __extension__ ((void *) __u + 3); - break; - case 5: - __u->__ui = __src0_4; - __u = __extension__ ((void *) __u + 4); - __u->__uc = '\0'; - break; - case 6: - __u->__ui = __src0_4; - __u = __extension__ ((void *) __u + 4); - __u->__usi = __src4_2; - __u = __extension__ ((void *) __u + 1); - break; - case 7: - __u->__ui = __src0_4; - __u = __extension__ ((void *) __u + 4); - __u->__usi = __src4_2; - __u = __extension__ ((void *) __u + 2); - __u->__uc = '\0'; - break; - case 8: - __u->__ui = __src0_4; - __u = __extension__ ((void *) __u + 4); - __u->__ui = __src4_4; - __u = __extension__ ((void *) __u + 3); - break; - } - return &__u->__c; -} -# else -# ifndef _FORCE_INLINES -# define __stpcpy_args(src) \ - __extension__ ((__STRING2_COPY_ARR2) \ - { { ((__const char *) (src))[0], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR3) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR4) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR5) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR6) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR7) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - '\0' } }), \ - __extension__ ((__STRING2_COPY_ARR8) \ - { { ((__const char *) (src))[0], ((__const char *) (src))[1], \ - ((__const char *) (src))[2], ((__const char *) (src))[3], \ - ((__const char *) (src))[4], ((__const char *) (src))[5], \ - ((__const char *) (src))[6], '\0' } }) -# endif -__STRING_INLINE char *__stpcpy_small (char *, __STRING2_COPY_ARR2, - __STRING2_COPY_ARR3, - __STRING2_COPY_ARR4, - __STRING2_COPY_ARR5, - __STRING2_COPY_ARR6, - __STRING2_COPY_ARR7, - __STRING2_COPY_ARR8, size_t); -__STRING_INLINE char * -__stpcpy_small (char *__dest, - __STRING2_COPY_ARR2 __src2, __STRING2_COPY_ARR3 __src3, - __STRING2_COPY_ARR4 __src4, __STRING2_COPY_ARR5 __src5, - __STRING2_COPY_ARR6 __src6, __STRING2_COPY_ARR7 __src7, - __STRING2_COPY_ARR8 __src8, size_t __srclen) -{ - union { - char __c; - __STRING2_COPY_ARR2 __sca2; - __STRING2_COPY_ARR3 __sca3; - __STRING2_COPY_ARR4 __sca4; - __STRING2_COPY_ARR5 __sca5; - __STRING2_COPY_ARR6 __sca6; - __STRING2_COPY_ARR7 __sca7; - __STRING2_COPY_ARR8 __sca8; - } *__u = (void *) __dest; - switch ((unsigned int) __srclen) - { - case 1: - __u->__c = '\0'; - break; - case 2: - __extension__ __u->__sca2 = __src2; - break; - case 3: - __extension__ __u->__sca3 = __src3; - break; - case 4: - __extension__ __u->__sca4 = __src4; - break; - case 5: - __extension__ __u->__sca5 = __src5; - break; - case 6: - __extension__ __u->__sca6 = __src6; - break; - case 7: - __extension__ __u->__sca7 = __src7; - break; - case 8: - __extension__ __u->__sca8 = __src8; - break; - } - return __dest + __srclen - 1; -} -# endif -# endif -#endif - - -/* Copy no more than N characters of SRC to DEST. */ -#ifndef _HAVE_STRING_ARCH_strncpy -# if defined _USE_STRING_ARCH_memset && defined _USE_STRING_ARCH_mempcpy -# define strncpy(dest, src, n) \ - (__extension__ ({ char *__dest = (dest); \ - __builtin_constant_p (src) && __builtin_constant_p (n) \ - ? (strlen (src) + 1 >= ((size_t) (n)) \ - ? (char *) memcpy (__dest, src, n) \ - : (memset (__mempcpy (__dest, src, strlen (src)), \ - '\0', n - strlen (src)), \ - __dest)) \ - : strncpy (__dest, src, n); })) -# else -# define strncpy(dest, src, n) \ - (__extension__ (__builtin_constant_p (src) && __builtin_constant_p (n) \ - ? (strlen (src) + 1 >= ((size_t) (n)) \ - ? (char *) memcpy (dest, src, n) \ - : strncpy (dest, src, n)) \ - : strncpy (dest, src, n))) -# endif -#endif - - -/* Append no more than N characters from SRC onto DEST. */ -#ifndef _HAVE_STRING_ARCH_strncat -# ifdef _USE_STRING_ARCH_strchr -# define strncat(dest, src, n) \ - (__extension__ ({ char *__dest = (dest); \ - __builtin_constant_p (src) && __builtin_constant_p (n) \ - ? (strlen (src) < ((size_t) (n)) \ - ? strcat (__dest, src) \ - : (*((char *) __mempcpy (strchr (__dest, '\0'), \ - src, n)) = '\0', __dest)) \ - : strncat (dest, src, n); })) -# else -# define strncat(dest, src, n) \ - (__extension__ (__builtin_constant_p (src) && __builtin_constant_p (n) \ - ? (strlen (src) < ((size_t) (n)) \ - ? strcat (dest, src) \ - : strncat (dest, src, n)) \ - : strncat (dest, src, n))) -# endif -#endif - - -/* Compare characters of S1 and S2. */ -#ifndef _HAVE_STRING_ARCH_strcmp -# define strcmp(s1, s2) \ - __extension__ \ - ({ size_t __s1_len, __s2_len; \ - (__builtin_constant_p (s1) && __builtin_constant_p (s2) \ - && (__s1_len = strlen (s1), __s2_len = strlen (s2), \ - (!__string2_1bptr_p (s1) || __s1_len >= 4) \ - && (!__string2_1bptr_p (s2) || __s2_len >= 4)) \ - ? memcmp ((__const char *) (s1), (__const char *) (s2), \ - (__s1_len < __s2_len ? __s1_len : __s2_len) + 1) \ - : (__builtin_constant_p (s1) && __string2_1bptr_p (s1) \ - && (__s1_len = strlen (s1), __s1_len < 4) \ - ? (__builtin_constant_p (s2) && __string2_1bptr_p (s2) \ - ? __strcmp_cc (s1, s2, __s1_len) \ - : __strcmp_cg (s1, s2, __s1_len)) \ - : (__builtin_constant_p (s2) && __string2_1bptr_p (s2) \ - && (__s2_len = strlen (s2), __s2_len < 4) \ - ? (__builtin_constant_p (s1) && __string2_1bptr_p (s1) \ - ? __strcmp_cc (s1, s2, __s2_len) \ - : __strcmp_gc (s1, s2, __s2_len)) \ - : strcmp (s1, s2)))); }) - -# define __strcmp_cc(s1, s2, l) \ - (__extension__ ({ register int __result = \ - (((__const unsigned char *) (__const char *) (s1))[0] \ - - ((__const unsigned char *) (__const char *)(s2))[0]);\ - if (l > 0 && __result == 0) \ - { \ - __result = (((__const unsigned char *) \ - (__const char *) (s1))[1] \ - - ((__const unsigned char *) \ - (__const char *) (s2))[1]); \ - if (l > 1 && __result == 0) \ - { \ - __result = \ - (((__const unsigned char *) \ - (__const char *) (s1))[2] \ - - ((__const unsigned char *) \ - (__const char *) (s2))[2]); \ - if (l > 2 && __result == 0) \ - __result = \ - (((__const unsigned char *) \ - (__const char *) (s1))[3] \ - - ((__const unsigned char *) \ - (__const char *) (s2))[3]); \ - } \ - } \ - __result; })) - -# define __strcmp_cg(s1, s2, l1) \ - (__extension__ ({ __const unsigned char *__s2 = \ - (__const unsigned char *) (__const char *) (s2); \ - register int __result = \ - (((__const unsigned char *) (__const char *) (s1))[0] \ - - __s2[0]); \ - if (l1 > 0 && __result == 0) \ - { \ - __result = (((__const unsigned char *) \ - (__const char *) (s1))[1] - __s2[1]); \ - if (l1 > 1 && __result == 0) \ - { \ - __result = (((__const unsigned char *) \ - (__const char *) (s1))[2] - __s2[2]);\ - if (l1 > 2 && __result == 0) \ - __result = (((__const unsigned char *) \ - (__const char *) (s1))[3] \ - - __s2[3]); \ - } \ - } \ - __result; })) - -# define __strcmp_gc(s1, s2, l2) \ - (__extension__ ({ __const unsigned char *__s1 = \ - (__const unsigned char *) (__const char *) (s1); \ - register int __result = \ - __s1[0] - ((__const unsigned char *) \ - (__const char *) (s2))[0]; \ - if (l2 > 0 && __result == 0) \ - { \ - __result = (__s1[1] \ - - ((__const unsigned char *) \ - (__const char *) (s2))[1]); \ - if (l2 > 1 && __result == 0) \ - { \ - __result = \ - (__s1[2] - ((__const unsigned char *) \ - (__const char *) (s2))[2]); \ - if (l2 > 2 && __result == 0) \ - __result = \ - (__s1[3] \ - - ((__const unsigned char *) \ - (__const char *) (s2))[3]); \ - } \ - } \ - __result; })) -#endif - - -/* Compare N characters of S1 and S2. */ -#ifndef _HAVE_STRING_ARCH_strncmp -# define strncmp(s1, s2, n) \ - (__extension__ (__builtin_constant_p (n) \ - && ((__builtin_constant_p (s1) \ - && strlen (s1) < ((size_t) (n))) \ - || (__builtin_constant_p (s2) \ - && strlen (s2) < ((size_t) (n)))) \ - ? strcmp (s1, s2) : strncmp (s1, s2, n))) -#endif - - -/* Return the length of the initial segment of S which - consists entirely of characters not in REJECT. */ -#if !defined _HAVE_STRING_ARCH_strcspn || defined _FORCE_INLINES -# ifndef _HAVE_STRING_ARCH_strcspn -# define strcspn(s, reject) \ - __extension__ \ - ({ char __r0, __r1, __r2; \ - (__builtin_constant_p (reject) && __string2_1bptr_p (reject) \ - ? ((__r0 = ((__const char *) (reject))[0], __r0 == '\0') \ - ? strlen (s) \ - : ((__r1 = ((__const char *) (reject))[1], __r1 == '\0') \ - ? __strcspn_c1 (s, __r0) \ - : ((__r2 = ((__const char *) (reject))[2], __r2 == '\0') \ - ? __strcspn_c2 (s, __r0, __r1) \ - : (((__const char *) (reject))[3] == '\0' \ - ? __strcspn_c3 (s, __r0, __r1, __r2) \ - : strcspn (s, reject))))) \ - : strcspn (s, reject)); }) -# endif - -__STRING_INLINE size_t __strcspn_c1 (__const char *__s, int __reject); -__STRING_INLINE size_t -__strcspn_c1 (__const char *__s, int __reject) -{ - register size_t __result = 0; - while (__s[__result] != '\0' && __s[__result] != __reject) - ++__result; - return __result; -} - -__STRING_INLINE size_t __strcspn_c2 (__const char *__s, int __reject1, - int __reject2); -__STRING_INLINE size_t -__strcspn_c2 (__const char *__s, int __reject1, int __reject2) -{ - register size_t __result = 0; - while (__s[__result] != '\0' && __s[__result] != __reject1 - && __s[__result] != __reject2) - ++__result; - return __result; -} - -__STRING_INLINE size_t __strcspn_c3 (__const char *__s, int __reject1, - int __reject2, int __reject3); -__STRING_INLINE size_t -__strcspn_c3 (__const char *__s, int __reject1, int __reject2, - int __reject3) -{ - register size_t __result = 0; - while (__s[__result] != '\0' && __s[__result] != __reject1 - && __s[__result] != __reject2 && __s[__result] != __reject3) - ++__result; - return __result; -} -#endif - - -/* Return the length of the initial segment of S which - consists entirely of characters in ACCEPT. */ -#if !defined _HAVE_STRING_ARCH_strspn || defined _FORCE_INLINES -# ifndef _HAVE_STRING_ARCH_strspn -# define strspn(s, accept) \ - __extension__ \ - ({ char __a0, __a1, __a2; \ - (__builtin_constant_p (accept) && __string2_1bptr_p (accept) \ - ? ((__a0 = ((__const char *) (accept))[0], __a0 == '\0') \ - ? ((void) (s), 0) \ - : ((__a1 = ((__const char *) (accept))[1], __a1 == '\0') \ - ? __strspn_c1 (s, __a0) \ - : ((__a2 = ((__const char *) (accept))[2], __a2 == '\0') \ - ? __strspn_c2 (s, __a0, __a1) \ - : (((__const char *) (accept))[3] == '\0' \ - ? __strspn_c3 (s, __a0, __a1, __a2) \ - : strspn (s, accept))))) \ - : strspn (s, accept)); }) -# endif - -__STRING_INLINE size_t __strspn_c1 (__const char *__s, int __accept); -__STRING_INLINE size_t -__strspn_c1 (__const char *__s, int __accept) -{ - register size_t __result = 0; - /* Please note that __accept never can be '\0'. */ - while (__s[__result] == __accept) - ++__result; - return __result; -} - -__STRING_INLINE size_t __strspn_c2 (__const char *__s, int __accept1, - int __accept2); -__STRING_INLINE size_t -__strspn_c2 (__const char *__s, int __accept1, int __accept2) -{ - register size_t __result = 0; - /* Please note that __accept1 and __accept2 never can be '\0'. */ - while (__s[__result] == __accept1 || __s[__result] == __accept2) - ++__result; - return __result; -} - -__STRING_INLINE size_t __strspn_c3 (__const char *__s, int __accept1, - int __accept2, int __accept3); -__STRING_INLINE size_t -__strspn_c3 (__const char *__s, int __accept1, int __accept2, int __accept3) -{ - register size_t __result = 0; - /* Please note that __accept1 to __accept3 never can be '\0'. */ - while (__s[__result] == __accept1 || __s[__result] == __accept2 - || __s[__result] == __accept3) - ++__result; - return __result; -} -#endif - - -/* Find the first occurrence in S of any character in ACCEPT. */ -#if !defined _HAVE_STRING_ARCH_strpbrk || defined _FORCE_INLINES -# ifndef _HAVE_STRING_ARCH_strpbrk -# define strpbrk(s, accept) \ - __extension__ \ - ({ char __a0, __a1, __a2; \ - (__builtin_constant_p (accept) && __string2_1bptr_p (accept) \ - ? ((__a0 = ((__const char *) (accept))[0], __a0 == '\0') \ - ? ((void) (s), NULL) \ - : ((__a1 = ((__const char *) (accept))[1], __a1 == '\0') \ - ? strchr (s, __a0) \ - : ((__a2 = ((__const char *) (accept))[2], __a2 == '\0') \ - ? __strpbrk_c2 (s, __a0, __a1) \ - : (((__const char *) (accept))[3] == '\0' \ - ? __strpbrk_c3 (s, __a0, __a1, __a2) \ - : strpbrk (s, accept))))) \ - : strpbrk (s, accept)); }) -# endif - -__STRING_INLINE char *__strpbrk_c2 (__const char *__s, int __accept1, - int __accept2); -__STRING_INLINE char * -__strpbrk_c2 (__const char *__s, int __accept1, int __accept2) -{ - /* Please note that __accept1 and __accept2 never can be '\0'. */ - while (*__s != '\0' && *__s != __accept1 && *__s != __accept2) - ++__s; - return *__s == '\0' ? NULL : (char *) (size_t) __s; -} - -__STRING_INLINE char *__strpbrk_c3 (__const char *__s, int __accept1, - int __accept2, int __accept3); -__STRING_INLINE char * -__strpbrk_c3 (__const char *__s, int __accept1, int __accept2, - int __accept3) -{ - /* Please note that __accept1 to __accept3 never can be '\0'. */ - while (*__s != '\0' && *__s != __accept1 && *__s != __accept2 - && *__s != __accept3) - ++__s; - return *__s == '\0' ? NULL : (char *) (size_t) __s; -} -#endif - - -/* Find the first occurrence of NEEDLE in HAYSTACK. Newer gcc versions - do this itself. */ -#if !defined _HAVE_STRING_ARCH_strstr && !__GNUC_PREREQ (2, 97) -# define strstr(haystack, needle) \ - (__extension__ (__builtin_constant_p (needle) && __string2_1bptr_p (needle) \ - ? (((__const char *) (needle))[0] == '\0' \ - ? (char *) (size_t) (haystack) \ - : (((__const char *) (needle))[1] == '\0' \ - ? strchr (haystack, \ - ((__const char *) (needle))[0]) \ - : strstr (haystack, needle))) \ - : strstr (haystack, needle))) -#endif - - -#if !defined _HAVE_STRING_ARCH_strtok_r || defined _FORCE_INLINES -# ifndef _HAVE_STRING_ARCH_strtok_r -# define __strtok_r(s, sep, nextp) \ - (__extension__ (__builtin_constant_p (sep) && __string2_1bptr_p (sep) \ - ? (((__const char *) (sep))[0] != '\0' \ - && ((__const char *) (sep))[1] == '\0' \ - ? __strtok_r_1c (s, ((__const char *) (sep))[0], nextp) \ - : __strtok_r (s, sep, nextp)) \ - : __strtok_r (s, sep, nextp))) -# endif - -__STRING_INLINE char *__strtok_r_1c (char *__s, char __sep, char **__nextp); -__STRING_INLINE char * -__strtok_r_1c (char *__s, char __sep, char **__nextp) -{ - char *__result; - if (__s == NULL) - __s = *__nextp; - while (*__s == __sep) - ++__s; - __result = NULL; - if (*__s != '\0') - { - __result = __s++; - while (*__s != '\0') - if (*__s++ == __sep) - { - __s[-1] = '\0'; - break; - } - *__nextp = __s; - } - return __result; -} -# if defined __USE_POSIX || defined __USE_MISC -# define strtok_r(s, sep, nextp) __strtok_r (s, sep, nextp) -# endif -#endif - - -#if !defined _HAVE_STRING_ARCH_strsep || defined _FORCE_INLINES -# ifndef _HAVE_STRING_ARCH_strsep - -extern char *__strsep_g (char **__stringp, __const char *__delim); -# define __strsep(s, reject) \ - __extension__ \ - ({ char __r0, __r1, __r2; \ - (__builtin_constant_p (reject) && __string2_1bptr_p (reject) \ - && (__r0 = ((__const char *) (reject))[0], \ - ((__const char *) (reject))[0] != '\0') \ - ? ((__r1 = ((__const char *) (reject))[1], \ - ((__const char *) (reject))[1] == '\0') \ - ? __strsep_1c (s, __r0) \ - : ((__r2 = ((__const char *) (reject))[2], __r2 == '\0') \ - ? __strsep_2c (s, __r0, __r1) \ - : (((__const char *) (reject))[3] == '\0' \ - ? __strsep_3c (s, __r0, __r1, __r2) \ - : __strsep_g (s, reject)))) \ - : __strsep_g (s, reject)); }) -# endif - -__STRING_INLINE char *__strsep_1c (char **__s, char __reject); -__STRING_INLINE char * -__strsep_1c (char **__s, char __reject) -{ - register char *__retval = *__s; - if (__retval != NULL && (*__s = strchr (__retval, __reject)) != NULL) - *(*__s)++ = '\0'; - return __retval; -} - -__STRING_INLINE char *__strsep_2c (char **__s, char __reject1, char __reject2); -__STRING_INLINE char * -__strsep_2c (char **__s, char __reject1, char __reject2) -{ - register char *__retval = *__s; - if (__retval != NULL) - { - register char *__cp = __retval; - while (1) - { - if (*__cp == '\0') - { - __cp = NULL; - break; - } - if (*__cp == __reject1 || *__cp == __reject2) - { - *__cp++ = '\0'; - break; - } - ++__cp; - } - *__s = __cp; - } - return __retval; -} - -__STRING_INLINE char *__strsep_3c (char **__s, char __reject1, char __reject2, - char __reject3); -__STRING_INLINE char * -__strsep_3c (char **__s, char __reject1, char __reject2, char __reject3) -{ - register char *__retval = *__s; - if (__retval != NULL) - { - register char *__cp = __retval; - while (1) - { - if (*__cp == '\0') - { - __cp = NULL; - break; - } - if (*__cp == __reject1 || *__cp == __reject2 || *__cp == __reject3) - { - *__cp++ = '\0'; - break; - } - ++__cp; - } - *__s = __cp; - } - return __retval; -} -# ifdef __USE_BSD -# define strsep(s, reject) __strsep (s, reject) -# endif -#endif - -/* We need the memory allocation functions for inline strdup(). - Referring to stdlib.h (even minimally) is not allowed - in any of the tight standards compliant modes. */ -#ifdef __USE_MISC - -# if !defined _HAVE_STRING_ARCH_strdup || !defined _HAVE_STRING_ARCH_strndup -# define __need_malloc_and_calloc -# include <stdlib.h> -# endif - -# ifndef _HAVE_STRING_ARCH_strdup - -extern char *__strdup (__const char *__string) __THROW __attribute_malloc__; -# define __strdup(s) \ - (__extension__ (__builtin_constant_p (s) && __string2_1bptr_p (s) \ - ? (((__const char *) (s))[0] == '\0' \ - ? (char *) calloc (1, 1) \ - : ({ size_t __len = strlen (s) + 1; \ - char *__retval = (char *) malloc (__len); \ - if (__retval != NULL) \ - __retval = (char *) memcpy (__retval, s, __len); \ - __retval; })) \ - : __strdup (s))) - -# if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN_EXTENDED -# define strdup(s) __strdup (s) -# endif -# endif - -# ifndef _HAVE_STRING_ARCH_strndup - -extern char *__strndup (__const char *__string, size_t __n) - __THROW __attribute_malloc__; -# define __strndup(s, n) \ - (__extension__ (__builtin_constant_p (s) && __string2_1bptr_p (s) \ - ? (((__const char *) (s))[0] == '\0' \ - ? (char *) calloc (1, 1) \ - : ({ size_t __len = strlen (s) + 1; \ - size_t __n = (n); \ - char *__retval; \ - if (__n < __len) \ - __len = __n; \ - __retval = (char *) malloc (__len); \ - if (__retval != NULL) \ - { \ - __retval[__len - 1] = '\0'; \ - __retval = (char *) memcpy (__retval, s, \ - __len - 1); \ - } \ - __retval; })) \ - : __strndup (s, n))) - -# ifdef __USE_GNU -# define strndup(s, n) __strndup (s, n) -# endif -# endif - -#endif /* Use misc. or use GNU. */ - -#ifndef _FORCE_INLINES -# undef __STRING_INLINE -#endif - -#endif /* No string inlines. */ diff --git a/libc/sysdeps/linux/v850/bits/stropts.h b/libc/sysdeps/linux/v850/bits/stropts.h deleted file mode 100644 index 21538c31d..000000000 --- a/libc/sysdeps/linux/v850/bits/stropts.h +++ /dev/null @@ -1,227 +0,0 @@ -/* Copyright (C) 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. */ - -#ifndef _BITS_STROPTS_H -#define _BITS_STROPTS_H 1 - -#include <bits/types.h> - -/* Macros used as `request' argument to `ioctl'. */ -#define __SID ('S' << 8) - -#define I_NREAD (__SID | 1) /* Counts the number of data bytes in the data - block in the first message. */ -#define I_PUSH (__SID | 2) /* Push STREAMS module onto top of the current - STREAM, just below the STREAM head. */ -#define I_POP (__SID | 3) /* Remove STREAMS module from just below the - STREAM head. */ -#define I_LOOK (__SID | 4) /* Retrieve the name of the module just below - the STREAM head and place it in a character - string. */ -#define I_FLUSH (__SID | 5) /* Flush all input and/or output. */ -#define I_SRDOPT (__SID | 6) /* Sets the read mode. */ -#define I_GRDOPT (__SID | 7) /* Returns the current read mode setting. */ -#define I_STR (__SID | 8) /* Construct an internal STREAMS `ioctl' - message and send that message downstream. */ -#define I_SETSIG (__SID | 9) /* Inform the STREAM head that the process - wants the SIGPOLL signal issued. */ -#define I_GETSIG (__SID |10) /* Return the events for which the calling - process is currently registered to be sent - a SIGPOLL signal. */ -#define I_FIND (__SID |11) /* Compares the names of all modules currently - present in the STREAM to the name pointed to - by `arg'. */ -#define I_LINK (__SID |12) /* Connect two STREAMs. */ -#define I_UNLINK (__SID |13) /* Disconnects the two STREAMs. */ -#define I_PEEK (__SID |15) /* Allows a process to retrieve the information - in the first message on the STREAM head read - queue without taking the message off the - queue. */ -#define I_FDINSERT (__SID |16) /* Create a message from the specified - buffer(s), adds information about another - STREAM, and send the message downstream. */ -#define I_SENDFD (__SID |17) /* Requests the STREAM associated with `fildes' - to send a message, containing a file - pointer, to the STREAM head at the other end - of a STREAMS pipe. */ -#define I_RECVFD (__SID |14) /* Non-EFT definition. */ -#define I_SWROPT (__SID |19) /* Set the write mode. */ -#define I_GWROPT (__SID |20) /* Return the current write mode setting. */ -#define I_LIST (__SID |21) /* List all the module names on the STREAM, up - to and including the topmost driver name. */ -#define I_PLINK (__SID |22) /* Connect two STREAMs with a persistent - link. */ -#define I_PUNLINK (__SID |23) /* Disconnect the two STREAMs that were - connected with a persistent link. */ -#define I_FLUSHBAND (__SID |28) /* Flush only band specified. */ -#define I_CKBAND (__SID |29) /* Check if the message of a given priority - band exists on the STREAM head read - queue. */ -#define I_GETBAND (__SID |30) /* Return the priority band of the first - message on the STREAM head read queue. */ -#define I_ATMARK (__SID |31) /* See if the current message on the STREAM - head read queue is "marked" by some module - downstream. */ -#define I_SETCLTIME (__SID |32) /* Set the time the STREAM head will delay when - a STREAM is closing and there is data on - the write queues. */ -#define I_GETCLTIME (__SID |33) /* Get current value for closing timeout. */ -#define I_CANPUT (__SID |34) /* Check if a certain band is writable. */ - - -/* Used in `I_LOOK' request. */ -#define FMNAMESZ 8 /* compatibility w/UnixWare/Solaris. */ - -/* Flush options. */ -#define FLUSHR 0x01 /* Flush read queues. */ -#define FLUSHW 0x02 /* Flush write queues. */ -#define FLUSHRW 0x03 /* Flush read and write queues. */ -#ifdef __USE_GNU -# define FLUSHBAND 0x04 /* Flush only specified band. */ -#endif - -/* Possible arguments for `I_SETSIG'. */ -#define S_INPUT 0x0001 /* A message, other than a high-priority - message, has arrived. */ -#define S_HIPRI 0x0002 /* A high-priority message is present. */ -#define S_OUTPUT 0x0004 /* The write queue for normal data is no longer - full. */ -#define S_MSG 0x0008 /* A STREAMS signal message that contains the - SIGPOLL signal reaches the front of the - STREAM head read queue. */ -#define S_ERROR 0x0010 /* Notification of an error condition. */ -#define S_HANGUP 0x0020 /* Notification of a hangup. */ -#define S_RDNORM 0x0040 /* A normal message has arrived. */ -#define S_WRNORM S_OUTPUT -#define S_RDBAND 0x0080 /* A message with a non-zero priority has - arrived. */ -#define S_WRBAND 0x0100 /* The write queue for a non-zero priority - band is no longer full. */ -#define S_BANDURG 0x0200 /* When used in conjunction with S_RDBAND, - SIGURG is generated instead of SIGPOLL when - a priority message reaches the front of the - STREAM head read queue. */ - -/* Option for `I_PEEK'. */ -#define RS_HIPRI 0x01 /* Only look for high-priority messages. */ - -/* Options for `I_SRDOPT'. */ -#define RNORM 0x0000 /* Byte-STREAM mode, the default. */ -#define RMSGD 0x0001 /* Message-discard mode. */ -#define RMSGN 0x0002 /* Message-nondiscard mode. */ -#define RPROTDAT 0x0004 /* Deliver the control part of a message as - data. */ -#define RPROTDIS 0x0008 /* Discard the control part of a message, - delivering any data part. */ -#define RPROTNORM 0x0010 /* Fail `read' with EBADMSG if a message - containing a control part is at the front - of the STREAM head read queue. */ -#ifdef __USE_GNU -# define RPROTMASK 0x001C /* The RPROT bits */ -#endif - -/* Possible mode for `I_SWROPT'. */ -#define SNDZERO 0x001 /* Send a zero-length message downstream when a - `write' of 0 bytes occurs. */ -#ifdef __USE_GNU -# define SNDPIPE 0x002 /* Send SIGPIPE on write and putmsg if - sd_werror is set. */ -#endif - -/* Arguments for `I_ATMARK'. */ -#define ANYMARK 0x01 /* Check if the message is marked. */ -#define LASTMARK 0x02 /* Check if the message is the last one marked - on the queue. */ - -/* Argument for `I_UNLINK'. */ -#ifdef __USE_GNU -# define MUXID_ALL (-1) /* Unlink all STREAMs linked to the STREAM - associated with `fildes'. */ -#endif - - -/* Macros for `getmsg', `getpmsg', `putmsg' and `putpmsg'. */ -#define MSG_HIPRI 0x01 /* Send/receive high priority message. */ -#define MSG_ANY 0x02 /* Receive any message. */ -#define MSG_BAND 0x04 /* Receive message from specified band. */ - -/* Values returned by getmsg and getpmsg */ -#define MORECTL 1 /* More control information is left in - message. */ -#define MOREDATA 2 /* More data is left in message. */ - - -/* Structure used for the I_FLUSHBAND ioctl on streams. */ -struct bandinfo - { - unsigned char bi_pri; - int bi_flag; - }; - -struct strbuf - { - int maxlen; /* Maximum buffer length. */ - int len; /* Length of data. */ - char *buf; /* Pointer to buffer. */ - }; - -struct strpeek - { - struct strbuf ctlbuf; - struct strbuf databuf; - t_uscalar_t flags; /* UnixWare/Solaris compatibility. */ - }; - -struct strfdinsert - { - struct strbuf ctlbuf; - struct strbuf databuf; - t_uscalar_t flags; /* UnixWare/Solaris compatibility. */ - int fildes; - int offset; - }; - -struct strioctl - { - int ic_cmd; - int ic_timout; - int ic_len; - char *ic_dp; - }; - -struct strrecvfd - { - int fd; - uid_t uid; - gid_t gid; - char __fill[8]; /* UnixWare/Solaris compatibility */ - }; - - -struct str_mlist - { - char l_name[FMNAMESZ + 1]; - }; - -struct str_list - { - int sl_nmods; - struct str_mlist *sl_modlist; - }; - -#endif /* bits/stropts.h */ diff --git a/libc/sysdeps/linux/v850/bits/termios.h b/libc/sysdeps/linux/v850/bits/termios.h deleted file mode 100644 index 887b309ad..000000000 --- a/libc/sysdeps/linux/v850/bits/termios.h +++ /dev/null @@ -1,213 +0,0 @@ -/* termios type and macro definitions. Linux version. - Copyright (C) 1993, 94, 95, 96, 97, 98, 99 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 _TERMIOS_H -# error "Never include <bits/termios.h> directly; use <termios.h> instead." -#endif - -typedef unsigned char cc_t; -typedef unsigned int speed_t; -typedef unsigned int tcflag_t; - -#define NCCS 32 -struct termios - { - tcflag_t c_iflag; /* input mode flags */ - tcflag_t c_oflag; /* output mode flags */ - tcflag_t c_cflag; /* control mode flags */ - tcflag_t c_lflag; /* local mode flags */ - cc_t c_line; /* line discipline */ - cc_t c_cc[NCCS]; /* control characters */ - speed_t c_ispeed; /* input speed */ - speed_t c_ospeed; /* output speed */ - }; - -/* c_cc characters */ -#define VINTR 0 -#define VQUIT 1 -#define VERASE 2 -#define VKILL 3 -#define VEOF 4 -#define VTIME 5 -#define VMIN 6 -#define VSWTC 7 -#define VSTART 8 -#define VSTOP 9 -#define VSUSP 10 -#define VEOL 11 -#define VREPRINT 12 -#define VDISCARD 13 -#define VWERASE 14 -#define VLNEXT 15 -#define VEOL2 16 - -/* c_iflag bits */ -#define IGNBRK 0000001 -#define BRKINT 0000002 -#define IGNPAR 0000004 -#define PARMRK 0000010 -#define INPCK 0000020 -#define ISTRIP 0000040 -#define INLCR 0000100 -#define IGNCR 0000200 -#define ICRNL 0000400 -#define IUCLC 0001000 -#define IXON 0002000 -#define IXANY 0004000 -#define IXOFF 0010000 -#define IMAXBEL 0020000 - -/* c_oflag bits */ -#define OPOST 0000001 -#define OLCUC 0000002 -#define ONLCR 0000004 -#define OCRNL 0000010 -#define ONOCR 0000020 -#define ONLRET 0000040 -#define OFILL 0000100 -#define OFDEL 0000200 -#if defined __USE_MISC || defined __USE_XOPEN -# define NLDLY 0000400 -# define NL0 0000000 -# define NL1 0000400 -# define CRDLY 0003000 -# define CR0 0000000 -# define CR1 0001000 -# define CR2 0002000 -# define CR3 0003000 -# define TABDLY 0014000 -# define TAB0 0000000 -# define TAB1 0004000 -# define TAB2 0010000 -# define TAB3 0014000 -# define BSDLY 0020000 -# define BS0 0000000 -# define BS1 0020000 -# define FFDLY 0100000 -# define FF0 0000000 -# define FF1 0100000 -#endif - -#define VTDLY 0040000 -#define VT0 0000000 -#define VT1 0040000 - -#ifdef __USE_MISC -# define XTABS 0014000 -#endif - -/* c_cflag bit meaning */ -#ifdef __USE_MISC -# define CBAUD 0010017 -#endif -#define B0 0000000 /* hang up */ -#define B50 0000001 -#define B75 0000002 -#define B110 0000003 -#define B134 0000004 -#define B150 0000005 -#define B200 0000006 -#define B300 0000007 -#define B600 0000010 -#define B1200 0000011 -#define B1800 0000012 -#define B2400 0000013 -#define B4800 0000014 -#define B9600 0000015 -#define B19200 0000016 -#define B38400 0000017 -#ifdef __USE_MISC -# define EXTA B19200 -# define EXTB B38400 -#endif -#define CSIZE 0000060 -#define CS5 0000000 -#define CS6 0000020 -#define CS7 0000040 -#define CS8 0000060 -#define CSTOPB 0000100 -#define CREAD 0000200 -#define PARENB 0000400 -#define PARODD 0001000 -#define HUPCL 0002000 -#define CLOCAL 0004000 -#ifdef __USE_MISC -# define CBAUDEX 0010000 -#endif -#define B57600 0010001 -#define B115200 0010002 -#define B230400 0010003 -#define B460800 0010004 -#define B500000 0010005 -#define B576000 0010006 -#define B921600 0010007 -#define B1000000 0010010 -#define B1152000 0010011 -#define B1500000 0010012 -#define B2000000 0010013 -#define B2500000 0010014 -#define B3000000 0010015 -#define B3500000 0010016 -#define B4000000 0010017 -#define __MAX_BAUD B4000000 -#ifdef __USE_MISC -# define CIBAUD 002003600000 /* input baud rate (not used) */ -# define CRTSCTS 020000000000 /* flow control */ -#endif - -/* c_lflag bits */ -#define ISIG 0000001 -#define ICANON 0000002 -#if defined __USE_MISC || defined __USE_XOPEN -# define XCASE 0000004 -#endif -#define ECHO 0000010 -#define ECHOE 0000020 -#define ECHOK 0000040 -#define ECHONL 0000100 -#define NOFLSH 0000200 -#define TOSTOP 0000400 -#ifdef __USE_MISC -# define ECHOCTL 0001000 -# define ECHOPRT 0002000 -# define ECHOKE 0004000 -# define FLUSHO 0010000 -# define PENDIN 0040000 -#endif -#define IEXTEN 0100000 - -/* tcflow() and TCXONC use these */ -#define TCOOFF 0 -#define TCOON 1 -#define TCIOFF 2 -#define TCION 3 - -/* tcflush() and TCFLSH use these */ -#define TCIFLUSH 0 -#define TCOFLUSH 1 -#define TCIOFLUSH 2 - -/* tcsetattr uses these */ -#define TCSANOW 0 -#define TCSADRAIN 1 -#define TCSAFLUSH 2 - - -#define _IOT_termios /* Hurd ioctl type field. */ \ - _IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2) diff --git a/libc/sysdeps/linux/v850/bits/time.h b/libc/sysdeps/linux/v850/bits/time.h deleted file mode 100644 index 2a6873f00..000000000 --- a/libc/sysdeps/linux/v850/bits/time.h +++ /dev/null @@ -1,69 +0,0 @@ -/* System-dependent timing definitions. Linux version. - Copyright (C) 1996, 1997, 1999, 2000, 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. */ - -/* - * Never include this file directly; use <time.h> instead. - */ - -#ifndef __need_timeval -# ifndef _BITS_TIME_H -# define _BITS_TIME_H 1 - -/* ISO/IEC 9899:1990 7.12.1: <time.h> - The macro `CLOCKS_PER_SEC' is the number per second of the value - returned by the `clock' function. */ -/* CAE XSH, Issue 4, Version 2: <time.h> - The value of CLOCKS_PER_SEC is required to be 1 million on all - XSI-conformant systems. */ -# define CLOCKS_PER_SEC 1000000l - -# if !defined __STRICT_ANSI__ && !defined __USE_XOPEN2K -/* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK - presents the real value for clock ticks per second for the system. */ -# include <bits/types.h> -extern long int __sysconf (int); -# define CLK_TCK ((__clock_t) __sysconf (2)) /* 2 is _SC_CLK_TCK */ -# endif - -# ifdef __USE_POSIX199309 -/* Identifier for system-wide realtime clock. */ -# define CLOCK_REALTIME 0 - -/* Flag to indicate time is absolute. */ -# define TIMER_ABSTIME 1 -# endif - -# endif /* bits/time.h */ -#endif - -#ifdef __need_timeval -# undef __need_timeval -# ifndef _STRUCT_TIMEVAL -# define _STRUCT_TIMEVAL 1 -# include <bits/types.h> - -/* A time value that is accurate to the nearest - microsecond but also has a range of years. */ -struct timeval - { - __time_t tv_sec; /* Seconds. */ - __suseconds_t tv_usec; /* Microseconds. */ - }; -# endif /* struct timeval */ -#endif /* need timeval */ diff --git a/libc/sysdeps/linux/v850/bits/types.h b/libc/sysdeps/linux/v850/bits/types.h deleted file mode 100644 index 4e5580110..000000000 --- a/libc/sysdeps/linux/v850/bits/types.h +++ /dev/null @@ -1,146 +0,0 @@ -/* Copyright (C) 1991,92,94,95,96,97,98,99, 01 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. */ - -/* - * Never include this file directly; use <sys/types.h> instead. - */ - -#ifndef _BITS_TYPES_H -#define _BITS_TYPES_H 1 - -#include <features.h> - -#define __need_size_t -#include <stddef.h> - -/* Convenience types. */ -typedef unsigned char __u_char; -typedef unsigned short __u_short; -typedef unsigned int __u_int; -typedef unsigned long __u_long; -#ifdef __GNUC__ -__extension__ typedef unsigned long long int __u_quad_t; -__extension__ typedef long long int __quad_t; -#else -typedef struct - { - long int __val[2]; - } __quad_t; -typedef struct - { - __u_long __val[2]; - } __u_quad_t; -#endif -typedef signed char __int8_t; -typedef unsigned char __uint8_t; -typedef signed short int __int16_t; -typedef unsigned short int __uint16_t; -typedef signed int __int32_t; -typedef unsigned int __uint32_t; -#ifdef __GNUC__ -__extension__ typedef signed long long int __int64_t; -__extension__ typedef unsigned long long int __uint64_t; -#endif -typedef __quad_t *__qaddr_t; - -typedef __u_quad_t __dev_t; /* Type of device numbers. */ -typedef __u_int __uid_t; /* Type of user identifications. */ -typedef __u_int __gid_t; /* Type of group identifications. */ -typedef __u_long __ino_t; /* Type of file serial numbers. */ -typedef __u_int __mode_t; /* Type of file attribute bitmasks. */ -typedef __u_int __nlink_t; /* Type of file link counts. */ -typedef long int __off_t; /* Type of file sizes and offsets. */ -typedef __quad_t __loff_t; /* Type of file sizes and offsets. */ -typedef int __pid_t; /* Type of process identifications. */ -typedef int __ssize_t; /* Type of a byte count, or error. */ -typedef __u_long __rlim_t; /* Type of resource counts. */ -typedef __u_quad_t __rlim64_t; /* Type of resource counts (LFS). */ -typedef __u_int __id_t; /* General type for ID. */ - -typedef struct - { - int __val[2]; - } __fsid_t; /* Type of file system IDs. */ - -/* Everythin' else. */ -typedef int __daddr_t; /* The type of a disk address. */ -typedef char *__caddr_t; -typedef long int __time_t; -typedef unsigned int __useconds_t; -typedef long int __suseconds_t; -typedef long int __swblk_t; /* Type of a swap block maybe? */ - -typedef long int __clock_t; - -/* Clock ID used in clock and timer functions. */ -typedef int __clockid_t; - -/* Timer ID returned by `timer_create'. */ -typedef int __timer_t; - - -/* Number of descriptors that can fit in an `fd_set'. */ -#define __FD_SETSIZE 1024 - - -typedef int __key_t; - -/* Used in `struct shmid_ds'. */ -typedef unsigned short int __ipc_pid_t; - - -/* Type to represent block size. */ -typedef long int __blksize_t; - -/* Types from the Large File Support interface. */ - -/* Type to count number os disk blocks. */ -typedef long int __blkcnt_t; -typedef __quad_t __blkcnt64_t; - -/* Type to count file system blocks. */ -typedef __u_long __fsblkcnt_t; -typedef __u_quad_t __fsblkcnt64_t; - -/* Type to count file system inodes. */ -typedef __u_long __fsfilcnt_t; -typedef __u_quad_t __fsfilcnt64_t; - -/* Type of file serial numbers. */ -typedef __u_quad_t __ino64_t; - -/* Type of file sizes and offsets. */ -typedef __loff_t __off64_t; - -/* Used in XTI. */ -typedef long int __t_scalar_t; -typedef unsigned long int __t_uscalar_t; - -/* Duplicates info from stdint.h but this is used in unistd.h. */ -typedef int __intptr_t; - -/* Duplicate info from sys/socket.h. */ -typedef unsigned int __socklen_t; - - -/* Now add the thread types. */ -#if defined __USE_POSIX199506 || defined __USE_UNIX98 -# include <bits/pthreadtypes.h> -#endif - -#endif /* bits/types.h */ diff --git a/libc/sysdeps/linux/v850/bits/uio.h b/libc/sysdeps/linux/v850/bits/uio.h deleted file mode 100644 index 84b4805fe..000000000 --- a/libc/sysdeps/linux/v850/bits/uio.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (C) 1996, 1997 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 _SYS_UIO_H -# error "Never include <bits/uio.h> directly; use <sys/uio.h> instead." -#endif - - -#include <sys/types.h> - - -/* We should normally use the Linux kernel header file to define this - type and macros but this calls for trouble because of the header - includes other kernel headers. */ - -/* Size of object which can be written atomically. - - This macro has different values in different kernel versions. The - latest versions of ther kernel use 1024 and this is good choice. Since - the C library implementation of readv/writev is able to emulate the - functionality even if the currently running kernel does not support - this large value the readv/writev call will not fail because of this. */ -#define UIO_MAXIOV 1024 - - -/* Structure for scatter/gather I/O. */ -struct iovec - { - void *iov_base; /* Pointer to data. */ - size_t iov_len; /* Length of data. */ - }; diff --git a/libc/sysdeps/linux/v850/bits/ustat.h b/libc/sysdeps/linux/v850/bits/ustat.h deleted file mode 100644 index aeafc22a5..000000000 --- a/libc/sysdeps/linux/v850/bits/ustat.h +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 1997 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. */ - -#include <sys/types.h> - -struct ustat - { - __daddr_t f_tfree; - __ino_t f_tinode; - char f_fname[6]; - char f_fpack[6]; - }; diff --git a/libc/sysdeps/linux/v850/bits/utmp.h b/libc/sysdeps/linux/v850/bits/utmp.h deleted file mode 100644 index 2ed29bbb4..000000000 --- a/libc/sysdeps/linux/v850/bits/utmp.h +++ /dev/null @@ -1,106 +0,0 @@ -/* The `struct utmp' type, describing entries in the utmp file. GNU version. - Copyright (C) 1993, 1996, 1997, 1998, 1999 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 _UTMP_H -# error "Never include <bits/utmp.h> directly; use <utmp.h> instead." -#endif - -#include <paths.h> -#include <sys/time.h> -#include <sys/types.h> - - -#define UT_LINESIZE 32 -#define UT_NAMESIZE 32 -#define UT_HOSTSIZE 256 - - -/* The structure describing an entry in the database of - previous logins. */ -struct lastlog - { - __time_t ll_time; - char ll_line[UT_LINESIZE]; - char ll_host[UT_HOSTSIZE]; - }; - - -/* The structure describing the status of a terminated process. This - type is used in `struct utmp' below. */ -struct exit_status - { - short int e_termination; /* Process termination status. */ - short int e_exit; /* Process exit status. */ - }; - - -/* The structure describing an entry in the user accounting database. */ -struct utmp -{ - short int ut_type; /* Type of login. */ - pid_t ut_pid; /* Process ID of login process. */ - char ut_line[UT_LINESIZE]; /* Devicename. */ - char ut_id[4]; /* Inittab ID. */ - char ut_user[UT_NAMESIZE]; /* Username. */ - char ut_host[UT_HOSTSIZE]; /* Hostname for remote login. */ - struct exit_status ut_exit; /* Exit status of a process marked - as DEAD_PROCESS. */ - long int ut_session; /* Session ID, used for windowing. */ - struct timeval ut_tv; /* Time entry was made. */ - int32_t ut_addr_v6[4]; /* Internet address of remote host. */ - char __unused[20]; /* Reserved for future use. */ -}; - -/* Backwards compatibility hacks. */ -#define ut_name ut_user -#ifndef _NO_UT_TIME -/* We have a problem here: `ut_time' is also used otherwise. Define - _NO_UT_TIME if the compiler complains. */ -# define ut_time ut_tv.tv_sec -#endif -#define ut_xtime ut_tv.tv_sec -#define ut_addr ut_addr_v6[0] - - -/* Values for the `ut_type' field of a `struct utmp'. */ -#define EMPTY 0 /* No valid user accounting information. */ - -#define RUN_LVL 1 /* The system's runlevel. */ -#define BOOT_TIME 2 /* Time of system boot. */ -#define NEW_TIME 3 /* Time after system clock changed. */ -#define OLD_TIME 4 /* Time when system clock changed. */ - -#define INIT_PROCESS 5 /* Process spawned by the init process. */ -#define LOGIN_PROCESS 6 /* Session leader of a logged in user. */ -#define USER_PROCESS 7 /* Normal process. */ -#define DEAD_PROCESS 8 /* Terminated process. */ - -#define ACCOUNTING 9 - -/* Old Linux name for the EMPTY type. */ -#define UT_UNKNOWN EMPTY - - -/* Tell the user that we have a modern system with UT_HOST, UT_PID, - UT_TYPE, UT_ID and UT_TV fields. */ -#define _HAVE_UT_TYPE 1 -#define _HAVE_UT_PID 1 -#define _HAVE_UT_ID 1 -#define _HAVE_UT_TV 1 -#define _HAVE_UT_HOST 1 diff --git a/libc/sysdeps/linux/v850/bits/utmpx.h b/libc/sysdeps/linux/v850/bits/utmpx.h deleted file mode 100644 index 99735370b..000000000 --- a/libc/sysdeps/linux/v850/bits/utmpx.h +++ /dev/null @@ -1,89 +0,0 @@ -/* Structures and definitions for the user accounting database. GNU version. - Copyright (C) 1997, 1998, 2000, 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. */ - -#ifndef _UTMPX_H -# error "Never include <bits/utmpx.h> directly; use <utmpx.h> instead." -#endif - -#include <bits/types.h> -#include <sys/time.h> - - -#ifdef __USE_GNU -# include <paths.h> -# define _PATH_UTMPX _PATH_UTMP -# define _PATH_WTMPX _PATH_WTMP -#endif - - -#define __UT_LINESIZE 32 -#define __UT_NAMESIZE 32 -#define __UT_HOSTSIZE 256 - - -/* The structure describing the status of a terminated process. This - type is used in `struct utmpx' below. */ -struct __exit_status - { -#ifdef __USE_GNU - short int e_termination; /* Process termination status. */ - short int e_exit; /* Process exit status. */ -#else - short int __e_termination; /* Process termination status. */ - short int __e_exit; /* Process exit status. */ -#endif - }; - - -/* The structure describing an entry in the user accounting database. */ -struct utmpx -{ - short int ut_type; /* Type of login. */ - __pid_t ut_pid; /* Process ID of login process. */ - char ut_line[__UT_LINESIZE]; /* Devicename. */ - char ut_id[4]; /* Inittab ID. */ - char ut_user[__UT_NAMESIZE]; /* Username. */ - char ut_host[__UT_HOSTSIZE]; /* Hostname for remote login. */ - struct __exit_status ut_exit; /* Exit status of a process marked - as DEAD_PROCESS. */ - long int ut_session; /* Session ID, used for windowing. */ - struct timeval ut_tv; /* Time entry was made. */ - __int32_t ut_addr_v6[4]; /* Internet address of remote host. */ - char __unused[20]; /* Reserved for future use. */ -}; - - -/* Values for the `ut_type' field of a `struct utmpx'. */ -#define EMPTY 0 /* No valid user accounting information. */ - -#ifdef __USE_GNU -# define RUN_LVL 1 /* The system's runlevel. */ -#endif -#define BOOT_TIME 2 /* Time of system boot. */ -#define NEW_TIME 3 /* Time after system clock changed. */ -#define OLD_TIME 4 /* Time when system clock changed. */ - -#define INIT_PROCESS 5 /* Process spawned by the init process. */ -#define LOGIN_PROCESS 6 /* Session leader of a logged in user. */ -#define USER_PROCESS 7 /* Normal process. */ -#define DEAD_PROCESS 8 /* Terminated process. */ - -#ifdef __USE_GNU -# define ACCOUNTING 9 /* System accounting. */ -#endif diff --git a/libc/sysdeps/linux/v850/bits/utsname.h b/libc/sysdeps/linux/v850/bits/utsname.h deleted file mode 100644 index 35e71e3ba..000000000 --- a/libc/sysdeps/linux/v850/bits/utsname.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 1995, 1996, 1997 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 _SYS_UTSNAME_H -# error "Never include <bits/utsname.h> directly; use <sys/utsname.h> instead." -#endif - -/* Length of the entries in `struct utsname' is 65. */ -#define _UTSNAME_LENGTH 65 - -/* Linux provides as additional information in the `struct utsname' - the name of the current domain. Define _UTSNAME_DOMAIN_LENGTH - to a value != 0 to activate this entry. */ -#define _UTSNAME_DOMAIN_LENGTH _UTSNAME_LENGTH diff --git a/libc/sysdeps/linux/v850/bits/waitflags.h b/libc/sysdeps/linux/v850/bits/waitflags.h deleted file mode 100644 index 1303c6c36..000000000 --- a/libc/sysdeps/linux/v850/bits/waitflags.h +++ /dev/null @@ -1,30 +0,0 @@ -/* Definitions of flag bits for `waitpid' et al. - Copyright (C) 1992, 1996, 1997, 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. */ - -#if !defined _SYS_WAIT_H && !defined _STDLIB_H -# error "Never include <bits/waitflags.h> directly; use <sys/wait.h> instead." -#endif - - -/* Bits in the third argument to `waitpid'. */ -#define WNOHANG 1 /* Don't block waiting. */ -#define WUNTRACED 2 /* Report status of stopped children. */ - -#define __WALL 0x40000000 /* Wait for any child. */ -#define __WCLONE 0x80000000 /* Wait for cloned process. */ diff --git a/libc/sysdeps/linux/v850/bits/waitstatus.h b/libc/sysdeps/linux/v850/bits/waitstatus.h deleted file mode 100644 index 982c9dbb2..000000000 --- a/libc/sysdeps/linux/v850/bits/waitstatus.h +++ /dev/null @@ -1,104 +0,0 @@ -/* Definitions of status bits for `wait' et al. - Copyright (C) 1992, 1994, 1996, 1997, 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. */ - -#if !defined _SYS_WAIT_H && !defined _STDLIB_H -# error "Never include <bits/waitstatus.h> directly; use <sys/wait.h> instead." -#endif - - -/* Everything extant so far uses these same bits. */ - - -/* If WIFEXITED(STATUS), the low-order 8 bits of the status. */ -#define __WEXITSTATUS(status) (((status) & 0xff00) >> 8) - -/* If WIFSIGNALED(STATUS), the terminating signal. */ -#define __WTERMSIG(status) ((status) & 0x7f) - -/* If WIFSTOPPED(STATUS), the signal that stopped the child. */ -#define __WSTOPSIG(status) __WEXITSTATUS(status) - -/* Nonzero if STATUS indicates normal termination. */ -#define __WIFEXITED(status) (__WTERMSIG(status) == 0) - -/* Nonzero if STATUS indicates termination by a signal. */ -#ifdef __GNUC__ -# define __WIFSIGNALED(status) \ - (__extension__ ({ int __status = (status); \ - !__WIFSTOPPED(__status) && !__WIFEXITED(__status); })) -#else /* Not GCC. */ -# define __WIFSIGNALED(status) (!__WIFSTOPPED(status) && !__WIFEXITED(status)) -#endif /* GCC. */ - -/* Nonzero if STATUS indicates the child is stopped. */ -#define __WIFSTOPPED(status) (((status) & 0xff) == 0x7f) - -/* Nonzero if STATUS indicates the child dumped core. */ -#define __WCOREDUMP(status) ((status) & __WCOREFLAG) - -/* Macros for constructing status values. */ -#define __W_EXITCODE(ret, sig) ((ret) << 8 | (sig)) -#define __W_STOPCODE(sig) ((sig) << 8 | 0x7f) -#define __WCOREFLAG 0x80 - - -#ifdef __USE_BSD - -# include <endian.h> - -union wait - { - int w_status; - struct - { -# if __BYTE_ORDER == __LITTLE_ENDIAN - unsigned int __w_termsig:7; /* Terminating signal. */ - unsigned int __w_coredump:1; /* Set if dumped core. */ - unsigned int __w_retcode:8; /* Return code if exited normally. */ - unsigned int:16; -# endif /* Little endian. */ -# if __BYTE_ORDER == __BIG_ENDIAN - unsigned int:16; - unsigned int __w_retcode:8; - unsigned int __w_coredump:1; - unsigned int __w_termsig:7; -# endif /* Big endian. */ - } __wait_terminated; - struct - { -# if __BYTE_ORDER == __LITTLE_ENDIAN - unsigned int __w_stopval:8; /* W_STOPPED if stopped. */ - unsigned int __w_stopsig:8; /* Stopping signal. */ - unsigned int:16; -# endif /* Little endian. */ -# if __BYTE_ORDER == __BIG_ENDIAN - unsigned int:16; - unsigned int __w_stopsig:8; /* Stopping signal. */ - unsigned int __w_stopval:8; /* W_STOPPED if stopped. */ -# endif /* Big endian. */ - } __wait_stopped; - }; - -# define w_termsig __wait_terminated.__w_termsig -# define w_coredump __wait_terminated.__w_coredump -# define w_retcode __wait_terminated.__w_retcode -# define w_stopsig __wait_stopped.__w_stopsig -# define w_stopval __wait_stopped.__w_stopval - -#endif /* Use BSD. */ diff --git a/libc/sysdeps/linux/v850/bits/xopen_lim.h b/libc/sysdeps/linux/v850/bits/xopen_lim.h deleted file mode 100644 index 7f3611860..000000000 --- a/libc/sysdeps/linux/v850/bits/xopen_lim.h +++ /dev/null @@ -1,144 +0,0 @@ -/* Copyright (C) 1996, 1997, 1999, 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. */ - -/* - * Never include this file directly; use <limits.h> instead. - */ - -/* Additional definitions from X/Open Portability Guide, Issue 4, Version 2 - System Interfaces and Headers, 4.16 <limits.h> - - Please note only the values which are not greater than the minimum - stated in the standard document are listed. The `sysconf' functions - should be used to obtain the actual value. */ - -#ifndef _XOPEN_LIM_H -#define _XOPEN_LIM_H 1 - -#define __need_IOV_MAX -#include <bits/stdio_lim.h> - -/* We do not provide fixed values for - - ARG_MAX Maximum length of argument to the `exec' function - including environment data. - - ATEXIT_MAX Maximum number of functions that may be registered - with `atexit'. - - CHILD_MAX Maximum number of simultaneous processes per real - user ID. - - OPEN_MAX Maximum number of files that one process can have open - at anyone time. - - PAGESIZE - PAGE_SIZE Size of bytes of a page. - - PASS_MAX Maximum number of significant bytes in a password. - - We only provide a fixed limit for - - IOV_MAX Maximum number of `iovec' structures that one process has - available for use with `readv' or writev'. - - if this is indeed fixed by the underlying system. -*/ - - -/* Maximum number of `iovec' structures that one process has available - for use with `readv' or writev'. */ -#define _XOPEN_IOV_MAX _POSIX_UIO_MAXIOV - - -/* Maximum value of `digit' in calls to the `printf' and `scanf' - functions. We have no limit, so return a reasonable value. */ -#define NL_ARGMAX _POSIX_ARG_MAX - -/* Maximum number of bytes in a `LANG' name. We have no limit. */ -#define NL_LANGMAX _POSIX2_LINE_MAX - -/* Maximum message number. We have no limit. */ -#define NL_MSGMAX INT_MAX - -/* Maximum number of bytes in N-to-1 collation mapping. We have no - limit. */ -#define NL_NMAX INT_MAX - -/* Maximum set number. We have no limit. */ -#define NL_SETMAX INT_MAX - -/* Maximum number of bytes in a message. We have no limit. */ -#define NL_TEXTMAX INT_MAX - -/* Default process priority. */ -#define NZERO 20 - - -/* Number of bits in a word of type `int'. */ -#ifdef INT_MAX -# if INT_MAX == 32767 -# define WORD_BIT 16 -# else -# if INT_MAX == 2147483647 -# define WORD_BIT 32 -# else -/* Safe assumption. */ -# define WORD_BIT 64 -# endif -# endif -#elif defined __INT_MAX__ -# if __INT_MAX__ == 32767 -# define WORD_BIT 16 -# else -# if __INT_MAX__ == 2147483647 -# define WORD_BIT 32 -# else -/* Safe assumption. */ -# define WORD_BIT 64 -# endif -# endif -#else -# define WORD_BIT 32 -#endif - -/* Number of bits in a word of type `long int'. */ -#ifdef LONG_MAX -# if LONG_MAX == 2147483647 -# define LONG_BIT 32 -# else -/* Safe assumption. */ -# define LONG_BIT 64 -# endif -#elif defined __LONG_MAX__ -# if __LONG_MAX__ == 2147483647 -# define LONG_BIT 32 -# else -/* Safe assumption. */ -# define LONG_BIT 64 -# endif -#else -# include <bits/wordsize.h> -# if __WORDSIZE == 64 -# define LONG_BIT 64 -# else -# define LONG_BIT 32 -# endif -#endif - -#endif /* bits/xopen_lim.h */ |