diff options
Diffstat (limited to 'newlib/libc/sys/linux/sys')
32 files changed, 0 insertions, 2344 deletions
diff --git a/newlib/libc/sys/linux/sys/_types.h b/newlib/libc/sys/linux/sys/_types.h deleted file mode 100644 index 15ccf1061..000000000 --- a/newlib/libc/sys/linux/sys/_types.h +++ /dev/null @@ -1,49 +0,0 @@ -/* ANSI C namespace clean utility typedefs */ - -/* This file defines various typedefs needed by the system calls that support - the C library. Basically, they're just the POSIX versions with an '_' - prepended. This file lives in the `sys' directory so targets can provide - their own if desired (or they can put target dependant conditionals here). -*/ - -#ifndef _SYS__TYPES_H -#define _SYS__TYPES_H - -typedef long _off_t; -__extension__ typedef long long _off64_t; - -#if defined(__INT_MAX__) && __INT_MAX__ == 2147483647 -typedef int _ssize_t; -#else -typedef long _ssize_t; -#endif - -#define __need_wint_t -#include <stddef.h> - -/* Conversion state information. */ -typedef struct -{ - int __count; - union - { - wint_t __wch; - unsigned char __wchb[4]; - } __value; /* Value so far. */ -} _mbstate_t; - -struct __flock_t_tmp; -typedef struct -{ - int __a; - int __b; - struct - { - long int __c1; - int __c2; - } __c; - int __d; - struct __flock_t_tmp * __e; -} _flock_t; - -#endif /* _SYS__TYPES_H */ diff --git a/newlib/libc/sys/linux/sys/cdefs.h b/newlib/libc/sys/linux/sys/cdefs.h deleted file mode 100644 index 459785bcb..000000000 --- a/newlib/libc/sys/linux/sys/cdefs.h +++ /dev/null @@ -1,230 +0,0 @@ -/* Copyright (C) 1992,93,94,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_CDEFS_H -#define _SYS_CDEFS_H 1 - -/* We are almost always included from features.h. */ -#ifndef _FEATURES_H -# include <features.h> -#endif - -/* The GNU libc does not support any K&R compilers or the traditional mode - of ISO C compilers anymore. Check for some of the combinations not - anymore supported. */ -#if defined __GNUC__ && !defined __STDC__ -# error "You need a ISO C conforming compiler to use the glibc headers" -#endif - -#define __FBSDID(x) /* nothing */ - -/* Some user header file might have defined this before. */ -#undef __P -#undef __PMT - -#ifdef __GNUC__ - -/* GCC can always grok prototypes. For C++ programs we add throw() - to help it optimize the function calls. But this works only with - gcc 2.8.x and egcs. */ -# if defined __cplusplus && __GNUC_PREREQ (2,8) -# define __THROW throw () -# else -# define __THROW -# endif -# define __P(args) args __THROW -/* This macro will be used for functions which might take C++ callback - functions. */ -# define __PMT(args) args - -#else /* Not GCC. */ - -# define __inline /* No inline functions. */ - -# define __THROW -# define __P(args) args -# define __PMT(args) args - -# define __const const -# define __signed signed -# define __volatile volatile - -#endif /* GCC. */ - -/* For these things, GCC behaves the ANSI way normally, - and the non-ANSI way under -traditional. */ - -#define __CONCAT(x,y) x ## y -#define __STRING(x) #x - -/* This is not a typedef so `const __ptr_t' does the right thing. */ -#define __ptr_t void * -#define __long_double_t long double - - -/* C++ needs to know that types and declarations are C, not C++. */ -#ifdef __cplusplus -# define __BEGIN_DECLS extern "C" { -# define __END_DECLS } -#else -# define __BEGIN_DECLS -# define __END_DECLS -#endif - - -/* Support for bounded pointers. */ -#ifndef __BOUNDED_POINTERS__ -# define __bounded /* nothing */ -# define __unbounded /* nothing */ -# define __ptrvalue /* nothing */ -#endif - - -/* Support for flexible arrays. */ -#if __GNUC_PREREQ (2,97) -/* GCC 2.97 supports C99 flexible array members. */ -# define __flexarr [] -#else -# ifdef __GNUC__ -# define __flexarr [0] -# else -# if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L -# define __flexarr [] -# else -/* Some other non-C99 compiler. Approximate with [1]. */ -# define __flexarr [1] -# endif -# endif -#endif - - -/* __asm__ ("xyz") is used throughout the headers to rename functions - at the assembly language level. This is wrapped by the __REDIRECT - macro, in order to support compilers that can do this some other - way. When compilers don't support asm-names at all, we have to do - preprocessor tricks instead (which don't have exactly the right - semantics, but it's the best we can do). - - Example: - int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); */ - -#if defined __GNUC__ && __GNUC__ >= 2 - -# define __REDIRECT(name, proto, alias) name proto __asm__ (__ASMNAME (#alias)) -# define __ASMNAME(cname) __ASMNAME2 (__USER_LABEL_PREFIX__, cname) -# define __ASMNAME2(prefix, cname) __STRING (prefix) cname - -/* -#elif __SOME_OTHER_COMPILER__ - -# define __REDIRECT(name, proto, alias) name proto; \ - _Pragma("let " #name " = " #alias) -*/ -#endif - -/* GCC has various useful declarations that can be made with the - `__attribute__' syntax. All of the ways we use this do fine if - they are omitted for compilers that don't understand it. */ -#if !defined __GNUC__ || __GNUC__ < 2 -# define __attribute__(xyz) /* Ignore */ -#endif - -/* At some point during the gcc 2.96 development the `malloc' attribute - for functions was introduced. We don't want to use it unconditionally - (although this would be possible) since it generates warnings. */ -#if __GNUC_PREREQ (2,96) -# define __attribute_malloc__ __attribute__ ((__malloc__)) -#else -# define __attribute_malloc__ /* Ignore */ -#endif - -/* At some point during the gcc 2.96 development the `pure' attribute - for functions was introduced. We don't want to use it unconditionally - (although this would be possible) since it generates warnings. */ -#if __GNUC_PREREQ (2,96) -# define __attribute_pure__ __attribute__ ((__pure__)) -#else -# define __attribute_pure__ /* Ignore */ -#endif - -/* At some point during the gcc 3.1 development the `used' attribute - for functions was introduced. We don't want to use it unconditionally - (although this would be possible) since it generates warnings. */ -#if __GNUC_PREREQ (3,1) -# define __attribute_used__ __attribute__ ((__used__)) -# define __attribute_noinline__ __attribute__ ((__noinline__)) -#else -# define __attribute_used__ __attribute__ ((__unused__)) -# define __attribute_noinline__ /* Ignore */ -#endif - -/* At some point during the gcc 2.8 development the `format_arg' attribute - for functions was introduced. We don't want to use it unconditionally - (although this would be possible) since it generates warnings. - If several `format_arg' attributes are given for the same function, in - gcc-3.0 and older, all but the last one are ignored. In newer gccs, - all designated arguments are considered. */ -#if __GNUC_PREREQ (2,8) -# define __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x))) -#else -# define __attribute_format_arg__(x) /* Ignore */ -#endif - -/* At some point during the gcc 2.97 development the `strfmon' format - attribute for functions was introduced. We don't want to use it - unconditionally (although this would be possible) since it - generates warnings. */ -#if __GNUC_PREREQ (2,97) -# define __attribute_format_strfmon__(a,b) \ - __attribute__ ((__format__ (__strfmon__, a, b))) -#else -# define __attribute_format_strfmon__(a,b) /* Ignore */ -#endif - -/* It is possible to compile containing GCC extensions even if GCC is - run in pedantic mode if the uses are carefully marked using the - `__extension__' keyword. But this is not generally available before - version 2.8. */ -#if !__GNUC_PREREQ (2,8) -# define __extension__ /* Ignore */ -#endif - -/* __restrict is known in EGCS 1.2 and above. */ -#if !__GNUC_PREREQ (2,92) -# define __restrict /* Ignore */ -#endif - -/* ISO C99 also allows to declare arrays as non-overlapping. The syntax is - array_name[restrict] - GCC 3.1 supports this. */ -#if __GNUC_PREREQ (3,1) && !defined __GNUG__ -# define __restrict_arr __restrict -#else -# ifdef __GNUC__ -# define __restrict_arr /* Not supported in old GCC. */ -# else -# if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L -# define __restrict_arr restrict -# else -/* Some other non-C99 compiler. */ -# define __restrict_arr /* Not supported. */ -# endif -# endif -#endif - -#endif /* sys/cdefs.h */ diff --git a/newlib/libc/sys/linux/sys/dirent.h b/newlib/libc/sys/linux/sys/dirent.h deleted file mode 100644 index 083158eb3..000000000 --- a/newlib/libc/sys/linux/sys/dirent.h +++ /dev/null @@ -1,57 +0,0 @@ -/* libc/sys/linux/sys/dirent.h - Directory entry as returned by readdir */ - -/* Written 2000 by Werner Almesberger */ - - -#ifndef _SYS_DIRENT_H -#define _SYS_DIRENT_H - -#include <sys/types.h> -#include <linux/dirent.h> -#define _LIBC 1 -#define NOT_IN_libc 1 -#include <sys/lock.h> -#undef _LIBC - -#define HAVE_NO_D_NAMLEN /* no struct dirent->d_namlen */ -#define HAVE_DD_LOCK /* have locking mechanism */ - -#define MAXNAMLEN 255 /* sizeof(struct dirent.d_name)-1 */ - - -typedef struct { - int dd_fd; /* directory file */ - int dd_loc; /* position in buffer */ - int dd_seek; - char *dd_buf; /* buffer */ - int dd_len; /* buffer length */ - int dd_size; /* amount of data in buffer */ - _LOCK_RECURSIVE_T dd_lock; -} DIR; - - -#define __dirfd(dir) (dir)->dd_fd - -/* --- redundant --- */ - -DIR *opendir(const char *); -struct dirent *readdir(DIR *); -void rewinddir(DIR *); -int closedir(DIR *); - -/* internal prototype */ -void _seekdir(DIR *dir,off_t offset); - -#ifndef _POSIX_SOURCE -long telldir (DIR *); -void seekdir (DIR *, off_t loc); - -int scandir (const char *__dir, - struct dirent ***__namelist, - int (*select) (const struct dirent *), - int (*compar) (const struct dirent **, const struct dirent **)); - -int alphasort (const struct dirent **__a, const struct dirent **__b); -#endif /* _POSIX_SOURCE */ - -#endif diff --git a/newlib/libc/sys/linux/sys/dlfcn.h b/newlib/libc/sys/linux/sys/dlfcn.h deleted file mode 100644 index e96b5c17a..000000000 --- a/newlib/libc/sys/linux/sys/dlfcn.h +++ /dev/null @@ -1,64 +0,0 @@ -/* System dependent definitions for run-time dynamic loading. - 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. */ - -#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 ((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/newlib/libc/sys/linux/sys/elfclass.h b/newlib/libc/sys/linux/sys/elfclass.h deleted file mode 100644 index 180227d9e..000000000 --- a/newlib/libc/sys/linux/sys/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/newlib/libc/sys/linux/sys/errno.h b/newlib/libc/sys/linux/sys/errno.h deleted file mode 100644 index 82c84c944..000000000 --- a/newlib/libc/sys/linux/sys/errno.h +++ /dev/null @@ -1,34 +0,0 @@ -/* libc/sys/linux/sys/errno.h - Errno variable and codes */ - -/* Written 2000 by Werner Almesberger */ - - -#ifndef _SYS_ERRNO_H -#define _SYS_ERRNO_H - -/* --- from newlin's sys/errno.h --- */ - -#include <sys/reent.h> - -#ifndef _REENT_ONLY -#define errno (*__errno()) -extern int *__errno _PARAMS ((void)); -#endif - -extern __IMPORT _CONST char * _CONST _sys_errlist[]; -extern __IMPORT int _sys_nerr; - -#define __errno_r(ptr) ((ptr)->_errno) - -/* --- end of slight redundancy (the use of struct _reent->_errno is - hard-coded in perror.c so why pretend anything else could work too ? */ - -#define __set_errno(x) (errno = (x)) - -#include <asm/errno.h> - -#define ENOTSUP EOPNOTSUPP -#define EFTYPE 79 /* Inappropriate file type or format */ -#define EILSEQ 84 - -#endif diff --git a/newlib/libc/sys/linux/sys/event.h b/newlib/libc/sys/linux/sys/event.h deleted file mode 100644 index 159e23498..000000000 --- a/newlib/libc/sys/linux/sys/event.h +++ /dev/null @@ -1,196 +0,0 @@ -/*- - * Copyright (c) 1999,2000,2001 Jonathan Lemon <jlemon@FreeBSD.org> - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD: src/sys/sys/event.h,v 1.19 2002/03/23 08:46:51 bde Exp $ - */ - -#ifndef _SYS_EVENT_H_ -#define _SYS_EVENT_H_ - -#define EVFILT_READ (-1) -#define EVFILT_WRITE (-2) -#define EVFILT_AIO (-3) /* attached to aio requests */ -#define EVFILT_VNODE (-4) /* attached to vnodes */ -#define EVFILT_PROC (-5) /* attached to struct proc */ -#define EVFILT_SIGNAL (-6) /* attached to struct proc */ -#define EVFILT_TIMER (-7) /* timers */ -#define EVFILT_NETDEV (-8) /* network devices */ - -#define EVFILT_SYSCOUNT 8 - -#define EV_SET(kevp, a, b, c, d, e, f) do { \ - (kevp)->ident = (a); \ - (kevp)->filter = (b); \ - (kevp)->flags = (c); \ - (kevp)->fflags = (d); \ - (kevp)->data = (e); \ - (kevp)->udata = (f); \ -} while(0) - -struct kevent { - unsigned int * ident; /* identifier for this event */ - short filter; /* filter for event */ - u_short flags; - u_int fflags; - int * data; - void *udata; /* opaque user data identifier */ -}; - -/* actions */ -#define EV_ADD 0x0001 /* add event to kq (implies enable) */ -#define EV_DELETE 0x0002 /* delete event from kq */ -#define EV_ENABLE 0x0004 /* enable event */ -#define EV_DISABLE 0x0008 /* disable event (not reported) */ - -/* flags */ -#define EV_ONESHOT 0x0010 /* only report one occurrence */ -#define EV_CLEAR 0x0020 /* clear event state after reporting */ - -#define EV_SYSFLAGS 0xF000 /* reserved by system */ -#define EV_FLAG1 0x2000 /* filter-specific flag */ - -/* returned values */ -#define EV_EOF 0x8000 /* EOF detected */ -#define EV_ERROR 0x4000 /* error, data contains errno */ - -/* - * data/hint flags for EVFILT_{READ|WRITE}, shared with userspace - */ -#define NOTE_LOWAT 0x0001 /* low water mark */ - -/* - * data/hint flags for EVFILT_VNODE, shared with userspace - */ -#define NOTE_DELETE 0x0001 /* vnode was removed */ -#define NOTE_WRITE 0x0002 /* data contents changed */ -#define NOTE_EXTEND 0x0004 /* size increased */ -#define NOTE_ATTRIB 0x0008 /* attributes changed */ -#define NOTE_LINK 0x0010 /* link count changed */ -#define NOTE_RENAME 0x0020 /* vnode was renamed */ -#define NOTE_REVOKE 0x0040 /* vnode access was revoked */ - -/* - * data/hint flags for EVFILT_PROC, shared with userspace - */ -#define NOTE_EXIT 0x80000000 /* process exited */ -#define NOTE_FORK 0x40000000 /* process forked */ -#define NOTE_EXEC 0x20000000 /* process exec'd */ -#define NOTE_PCTRLMASK 0xf0000000 /* mask for hint bits */ -#define NOTE_PDATAMASK 0x000fffff /* mask for pid */ - -/* additional flags for EVFILT_PROC */ -#define NOTE_TRACK 0x00000001 /* follow across forks */ -#define NOTE_TRACKERR 0x00000002 /* could not track child */ -#define NOTE_CHILD 0x00000004 /* am a child process */ - -/* - * data/hint flags for EVFILT_NETDEV, shared with userspace - */ -#define NOTE_LINKUP 0x0001 /* link is up */ -#define NOTE_LINKDOWN 0x0002 /* link is down */ -#define NOTE_LINKINV 0x0004 /* link state is invalid */ - -/* - * This is currently visible to userland to work around broken - * programs which pull in <sys/proc.h> or <sys/select.h>. - */ -#include <sys/queue.h> -struct knote; - -#ifdef _KERNEL - -#ifdef MALLOC_DECLARE -MALLOC_DECLARE(M_KQUEUE); -#endif - -#define KNOTE(list, hint) if ((list) != NULL) knote(list, hint) - -/* - * Flag indicating hint is a signal. Used by EVFILT_SIGNAL, and also - * shared by EVFILT_PROC (all knotes attached to p->p_klist) - */ -#define NOTE_SIGNAL 0x08000000 - -struct filterops { - int f_isfd; /* true if ident == filedescriptor */ - int (*f_attach)(struct knote *kn); - void (*f_detach)(struct knote *kn); - int (*f_event)(struct knote *kn, long hint); -}; - -struct knote { - SLIST_ENTRY(knote) kn_link; /* for fd */ - SLIST_ENTRY(knote) kn_selnext; /* for struct selinfo */ - TAILQ_ENTRY(knote) kn_tqe; - struct kqueue *kn_kq; /* which queue we are on */ - struct kevent kn_kevent; - int kn_status; - int kn_sfflags; /* saved filter flags */ - intptr_t kn_sdata; /* saved data field */ - union { - struct file *p_fp; /* file data pointer */ - struct proc *p_proc; /* proc pointer */ - } kn_ptr; - struct filterops *kn_fop; - caddr_t kn_hook; -#define KN_ACTIVE 0x01 /* event has been triggered */ -#define KN_QUEUED 0x02 /* event is on queue */ -#define KN_DISABLED 0x04 /* event is disabled */ -#define KN_DETACHED 0x08 /* knote is detached */ - -#define kn_id kn_kevent.ident -#define kn_filter kn_kevent.filter -#define kn_flags kn_kevent.flags -#define kn_fflags kn_kevent.fflags -#define kn_data kn_kevent.data -#define kn_fp kn_ptr.p_fp -}; - -struct thread; -struct proc; - -extern void knote(struct klist *list, long hint); -extern void knote_remove(struct thread *p, struct klist *list); -extern void knote_fdclose(struct thread *p, int fd); -extern int kqueue_register(struct kqueue *kq, - struct kevent *kev, struct thread *p); -extern int kqueue_add_filteropts(int filt, struct filterops *filtops); -extern int kqueue_del_filteropts(int filt); - -#else /* !_KERNEL */ - -#include <sys/cdefs.h> -struct timespec; - -__BEGIN_DECLS -int kqueue(void); -int kevent(int kq, const struct kevent *changelist, int nchanges, - struct kevent *eventlist, int nevents, - const struct timespec *timeout); -__END_DECLS - -#endif /* !_KERNEL */ - -#endif /* !_SYS_EVENT_H_ */ diff --git a/newlib/libc/sys/linux/sys/fcntl.h b/newlib/libc/sys/linux/sys/fcntl.h deleted file mode 100644 index 78914fd8f..000000000 --- a/newlib/libc/sys/linux/sys/fcntl.h +++ /dev/null @@ -1,29 +0,0 @@ -/* libc/sys/linux/sys/fcntl.h - File access */ - -/* Written 2000 by Werner Almesberger */ - - -#ifndef _SYS_FCNTL_H -#define _SYS_FCNTL_H - -#include <sys/types.h> -#include <linux/fcntl.h> - -/* --- redundant stuff below --- */ - -#include <_ansi.h> - -extern int creat _PARAMS ((const char *, mode_t)); -extern int _open _PARAMS ((const char *, int, ...)); - -#ifdef __KERNEL_PROTOTYPES -extern int open(const char *pathname, int flags, mode_t mode); -extern int fcntl(int fd, int cmd, long arg); -#else -extern int open _PARAMS ((const char *, int, ...)); -extern int fcntl _PARAMS ((int, int, ...)); -#endif - -extern int _fcntl _PARAMS ((int, int, ...)); - -#endif diff --git a/newlib/libc/sys/linux/sys/features.h b/newlib/libc/sys/linux/sys/features.h deleted file mode 100644 index 34cd0eb80..000000000 --- a/newlib/libc/sys/linux/sys/features.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef _SYS_FEATURES_H -#define _SYS_FEATURES_H - -#include <bits/posix_opt.h> - -/* We do not support asynchronous I/O. */ -#undef _POSIX_ASYNCHRONOUS_IO -#undef _POSIX_ASYNC_IO -#undef _LFS_ASYNCHRONOUS_IO -#undef _LFS64_ASYNCHRONOUS_IO - -/* POSIX message queues are supported. */ -#undef _POSIX_MESSAGE_PASSING -#define _POSIX_MESSAGE_PASSING 1 - -#endif /* _SYS_FEATURES_H */ diff --git a/newlib/libc/sys/linux/sys/file.h b/newlib/libc/sys/linux/sys/file.h deleted file mode 100644 index 875ee18c4..000000000 --- a/newlib/libc/sys/linux/sys/file.h +++ /dev/null @@ -1,13 +0,0 @@ -/* libc/sys/linux/sys/file.h - BSD compatibility */ - -/* Written 2000 by Werner Almesberger */ - - -#ifndef _SYS_FILE_H -#define _SYS_FILE_H - -#include <sys/fcntl.h> - -int flock(int fd,int operation); - -#endif diff --git a/newlib/libc/sys/linux/sys/ioccom.h b/newlib/libc/sys/linux/sys/ioccom.h deleted file mode 100644 index 4a063e973..000000000 --- a/newlib/libc/sys/linux/sys/ioccom.h +++ /dev/null @@ -1,75 +0,0 @@ -/*- - * Copyright (c) 1982, 1986, 1990, 1993, 1994 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)ioccom.h 8.2 (Berkeley) 3/28/94 - * $FreeBSD: src/sys/sys/ioccom.h,v 1.14 2002/04/10 04:53:37 imp Exp $ - */ - -#ifndef _SYS_IOCCOM_H_ -#define _SYS_IOCCOM_H_ - -/* - * Ioctl's have the command encoded in the lower word, and the size of - * any in or out parameters in the upper word. The high 3 bits of the - * upper word are used to encode the in/out status of the parameter. - */ -#define IOCPARM_MASK 0x1fff /* parameter length, at most 13 bits */ -#define IOCPARM_LEN(x) (((x) >> 16) & IOCPARM_MASK) -#define IOCBASECMD(x) ((x) & ~(IOCPARM_MASK << 16)) -#define IOCGROUP(x) (((x) >> 8) & 0xff) - -#define IOCPARM_MAX PAGE_SIZE /* max size of ioctl, mult. of PAGE_SIZE */ -#define IOC_VOID 0x20000000 /* no parameters */ -#define IOC_OUT 0x40000000 /* copy out parameters */ -#define IOC_IN 0x80000000 /* copy in parameters */ -#define IOC_INOUT (IOC_IN|IOC_OUT) -#define IOC_DIRMASK 0xe0000000 /* mask for IN/OUT/VOID */ - -#define _IOC(inout,group,num,len) \ - ((unsigned long)(inout | ((len & IOCPARM_MASK) << 16) | ((group) << 8) | (num))) -#define _IO(g,n) _IOC(IOC_VOID, (g), (n), 0) -#define _IOR(g,n,t) _IOC(IOC_OUT, (g), (n), sizeof(t)) -#define _IOW(g,n,t) _IOC(IOC_IN, (g), (n), sizeof(t)) -/* this should be _IORW, but stdio got there first */ -#define _IOWR(g,n,t) _IOC(IOC_INOUT, (g), (n), sizeof(t)) - -#ifndef _KERNEL - -#include <sys/cdefs.h> - -__BEGIN_DECLS -int ioctl(int, unsigned long, ...); -__END_DECLS - -#endif - -#endif /* !_SYS_IOCCOM_H_ */ diff --git a/newlib/libc/sys/linux/sys/ioctl.h b/newlib/libc/sys/linux/sys/ioctl.h deleted file mode 100644 index 12e0cd22d..000000000 --- a/newlib/libc/sys/linux/sys/ioctl.h +++ /dev/null @@ -1,11 +0,0 @@ -/* libc/sys/linux/sys/ioctl.h - ioctl prototype */ - -/* Written 2000 by Werner Almesberger */ - - -#ifndef _SYS_IOCTL_H -#define _SYS_IOCTL_H - -int ioctl(int fd,int request,...); - -#endif diff --git a/newlib/libc/sys/linux/sys/libc-tsd.h b/newlib/libc/sys/linux/sys/libc-tsd.h deleted file mode 100644 index 80bd1d33d..000000000 --- a/newlib/libc/sys/linux/sys/libc-tsd.h +++ /dev/null @@ -1,52 +0,0 @@ -/* libc-internal interface for thread-specific data. Stub version. - Copyright (C) 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 _BITS_LIBC_TSD_H -#define _BITS_LIBC_TSD_H 1 - -/* This file defines the following macros for accessing a small fixed - set of thread-specific `void *' data used only internally by libc. - - __libc_tsd_define(CLASS, KEY) -- Define or declare a `void *' datum - for KEY. CLASS can be `static' for - keys used in only one source file, - empty for global definitions, or - `extern' for global declarations. - __libc_tsd_get(KEY) -- Return the `void *' datum for KEY. - __libc_tsd_set(KEY, VALUE) -- Set the datum for KEY to VALUE. - - The set of available KEY's will usually be provided as an enum, - and contains (at least): - _LIBC_TSD_KEY_MALLOC - _LIBC_TSD_KEY_DL_ERROR - _LIBC_TSD_KEY_RPC_VARS - All uses must be the literal _LIBC_TSD_* name in the __libc_tsd_* macros. - Some implementations may not provide any enum at all and instead - using string pasting in the macros. */ - -/* This is the generic/stub implementation for wholly single-threaded - systems. We don't define an enum for the possible key values, because - the KEYs translate directly into variables by macro magic. */ - -#define __libc_tsd_define(CLASS, KEY) CLASS void *__libc_tsd_##KEY##_data; -#define __libc_tsd_get(KEY) (__libc_tsd_##KEY##_data) -#define __libc_tsd_set(KEY, VALUE) (__libc_tsd_##KEY##_data = (VALUE)) - - -#endif /* bits/libc-tsd.h */ diff --git a/newlib/libc/sys/linux/sys/link.h b/newlib/libc/sys/linux/sys/link.h deleted file mode 100644 index 470b4d3e5..000000000 --- a/newlib/libc/sys/linux/sys/link.h +++ /dev/null @@ -1,4 +0,0 @@ -struct link_map_machine - { - /* empty by default */ - }; diff --git a/newlib/libc/sys/linux/sys/linux_time.h b/newlib/libc/sys/linux/sys/linux_time.h deleted file mode 100644 index e71f70bba..000000000 --- a/newlib/libc/sys/linux/sys/linux_time.h +++ /dev/null @@ -1,76 +0,0 @@ -#ifndef _LINUX_TIME_H -#define _LINUX_TIME_H - -#include <asm/param.h> -#include <sys/types.h> - -#ifndef _STRUCT_TIMESPEC -#define _STRUCT_TIMESPEC -struct timespec { - time_t tv_sec; /* seconds */ - long tv_nsec; /* nanoseconds */ -}; -#endif /* _STRUCT_TIMESPEC */ - -/* - * Change timeval to jiffies, trying to avoid the - * most obvious overflows.. - * - * And some not so obvious. - * - * Note that we don't want to return MAX_LONG, because - * for various timeout reasons we often end up having - * to wait "jiffies+1" in order to guarantee that we wait - * at _least_ "jiffies" - so "jiffies+1" had better still - * be positive. - */ -#define MAX_JIFFY_OFFSET ((~0UL >> 1)-1) - -static __inline__ unsigned long -timespec_to_jiffies(struct timespec *value) -{ - unsigned long sec = value->tv_sec; - long nsec = value->tv_nsec; - - if (sec >= (MAX_JIFFY_OFFSET / HZ)) - return MAX_JIFFY_OFFSET; - nsec += 1000000000L / HZ - 1; - nsec /= 1000000000L / HZ; - return HZ * sec + nsec; -} - -static __inline__ void -jiffies_to_timespec(unsigned long jiffies, struct timespec *value) -{ - value->tv_nsec = (jiffies % HZ) * (1000000000L / HZ); - value->tv_sec = jiffies / HZ; -} - -#ifndef _STRUCT_TIMEVAL -#define _STRUCT_TIMEVAL -struct timeval { - time_t tv_sec; /* seconds */ - suseconds_t tv_usec; /* microseconds */ -}; -#endif - -struct timezone { - int tz_minuteswest; /* minutes west of Greenwich */ - int tz_dsttime; /* type of dst correction */ -}; - -#define ITIMER_REAL 0 -#define ITIMER_VIRTUAL 1 -#define ITIMER_PROF 2 - -struct itimerspec { - struct timespec it_interval; /* timer period */ - struct timespec it_value; /* timer expiration */ -}; - -struct itimerval { - struct timeval it_interval; /* timer interval */ - struct timeval it_value; /* current value */ -}; - -#endif diff --git a/newlib/libc/sys/linux/sys/lock.h b/newlib/libc/sys/linux/sys/lock.h deleted file mode 100644 index c70c56cb1..000000000 --- a/newlib/libc/sys/linux/sys/lock.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef __SYS_LOCK_H__ -#define __SYS_LOCK_H__ - -#include <machine/weakalias.h> -#include <features.h> - -#define _LIBC 1 -#define NOT_IN_libc 1 - -#include <bits/libc-lock.h> - -typedef __libc_lock_t _LOCK_T; -typedef __libc_lock_recursive_t _LOCK_RECURSIVE_T; - -#define __LOCK_INIT(class,lock) \ - __libc_lock_define_initialized(class, lock) -#define __LOCK_RECURSIVE_INIT(class, lock) \ - __libc_lock_define_initialized_recursive(class, lock) - -#define __lock_init(__lock) __libc_lock_init(__lock) -#define __lock_init_recursive(__lock) __libc_lock_init_recursive(__lock) -#define __lock_acquire(__lock) __libc_lock_lock(__lock) -#define __lock_acquire_recursive(__lock) __libc_lock_lock_recursive(__lock) -#define __lock_release(__lock) __libc_lock_unlock(__lock) -#define __lock_release_recursive(__lock) __libc_lock_unlock_recursive(__lock) -#define __lock_try_acquire(__lock) __libc_lock_trylock(__lock) -#define __lock_try_acquire_recursive(__lock) \ - __libc_lock_trylock_recursive(__lock) -#define __lock_close(__lock) __libc_lock_fini(__lock) -#define __lock_close_recursive(__lock) __libc_lock_fini_recursive(__lock) - -#endif /* __SYS_LOCK_H__ */ diff --git a/newlib/libc/sys/linux/sys/param.h b/newlib/libc/sys/linux/sys/param.h deleted file mode 100644 index de0b4f61c..000000000 --- a/newlib/libc/sys/linux/sys/param.h +++ /dev/null @@ -1,57 +0,0 @@ -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * William Jolitz. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * from: @(#)param.h 5.8 (Berkeley) 6/28/91 - * $FreeBSD: src/sys/i386/include/param.h,v 1.62 2001/09/12 08:37:33 julian Exp $ - */ - -/* - * Round p (pointer or byte index) up to a correctly-aligned value - * for all data types (int, long, ...). The result is unsigned int - * and must be cast to any desired pointer type. - */ -#ifndef _ALIGNBYTES -#define _ALIGNBYTES (sizeof(int) - 1) -#endif -#ifndef _ALIGN -#define _ALIGN(p) (((unsigned)(p) + _ALIGNBYTES) & ~_ALIGNBYTES) -#endif - -/* Macros for min/max. */ -#define MIN(a,b) (((a)<(b))?(a):(b)) -#define MAX(a,b) (((a)>(b))?(a):(b)) - -#include <machine/param.h> -#include <sys/user.h> diff --git a/newlib/libc/sys/linux/sys/resource.h b/newlib/libc/sys/linux/sys/resource.h deleted file mode 100644 index f804731f9..000000000 --- a/newlib/libc/sys/linux/sys/resource.h +++ /dev/null @@ -1,12 +0,0 @@ -/* libc/sys/linux/sys/resource.h - Resource usage */ - -/* Written 2000 by Werner Almesberger */ - - -#ifndef _SYS_RESOURCE_H -#define _SYS_RESOURCE_H - -#include <sys/types.h> -#include <bits/resource.h> - -#endif diff --git a/newlib/libc/sys/linux/sys/select.h b/newlib/libc/sys/linux/sys/select.h deleted file mode 100644 index ddd2ac9d2..000000000 --- a/newlib/libc/sys/linux/sys/select.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef _SYS_SELECT_H -#define _SYS_SELECT_H 1 - -#include <sys/types.h> -#include <bits/sigset.h> -#include <time.h> - -extern int select (int __nfds, fd_set *__restrict __readfds, - fd_set *__restrict __writefds, - fd_set *__restrict __exceptfds, - struct timeval *__restrict __timeout) __THROW; - -#endif /* sys/select.h */ diff --git a/newlib/libc/sys/linux/sys/signal.h b/newlib/libc/sys/linux/sys/signal.h deleted file mode 100644 index cef7058cd..000000000 --- a/newlib/libc/sys/linux/sys/signal.h +++ /dev/null @@ -1,56 +0,0 @@ -/* libc/sys/linux/sys/signal.h - Signal handling */ - -/* Written 2000 by Werner Almesberger */ - - -#ifndef _SYS_SIGNAL_H -#define _SYS_SIGNAL_H -#define _SIGNAL_H - -#include <sys/types.h> -#include <bits/sigset.h> -#include <bits/signum.h> - -/* we want RT signals so we must override the definition of sigset_t - and NSIG */ - -#undef NSIG -#define NSIG _NSIG -#undef sigset_t -#define sigset_t __sigset_t - -typedef void (*_sig_func_ptr) (int); -typedef _sig_func_ptr __sighandler_t; - -#include <bits/siginfo.h> -#include <bits/sigaction.h> -#include <bits/sigstack.h> - -/* --- include/signal.h thinks it knows better :-( --- */ - -#undef SIG_DFL -#undef SIG_IGN -#undef SIG_ERR - -/* --- redundant stuff below --- */ - -#include <_ansi.h> - -int _EXFUN(kill, (int, int)); -_VOID _EXFUN(psignal, (int, const char *)); -int _EXFUN(sigaction, (int, const struct sigaction *, struct sigaction *)); -int _EXFUN(sigaddset, (sigset_t *, const int)); -int _EXFUN(sigdelset, (sigset_t *, const int)); -int _EXFUN(sigismember, (const sigset_t *, int)); -int _EXFUN(sigfillset, (sigset_t *)); -int _EXFUN(sigemptyset, (sigset_t *)); -int _EXFUN(sigpending, (sigset_t *)); -int _EXFUN(sigsuspend, (const sigset_t *)); -int _EXFUN(sigpause, (int)); - -#ifndef _POSIX_SOURCE -extern const char *const sys_siglist[]; -typedef __sighandler_t sig_t; /* BSDism */ -#endif - -#endif diff --git a/newlib/libc/sys/linux/sys/socket.h b/newlib/libc/sys/linux/sys/socket.h deleted file mode 100644 index b7a3dd1f1..000000000 --- a/newlib/libc/sys/linux/sys/socket.h +++ /dev/null @@ -1,471 +0,0 @@ -/* - * Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)socket.h 8.4 (Berkeley) 2/21/94 - * $FreeBSD: src/sys/sys/socket.h,v 1.60 2002/04/20 02:24:35 mike Exp $ - */ - -#ifndef _SYS_SOCKET_H_ -#define _SYS_SOCKET_H_ - -#include <sys/types.h> -#include <sys/_types.h> -#include <netinet/in.h> -#include <netdb.h> - -/* Needed by linuxthreads. */ - -# define __SOCKADDR_ARG struct sockaddr *__restrict -# define __CONST_SOCKADDR_ARG __const struct sockaddr * - -/* - * Definitions related to sockets: types, address families, options. - */ - -/* - * Data types. - */ -#ifdef _BSD_SA_FAMILY_T_ -typedef _BSD_SA_FAMILY_T_ sa_family_t; -#undef _BSD_SA_FAMILY_T_ -#endif - -#ifdef _BSD_SOCKLEN_T_ -typedef _BSD_SOCKLEN_T_ socklen_t; -#undef _BSD_SOCKLEN_T_ -#endif - -/* - * Types - */ -#define SOCK_STREAM 1 /* stream socket */ -#define SOCK_DGRAM 2 /* datagram socket */ -#define SOCK_RAW 3 /* raw-protocol interface */ -#define SOCK_RDM 4 /* reliably-delivered message */ -#define SOCK_SEQPACKET 5 /* sequenced packet stream */ - -/* - * Option flags per-socket. - */ -#define SO_DEBUG 0x0001 /* turn on debugging info recording */ -#define SO_ACCEPTCONN 0x0002 /* socket has had listen() */ -#define SO_REUSEADDR 0x0004 /* allow local address reuse */ -#define SO_KEEPALIVE 0x0008 /* keep connections alive */ -#define SO_DONTROUTE 0x0010 /* just use interface addresses */ -#define SO_BROADCAST 0x0020 /* permit sending of broadcast msgs */ -#define SO_USELOOPBACK 0x0040 /* bypass hardware when possible */ -#define SO_LINGER 0x0080 /* linger on close if data present */ -#define SO_OOBINLINE 0x0100 /* leave received OOB data in line */ -#define SO_REUSEPORT 0x0200 /* allow local address & port reuse */ -#define SO_TIMESTAMP 0x0400 /* timestamp received dgram traffic */ -#define SO_ACCEPTFILTER 0x1000 /* there is an accept filter */ - -/* - * Additional options, not kept in so_options. - */ -#define SO_SNDBUF 0x1001 /* send buffer size */ -#define SO_RCVBUF 0x1002 /* receive buffer size */ -#define SO_SNDLOWAT 0x1003 /* send low-water mark */ -#define SO_RCVLOWAT 0x1004 /* receive low-water mark */ -#define SO_SNDTIMEO 0x1005 /* send timeout */ -#define SO_RCVTIMEO 0x1006 /* receive timeout */ -#define SO_ERROR 0x1007 /* get error status and clear */ -#define SO_TYPE 0x1008 /* get socket type */ -/*efine SO_PRIVSTATE 0x1009 get/deny privileged state */ - -/* - * Structure used for manipulating linger option. - */ -struct linger { - int l_onoff; /* option on/off */ - int l_linger; /* linger time */ -}; - -struct accept_filter_arg { - char af_name[16]; - char af_arg[256-16]; -}; - -/* - * Level number for (get/set)sockopt() to apply to socket itself. - */ -#define SOL_SOCKET 0xffff /* options for socket level */ - -/* - * Address families. - */ -#define AF_UNSPEC 0 /* unspecified */ -#define AF_LOCAL 1 /* local to host (pipes, portals) */ -#define AF_UNIX AF_LOCAL /* backward compatibility */ -#define AF_INET 2 /* internetwork: UDP, TCP, etc. */ -#define AF_IMPLINK 3 /* arpanet imp addresses */ -#define AF_PUP 4 /* pup protocols: e.g. BSP */ -#define AF_CHAOS 5 /* mit CHAOS protocols */ -#define AF_NS 6 /* XEROX NS protocols */ -#define AF_ISO 7 /* ISO protocols */ -#define AF_OSI AF_ISO -#define AF_ECMA 8 /* European computer manufacturers */ -#define AF_DATAKIT 9 /* datakit protocols */ -#define AF_CCITT 10 /* CCITT protocols, X.25 etc */ -#define AF_SNA 11 /* IBM SNA */ -#define AF_DECnet 12 /* DECnet */ -#define AF_DLI 13 /* DEC Direct data link interface */ -#define AF_LAT 14 /* LAT */ -#define AF_HYLINK 15 /* NSC Hyperchannel */ -#define AF_APPLETALK 16 /* Apple Talk */ -#define AF_ROUTE 17 /* Internal Routing Protocol */ -#define AF_LINK 18 /* Link layer interface */ -#define pseudo_AF_XTP 19 /* eXpress Transfer Protocol (no AF) */ -#define AF_COIP 20 /* connection-oriented IP, aka ST II */ -#define AF_CNT 21 /* Computer Network Technology */ -#define pseudo_AF_RTIP 22 /* Help Identify RTIP packets */ -#define AF_IPX 23 /* Novell Internet Protocol */ -#define AF_SIP 24 /* Simple Internet Protocol */ -#define pseudo_AF_PIP 25 /* Help Identify PIP packets */ -#define AF_ISDN 26 /* Integrated Services Digital Network*/ -#define AF_E164 AF_ISDN /* CCITT E.164 recommendation */ -#define pseudo_AF_KEY 27 /* Internal key-management function */ -#define AF_INET6 28 /* IPv6 */ -#define AF_NATM 29 /* native ATM access */ -#define AF_ATM 30 /* ATM */ -#define pseudo_AF_HDRCMPLT 31 /* Used by BPF to not rewrite headers - * in interface output routine - */ -#define AF_NETGRAPH 32 /* Netgraph sockets */ -#define AF_SLOW 33 /* 802.3ad slow protocol */ -#define AF_SCLUSTER 34 /* Sitara cluster protocol */ -#define AF_MAX 35 - -/* - * Structure used by kernel to store most - * addresses. - */ -struct sockaddr { - sa_family_t sa_family; /* address family */ - char sa_data[14]; /* actually longer; address value */ -}; -#define SOCK_MAXADDRLEN 255 /* longest possible addresses */ - -/* - * Structure used by kernel to pass protocol - * information in raw sockets. - */ -struct sockproto { - u_short sp_family; /* address family */ - u_short sp_protocol; /* protocol */ -}; - -/* - * RFC 2553: protocol-independent placeholder for socket addresses - */ -#define _SS_MAXSIZE 128U -#define _SS_ALIGNSIZE (sizeof(int64_t)) -#define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof(unsigned char) - sizeof(sa_family_t)) -#define _SS_PAD2SIZE (_SS_MAXSIZE - sizeof(unsigned char) - sizeof(sa_family_t) - \ - _SS_PAD1SIZE - _SS_ALIGNSIZE) - -struct sockaddr_storage { - unsigned char ss_len; /* address length */ - sa_family_t ss_family; /* address family */ - char __ss_pad1[_SS_PAD1SIZE]; - int64_t __ss_align; /* force desired structure storage alignment */ - char __ss_pad2[_SS_PAD2SIZE]; -}; - -/* - * Protocol families, same as address families for now. - */ -#define PF_UNSPEC AF_UNSPEC -#define PF_LOCAL AF_LOCAL -#define PF_UNIX PF_LOCAL /* backward compatibility */ -#define PF_INET AF_INET -#define PF_IMPLINK AF_IMPLINK -#define PF_PUP AF_PUP -#define PF_CHAOS AF_CHAOS -#define PF_NS AF_NS -#define PF_ISO AF_ISO -#define PF_OSI AF_ISO -#define PF_ECMA AF_ECMA -#define PF_DATAKIT AF_DATAKIT -#define PF_CCITT AF_CCITT -#define PF_SNA AF_SNA -#define PF_DECnet AF_DECnet -#define PF_DLI AF_DLI -#define PF_LAT AF_LAT -#define PF_HYLINK AF_HYLINK -#define PF_APPLETALK AF_APPLETALK -#define PF_ROUTE AF_ROUTE -#define PF_LINK AF_LINK -#define PF_XTP pseudo_AF_XTP /* really just proto family, no AF */ -#define PF_COIP AF_COIP -#define PF_CNT AF_CNT -#define PF_SIP AF_SIP -#define PF_IPX AF_IPX /* same format as AF_NS */ -#define PF_RTIP pseudo_AF_RTIP /* same format as AF_INET */ -#define PF_PIP pseudo_AF_PIP -#define PF_ISDN AF_ISDN -#define PF_KEY pseudo_AF_KEY -#define PF_INET6 AF_INET6 -#define PF_NATM AF_NATM -#define PF_ATM AF_ATM -#define PF_NETGRAPH AF_NETGRAPH -#define PF_SLOW AF_SLOW -#define PF_SCLUSTER AF_SCLUSTER - -#define PF_MAX AF_MAX - -/* - * Definitions for network related sysctl, CTL_NET. - * - * Second level is protocol family. - * Third level is protocol number. - * - * Further levels are defined by the individual families below. - */ -#define NET_MAXID AF_MAX - -#define CTL_NET_NAMES { \ - { 0, 0 }, \ - { "unix", CTLTYPE_NODE }, \ - { "inet", CTLTYPE_NODE }, \ - { "implink", CTLTYPE_NODE }, \ - { "pup", CTLTYPE_NODE }, \ - { "chaos", CTLTYPE_NODE }, \ - { "xerox_ns", CTLTYPE_NODE }, \ - { "iso", CTLTYPE_NODE }, \ - { "emca", CTLTYPE_NODE }, \ - { "datakit", CTLTYPE_NODE }, \ - { "ccitt", CTLTYPE_NODE }, \ - { "ibm_sna", CTLTYPE_NODE }, \ - { "decnet", CTLTYPE_NODE }, \ - { "dec_dli", CTLTYPE_NODE }, \ - { "lat", CTLTYPE_NODE }, \ - { "hylink", CTLTYPE_NODE }, \ - { "appletalk", CTLTYPE_NODE }, \ - { "route", CTLTYPE_NODE }, \ - { "link_layer", CTLTYPE_NODE }, \ - { "xtp", CTLTYPE_NODE }, \ - { "coip", CTLTYPE_NODE }, \ - { "cnt", CTLTYPE_NODE }, \ - { "rtip", CTLTYPE_NODE }, \ - { "ipx", CTLTYPE_NODE }, \ - { "sip", CTLTYPE_NODE }, \ - { "pip", CTLTYPE_NODE }, \ - { "isdn", CTLTYPE_NODE }, \ - { "key", CTLTYPE_NODE }, \ - { "inet6", CTLTYPE_NODE }, \ - { "natm", CTLTYPE_NODE }, \ - { "atm", CTLTYPE_NODE }, \ - { "hdrcomplete", CTLTYPE_NODE }, \ - { "netgraph", CTLTYPE_NODE }, \ - { "snp", CTLTYPE_NODE }, \ - { "scp", CTLTYPE_NODE }, \ -} - -/* - * PF_ROUTE - Routing table - * - * Three additional levels are defined: - * Fourth: address family, 0 is wildcard - * Fifth: type of info, defined below - * Sixth: flag(s) to mask with for NET_RT_FLAGS - */ -#define NET_RT_DUMP 1 /* dump; may limit to a.f. */ -#define NET_RT_FLAGS 2 /* by flags, e.g. RESOLVING */ -#define NET_RT_IFLIST 3 /* survey interface list */ -#define NET_RT_MAXID 4 - -#define CTL_NET_RT_NAMES { \ - { 0, 0 }, \ - { "dump", CTLTYPE_STRUCT }, \ - { "flags", CTLTYPE_STRUCT }, \ - { "iflist", CTLTYPE_STRUCT }, \ -} - -/* - * Maximum queue length specifiable by listen. - */ -#ifndef SOMAXCONN -#define SOMAXCONN 128 -#endif - -/* - * Message header for recvmsg and sendmsg calls. - * Used value-result for recvmsg, value only for sendmsg. - */ -struct msghdr { - void *msg_name; /* optional address */ - socklen_t msg_namelen; /* size of address */ - struct iovec *msg_iov; /* scatter/gather array */ - int msg_iovlen; /* # elements in msg_iov */ - void *msg_control; /* ancillary data, see below */ - socklen_t msg_controllen; /* ancillary data buffer len */ - int msg_flags; /* flags on received message */ -}; - -#define MSG_OOB 0x1 /* process out-of-band data */ -#define MSG_PEEK 0x2 /* peek at incoming message */ -#define MSG_DONTROUTE 0x4 /* send without using routing tables */ -#define MSG_EOR 0x8 /* data completes record */ -#define MSG_TRUNC 0x10 /* data discarded before delivery */ -#define MSG_CTRUNC 0x20 /* control data lost before delivery */ -#define MSG_WAITALL 0x40 /* wait for full request or error */ -#define MSG_DONTWAIT 0x80 /* this message should be nonblocking */ -#define MSG_EOF 0x100 /* data completes connection */ -#define MSG_COMPAT 0x8000 /* used in sendit() */ - -/* - * Header for ancillary data objects in msg_control buffer. - * Used for additional information with/about a datagram - * not expressible by flags. The format is a sequence - * of message elements headed by cmsghdr structures. - */ -struct cmsghdr { - socklen_t cmsg_len; /* data byte count, including hdr */ - int cmsg_level; /* originating protocol */ - int cmsg_type; /* protocol-specific type */ -/* followed by unsigned char cmsg_data[]; */ -}; - -/* - * While we may have more groups than this, the cmsgcred struct must - * be able to fit in an mbuf, and NGROUPS_MAX is too large to allow - * this. -*/ -#define CMGROUP_MAX 16 - -/* - * Credentials structure, used to verify the identity of a peer - * process that has sent us a message. This is allocated by the - * peer process but filled in by the kernel. This prevents the - * peer from lying about its identity. (Note that cmcred_groups[0] - * is the effective GID.) - */ -struct cmsgcred { - pid_t cmcred_pid; /* PID of sending process */ - uid_t cmcred_uid; /* real UID of sending process */ - uid_t cmcred_euid; /* effective UID of sending process */ - gid_t cmcred_gid; /* real GID of sending process */ - short cmcred_ngroups; /* number or groups */ - gid_t cmcred_groups[CMGROUP_MAX]; /* groups */ -}; - -/* given pointer to struct cmsghdr, return pointer to data */ -#define CMSG_DATA(cmsg) ((unsigned char *)(cmsg) + \ - _ALIGN(sizeof(struct cmsghdr))) - -/* given pointer to struct cmsghdr, return pointer to next cmsghdr */ -#define CMSG_NXTHDR(mhdr, cmsg) \ - (((caddr_t)(cmsg) + _ALIGN((cmsg)->cmsg_len) + \ - _ALIGN(sizeof(struct cmsghdr)) > \ - (caddr_t)(mhdr)->msg_control + (mhdr)->msg_controllen) ? \ - (struct cmsghdr *)NULL : \ - (struct cmsghdr *)((caddr_t)(cmsg) + _ALIGN((cmsg)->cmsg_len))) - -#define CMSG_FIRSTHDR(mhdr) ((struct cmsghdr *)(mhdr)->msg_control) - -/* RFC 2292 additions */ - -#define CMSG_SPACE(l) (_ALIGN(sizeof(struct cmsghdr)) + _ALIGN(l)) -#define CMSG_LEN(l) (_ALIGN(sizeof(struct cmsghdr)) + (l)) - -#ifdef _KERNEL -#define CMSG_ALIGN(n) _ALIGN(n) -#endif - -/* "Socket"-level control message types: */ -#define SCM_RIGHTS 0x01 /* access rights (array of int) */ -#define SCM_TIMESTAMP 0x02 /* timestamp (struct timeval) */ -#define SCM_CREDS 0x03 /* process creds (struct cmsgcred) */ - -/* - * 4.3 compat sockaddr, move to compat file later - */ -struct osockaddr { - u_short sa_family; /* address family */ - char sa_data[14]; /* up to 14 bytes of direct address */ -}; - -/* - * 4.3-compat message header (move to compat file later). - */ -struct omsghdr { - caddr_t msg_name; /* optional address */ - int msg_namelen; /* size of address */ - struct iovec *msg_iov; /* scatter/gather array */ - int msg_iovlen; /* # elements in msg_iov */ - caddr_t msg_accrights; /* access rights sent/received */ - int msg_accrightslen; -}; - -/* - * howto arguments for shutdown(2), specified by Posix.1g. - */ -#define SHUT_RD 0 /* shut down the reading side */ -#define SHUT_WR 1 /* shut down the writing side */ -#define SHUT_RDWR 2 /* shut down both sides */ - -/* - * sendfile(2) header/trailer struct - */ -struct sf_hdtr { - struct iovec *headers; /* pointer to an array of header struct iovec's */ - int hdr_cnt; /* number of header iovec's */ - struct iovec *trailers; /* pointer to an array of trailer struct iovec's */ - int trl_cnt; /* number of trailer iovec's */ -}; - -#include <sys/cdefs.h> - -__BEGIN_DECLS -int accept(int, struct sockaddr *, socklen_t *); -int bind(int, const struct sockaddr *, socklen_t); -int connect(int, const struct sockaddr *, socklen_t); -int getpeername(int, struct sockaddr *, socklen_t *); -int getsockname(int, struct sockaddr *, socklen_t *); -int getsockopt(int, int, int, void *, socklen_t *); -int listen(int, int); -ssize_t recv(int, void *, size_t, int); -ssize_t recvfrom(int, void *, size_t, int, struct sockaddr *, socklen_t *); -ssize_t recvmsg(int, struct msghdr *, int); -ssize_t send(int, const void *, size_t, int); -ssize_t sendto(int, const void *, - size_t, int, const struct sockaddr *, socklen_t); -ssize_t sendmsg(int, const struct msghdr *, int); -int sendfile(int, int, off_t, size_t, struct sf_hdtr *, off_t *, int); -int setsockopt(int, int, int, const void *, socklen_t); -int shutdown(int, int); -int socket(int, int, int); -int socketpair(int, int, int, int *); -__END_DECLS - -#endif /* !_SYS_SOCKET_H_ */ diff --git a/newlib/libc/sys/linux/sys/sockio.h b/newlib/libc/sys/linux/sys/sockio.h deleted file mode 100644 index bdebfbebc..000000000 --- a/newlib/libc/sys/linux/sys/sockio.h +++ /dev/null @@ -1,115 +0,0 @@ -/*- - * Copyright (c) 1982, 1986, 1990, 1993, 1994 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)sockio.h 8.1 (Berkeley) 3/28/94 - * $FreeBSD: src/sys/sys/sockio.h,v 1.25 2002/02/10 16:55:35 rwatson Exp $ - */ - -#ifndef _SYS_SOCKIO_H_ -#define _SYS_SOCKIO_H_ - -#include <sys/ioccom.h> - -/* Socket ioctl's. */ -#define SIOCSHIWAT _IOW('s', 0, int) /* set high watermark */ -#define SIOCGHIWAT _IOR('s', 1, int) /* get high watermark */ -#define SIOCSLOWAT _IOW('s', 2, int) /* set low watermark */ -#define SIOCGLOWAT _IOR('s', 3, int) /* get low watermark */ -#define SIOCATMARK _IOR('s', 7, int) /* at oob mark? */ -#define SIOCSPGRP _IOW('s', 8, int) /* set process group */ -#define SIOCGPGRP _IOR('s', 9, int) /* get process group */ - -#define SIOCADDRT _IOW('r', 10, struct ortentry) /* add route */ -#define SIOCDELRT _IOW('r', 11, struct ortentry) /* delete route */ -#define SIOCGETVIFCNT _IOWR('r', 15, struct sioc_vif_req)/* get vif pkt cnt */ -#define SIOCGETSGCNT _IOWR('r', 16, struct sioc_sg_req) /* get s,g pkt cnt */ - -#define SIOCSIFADDR _IOW('i', 12, struct ifreq) /* set ifnet address */ -#define OSIOCGIFADDR _IOWR('i', 13, struct ifreq) /* get ifnet address */ -#define SIOCGIFADDR _IOWR('i', 33, struct ifreq) /* get ifnet address */ -#define SIOCSIFDSTADDR _IOW('i', 14, struct ifreq) /* set p-p address */ -#define OSIOCGIFDSTADDR _IOWR('i', 15, struct ifreq) /* get p-p address */ -#define SIOCGIFDSTADDR _IOWR('i', 34, struct ifreq) /* get p-p address */ -#define SIOCSIFFLAGS _IOW('i', 16, struct ifreq) /* set ifnet flags */ -#define SIOCGIFFLAGS _IOWR('i', 17, struct ifreq) /* get ifnet flags */ -#define OSIOCGIFBRDADDR _IOWR('i', 18, struct ifreq) /* get broadcast addr */ -#define SIOCGIFBRDADDR _IOWR('i', 35, struct ifreq) /* get broadcast addr */ -#define SIOCSIFBRDADDR _IOW('i', 19, struct ifreq) /* set broadcast addr */ -#define OSIOCGIFCONF _IOWR('i', 20, struct ifconf) /* get ifnet list */ -#define SIOCGIFCONF _IOWR('i', 36, struct ifconf) /* get ifnet list */ -#define OSIOCGIFNETMASK _IOWR('i', 21, struct ifreq) /* get net addr mask */ -#define SIOCGIFNETMASK _IOWR('i', 37, struct ifreq) /* get net addr mask */ -#define SIOCSIFNETMASK _IOW('i', 22, struct ifreq) /* set net addr mask */ -#define SIOCGIFMETRIC _IOWR('i', 23, struct ifreq) /* get IF metric */ -#define SIOCSIFMETRIC _IOW('i', 24, struct ifreq) /* set IF metric */ -#define SIOCDIFADDR _IOW('i', 25, struct ifreq) /* delete IF addr */ -#define SIOCAIFADDR _IOW('i', 26, struct ifaliasreq)/* add/chg IF alias */ - -#define SIOCALIFADDR _IOW('i', 27, struct if_laddrreq) /* add IF addr */ -#define SIOCGLIFADDR _IOWR('i', 28, struct if_laddrreq) /* get IF addr */ -#define SIOCDLIFADDR _IOW('i', 29, struct if_laddrreq) /* delete IF addr */ -#define SIOCSIFCAP _IOW('i', 30, struct ifreq) /* set IF features */ -#define SIOCGIFCAP _IOWR('i', 31, struct ifreq) /* get IF features */ -#define SIOCGIFINDEX _IOWR('i', 32, struct ifreq) /* get IF index */ -#define SIOCGIFMAC _IOWR('i', 38, struct ifreq) /* get IF MAC label */ -#define SIOCSIFMAC _IOW('i', 39, struct ifreq) /* set IF MAC label */ - -#define SIOCADDMULTI _IOW('i', 49, struct ifreq) /* add m'cast addr */ -#define SIOCDELMULTI _IOW('i', 50, struct ifreq) /* del m'cast addr */ -#define SIOCGIFMTU _IOWR('i', 51, struct ifreq) /* get IF mtu */ -#define SIOCSIFMTU _IOW('i', 52, struct ifreq) /* set IF mtu */ -#define SIOCGIFPHYS _IOWR('i', 53, struct ifreq) /* get IF wire */ -#define SIOCSIFPHYS _IOW('i', 54, struct ifreq) /* set IF wire */ -#define SIOCSIFMEDIA _IOWR('i', 55, struct ifreq) /* set net media */ -#define SIOCGIFMEDIA _IOWR('i', 56, struct ifmediareq) /* get net media */ - -#define SIOCSIFGENERIC _IOW('i', 57, struct ifreq) /* generic IF set op */ -#define SIOCGIFGENERIC _IOWR('i', 58, struct ifreq) /* generic IF get op */ - -#define SIOCGIFSTATUS _IOWR('i', 59, struct ifstat) /* get IF status */ -#define SIOCSIFLLADDR _IOW('i', 60, struct ifreq) /* set linklevel addr */ - -#define SIOCSIFPHYADDR _IOW('i', 70, struct ifaliasreq) /* set gif addres */ -#define SIOCGIFPSRCADDR _IOWR('i', 71, struct ifreq) /* get gif psrc addr */ -#define SIOCGIFPDSTADDR _IOWR('i', 72, struct ifreq) /* get gif pdst addr */ -#define SIOCDIFPHYADDR _IOW('i', 73, struct ifreq) /* delete gif addrs */ -#define SIOCSLIFPHYADDR _IOW('i', 74, struct if_laddrreq) /* set gif addrs */ -#define SIOCGLIFPHYADDR _IOWR('i', 75, struct if_laddrreq) /* get gif addrs */ - -#define SIOCGPRIVATE_0 _IOWR('i', 80, struct ifreq) /* device private 0 */ -#define SIOCGPRIVATE_1 _IOWR('i', 81, struct ifreq) /* device private 1 */ - -#define SIOCIFCREATE _IOWR('i', 122, struct ifreq) /* create clone if */ -#define SIOCIFDESTROY _IOW('i', 121, struct ifreq) /* destroy clone if */ -#define SIOCIFGCLONERS _IOWR('i', 120, struct if_clonereq) /* get cloners */ - -#endif /* !_SYS_SOCKIO_H_ */ diff --git a/newlib/libc/sys/linux/sys/stat.h b/newlib/libc/sys/linux/sys/stat.h deleted file mode 100644 index 7bc06f7ae..000000000 --- a/newlib/libc/sys/linux/sys/stat.h +++ /dev/null @@ -1,32 +0,0 @@ -/* libc/sys/linux/sys/stat.h - Stat structure and macros */ - -/* Written 2000 by Werner Almesberger */ - - -#ifndef _SYS_STAT_H -#define _SYS_STAT_H - -#include <asm/stat.h> -#define __KERNEL__ -#include <linux/stat.h> -#undef __KERNEL__ - -/* --- redundant stuff below --- */ - -#include <_ansi.h> -#include <sys/types.h> - -int _EXFUN(fstat,( int __fd, struct stat *__sbuf )); -int _EXFUN(mkdir,( const char *_path, mode_t __mode )); -int _EXFUN(mkfifo,( const char *__path, mode_t __mode )); -int _EXFUN(stat,( const char *__path, struct stat *__sbuf )); -mode_t _EXFUN(umask,( mode_t __mask )); - -#ifndef _POSIX_SOURCE -int _EXFUN(fstat64,( int __fd, struct stat *__sbuf )); -int _EXFUN(lstat,( const char *file_name, struct stat *buf)); -int _EXFUN(lstat64,( const char *file_name, struct stat *buf)); -int _EXFUN(stat64,( const char *__path, struct stat *__sbuf )); -#endif /* _POSIX_SOURCE */ - -#endif /* _SYS_STAT_H */ diff --git a/newlib/libc/sys/linux/sys/stdio.h b/newlib/libc/sys/linux/sys/stdio.h deleted file mode 100644 index a99308161..000000000 --- a/newlib/libc/sys/linux/sys/stdio.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef _NEWLIB_STDIO_H -#define _NEWLIB_STDIO_H - -/* Internal locking macros, used to protect stdio functions. In the - linux case, expand to flockfile, and funlockfile, both defined in - LinuxThreads. */ -#if !defined(__SINGLE_THREAD__) -# if !defined(_flockfile) -# define _flockfile(fp) flockfile(fp) -# endif -# if !defined(_funlockfile) -# define _funlockfile(fp) funlockfile(fp) -# endif -#endif /* __SINGLE_THREAD__ */ - -#define getline __getline -#define getdelim __getdelim - -char * _EXFUN(ctermid, (char *)); - -#endif /* _NEWLIB_STDIO_H */ diff --git a/newlib/libc/sys/linux/sys/termios.h b/newlib/libc/sys/linux/sys/termios.h deleted file mode 100644 index ae053b5e4..000000000 --- a/newlib/libc/sys/linux/sys/termios.h +++ /dev/null @@ -1,17 +0,0 @@ -/* libc/sys/linux/sys/termios.h - Terminal control definitions */ - -/* Written 2000 by Werner Almesberger */ - - -#ifndef _SYS_TERMIOS_H -#define _SYS_TERMIOS_H - -#include <linux/termios.h> -#include <machine/termios.h> - -/* grr, this shouldn't have to be here */ - -int tcgetattr(int fd,struct termios *termios_p); -int tcsetattr(int fd,int optional_actions,const struct termios *termios_p); - -#endif diff --git a/newlib/libc/sys/linux/sys/time.h b/newlib/libc/sys/linux/sys/time.h deleted file mode 100644 index f2c656e5a..000000000 --- a/newlib/libc/sys/linux/sys/time.h +++ /dev/null @@ -1,94 +0,0 @@ -/* libc/sys/linux/sys/time.h - Time handling */ - -/* Written 2000 by Werner Almesberger */ - -/* - * Copyright (c) 1982, 1986, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)time.h 8.5 (Berkeley) 5/4/95 - * $FreeBSD: src/sys/sys/time.h,v 1.56 2002/05/05 04:33:09 bde Exp $ - */ - -#ifndef _SYS_TIME_H -#define _SYS_TIME_H - -#include <sys/types.h> -#include <sys/linux_time.h> - -/* Macros for converting between `struct timeval' and `struct timespec'. */ -# define TIMEVAL_TO_TIMESPEC(tv, ts) { \ - (ts)->tv_sec = (tv)->tv_sec; \ - (ts)->tv_nsec = (tv)->tv_usec * 1000; \ -} -# define TIMESPEC_TO_TIMEVAL(tv, ts) { \ - (tv)->tv_sec = (ts)->tv_sec; \ - (tv)->tv_usec = (ts)->tv_nsec / 1000; \ -} - -/* Convenience macros for operations on timevals. - NOTE: `timercmp' does not work for >= or <=. */ -# define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) -# define timerclear(tvp) ((tvp)->tv_sec = (tvp)->tv_usec = 0) -# define timercmp(a, b, CMP) \ - (((a)->tv_sec == (b)->tv_sec) ? \ - ((a)->tv_usec CMP (b)->tv_usec) : \ - ((a)->tv_sec CMP (b)->tv_sec)) -# define timeradd(a, b, result) \ - do { \ - (result)->tv_sec = (a)->tv_sec + (b)->tv_sec; \ - (result)->tv_usec = (a)->tv_usec + (b)->tv_usec; \ - if ((result)->tv_usec >= 1000000) \ - { \ - ++(result)->tv_sec; \ - (result)->tv_usec -= 1000000; \ - } \ - } while (0) -# define timersub(a, b, result) \ - do { \ - (result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \ - (result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \ - if ((result)->tv_usec < 0) { \ - --(result)->tv_sec; \ - (result)->tv_usec += 1000000; \ - } \ - } while (0) -/* --- redundant stuff below --- */ - -#include <_ansi.h> - -int _EXFUN(gettimeofday, (struct timeval *__p, struct timezone *__z)); -int _EXFUN(settimeofday, (const struct timeval *, const struct timezone *)); -int _EXFUN(utimes, (const char *__path, const struct timeval __tvp[2])); -int _EXFUN(getitimer, (int __which, struct itimerval *__value)); -int _EXFUN(setitimer, (int __which, const struct itimerval *__value, - struct itimerval *__ovalue)); -#endif diff --git a/newlib/libc/sys/linux/sys/types.h b/newlib/libc/sys/linux/sys/types.h deleted file mode 100644 index ddd028424..000000000 --- a/newlib/libc/sys/linux/sys/types.h +++ /dev/null @@ -1,225 +0,0 @@ -/* libc/sys/linux/sys/types.h - The usual type zoo */ - -/* Written 2000 by Werner Almesberger */ - -/*- - * Copyright (c) 1982, 1986, 1991, 1993, 1994 - * The Regents of the University of California. All rights reserved. - * (c) UNIX System Laboratories, Inc. - * All or some portions of this file are derived from material licensed - * to the University of California by American Telephone and Telegraph - * Co. or Unix System Laboratories, Inc. and are reproduced herein with - * the permission of UNIX System Laboratories, Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)types.h 8.6 (Berkeley) 2/19/95 - * $FreeBSD: src/sys/sys/types.h,v 1.60 2002/04/10 15:58:13 mike Exp $ - */ - -#ifndef _SYS_TYPES_H -#define _SYS_TYPES_H - -/* Newlib has it's own time_t and clock_t definitions in - * libc/include/sys/types.h. Repeat those here and - * skip the kernel's definitions. */ - -#include <features.h> -#include <sys/config.h> -#include <machine/types.h> -#include <sys/_types.h> - -#if !defined(__time_t_defined) && !defined(_TIME_T) -#define _TIME_T -#define __time_t_defined -typedef _TIME_T_ time_t; -#endif - -#if !defined(__clock_t_defined) && !defined(_CLOCK_T) -#define _CLOCK_T -#define __clock_t_defined -typedef _CLOCK_T_ clock_t; -#endif - -#ifndef _SSIZE_T -#define _SSIZE_T -typedef _ssize_t ssize_t; -#endif - -#ifndef __u_char_defined -#ifdef __GNUC__ -__extension__ typedef long long quad_t; -__extension__ typedef unsigned long long u_quad_t; -#else -typedef struct - { - long int __val[2]; - } quad_t; -typedef struct - { - unsigned long __val[2]; - } u_quad_t; -#endif -typedef struct - { - int __val[2]; - } fsid_t; -#define __u_char_defined -#endif - -typedef int clockid_t; - -# define _SYS_TYPES_FD_SET -# define NBBY 8 /* number of bits in a byte */ -/* - * Select uses bit masks of file descriptors in longs. - * These macros manipulate such bit fields (the filesystem macros use chars). - * FD_SETSIZE may be defined by the user, but the default here - * should be >= NOFILE (param.h). - */ -# ifndef FD_SETSIZE -# define FD_SETSIZE 64 -# endif - -typedef long fd_mask; -# define NFDBITS (sizeof (fd_mask) * NBBY) /* bits per mask */ -# ifndef howmany -# define howmany(x,y) (((x)+((y)-1))/(y)) -# endif - -typedef struct { - unsigned long fds_bits [(1024/(8 * sizeof(unsigned long)))]; -} __fd_set; - -# define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1L << ((n) % NFDBITS))) -# define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1L << ((n) % NFDBITS))) -# define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1L << ((n) % NFDBITS))) -# define FD_ZERO(p) (__extension__ (void)({ \ - size_t __i; \ - char *__tmp = (char *)p; \ - for (__i = 0; __i < sizeof (*(p)); ++__i) \ - *__tmp++ = 0; \ -})) - -#include <linux/types.h> -#include <bits/types.h> -#define __mode_t_defined -#define __gid_t_defined -#define __uid_t_defined -#define __pid_t_defined -#define __ssize_t_defined -#define __key_t_defined -#define __off_t_defined -#define __off64_t_defined - -typedef __ino_t ino_t; -typedef __ino64_t ino64_t; -typedef __uint32_t uintptr_t; -typedef __int32_t intptr_t; -typedef __off64_t off64_t; -typedef __off_t off_t; -typedef __loff_t loff_t; -typedef __mode_t mode_t; -typedef __pid_t pid_t; -typedef __uid_t uid_t; -typedef __gid_t gid_t; -typedef __key_t key_t; -typedef __suseconds_t suseconds_t; -typedef __useconds_t useconds_t; -typedef __daddr_t daddr_t; -typedef __caddr_t caddr_t; -typedef __dev_t dev_t; -typedef __fd_set fd_set; -typedef __nlink_t nlink_t; - -typedef __u_char u_char; -typedef __u_short u_short; -typedef __u_int u_int; -typedef __u_long u_long; -typedef __uint8_t u_int8_t; -typedef __uint16_t u_int16_t; -typedef __uint32_t u_int32_t; -typedef __uint64_t u_int64_t; -typedef __int16_t int16_t; -typedef __int32_t int32_t; -typedef __int64_t int64_t; - -#ifndef _UINT8_T_DECLARED -typedef __uint8_t uint8_t; -#define _UINT8_T_DECLARED -#endif - -#ifndef _UINT16_T_DECLARED -typedef __uint16_t uint16_t; -#define _UINT16_T_DECLARED -#endif - -#ifndef _UINT32_T_DECLARED -typedef __uint32_t uint32_t; -#define _UINT32_T_DECLARED -#endif - -#ifndef _UINT64_T_DECLARED -typedef __uint64_t uint64_t; -#define _UINT64_T_DECLARED -#endif - -#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) -typedef struct _physadr { - int r[1]; -} *physadr; - -typedef struct label_t { - int val[6]; -} label_t; -#endif - -typedef unsigned int vm_offset_t; -typedef __int64_t vm_ooffset_t; -typedef unsigned int vm_pindex_t; -typedef unsigned int vm_size_t; - -typedef __int32_t register_t; -typedef __uint32_t u_register_t; - -#ifdef _KERNEL -typedef int intfptr_t; -typedef unsigned int uintfptr_t; -#endif - -/* Critical section value */ -typedef register_t critical_t; - -/* Interrupt mask (spl, xxx_imask, etc) */ -typedef __uint32_t intrmask_t; - -/* Interrupt handler function type. */ -typedef void ointhand2_t(int _device_id); - -#endif diff --git a/newlib/libc/sys/linux/sys/unistd.h b/newlib/libc/sys/linux/sys/unistd.h deleted file mode 100644 index dd3f0f7ea..000000000 --- a/newlib/libc/sys/linux/sys/unistd.h +++ /dev/null @@ -1,148 +0,0 @@ -#ifndef _UNISTD_H -#define _UNISTD_H - -#include <features.h> - -#ifdef __cplusplus -extern "C" { -#endif - -#include <_ansi.h> -#include <sys/types.h> -#include <sys/_types.h> -#define __need_size_t -#define __need_ptrdiff_t -#include <stddef.h> - -extern char **environ; - -void _EXFUN(_exit, (int __status ) _ATTRIBUTE ((noreturn))); - -int _EXFUN(access,(const char *__path, int __amode )); -unsigned _EXFUN(alarm, (unsigned __secs )); -int _EXFUN(chdir, (const char *__path )); -int _EXFUN(chmod, (const char *__path, mode_t __mode )); -int _EXFUN(chown, (const char *__path, uid_t __owner, gid_t __group )); -int _EXFUN(chroot, (const char *__path )); -int _EXFUN(close, (int __fildes )); -char _EXFUN(*ctermid, (char *__s )); -char _EXFUN(*cuserid, (char *__s )); -int _EXFUN(dup, (int __fildes )); -int _EXFUN(dup2, (int __fildes, int __fildes2 )); -#if defined(__CYGWIN__) -void _EXFUN(endusershell, (void)); -#endif -int _EXFUN(execl, (const char *__path, const char *, ... )); -int _EXFUN(execle, (const char *__path, const char *, ... )); -int _EXFUN(execlp, (const char *__file, const char *, ... )); -int _EXFUN(execv, (const char *__path, char * const __argv[] )); -int _EXFUN(execve, (const char *__path, char * const __argv[], char * const __envp[] )); -int _EXFUN(execvp, (const char *__file, char * const __argv[] )); -int _EXFUN(fchdir, (int __fildes)); -int _EXFUN(fchmod, (int __fildes, mode_t __mode )); -int _EXFUN(fchown, (int __fildes, uid_t __owner, gid_t __group )); -pid_t _EXFUN(fork, (void )); -long _EXFUN(fpathconf, (int __fd, int __name )); -int _EXFUN(fsync, (int __fd)); -char _EXFUN(*getcwd, (char *__buf, size_t __size )); -int _EXFUN(getdomainname ,(char *__name, size_t __len)); -gid_t _EXFUN(getegid, (void )); -uid_t _EXFUN(geteuid, (void )); -gid_t _EXFUN(getgid, (void )); -int _EXFUN(getgroups, (int __gidsetsize, gid_t __grouplist[] )); -char _EXFUN(*getlogin, (void )); -#if defined(_POSIX_THREAD_SAFE_FUNCTIONS) -int _EXFUN(getlogin_r, (char *name, size_t namesize) ); -#endif -char _EXFUN(*getpass, (__const char *__prompt)); -size_t _EXFUN(getpagesize, (void)); -pid_t _EXFUN(getpgid, (pid_t)); -pid_t _EXFUN(getpgrp, (void )); -pid_t _EXFUN(getpid, (void )); -pid_t _EXFUN(getppid, (void )); -uid_t _EXFUN(getuid, (void )); -char * _EXFUN(getusershell, (void)); -char _EXFUN(*getwd, (char *__buf )); -int _EXFUN(isatty, (int __fildes )); -int _EXFUN(lchown, (const char *__path, uid_t __owner, gid_t __group )); -int _EXFUN(link, (const char *__path1, const char *__path2 )); -int _EXFUN(nice, (int __nice_value )); -off_t _EXFUN(lseek, (int __fildes, off_t __offset, int __whence )); -long _EXFUN(pathconf, (const char *__path, int __name )); -int _EXFUN(pause, (void )); -#ifdef __CYGWIN__ -int _EXFUN(pthread_atfork, (void (*)(void), void (*)(void), void (*)(void))); -#endif -int _EXFUN(pipe, (int __fildes[2] )); -ssize_t _EXFUN(pread, (int __fd, void *__buf, size_t __nbytes, off_t __offset)); -ssize_t _EXFUN(pwrite, (int __fd, const void *__buf, size_t __nbytes, off_t __offset)); -_READ_WRITE_RETURN_TYPE _EXFUN(read, (int __fd, void *__buf, size_t __nbyte )); -int _EXFUN(rmdir, (const char *__path )); -void * _EXFUN(sbrk, (ptrdiff_t __incr)); -int _EXFUN(setegid, (gid_t __gid )); -int _EXFUN(seteuid, (uid_t __uid )); -int _EXFUN(setgid, (gid_t __gid )); -int _EXFUN(setpgid, (pid_t __pid, pid_t __pgid )); -int _EXFUN(setpgrp, (void )); -pid_t _EXFUN(setsid, (void )); -int _EXFUN(setuid, (uid_t __uid )); -unsigned _EXFUN(sleep, (unsigned int __seconds )); -void _EXFUN(swab, (const void *, void *, ssize_t)); -long _EXFUN(sysconf, (int __name )); -pid_t _EXFUN(tcgetpgrp, (int __fildes )); -int _EXFUN(tcsetpgrp, (int __fildes, pid_t __pgrp_id )); -char * _EXFUN(ttyname, (int __fildes )); -int _EXFUN(ttyname_r, (int __fildes, char *__buf, size_t __len)); -int _EXFUN(unlink, (const char *__path )); -int _EXFUN(vhangup, (void )); -_READ_WRITE_RETURN_TYPE _EXFUN(write, (int __fd, const void *__buf, size_t __nbyte )); - -extern char *optarg; /* getopt(3) external variables */ -extern int optind, opterr, optopt; -int getopt(int, char * const [], const char *); -extern int optreset; /* getopt(3) external variable */ - -#ifndef _POSIX_SOURCE -pid_t _EXFUN(vfork, (void )); - -extern char *suboptarg; /* getsubopt(3) external variable */ -int getsubopt(char **, char * const *, char **); -#endif /* _POSIX_SOURCE */ - -/* Provide prototypes for most of the _<systemcall> names that are - provided in newlib for some compilers. */ -int _EXFUN(_close, (int __fildes )); -pid_t _EXFUN(_fork, (void )); -pid_t _EXFUN(_getpid, (void )); -int _EXFUN(_link, (const char *__path1, const char *__path2 )); -off_t _EXFUN(_lseek, (int __fildes, off_t __offset, int __whence )); -_READ_WRITE_RETURN_TYPE _EXFUN(_read, (int __fd, void *__buf, size_t __nbyte )); -void * _EXFUN(_sbrk, (size_t __incr)); -int _EXFUN(_unlink, (const char *__path )); -_READ_WRITE_RETURN_TYPE _EXFUN(_write, (int __fd, const void *__buf, size_t __nbyte )); -int _EXFUN(_execve, (const char *__path, char * const __argv[], char * const __envp[] )); - -#define F_OK 0 -#define R_OK 4 -#define W_OK 2 -#define X_OK 1 - -# define SEEK_SET 0 -# define SEEK_CUR 1 -# define SEEK_END 2 - -#include <sys/features.h> - -#define STDIN_FILENO 0 /* standard input file descriptor */ -#define STDOUT_FILENO 1 /* standard output file descriptor */ -#define STDERR_FILENO 2 /* standard error file descriptor */ - -#include <bits/environments.h> -#include <bits/confname.h> - -# define MAXPATHLEN 1024 - -#ifdef __cplusplus -} -#endif -#endif /* _SYS_UNISTD_H */ diff --git a/newlib/libc/sys/linux/sys/utime.h b/newlib/libc/sys/linux/sys/utime.h deleted file mode 100644 index 7499cfe7e..000000000 --- a/newlib/libc/sys/linux/sys/utime.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef _SYS_UTIME_H -#define _SYS_UTIME_H 1 - -#include <sys/types.h> - -struct utimbuf - { - time_t actime; /* Access time. */ - time_t modtime; /* Modification time. */ - }; - -int _EXFUN(utime, (const char *__file, const struct utimbuf *__times)); - -#endif /* _SYS_UTIME_H */ diff --git a/newlib/libc/sys/linux/sys/utmp.h b/newlib/libc/sys/linux/sys/utmp.h deleted file mode 100644 index a837483a9..000000000 --- a/newlib/libc/sys/linux/sys/utmp.h +++ /dev/null @@ -1,54 +0,0 @@ -/* libc/sys/linux/sys/utmp.h - utmp structure */ - -/* Written 2000 by Werner Almesberger */ - - -/* Some things copied from glibc's /usr/include/bits/utmp.h */ - - -#ifndef _SYS_UTMP_H -#define _SYS_UTMP_H - - -#include <sys/types.h> - - -#define UTMP_FILE "/var/run/utmp" - -#define UT_LINESIZE 32 -#define UT_NAMESIZE 32 -#define UT_HOSTSIZE 256 - -struct utmp { - short int ut_type; - pid_t ut_pid; - char ut_line[UT_LINESIZE]; - char ut_id[4]; - char ut_user[UT_NAMESIZE]; - char ut_host[UT_HOSTSIZE]; - char __filler[52]; -}; - -#define RUN_LVL 1 -#define BOOT_TIME 2 -#define NEW_TIME 3 -#define OLD_TIME 4 - -#define INIT_PROCESS 5 -#define LOGIN_PROCESS 6 -#define USER_PROCESS 7 -#define DEAD_PROCESS 8 - - -/* --- redundant, from sys/cygwin/sys/utmp.h --- */ - -struct utmp *_getutline (struct utmp *); -struct utmp *getutent (void); -struct utmp *getutid (struct utmp *); -struct utmp *getutline (struct utmp *); -void endutent (void); -void pututline (struct utmp *); -void setutent (void); -void utmpname (const char *); - -#endif diff --git a/newlib/libc/sys/linux/sys/utsname.h b/newlib/libc/sys/linux/sys/utsname.h deleted file mode 100644 index 4de4c63be..000000000 --- a/newlib/libc/sys/linux/sys/utsname.h +++ /dev/null @@ -1,23 +0,0 @@ -/* libc/sys/linux/sys/utsname.h - System identification */ - -/* Written 2000 by Werner Almesberger */ - - -#ifndef _SYS_UTSNAME_H -#define _SYS_UTSNAME_H - -#define __UTSNAMELEN 65 /* synchronize with kernel */ - -struct utsname { - char sysname[__UTSNAMELEN]; - char nodename[__UTSNAMELEN]; - char release[__UTSNAMELEN]; - char version[__UTSNAMELEN]; - char machine[__UTSNAMELEN]; - char domainname[__UTSNAMELEN]; -}; - - -int uname(struct utsname *name); - -#endif diff --git a/newlib/libc/sys/linux/sys/wait.h b/newlib/libc/sys/linux/sys/wait.h deleted file mode 100644 index 4cc337783..000000000 --- a/newlib/libc/sys/linux/sys/wait.h +++ /dev/null @@ -1,40 +0,0 @@ -/* libc/sys/linux/sys/wait.h - Wait for children */ - -/* Written 2000 by Werner Almesberger */ - - -#ifndef _SYS_WAIT_H -#define _SYS_WAIT_H - -#include <linux/wait.h> - -#define WIFEXITED(status) (!WTERMSIG(status)) -#define WEXITSTATUS(status) (((status) >> 8) & 0xff) -#define WIFSIGNALED(status) (!WIFSTOPPED(status) && !WIFEXITED(status)) -#define WTERMSIG(status) ((status ) & 0x7f) -#define WIFSTOPPED(status) (((status) & 0xff) == 0x7f) -#define WSTOPSIG(status) WEXITSTATUS(status) - -#ifndef _POSIX_SOURCE -#define WCOREDUMP(status) ((status) & 0x80) -#endif - -/* --- redundant stuff below --- */ - -#include <_ansi.h> -#include <sys/types.h> - -pid_t wait (int *); -pid_t waitpid (pid_t, int *, int); - -pid_t _wait (int *); - - -#ifndef _POSIX_SOURCE -#include <sys/resource.h> - -pid_t wait3(int *status,int options,struct rusage *rusage); -pid_t wait4(pid_t pid,int *status,int options,struct rusage *rusage); -#endif - -#endif |