diff options
Diffstat (limited to 'sysdeps/generic')
342 files changed, 12538 insertions, 17 deletions
diff --git a/sysdeps/generic/Makefile b/sysdeps/generic/Makefile index b6a08172e4..2f6a8f4333 100644 --- a/sysdeps/generic/Makefile +++ b/sysdeps/generic/Makefile @@ -16,7 +16,7 @@ # write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. -ifeq (,$(filter-out $(sysdep_dir)/stub/bits $(common-objpfx)/bits,\ +ifeq (,$(filter-out $(sysdep_dir)/generic/bits $(common-objpfx)/bits,\ $(dir $(firstword $(wildcard $(+sysdep_dirs:%=%/bits/endian.h)))))) $(common-objpfx)bytesex.h: $(common-objpfx)det_endian diff --git a/sysdeps/generic/__longjmp.c b/sysdeps/generic/__longjmp.c new file mode 100644 index 0000000000..84d23d4fcd --- /dev/null +++ b/sysdeps/generic/__longjmp.c @@ -0,0 +1,39 @@ +/* Copyright (C) 1991, 1994, 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. */ + +#include <errno.h> +#include <setjmp.h> + + +/* Jump to the position specified by ENV, causing the + setjmp call there to return VAL, or 1 if VAL is 0. */ +__NORETURN +void +__longjmp (env, val) + const __jmp_buf env; + int val; +{ + if (val == 0) + val = 1; + + __set_errno (ENOSYS); + /* No way to signal failure. */ +} + +stub_warning (longjmp) +#include <stub-tag.h> diff --git a/sysdeps/generic/_exit.c b/sysdeps/generic/_exit.c new file mode 100644 index 0000000000..5fb4366e49 --- /dev/null +++ b/sysdeps/generic/_exit.c @@ -0,0 +1,34 @@ +/* Copyright (C) 1991, 1994, 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. */ + +#include <unistd.h> +#include <stdlib.h> + +/* The function `_exit' should take a status argument and simply + terminate program execution, using the low-order 8 bits of the + given integer as status. */ +void +_exit (status) + int status; +{ + status &= 0xff; + abort (); +} + +stub_warning (_exit) +#include <stub-tag.h> diff --git a/sysdeps/generic/accept.c b/sysdeps/generic/accept.c new file mode 100644 index 0000000000..b8f714a201 --- /dev/null +++ b/sysdeps/generic/accept.c @@ -0,0 +1,39 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <sys/socket.h> + +/* Await a connection on socket FD. + When a connection arrives, open a new socket to communicate with it, + set *ADDR (which is *ADDR_LEN bytes long) to the address of the connecting + peer and *ADDR_LEN to the address's actual length, and return the + new socket's descriptor, or -1 for errors. */ +int +accept (fd, addr, addr_len) + int fd; + __SOCKADDR_ARG addr; + socklen_t *addr_len; +{ + __set_errno (ENOSYS); + return -1; +} + + +stub_warning (accept) +#include <stub-tag.h> diff --git a/sysdeps/generic/access.c b/sysdeps/generic/access.c new file mode 100644 index 0000000000..9dad9b5f79 --- /dev/null +++ b/sysdeps/generic/access.c @@ -0,0 +1,41 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <stddef.h> +#include <unistd.h> + +/* Test for access to FILE. */ +int +__access (file, type) + const char *file; + int type; +{ + if (file == NULL || (type & ~(R_OK|W_OK|X_OK|F_OK)) != 0) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} +stub_warning (access) + +weak_alias (__access, access) +#include <stub-tag.h> diff --git a/sysdeps/generic/acct.c b/sysdeps/generic/acct.c new file mode 100644 index 0000000000..c571567f47 --- /dev/null +++ b/sysdeps/generic/acct.c @@ -0,0 +1,34 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <unistd.h> + +/* Turn accounting on if NAME is an existing file. The system will then write + a record for each process as it terminates, to this file. If NAME is NULL, + turn accounting off. This call is restricted to the super-user. */ +int +acct (name) + const char *name; +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (acct) +#include <stub-tag.h> diff --git a/sysdeps/generic/adjtime.c b/sysdeps/generic/adjtime.c new file mode 100644 index 0000000000..9b6f3574d9 --- /dev/null +++ b/sysdeps/generic/adjtime.c @@ -0,0 +1,37 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <sys/time.h> + +/* Adjust the current time of day by the amount in DELTA. + If OLDDELTA is not NULL, it is filled in with the amount + of time adjustment remaining to be done from the last `__adjtime' call. + This call is restricted to the super-user. */ +int +__adjtime (delta, olddelta) + const struct timeval *delta; + struct timeval *olddelta; +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (adjtime) + +weak_alias (__adjtime, adjtime) +#include <stub-tag.h> diff --git a/sysdeps/generic/alarm.c b/sysdeps/generic/alarm.c new file mode 100644 index 0000000000..0f43029780 --- /dev/null +++ b/sysdeps/generic/alarm.c @@ -0,0 +1,39 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <unistd.h> + +/* Schedule an alarm. In SECONDS seconds, the process will get a SIGALRM. + If SECONDS is zero, any currently scheduled alarm will be cancelled. + The function returns the number of seconds remaining until the last + alarm scheduled would have signaled, or zero if there wasn't one. + There is no return value to indicate an error, but you can set `errno' + to 0 and check its value after calling `alarm', and this might tell you. + The signal may come late due to processor scheduling. */ +unsigned int +alarm (seconds) + unsigned int seconds; +{ + __set_errno (ENOSYS); + return 0; +} + + +stub_warning (alarm) +#include <stub-tag.h> diff --git a/sysdeps/generic/asm-syntax.h b/sysdeps/generic/asm-syntax.h new file mode 100644 index 0000000000..a36150984f --- /dev/null +++ b/sysdeps/generic/asm-syntax.h @@ -0,0 +1,3 @@ +/* On some machines the mpn function from GNU MP use a file called + "asm-syntax.h" to define macros for assembly source code to use. */ + diff --git a/sysdeps/generic/atomicity.h b/sysdeps/generic/atomicity.h new file mode 100644 index 0000000000..887ce73384 --- /dev/null +++ b/sysdeps/generic/atomicity.h @@ -0,0 +1,53 @@ +/* Low-level functions for atomic operations. Stub 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 _ATOMICITY_H +#define _ATOMICITY_H 1 + +#include <inttypes.h> + + +static inline int +__attribute__ ((unused)) +exchange_and_add (uint32_t *mem, int val) +{ + int result = *mem; + *mem += val; + return result; +} + +static inline void +__attribute__ ((unused)) +atomic_add (uint32_t *mem, int val) +{ + *mem += val; +} + +static inline int +__attribute__ ((unused)) +compare_and_swap (long int *p, long int oldval, long int newval) +{ + if (*p != oldval) + return 0; + + *p = newval; + return 1; +} + +#endif /* atomicity.h */ diff --git a/sysdeps/generic/bind.c b/sysdeps/generic/bind.c new file mode 100644 index 0000000000..1c787820d8 --- /dev/null +++ b/sysdeps/generic/bind.c @@ -0,0 +1,35 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <sys/socket.h> + +/* Give the socket FD the local address ADDR (which is LEN bytes long). */ +int +bind (fd, addr, len) + int fd; + __CONST_SOCKADDR_ARG addr; + socklen_t len; +{ + __set_errno (ENOSYS); + return -1; +} + + +stub_warning (bind) +#include <stub-tag.h> diff --git a/sysdeps/generic/bits/dirent.h b/sysdeps/generic/bits/dirent.h new file mode 100644 index 0000000000..2f7dca78aa --- /dev/null +++ b/sysdeps/generic/bits/dirent.h @@ -0,0 +1,24 @@ +/* Directory entry structure `struct dirent'. Stub version. + Copyright (C) 1996 Free Software Foundation, Inc. + This file is part of the 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. */ + +struct dirent + { + char d_name[1]; /* Variable length. */ + int d_fileno; + }; diff --git a/sysdeps/generic/bits/elfclass.h b/sysdeps/generic/bits/elfclass.h new file mode 100644 index 0000000000..1ad12954b2 --- /dev/null +++ b/sysdeps/generic/bits/elfclass.h @@ -0,0 +1,8 @@ +/* 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. */ + +#define __ELF_NATIVE_CLASS ?? + +/* This file goes in sysdeps/wordsize-?? and sysdeps/MACHINE/Implies lists + wordsize-?? for MACHINE's wordsize. */ diff --git a/sysdeps/generic/bits/endian.h b/sysdeps/generic/bits/endian.h new file mode 100644 index 0000000000..597f079a0f --- /dev/null +++ b/sysdeps/generic/bits/endian.h @@ -0,0 +1,9 @@ +/* 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. */ + +#error Machine byte order unknown. diff --git a/sysdeps/generic/bits/errno.h b/sysdeps/generic/bits/errno.h new file mode 100644 index 0000000000..e197c3603d --- /dev/null +++ b/sysdeps/generic/bits/errno.h @@ -0,0 +1,40 @@ +/* Copyright (C) 1991, 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. */ + +/* This file defines the `errno' constants. */ + +#if !defined(__Emath_defined) && (defined(_ERRNO_H) || defined(__need_Emath)) +#undef __need_Emath +#define __Emath_defined 1 + +#define EDOM 1 +#define ERANGE 2 +#endif + +#ifdef _ERRNO_H +#define ENOSYS 3 +#define EINVAL 4 +#define ESPIPE 5 +#define EBADF 6 +#define ENOMEM 7 +#define EACCES 8 +#define ENFILE 9 +#define EMFILE 10 +#endif + +#define __set_errno(val) errno = (val) diff --git a/sysdeps/generic/bits/fcntl.h b/sysdeps/generic/bits/fcntl.h new file mode 100644 index 0000000000..24a1c38be6 --- /dev/null +++ b/sysdeps/generic/bits/fcntl.h @@ -0,0 +1,85 @@ +/* O_*, F_*, FD_* bit values for stub configuration. + Copyright (C) 1991, 1992, 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. */ + +/* These values should be changed as appropriate for your system. */ + +#ifndef _FCNTL_H +#error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead." +#endif + + +/* File access modes for `open' and `fcntl'. */ +#define O_RDONLY 0 /* Open read-only. */ +#define O_WRONLY 1 /* Open write-only. */ +#define O_RDWR 2 /* Open read/write. */ + + +/* Bits OR'd into the second argument to open. */ +#define O_CREAT 0x0200 /* Create file if it doesn't exist. */ +#define O_EXCL 0x0800 /* Fail if file already exists. */ +#define O_TRUNC 0x0400 /* Truncate file to zero length. */ +#define O_NOCTTY 0x0100 /* Don't assign a controlling terminal. */ + +/* File status flags for `open' and `fcntl'. */ +#define O_APPEND 0x0008 /* Writes append to the file. */ +#define O_NONBLOCK 0x0004 /* Non-blocking I/O. */ + +#ifdef __USE_BSD +#define O_NDELAY O_NONBLOCK +#endif + +/* Mask for file access modes. This is system-dependent in case + some system ever wants to define some other flavor of access. */ +#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR) + +/* 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. */ +#ifdef __USE_BSD +#define F_GETOWN 5 /* Get owner (receiver of SIGIO). */ +#define F_SETOWN 6 /* Set owner (receiver of SIGIO). */ +#endif +#define F_GETLK 7 /* Get record locking info. */ +#define F_SETLK 8 /* Set record locking info. */ +#define F_SETLKW 9 /* Set record locking info, wait. */ + +/* File descriptor flags used with F_GETFD and F_SETFD. */ +#define FD_CLOEXEC 1 /* Close on exec. */ + + +#include <bits/types.h> + +/* The structure describing an advisory lock. This is the type of the third + argument to `fcntl' for the F_GETLK, F_SETLK, and F_SETLKW requests. */ +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'). */ + __off_t l_start; /* Offset where the lock begins. */ + __off_t l_len; /* Size of the locked area; zero means until EOF. */ + __pid_t l_pid; /* Process holding the lock. */ + }; + +/* Values for the `l_type' field of a `struct flock'. */ +#define F_RDLCK 1 /* Read lock. */ +#define F_WRLCK 2 /* Write lock. */ +#define F_UNLCK 3 /* Remove lock. */ diff --git a/sysdeps/generic/bits/fenv.h b/sysdeps/generic/bits/fenv.h new file mode 100644 index 0000000000..f45deb07c1 --- /dev/null +++ b/sysdeps/generic/bits/fenv.h @@ -0,0 +1,61 @@ +/* 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 _FENV_H +#error "Never use <bits/fenv.h> directly; include <fenv.h> instead." +#endif + + +/* Here should be the exception be defined: + FE_INVALID + FE_DIVBYZERO + FE_OVERFLOW + FE_UNDERFLOW + FE_INEXACT + We define no macro which signals no exception is supported. */ + +#define FE_ALL_EXCEPT 0 + + +/* Here should the rounding modes be defined: + FE_TONEAREST + FE_DOWNWARD + FE_UPWARD + FE_TOWARDSZERO + 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 floating-point environment. */ +typedef struct + { + fexcept_t excepts; + /* XXX I don't know what else we should save. */ + } +fenv_t; + +/* If the default argument is used we use this value. */ +#define FE_DFL_ENV ((fenv_t *) -1l) diff --git a/sysdeps/generic/bits/huge_val.h b/sysdeps/generic/bits/huge_val.h new file mode 100644 index 0000000000..8f137d1734 --- /dev/null +++ b/sysdeps/generic/bits/huge_val.h @@ -0,0 +1,26 @@ +/* Stub `HUGE_VAL' constant. + Used by <stdlib.h> and <math.h> functions for overflow. + Copyright (C) 1992, 1996 Free Software Foundation, Inc. + This file is part of the 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 + + +#define HUGE_VAL 1e37 diff --git a/sysdeps/generic/bits/ioctls.h b/sysdeps/generic/bits/ioctls.h new file mode 100644 index 0000000000..3b6178bfae --- /dev/null +++ b/sysdeps/generic/bits/ioctls.h @@ -0,0 +1 @@ +/* This space intentionally left blank. */ diff --git a/sysdeps/generic/bits/ipc.h b/sysdeps/generic/bits/ipc.h new file mode 100644 index 0000000000..a5ecbd90b7 --- /dev/null +++ b/sysdeps/generic/bits/ipc.h @@ -0,0 +1,56 @@ +/* Copyright (C) 1995, 1996 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995. + + 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_BUF_H + +#define _SYS_IPC_BUF_H 1 +#include <features.h> + +#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 */ + + +__BEGIN_DECLS + +/* Special key values. */ +#define IPC_PRIVATE ((key_t) 0) /* private key */ + + +/* Data structure used to pass permission information to IPC operations. */ +struct ipc_perm +{ + __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 */ + __mode_t mode; /* read/write permission */ +}; + +__END_DECLS + +#endif /* _SYS_IPC_BUF_H */ diff --git a/sysdeps/generic/bits/libc-lock.h b/sysdeps/generic/bits/libc-lock.h new file mode 100644 index 0000000000..c24dcd047a --- /dev/null +++ b/sysdeps/generic/bits/libc-lock.h @@ -0,0 +1,109 @@ +/* libc-internal interface for mutex locks. Stub 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. */ + +#ifndef _BITS_LIBC_LOCK_H +#define _BITS_LIBC_LOCK_H 1 + + +/* 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) + +/* Define an initialized lock variable NAME with storage class CLASS. */ +#define __libc_lock_define_initialized(CLASS,NAME) + +/* Define an initialized recursive lock variable NAME with storage + class CLASS. */ +#define __libc_lock_define_initialized_recursive(CLASS,NAME) + +/* Initialize the named lock variable, leaving it in a consistent, unlocked + state. */ +#define __libc_lock_init(NAME) + +/* Same as last but this time we initialize a recursive mutex. */ +#define __libc_lock_init_recursive(NAME) + +/* 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) + +/* Finalize recursive named lock. */ +#define __libc_lock_fini_recursive(NAME) + +/* Lock the named lock variable. */ +#define __libc_lock_lock(NAME) + +/* Lock the recursive named lock variable. */ +#define __libc_lock_lock_recursive(NAME) + +/* Try to lock the named lock variable. */ +#define __libc_lock_trylock(NAME) 0 + +/* Try to lock the recursive named lock variable. */ +#define __libc_lock_trylock_recursive(NAME) 0 + +/* Unlock the named lock variable. */ +#define __libc_lock_unlock(NAME) + +/* Unlock the recursive named lock variable. */ +#define __libc_lock_unlock_recursive(NAME) + + +/* Define once control variable. */ +#define __libc_once_define(CLASS, NAME) CLASS int NAME = 0 + +/* Call handler iff the first call. */ +#define __libc_once(ONCE_CONTROL, INIT_FUNCTION) \ + do { \ + if ((ONCE_CONTROL) == 0) { \ + INIT_FUNCTION (); \ + (ONCE_CONTROL) = 1; \ + } \ + } while (0) + + +/* Start critical region with cleanup. */ +#define __libc_cleanup_region_start(FCT, ARG) + +/* End critical region with cleanup. */ +#define __libc_cleanup_region_end(DOIT) + + +/* We need portable names for some of the functions. */ +#define __libc_mutex_unlock + +/* Type for key of thread specific data. */ +typedef int __libc_key_t; + +/* Create key for thread specific data. */ +#define __libc_key_create(KEY,DEST) -1 + +/* Set thread-specific data associated with KEY to VAL. */ +#define __libc_setspecific(KEY,VAL) -1 + +/* Get thread-specific data associated with KEY. */ +#define __libc_getspecific(KEY) 0 + +#endif /* bits/libc-lock.h */ diff --git a/sysdeps/generic/bits/local_lim.h b/sysdeps/generic/bits/local_lim.h new file mode 100644 index 0000000000..42cc7ebbc9 --- /dev/null +++ b/sysdeps/generic/bits/local_lim.h @@ -0,0 +1,3 @@ +/* This file should define the implementation-specific limits described + in posix[12]_lim.h. If there are no useful values to give a limit, + don't define it. */ diff --git a/sysdeps/generic/bits/mathinline.h b/sysdeps/generic/bits/mathinline.h new file mode 100644 index 0000000000..5498af6b63 --- /dev/null +++ b/sysdeps/generic/bits/mathinline.h @@ -0,0 +1,12 @@ +/* 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/sysdeps/generic/bits/msq.h b/sysdeps/generic/bits/msq.h new file mode 100644 index 0000000000..37daa9bf8c --- /dev/null +++ b/sysdeps/generic/bits/msq.h @@ -0,0 +1,47 @@ +/* Copyright (C) 1995, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995. + + 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 <features.h> +#include <sys/types.h> + +/* Define options for message queue functions. */ +#define MSG_NOERROR 010000 /* no error if message is too big */ + +__BEGIN_DECLS + +/* 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 */ + __time_t msg_rtime; /* time of last msgrcv command */ + __time_t msg_ctime; /* time of last change */ + unsigned short int msg_qnum; /* number of messages currently on queue */ + unsigned short int 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() */ +}; + +__END_DECLS diff --git a/sysdeps/generic/bits/nan.h b/sysdeps/generic/bits/nan.h new file mode 100644 index 0000000000..ab38168ea4 --- /dev/null +++ b/sysdeps/generic/bits/nan.h @@ -0,0 +1,5 @@ +#ifndef _MATH_H +#error "Never use <bits/nan.h> directly; include <math.h> instead." +#endif + +/* This file should define `NAN' on machines that have such things. */ diff --git a/sysdeps/generic/bits/posix_opt.h b/sysdeps/generic/bits/posix_opt.h new file mode 100644 index 0000000000..54f5a79aa2 --- /dev/null +++ b/sysdeps/generic/bits/posix_opt.h @@ -0,0 +1,2 @@ +/* This file should define the POSIX options described in <unistd.h>, + or leave them undefined, as appropriate. */ diff --git a/sysdeps/generic/bits/sem.h b/sysdeps/generic/bits/sem.h new file mode 100644 index 0000000000..1d3e41bd56 --- /dev/null +++ b/sysdeps/generic/bits/sem.h @@ -0,0 +1,61 @@ +/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995. + + 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 use <bits/sem.h> directly; include <sys/sem.h> instead." +#endif + + +#include <features.h> +#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 */ + + +__BEGIN_DECLS + +/* 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() */ + unsigned short int sem_nsems; /* number of semaphores in set */ +}; + +/* Union used for argument 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 */ + }; + +__END_DECLS diff --git a/sysdeps/generic/bits/setjmp.h b/sysdeps/generic/bits/setjmp.h new file mode 100644 index 0000000000..6620e5ab15 --- /dev/null +++ b/sysdeps/generic/bits/setjmp.h @@ -0,0 +1,3 @@ +/* Define the machine-dependent type `jmp_buf'. Stub version. */ + +typedef int __jmp_buf[1]; diff --git a/sysdeps/generic/bits/shm.h b/sysdeps/generic/bits/shm.h new file mode 100644 index 0000000000..b41d0c1e86 --- /dev/null +++ b/sysdeps/generic/bits/shm.h @@ -0,0 +1,53 @@ +/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995. + + 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 use <bits/shm.h> directly; include <sys/shm.h> instead." +#endif + + +#include <features.h> +#include <sys/types.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) */ + + +__BEGIN_DECLS + +/* Data structure describing a set of semaphores. */ +struct shmid_ds +{ + struct ipc_perm sem_perm; /* operation permission struct */ + int shm_segsz; /* size of segment in bytes */ + __time_t sem_atime; /* time of last shmat() */ + __time_t sem_dtime; /* time of last shmdt() */ + __time_t sem_ctime; /* time of last change by shmctl() */ + __pid_t shm_cpid; /* pid of creator */ + __pid_t shm_lpid; /* pid of last shmop */ + unsigned short int shm_nattch; /* number of current attaches */ +}; + +__END_DECLS diff --git a/sysdeps/generic/bits/sigcontext.h b/sysdeps/generic/bits/sigcontext.h new file mode 100644 index 0000000000..46e4df8c64 --- /dev/null +++ b/sysdeps/generic/bits/sigcontext.h @@ -0,0 +1,29 @@ +/* Structure describing state saved while handling a signal. Stub version. + Copyright (C) 1991, 1994, 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. */ + +/* State of this thread when the signal was taken. */ +struct sigcontext + { + int sc_onstack; + __sigset_t sc_mask; + + /* Registers and such. */ + }; + +/* Signal subcodes should be defined here. */ diff --git a/sysdeps/generic/bits/signum.h b/sysdeps/generic/bits/signum.h new file mode 100644 index 0000000000..6b4693f64c --- /dev/null +++ b/sysdeps/generic/bits/signum.h @@ -0,0 +1,53 @@ +/* Copyright (C) 1991, 1993, 1996 Free Software Foundation, Inc. + This file is part of the 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. */ +extern void _sig_ign __P ((int sig)); +extern void _sig_dfl __P ((int sig)); + +#define SIG_ERR ((__sighandler_t) 0) /* Error return. */ +#define SIG_DFL _sig_dfl /* Default action. */ +#define SIG_IGN _sig_ign /* Ignore signal. */ + + +/* ANSI signals. */ +#define SIGABRT 1 /* Abnormal termination. */ +#define SIGFPE 2 /* Erroneous arithmetic operation. */ +#define SIGILL 3 /* Illegal instruction. */ +#define SIGINT 3 /* Interactive attention signal. */ +#define SIGSEGV 4 /* Invalid access to storage. */ +#define SIGTERM 5 /* Termination request. */ + +/* POSIX signals. */ +#define SIGHUP 6 /* Hangup. */ +#define SIGQUIT 7 /* Quit. */ +#define SIGPIPE 8 /* Broken pipe. */ +#define SIGKILL 9 /* Kill (cannot be blocked, caught, or ignored). */ +#define SIGALRM 10 /* Alarm clock. */ +#define SIGSTOP 11 /* Stop (cannot be blocked, caught, or ignored). */ +#define SIGTSTP 12 /* Keyboard stop. */ +#define SIGCONT 13 /* Continue. */ +#define SIGCHLD 14 /* Child terminated or stopped. */ +#define SIGTTIN 15 /* Background read from control terminal. */ +#define SIGTTOU 16 /* Background write to control terminal. */ + +#endif /* <signal.h> included. */ + +#define _NSIG 17 diff --git a/sysdeps/generic/bits/stat.h b/sysdeps/generic/bits/stat.h new file mode 100644 index 0000000000..dab0cd00cb --- /dev/null +++ b/sysdeps/generic/bits/stat.h @@ -0,0 +1,74 @@ +/* Copyright (C) 1992, 1996 Free Software Foundation, Inc. + This file is part of the 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/stat.h> instead. + */ + +/* This structure needs to be defined in accordance with the + implementation of __stat, __fstat, and __lstat. */ + +#ifndef _BITS_STAT_H +#define _BITS_STAT_H 1 + +#include <bits/types.h> + +/* Structure describing file characteristics. */ +struct stat + { + /* These are the members that POSIX.1 requires. */ + + __mode_t st_mode; /* File mode. */ + __ino_t st_ino; /* File serial number. */ + __dev_t st_dev; /* Device containing the file. */ + __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. */ + __off_t st_size; /* Size of file, in bytes. */ + + __time_t st_atime; /* Time of last access. */ + __time_t st_mtime; /* Time of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + + /* This should be defined if there is a `st_blksize' member. */ +#undef _STATBUF_ST_BLKSIZE + }; + +/* Encoding of the file mode. These are the standard Unix values, + but POSIX.1 does not specify what values should be used. */ + +#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. */ + +/* Protection bits. */ + +#define __S_ISUID 04000 /* Set user ID on execution. */ +#define __S_ISGID 02000 /* Set group ID on execution. */ +#define __S_IREAD 0400 /* Read by owner. */ +#define __S_IWRITE 0200 /* Write by owner. */ +#define __S_IEXEC 0100 /* Execute by owner. */ + + +#endif /* bits/stat.h */ diff --git a/sysdeps/generic/bits/stdio_lim.h b/sysdeps/generic/bits/stdio_lim.h new file mode 100644 index 0000000000..ef873777c9 --- /dev/null +++ b/sysdeps/generic/bits/stdio_lim.h @@ -0,0 +1,37 @@ +/* Copyright (C) 1994, 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. */ + +/* <bits/stdio_lim.h>: stdio limits for non-POSIX systems. + * Never include this file directly; use <stdio.h> instead. + */ + +#ifndef _BITS_STDIO_LIM_H +#define _BITS_STDIO_LIM_H + +#define L_tmpnam 1 +#define TMP_MAX 0 + +#ifdef __USE_POSIX +#define L_ctermid 1 +#define L_cuserid 1 +#endif + +#define FOPEN_MAX 16 +#define FILENAME_MAX 14 + +#endif diff --git a/sysdeps/generic/bits/string.h b/sysdeps/generic/bits/string.h new file mode 100644 index 0000000000..ad68b038b6 --- /dev/null +++ b/sysdeps/generic/bits/string.h @@ -0,0 +1,12 @@ +/* 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/sysdeps/generic/bits/time.h b/sysdeps/generic/bits/time.h new file mode 100644 index 0000000000..e41a991b44 --- /dev/null +++ b/sysdeps/generic/bits/time.h @@ -0,0 +1,44 @@ +/* System-dependent timing definitions. Stub 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. + */ + +#ifdef __need_timeval +# undef __need_timeval +# ifndef _STRUCT_TIMEVAL +# define _STRUCT_TIMEVAL 1 +/* 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 */ + + +#ifndef _BITS_TIME_H +#define _BITS_TIME_H 1 + +#define CLOCKS_PER_SEC 60 + +#endif /* bits/time.h */ diff --git a/sysdeps/generic/bits/waitflags.h b/sysdeps/generic/bits/waitflags.h new file mode 100644 index 0000000000..127eb6ce4c --- /dev/null +++ b/sysdeps/generic/bits/waitflags.h @@ -0,0 +1,27 @@ +/* Definitions of flag bits for `waitpid' et al. + Copyright (C) 1992, 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_WAIT_H +#error "Never use <bits/waitflags.h> directly; include <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. */ diff --git a/sysdeps/generic/brdinit.c b/sysdeps/generic/brdinit.c new file mode 100644 index 0000000000..35c10b4a0d --- /dev/null +++ b/sysdeps/generic/brdinit.c @@ -0,0 +1,32 @@ +/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), + On-Line Applications Research Corporation. + + 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 <standalone.h> + +/* This file is only required when a "bare" board is configured. */ + +/* _Board_Initialize + +This routine normally performs board specific initialization. */ + +void +_Board_Initialize () +{ +} diff --git a/sysdeps/generic/brk.c b/sysdeps/generic/brk.c new file mode 100644 index 0000000000..4db14f7591 --- /dev/null +++ b/sysdeps/generic/brk.c @@ -0,0 +1,34 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <unistd.h> + +/* Set the end of the process's data space to ADDR. + Return 0 if successful, -1 if not. */ +int +__brk (addr) + void *addr; +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (brk) + +weak_alias (__brk, brk) +#include <stub-tag.h> diff --git a/sysdeps/generic/bsd-_setjmp.c b/sysdeps/generic/bsd-_setjmp.c new file mode 100644 index 0000000000..97d665191a --- /dev/null +++ b/sysdeps/generic/bsd-_setjmp.c @@ -0,0 +1,33 @@ +/* BSD `setjmp' entry point to `sigsetjmp (..., 0)'. Stub version. + Copyright (C) 1994, 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 <sysdep.h> + +#undef setjmp + +/* This implementation in C will not usually work, because the call + really needs to be a tail-call so __sigsetjmp saves the state of + the caller, not the state of this `setjmp' frame which then + immediate unwinds. */ + +int +setjmp (jmp_buf env) +{ + return __sigsetjmp (env, 0); +} diff --git a/sysdeps/generic/bsd-setjmp.c b/sysdeps/generic/bsd-setjmp.c new file mode 100644 index 0000000000..d53263ba62 --- /dev/null +++ b/sysdeps/generic/bsd-setjmp.c @@ -0,0 +1,33 @@ +/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. Stub version. + Copyright (C) 1994, 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 <sysdep.h> + +#undef setjmp + +/* This implementation in C will not usually work, because the call + really needs to be a tail-call so __sigsetjmp saves the state of + the caller, not the state of this `setjmp' frame which then + immediate unwinds. */ + +int +setjmp (jmp_buf env) +{ + return __sigsetjmp (env, 1); +} diff --git a/sysdeps/generic/chdir.c b/sysdeps/generic/chdir.c new file mode 100644 index 0000000000..963885bd5e --- /dev/null +++ b/sysdeps/generic/chdir.c @@ -0,0 +1,40 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <stddef.h> +#include <unistd.h> + +/* Change the current directory to PATH. */ +int +__chdir (path) + const char *path; +{ + if (path == NULL) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} +stub_warning (chdir) + +weak_alias (__chdir, chdir) +#include <stub-tag.h> diff --git a/sysdeps/generic/chflags.c b/sysdeps/generic/chflags.c new file mode 100644 index 0000000000..bf2a283b20 --- /dev/null +++ b/sysdeps/generic/chflags.c @@ -0,0 +1,43 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <stddef.h> +#include <sys/stat.h> + +/* Change the flags of FILE to FLAGS. */ + +int chflags __P ((const char *file, int flags)); + +int +chflags (file, flags) + const char *file; + int flags; +{ + if (file == NULL) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} + +stub_warning (chflags) +#include <stub-tag.h> diff --git a/sysdeps/generic/chmod.c b/sysdeps/generic/chmod.c new file mode 100644 index 0000000000..3e76c93903 --- /dev/null +++ b/sysdeps/generic/chmod.c @@ -0,0 +1,42 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <stddef.h> +#include <sys/stat.h> +#include <sys/types.h> + +/* Change the protections of FILE to MODE. */ +int +__chmod (file, mode) + const char *file; + mode_t mode; +{ + if (file == NULL) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} +stub_warning (chmod) + +weak_alias (__chmod, chmod) +#include <stub-tag.h> diff --git a/sysdeps/generic/chown.c b/sysdeps/generic/chown.c new file mode 100644 index 0000000000..62753e06d0 --- /dev/null +++ b/sysdeps/generic/chown.c @@ -0,0 +1,43 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <stddef.h> +#include <unistd.h> +#include <sys/types.h> + +/* Change the owner and group of FILE. */ +int +__chown (file, owner, group) + const char *file; + uid_t owner; + gid_t group; +{ + if (file == NULL) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} +stub_warning (chown) + +weak_alias (__chown, chown) +#include <stub-tag.h> diff --git a/sysdeps/generic/chroot.c b/sysdeps/generic/chroot.c new file mode 100644 index 0000000000..1852c08938 --- /dev/null +++ b/sysdeps/generic/chroot.c @@ -0,0 +1,34 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <unistd.h> + +/* Make PATH be the root directory (the starting point for absolute paths). + This call is restricted to the super-user. */ +int +chroot (path) + const char *path; +{ + __set_errno (ENOSYS); + return -1; +} + + +stub_warning (chroot) +#include <stub-tag.h> diff --git a/sysdeps/generic/clock.c b/sysdeps/generic/clock.c new file mode 100644 index 0000000000..ac0dc46e4f --- /dev/null +++ b/sysdeps/generic/clock.c @@ -0,0 +1,32 @@ +/* Copyright (C) 1991, 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. */ + +#include <sys/times.h> +#include <time.h> +#include <errno.h> + +/* Return the time used by the program so far (user time + system time). */ +clock_t +clock () +{ + __set_errno (ENOSYS); + return (clock_t) -1; +} + +stub_warning (clock) +#include <stub-tag.h> diff --git a/sysdeps/generic/close.c b/sysdeps/generic/close.c new file mode 100644 index 0000000000..4e78ca12fe --- /dev/null +++ b/sysdeps/generic/close.c @@ -0,0 +1,39 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <unistd.h> + +/* Close the file descriptor FD. */ +int +__close (fd) + int fd; +{ + if (fd < 0) + { + __set_errno (EBADF); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} +stub_warning (close) + +weak_alias (__close, close) +#include <stub-tag.h> diff --git a/sysdeps/generic/closedir.c b/sysdeps/generic/closedir.c new file mode 100644 index 0000000000..77e9a69352 --- /dev/null +++ b/sysdeps/generic/closedir.c @@ -0,0 +1,35 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <stddef.h> +#include <dirent.h> + + +/* Close the directory stream DIRP. + Return 0 if successful, -1 if not. */ +int +__closedir (DIR *dirp) +{ + __set_errno (ENOSYS); + return -1; +} +weak_alias (__closedir, closedir) + +stub_warning (closedir) +#include <stub-tag.h> diff --git a/sysdeps/generic/confstr.h b/sysdeps/generic/confstr.h new file mode 100644 index 0000000000..988ec88c0c --- /dev/null +++ b/sysdeps/generic/confstr.h @@ -0,0 +1,4 @@ +/* This file should define values for the strings returned by `confstr'. + If _NAME is passed to `confstr', define NAME. */ + +#define CS_PATH "" diff --git a/sysdeps/generic/connect.c b/sysdeps/generic/connect.c new file mode 100644 index 0000000000..cbea96a61d --- /dev/null +++ b/sysdeps/generic/connect.c @@ -0,0 +1,38 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <sys/socket.h> + +/* Open a connection on socket FD to peer at ADDR (which LEN bytes long). + For connectionless socket types, just set the default address to send to + and the only address from which to accept transmissions. + Return 0 on success, -1 for errors. */ +int +__connect (fd, addr, len) + int fd; + __CONST_SOCKADDR_ARG addr; + socklen_t len; +{ + __set_errno (ENOSYS); + return -1; +} +weak_alias (__connect, connect) + +stub_warning (connect) +#include <stub-tag.h> diff --git a/sysdeps/generic/console.c b/sysdeps/generic/console.c new file mode 100644 index 0000000000..d48455b40d --- /dev/null +++ b/sysdeps/generic/console.c @@ -0,0 +1,42 @@ +/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), + On-Line Applications Research Corporation. + + 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 <standalone.h> + +/* This file is only required when a "bare" board is configured. */ + +/* These routines provide console IO routines for your embedded target. */ + +int +_Console_Putc (ch) + char ch; +{ + /* eat the character */ + + return 0; +} + +int +_Console_Getc (poll) + int poll; +{ + /* boring user, never types anything */ + return -1; +} diff --git a/sysdeps/generic/ctermid.c b/sysdeps/generic/ctermid.c new file mode 100644 index 0000000000..589ccfee0e --- /dev/null +++ b/sysdeps/generic/ctermid.c @@ -0,0 +1,36 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <stdio.h> + + +/* Return the name of the controlling terminal. + If S is not NULL, the name is copied into it (it should be at + least L_ctermid bytes long), otherwise a static buffer is used. */ +char * +ctermid (s) + char *s; +{ + __set_errno (ENOSYS); + return NULL; +} + + +stub_warning (ctermid) +#include <stub-tag.h> diff --git a/sysdeps/generic/cuserid.c b/sysdeps/generic/cuserid.c new file mode 100644 index 0000000000..1d9d17c7b6 --- /dev/null +++ b/sysdeps/generic/cuserid.c @@ -0,0 +1,35 @@ +/* Copyright (C) 1991, 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. */ + +#include <stdio.h> +#include <errno.h> + +/* Return the username of the caller. + If S is not NULL, it points to a buffer of at least L_cuserid bytes + into which the name is copied; otherwise, a static buffer is used. */ +char * +cuserid (s) + char *s; +{ + __set_errno (ENOSYS); + return NULL; +} + + +stub_warning (cuserid) +#include <stub-tag.h> diff --git a/sysdeps/generic/dbl2mpn.c b/sysdeps/generic/dbl2mpn.c new file mode 100644 index 0000000000..6d012610d9 --- /dev/null +++ b/sysdeps/generic/dbl2mpn.c @@ -0,0 +1,32 @@ +/* Copyright (C) 1993, 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 "gmp.h" +#include "gmp-impl.h" + +/* Convert a `double' to a multi-precision integer representing the + significand scaled up by the highest possible number of significant bits + of fraction (DBL_MANT_DIG), and an integral power of two (MPN frexp). */ + +mp_size_t +__mpn_extract_double (mp_ptr res_ptr, mp_size_t size, + int *expt, int *is_neg, + double value) +{ +#error "__mpn_extract_double is not implemented for this floating point format" +} diff --git a/sysdeps/generic/defs.c b/sysdeps/generic/defs.c new file mode 100644 index 0000000000..3d4abea476 --- /dev/null +++ b/sysdeps/generic/defs.c @@ -0,0 +1,47 @@ +/* Definitions of global stdio data structures. + Copyright (C) 1991, 1995, 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 <stdio.h> + +/* This file should define the following + variables as appropriate for the system. */ + +FILE *stdin, *stdout, *stderr; + +/* Pointer to the first stream in the list. */ +FILE *__stdio_head; + +/* This function MUST be in this file! + This is because we want _cleanup to go into the __libc_atexit set + when any stdio code is used (and to use any stdio code, one must reference + something defined in this file), and since only local symbols can be made + set elements, having the set element stab entry here and _cleanup elsewhere + loses; and having them both elsewhere loses because there is no reference + to cause _cleanup to be linked in. */ + +void +_cleanup () +{ + __fcloseall (); +} + + +#ifdef HAVE_GNU_LD +text_set_element (__libc_atexit, _cleanup); +#endif diff --git a/sysdeps/generic/des_impl.c b/sysdeps/generic/des_impl.c new file mode 100644 index 0000000000..e0a3af9dd9 --- /dev/null +++ b/sysdeps/generic/des_impl.c @@ -0,0 +1,28 @@ +/* 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. */ + +/* We must not distribute the DES implementation as part of the glibc. + So we have to provide a dummy version here. */ +int +_des_crypt (char *buf, unsigned len, struct desparams *desp) +{ + return 0; +} + +stub_warning (_des_crypt) +#include <stub-tag.h> diff --git a/sysdeps/generic/dirfd.c b/sysdeps/generic/dirfd.c new file mode 100644 index 0000000000..a3f07a63f9 --- /dev/null +++ b/sysdeps/generic/dirfd.c @@ -0,0 +1,33 @@ +/* Return the file descriptor used by a DIR stream. Stub version. + Copyright (C) 1995, 1996 Free Software Foundation, Inc. + This file is part of the 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 <dirent.h> +#include <dirstream.h> +#include <errno.h> + +int +dirfd (dirp) + DIR *dirp; +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (dirfd) +#include <stub-tag.h> diff --git a/sysdeps/generic/dirstream.h b/sysdeps/generic/dirstream.h new file mode 100644 index 0000000000..cb1e784d38 --- /dev/null +++ b/sysdeps/generic/dirstream.h @@ -0,0 +1,30 @@ +/* Copyright (C) 1993, 1995, 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 _DIRSTREAM_H + +#define _DIRSTREAM_H 1 + + +/* This file should define a type `struct __dirstream', the data type of + directory stream objects returned by `opendir'. */ + +#error "No system-dependent definition of `struct __dirstream'." + + +#endif /* dirstream.h */ diff --git a/sysdeps/generic/dl-machine.h b/sysdeps/generic/dl-machine.h new file mode 100644 index 0000000000..f787df3500 --- /dev/null +++ b/sysdeps/generic/dl-machine.h @@ -0,0 +1,137 @@ +/* Machine-dependent ELF dynamic relocation inline functions. Stub version. + 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. */ + +#define ELF_MACHINE_NAME "stub" + +#include <assert.h> +#include <string.h> +#include <link.h> + + +/* Return nonzero iff E_MACHINE is compatible with the running host. */ +static inline int +elf_machine_matches_host (Elf32_Half e_machine) +{ + switch (e_machine) + { + default: + return 0; + } +} + + +/* Return the link-time address of _DYNAMIC. */ +static inline Elf32_Addr +elf_machine_dynamic (void) +{ +#error "Damn, no _DYNAMIC" +} + + +/* Return the run-time load address of the shared object. */ +static inline Elf32_Addr +elf_machine_load_address (void) +{ +#error "Where am I?" +} + +/* Fixup a PLT entry to bounce directly to the function at VALUE. */ + +static inline void +elf_machine_fixup_plt (struct link_map *map, const Elf32_Rel *reloc, + Elf32_Addr *reloc_addr, Elf32_Addr value) +{ + *reloc_addr = value; +} + +/* Perform the relocation specified by RELOC and SYM (which is fully resolved). + LOADADDR is the load address of the object; INFO is an array indexed + by DT_* of the .dynamic section info. */ + +static inline void +elf_machine_rel (Elf32_Addr loadaddr, Elf32_Dyn *info[DT_NUM], + const Elf32_Rel *reloc, const Elf32_Sym *sym, + Elf32_Addr (*resolve) (const Elf32_Sym **ref, + Elf32_Addr reloc_addr, + int noplt)) +{ + Elf32_Addr *const reloc_addr = (Elf32_Addr *) reloc->r_offset; + Elf32_Addr loadbase; + + switch (ELF32_R_TYPE (reloc->r_info)) + { + case R_MACHINE_COPY: + loadbase = (*resolve) (&sym, (Elf32_Addr) reloc_addr, 0); + memcpy (reloc_addr, (void *) (loadbase + sym->st_value), sym->st_size); + break; + default: + assert (! "unexpected dynamic reloc type"); + break; + } +} + + +static inline Elf32_Addr +elf_machine_rela (Elf32_Addr loadaddr, Elf32_Dyn *info[DT_NUM], + const Elf32_Rel *reloc, const Elf32_Sym *sym, + Elf32_Addr (*resolve) (const Elf32_Sym **ref, + Elf32_Addr reloc_addr, + int noplt)) +{ + _dl_signal_error (0, "Elf32_Rela relocation requested -- unused on " + ELF_MACHINE_NAME); +} + + +/* Nonzero iff TYPE describes relocation of a PLT entry, so + PLT entries should not be allowed to define the value. */ +#define elf_machine_pltrel_p(type) ((type) == R_???_JMP_SLOT) + + +/* Set up the loaded object described by L so its unrelocated PLT + entries will jump to the on-demand fixup code in dl-runtime.c. */ + +static inline int +elf_machine_runtime_setup (struct link_map *l, int lazy) +{ + extern void _dl_runtime_resolve (Elf32_Word); + + if (lazy) + { + /* The GOT entries for functions in the PLT have not yet been filled + in. Their initial contents will arrange when called to push an + offset into the .rel.plt section, push _GLOBAL_OFFSET_TABLE_[1], + and then jump to _GLOBAL_OFFSET_TABLE[2]. */ + Elf32_Addr *got = (Elf32_Addr *) l->l_info[DT_PLTGOT]->d_un.d_ptr; + got[1] = (Elf32_Addr) l; /* Identify this shared object. */ + + /* This function will get called to fix up the GOT entry indicated by + the offset on the stack, and then jump to the resolved address. */ + got[2] = (Elf32_Addr) &_dl_runtime_resolve; + } + + return lazy; +} + + +/* Initial entry point code for the dynamic linker. + The C function `_dl_start' is the real entry point; + its return value is the user program's entry point. */ + +#define RTLD_START #error need some startup code diff --git a/sysdeps/generic/dup.c b/sysdeps/generic/dup.c new file mode 100644 index 0000000000..95fe18bf01 --- /dev/null +++ b/sysdeps/generic/dup.c @@ -0,0 +1,34 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <fcntl.h> +#include <unistd.h> + +/* Duplicate FD, returning a new file descriptor open on the same file. */ +int +__dup (fd) + int fd; +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (dup) + +weak_alias (__dup, dup) +#include <stub-tag.h> diff --git a/sysdeps/generic/dup2.c b/sysdeps/generic/dup2.c new file mode 100644 index 0000000000..ded80d3e00 --- /dev/null +++ b/sysdeps/generic/dup2.c @@ -0,0 +1,47 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <fcntl.h> +#include <unistd.h> + + +/* Duplicate FD to FD2, closing the old FD2 and making FD2 be + open the same file as FD is. Return FD2 or -1. */ +int +__dup2 (fd, fd2) + int fd; + int fd2; +{ + if (fd < 0 || fd2 < 0) + { + __set_errno (EBADF); + return -1; + } + + if (fd == fd2) + /* No way to check that they are valid. */ + return fd2; + + __set_errno (ENOSYS); + return -1; +} +stub_warning (dup2) + +weak_alias (__dup2, dup2) +#include <stub-tag.h> diff --git a/sysdeps/generic/e_acoshl.c b/sysdeps/generic/e_acoshl.c new file mode 100644 index 0000000000..2c7e8ca3cd --- /dev/null +++ b/sysdeps/generic/e_acoshl.c @@ -0,0 +1,14 @@ +#include <math.h> +#include <stdio.h> +#include <errno.h> + +long double +__ieee754_acoshl (long double x) +{ + fputs ("__ieee754_acoshl not implemented\n", stderr); + __set_errno (ENOSYS); + return 0.0; +} + +stub_warning (__ieee754_acoshl) +#include <stub-tag.h> diff --git a/sysdeps/generic/e_acosl.c b/sysdeps/generic/e_acosl.c new file mode 100644 index 0000000000..f7ee70d592 --- /dev/null +++ b/sysdeps/generic/e_acosl.c @@ -0,0 +1,14 @@ +#include <math.h> +#include <stdio.h> +#include <errno.h> + +long double +__ieee754_acosl (long double x) +{ + fputs ("__ieee754_acosl not implemented\n", stderr); + __set_errno (ENOSYS); + return 0.0; +} + +stub_warning (__ieee754_acosl) +#include <stub-tag.h> diff --git a/sysdeps/generic/e_asinl.c b/sysdeps/generic/e_asinl.c new file mode 100644 index 0000000000..271a375fa2 --- /dev/null +++ b/sysdeps/generic/e_asinl.c @@ -0,0 +1,14 @@ +#include <math.h> +#include <stdio.h> +#include <errno.h> + +long double +__ieee754_asinl (long double x) +{ + fputs ("__ieee754_asinl not implemented\n", stderr); + __set_errno (ENOSYS); + return 0.0; +} + +stub_warning (__ieee754_asinl) +#include <stub-tag.h> diff --git a/sysdeps/generic/e_atan2l.c b/sysdeps/generic/e_atan2l.c new file mode 100644 index 0000000000..00d43d95c2 --- /dev/null +++ b/sysdeps/generic/e_atan2l.c @@ -0,0 +1,14 @@ +#include <math.h> +#include <stdio.h> +#include <errno.h> + +long double +__ieee754_atan2l (long double x, long double y) +{ + fputs ("__ieee754_atan2l not implemented\n", stderr); + __set_errno (ENOSYS); + return 0.0; +} + +stub_warning (__ieee754_atan2l) +#include <stub-tag.h> diff --git a/sysdeps/generic/e_expl.c b/sysdeps/generic/e_expl.c new file mode 100644 index 0000000000..9d6a4bd4bd --- /dev/null +++ b/sysdeps/generic/e_expl.c @@ -0,0 +1,14 @@ +#include <math.h> +#include <stdio.h> +#include <errno.h> + +long double +__ieee754_expl (long double x) +{ + fputs ("__ieee754_expl not implemented\n", stderr); + __set_errno (ENOSYS); + return 0.0; +} + +stub_warning (__ieee754_expl) +#include <stub-tag.h> diff --git a/sysdeps/generic/e_fmodl.c b/sysdeps/generic/e_fmodl.c new file mode 100644 index 0000000000..950ba085b5 --- /dev/null +++ b/sysdeps/generic/e_fmodl.c @@ -0,0 +1,14 @@ +#include <math.h> +#include <stdio.h> +#include <errno.h> + +long double +__ieee754_fmodl (long double x, long double y) +{ + fputs ("__ieee754_fmodl not implemented\n", stderr); + __set_errno (ENOSYS); + return 0.0; +} + +stub_warning (__ieee754_fmodl) +#include <stub-tag.h> diff --git a/sysdeps/generic/e_j0l.c b/sysdeps/generic/e_j0l.c new file mode 100644 index 0000000000..1e36bf76ad --- /dev/null +++ b/sysdeps/generic/e_j0l.c @@ -0,0 +1,24 @@ +#include <math.h> +#include <stdio.h> +#include <errno.h> + +long double +__ieee754_j0l (long double x) +{ + fputs ("__ieee754_j0l not implemented\n", stderr); + __set_errno (ENOSYS); + return 0.0; +} + +stub_warning (__ieee754_j0l) + +long double +__ieee754_y0l (long double x) +{ + fputs ("__ieee754_y0l not implemented\n", stderr); + __set_errno (ENOSYS); + return 0.0; +} + +stub_warning (__ieee754_y0l) +#include <stub-tag.h> diff --git a/sysdeps/generic/e_j1l.c b/sysdeps/generic/e_j1l.c new file mode 100644 index 0000000000..a1d30e2501 --- /dev/null +++ b/sysdeps/generic/e_j1l.c @@ -0,0 +1,24 @@ +#include <math.h> +#include <stdio.h> +#include <errno.h> + +long double +__ieee754_j1l (long double x) +{ + fputs ("__ieee754_j1l not implemented\n", stderr); + __set_errno (ENOSYS); + return 0.0; +} + +stub_warning (__ieee754_j1l) + +long double +__ieee754_y1l (long double x) +{ + fputs ("__ieee754_y1l not implemented\n", stderr); + __set_errno (ENOSYS); + return 0.0; +} + +stub_warning (__ieee754_y1l) +#include <stub-tag.h> diff --git a/sysdeps/generic/e_jnl.c b/sysdeps/generic/e_jnl.c new file mode 100644 index 0000000000..78915ec817 --- /dev/null +++ b/sysdeps/generic/e_jnl.c @@ -0,0 +1,24 @@ +#include <math.h> +#include <stdio.h> +#include <errno.h> + +long double +__ieee754_jnl (int n, long double x) +{ + fputs ("__ieee754_jnl not implemented\n", stderr); + __set_errno (ENOSYS); + return 0.0; +} + +stub_warning (__ieee754_jnl) + +long double +__ieee754_ynl (int n, long double x) +{ + fputs ("__ieee754_ynl not implemented\n", stderr); + __set_errno (ENOSYS); + return 0.0; +} + +stub_warning (__ieee754_ynl) +#include <stub-tag.h> diff --git a/sysdeps/generic/e_lgammal_r.c b/sysdeps/generic/e_lgammal_r.c new file mode 100644 index 0000000000..bba92bb5e2 --- /dev/null +++ b/sysdeps/generic/e_lgammal_r.c @@ -0,0 +1,14 @@ +#include <math.h> +#include <stdio.h> +#include <errno.h> + +long double +__ieee754_lgammal_r (long double x, int *signgamp) +{ + fputs ("__ieee754_lgammal_r not implemented\n", stderr); + __set_errno (ENOSYS); + return 0.0; +} + +stub_warning (__ieee754_lgammal_r) +#include <stub-tag.h> diff --git a/sysdeps/generic/e_log10l.c b/sysdeps/generic/e_log10l.c new file mode 100644 index 0000000000..fef310308a --- /dev/null +++ b/sysdeps/generic/e_log10l.c @@ -0,0 +1,14 @@ +#include <math.h> +#include <stdio.h> +#include <errno.h> + +long double +__ieee754_log10l (long double x) +{ + fputs ("__ieee754_log10l not implemented\n", stderr); + __set_errno (ENOSYS); + return 0.0; +} + +stub_warning (__ieee754_log10l) +#include <stub-tag.h> diff --git a/sysdeps/generic/e_logl.c b/sysdeps/generic/e_logl.c new file mode 100644 index 0000000000..3fe7a48459 --- /dev/null +++ b/sysdeps/generic/e_logl.c @@ -0,0 +1,14 @@ +#include <math.h> +#include <stdio.h> +#include <errno.h> + +long double +__ieee754_logl (long double x) +{ + fputs ("__ieee754_logl not implemented\n", stderr); + __set_errno (ENOSYS); + return 0.0; +} + +stub_warning (__ieee754_logl) +#include <stub-tag.h> diff --git a/sysdeps/generic/e_powl.c b/sysdeps/generic/e_powl.c new file mode 100644 index 0000000000..96ec53943e --- /dev/null +++ b/sysdeps/generic/e_powl.c @@ -0,0 +1,14 @@ +#include <math.h> +#include <stdio.h> +#include <errno.h> + +long double +__ieee754_powl (long double x, long double y) +{ + fputs ("__ieee754_powl not implemented\n", stderr); + __set_errno (ENOSYS); + return 0.0; +} + +stub_warning (__ieee754_powl) +#include <stub-tag.h> diff --git a/sysdeps/generic/e_rem_pio2l.c b/sysdeps/generic/e_rem_pio2l.c new file mode 100644 index 0000000000..847f5f98c6 --- /dev/null +++ b/sysdeps/generic/e_rem_pio2l.c @@ -0,0 +1,14 @@ +#include <math.h> +#include <stdio.h> +#include <errno.h> + +long double +__ieee754_rem_pio2l (long double x, long double *y) +{ + fputs ("__ieee754_rem_pio2l not implemented\n", stderr); + __set_errno (ENOSYS); + return 0.0; +} + +stub_warning (__ieee754_rem_pio2l) +#include <stub-tag.h> diff --git a/sysdeps/generic/e_sqrtl.c b/sysdeps/generic/e_sqrtl.c new file mode 100644 index 0000000000..d5380809ed --- /dev/null +++ b/sysdeps/generic/e_sqrtl.c @@ -0,0 +1,14 @@ +#include <math.h> +#include <stdio.h> +#include <errno.h> + +long double +__ieee754_sqrtl (long double x) +{ + fputs ("__ieee754_sqrtl not implemented\n", stderr); + __set_errno (ENOSYS); + return 0.0; +} + +stub_warning (__ieee754_sqrtl) +#include <stub-tag.h> diff --git a/sysdeps/generic/errlist.c b/sysdeps/generic/errlist.c new file mode 100644 index 0000000000..65c9437587 --- /dev/null +++ b/sysdeps/generic/errlist.c @@ -0,0 +1,41 @@ +/* Copyright (C) 1991, 1994, 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 <stddef.h> + +#ifndef HAVE_GNU_LD +#define _sys_errlist sys_errlist +#define _sys_nerr sys_nerr +#endif + +const char *const _sys_errlist[] = + { + "Error 0", /* 0 */ + "Argument out of function's domain", /* 1 = EDOM */ + "Result out of range", /* 2 = ERANGE */ + "Operation not implemented", /* 3 = ENOSYS */ + "Invalid argument", /* 4 = EINVAL */ + "Illegal seek", /* 5 = ESPIPE */ + "Bad file descriptor", /* 6 = EBADF */ + "Cannot allocate memory", /* 7 = ENOMEM */ + "Permission denied", /* 8 = EACCES */ + "Too many open files in system", /* 9 = ENFILE */ + "Too many open files", /* 10 = EMFILE */ + }; + +const int _sys_nerr = sizeof (_sys_errlist) / sizeof (_sys_errlist[0]); diff --git a/sysdeps/generic/euidaccess.c b/sysdeps/generic/euidaccess.c new file mode 100644 index 0000000000..825c152bea --- /dev/null +++ b/sysdeps/generic/euidaccess.c @@ -0,0 +1,40 @@ +/* Test for access to FILE using effective UID and GID. Stub version. + Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <stddef.h> +#include <unistd.h> + +int +__euidaccess (file, type) + const char *file; + int type; +{ + if (file == NULL || (type & ~(R_OK|W_OK|X_OK|F_OK)) != 0) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} +weak_alias (__euidaccess, euidaccess) +stub_warning (euidaccess) +#include <stub-tag.h> diff --git a/sysdeps/generic/exc2signal.c b/sysdeps/generic/exc2signal.c new file mode 100644 index 0000000000..c9b58cd172 --- /dev/null +++ b/sysdeps/generic/exc2signal.c @@ -0,0 +1,71 @@ +/* Translate Mach exception codes into signal numbers. Stub version. + Copyright (C) 1991, 1992, 1994, 1995, 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 <hurd.h> + +/* This file must be modified with machine-dependent details. */ +#error "need to write sysdeps/mach/hurd/MACHINE/exc2signal.c" + +/* Translate the Mach exception codes, as received in an `exception_raise' RPC, + into a signal number and signal subcode. */ + +void +_hurd_exception2signal (int exception, int code, int subcode, + int *signo, int *sigcode, int *error) +{ + *error = 0; + + switch (exception) + { + default: + *signo = SIGIOT; + *sigcode = exception; + break; + + case EXC_BAD_ACCESS: + if (code == KERN_PROTECTION_FAILURE) + *signo = SIGSEGV; + else + *signo = SIGBUS; + *sigcode = subcode; + *error = code; + break; + + case EXC_BAD_INSTRUCTION: + *signo = SIGILL; + *sigcode = 0; + break; + + case EXC_ARITHMETIC: + *signo = SIGFPE; + *sigcode = 0; + break; + + case EXC_EMULATION: + case EXC_SOFTWARE: + *signo = SIGEMT; + *sigcode = 0; + break; + + case EXC_BREAKPOINT: + *signo = SIGTRAP; + *sigcode = 0; + break; + } +} diff --git a/sysdeps/generic/execve.c b/sysdeps/generic/execve.c new file mode 100644 index 0000000000..fa708c36b9 --- /dev/null +++ b/sysdeps/generic/execve.c @@ -0,0 +1,44 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <stddef.h> +#include <unistd.h> + + +/* Replace the current process, executing PATH with arguments ARGV and + environment ENVP. ARGV and ENVP are terminated by NULL pointers. */ +int +__execve (path, argv, envp) + const char *path; + char *const argv[]; + char *const envp[]; +{ + if (path == NULL || argv == NULL || envp == NULL) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} +stub_warning (execve) + +weak_alias (__execve, execve) +#include <stub-tag.h> diff --git a/sysdeps/generic/fchdir.c b/sysdeps/generic/fchdir.c new file mode 100644 index 0000000000..9a6a9dc3d8 --- /dev/null +++ b/sysdeps/generic/fchdir.c @@ -0,0 +1,33 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <stddef.h> +#include <unistd.h> + +/* Change the current directory to FD. */ +int +fchdir (fd) + int fd; +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (fchdir) +#include <stub-tag.h> diff --git a/sysdeps/generic/fchflags.c b/sysdeps/generic/fchflags.c new file mode 100644 index 0000000000..befca38bd6 --- /dev/null +++ b/sysdeps/generic/fchflags.c @@ -0,0 +1,43 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <stddef.h> +#include <sys/stat.h> + +/* Change the flags of the file FD refers to to FLAGS. */ + +int fchflags __P ((int fd, int flags)); + +int +fchflags (fd, flags) + int fd; + int flags; +{ + if (fd < 0) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} + +stub_warning (fchflags) +#include <stub-tag.h> diff --git a/sysdeps/generic/fchmod.c b/sysdeps/generic/fchmod.c new file mode 100644 index 0000000000..81b1e4247e --- /dev/null +++ b/sysdeps/generic/fchmod.c @@ -0,0 +1,42 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <stddef.h> +#include <sys/stat.h> +#include <sys/types.h> + +/* Change the protections of the file FD refers to to MODE. */ +int +__fchmod (fd, mode) + int fd; + mode_t mode; +{ + if (fd < 0) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} +stub_warning (fchmod) + +weak_alias (__fchmod, fchmod) +#include <stub-tag.h> diff --git a/sysdeps/generic/fchown.c b/sysdeps/generic/fchown.c new file mode 100644 index 0000000000..d504dd4c7c --- /dev/null +++ b/sysdeps/generic/fchown.c @@ -0,0 +1,43 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <stddef.h> +#include <unistd.h> +#include <sys/types.h> + +/* Change the owner and group of the file referred to by FD. */ +int +__fchown (fd, owner, group) + int fd; + uid_t owner; + gid_t group; +{ + if (fd < 0) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} +stub_warning (fchown) + +weak_alias (__fchown, fchown) +#include <stub-tag.h> diff --git a/sysdeps/generic/fclrexcpt.c b/sysdeps/generic/fclrexcpt.c new file mode 100644 index 0000000000..c760e54a3e --- /dev/null +++ b/sysdeps/generic/fclrexcpt.c @@ -0,0 +1,28 @@ +/* Clear given exceptions in current floating-point environment. + Copyright (C) 1997 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. */ + +#include <fenv.h> + +void +feclearexcept (int excepts) +{ +} +stub_warning (feclearexcept) +#include <stub-tag.h> diff --git a/sysdeps/generic/fcntl.c b/sysdeps/generic/fcntl.c new file mode 100644 index 0000000000..718e326719 --- /dev/null +++ b/sysdeps/generic/fcntl.c @@ -0,0 +1,40 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <fcntl.h> + +/* Perform file control operations on FD. */ +int +__fcntl (fd, cmd) + int fd; + int cmd; +{ + if (fd < 0) + { + __set_errno (EBADF); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} +stub_warning (fcntl) + +weak_alias (__fcntl, fcntl) +#include <stub-tag.h> diff --git a/sysdeps/generic/fdopen.c b/sysdeps/generic/fdopen.c new file mode 100644 index 0000000000..c7d7f556fa --- /dev/null +++ b/sysdeps/generic/fdopen.c @@ -0,0 +1,33 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <stdio.h> + +/* Open a new stream on a given system file descriptor. */ +FILE * +fdopen (fd, mode) + int fd; + const char *mode; +{ + __set_errno (ENOSYS); + return NULL; +} + +stub_warning (fdopen) +#include <stub-tag.h> diff --git a/sysdeps/generic/fegetenv.c b/sysdeps/generic/fegetenv.c new file mode 100644 index 0000000000..4afe17a004 --- /dev/null +++ b/sysdeps/generic/fegetenv.c @@ -0,0 +1,28 @@ +/* Store current floating-point environment. + Copyright (C) 1997 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. */ + +#include <fenv.h> + +void +fegetenv (fenv_t *envp) +{ +} +stub_warning (fegetenv) +#include <stub-tag.h> diff --git a/sysdeps/generic/fegetround.c b/sysdeps/generic/fegetround.c new file mode 100644 index 0000000000..60b259450b --- /dev/null +++ b/sysdeps/generic/fegetround.c @@ -0,0 +1,29 @@ +/* Return current rounding direction. + Copyright (C) 1997 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. */ + +#include <fenv.h> + +int +fegetround (void) +{ + return 0; +} +stub_warning (fegetround) +#include <stub-tag.h> diff --git a/sysdeps/generic/feholdexcpt.c b/sysdeps/generic/feholdexcpt.c new file mode 100644 index 0000000000..5cc9b38a28 --- /dev/null +++ b/sysdeps/generic/feholdexcpt.c @@ -0,0 +1,29 @@ +/* Store current floating-point environment and clear exceptions. + Copyright (C) 1997 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. */ + +#include <fenv.h> + +int +feholdexcept (fenv_t *envp) +{ + return 0; /* Signal failure. */ +} +stub_warning (feholdexcept) +#include <stub-tag.h> diff --git a/sysdeps/generic/fesetenv.c b/sysdeps/generic/fesetenv.c new file mode 100644 index 0000000000..91619494c5 --- /dev/null +++ b/sysdeps/generic/fesetenv.c @@ -0,0 +1,28 @@ +/* Install given floating-point environment. + Copyright (C) 1997 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. */ + +#include <fenv.h> + +void +fesetenv (const fenv_t *envp) +{ +} +stub_warning (fesetenv) +#include <stub-tag.h> diff --git a/sysdeps/generic/fesetround.c b/sysdeps/generic/fesetround.c new file mode 100644 index 0000000000..cd77a76fcf --- /dev/null +++ b/sysdeps/generic/fesetround.c @@ -0,0 +1,29 @@ +/* Set current rounding direction. + Copyright (C) 1997 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. */ + +#include <fenv.h> + +int +fesetround (int round) +{ + return 0; /* Signal we are unable to set the direction. */ +} +stub_warning (fesetround) +#include <stub-tag.h> diff --git a/sysdeps/generic/feupdateenv.c b/sysdeps/generic/feupdateenv.c new file mode 100644 index 0000000000..cc6f59d4ce --- /dev/null +++ b/sysdeps/generic/feupdateenv.c @@ -0,0 +1,28 @@ +/* Install given floating-point environment and raise exceptions. + Copyright (C) 1997 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. */ + +#include <fenv.h> + +void +feupdateenv (const fenv_t *envp) +{ +} +stub_warning (feupdateenv) +#include <stub-tag.h> diff --git a/sysdeps/generic/fexecve.c b/sysdeps/generic/fexecve.c new file mode 100644 index 0000000000..f2ea896cac --- /dev/null +++ b/sysdeps/generic/fexecve.c @@ -0,0 +1,43 @@ +/* Copyright (C) 1994, 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. */ + +#include <errno.h> +#include <stddef.h> +#include <unistd.h> + + +/* Execute the file FD refers to, overlaying the running program image. + ARGV and ENVP are passed to the new program, as for `execve'. */ +int +fexecve (fd, argv, envp) + int fd; + char *const argv[]; + char *const envp[]; +{ + if (fd < 0 || argv == NULL || envp == NULL) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} + +stub_warning (fexecve) +#include <stub-tag.h> diff --git a/sysdeps/generic/fgetexcptflg.c b/sysdeps/generic/fgetexcptflg.c new file mode 100644 index 0000000000..94f36f7f21 --- /dev/null +++ b/sysdeps/generic/fgetexcptflg.c @@ -0,0 +1,28 @@ +/* Store current representation for exceptions. + Copyright (C) 1997 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. */ + +#include <fenv.h> + +void +fegetexceptflag (fexcept_t *flagp, int excepts) +{ +} +stub_warning (fegetexceptflag) +#include <stub-tag.h> diff --git a/sysdeps/generic/flock.c b/sysdeps/generic/flock.c new file mode 100644 index 0000000000..b096637d20 --- /dev/null +++ b/sysdeps/generic/flock.c @@ -0,0 +1,36 @@ +/* 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. */ + +#include <errno.h> +#include <sys/file.h> + +/* Apply or remove an advisory lock, according to OPERATION, + on the file FD refers to. */ +int +__flock (fd, operation) + int fd; + int operation; +{ + __set_errno (ENOSYS); + return -1; +} + +weak_alias (__flock, flock) + +stub_warning (flock) +#include <stub-tag.h> diff --git a/sysdeps/generic/fork.c b/sysdeps/generic/fork.c new file mode 100644 index 0000000000..06a3235472 --- /dev/null +++ b/sysdeps/generic/fork.c @@ -0,0 +1,35 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <unistd.h> + + +/* Clone the calling process, creating an exact copy. + Return -1 for errors, 0 to the new process, + and the process ID of the new process to the old process. */ +int +__fork () +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (fork) + +weak_alias (__fork, fork) +#include <stub-tag.h> diff --git a/sysdeps/generic/fpathconf.c b/sysdeps/generic/fpathconf.c new file mode 100644 index 0000000000..761e5c215c --- /dev/null +++ b/sysdeps/generic/fpathconf.c @@ -0,0 +1,62 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <stddef.h> +#include <unistd.h> + + +/* Get file-specific information about descriptor FD. */ +long int +__fpathconf (fd, name) + int fd; + int name; +{ + if (fd < 0) + { + __set_errno (EBADF); + return -1; + } + + switch (name) + { + default: + __set_errno (EINVAL); + return -1; + + case _PC_LINK_MAX: + case _PC_MAX_CANON: + case _PC_MAX_INPUT: + case _PC_NAME_MAX: + case _PC_PATH_MAX: + case _PC_PIPE_BUF: + case _PC_SOCK_MAXBUF: + case _PC_CHOWN_RESTRICTED: + case _PC_NO_TRUNC: + case _PC_VDISABLE: + break; + } + + __set_errno (ENOSYS); + return -1; +} + +weak_alias (__fpathconf, fpathconf) + +stub_warning (fpathconf) +#include <stub-tag.h> diff --git a/sysdeps/generic/fpu_control.h b/sysdeps/generic/fpu_control.h new file mode 100644 index 0000000000..e91638d008 --- /dev/null +++ b/sysdeps/generic/fpu_control.h @@ -0,0 +1,46 @@ +/* FPU control word definitions. Stub 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. */ + +#ifndef _FPU_CONTROL_H +#define _FPU_CONTROL_H + +#define _FPU_RESERVED ??? /* These bits are reserved are not changed. */ + +/* The fdlibm code requires no interrupts for exceptions. Don't + change the rounding mode, it would break long double I/O! */ +#define _FPU_DEFAULT 0x00000000 /* Default value. */ + +/* Type of the control word. */ +typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__?I__))); + +/* Macros for accessing the hardware control word. */ +#define _FPU_GETCW(cw) __asm__ ("fetch fpu control word into %0" : "=g" (cw)) +#define _FPU_SETCW(cw) __asm__ ("set fpu control word to %0" : : "g" (cw)) + +/* Default control word set at startup. */ +extern fpu_control_t __fpu_control; + +__BEGIN_DECLS + +/* Called at startup. It can be used to manipulate fpu control register. */ +extern void __setfpucw __P ((fpu_control_t)); + +__END_DECLS + +#endif /* _FPU_CONTROL_H */ diff --git a/sysdeps/generic/fraiseexcpt.c b/sysdeps/generic/fraiseexcpt.c new file mode 100644 index 0000000000..5f24782652 --- /dev/null +++ b/sysdeps/generic/fraiseexcpt.c @@ -0,0 +1,28 @@ +/* Raise given exceptions. + Copyright (C) 1997 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. */ + +#include <fenv.h> + +void +feraiseexcept (int excepts) +{ +} +stub_warning (feraiseexcept) +#include <stub-tag.h> diff --git a/sysdeps/generic/fsetexcptflg.c b/sysdeps/generic/fsetexcptflg.c new file mode 100644 index 0000000000..b3a6375851 --- /dev/null +++ b/sysdeps/generic/fsetexcptflg.c @@ -0,0 +1,28 @@ +/* Set floating-point environment exception handling. + Copyright (C) 1997 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. */ + +#include <fenv.h> + +void +fesetexceptflag (const fexcept_t *flagp, int excepts) +{ +} +stub_warning (fesetexceptflag) +#include <stub-tag.h> diff --git a/sysdeps/generic/fstatfs.c b/sysdeps/generic/fstatfs.c new file mode 100644 index 0000000000..e716e18b49 --- /dev/null +++ b/sysdeps/generic/fstatfs.c @@ -0,0 +1,34 @@ +/* Return information about the filesystem on which FD resides. + 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. */ + +#include <errno.h> +#include <sys/statfs.h> +#include <stddef.h> + +/* Return information about the filesystem on which FD resides. */ +int +__fstatfs (int fd, struct statfs *buf) +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (fstatfs) + +weak_alias (__fstatfs, fstatfs) +#include <stub-tag.h> diff --git a/sysdeps/generic/fstatfs64.c b/sysdeps/generic/fstatfs64.c new file mode 100644 index 0000000000..99a2452558 --- /dev/null +++ b/sysdeps/generic/fstatfs64.c @@ -0,0 +1,32 @@ +/* Return information about the filesystem on which FD resides. + 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. */ + +#include <errno.h> +#include <sys/statfs.h> +#include <stddef.h> + +/* Return information about the filesystem on which FD resides. */ +int +fstatfs64 (int fd, struct statfs64 *buf) +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (fstatfs64) +#include <stub-tag.h> diff --git a/sysdeps/generic/fsync.c b/sysdeps/generic/fsync.c new file mode 100644 index 0000000000..9177cf88b0 --- /dev/null +++ b/sysdeps/generic/fsync.c @@ -0,0 +1,33 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <unistd.h> + +/* Make all changes done to FD actually appear on disk. */ +int +fsync (fd) + int fd; +{ + __set_errno (ENOSYS); + return -1; +} + + +stub_warning (fsync) +#include <stub-tag.h> diff --git a/sysdeps/generic/ftestexcept.c b/sysdeps/generic/ftestexcept.c new file mode 100644 index 0000000000..c964790011 --- /dev/null +++ b/sysdeps/generic/ftestexcept.c @@ -0,0 +1,29 @@ +/* Test exception in current environment. + Copyright (C) 1997 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. */ + +#include <fenv.h> + +int +fetestexcept (int excepts) +{ + return 0; +} +stub_warning (fetestexcept) +#include <stub-tag.h> diff --git a/sysdeps/generic/ftruncate.c b/sysdeps/generic/ftruncate.c new file mode 100644 index 0000000000..8e067ac2b8 --- /dev/null +++ b/sysdeps/generic/ftruncate.c @@ -0,0 +1,34 @@ +/* Copyright (C) 1991, 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. */ + +#include <sys/types.h> +#include <errno.h> +#include <unistd.h> + +/* Truncate the file FD refers to to LENGTH bytes. */ +int +ftruncate (fd, length) + int fd; + off_t length; +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (ftruncate) +#include <stub-tag.h> diff --git a/sysdeps/generic/fxstat.c b/sysdeps/generic/fxstat.c new file mode 100644 index 0000000000..b070b86179 --- /dev/null +++ b/sysdeps/generic/fxstat.c @@ -0,0 +1,50 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <stddef.h> +#include <sys/stat.h> + +/* Get information about the file descriptor FD in BUF. */ +int +__fxstat (int vers, int fd, struct stat *buf) +{ + if (vers != _STAT_VER) + { + __set_errno (EINVAL); + return -1; + } + + if (fd < 0) + { + __set_errno (EBADF); + return -1; + } + else if (buf == NULL) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} +stub_warning (fstat) + +weak_alias (__fxstat, _fxstat) +#include <stub-tag.h> diff --git a/sysdeps/generic/fxstat64.c b/sysdeps/generic/fxstat64.c new file mode 100644 index 0000000000..c8da8a4271 --- /dev/null +++ b/sysdeps/generic/fxstat64.c @@ -0,0 +1,48 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <stddef.h> +#include <sys/stat.h> + +/* Get information about the file descriptor FD in BUF. */ +int +__fxstat64 (int vers, int fd, struct stat64 *buf) +{ + if (vers != _STAT_VER) + { + __set_errno (EINVAL); + return -1; + } + + if (fd < 0) + { + __set_errno (EBADF); + return -1; + } + else if (buf == NULL) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} +stub_warning (fstat64) +#include <stub-tag.h> diff --git a/sysdeps/generic/gai_strerror.c b/sysdeps/generic/gai_strerror.c new file mode 100644 index 0000000000..b63f0e2623 --- /dev/null +++ b/sysdeps/generic/gai_strerror.c @@ -0,0 +1,28 @@ +/* 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. */ + +#include <errno.h> +#include <netdb.h> + +char * +gai_strerror (int code) +{ + static char buffer[128]; + snprintf (buffer, sizeof buffer, "Unknown error (%d)", code); + return buffer; +} diff --git a/sysdeps/generic/getaddrinfo.c b/sysdeps/generic/getaddrinfo.c new file mode 100644 index 0000000000..c099723b3e --- /dev/null +++ b/sysdeps/generic/getaddrinfo.c @@ -0,0 +1,39 @@ +/* Stub version of getaddrinfo function. + Copyright (C) 1996 Free Software Foundation, Inc. + This file is part of the 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 <errno.h> +#include <netdb.h> + +int +getaddrinfo (const char *name, const char *service, const struct addrinfo *req, + struct addrinfo **pai) +{ + __set_errno (ENOSYS); + return EAI_SYSTEM; +} +stub_warning (getaddrinfo) + + +void +freeaddrinfo (struct addrinfo *ai) +{ + /* Nothing. */ +} +stub_warning (freeaddrinfo) +#include <stub-tag.h> diff --git a/sysdeps/generic/getcwd.c b/sysdeps/generic/getcwd.c new file mode 100644 index 0000000000..6df4a08054 --- /dev/null +++ b/sysdeps/generic/getcwd.c @@ -0,0 +1,40 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <unistd.h> +#include <stddef.h> + +/* Get the pathname of the current working directory, + and put it in SIZE bytes of BUF. Returns NULL if the + directory couldn't be determined or SIZE was too small. + If successful, returns BUF. In GNU, if BUF is NULL, + an array is allocated with `malloc'; the array is SIZE + bytes long, unless SIZE <= 0, in which case it is as + big as necessary. */ +char * +__getcwd (char *buf, size_t size) +{ + __set_errno (ENOSYS); + return NULL; +} +weak_alias (__getcwd, getcwd) + +stub_warning (__getcwd) +stub_warning (getcwd) +#include <stub-tag.h> diff --git a/sysdeps/generic/getdents.c b/sysdeps/generic/getdents.c new file mode 100644 index 0000000000..06a6c030ed --- /dev/null +++ b/sysdeps/generic/getdents.c @@ -0,0 +1,37 @@ +/* Copyright (C) 1991, 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. */ + +#include <stddef.h> +#include <errno.h> +#include <sys/types.h> +#include <dirent.h> + +ssize_t +__getdirentries (fd, buf, nbytes, basep) + int fd; + char *buf; + size_t nbytes; + off_t *basep; +{ + __set_errno (ENOSYS); + return -1; +} +weak_alias (__getdirentries, getdirentries) + +stub_warning (getdirentries) +#include <stub-tag.h> diff --git a/sysdeps/generic/getdomain.c b/sysdeps/generic/getdomain.c index ab9cbd4bd0..250aec68e2 100644 --- a/sysdeps/generic/getdomain.c +++ b/sysdeps/generic/getdomain.c @@ -54,5 +54,6 @@ getdomainname (name, len) } stub_warning (getdomainname) +#include <stub-tag.h> #endif diff --git a/sysdeps/generic/getdtsz.c b/sysdeps/generic/getdtsz.c new file mode 100644 index 0000000000..a4eb78488f --- /dev/null +++ b/sysdeps/generic/getdtsz.c @@ -0,0 +1,33 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <unistd.h> + +/* Return the maximum number of file descriptors + the current process could possibly have. */ +int +__getdtablesize () +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (getdtablesize) + +weak_alias (__getdtablesize, getdtablesize) +#include <stub-tag.h> diff --git a/sysdeps/generic/getegid.c b/sysdeps/generic/getegid.c new file mode 100644 index 0000000000..2b9b9032fd --- /dev/null +++ b/sysdeps/generic/getegid.c @@ -0,0 +1,32 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <unistd.h> + +/* Get the effective group ID of the calling process. */ +__gid_t +__getegid () +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (getegid) + +weak_alias (__getegid, getegid) +#include <stub-tag.h> diff --git a/sysdeps/generic/geteuid.c b/sysdeps/generic/geteuid.c new file mode 100644 index 0000000000..0a89417012 --- /dev/null +++ b/sysdeps/generic/geteuid.c @@ -0,0 +1,33 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <unistd.h> + + +/* Get the effective user ID of the calling process. */ +__uid_t +__geteuid () +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (geteuid) + +weak_alias (__geteuid, geteuid) +#include <stub-tag.h> diff --git a/sysdeps/generic/getgid.c b/sysdeps/generic/getgid.c new file mode 100644 index 0000000000..d87aea1f5c --- /dev/null +++ b/sysdeps/generic/getgid.c @@ -0,0 +1,33 @@ +/* Copyright (C) 1991, 1993, 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. */ + +#include <errno.h> +#include <unistd.h> +#include <sys/types.h> + +/* Get the real group ID of the calling process. */ +gid_t +__getgid () +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (getgid) + +weak_alias (__getgid, getgid) +#include <stub-tag.h> diff --git a/sysdeps/generic/getgroups.c b/sysdeps/generic/getgroups.c new file mode 100644 index 0000000000..ae11496a4c --- /dev/null +++ b/sysdeps/generic/getgroups.c @@ -0,0 +1,48 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <stddef.h> +#include <unistd.h> +#include <sys/types.h> +#include <limits.h> + + +/* If SIZE is zero, return the number of supplementary groups + the calling process is in. Otherwise, fill in the group IDs + of its supplementary groups in LIST and return the number written. */ +int +__getgroups (size, list) + int size; + gid_t *list; +{ +#if defined (NGROUPS_MAX) && NGROUPS_MAX == 0 + /* The system has no supplementary groups. */ + return 0; +#endif + + __set_errno (ENOSYS); + return -1; +} + +#if defined (HAVE_GNU_LD) && !(defined (NGROUPS_MAX) && NGROUPS_MAX == 0) +stub_warning (getgroups); +#endif + +weak_alias (__getgroups, getgroups) +#include <stub-tag.h> diff --git a/sysdeps/generic/gethostid.c b/sysdeps/generic/gethostid.c new file mode 100644 index 0000000000..96bb3ea7a7 --- /dev/null +++ b/sysdeps/generic/gethostid.c @@ -0,0 +1,32 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <unistd.h> + +/* Return the current machine's Internet number. */ +long int +gethostid () +{ + __set_errno (ENOSYS); + return -1L; +} + + +stub_warning (gethostid) +#include <stub-tag.h> diff --git a/sysdeps/generic/gethostname.c b/sysdeps/generic/gethostname.c new file mode 100644 index 0000000000..ad09b00827 --- /dev/null +++ b/sysdeps/generic/gethostname.c @@ -0,0 +1,36 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <unistd.h> + +/* Put the name of the current host in no more than LEN bytes of NAME. + The result is null-terminated if LEN is large enough for the full + name and the terminator. */ +int +__gethostname (name, len) + char *name; + size_t len; +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (gethostname) + +weak_alias (__gethostname, gethostname) +#include <stub-tag.h> diff --git a/sysdeps/generic/getitimer.c b/sysdeps/generic/getitimer.c new file mode 100644 index 0000000000..5f4f258c49 --- /dev/null +++ b/sysdeps/generic/getitimer.c @@ -0,0 +1,42 @@ +/* Copyright (C) 1991, 1994, 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. */ + +#include <stddef.h> +#include <errno.h> +#include <sys/time.h> + +/* Set *VALUE to the current setting of timer WHICH. + Return 0 on success, -1 on errors. */ +int +__getitimer (which, value) + enum __itimer_which which; + struct itimerval *value; +{ + if (value == NULL) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} +stub_warning (getitimer) + +weak_alias (__getitimer, getitimer) +#include <stub-tag.h> diff --git a/sysdeps/generic/getlogin.c b/sysdeps/generic/getlogin.c new file mode 100644 index 0000000000..248d040d9f --- /dev/null +++ b/sysdeps/generic/getlogin.c @@ -0,0 +1,33 @@ +/* Copyright (C) 1991, 1995, 1996 Free Software Foundation, Inc. + This file is part of the 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 <stddef.h> +#include <errno.h> +#include <unistd.h> + +/* Return the login name of the user, or NULL if it can't be determined. + The returned pointer, if not NULL, is good only until the next call. */ +char * +getlogin (void) +{ + __set_errno (ENOSYS); + return NULL; +} + +stub_warning (getlogin) +#include <stub-tag.h> diff --git a/sysdeps/generic/getlogin_r.c b/sysdeps/generic/getlogin_r.c new file mode 100644 index 0000000000..7d40c1a107 --- /dev/null +++ b/sysdeps/generic/getlogin_r.c @@ -0,0 +1,36 @@ +/* Reentrant function to return the current login name. Stub version. + Copyright (C) 1996 Free Software Foundation, Inc. + This file is part of the 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 <errno.h> +#include <unistd.h> + +/* Return at most NAME_LEN characters of the login name of the user in NAME. + If it cannot be determined or some other error occurred, return the error + code. Otherwise return 0. */ +int +getlogin_r (name, name_len) + char *name; + size_t name_len; +{ + __set_errno (ENOSYS); + return errno; +} + +stub_warning (getlogin_r) +#include <stub-tag.h> diff --git a/sysdeps/generic/getpagesize.c b/sysdeps/generic/getpagesize.c new file mode 100644 index 0000000000..2289b973d7 --- /dev/null +++ b/sysdeps/generic/getpagesize.c @@ -0,0 +1,32 @@ +/* Copyright (C) 1991, 1993, 1995, 1996 Free Software Foundation, Inc. + This file is part of the 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 <errno.h> +#include <unistd.h> + +/* Return the system page size. */ +int +__getpagesize () +{ + __set_errno (ENOSYS); + return 0; +} +stub_warning (getpagesize) + +weak_alias (__getpagesize, getpagesize) +#include <stub-tag.h> diff --git a/sysdeps/generic/getpeername.c b/sysdeps/generic/getpeername.c new file mode 100644 index 0000000000..bd38cb4def --- /dev/null +++ b/sysdeps/generic/getpeername.c @@ -0,0 +1,36 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <sys/socket.h> + +/* Put the address of the peer connected to socket FD into *ADDR + (which is *LEN bytes long), and its actual length into *LEN. */ +int +getpeername (fd, addr, len) + int fd; + __SOCKADDR_ARG addr; + size_t *len; +{ + __set_errno (ENOSYS); + return -1; +} + + +stub_warning (getpeername) +#include <stub-tag.h> diff --git a/sysdeps/generic/getpgid.c b/sysdeps/generic/getpgid.c new file mode 100644 index 0000000000..7423e118f0 --- /dev/null +++ b/sysdeps/generic/getpgid.c @@ -0,0 +1,32 @@ +/* Copyright (C) 1991, 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. */ + +#include <unistd.h> +#include <sys/types.h> + +/* Get the process group ID of process PID. */ +int +__getpgid (pid) + pid_t pid; +{ + return pid; +} +weak_alias (__getpgid, getpgid) + +stub_warning (getpgid) +#include <stub-tag.h> diff --git a/sysdeps/generic/getpid.c b/sysdeps/generic/getpid.c new file mode 100644 index 0000000000..8b2fb9cde7 --- /dev/null +++ b/sysdeps/generic/getpid.c @@ -0,0 +1,33 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <unistd.h> + + +/* Get the process ID of the calling process. */ +int +__getpid () +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (getpid) + +weak_alias (__getpid, getpid) +#include <stub-tag.h> diff --git a/sysdeps/generic/getppid.c b/sysdeps/generic/getppid.c new file mode 100644 index 0000000000..f05b6caf2c --- /dev/null +++ b/sysdeps/generic/getppid.c @@ -0,0 +1,33 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <unistd.h> + + +/* Get the parent process ID of the calling process. */ +int +__getppid () +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (getppid) + +weak_alias (__getppid, getppid) +#include <stub-tag.h> diff --git a/sysdeps/generic/getpriority.c b/sysdeps/generic/getpriority.c new file mode 100644 index 0000000000..ce9eb59f0d --- /dev/null +++ b/sysdeps/generic/getpriority.c @@ -0,0 +1,36 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <sys/resource.h> + +/* Return the highest priority of any process specified by WHICH and WHO + (see <sys/resource.h>); if WHO is zero, the current process, process group, + or user (as specified by WHO) is used. A lower priority number means higher + priority. Priorities range from PRIO_MIN to PRIO_MAX. */ +int +getpriority (which, who) + enum __priority_which which; + int who; +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (getpriority) +#include <stub-tag.h> diff --git a/sysdeps/generic/getrlimit.c b/sysdeps/generic/getrlimit.c new file mode 100644 index 0000000000..c283f77038 --- /dev/null +++ b/sysdeps/generic/getrlimit.c @@ -0,0 +1,33 @@ +/* Copyright (C) 1991, 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. */ + +#include <sys/resource.h> +#include <errno.h> + +/* Put the soft and hard limits for RESOURCE in *RLIMITS. + Returns 0 if successful, -1 if not (and sets errno). */ +int +__getrlimit (enum __rlimit_resource resource, struct rlimit *rlimits) +{ + __set_errno (ENOSYS); + return -1; +} +weak_alias (__getrlimit, getrlimit) + +stub_warning (getrlimit) +#include <stub-tag.h> diff --git a/sysdeps/generic/getrlimit64.c b/sysdeps/generic/getrlimit64.c new file mode 100644 index 0000000000..6c581edf72 --- /dev/null +++ b/sysdeps/generic/getrlimit64.c @@ -0,0 +1,32 @@ +/* Copyright (C) 1991, 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. */ + +#include <sys/resource.h> +#include <errno.h> + +/* Put the soft and hard limits for RESOURCE in *RLIMITS. + Returns 0 if successful, -1 if not (and sets errno). */ +int +getrlimit64 (enum __rlimit_resource resource, struct rlimit64 *rlimits) +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (getrlimit64) +#include <stub-tag.h> diff --git a/sysdeps/generic/getrusage.c b/sysdeps/generic/getrusage.c new file mode 100644 index 0000000000..a6f0e67826 --- /dev/null +++ b/sysdeps/generic/getrusage.c @@ -0,0 +1,35 @@ +/* Copyright (C) 1991, 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. */ + +#include <sys/resource.h> +#include <errno.h> + +/* Return resource usage information on process indicated by WHO + and put it in *USAGE. Returns 0 for success, -1 for failure. */ +int +__getrusage (who, usage) + enum __rusage_who who; + struct rusage *usage; +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (getrusage) + +weak_alias (__getrusage, getrusage) +#include <stub-tag.h> diff --git a/sysdeps/generic/getsid.c b/sysdeps/generic/getsid.c new file mode 100644 index 0000000000..11efbf67a8 --- /dev/null +++ b/sysdeps/generic/getsid.c @@ -0,0 +1,31 @@ +/* getsid -- Return session ID of a process. Stub version. + 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. */ + +#include <sys/types.h> +#include <unistd.h> +#include <errno.h> + +pid_t +getsid (pid_t pid) +{ + __set_errno (ENOSYS); + return (pid_t) -1; +} +stub_warning (getsid) +#include <stub-tag.h> diff --git a/sysdeps/generic/getsockname.c b/sysdeps/generic/getsockname.c new file mode 100644 index 0000000000..37095ff2b5 --- /dev/null +++ b/sysdeps/generic/getsockname.c @@ -0,0 +1,35 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <sys/socket.h> + +/* Put the local address of FD into *ADDR and its length in *LEN. */ +int +getsockname (fd, addr, len) + int fd; + __SOCKADDR_ARG addr; + socklen_t *len; +{ + __set_errno (ENOSYS); + return -1; +} + + +stub_warning (getsockname) +#include <stub-tag.h> diff --git a/sysdeps/generic/getsockopt.c b/sysdeps/generic/getsockopt.c new file mode 100644 index 0000000000..0b151bd9ec --- /dev/null +++ b/sysdeps/generic/getsockopt.c @@ -0,0 +1,38 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <sys/socket.h> + +/* Put the current value for socket FD's option OPTNAME at protocol level LEVEL + into OPTVAL (which is *OPTLEN bytes long), and set *OPTLEN to the value's + actual length. Returns 0 on success, -1 for errors. */ +int +getsockopt (fd, level, optname, optval, optlen) + int fd; + int level; + int optname; + void *optval; + socklen_t *optlen; +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (getsockopt) +#include <stub-tag.h> diff --git a/sysdeps/generic/getsysstats.c b/sysdeps/generic/getsysstats.c new file mode 100644 index 0000000000..d43a86ae5a --- /dev/null +++ b/sysdeps/generic/getsysstats.c @@ -0,0 +1,69 @@ +/* getsysstats - Determine various system internal values, stub version. + Copyright (C) 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. + + 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 <errno.h> +#include <sys/sysinfo.h> + +int +__get_nprocs_conf () +{ + /* We don't know how to determine the number. Simply return always 1. */ + return 1; +} +weak_alias (__get_nprocs_conf, get_nprocs_conf) + +link_warning (get_nprocs_conf, "warning: get_nprocs_conf will always return 1") + + + +int +__get_nprocs () +{ + /* We don't know how to determine the number. Simply return always 1. */ + return 1; +} +weak_alias (__get_nprocs, get_nprocs) + +link_warning (get_nprocs, "warning: get_nprocs will always return 1") + + +int +__get_phys_pages () +{ + /* We have no general way to determine this value. */ + __set_errno (ENOSYS); + return -1; +} +weak_alias (__get_phys_pages, get_phys_pages) + +stub_warning (get_phys_pages) + + +int +__get_avphys_pages () +{ + /* We have no general way to determine this value. */ + __set_errno (ENOSYS); + return -1; +} +weak_alias (__get_avphys_pages, get_avphys_pages) + +stub_warning (get_avphys_pages) +#include <stub-tag.h> diff --git a/sysdeps/generic/gettimeofday.c b/sysdeps/generic/gettimeofday.c new file mode 100644 index 0000000000..ff7689d374 --- /dev/null +++ b/sysdeps/generic/gettimeofday.c @@ -0,0 +1,36 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <sys/time.h> + +/* Get the current time of day and timezone information, + putting it into *TV and *TZ. If TZ is NULL, *TZ is not filled. + Returns 0 on success, -1 on errors. */ +int +__gettimeofday (tv, tz) + struct timeval *tv; + struct timezone *tz; +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (gettimeofday) + +weak_alias (__gettimeofday, gettimeofday) +#include <stub-tag.h> diff --git a/sysdeps/generic/getuid.c b/sysdeps/generic/getuid.c new file mode 100644 index 0000000000..37afc6f6fc --- /dev/null +++ b/sysdeps/generic/getuid.c @@ -0,0 +1,33 @@ +/* Copyright (C) 1991, 1993, 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. */ + +#include <errno.h> +#include <unistd.h> +#include <sys/types.h> + +/* Get the real user ID of the calling process. */ +uid_t +__getuid () +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (getuid) + +weak_alias (__getuid, getuid) +#include <stub-tag.h> diff --git a/sysdeps/generic/gtty.c b/sysdeps/generic/gtty.c new file mode 100644 index 0000000000..3505b9f7bf --- /dev/null +++ b/sysdeps/generic/gtty.c @@ -0,0 +1,40 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <sgtty.h> +#include <stddef.h> + +/* Fill in *PARAMS with terminal parameters associated with FD. */ +int +gtty (fd, params) + int fd; + struct sgttyb *params; +{ + if (params == NULL) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} + +stub_warning (gtty) +#include <stub-tag.h> diff --git a/sysdeps/generic/if_index.c b/sysdeps/generic/if_index.c new file mode 100644 index 0000000000..c7022d8b07 --- /dev/null +++ b/sysdeps/generic/if_index.c @@ -0,0 +1,52 @@ +/* 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 <errno.h> +#define __need_NULL +#include <stddef.h> + +unsigned int +if_nametoindex (const char *ifname) +{ + __set_errno (ENOSYS); + return 0; +} +stub_warning (if_nametoindex) + +char * +if_indextoname (unsigned int ifindex, char *ifname) +{ + __set_errno (ENOSYS); + return NULL; +} +stub_warning (if_indextoname) + +void +if_freenameindex (struct if_nameindex *ifn) +{ +} +stub_warning (if_freenameindex) + +struct if_nameindex * +if_nameindex (void) +{ + __set_errno (ENOSYS); + return NULL; +} +stub_warning (if_nameindex) +#include <stub-tag.h> diff --git a/sysdeps/generic/init-first.c b/sysdeps/generic/init-first.c new file mode 100644 index 0000000000..dacefdcb63 --- /dev/null +++ b/sysdeps/generic/init-first.c @@ -0,0 +1,55 @@ +/* Initialization code run first thing by the ELF startup code. Stub version. + Copyright (C) 1995, 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 <unistd.h> +#include <sys/types.h> + +int __libc_multiple_libcs = 1; + +extern void __libc_init (int, char **, char **); +extern void __getopt_clean_environment (char **); + +pid_t __libc_pid; + +#ifdef PIC +void +__libc_init_first (void) +{ +} +#endif + +#ifdef PIC +/* NOTE! The linker notices the magical name `_init' and sets the DT_INIT + pointer in the dynamic section based solely on that. It is convention + for this function to be in the `.init' section, but the symbol name is + the only thing that really matters!! */ +void _init +#else +void __libc_init_first +#endif +(int argc, char *arg0, ...) +{ + char **argv = &arg0, **envp = &argv[argc + 1]; + + __environ = envp; + __libc_init (argc, argv, envp); + + /* This is a hack to make the special getopt in GNU libc working. */ + __getopt_clean_environment (envp); +} diff --git a/sysdeps/generic/init-posix.c b/sysdeps/generic/init-posix.c new file mode 100644 index 0000000000..8e37bb6861 --- /dev/null +++ b/sysdeps/generic/init-posix.c @@ -0,0 +1,27 @@ +/* Copyright (C) 1991, 1995, 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 HAVE_GNU_LD + +void +__init_posix (void) +{ + return; +} + +#endif diff --git a/sysdeps/generic/intr-msg.h b/sysdeps/generic/intr-msg.h new file mode 100644 index 0000000000..0186aa3323 --- /dev/null +++ b/sysdeps/generic/intr-msg.h @@ -0,0 +1,15 @@ +/* Stubby version of intr-msg.h. */ + +/* This file must be written in machine-dependent form for each hurd port. + and define the following: + + INTR_MSG_TRAP + INTR_MSG_BACK_OUT + SYSCALL_EXAMINE + struct mach_msg_trap_args + MSG_EXAMINE + + See sysdeps/mach/hurd/i386/intr-msg.h for an example. */ + + +#error Could not find machine-dependent intr-msg.h file. diff --git a/sysdeps/generic/ioctl.c b/sysdeps/generic/ioctl.c new file mode 100644 index 0000000000..019fb0e0cd --- /dev/null +++ b/sysdeps/generic/ioctl.c @@ -0,0 +1,35 @@ +/* Copyright (C) 1991, 93, 94, 95, 96, 97 Free Software Foundation, Inc. + This file is part of the 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 <errno.h> +#include <sys/ioctl.h> + +/* Perform the I/O control operation specified by REQUEST on FD. + The actual type and use of ARG and the return value depend on REQUEST. */ +int +__ioctl (fd, request) + int fd; + unsigned long int request; +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (ioctl) + +weak_alias (__ioctl, ioctl) +#include <stub-tag.h> diff --git a/sysdeps/generic/isatty.c b/sysdeps/generic/isatty.c new file mode 100644 index 0000000000..824d09b3cc --- /dev/null +++ b/sysdeps/generic/isatty.c @@ -0,0 +1,34 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <unistd.h> + +/* Return 1 if FD is a terminal, 0 if not. */ +int +__isatty (fd) + int fd; +{ + __set_errno (ENOSYS); + return -1; +} + +weak_alias (__isatty, isatty) + +stub_warning (isatty) +#include <stub-tag.h> diff --git a/sysdeps/generic/isfdtype.c b/sysdeps/generic/isfdtype.c new file mode 100644 index 0000000000..0d22a93477 --- /dev/null +++ b/sysdeps/generic/isfdtype.c @@ -0,0 +1,31 @@ +/* isfdtype - Determine whether descriptor has given property. Stub 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. */ + +#include <errno.h> +#include <sys/stat.h> + + +int +isfdtype (int fildes, int fdtype) +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (isfdtype) +#include <stub-tag.h> diff --git a/sysdeps/generic/jmp-unwind.c b/sysdeps/generic/jmp-unwind.c new file mode 100644 index 0000000000..083dc74a83 --- /dev/null +++ b/sysdeps/generic/jmp-unwind.c @@ -0,0 +1,29 @@ +/* _longjmp_unwind -- Clean up stack frames unwound by longjmp. Stub version. + Copyright (C) 1995, 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 <setjmp.h> + +void +_longjmp_unwind (jmp_buf env, int val) +{ + + /* This function can perform any cleanups necessary to safely unwind the + stack frames around the current context which ENV unwinds past. */ + +} diff --git a/sysdeps/generic/k_cosl.c b/sysdeps/generic/k_cosl.c new file mode 100644 index 0000000000..61af3372a1 --- /dev/null +++ b/sysdeps/generic/k_cosl.c @@ -0,0 +1,14 @@ +#include <math.h> +#include <stdio.h> +#include <errno.h> + +long double +__kernel_cosl (long double x, long double y) +{ + fputs ("__kernel_cosl not implemented\n", stderr); + __set_errno (ENOSYS); + return 0.0; +} + +stub_warning (__kernel_cosl) +#include <stub-tag.h> diff --git a/sysdeps/generic/k_rem_pio2l.c b/sysdeps/generic/k_rem_pio2l.c new file mode 100644 index 0000000000..236eb30dd9 --- /dev/null +++ b/sysdeps/generic/k_rem_pio2l.c @@ -0,0 +1,16 @@ +#include <math.h> +#include <math_private.h> +#include <stdio.h> +#include <errno.h> + +int +__kernel_rem_pio2l (long double *x, long double *y, int e0, int nx, int prec, + const int *ipio2) +{ + fputs ("__kernel_rem_pio2l not implemented\n", stderr); + __set_errno (ENOSYS); + return 0.0; +} + +stub_warning (__kernel_rem_pio2l) +#include <stub-tag.h> diff --git a/sysdeps/generic/k_sinl.c b/sysdeps/generic/k_sinl.c new file mode 100644 index 0000000000..07dddcecb2 --- /dev/null +++ b/sysdeps/generic/k_sinl.c @@ -0,0 +1,14 @@ +#include <math.h> +#include <stdio.h> +#include <errno.h> + +long double +__kernel_sinl (long double x, long double y) +{ + fputs ("__kernel_sinl not implemented\n", stderr); + __set_errno (ENOSYS); + return 0.0; +} + +stub_warning (__kernel_sinl) +#include <stub-tag.h> diff --git a/sysdeps/generic/k_tanl.c b/sysdeps/generic/k_tanl.c new file mode 100644 index 0000000000..1504a1cd90 --- /dev/null +++ b/sysdeps/generic/k_tanl.c @@ -0,0 +1,14 @@ +#include <math.h> +#include <stdio.h> +#include <errno.h> + +long double +__kernel_tanl (long double x, long double y, int iy) +{ + fputs ("__kernel_tanl not implemented\n", stderr); + __set_errno (ENOSYS); + return 0.0; +} + +stub_warning (__kernel_tanl) +#include <stub-tag.h> diff --git a/sysdeps/generic/kill.c b/sysdeps/generic/kill.c new file mode 100644 index 0000000000..0d035d4bb6 --- /dev/null +++ b/sysdeps/generic/kill.c @@ -0,0 +1,37 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <signal.h> + + +/* Send signal SIG to process number PID. If PID is zero, + send SIG to all processes in the current process's process group. + If PID is < -1, send SIG to all processes in process group - PID. */ +int +__kill (pid, sig) + int pid; + int sig; +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (kill) + +weak_alias (__kill, kill) +#include <stub-tag.h> diff --git a/sysdeps/generic/killpg.c b/sysdeps/generic/killpg.c new file mode 100644 index 0000000000..b9c8b8c26e --- /dev/null +++ b/sysdeps/generic/killpg.c @@ -0,0 +1,36 @@ +/* Copyright (C) 1991, 1993, 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. */ + +#include <errno.h> +#include <signal.h> + + +/* Send SIG to all processes in process group PGRP. + If PGRP is zero, send SIG to all processes in + the current process's process group. */ +int +killpg (pgrp, sig) + __pid_t pgrp; + int sig; +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (killpg) +#include <stub-tag.h> diff --git a/sysdeps/generic/lchown.c b/sysdeps/generic/lchown.c new file mode 100644 index 0000000000..e428798c30 --- /dev/null +++ b/sysdeps/generic/lchown.c @@ -0,0 +1,43 @@ +/* Copyright (C) 1996 Free Software Foundation, Inc. + This file is part of the 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 <errno.h> +#include <stddef.h> +#include <unistd.h> +#include <sys/types.h> + +/* Change the owner and group of FILE. */ +int +__lchown (file, owner, group) + const char *file; + uid_t owner; + gid_t group; +{ + if (file == NULL) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} +stub_warning (lchown) + +weak_alias (__lchown, lchown) +#include <stub-tag.h> diff --git a/sysdeps/generic/ldbl2mpn.c b/sysdeps/generic/ldbl2mpn.c new file mode 100644 index 0000000000..e456d59e1d --- /dev/null +++ b/sysdeps/generic/ldbl2mpn.c @@ -0,0 +1,32 @@ +/* Copyright (C) 1995, 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 "gmp.h" +#include "gmp-impl.h" + +/* Convert a `long double' to a multi-precision integer representing the + significand scaled up by the highest possible number of significant bits + of fraction (LDBL_MANT_DIG), and an integral power of two (MPN frexpl). */ + +mp_size_t +__mpn_extract_long_double (mp_ptr res_ptr, mp_size_t size, + int *expt, int *is_neg, + double value) +{ +#error "not implemented for this floating point format" +} diff --git a/sysdeps/generic/libc_fatal.c b/sysdeps/generic/libc_fatal.c new file mode 100644 index 0000000000..a5489ed39f --- /dev/null +++ b/sysdeps/generic/libc_fatal.c @@ -0,0 +1,30 @@ +/* Copyright (C) 1993, 1995, 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 <stdio.h> + +/* Abort with an error message. */ +void +__libc_fatal (message) + const char *message; +{ + /* This function should write MESSAGE out in the most reliable way. + It is called in situations like internal stdio lossage. */ + + abort (); +} diff --git a/sysdeps/generic/link.c b/sysdeps/generic/link.c new file mode 100644 index 0000000000..6d55a749b3 --- /dev/null +++ b/sysdeps/generic/link.c @@ -0,0 +1,42 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <stddef.h> +#include <unistd.h> + + +/* Make a link to FROM called TO. */ +int +__link (from, to) + const char *from; + const char *to; +{ + if (from == NULL || to == NULL) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} +stub_warning (link) + +weak_alias (__link, link) +#include <stub-tag.h> diff --git a/sysdeps/generic/listen.c b/sysdeps/generic/listen.c new file mode 100644 index 0000000000..3d557136cf --- /dev/null +++ b/sysdeps/generic/listen.c @@ -0,0 +1,36 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <sys/socket.h> + +/* Prepare to accept connections on socket FD. + N connection requests will be queued before further requests are refused. + Returns 0 on success, -1 for errors. */ +int +listen (fd, n) + int fd; + unsigned int n; +{ + __set_errno (ENOSYS); + return -1; +} + + +stub_warning (listen) +#include <stub-tag.h> diff --git a/sysdeps/generic/lockfile.c b/sysdeps/generic/lockfile.c new file mode 100644 index 0000000000..143e9901dc --- /dev/null +++ b/sysdeps/generic/lockfile.c @@ -0,0 +1,60 @@ +/* lockfile - Handle locking and unlocking of stream. + 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. */ + +typedef int FILE; + + +void +__internal_flockfile (FILE *stream) +{ + /* Do nothing. Using this version does not do any locking. */ +} +#ifdef USE_IN_LIBIO +weak_alias (__internal_flockfile, _IO_flockfile) +#else +weak_alias (__internal_flockfile, __flockfile) +#endif +weak_alias (__internal_flockfile, flockfile); + + +void +__internal_funlockfile (FILE *stream) +{ + /* Do nothing. Using this version does not do any locking. */ +} +#ifdef USE_IN_LIBIO +weak_alias (__internal_funlockfile, _IO_funlockfile) +#else +weak_alias (__internal_funlockfile, __funlockfile) +#endif +weak_alias (__internal_funlockfile, funlockfile); + + +int +__internal_ftrylockfile (FILE *stream) +{ + /* Do nothing. Using this version does not do any locking. */ + return 1; +} +#ifdef USE_IN_LIBIO +weak_alias (__internal_ftrylockfile, _IO_ftrylockfile) +#else +weak_alias (__internal_ftrylockfile, __ftrylockfile) +#endif +weak_alias (__internal_ftrylockfile, ftrylockfile); diff --git a/sysdeps/generic/longjmp-ts.c b/sysdeps/generic/longjmp-ts.c new file mode 100644 index 0000000000..201be7e867 --- /dev/null +++ b/sysdeps/generic/longjmp-ts.c @@ -0,0 +1,32 @@ +/* Perform a `longjmp' on a Mach thread_state. Stub version. + Copyright (C) 1991, 1994, 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 <setjmp.h> +#include <mach/thread_status.h> + +/* Set up STATE to do the equivalent of `longjmp (ENV, VAL);'. */ + +void +_hurd_longjmp_thread_state (void *state, jmp_buf env, int val) +{ + /* Set all the registers in *STATE to the values described by ENV and + RETVAL. After this, setting that thread's state to STATE should be + just like calling `longjmp (ENV, RETVAL)'. */ + #error "Need to write sysdeps/mach/hurd/MACHINE/longjmp-ctx.c" +} diff --git a/sysdeps/generic/lseek.c b/sysdeps/generic/lseek.c new file mode 100644 index 0000000000..879b05a1c4 --- /dev/null +++ b/sysdeps/generic/lseek.c @@ -0,0 +1,52 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <unistd.h> +#include <sys/types.h> + +/* Seek to OFFSET on FD, starting from WHENCE. */ +off_t +__lseek (fd, offset, whence) + int fd; + off_t offset; + int whence; +{ + if (fd < 0) + { + __set_errno (EBADF); + return -1; + } + switch (whence) + { + case SEEK_SET: + case SEEK_CUR: + case SEEK_END: + break; + default: + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} +stub_warning (lseek) + +weak_alias (__lseek, lseek) +#include <stub-tag.h> diff --git a/sysdeps/generic/lseek64.c b/sysdeps/generic/lseek64.c new file mode 100644 index 0000000000..a2ffe2e0bd --- /dev/null +++ b/sysdeps/generic/lseek64.c @@ -0,0 +1,50 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <unistd.h> +#include <sys/types.h> + +/* Seek to OFFSET on FD, starting from WHENCE. */ +off64_t +lseek64 (fd, offset, whence) + int fd; + off64_t offset; + int whence; +{ + if (fd < 0) + { + __set_errno (EBADF); + return -1; + } + switch (whence) + { + case SEEK_SET: + case SEEK_CUR: + case SEEK_END: + break; + default: + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} +stub_warning (lseek64) +#include <stub-tag.h> diff --git a/sysdeps/generic/lxstat64.c b/sysdeps/generic/lxstat64.c new file mode 100644 index 0000000000..7916fdca05 --- /dev/null +++ b/sysdeps/generic/lxstat64.c @@ -0,0 +1,38 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <stddef.h> +#include <sys/stat.h> + +/* Get file information about FILE in BUF. + If FILE is a symbolic link, do not follow it. */ +int +__lxstat64 (int vers, const char *file, struct stat64 *buf) +{ + if (vers != _STAT_VER || file == NULL || buf == NULL) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} +stub_warning (lstat64) +#include <stub-tag.h> diff --git a/sysdeps/generic/machine-lock.h b/sysdeps/generic/machine-lock.h new file mode 100644 index 0000000000..3776bb0049 --- /dev/null +++ b/sysdeps/generic/machine-lock.h @@ -0,0 +1,64 @@ +/* Machine-specific definition for spin locks. Stub version. + Copyright (C) 1994, 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 _MACHINE_LOCK_H +#define _MACHINE_LOCK_H + +/* The type of a spin lock variable. */ + +typedef volatile int __spin_lock_t; + +/* Value to initialize `__spin_lock_t' variables to. */ + +#define __SPIN_LOCK_INITIALIZER 0 + + +#ifndef _EXTERN_INLINE +#define _EXTERN_INLINE extern __inline +#endif + +/* Unlock LOCK. */ + +_EXTERN_INLINE void +__spin_unlock (__spin_lock_t *__lock) +{ + *__lock = 0; +} + +/* Try to lock LOCK; return nonzero if we locked it, zero if another has. */ + +_EXTERN_INLINE int +__spin_try_lock (__spin_lock_t *__lock) +{ + if (*__lock) + return 0; + *__lock = 1; + return 1; +} + +/* Return nonzero if LOCK is locked. */ + +_EXTERN_INLINE int +__spin_lock_locked (__spin_lock_t *__lock) +{ + return *__lock != 0; +} + + +#endif /* machine-lock.h */ diff --git a/sysdeps/generic/machine-sp.h b/sysdeps/generic/machine-sp.h new file mode 100644 index 0000000000..6d8ad485e2 --- /dev/null +++ b/sysdeps/generic/machine-sp.h @@ -0,0 +1,36 @@ +/* Machine-specific function to return the stack pointer. Stub version. + Copyright (C) 1994, 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 _MACHINE_SP_H +#define _MACHINE_SP_H + +/* Return the current stack pointer. */ + +#ifndef _EXTERN_INLINE +#define _EXTERN_INLINE extern __inline +#endif + +_EXTERN_INLINE void * +__thread_stack_pointer (void) +{ + register void *__sp__ ("{STACK-POINTER}"); + return __sp__; +} + +#endif /* machine-sp.h */ diff --git a/sysdeps/generic/madvise.c b/sysdeps/generic/madvise.c new file mode 100644 index 0000000000..5431bda111 --- /dev/null +++ b/sysdeps/generic/madvise.c @@ -0,0 +1,34 @@ +/* Copyright (C) 1994, 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. */ + +#include <sys/types.h> +#include <sys/mman.h> +#include <errno.h> + +/* Advise the system about particular usage patterns the program follows + for the region starting at ADDR and extending LEN bytes. */ + +int +madvise (__ptr_t addr, size_t len, int advice) +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (madvise) +#include <stub-tag.h> diff --git a/sysdeps/generic/mkdir.c b/sysdeps/generic/mkdir.c new file mode 100644 index 0000000000..fe6c719427 --- /dev/null +++ b/sysdeps/generic/mkdir.c @@ -0,0 +1,43 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <stddef.h> +#include <sys/stat.h> +#include <sys/types.h> + + +/* Create a directory named PATH with protections MODE. */ +int +__mkdir (path, mode) + const char *path; + mode_t mode; +{ + if (path == NULL) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} +stub_warning (mkdir) + +weak_alias (__mkdir, mkdir) +#include <stub-tag.h> diff --git a/sysdeps/generic/mkfifo.c b/sysdeps/generic/mkfifo.c new file mode 100644 index 0000000000..9163680bc9 --- /dev/null +++ b/sysdeps/generic/mkfifo.c @@ -0,0 +1,43 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <stddef.h> +#include <sys/stat.h> +#include <sys/types.h> + + +/* Create a named pipe (FIFO) named PATH with protections MODE. */ +int +mkfifo (path, mode) + const char *path; + mode_t mode; +{ + if (path == NULL) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} + + +stub_warning (mkfifo) +#include <stub-tag.h> diff --git a/sysdeps/generic/mkstemp.c b/sysdeps/generic/mkstemp.c new file mode 100644 index 0000000000..c84e8eb4c2 --- /dev/null +++ b/sysdeps/generic/mkstemp.c @@ -0,0 +1,42 @@ +/* Copyright (C) 1992, 1995, 1996 Free Software Foundation, Inc. + This file is part of the 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 <stdlib.h> +#include <string.h> +#include <errno.h> + +/* Generate a unique temporary file name from TEMPLATE. + The last six characters of TEMPLATE must be "XXXXXX"; + they are replaced with a string that makes the filename unique. + Returns a file descriptor open on the file for reading and writing. */ +int +mkstemp (template) + char *template; +{ + if (strcmp (&template[strlen (template) - 6], "XXXXXX")) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} + +stub_warning (mkstemp) +#include <stub-tag.h> diff --git a/sysdeps/generic/mktemp.c b/sysdeps/generic/mktemp.c new file mode 100644 index 0000000000..7d53f01c04 --- /dev/null +++ b/sysdeps/generic/mktemp.c @@ -0,0 +1,41 @@ +/* Copyright (C) 1991, 1995, 1996 Free Software Foundation, Inc. + This file is part of the 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 <stdlib.h> +#include <string.h> +#include <errno.h> + +/* Generate a unique temporary file name from TEMPLATE. + The last six characters of TEMPLATE must be "XXXXXX"; + they are replaced with a string that makes the filename unique. */ +char * +mktemp (template) + char *template; +{ + if (strcmp (&template[strlen (template) - 6], "XXXXXX")) + { + __set_errno (EINVAL); + return template; + } + + __set_errno (ENOSYS); + return NULL; +} + +stub_warning (mktemp) +#include <stub-tag.h> diff --git a/sysdeps/generic/mmap.c b/sysdeps/generic/mmap.c new file mode 100644 index 0000000000..fc43c0b09d --- /dev/null +++ b/sysdeps/generic/mmap.c @@ -0,0 +1,41 @@ +/* Copyright (C) 1994, 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. */ + +#include <sys/types.h> +#include <sys/mman.h> +#include <errno.h> + +/* Map addresses starting near ADDR and extending for LEN bytes. From + OFFSET into the file FD describes according to PROT and FLAGS. If ADDR + is nonzero, it is the desired mapping address. If the MAP_FIXED bit is + set in FLAGS, the mapping will be at ADDR exactly (which must be + page-aligned); otherwise the system chooses a convenient nearby address. + The return value is the actual mapping address chosen or MAP_FAILED + for errors (in which case `errno' is set). A successful `mmap' call + deallocates any previous mapping for the affected region. */ + +__ptr_t +__mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset) +{ + __set_errno (ENOSYS); + return MAP_FAILED; +} + +stub_warning (mmap) +#include <stub-tag.h> +weak_alias (__mmap, mmap) diff --git a/sysdeps/generic/mpn2dbl.c b/sysdeps/generic/mpn2dbl.c new file mode 100644 index 0000000000..37ceab6fd6 --- /dev/null +++ b/sysdeps/generic/mpn2dbl.c @@ -0,0 +1,30 @@ +/* Copyright (C) 1995, 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 "gmp.h" +#include "gmp-impl.h" +#include <float.h> + +/* Convert a multi-precision integer of the needed number of bits and an + integral power of two to a `double'. */ + +double +__mpn_construct_double (mp_srcptr frac_ptr, int expt, int negative) +{ +#error "__mpn_construct_double not implemented for this floating point format" +} diff --git a/sysdeps/generic/mpn2flt.c b/sysdeps/generic/mpn2flt.c new file mode 100644 index 0000000000..53731bcf97 --- /dev/null +++ b/sysdeps/generic/mpn2flt.c @@ -0,0 +1,30 @@ +/* Copyright (C) 1995, 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 "gmp.h" +#include "gmp-impl.h" +#include <float.h> + +/* Convert a multi-precision integer of the needed number of bits and an + integral power of two to a `float'. */ + +float +__mpn_construct_float (mp_srcptr frac_ptr, int expt, int negative) +{ +#error "__mpn_construct_float not implemented for this floating point format" +} diff --git a/sysdeps/generic/mpn2ldbl.c b/sysdeps/generic/mpn2ldbl.c new file mode 100644 index 0000000000..c269ce689b --- /dev/null +++ b/sysdeps/generic/mpn2ldbl.c @@ -0,0 +1,30 @@ +/* Copyright (C) 1995, 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 "gmp.h" +#include "gmp-impl.h" +#include <float.h> + +/* Convert a multi-precision integer of the needed number of bits and an + integral power of two to a `long double'. */ + +long double +__mpn_construct_long_double (mp_srcptr frac_ptr, int expt, int negative) +{ +#error "__mpn_construct_long_double not implemented for floating point format" +} diff --git a/sysdeps/generic/mprotect.c b/sysdeps/generic/mprotect.c new file mode 100644 index 0000000000..d9252fe903 --- /dev/null +++ b/sysdeps/generic/mprotect.c @@ -0,0 +1,36 @@ +/* Copyright (C) 1994, 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. */ + +#include <sys/types.h> +#include <sys/mman.h> +#include <errno.h> + +/* Change the memory protection of the region starting at ADDR and + extending LEN bytes to PROT. Returns 0 if successful, -1 for errors + (and sets errno). */ + +int +__mprotect (__ptr_t addr, size_t len, int prot) +{ + __set_errno (ENOSYS); + return -1; +} +weak_alias (__mprotect, mprotect) + +stub_warning (mprotect) +#include <stub-tag.h> diff --git a/sysdeps/generic/msgctl.c b/sysdeps/generic/msgctl.c new file mode 100644 index 0000000000..8a973397f4 --- /dev/null +++ b/sysdeps/generic/msgctl.c @@ -0,0 +1,37 @@ +/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995. + + 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/msg.h> +#include <errno.h> + +/* Allows to control internal state and destruction of message queue + objects. */ + +int +msgctl (msqid, cmd, buf) + int msqid; + int cmd; + struct msqid_ds *buf; +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (msgctl) +#include <stub-tag.h> diff --git a/sysdeps/generic/msgget.c b/sysdeps/generic/msgget.c new file mode 100644 index 0000000000..c00804d37d --- /dev/null +++ b/sysdeps/generic/msgget.c @@ -0,0 +1,36 @@ +/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995. + + 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/msg.h> +#include <errno.h> + +/* Return descriptor for message queue associated with KEY. The MSGFLG + parameter describes how to proceed with clashing of key values. */ + +int +msgget (key, msgflg) + key_t key; + int msgflg; +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (msgget) +#include <stub-tag.h> diff --git a/sysdeps/generic/msgrcv.c b/sysdeps/generic/msgrcv.c new file mode 100644 index 0000000000..e233b6d041 --- /dev/null +++ b/sysdeps/generic/msgrcv.c @@ -0,0 +1,42 @@ +/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995. + + 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/msg.h> +#include <errno.h> + +/* Read a message from the queue associated with the message queue + descriptor MSQID. At most MSGSZ bytes of the message are placed + in the buffer specified by the MSGP parameter. The MSGTYP parameter + describes which message is returned in MSGFLG describes the behaviour + in buffer overflow or queue underflow. */ + +int +msgrcv (msqid, msgp, msgsz, msgtyp, msgflg) + int msqid; + void *msgp; + size_t msgsz; + long msgtyp; + int msgflg; +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (msgrcv) +#include <stub-tag.h> diff --git a/sysdeps/generic/msgsnd.c b/sysdeps/generic/msgsnd.c new file mode 100644 index 0000000000..993895290b --- /dev/null +++ b/sysdeps/generic/msgsnd.c @@ -0,0 +1,41 @@ +/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995. + + 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/msg.h> +#include <errno.h> + +/* Send a message to the queue associated with the message queue + descriptor MSQID. The parameter MSGP points to a structure + describing messages where the parameter MSGSZ gives the length + of the text. The MSGFLG parameter describes the action taken + when the limit of the message queue length is reached. */ + +int +msgsnd (msqid, msgp, msgsz, msgflg) + int msqid; + void *msgp; + size_t msgsz; + int msgflg; +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (msgsnd) +#include <stub-tag.h> diff --git a/sysdeps/generic/msync.c b/sysdeps/generic/msync.c new file mode 100644 index 0000000000..d1cb2d7c6d --- /dev/null +++ b/sysdeps/generic/msync.c @@ -0,0 +1,35 @@ +/* Copyright (C) 1994, 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. */ + +#include <sys/types.h> +#include <sys/mman.h> +#include <errno.h> + +/* Synchronize the region starting at ADDR and extending LEN bytes with the + file it maps. Filesystem operations on a file being mapped are + unpredictable before this is done. */ + +int +msync (__ptr_t addr, size_t len, int flags) +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (msync) +#include <stub-tag.h> diff --git a/sysdeps/generic/munmap.c b/sysdeps/generic/munmap.c new file mode 100644 index 0000000000..9c2217bb6d --- /dev/null +++ b/sysdeps/generic/munmap.c @@ -0,0 +1,35 @@ +/* Copyright (C) 1994, 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. */ + +#include <sys/types.h> +#include <sys/mman.h> +#include <errno.h> + +/* Deallocate any mapping for the region starting at ADDR and extending LEN + bytes. Returns 0 if successful, -1 for errors (and sets errno). */ + +int +__munmap (__ptr_t addr, size_t len) +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (munmap) +#include <stub-tag.h> +weak_alias (__munmap, munmap) diff --git a/sysdeps/generic/nanosleep.c b/sysdeps/generic/nanosleep.c new file mode 100644 index 0000000000..1f9704e2d9 --- /dev/null +++ b/sysdeps/generic/nanosleep.c @@ -0,0 +1,35 @@ +/* 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. */ + +#include <errno.h> +#include <time.h> + + +/* Pause execution for a number of nanoseconds. */ +int +__libc_nanosleep (const struct timespec *requested_time, + struct timespec *remaining) +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (nanosleep) + +weak_alias (__libc_nanosleep, __nanosleep) +weak_alias (__libc_nanosleep, nanosleep) +#include <stub-tag.h> diff --git a/sysdeps/generic/nice.c b/sysdeps/generic/nice.c new file mode 100644 index 0000000000..f58b8c4f52 --- /dev/null +++ b/sysdeps/generic/nice.c @@ -0,0 +1,33 @@ +/* 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. */ + +#include <errno.h> +#include <unistd.h> + +/* Increment the scheduling priority of the calling process by INCR. + The superuser may use a negative INCR to decrement the priority. */ +int +nice (incr) + int incr; +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (nice) +#include <stub-tag.h> diff --git a/sysdeps/generic/nlist.c b/sysdeps/generic/nlist.c new file mode 100644 index 0000000000..5d7a08e24c --- /dev/null +++ b/sysdeps/generic/nlist.c @@ -0,0 +1,43 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <nlist.h> +#include <stddef.h> + +/* Search the executable FILE for symbols matching those in NL, + which is terminated by an element with a NULL `n_un.n_name' member, + and fill in the elements of NL. */ +int +nlist (file, nl) + const char *file; + struct nlist *nl; +{ + if (nl == NULL) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} + + +stub_warning (nlist) +#include <stub-tag.h> diff --git a/sysdeps/generic/open.c b/sysdeps/generic/open.c new file mode 100644 index 0000000000..cd7b0e051c --- /dev/null +++ b/sysdeps/generic/open.c @@ -0,0 +1,53 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <fcntl.h> +#include <stdarg.h> +#include <stddef.h> + +/* Open FILE with access OFLAG. If OFLAG includes O_CREAT, + a third argument is the file protection. */ +int +__open (file, oflag) + const char *file; + int oflag; +{ + int mode; + + if (file == NULL) + { + __set_errno (EINVAL); + return -1; + } + + if (oflag & O_CREAT) + { + va_list arg; + va_start(arg, oflag); + mode = va_arg(arg, int); + va_end(arg); + } + + __set_errno (ENOSYS); + return -1; +} +stub_warning (open) + +weak_alias (__open, open) +#include <stub-tag.h> diff --git a/sysdeps/generic/open64.c b/sysdeps/generic/open64.c new file mode 100644 index 0000000000..16e19730f4 --- /dev/null +++ b/sysdeps/generic/open64.c @@ -0,0 +1,53 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <fcntl.h> +#include <stdarg.h> +#include <stddef.h> + +/* Open FILE with access OFLAG. If OFLAG includes O_CREAT, + a third argument is the file protection. */ +int +__open64 (file, oflag) + const char *file; + int oflag; +{ + int mode; + + if (file == NULL) + { + __set_errno (EINVAL); + return -1; + } + + if (oflag & O_CREAT) + { + va_list arg; + va_start (arg, oflag); + mode = va_arg (arg, int); + va_end (arg); + } + + __set_errno (ENOSYS); + return -1; +} +weak_alias (__open64, open64) + +stub_warning (open64) +#include <stub-tag.h> diff --git a/sysdeps/generic/opendir.c b/sysdeps/generic/opendir.c new file mode 100644 index 0000000000..6b7f14e9f8 --- /dev/null +++ b/sysdeps/generic/opendir.c @@ -0,0 +1,34 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <stddef.h> +#include <dirent.h> + + +/* Open a directory stream on NAME. */ +DIR * +__opendir (const char *name) +{ + __set_errno (ENOSYS); + return NULL; +} +weak_alias (__opendir, opendir) + +stub_warning (opendir) +#include <stub-tag.h> diff --git a/sysdeps/generic/pathconf.c b/sysdeps/generic/pathconf.c new file mode 100644 index 0000000000..b3c2c88a4b --- /dev/null +++ b/sysdeps/generic/pathconf.c @@ -0,0 +1,41 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <stddef.h> +#include <unistd.h> + + +/* Get file-specific information about PATH. */ +long int +__pathconf (path, name) + const char *path; + int name; +{ + if (path == NULL) + { + __set_errno (EINVAL); + return -1; + } + return __fpathconf (0, name); +} + +weak_alias (__pathconf, pathconf) + +stub_warning (pathconf) +#include <stub-tag.h> diff --git a/sysdeps/generic/pause.c b/sysdeps/generic/pause.c new file mode 100644 index 0000000000..18742e8101 --- /dev/null +++ b/sysdeps/generic/pause.c @@ -0,0 +1,34 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <unistd.h> + + +/* Suspend the process until a signal arrives. + This is supposed to always return -1 and set errno to EINTR, + but rules were meant to be broken. */ +int +pause () +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (pause) +#include <stub-tag.h> diff --git a/sysdeps/generic/pipe.c b/sysdeps/generic/pipe.c new file mode 100644 index 0000000000..26cf5230d4 --- /dev/null +++ b/sysdeps/generic/pipe.c @@ -0,0 +1,43 @@ +/* Copyright (C) 1991, 1995, 1996 Free Software Foundation, Inc. + This file is part of the 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 <errno.h> +#include <unistd.h> +#include <stddef.h> + +/* Create a one-way communication channel (__pipe). + If successful, two file descriptors are stored in PIPEDES; + bytes written on PIPEDES[1] can be read from PIPEDES[0]. + Returns 0 if successful, -1 if not. */ +int +__pipe (__pipedes) + int __pipedes[2]; +{ + if (__pipedes == NULL) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} +stub_warning (pipe) + +weak_alias (__pipe, pipe) +#include <stub-tag.h> diff --git a/sysdeps/generic/pipestream.c b/sysdeps/generic/pipestream.c new file mode 100644 index 0000000000..eead474f74 --- /dev/null +++ b/sysdeps/generic/pipestream.c @@ -0,0 +1,60 @@ +/* Copyright (C) 1991, 1993, 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. */ + +#include <stddef.h> +#include <signal.h> +#include <stdio.h> +#include <errno.h> + + +/* Open a new stream that is a one-way pipe to a + child process running the given shell command. */ +FILE * +popen (command, mode) + const char *command; + const char *mode; +{ + if (command == NULL || mode == NULL || (*mode != 'r' && *mode != 'w')) + { + __set_errno (EINVAL); + return NULL; + } + + __set_errno (ENOSYS); + return NULL; +} + +/* Close a stream opened by popen and return its status. + Returns -1 if the stream was not opened by popen. */ +int +pclose (stream) + register FILE *stream; +{ + if (!__validfp (stream) || !stream->__ispipe) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} + +stub_warning (popen) +stub_warning (pclose) +#include <stub-tag.h> diff --git a/sysdeps/generic/poll.c b/sysdeps/generic/poll.c new file mode 100644 index 0000000000..f3d678e40d --- /dev/null +++ b/sysdeps/generic/poll.c @@ -0,0 +1,39 @@ +/* Copyright (C) 1994, 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. */ + +#include <sys/poll.h> +#include <errno.h> + +/* Poll the file descriptors described by the NFDS structures starting at + FDS. If TIMEOUT is nonzero and not -1, allow TIMEOUT milliseconds for + an event to occur; if TIMEOUT is -1, block until an event occurs. + Returns the number of file descriptors with events, zero if timed out, + or -1 for errors. */ + +int +poll (fds, nfds, timeout) + struct pollfd *fds; + unsigned long int nfds; + int timeout; +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (poll) +#include <stub-tag.h> diff --git a/sysdeps/generic/pread.c b/sysdeps/generic/pread.c new file mode 100644 index 0000000000..5fdaf7b4af --- /dev/null +++ b/sysdeps/generic/pread.c @@ -0,0 +1,44 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <unistd.h> + +/* Read NBYTES into BUF from FD at the given position OFFSET without + changing the file pointer. Return the number read or -1. */ +ssize_t +pread (int fd, void *buf, size_t nbytes, off_t offset) +{ + if (nbytes == 0) + return 0; + if (fd < 0) + { + __set_errno (EBADF); + return -1; + } + if (buf == NULL || offset < 0) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} +stub_warning (pread) +#include <stub-tag.h> diff --git a/sysdeps/generic/pread64.c b/sysdeps/generic/pread64.c new file mode 100644 index 0000000000..fdf622250b --- /dev/null +++ b/sysdeps/generic/pread64.c @@ -0,0 +1,44 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <unistd.h> + +/* Read NBYTES into BUF from FD at the given position OFFSET without + changing the file pointer. Return the number read or -1. */ +ssize_t +pread64 (int fd, void *buf, size_t nbytes, off64_t offset) +{ + if (nbytes == 0) + return 0; + if (fd < 0) + { + __set_errno (EBADF); + return -1; + } + if (buf == NULL || offset < 0) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} +stub_warning (pread64) +#include <stub-tag.h> diff --git a/sysdeps/generic/profil.c b/sysdeps/generic/profil.c new file mode 100644 index 0000000000..b70e20afd7 --- /dev/null +++ b/sysdeps/generic/profil.c @@ -0,0 +1,42 @@ +/* Low-level statistical profiling support function. Stub version. + 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. */ + +#include <sys/types.h> +#include <unistd.h> +#include <errno.h> + +/* Enable statistical profiling, writing samples of the PC into at most + SIZE bytes of SAMPLE_BUFFER; every processor clock tick while profiling + is enabled, the system examines the user PC and increments + SAMPLE_BUFFER[((PC - OFFSET) / 2) * SCALE / 65536]. If SCALE is zero, + disable profiling. Returns zero on success, -1 on error. */ + +int +__profil (u_short *sample_buffer, size_t size, size_t offset, u_int scale) +{ + if (scale == 0) + /* Disable profiling. */ + return 0; + + __set_errno (ENOSYS); + return -1; +} +weak_alias (__profil, profil) +stub_warning (profil) +#include <stub-tag.h> diff --git a/sysdeps/generic/ptrace.c b/sysdeps/generic/ptrace.c new file mode 100644 index 0000000000..5ab62bccef --- /dev/null +++ b/sysdeps/generic/ptrace.c @@ -0,0 +1,103 @@ +/* Copyright (C) 1991, 92, 93, 95, 96, 97 Free Software Foundation, Inc. + This file is part of the 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 <errno.h> +#include <sys/ptrace.h> +#include <sys/types.h> +#include <stdarg.h> + +/* Perform process tracing functions. REQUEST is one of the values + in <sys/ptrace.h>, 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 PID. */ +int +ptrace (request) + enum __ptrace_request request; +{ + pid_t pid; + void *addr; + void *addr2; + int data; + va_list ap; + + switch (request) + { + case PTRACE_TRACEME: + case PTRACE_CONT: + case PTRACE_KILL: + case PTRACE_SINGLESTEP: + case PTRACE_ATTACH: + case PTRACE_DETACH: + break; + + case PTRACE_PEEKTEXT: + case PTRACE_PEEKDATA: + case PTRACE_PEEKUSER: + case PTRACE_GETREGS: + case PTRACE_SETREGS: +#ifdef PTRACE_GETFPREGS + case PTRACE_GETFPGEGS: +#endif + case PTRACE_SETFPREGS: + case PTRACE_GETFPAREGS: + case PTRACE_SETFPAREGS: + va_start(ap, request); + pid = va_arg(ap, pid_t); + addr = va_arg(ap, void *); + va_end(ap); + break; + + case PTRACE_POKETEXT: + case PTRACE_POKEDATA: + case PTRACE_POKEUSER: + va_start(ap, request); + pid = va_arg(ap, pid_t); + addr = va_arg(ap, void *); + data = va_arg(ap, int); + va_end(ap); + break; + + case PTRACE_READDATA: + case PTRACE_WRITEDATA: + case PTRACE_READTEXT: + case PTRACE_WRITETEXT: + va_start(ap, request); + pid = va_arg(ap, pid_t); + addr = va_arg(ap, void *); + data = va_arg(ap, int); + addr2 = va_arg(ap, void *); + va_end(ap); + break; + + default: + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} + + +stub_warning (ptrace) +#include <stub-tag.h> diff --git a/sysdeps/generic/pwrite.c b/sysdeps/generic/pwrite.c new file mode 100644 index 0000000000..48a1dc6089 --- /dev/null +++ b/sysdeps/generic/pwrite.c @@ -0,0 +1,44 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <unistd.h> + +/* Write NBYTES of BUF to FD at given position OFFSET without changing + the file position. Return the number written, or -1. */ +ssize_t +pwrite (int fd, const void *buf, size_t nbytes, off_t offset) +{ + if (nbytes == 0) + return 0; + if (fd < 0) + { + __set_errno (EBADF); + return -1; + } + if (buf == NULL || offset < 0) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} +stub_warning (pwrite) +#include <stub-tag.h> diff --git a/sysdeps/generic/pwrite64.c b/sysdeps/generic/pwrite64.c new file mode 100644 index 0000000000..df229f877f --- /dev/null +++ b/sysdeps/generic/pwrite64.c @@ -0,0 +1,44 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <unistd.h> + +/* Write NBYTES of BUF to FD at given position OFFSET without changing + the file position. Return the number written, or -1. */ +ssize_t +pwrite64 (int fd, const void *buf, size_t nbytes, off64_t offset) +{ + if (nbytes == 0) + return 0; + if (fd < 0) + { + __set_errno (EBADF); + return -1; + } + if (buf == NULL || offset < 0) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} +stub_warning (pwrite64) +#include <stub-tag.h> diff --git a/sysdeps/generic/raise.c b/sysdeps/generic/raise.c new file mode 100644 index 0000000000..9b698fd984 --- /dev/null +++ b/sysdeps/generic/raise.c @@ -0,0 +1,35 @@ +/* Copyright (C) 1991, 1995, 1996 Free Software Foundation, Inc. + This file is part of the 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 <signal.h> +#include <errno.h> + +/* Raise the signal SIG. */ +int +raise (sig) + int sig; +{ + __set_errno (ENOSYS); + return -1; +} + +weak_alias (raise, gsignal) + +stub_warning (raise) +stub_warning (gsignal) +#include <stub-tag.h> diff --git a/sysdeps/generic/read.c b/sysdeps/generic/read.c new file mode 100644 index 0000000000..57015150fa --- /dev/null +++ b/sysdeps/generic/read.c @@ -0,0 +1,47 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <unistd.h> +#include <stddef.h> + +/* Read NBYTES into BUF from FD. Return the number read or -1. */ +ssize_t +__libc_read (int fd, void *buf, size_t nbytes) +{ + if (nbytes == 0) + return 0; + if (fd < 0) + { + __set_errno (EBADF); + return -1; + } + if (buf == NULL) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} +stub_warning (read) + +weak_alias (__libc_read, __read) +weak_alias (__libc_read, read) +#include <stub-tag.h> diff --git a/sysdeps/generic/readdir.c b/sysdeps/generic/readdir.c new file mode 100644 index 0000000000..94e837f2d3 --- /dev/null +++ b/sysdeps/generic/readdir.c @@ -0,0 +1,33 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <stddef.h> +#include <dirent.h> + +/* Read a directory entry from DIRP. */ +struct dirent * +__readdir (DIR *dirp) +{ + __set_errno (ENOSYS); + return NULL; +} +weak_alias (__readdir, readdir) + +stub_warning (readdir) +#include <stub-tag.h> diff --git a/sysdeps/generic/readdir64.c b/sysdeps/generic/readdir64.c new file mode 100644 index 0000000000..ce84340c8e --- /dev/null +++ b/sysdeps/generic/readdir64.c @@ -0,0 +1,31 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <stddef.h> +#include <dirent.h> + +/* Read a directory entry from DIRP. */ +struct dirent64 * +readdir64 (DIR *dirp) +{ + __set_errno (ENOSYS); + return NULL; +} +stub_warning (readdir64) +#include <stub-tag.h> diff --git a/sysdeps/generic/readdir64_r.c b/sysdeps/generic/readdir64_r.c new file mode 100644 index 0000000000..787bdcee9f --- /dev/null +++ b/sysdeps/generic/readdir64_r.c @@ -0,0 +1,33 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <stddef.h> +#include <dirent.h> + +/* Read a directory entry from DIRP, store result in ENTRY and return + pointer to result in *RESULT. */ +int +readdir64_r (DIR *dirp, struct dirent64 *entry, struct dirent64 **result) +{ + __set_errno (ENOSYS); + *result = NULL; + return -1; +} +stub_warning (readdir64_r) +#include <stub-tag.h> diff --git a/sysdeps/generic/readdir_r.c b/sysdeps/generic/readdir_r.c new file mode 100644 index 0000000000..ae14d18160 --- /dev/null +++ b/sysdeps/generic/readdir_r.c @@ -0,0 +1,35 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <stddef.h> +#include <dirent.h> + +/* Read a directory entry from DIRP, store result in ENTRY and return + pointer to result in *RESULT. */ +int +__readdir_r (DIR *dirp, struct dirent *entry, struct dirent **result) +{ + __set_errno (ENOSYS); + *result = NULL; + return -1; +} +weak_alias (__readdir_r, readdir_r) + +stub_warning (readdir_r) +#include <stub-tag.h> diff --git a/sysdeps/generic/readlink.c b/sysdeps/generic/readlink.c new file mode 100644 index 0000000000..90d9beba60 --- /dev/null +++ b/sysdeps/generic/readlink.c @@ -0,0 +1,37 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <unistd.h> + +/* Read the contents of the symbolic link PATH into no more than + LEN bytes of BUF. The contents are not null-terminated. + Returns the number of characters read, or -1 for errors. */ +int +__readlink (path, buf, len) + const char *path; + char *buf; + size_t len; +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (readlink) + +weak_alias (__readlink, readlink) +#include <stub-tag.h> diff --git a/sysdeps/generic/readv.c b/sysdeps/generic/readv.c new file mode 100644 index 0000000000..b210d53552 --- /dev/null +++ b/sysdeps/generic/readv.c @@ -0,0 +1,40 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <unistd.h> +#include <sys/uio.h> + +/* Read data from file descriptor FD, and put the result in the + buffers described by VECTOR, which is a vector of COUNT `struct iovec's. + The buffers are filled in the order specified. + Operates just like `read' (see <unistd.h>) except that data are + put in VECTOR instead of a contiguous buffer. */ +int +__readv (fd, vector, count) + int fd; + const struct iovec *vector; + int count; +{ + __set_errno (ENOSYS); + return -1; +} +weak_alias (__readv, readv) + +stub_warning (readv) +#include <stub-tag.h> diff --git a/sysdeps/generic/reboot.c b/sysdeps/generic/reboot.c new file mode 100644 index 0000000000..c1bce46738 --- /dev/null +++ b/sysdeps/generic/reboot.c @@ -0,0 +1,34 @@ +/* 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. */ + +#include <errno.h> +#include <unistd.h> +#include <sys/reboot.h> + +/* Reboot the system. */ +int +reboot (howto) + int howto; +{ + __set_errno (ENOSYS); + return -1; +} + + +stub_warning (reboot) +#include <stub-tag.h> diff --git a/sysdeps/generic/recv.c b/sysdeps/generic/recv.c new file mode 100644 index 0000000000..e59e341b21 --- /dev/null +++ b/sysdeps/generic/recv.c @@ -0,0 +1,37 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <sys/socket.h> + +/* Read N bytes into BUF from socket FD. + Returns the number read or -1 for errors. */ +int +recv (fd, buf, n, flags) + int fd; + void *buf; + size_t n; + int flags; +{ + __set_errno (ENOSYS); + return -1; +} + + +stub_warning (recv) +#include <stub-tag.h> diff --git a/sysdeps/generic/recvfrom.c b/sysdeps/generic/recvfrom.c new file mode 100644 index 0000000000..35b281a2a1 --- /dev/null +++ b/sysdeps/generic/recvfrom.c @@ -0,0 +1,39 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <sys/socket.h> + +/* Read N bytes into BUF through socket FD from peer + at address ADDR (which is ADDR_LEN bytes long). + Returns the number read or -1 for errors. */ +int +recvfrom (fd, buf, n, flags, addr, addr_len) + int fd; + void *buf; + size_t n; + int flags; + __SOCKADDR_ARG addr; + socklen_t *addr_len; +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (recvfrom) +#include <stub-tag.h> diff --git a/sysdeps/generic/recvmsg.c b/sysdeps/generic/recvmsg.c new file mode 100644 index 0000000000..625e85aae9 --- /dev/null +++ b/sysdeps/generic/recvmsg.c @@ -0,0 +1,35 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <sys/socket.h> + +/* Receive a message as described by MESSAGE from socket FD. + Returns the number of bytes read or -1 for errors. */ +int +recvmsg (fd, message, flags) + int fd; + struct msghdr *message; + int flags; +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (recvmsg) +#include <stub-tag.h> diff --git a/sysdeps/generic/remove.c b/sysdeps/generic/remove.c new file mode 100644 index 0000000000..ae9251d7f6 --- /dev/null +++ b/sysdeps/generic/remove.c @@ -0,0 +1,32 @@ +/* ANSI C `remove' function to delete a file or directory. Stub version. + 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. */ + +#include <errno.h> +#include <stdio.h> + +int +remove (file) + const char *file; +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (remove) +#include <stub-tag.h> diff --git a/sysdeps/generic/rename.c b/sysdeps/generic/rename.c new file mode 100644 index 0000000000..887a046122 --- /dev/null +++ b/sysdeps/generic/rename.c @@ -0,0 +1,41 @@ +/* Copyright (C) 1991, 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. */ + +#include <stdio.h> +#include <errno.h> + + +/* Rename the file OLD to NEW. */ +int +rename (old, new) + const char *old; + const char *new; +{ + if (old == NULL || new == NULL) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} + + +stub_warning (rename) +#include <stub-tag.h> diff --git a/sysdeps/generic/revoke.c b/sysdeps/generic/revoke.c new file mode 100644 index 0000000000..5c7a608089 --- /dev/null +++ b/sysdeps/generic/revoke.c @@ -0,0 +1,31 @@ +/* Revoke the access of all descriptors currently open on a file. + 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. */ + +#include <unistd.h> +#include <errno.h> + +int +revoke (file) + const char *file; +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (revoke) +#include <stub-tag.h> diff --git a/sysdeps/generic/rewinddir.c b/sysdeps/generic/rewinddir.c new file mode 100644 index 0000000000..bea002135c --- /dev/null +++ b/sysdeps/generic/rewinddir.c @@ -0,0 +1,35 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <stddef.h> +#include <dirent.h> + + +/* Rewind DIRP to the beginning of the directory. */ +void +rewinddir (dirp) + DIR *dirp; +{ + __set_errno (ENOSYS); + /* No way to indicate failure. */ +} + + +stub_warning (rewinddir) +#include <stub-tag.h> diff --git a/sysdeps/generic/rmdir.c b/sysdeps/generic/rmdir.c new file mode 100644 index 0000000000..0ea404f860 --- /dev/null +++ b/sysdeps/generic/rmdir.c @@ -0,0 +1,41 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <stddef.h> +#include <unistd.h> + + +/* Remove the directory PATH. */ +int +__rmdir (path) + const char *path; +{ + if (path == NULL) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} +stub_warning (rmdir) + +weak_alias (__rmdir, rmdir) +#include <stub-tag.h> diff --git a/sysdeps/generic/s_atanl.c b/sysdeps/generic/s_atanl.c new file mode 100644 index 0000000000..d9a7eb6f8f --- /dev/null +++ b/sysdeps/generic/s_atanl.c @@ -0,0 +1,15 @@ +#include <math.h> +#include <stdio.h> +#include <errno.h> + +long double +__atanl (long double x) +{ + fputs ("__atanl not implemented\n", stderr); + __set_errno (ENOSYS); + return 0.0; +} +weak_alias (__atanl, atanl) + +stub_warning (atanl) +#include <stub-tag.h> diff --git a/sysdeps/generic/s_erfl.c b/sysdeps/generic/s_erfl.c new file mode 100644 index 0000000000..f329d58809 --- /dev/null +++ b/sysdeps/generic/s_erfl.c @@ -0,0 +1,26 @@ +#include <math.h> +#include <stdio.h> +#include <errno.h> + +long double +__erfl (long double x) +{ + fputs ("__erfl not implemented\n", stderr); + __set_errno (ENOSYS); + return 0.0; +} +weak_alias (__erfl, erfl) + +stub_warning (erfl) + +long double +__erfcl (long double x) +{ + fputs ("__erfcl not implemented\n", stderr); + __set_errno (ENOSYS); + return 0.0; +} +weak_alias (__erfcl, erfcl) + +stub_warning (erfcl) +#include <stub-tag.h> diff --git a/sysdeps/generic/s_exp2.c b/sysdeps/generic/s_exp2.c new file mode 100644 index 0000000000..4e25d38130 --- /dev/null +++ b/sysdeps/generic/s_exp2.c @@ -0,0 +1,15 @@ +#include <math.h> +#include <stdio.h> +#include <errno.h> + +double +__exp2 (double x) +{ + fputs ("__exp2 not implemented\n", stderr); + __set_errno (ENOSYS); + return 0.0; +} +weak_alias (__exp2, exp2) + +stub_warning (exp2) +#include <stub-tag.h> diff --git a/sysdeps/generic/s_exp2f.c b/sysdeps/generic/s_exp2f.c new file mode 100644 index 0000000000..7928a4ce3d --- /dev/null +++ b/sysdeps/generic/s_exp2f.c @@ -0,0 +1,15 @@ +#include <math.h> +#include <stdio.h> +#include <errno.h> + +float +__exp2f (float x) +{ + fputs ("__exp2f not implemented\n", stderr); + __set_errno (ENOSYS); + return 0.0; +} +weak_alias (__exp2f, exp2f) + +stub_warning (exp2f) +#include <stub-tag.h> diff --git a/sysdeps/generic/s_exp2l.c b/sysdeps/generic/s_exp2l.c new file mode 100644 index 0000000000..46ecc4eae3 --- /dev/null +++ b/sysdeps/generic/s_exp2l.c @@ -0,0 +1,15 @@ +#include <math.h> +#include <stdio.h> +#include <errno.h> + +long double +__exp2l (long double x) +{ + fputs ("__exp2l not implemented\n", stderr); + __set_errno (ENOSYS); + return 0.0; +} +weak_alias (__exp2l, exp2l) + +stub_warning (exp2l) +#include <stub-tag.h> diff --git a/sysdeps/generic/s_expm1l.c b/sysdeps/generic/s_expm1l.c new file mode 100644 index 0000000000..d49c68a1f8 --- /dev/null +++ b/sysdeps/generic/s_expm1l.c @@ -0,0 +1,15 @@ +#include <math.h> +#include <stdio.h> +#include <errno.h> + +long double +__expm1l (long double x) +{ + fputs ("__expm1l not implemented\n", stderr); + __set_errno (ENOSYS); + return 0.0; +} +weak_alias (__expm1l, expm1l) + +stub_warning (expm1l) +#include <stub-tag.h> diff --git a/sysdeps/generic/s_log1pl.c b/sysdeps/generic/s_log1pl.c new file mode 100644 index 0000000000..e5db9078bf --- /dev/null +++ b/sysdeps/generic/s_log1pl.c @@ -0,0 +1,15 @@ +#include <math.h> +#include <stdio.h> +#include <errno.h> + +long double +__log1pl (long double x) +{ + fputs ("__log1pl not implemented\n", stderr); + __set_errno (ENOSYS); + return 0.0; +} +weak_alias (__log1pl, log1pl) + +stub_warning (log1pl) +#include <stub-tag.h> diff --git a/sysdeps/generic/s_log2l.c b/sysdeps/generic/s_log2l.c new file mode 100644 index 0000000000..835cd4fed2 --- /dev/null +++ b/sysdeps/generic/s_log2l.c @@ -0,0 +1,15 @@ +#include <math.h> +#include <stdio.h> +#include <errno.h> + +long double +__log2l (long double x) +{ + fputs ("__log2l not implemented\n", stderr); + __set_errno (ENOSYS); + return 0.0; +} +weak_alias (__log2l, log2l) + +stub_warning (log2l) +#include <stub-tag.h> diff --git a/sysdeps/generic/sched_getp.c b/sysdeps/generic/sched_getp.c new file mode 100644 index 0000000000..f599f6459b --- /dev/null +++ b/sysdeps/generic/sched_getp.c @@ -0,0 +1,34 @@ +/* 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. */ + +#include <errno.h> +#include <sys/types.h> +#include <sched.h> + + +/* Retrieve scheduling parameters for a particular process. */ +int +__sched_getparam (pid_t pid, struct sched_param *param) +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (sched_getparam) + +weak_alias (__sched_getparam, sched_getparam) +#include <stub-tag.h> diff --git a/sysdeps/generic/sched_gets.c b/sysdeps/generic/sched_gets.c new file mode 100644 index 0000000000..a10755fee5 --- /dev/null +++ b/sysdeps/generic/sched_gets.c @@ -0,0 +1,34 @@ +/* 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. */ + +#include <errno.h> +#include <sched.h> +#include <sys/types.h> + + +/* Retrieve scheduling algorithm for a particular purpose. */ +int +__sched_getscheduler (pid_t pid) +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (sched_getscheduler) + +weak_alias (__sched_getscheduler, sched_getscheduler) +#include <stub-tag.h> diff --git a/sysdeps/generic/sched_primax.c b/sysdeps/generic/sched_primax.c new file mode 100644 index 0000000000..e7823699a3 --- /dev/null +++ b/sysdeps/generic/sched_primax.c @@ -0,0 +1,33 @@ +/* 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. */ + +#include <errno.h> +#include <sched.h> + + +/* Get maximum priority value for a scheduler. */ +int +__sched_get_priority_max (int algorithm) +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (sched_get_priority_max) + +weak_alias (__sched_get_priority_max, sched_get_priority_max) +#include <stub-tag.h> diff --git a/sysdeps/generic/sched_primin.c b/sysdeps/generic/sched_primin.c new file mode 100644 index 0000000000..3d1aa13848 --- /dev/null +++ b/sysdeps/generic/sched_primin.c @@ -0,0 +1,33 @@ +/* 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. */ + +#include <errno.h> +#include <sched.h> + + +/* Get minimum priority value for a scheduler. */ +int +__sched_get_priority_min (int algorithm) +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (sched_get_priority_min) + +weak_alias (__sched_get_priority_min, sched_get_priority_min) +#include <stub-tag.h> diff --git a/sysdeps/generic/sched_rr_gi.c b/sysdeps/generic/sched_rr_gi.c new file mode 100644 index 0000000000..9fac72b349 --- /dev/null +++ b/sysdeps/generic/sched_rr_gi.c @@ -0,0 +1,34 @@ +/* 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. */ + +#include <errno.h> +#include <sched.h> +#include <sys/types.h> + + +/* Get the SCHED_RR interval for the named process. */ +int +__sched_rr_get_interval (pid_t pid, struct timespec *t) +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (sched_rr_get_interval) + +weak_alias (__sched_rr_get_interval, sched_rr_get_interval) +#include <stub-tag.h> diff --git a/sysdeps/generic/sched_setp.c b/sysdeps/generic/sched_setp.c new file mode 100644 index 0000000000..fea7c2ec36 --- /dev/null +++ b/sysdeps/generic/sched_setp.c @@ -0,0 +1,34 @@ +/* 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. */ + +#include <errno.h> +#include <sys/types.h> +#include <sched.h> + + +/* Set scheduling parameters for a process. */ +int +__sched_setparam (pid_t pid, const struct sched_param *param) +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (sched_setparam) + +weak_alias (__sched_setparam, sched_setparam) +#include <stub-tag.h> diff --git a/sysdeps/generic/sched_sets.c b/sysdeps/generic/sched_sets.c new file mode 100644 index 0000000000..7de95168e2 --- /dev/null +++ b/sysdeps/generic/sched_sets.c @@ -0,0 +1,34 @@ +/* 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. */ + +#include <errno.h> +#include <sched.h> +#include <sys/types.h> + + +/* Set scheduling algorithm and/or parameters for a process. */ +int +__sched_setscheduler (pid_t pid, int policy, const struct sched_param *param) +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (sched_setscheduler) + +weak_alias (__sched_setscheduler, sched_setscheduler) +#include <stub-tag.h> diff --git a/sysdeps/generic/sched_yield.c b/sysdeps/generic/sched_yield.c new file mode 100644 index 0000000000..76190735f7 --- /dev/null +++ b/sysdeps/generic/sched_yield.c @@ -0,0 +1,33 @@ +/* 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. */ + +#include <errno.h> +#include <sched.h> + + +/* Yield the processor. */ +int +__sched_yield (void) +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (sched_yield) + +weak_alias (__sched_yield, sched_yield) +#include <stub-tag.h> diff --git a/sysdeps/generic/seekdir.c b/sysdeps/generic/seekdir.c new file mode 100644 index 0000000000..c12d3af3c0 --- /dev/null +++ b/sysdeps/generic/seekdir.c @@ -0,0 +1,41 @@ +/* Copyright (C) 1991, 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. */ + +#include <sys/types.h> +#include <errno.h> +#include <stddef.h> +#include <dirent.h> + +/* Seek to position POS in DIRP. */ +void +seekdir (dirp, pos) + DIR *dirp; + off_t pos; +{ + if (dirp == NULL) + { + __set_errno (EINVAL); + return; + } + + __set_errno (ENOSYS); +} + + +stub_warning (seekdir) +#include <stub-tag.h> diff --git a/sysdeps/generic/select.c b/sysdeps/generic/select.c new file mode 100644 index 0000000000..99fe6d7e2e --- /dev/null +++ b/sysdeps/generic/select.c @@ -0,0 +1,42 @@ +/* Copyright (C) 1991, 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. */ + +#include <sys/time.h> +#include <sys/types.h> +#include <errno.h> + +/* Check the first NFDS descriptors each in READFDS (if not NULL) for read + readiness, in WRITEFDS (if not NULL) for write readiness, and in EXCEPTFDS + (if not NULL) for exceptional conditions. If TIMEOUT is not NULL, time out + after waiting the interval specified therein. Returns the number of ready + descriptors, or -1 for errors. */ +int +__select (nfds, readfds, writefds, exceptfds, timeout) + int nfds; + fd_set *readfds; + fd_set *writefds; + fd_set *exceptfds; + struct timeval *timeout; +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (select) + +weak_alias (__select, select) +#include <stub-tag.h> diff --git a/sysdeps/generic/semctl.c b/sysdeps/generic/semctl.c new file mode 100644 index 0000000000..297c26bb8a --- /dev/null +++ b/sysdeps/generic/semctl.c @@ -0,0 +1,38 @@ +/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995. + + 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/sem.h> +#include <errno.h> + +/* Return identifier for array of NSEMS semaphores associated with + KEY. */ + +int +semctl (semid, semnum, cmd, arg) + int semid; + int semnum; + int cmd; + union semun arg; +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (semctl) +#include <stub-tag.h> diff --git a/sysdeps/generic/semget.c b/sysdeps/generic/semget.c new file mode 100644 index 0000000000..2e21bc9ac0 --- /dev/null +++ b/sysdeps/generic/semget.c @@ -0,0 +1,37 @@ +/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995. + + 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/sem.h> +#include <errno.h> + +/* Return identifier for array of NSEMS semaphores associated with + KEY. */ + +int +semget (key, nsems, semflg) + key_t key; + int nsems; + int semflg; +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (semget) +#include <stub-tag.h> diff --git a/sysdeps/generic/semop.c b/sysdeps/generic/semop.c new file mode 100644 index 0000000000..64f5951451 --- /dev/null +++ b/sysdeps/generic/semop.c @@ -0,0 +1,36 @@ +/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995. + + 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/sem.h> +#include <errno.h> + +/* Perform user-defined atomical operation of array of semaphores. */ + +int +semop (semid, sops, nsops) + int semid; + struct sembuf *sops; + unsigned int nsops; +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (semop) +#include <stub-tag.h> diff --git a/sysdeps/generic/send.c b/sysdeps/generic/send.c new file mode 100644 index 0000000000..0ef82948ea --- /dev/null +++ b/sysdeps/generic/send.c @@ -0,0 +1,37 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <sys/socket.h> + +/* Send N bytes of BUF to socket FD. Returns the number sent or -1. */ +int +__send (fd, buf, n, flags) + int fd; + __const __ptr_t buf; + size_t n; + int flags; +{ + __set_errno (ENOSYS); + return -1; +} +weak_alias (__send, send) + + +stub_warning (send) +#include <stub-tag.h> diff --git a/sysdeps/generic/sendmsg.c b/sysdeps/generic/sendmsg.c new file mode 100644 index 0000000000..20d8bd6f67 --- /dev/null +++ b/sysdeps/generic/sendmsg.c @@ -0,0 +1,35 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <sys/socket.h> + +/* Send a message described MESSAGE on socket FD. + Returns the number of bytes sent, or -1 for errors. */ +int +sendmsg (fd, message, flags) + int fd; + const struct msghdr *message; + int flags; +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (sendmsg) +#include <stub-tag.h> diff --git a/sysdeps/generic/sendto.c b/sysdeps/generic/sendto.c new file mode 100644 index 0000000000..f9b3c87f68 --- /dev/null +++ b/sysdeps/generic/sendto.c @@ -0,0 +1,38 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <sys/socket.h> + +/* Send N bytes of BUF on socket FD to peer at address ADDR (which is + ADDR_LEN bytes long). Returns the number sent, or -1 for errors. */ +int +sendto (fd, buf, n, flags, addr, addr_len) + int fd; + __const __ptr_t buf; + size_t n; + int flags; + __CONST_SOCKADDR_ARG addr; + socklen_t addr_len; +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (sendto) +#include <stub-tag.h> diff --git a/sysdeps/generic/setdomain.c b/sysdeps/generic/setdomain.c new file mode 100644 index 0000000000..7308d5ddb4 --- /dev/null +++ b/sysdeps/generic/setdomain.c @@ -0,0 +1,34 @@ +/* Copyright (C) 1994, 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. */ + +#include <errno.h> +#include <unistd.h> + +/* Set the name of the current YP domain to NAME, which is LEN bytes long. + This call is restricted to the super-user. */ +int +setdomainname (name, len) + const char *name; + size_t len; +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (setdomainname) +#include <stub-tag.h> diff --git a/sysdeps/generic/setegid.c b/sysdeps/generic/setegid.c new file mode 100644 index 0000000000..d34d222089 --- /dev/null +++ b/sysdeps/generic/setegid.c @@ -0,0 +1,33 @@ +/* Copyright (C) 1992, 1994, 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. */ + +#include <errno.h> +#include <unistd.h> + +/* Set the effective group ID of the calling process to GID. */ +int +setegid (gid) + __gid_t gid; +{ + __set_errno (ENOSYS); + return -1; +} + + +stub_warning (setegid) +#include <stub-tag.h> diff --git a/sysdeps/generic/seteuid.c b/sysdeps/generic/seteuid.c new file mode 100644 index 0000000000..9233828b97 --- /dev/null +++ b/sysdeps/generic/seteuid.c @@ -0,0 +1,33 @@ +/* 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. */ + +#include <errno.h> +#include <unistd.h> + +/* Set the effective user ID of the calling process to UID. */ +int +seteuid (uid) + __uid_t uid; +{ + __set_errno (ENOSYS); + return -1; +} + + +stub_warning (seteuid) +#include <stub-tag.h> diff --git a/sysdeps/generic/setfpucw.c b/sysdeps/generic/setfpucw.c index f7f61f6fcf..ba91a76715 100644 --- a/sysdeps/generic/setfpucw.c +++ b/sysdeps/generic/setfpucw.c @@ -17,7 +17,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "fpu_control.h" +#include <fpu_control.h> void __setfpucw (fpu_control_t set) diff --git a/sysdeps/generic/setgid.c b/sysdeps/generic/setgid.c new file mode 100644 index 0000000000..7b71ce77c2 --- /dev/null +++ b/sysdeps/generic/setgid.c @@ -0,0 +1,37 @@ +/* Copyright (C) 1991, 1993, 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. */ + +#include <errno.h> +#include <unistd.h> +#include <sys/types.h> + +/* Set the group ID of the calling process to GID. + If the calling process is the super-user, the real + and effective group IDs, and the saved set-group-ID to GID; + if not, the effective group ID is set to GID. */ +int +__setgid (gid) + gid_t gid; +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (setgid) + +weak_alias (__setgid, setgid) +#include <stub-tag.h> diff --git a/sysdeps/generic/setgroups.c b/sysdeps/generic/setgroups.c new file mode 100644 index 0000000000..e1c2b3e04a --- /dev/null +++ b/sysdeps/generic/setgroups.c @@ -0,0 +1,35 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <sys/types.h> +#include <grp.h> + +/* Set the group set for the current user to GROUPS (N of them). */ +int +setgroups (n, groups) + size_t n; + const gid_t *groups; +{ + __set_errno (ENOSYS); + return -1; +} + + +stub_warning (setgroups) +#include <stub-tag.h> diff --git a/sysdeps/generic/sethostid.c b/sysdeps/generic/sethostid.c new file mode 100644 index 0000000000..9bc808f15a --- /dev/null +++ b/sysdeps/generic/sethostid.c @@ -0,0 +1,34 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <unistd.h> + +/* Set the current machine's Internet number to ID. + This call is restricted to the super-user. */ +int +sethostid (id) + long int id; +{ + __set_errno (ENOSYS); + return -1; +} + + +stub_warning (sethostid) +#include <stub-tag.h> diff --git a/sysdeps/generic/sethostname.c b/sysdeps/generic/sethostname.c new file mode 100644 index 0000000000..1eba398942 --- /dev/null +++ b/sysdeps/generic/sethostname.c @@ -0,0 +1,35 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <unistd.h> + +/* Set the name of the current host to NAME, which is LEN bytes long. + This call is restricted to the super-user. */ +int +sethostname (name, len) + const char *name; + size_t len; +{ + __set_errno (ENOSYS); + return -1; +} + + +stub_warning (sethostname) +#include <stub-tag.h> diff --git a/sysdeps/generic/setitimer.c b/sysdeps/generic/setitimer.c new file mode 100644 index 0000000000..d85311359f --- /dev/null +++ b/sysdeps/generic/setitimer.c @@ -0,0 +1,44 @@ +/* Copyright (C) 1991, 1994, 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. */ + +#include <stddef.h> +#include <errno.h> +#include <sys/time.h> + +/* Set the timer WHICH to *NEW. If OLD is not NULL, + set *OLD to the old value of timer WHICH. + Returns 0 on success, -1 on errors. */ +int +__setitimer (which, new, old) + enum __itimer_which which; + const struct itimerval *new; + struct itimerval *old; +{ + if (new == NULL) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} +stub_warning (setitimer) + +weak_alias (__setitimer, setitimer) +#include <stub-tag.h> diff --git a/sysdeps/generic/setjmp.c b/sysdeps/generic/setjmp.c new file mode 100644 index 0000000000..8b1dfa6a83 --- /dev/null +++ b/sysdeps/generic/setjmp.c @@ -0,0 +1,37 @@ +/* Copyright (C) 1991, 1994, 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. */ + +#include <errno.h> +#include <setjmp.h> + + +/* Save the current program position in ENV and return 0. */ +int +__sigsetjmp (jmp_buf env, int savemask) +{ + /* Save the signal mask if requested. */ + __sigjmp_save (env, savemask); + + __set_errno (ENOSYS); + /* No way to signal failure. */ + return 0; +} + + +stub_warning (__sigsetjmp) +#include <stub-tag.h> diff --git a/sysdeps/generic/setlogin.c b/sysdeps/generic/setlogin.c new file mode 100644 index 0000000000..5f2b5d8e58 --- /dev/null +++ b/sysdeps/generic/setlogin.c @@ -0,0 +1,32 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <unistd.h> + +/* Set the login name returned by `getlogin'. */ +int +setlogin (name) + const char *name; +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (setlogin) +#include <stub-tag.h> diff --git a/sysdeps/generic/setpgid.c b/sysdeps/generic/setpgid.c new file mode 100644 index 0000000000..38329898e8 --- /dev/null +++ b/sysdeps/generic/setpgid.c @@ -0,0 +1,36 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <unistd.h> + +/* Set the process group ID of the process matching PID to PGID. + If PID is zero, the current process's process group ID is set. + If PGID is zero, the process ID of the process is used. */ +int +__setpgid (pid, pgid) + int pid; + int pgid; +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (setpgid) + +weak_alias (__setpgid, setpgid) +#include <stub-tag.h> diff --git a/sysdeps/generic/setpriority.c b/sysdeps/generic/setpriority.c new file mode 100644 index 0000000000..997bea82a6 --- /dev/null +++ b/sysdeps/generic/setpriority.c @@ -0,0 +1,35 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <sys/resource.h> + +/* Set the priority of all processes specified by WHICH and WHO + to PRIO. Returns 0 on success, -1 on errors. */ +int +setpriority (which, who, prio) + enum __priority_which which; + int who; + int prio; +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (setpriority) +#include <stub-tag.h> diff --git a/sysdeps/generic/setregid.c b/sysdeps/generic/setregid.c new file mode 100644 index 0000000000..85708fa50c --- /dev/null +++ b/sysdeps/generic/setregid.c @@ -0,0 +1,36 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <unistd.h> +#include <sys/types.h> + +/* Set the real group ID of the calling process to RGID, + and the effective group ID of the calling process to EGID. */ +int +__setregid (effective_gid, real_gid) + gid_t effective_gid; + gid_t real_gid; +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (setregid) + +weak_alias (__setregid, setregid) +#include <stub-tag.h> diff --git a/sysdeps/generic/setreuid.c b/sysdeps/generic/setreuid.c new file mode 100644 index 0000000000..0e6017714d --- /dev/null +++ b/sysdeps/generic/setreuid.c @@ -0,0 +1,36 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <unistd.h> +#include <sys/types.h> + +/* Set the real user ID of the calling process to RUID, + and the effective user ID of the calling process to EUID. */ +int +__setreuid (effective_uid, real_uid) + uid_t effective_uid; + uid_t real_uid; +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (setreuid) + +weak_alias (__setreuid, setreuid) +#include <stub-tag.h> diff --git a/sysdeps/generic/setrlimit.c b/sysdeps/generic/setrlimit.c new file mode 100644 index 0000000000..b969ea19f7 --- /dev/null +++ b/sysdeps/generic/setrlimit.c @@ -0,0 +1,36 @@ +/* Copyright (C) 1991, 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. */ + +#include <sys/resource.h> +#include <errno.h> + +/* Set the soft and hard limits for RESOURCE to *RLIMITS. + Only the super-user can increase hard limits. + Return 0 if successful, -1 if not (and sets errno). */ +int +setrlimit (resource, rlimits) + enum __rlimit_resource resource; + struct rlimit *rlimits; +{ + __set_errno (ENOSYS); + return -1; +} + + +stub_warning (setrlimit) +#include <stub-tag.h> diff --git a/sysdeps/generic/setrlimit64.c b/sysdeps/generic/setrlimit64.c new file mode 100644 index 0000000000..3d1a12279f --- /dev/null +++ b/sysdeps/generic/setrlimit64.c @@ -0,0 +1,35 @@ +/* Copyright (C) 1991, 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. */ + +#include <sys/resource.h> +#include <errno.h> + +/* Set the soft and hard limits for RESOURCE to *RLIMITS. + Only the super-user can increase hard limits. + Return 0 if successful, -1 if not (and sets errno). */ +int +setrlimit64 (resource, rlimits) + enum __rlimit_resource resource; + struct rlimit64 *rlimits; +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (setrlimit64) +#include <stub-tag.h> diff --git a/sysdeps/generic/setsid.c b/sysdeps/generic/setsid.c new file mode 100644 index 0000000000..e5cb58616e --- /dev/null +++ b/sysdeps/generic/setsid.c @@ -0,0 +1,35 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <unistd.h> + + +/* Create a new session with the calling process as its leader. + The process group IDs of the session and the calling process + are set to the process ID of the calling process, which is returned. */ +int +__setsid () +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (setsid) + +weak_alias (__setsid, setsid) +#include <stub-tag.h> diff --git a/sysdeps/generic/setsockopt.c b/sysdeps/generic/setsockopt.c new file mode 100644 index 0000000000..ba876438e5 --- /dev/null +++ b/sysdeps/generic/setsockopt.c @@ -0,0 +1,38 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <sys/socket.h> + +/* Set socket FD's option OPTNAME at protocol level LEVEL + to *OPTVAL (which is OPTLEN bytes long). + Returns 0 on success, -1 for errors. */ +int +setsockopt (fd, level, optname, optval, optlen) + int fd; + int level; + int optname; + void *optval; + socklen_t optlen; +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (setsockopt) +#include <stub-tag.h> diff --git a/sysdeps/generic/settimeofday.c b/sysdeps/generic/settimeofday.c new file mode 100644 index 0000000000..15bfbbc9b7 --- /dev/null +++ b/sysdeps/generic/settimeofday.c @@ -0,0 +1,35 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <sys/time.h> + +/* Set the current time of day and timezone information. + This call is restricted to the super-user. */ +int +__settimeofday (tv, tz) + const struct timeval *tv; + const struct timezone *tz; +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (settimeofday) + +weak_alias (__settimeofday, settimeofday) +#include <stub-tag.h> diff --git a/sysdeps/generic/setuid.c b/sysdeps/generic/setuid.c new file mode 100644 index 0000000000..eb5383bc3d --- /dev/null +++ b/sysdeps/generic/setuid.c @@ -0,0 +1,37 @@ +/* Copyright (C) 1991, 1993, 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. */ + +#include <errno.h> +#include <unistd.h> +#include <sys/types.h> + +/* Set the user ID of the calling process to UID. + If the calling process is the super-user, the real + and effective user IDs, and the saved set-user-ID to UID; + if not, the effective user ID is set to UID. */ +int +__setuid (uid) + uid_t uid; +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (setuid) + +weak_alias (__setuid, setuid) +#include <stub-tag.h> diff --git a/sysdeps/generic/shmat.c b/sysdeps/generic/shmat.c new file mode 100644 index 0000000000..ce2bf70018 --- /dev/null +++ b/sysdeps/generic/shmat.c @@ -0,0 +1,38 @@ +/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995. + + 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/shm.h> +#include <errno.h> + +/* Attach the shared memory segment associated with SHMID to the data + segment of the calling process. SHMADDR and SHMFLG determine how + and where the segment is attached. */ + +void * +shmat (shmid, shmaddr, shmflg) + int shmid; + const void *shmaddr; + int shmflg; +{ + __set_errno (ENOSYS); + return (void *) -1; +} + +stub_warning (shmat) +#include <stub-tag.h> diff --git a/sysdeps/generic/shmctl.c b/sysdeps/generic/shmctl.c new file mode 100644 index 0000000000..c9d0ee6fef --- /dev/null +++ b/sysdeps/generic/shmctl.c @@ -0,0 +1,36 @@ +/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995. + + 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/shm.h> +#include <errno.h> + +/* Provide operations to control over shared memory segments. */ + +int +shmctl (shmid, cmd, buf) + int shmid; + int cmd; + struct shmid_ds *buf; +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (shmctl) +#include <stub-tag.h> diff --git a/sysdeps/generic/shmdt.c b/sysdeps/generic/shmdt.c new file mode 100644 index 0000000000..9902d70b41 --- /dev/null +++ b/sysdeps/generic/shmdt.c @@ -0,0 +1,35 @@ +/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995. + + 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/shm.h> +#include <errno.h> + +/* Detach shared memory segment starting at address specified by SHMADDR + from the caller's data segment. */ + +int +shmdt (shmaddr) + const void *shmaddr; +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (shmdt) +#include <stub-tag.h> diff --git a/sysdeps/generic/shmget.c b/sysdeps/generic/shmget.c new file mode 100644 index 0000000000..4f8eb63ea0 --- /dev/null +++ b/sysdeps/generic/shmget.c @@ -0,0 +1,37 @@ +/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995. + + 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/shm.h> +#include <errno.h> + +/* Return an identifier for an shared memory segment of at least size SIZE + which is associated with KEY. */ + +int +shmget (key, size, shmflg) + key_t key; + int size; + int shmflg; +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (shmget) +#include <stub-tag.h> diff --git a/sysdeps/generic/shutdown.c b/sysdeps/generic/shutdown.c new file mode 100644 index 0000000000..55556793c0 --- /dev/null +++ b/sysdeps/generic/shutdown.c @@ -0,0 +1,39 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <sys/socket.h> + +/* Shut down all or part of the connection open on socket FD. + HOW determines what to shut down: + 0 = No more receptions; + 1 = No more transmissions; + 2 = No more receptions or transmissions. + Returns 0 on success, -1 for errors. */ +int +shutdown (fd, how) + int fd; + int how; +{ + __set_errno (ENOSYS); + return -1; +} + + +stub_warning (shutdown) +#include <stub-tag.h> diff --git a/sysdeps/generic/sigaction.c b/sysdeps/generic/sigaction.c new file mode 100644 index 0000000000..8efc060931 --- /dev/null +++ b/sysdeps/generic/sigaction.c @@ -0,0 +1,43 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <signal.h> + + +/* If ACT is not NULL, change the action for SIG to *ACT. + If OACT is not NULL, put the old action for SIG in *OACT. */ +int +__sigaction (sig, act, oact) + int sig; + const struct sigaction *act; + struct sigaction *oact; +{ + if (sig <= 0 || sig >= NSIG) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} +stub_warning (sigaction) + +weak_alias (__sigaction, sigaction) +#include <stub-tag.h> diff --git a/sysdeps/generic/sigaltstack.c b/sysdeps/generic/sigaltstack.c new file mode 100644 index 0000000000..b4b4e90b2d --- /dev/null +++ b/sysdeps/generic/sigaltstack.c @@ -0,0 +1,34 @@ +/* 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. */ + +#include <errno.h> +#include <signal.h> + +/* Run signals handlers on the stack specified by SS (if not NULL). + If OSS is not NULL, it is filled in with the old signal stack status. */ +int +sigaltstack (ss, oss) + const struct sigaltstack *ss; + struct sigaltstack *oss; +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (sigaltstack) +#include <stub-tag.h> diff --git a/sysdeps/generic/sigblock.c b/sysdeps/generic/sigblock.c new file mode 100644 index 0000000000..5eabb9dc08 --- /dev/null +++ b/sysdeps/generic/sigblock.c @@ -0,0 +1,33 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <signal.h> + +/* Block signals in MASK, returning the old mask. */ +int +__sigblock (mask) + int mask; +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (sigblock) + +weak_alias (__sigblock, sigblock) +#include <stub-tag.h> diff --git a/sysdeps/generic/sigintr.c b/sysdeps/generic/sigintr.c new file mode 100644 index 0000000000..a9a11e4410 --- /dev/null +++ b/sysdeps/generic/sigintr.c @@ -0,0 +1,35 @@ +/* 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. */ + +#include <errno.h> +#include <signal.h> + +/* If INTERRUPT is nonzero, make signal SIG interrupt system calls + (causing them to fail with EINTR); if INTERRUPT is zero, make system + calls be restarted after signal SIG. */ +int +siginterrupt (sig, interrupt) + int sig; + int interrupt; +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (siginterrupt) +#include <stub-tag.h> diff --git a/sysdeps/generic/siglist.c b/sysdeps/generic/siglist.c new file mode 100644 index 0000000000..ae03b1f73c --- /dev/null +++ b/sysdeps/generic/siglist.c @@ -0,0 +1,42 @@ +/* Copyright (C) 1991, 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 <stddef.h> + +const char *const _sys_siglist[] = + { + "Signal 0", + "Aborted", + "Erroneous arithmetic operation", + "Illegal instruction", + "Interrupt", + "Invalid access to storage", + "Terminated", + "Hangup", + "Quit", + "Broken pipe", + "Killed", + "Alarm clock", + "Stopped (signal)", + "Stopped", + "Continued", + "Child exited", + "Stopped (tty input)", + "Stopped (tty output)", + NULL + }; diff --git a/sysdeps/generic/signal.c b/sysdeps/generic/signal.c new file mode 100644 index 0000000000..1ad3f1045e --- /dev/null +++ b/sysdeps/generic/signal.c @@ -0,0 +1,38 @@ +/* Copyright (C) 1991, 1995, 1996 Free Software Foundation, Inc. + This file is part of the 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 <errno.h> +#include <signal.h> + + +/* Set the handler for the signal SIG to HANDLER, + returning the old handler, or SIG_ERR on error. */ +__sighandler_t +signal (sig, handler) + int sig; + __sighandler_t handler; +{ + __set_errno (ENOSYS); + return SIG_ERR; +} + +weak_alias (signal, ssignal) + +stub_warning (signal) +stub_warning (ssignal) +#include <stub-tag.h> diff --git a/sysdeps/generic/sigpause.c b/sysdeps/generic/sigpause.c new file mode 100644 index 0000000000..25dfff1ea5 --- /dev/null +++ b/sysdeps/generic/sigpause.c @@ -0,0 +1,43 @@ +/* Copyright (C) 1991, 1995, 1996 Free Software Foundation, Inc. + This file is part of the 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 <errno.h> +#include <signal.h> + +int +__sigpause (sig_or_mask, is_sig) + int sig_or_mask; + int is_sig; +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (__sigpause) + + +int __default_sigpause __P ((int mask)); +int +__default_sigpause (mask) + int mask; +{ + __set_errno (ENOSYS); + return -1; +} +weak_alias (__default_sigpause, sigpause) +stub_warning (sigpause) +#include <stub-tag.h> diff --git a/sysdeps/generic/sigpending.c b/sysdeps/generic/sigpending.c new file mode 100644 index 0000000000..2c1597a521 --- /dev/null +++ b/sysdeps/generic/sigpending.c @@ -0,0 +1,40 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <stddef.h> +#include <signal.h> + + +/* Store in SET all signals that are blocked and pending. */ +int +sigpending (set) + sigset_t *set; +{ + if (set == NULL) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} + +stub_warning (sigpending) +#include <stub-tag.h> diff --git a/sysdeps/generic/sigprocmask.c b/sysdeps/generic/sigprocmask.c new file mode 100644 index 0000000000..739ebce5bb --- /dev/null +++ b/sysdeps/generic/sigprocmask.c @@ -0,0 +1,51 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <signal.h> + + +/* If SET is not NULL, modify the current set of blocked signals + according to HOW, which may be SIG_BLOCK, SIG_UNBLOCK or SIG_SETMASK. + If OSET is not NULL, store the old set of blocked signals in *OSET. */ +int +__sigprocmask (how, set, oset) + int how; + const sigset_t *set; + sigset_t *oset; +{ + switch (how) + { + case SIG_BLOCK: + case SIG_UNBLOCK: + case SIG_SETMASK: + break; + default: + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} + +/* No stub warning because abort calls __sigprocmask, + and we don't want warnings for every use of abort on + a system without safe signals. */ + +weak_alias (__sigprocmask, sigprocmask) diff --git a/sysdeps/generic/sigreturn.c b/sysdeps/generic/sigreturn.c new file mode 100644 index 0000000000..13089a76bf --- /dev/null +++ b/sysdeps/generic/sigreturn.c @@ -0,0 +1,32 @@ +/* Copyright (C) 1992, 1994, 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. */ + +#include <signal.h> +#include <errno.h> + +int +__sigreturn (context) + struct sigcontext *context; +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (sigreturn) + +weak_alias (__sigreturn, sigreturn) +#include <stub-tag.h> diff --git a/sysdeps/generic/sigsetmask.c b/sysdeps/generic/sigsetmask.c new file mode 100644 index 0000000000..4be31db02e --- /dev/null +++ b/sysdeps/generic/sigsetmask.c @@ -0,0 +1,32 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <signal.h> + +int +__sigsetmask (mask) + int mask; +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (sigsetmask) + +weak_alias (__sigsetmask, sigsetmask) +#include <stub-tag.h> diff --git a/sysdeps/generic/sigstack.c b/sysdeps/generic/sigstack.c new file mode 100644 index 0000000000..52b135a19f --- /dev/null +++ b/sysdeps/generic/sigstack.c @@ -0,0 +1,34 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <signal.h> + +/* Run signals handlers on the stack specified by SS (if not NULL). + If OSS is not NULL, it is filled in with the old signal stack status. */ +int +sigstack (ss, oss) + const struct sigstack *ss; + struct sigstack *oss; +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (sigstack) +#include <stub-tag.h> diff --git a/sysdeps/generic/sigsuspend.c b/sysdeps/generic/sigsuspend.c new file mode 100644 index 0000000000..15166acfb7 --- /dev/null +++ b/sysdeps/generic/sigsuspend.c @@ -0,0 +1,35 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <signal.h> + + +/* Change the set of blocked signals to SET, + wait until a signal arrives, and restore the set of blocked signals. */ +int +sigsuspend (set) + const sigset_t *set; +{ + __set_errno (ENOSYS); + return -1; +} + + +stub_warning (sigsuspend) +#include <stub-tag.h> diff --git a/sysdeps/generic/sigvec.c b/sysdeps/generic/sigvec.c new file mode 100644 index 0000000000..8cce744a03 --- /dev/null +++ b/sysdeps/generic/sigvec.c @@ -0,0 +1,39 @@ +/* Copyright (C) 1991, 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. */ + +#include <signal.h> +#include <errno.h> + +/* If VEC is non-NULL, set the handler for SIG to the `sv_handler' member + of VEC. The signals in `sv_mask' will be blocked while the handler runs. + If the SV_RESETHAND bit is set in `sv_flags', the handler for SIG will be + reset to SIG_DFL before `sv_handler' is entered. If OVEC is non-NULL, + it is filled in with the old information for SIG. */ +int +__sigvec (sig, vec, ovec) + int sig; + const struct sigvec *vec; + struct sigvec *ovec; +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (sigvec) + +weak_alias (__sigvec, sigvec) +#include <stub-tag.h> diff --git a/sysdeps/generic/sigwait.c b/sysdeps/generic/sigwait.c new file mode 100644 index 0000000000..f34bfdf179 --- /dev/null +++ b/sysdeps/generic/sigwait.c @@ -0,0 +1,32 @@ +/* sigwait - implementation of sigwait function from POSIX.1c. + Copyright (C) 1996 Free Software Foundation, Inc. + This file is part of the 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 <errno.h> +#include <signal.h> + +int +__sigwait (const sigset_t *set, int *sig) +{ + __set_errno (ENOSYS); + return -1; +} +weak_alias (__sigwait, sigwait) + +stub_warning (sigwait) +#include <stub-tag.h> diff --git a/sysdeps/generic/sleep.c b/sysdeps/generic/sleep.c new file mode 100644 index 0000000000..65c1f9607d --- /dev/null +++ b/sysdeps/generic/sleep.c @@ -0,0 +1,41 @@ +/* Copyright (C) 1991, 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. */ + +#include <signal.h> +#include <time.h> +#include <unistd.h> +#include <errno.h> + +/* Make the process sleep for SECONDS seconds, or until a signal arrives + and is not ignored. The function returns the number of seconds less + than SECONDS which it actually slept (zero if it slept the full time). + If a signal handler does a `longjmp' or modifies the handling of the + SIGALRM signal while inside `sleep' call, the handling of the SIGALRM + signal afterwards is undefined. There is no return value to indicate + error, but if `sleep' returns SECONDS, it probably didn't work. */ +unsigned int +__sleep (seconds) + unsigned int seconds; +{ + __set_errno (ENOSYS); + return seconds; +} +weak_alias (__sleep, sleep) + +stub_warning (sleep) +#include <stub-tag.h> diff --git a/sysdeps/generic/socket.c b/sysdeps/generic/socket.c new file mode 100644 index 0000000000..b946c164e8 --- /dev/null +++ b/sysdeps/generic/socket.c @@ -0,0 +1,37 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <sys/socket.h> + +/* Create a new socket of type TYPE in domain DOMAIN, using + protocol PROTOCOL. If PROTOCOL is zero, one is chosen automatically. + Returns a file descriptor for the new socket, or -1 for errors. */ +int +socket (domain, type, protocol) + int domain; + int type; + int protocol; +{ + __set_errno (ENOSYS); + return -1; +} + + +stub_warning (socket) +#include <stub-tag.h> diff --git a/sysdeps/generic/socketpair.c b/sysdeps/generic/socketpair.c new file mode 100644 index 0000000000..f8c0d76889 --- /dev/null +++ b/sysdeps/generic/socketpair.c @@ -0,0 +1,39 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <sys/socket.h> + +/* Create two new sockets, of type TYPE in domain DOMAIN and using + protocol PROTOCOL, which are connected to each other, and put file + descriptors for them in FDS[0] and FDS[1]. If PROTOCOL is zero, + one will be chosen automatically. Returns 0 on success, -1 for errors. */ +int +socketpair (domain, type, protocol, fds) + int domain; + int type; + int protocol; + int fds[2]; +{ + __set_errno (ENOSYS); + return -1; +} + + +stub_warning (socketpair) +#include <stub-tag.h> diff --git a/sysdeps/generic/sstk.c b/sysdeps/generic/sstk.c new file mode 100644 index 0000000000..0ca36ef9f4 --- /dev/null +++ b/sysdeps/generic/sstk.c @@ -0,0 +1,35 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> + +/* Increase the size of the stack by INCREMENT, + and return the address of the bottom of the stack. */ + +void *sstk __P ((int increment)); + +void * +sstk (increment) + int increment; +{ + __set_errno (ENOSYS); + return (void *) -1; +} + +stub_warning (sstk) +#include <stub-tag.h> diff --git a/sysdeps/generic/start.c b/sysdeps/generic/start.c new file mode 100644 index 0000000000..cf7efc931a --- /dev/null +++ b/sysdeps/generic/start.c @@ -0,0 +1,16 @@ +/* This file should define the low-level program entry point, + which should set up `__environ', and then do: + __libc_init(argc, argv, __environ); + exit(main(argc, argv, __environ)); + + This file should be prepared to be the first thing in the text section (on + Unix systems), or otherwise appropriately special. */ + +/* The first piece of initialized data. */ +int __data_start = 0; +#ifdef HAVE_WEAK_SYMBOLS +weak_alias (__data_start, data_start) +#endif + +volatile int __errno; +strong_alias (__errno, errno) diff --git a/sysdeps/generic/statfs.c b/sysdeps/generic/statfs.c new file mode 100644 index 0000000000..8cdd1e03b1 --- /dev/null +++ b/sysdeps/generic/statfs.c @@ -0,0 +1,34 @@ +/* statfs -- Return information about the filesystem on which FILE resides. + 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. */ + +#include <errno.h> +#include <sys/statfs.h> +#include <stddef.h> + +/* Return information about the filesystem on which FILE resides. */ +int +__statfs (const char *file, struct statfs *buf) +{ + __set_errno (ENOSYS); + return -1; +} +weak_alias (__statfs, statfs) + +stub_warning (statfs) +#include <stub-tag.h> diff --git a/sysdeps/generic/statfs64.c b/sysdeps/generic/statfs64.c new file mode 100644 index 0000000000..93b640eb74 --- /dev/null +++ b/sysdeps/generic/statfs64.c @@ -0,0 +1,32 @@ +/* Return information about the filesystem on which FILE resides. + 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. */ + +#include <errno.h> +#include <sys/statfs.h> +#include <stddef.h> + +/* Return information about the filesystem on which FILE resides. */ +int +statfs64 (const char *file, struct statfs64 *buf) +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (statfs64) +#include <stub-tag.h> diff --git a/sysdeps/generic/stdio_init.c b/sysdeps/generic/stdio_init.c new file mode 100644 index 0000000000..a8e733e811 --- /dev/null +++ b/sysdeps/generic/stdio_init.c @@ -0,0 +1,30 @@ +/* Copyright (C) 1991, 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 <stdio.h> + +/* Initialize STREAM as necessary. + This may change I/O functions, give a buffer, etc. + If no buffer is allocated, but the bufsize is set, + the bufsize will be used to allocate the buffer. */ +void +__stdio_init_stream (stream) + FILE *stream; +{ + stream->__bufsize = BUFSIZ; +} diff --git a/sysdeps/generic/stime.c b/sysdeps/generic/stime.c new file mode 100644 index 0000000000..d41d6b400f --- /dev/null +++ b/sysdeps/generic/stime.c @@ -0,0 +1,40 @@ +/* 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. */ + +#include <errno.h> +#include <time.h> +#include <stddef.h> + +/* Set the system clock to *WHEN. */ + +int +stime (when) + const time_t *when; +{ + if (when == NULL) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} + +stub_warning (stime) +#include <stub-tag.h> diff --git a/sysdeps/generic/strtsupp.c b/sysdeps/generic/strtsupp.c new file mode 100644 index 0000000000..202a1ce60d --- /dev/null +++ b/sysdeps/generic/strtsupp.c @@ -0,0 +1,28 @@ +/* Copyright (C) 1994, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil), + On-Line Applications Research Corporation. + + 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 <standalone.h> + +/* This file is only required when a "bare" board is configured. */ + +/* Start Support Routines + +The start code for some CPUs (e.g. i386) require target dependent +support. For more info, consult the start file for your CPU. */ diff --git a/sysdeps/generic/stty.c b/sysdeps/generic/stty.c new file mode 100644 index 0000000000..425bca42b1 --- /dev/null +++ b/sysdeps/generic/stty.c @@ -0,0 +1,40 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <sgtty.h> +#include <stddef.h> + +/* Set the terminal parameters associated with FD to *PARAMS. */ +int +stty (fd, params) + int fd; + const struct sgttyb *params; +{ + if (params == NULL) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} + +stub_warning (stty) +#include <stub-tag.h> diff --git a/sysdeps/generic/stub_warnings b/sysdeps/generic/stub_warnings new file mode 100644 index 0000000000..a97994ba67 --- /dev/null +++ b/sysdeps/generic/stub_warnings @@ -0,0 +1,270 @@ +__longjmp.c +_exit.c +accept.c +access.c +acct.c +adjtime.c +alarm.c +bind.c +brk.c +chdir.c +chflags.c +chmod.c +chown.c +chroot.c +clock.c +close.c +closedir.c +connect.c +ctermid.c +cuserid.c +des_impl.c +dirfd.c +dup.c +dup2.c +e_acoshl.c +e_acosl.c +e_asinl.c +e_atan2l.c +e_expl.c +e_fmodl.c +e_j0l.c +e_j1l.c +e_jnl.c +e_lgammal_r.c +e_log10l.c +e_logl.c +e_powl.c +e_rem_pio2l.c +e_sqrtl.c +euidaccess.c +execve.c +fchdir.c +fchflags.c +fchmod.c +fchown.c +fclrexcpt.c +fcntl.c +fdopen.c +fegetenv.c +fegetround.c +feholdexcpt.c +fesetenv.c +fesetround.c +feupdateenv.c +fexecve.c +fgetexcptflg.c +flock.c +fork.c +fpathconf.c +fraiseexcpt.c +fsetexcptflg.c +fstatfs.c +fstatfs64.c +fsync.c +ftestexcept.c +ftruncate.c +fxstat.c +fxstat64.c +getaddrinfo.c +getcwd.c +getdents.c +getdomain.c +getdtsz.c +getegid.c +geteuid.c +getgid.c +getgroups.c +gethostid.c +gethostname.c +getitimer.c +getlogin.c +getlogin_r.c +getpagesize.c +getpeername.c +getpgid.c +getpid.c +getppid.c +getpriority.c +getrlimit.c +getrlimit64.c +getrusage.c +getsockname.c +getsockopt.c +getsysstats.c +gettimeofday.c +getuid.c +gtty.c +if_index.c +ioctl.c +isatty.c +isfdtype.c +k_cosl.c +k_rem_pio2l.c +k_sinl.c +k_tanl.c +kill.c +killpg.c +lchown.c +link.c +listen.c +lseek.c +lseek64.c +lxstat64.c +madvise.c +mkdir.c +mkfifo.c +mkstemp.c +mktemp.c +mprotect.c +msgctl.c +msgget.c +msgrcv.c +msgsnd.c +msync.c +nanosleep.c +nice.c +nlist.c +open.c +open64.c +opendir.c +pathconf.c +pause.c +pipe.c +pipestream.c +poll.c +pread.c +pread64.c +profil.c +ptrace.c +pwrite.c +pwrite64.c +raise.c +read.c +readdir.c +readdir64.c +readdir64_r.c +readdir_r.c +readlink.c +readv.c +reboot.c +recv.c +recvfrom.c +recvmsg.c +remove.c +rename.c +revoke.c +rewinddir.c +rmdir.c +s_atanl.c +s_erfl.c +s_exp2.c +s_exp2f.c +s_exp2l.c +s_expm1l.c +s_log1pl.c +s_log2l.c +sched_getp.c +sched_gets.c +sched_primax.c +sched_primin.c +sched_rr_gi.c +sched_setp.c +sched_sets.c +sched_yield.c +seekdir.c +select.c +semctl.c +semget.c +semop.c +send.c +sendmsg.c +sendto.c +setdomain.c +setegid.c +seteuid.c +setgid.c +setgroups.c +sethostid.c +sethostname.c +setitimer.c +setjmp.c +setlogin.c +setpgid.c +setpriority.c +setregid.c +setreuid.c +setrlimit.c +setrlimit64.c +setsid.c +setsockopt.c +settimeofday.c +setuid.c +shmat.c +shmctl.c +shmdt.c +shmget.c +shutdown.c +sigaction.c +sigaltstack.c +sigblock.c +sigintr.c +signal.c +sigpause.c +sigpending.c +sigreturn.c +sigsetmask.c +sigstack.c +sigsuspend.c +sigvec.c +sigwait.c +sleep.c +socket.c +socketpair.c +sstk.c +statfs.c +statfs64.c +stime.c +stty.c +swapoff.c +swapon.c +symlink.c +sync.c +syscall.c +sysconf.c +system.c +sysv_signal.c +tcdrain.c +tcflow.c +tcflush.c +tcgetattr.c +tcgetpgrp.c +tcsendbrk.c +tcsetattr.c +tcsetpgrp.c +telldir.c +tempname.c +time.c +times.c +truncate.c +ttyname.c +ttyname_r.c +ualarm.c +ulimit.c +umask.c +unlink.c +usleep.c +ustat.c +utime.c +utimes.c +vdprintf.c +vhangup.c +wait.c +wait3.c +wait4.c +waitpid.c +write.c +writev.c +xmknod.c +xstat.c +xstat64.c diff --git a/sysdeps/generic/swapoff.c b/sysdeps/generic/swapoff.c new file mode 100644 index 0000000000..49e4815c41 --- /dev/null +++ b/sysdeps/generic/swapoff.c @@ -0,0 +1,31 @@ +/* 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. */ + +#include <errno.h> +#include <unistd.h> + +/* Stop using block special device PATH for swapping. */ +int +swapoff (const char *path) +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (swapoff) +#include <stub-tag.h> diff --git a/sysdeps/generic/swapon.c b/sysdeps/generic/swapon.c new file mode 100644 index 0000000000..c466e8cea7 --- /dev/null +++ b/sysdeps/generic/swapon.c @@ -0,0 +1,34 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <unistd.h> +#include <sys/swap.h> + +/* Make the block special device PATH available to the system for swapping. + This call is restricted to the super-user. */ +int +swapon (path) + const char *path; +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (swapon) +#include <stub-tag.h> diff --git a/sysdeps/generic/symlink.c b/sysdeps/generic/symlink.c new file mode 100644 index 0000000000..87365aa8d5 --- /dev/null +++ b/sysdeps/generic/symlink.c @@ -0,0 +1,42 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <stddef.h> +#include <unistd.h> + + +/* Make a link to FROM called TO. */ +int +__symlink (from, to) + const char *from; + const char *to; +{ + if (from == NULL || to == NULL) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} +stub_warning (symlink) + +weak_alias (__symlink, symlink) +#include <stub-tag.h> diff --git a/sysdeps/generic/sync.c b/sysdeps/generic/sync.c new file mode 100644 index 0000000000..aa04edf524 --- /dev/null +++ b/sysdeps/generic/sync.c @@ -0,0 +1,32 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <unistd.h> + +/* Make all changes done to all files actually appear on disk. */ +int +sync () +{ + __set_errno (ENOSYS); + return -1; +} + + +stub_warning (sync) +#include <stub-tag.h> diff --git a/sysdeps/generic/sys/mman.h b/sysdeps/generic/sys/mman.h index 6e41a923d5..f8ca3f03ee 100644 --- a/sysdeps/generic/sys/mman.h +++ b/sysdeps/generic/sys/mman.h @@ -76,7 +76,7 @@ #endif /* Return value of `mmap' in case of an error. */ -#define MAP_FAILED ((__caddr_t) -1) +#define MAP_FAILED ((__ptr_t) -1) __BEGIN_DECLS @@ -89,41 +89,41 @@ __BEGIN_DECLS for errors (in which case `errno' is set). A successful `mmap' call deallocates any previous mapping for the affected region. */ -extern __caddr_t __mmap __P ((__caddr_t __addr, size_t __len, int __prot, - int __flags, int __fd, __off_t __offset)); +extern __ptr_t __mmap __P ((__ptr_t __addr, size_t __len, int __prot, + int __flags, int __fd, __off_t __offset)); #ifndef __USE_FILE_OFFSET64 -extern __caddr_t mmap __P ((__caddr_t __addr, size_t __len, int __prot, - int __flags, int __fd, __off_t __offset)); +extern __ptr_t mmap __P ((__ptr_t __addr, size_t __len, int __prot, + int __flags, int __fd, __off_t __offset)); #else -extern __caddr_t mmap __P ((__caddr_t __addr, size_t __len, int __prot, - int __flags, int __fd, __off_t __offset)) +extern __ptr_t mmap __P ((__ptr_t __addr, size_t __len, int __prot, + int __flags, int __fd, __off_t __offset)) __asm__ ("mmap64"); #endif #ifdef __USE_LARGEFILE64 -extern __caddr_t mmap64 __P ((__caddr_t __addr, size_t __len, int __prot, - int __flags, int __fd, __off64_t __offset)); +extern __ptr_t mmap64 __P ((__ptr_t __addr, size_t __len, int __prot, + int __flags, int __fd, __off64_t __offset)); #endif /* Deallocate any mapping for the region starting at ADDR and extending LEN bytes. Returns 0 if successful, -1 for errors (and sets errno). */ -extern int __munmap __P ((__caddr_t __addr, size_t __len)); -extern int munmap __P ((__caddr_t __addr, size_t __len)); +extern int __munmap __P ((__ptr_t __addr, size_t __len)); +extern int munmap __P ((__ptr_t __addr, size_t __len)); /* Change the memory protection of the region starting at ADDR and extending LEN bytes to PROT. Returns 0 if successful, -1 for errors (and sets errno). */ -extern int __mprotect __P ((__caddr_t __addr, size_t __len, int __prot)); -extern int mprotect __P ((__caddr_t __addr, size_t __len, int __prot)); +extern int __mprotect __P ((__ptr_t __addr, size_t __len, int __prot)); +extern int mprotect __P ((__ptr_t __addr, size_t __len, int __prot)); /* Synchronize the region starting at ADDR and extending LEN bytes with the file it maps. Filesystem operations on a file being mapped are unpredictable before this is done. Flags are from the MS_* set. */ -extern int msync __P ((__caddr_t __addr, size_t __len, int __flags)); +extern int msync __P ((__ptr_t __addr, size_t __len, int __flags)); #ifdef __USE_BSD /* Advise the system about particular usage patterns the program follows for the region starting at ADDR and extending LEN bytes. */ -extern int madvise __P ((__caddr_t __addr, size_t __len, int __advice)); +extern int madvise __P ((__ptr_t __addr, size_t __len, int __advice)); #endif __END_DECLS diff --git a/sysdeps/generic/sys/param.h b/sysdeps/generic/sys/param.h new file mode 100644 index 0000000000..1dafdda403 --- /dev/null +++ b/sysdeps/generic/sys/param.h @@ -0,0 +1,14 @@ +/* This file should contain various parameter macros appropriate for the + machine and operating system. There is no standard set of macros; this + file is just for compatibility with programs written for Unix that + expect it to define things. On Unix systems that do not have their own + sysdep version of this file, it is generated at build time by examining + the installed headers on the system. */ + +#include <limits.h> + +#define MAXSYMLINKS 1 + +/* Macros for min/max. */ +#define MIN(a,b) (((a)<(b))?(a):(b)) +#define MAX(a,b) (((a)>(b))?(a):(b)) diff --git a/sysdeps/generic/sys/reboot.h b/sysdeps/generic/sys/reboot.h new file mode 100644 index 0000000000..bada28dd6c --- /dev/null +++ b/sysdeps/generic/sys/reboot.h @@ -0,0 +1,9 @@ +/* This file should define RB_* macros to be used as flag + bits in the argument to the `reboot' system call. */ + +#ifndef _SYS_REBOOT_H +#define _SYS_REBOOT_H + +#define RB_AUTOBOOT 0 + +#endif /* <sys/reboot.h> */ diff --git a/sysdeps/generic/sys/syscall.h b/sysdeps/generic/sys/syscall.h new file mode 100644 index 0000000000..719bd08904 --- /dev/null +++ b/sysdeps/generic/sys/syscall.h @@ -0,0 +1,2 @@ +/* For Unix-like systems, this file should contain definitions + of macros SYS_call for each system call, giving the call numbers. */ diff --git a/sysdeps/generic/syscall.c b/sysdeps/generic/syscall.c new file mode 100644 index 0000000000..8c20b7ead0 --- /dev/null +++ b/sysdeps/generic/syscall.c @@ -0,0 +1,35 @@ +/* Copyright (C) 1993, 1994, 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. */ + +#include <sysdep.h> +#include <errno.h> +#include <unistd.h> + +/* Do system call CALLNO, passing it the remaining arguments. + This only makes sense in certain operating systems. */ + +int +syscall (callno) + int callno; +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (syscall) +#include <stub-tag.h> diff --git a/sysdeps/generic/sysconf.c b/sysdeps/generic/sysconf.c new file mode 100644 index 0000000000..b3fa62aa9a --- /dev/null +++ b/sysdeps/generic/sysconf.c @@ -0,0 +1,255 @@ +/* Copyright (C) 1991, 1993, 1995, 1996 Free Software Foundation, Inc. + This file is part of the 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 <errno.h> +#include <stdio.h> +#include <unistd.h> +#include <time.h> +#include <limits.h> +#include <sys/sysinfo.h> + + +/* Get the value of the system variable NAME. */ +long int +__sysconf (name) + int name; +{ + switch (name) + { + default: + __set_errno (EINVAL); + return -1; + + case _SC_TZNAME_MAX: + return __tzname_max (); + + case _SC_CHARCLASS_NAME_MAX: +#ifdef CHARCLASS_NAME_MAX + return CHARCLASS_NAME_MAX; +#else + return -1; +#endif + + case _SC_COLL_WEIGHTS_MAX: +#ifdef COLL_WEIGHTS_MAX + return COLL_WEIGHTS_MAX; +#else + return -1; +#endif + + case _SC_EQUIV_CLASS_MAX: +#ifdef EQUIV_CLASS_MAX + return EQUIV_CLASS_MAX; +#else + return -1; +#endif + + case _SC_2_LOCALEDEF: +#ifdef _POSIX2_LOCALEDEF + return _POSIX2_LOCALEDEF; +#else + return -1; +#endif + + case _SC_NPROCESSORS_CONF: + return __get_nprocs_conf (); + + case _SC_NPROCESSORS_ONLN: + return __get_nprocs (); + + case _SC_PHYS_PAGES: + return __get_phys_pages (); + + case _SC_AVPHYS_PAGES: + return __get_avphys_pages (); + + case _SC_ATEXIT_MAX: + /* We have no limit since we use lists. */ + return INT_MAX; + + case _SC_PASS_MAX: + /* We have no limit but since the return value might be used to + allocate a buffer we restrict the value. */ + return BUFSIZ; + + case _SC_CHAR_BIT: + return CHAR_BIT; + + case _SC_CHAR_MAX: + return CHAR_MAX; + + case _SC_CHAR_MIN: + return CHAR_MIN; + + case _SC_INT_MAX: + return INT_MAX; + + case _SC_INT_MIN: + return INT_MIN; + + case _SC_LONG_BIT: + return sizeof (long int) * CHAR_BIT; + + case _SC_WORD_BIT: + return sizeof (int) * CHAR_BIT; + + case _SC_MB_LEN_MAX: + return MB_LEN_MAX; + + case _SC_NZERO: + return NZERO; + + case _SC_SSIZE_MAX: + return _POSIX_SSIZE_MAX; + + case _SC_SCHAR_MAX: + return SCHAR_MAX; + + case _SC_SCHAR_MIN: + return SCHAR_MIN; + + case _SC_SHRT_MAX: + return SHRT_MAX; + + case _SC_SHRT_MIN: + return SHRT_MIN; + + case _SC_UCHAR_MAX: + return UCHAR_MAX; + + case _SC_UINT_MAX: + return UINT_MAX; + + case _SC_ULONG_MAX: + return ULONG_MAX; + + case _SC_USHRT_MAX: + return USHRT_MAX; + + case _SC_ARG_MAX: + case _SC_CHILD_MAX: + case _SC_CLK_TCK: + case _SC_NGROUPS_MAX: + case _SC_OPEN_MAX: + case _SC_STREAM_MAX: + case _SC_JOB_CONTROL: + case _SC_SAVED_IDS: + case _SC_REALTIME_SIGNALS: + case _SC_PRIORITY_SCHEDULING: + case _SC_TIMERS: + case _SC_ASYNCHRONOUS_IO: + case _SC_PRIORITIZED_IO: + case _SC_SYNCHRONIZED_IO: + case _SC_FSYNC: + case _SC_MAPPED_FILES: + case _SC_MEMLOCK: + case _SC_MEMLOCK_RANGE: + case _SC_MEMORY_PROTECTION: + case _SC_MESSAGE_PASSING: + case _SC_SEMAPHORES: + case _SC_SHARED_MEMORY_OBJECTS: + + case _SC_AIO_LISTIO_MAX: + case _SC_AIO_MAX: + case _SC_AIO_PRIO_DELTA_MAX: + case _SC_DELAYTIMER_MAX: + case _SC_MQ_OPEN_MAX: + case _SC_MQ_PRIO_MAX: + case _SC_VERSION: + case _SC_PAGESIZE: + case _SC_RTSIG_MAX: + case _SC_SEM_NSEMS_MAX: + case _SC_SEM_VALUE_MAX: + case _SC_SIGQUEUE_MAX: + case _SC_TIMER_MAX: + + case _SC_PII: + case _SC_PII_XTI: + case _SC_PII_SOCKET: + case _SC_PII_OSI: + case _SC_POLL: + case _SC_SELECT: + case _SC_UIO_MAXIOV: + case _SC_PII_INTERNET_STREAM: + case _SC_PII_INTERNET_DGRAM: + case _SC_PII_OSI_COTS: + case _SC_PII_OSI_CLTS: + case _SC_PII_OSI_M: + case _SC_T_IOV_MAX: + + case _SC_BC_BASE_MAX: + case _SC_BC_DIM_MAX: + case _SC_BC_SCALE_MAX: + case _SC_BC_STRING_MAX: + case _SC_EXPR_NEST_MAX: + case _SC_LINE_MAX: + case _SC_RE_DUP_MAX: + case _SC_2_VERSION: + case _SC_2_C_BIND: + case _SC_2_C_DEV: + case _SC_2_FORT_DEV: + case _SC_2_SW_DEV: + case _SC_2_CHAR_TERM: + case _SC_2_C_VERSION: + case _SC_2_UPE: + + case _SC_THREADS: + case _SC_THREAD_SAFE_FUNCTIONS: + case _SC_GETGR_R_SIZE_MAX: + case _SC_GETPW_R_SIZE_MAX: + case _SC_LOGIN_NAME_MAX: + case _SC_TTY_NAME_MAX: + case _SC_THREAD_DESTRUCTOR_ITERATIONS: + case _SC_THREAD_KEYS_MAX: + case _SC_THREAD_STACK_MIN: + case _SC_THREAD_THREADS_MAX: + case _SC_THREAD_ATTR_STACKADDR: + case _SC_THREAD_ATTR_STACKSIZE: + case _SC_THREAD_PRIORITY_SCHEDULING: + case _SC_THREAD_PRIO_INHERIT: + case _SC_THREAD_PRIO_PROTECT: + case _SC_THREAD_PROCESS_SHARED: + + case _SC_XOPEN_VERSION: + case _SC_XOPEN_XCU_VERSION: + case _SC_XOPEN_UNIX: + case _SC_XOPEN_CRYPT: + case _SC_XOPEN_ENH_I18N: + case _SC_XOPEN_SHM: + case _SC_XOPEN_XPG2: + case _SC_XOPEN_XPG3: + case _SC_XOPEN_XPG4: + + case _SC_NL_ARGMAX: + case _SC_NL_LANGMAX: + case _SC_NL_MSGMAX: + case _SC_NL_NMAX: + case _SC_NL_SETMAX: + case _SC_NL_TEXTMAX: + + break; + } + + __set_errno (ENOSYS); + return -1; +} + +weak_alias (__sysconf, sysconf) + +stub_warning (sysconf) +#include <stub-tag.h> diff --git a/sysdeps/generic/sysdep.c b/sysdeps/generic/sysdep.c new file mode 100644 index 0000000000..5442eee00d --- /dev/null +++ b/sysdeps/generic/sysdep.c @@ -0,0 +1,2 @@ +/* This file should contain any system-dependent functions + that will be used by many parts of the library. */ diff --git a/sysdeps/generic/system.c b/sysdeps/generic/system.c new file mode 100644 index 0000000000..5476d0f157 --- /dev/null +++ b/sysdeps/generic/system.c @@ -0,0 +1,38 @@ +/* Copyright (C) 1991, 1993, 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. */ + +#include <errno.h> +#include <stdlib.h> + + +/* Execute LINE as a shell command. */ +int +__libc_system (line) + const char *line; +{ + if (line == NULL) + return 0; /* This indicates no command processor. */ + + __sys_errno (ENOSYS); + return -1; +} +weak_alias (__libc_system, system) + + +stub_warning (system) +#include <stub-tag.h> diff --git a/sysdeps/generic/sysv_signal.c b/sysdeps/generic/sysv_signal.c new file mode 100644 index 0000000000..d8db7d5f8d --- /dev/null +++ b/sysdeps/generic/sysv_signal.c @@ -0,0 +1,43 @@ +/* Copyright (C) 1991, 1992, 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. */ + +#include <errno.h> +#include <signal.h> + +/* Set the handler for the signal SIG to HANDLER, + returning the old handler, or SIG_ERR on error. */ +__sighandler_t +__sysv_signal (sig, handler) + int sig; + __sighandler_t handler; +{ + /* Check signal extents to protect __sigismember. */ + if (handler == SIG_ERR || sig < 1 || sig >= NSIG) + { + __set_errno (EINVAL); + return SIG_ERR; + } + + __set_errno (ENOSYS); + + return SIG_ERR; +} +weak_alias (__sysv_signal, sysv_signal) + +stub_warning (sysv_signal) +#include <stub-tag.h> diff --git a/sysdeps/generic/tcdrain.c b/sysdeps/generic/tcdrain.c new file mode 100644 index 0000000000..2bd91b32b0 --- /dev/null +++ b/sysdeps/generic/tcdrain.c @@ -0,0 +1,39 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <termios.h> + +/* Wait for pending output to be written on FD. */ +int +__libc_tcdrain (int fd) +{ + if (fd < 0) + { + __set_errno (EBADF); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} +weak_alias (__libc_tcdrain, tcdrain) + + +stub_warning (tcdrain) +#include <stub-tag.h> diff --git a/sysdeps/generic/tcflow.c b/sysdeps/generic/tcflow.c new file mode 100644 index 0000000000..b1c091dfa1 --- /dev/null +++ b/sysdeps/generic/tcflow.c @@ -0,0 +1,53 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <termios.h> + +/* Suspend or restart transmission on FD. */ +int +tcflow (fd, action) + int fd; + int action; +{ + if (fd < 0) + { + __set_errno (EBADF); + return -1; + } + + switch (action) + { + case TCOOFF: + case TCOON: + case TCIOFF: + case TCION: + break; + + default: + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} + + +stub_warning (tcflow) +#include <stub-tag.h> diff --git a/sysdeps/generic/tcflush.c b/sysdeps/generic/tcflush.c new file mode 100644 index 0000000000..627f62e421 --- /dev/null +++ b/sysdeps/generic/tcflush.c @@ -0,0 +1,46 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <termios.h> + +/* Flush pending data on FD. */ +int +tcflush (fd, queue_selector) + int fd; + int queue_selector; +{ + switch (queue_selector) + { + case TCIFLUSH: + case TCOFLUSH: + case TCIOFLUSH: + break; + + default: + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} + + +stub_warning(tcflush); +#include <stub-tag.h> diff --git a/sysdeps/generic/tcgetattr.c b/sysdeps/generic/tcgetattr.c new file mode 100644 index 0000000000..bb7543482d --- /dev/null +++ b/sysdeps/generic/tcgetattr.c @@ -0,0 +1,46 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <stddef.h> +#include <termios.h> + +/* Put the state of FD into *TERMIOS_P. */ +int +__tcgetattr (fd, termios_p) + int fd; + struct termios *termios_p; +{ + if (fd < 0) + { + __set_errno (EBADF); + return -1; + } + if (termios_p == NULL) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} +stub_warning (tcgetattr) + +weak_alias (__tcgetattr, tcgetattr) +#include <stub-tag.h> diff --git a/sysdeps/generic/tcgetpgrp.c b/sysdeps/generic/tcgetpgrp.c new file mode 100644 index 0000000000..91ed22c2c9 --- /dev/null +++ b/sysdeps/generic/tcgetpgrp.c @@ -0,0 +1,40 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <unistd.h> +#include <sys/types.h> + +/* Return the foreground process group ID of FD. */ +pid_t +tcgetpgrp (fd) + int fd; +{ + if (fd < 0) + { + __set_errno (EBADF); + return (pid_t) -1; + } + + __set_errno (ENOSYS); + return (pid_t) -1; +} + + +stub_warning (tcgetpgrp) +#include <stub-tag.h> diff --git a/sysdeps/generic/tcsendbrk.c b/sysdeps/generic/tcsendbrk.c new file mode 100644 index 0000000000..a741eedd2b --- /dev/null +++ b/sysdeps/generic/tcsendbrk.c @@ -0,0 +1,40 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <termios.h> + +/* Send zero bits on FD. */ +int +tcsendbreak (fd, duration) + int fd; + int duration; +{ + if (fd < 0) + { + __set_errno (EBADF); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} + + +stub_warning (tcsendbreak) +#include <stub-tag.h> diff --git a/sysdeps/generic/tcsetattr.c b/sysdeps/generic/tcsetattr.c new file mode 100644 index 0000000000..e1b54c5e14 --- /dev/null +++ b/sysdeps/generic/tcsetattr.c @@ -0,0 +1,97 @@ +/* Copyright (C) 1991, 1995, 1996 Free Software Foundation, Inc. + This file is part of the 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 <errno.h> +#include <stddef.h> +#include <termios.h> + +static int bad_speed __P ((speed_t speed)); + +/* Set the state of FD to *TERMIOS_P. */ +int +tcsetattr (fd, optional_actions, termios_p) + int fd; + int optional_actions; + const struct termios *termios_p; +{ + if (fd < 0) + { + __set_errno (EBADF); + return -1; + } + if (termios_p == NULL) + { + __set_errno (EINVAL); + return -1; + } + switch (optional_actions) + { + case TCSANOW: + case TCSADRAIN: + case TCSAFLUSH: + break; + default: + __set_errno (EINVAL); + return -1; + } + + if (bad_speed(termios_p->__ospeed) || + bad_speed(termios_p->__ispeed == 0 ? + termios_p->__ospeed : termios_p->__ispeed)) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} + + +/* Strychnine checking. */ +static int +bad_speed (speed) + speed_t speed; +{ + switch (speed) + { + case B0: + case B50: + case B75: + case B110: + case B134: + case B150: + case B200: + case B300: + case B600: + case B1200: + case B1800: + case B2400: + case B4800: + case B9600: + case B19200: + case B38400: + return 0; + default: + return 1; + } +} + + +stub_warning (tcsetattr) +#include <stub-tag.h> diff --git a/sysdeps/generic/tcsetpgrp.c b/sysdeps/generic/tcsetpgrp.c new file mode 100644 index 0000000000..e48ee69a66 --- /dev/null +++ b/sysdeps/generic/tcsetpgrp.c @@ -0,0 +1,41 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <unistd.h> +#include <sys/types.h> + +/* Set the foreground process group ID of FD set PGRP_ID. */ +int +tcsetpgrp (fd, pgrp_id) + int fd; + pid_t pgrp_id; +{ + if (fd < 0) + { + __set_errno (EBADF); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} + + +stub_warning (tcsetpgrp) +#include <stub-tag.h> diff --git a/sysdeps/generic/telldir.c b/sysdeps/generic/telldir.c new file mode 100644 index 0000000000..3400829cb7 --- /dev/null +++ b/sysdeps/generic/telldir.c @@ -0,0 +1,41 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <sys/types.h> +#include <stddef.h> +#include <dirent.h> + +/* Return the current position of DIRP. */ +off_t +telldir (dirp) + DIR *dirp; +{ + if (dirp == NULL) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return (off_t) -1; +} + + +stub_warning (telldir) +#include <stub-tag.h> diff --git a/sysdeps/generic/tempname.c b/sysdeps/generic/tempname.c new file mode 100644 index 0000000000..f5d1ed0345 --- /dev/null +++ b/sysdeps/generic/tempname.c @@ -0,0 +1,46 @@ +/* Copyright (C) 1991, 92, 93, 95, 96, 97 Free Software Foundation, Inc. + This file is part of the 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 <errno.h> +#include <stdio.h> + +/* Generate a (hopefully) unique temporary filename + in DIR (if applicable), using prefix PFX. + If DIR_SEARCH is nonzero, perform directory searching + malarkey as per the SVID for tempnam. + Return the generated filename or NULL if one could not + be generated, putting the length of the string in *LENPTR. */ +char * +__stdio_gen_tempname (buf, bufsize, dir, pfx, dir_search, lenptr, streamptr, + large_file) + char *buf; + size_t bufsize; + const char *dir; + const char *pfx; + int dir_search; + size_t *lenptr; + FILE **streamptr; + int large_file; +{ + *lenptr = 0; + __set_errno (ENOSYS); + return NULL; +} + +stub_warning (__stdio_gen_tempname) +#include <stub-tag.h> diff --git a/sysdeps/generic/thread_state.h b/sysdeps/generic/thread_state.h new file mode 100644 index 0000000000..060282e4b7 --- /dev/null +++ b/sysdeps/generic/thread_state.h @@ -0,0 +1,47 @@ +/* Mach thread state definitions for machine-independent code. Stub version. + Copyright (C) 1994, 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. */ + +/* Everything else is called `thread_state', but CMU's header file is + called `thread_status'. Oh boy. */ +#include <mach/thread_state.h> + +/* Replace <machine> with "i386" or "mips" or whatever. */ + +#define MACHINE_THREAD_STATE_FLAVOR <machine>_THREAD_STATE +#define MACHINE_THREAD_STATE_COUNT <machine>_THREAD_STATE_COUNT + +#define machine_thread_state <machine>_thread_state + +/* Define these to the member names in `struct <machine>_thread_state' + for the PC and stack pointer. */ +#define PC ? +#define SP ? + +/* This structure should contain all of the different flavors of thread + state structures which are meaningful for this machine. Every machine's + definition of this structure should have a member `int set' which is a + bit mask (1 << FLAVOR) of the flavors of thread state in the structure + which are filled in; and a member `struct machine_thread_state basic'. + On some machines those are the only members (e.g. i386); on others, + there are several relevant flavors of thread state (e.g. mips). */ +struct machine_thread_all_state + { + int set; /* Mask of bits (1 << FLAVOR). */ + struct <machine>_thread_state basic; + }; diff --git a/sysdeps/generic/time.c b/sysdeps/generic/time.c new file mode 100644 index 0000000000..461aedd7c0 --- /dev/null +++ b/sysdeps/generic/time.c @@ -0,0 +1,35 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <time.h> + +/* Return the time now, and store it in *TIMER if not NULL. */ +time_t +time (timer) + time_t *timer; +{ + __set_errno (ENOSYS); + + if (timer != NULL) + *timer = (time_t) -1; + return (time_t) -1; +} + +stub_warning (time) +#include <stub-tag.h> diff --git a/sysdeps/generic/times.c b/sysdeps/generic/times.c new file mode 100644 index 0000000000..e51ced0f0a --- /dev/null +++ b/sysdeps/generic/times.c @@ -0,0 +1,43 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <sys/times.h> +#include <stddef.h> + +/* Store the CPU time used by this process and all its + dead children (and their dead children) in BUFFER. + Return the elapsed real time, or (clock_t) -1 for errors. + All times are in CLK_TCKths of a second. */ +clock_t +__times (buffer) + struct tms *buffer; +{ + if (buffer == NULL) + { + __set_errno (EINVAL); + return (clock_t) -1; + } + + __set_errno (ENOSYS); + return (clock_t) -1; +} +stub_warning (times) + +weak_alias (__times, times) +#include <stub-tag.h> diff --git a/sysdeps/generic/trampoline.c b/sysdeps/generic/trampoline.c new file mode 100644 index 0000000000..4fd699e775 --- /dev/null +++ b/sysdeps/generic/trampoline.c @@ -0,0 +1,37 @@ +/* Set thread_state for sighandler, and sigcontext to recover. Stub version. + Copyright (C) 1994, 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 <hurd.h> +#include <mach/thread_status.h> + +/* Set up STATE to run a signal handler in the thread it describes. + This should save the original state in a `struct sigcontext' on the + thread's stack (or possibly a signal stack described by SIGALTSTACK, + if the SA_ONSTACK bit is set in FLAGS), and return the address of + that structure. */ + +struct sigcontext * +_hurd_setup_sighandler (int flags, + __sighandler_t handler, + struct sigaltstack *sigaltstack, + int signo, int sigcode, + void *state) +{ +#error "Need to write sysdeps/mach/hurd/MACHINE/trampoline.c" +} diff --git a/sysdeps/generic/truncate.c b/sysdeps/generic/truncate.c new file mode 100644 index 0000000000..20e9fe0787 --- /dev/null +++ b/sysdeps/generic/truncate.c @@ -0,0 +1,33 @@ +/* Copyright (C) 1991, 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. */ + +#include <sys/types.h> +#include <errno.h> + +/* Truncate PATH to LENGTH bytes. */ +int +truncate (path, length) + const char *path; + off_t length; +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (truncate) +#include <stub-tag.h> diff --git a/sysdeps/generic/ttyname.c b/sysdeps/generic/ttyname.c new file mode 100644 index 0000000000..e62dea21bc --- /dev/null +++ b/sysdeps/generic/ttyname.c @@ -0,0 +1,38 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <stddef.h> +#include <unistd.h> + + +char *__ttyname = NULL; + +/* Return the pathname of the terminal FD is open on, or NULL on errors. + The returned storage is good only until the next call to this function. */ +char * +ttyname (fd) + int fd; +{ + __set_errno (ENOSYS); + return NULL; +} + + +stub_warning (ttyname) +#include <stub-tag.h> diff --git a/sysdeps/generic/ttyname_r.c b/sysdeps/generic/ttyname_r.c new file mode 100644 index 0000000000..6e8a9d6179 --- /dev/null +++ b/sysdeps/generic/ttyname_r.c @@ -0,0 +1,37 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <unistd.h> + + +/* Store at most BUFLEN characters the pathname of the terminal FD is + open on in BUF. Return 0 on success, otherwise an error number. */ +int +ttyname_r (fd, buf, buflen) + int fd; + char *buf; + size_t buflen; +{ + __set_errno (ENOSYS); + return ENOSYS; +} + + +stub_warning (ttyname_r) +#include <stub-tag.h> diff --git a/sysdeps/generic/ualarm.c b/sysdeps/generic/ualarm.c new file mode 100644 index 0000000000..b2c8da3c19 --- /dev/null +++ b/sysdeps/generic/ualarm.c @@ -0,0 +1,37 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <unistd.h> + +/* Set an alarm to go off (generating a SIGALRM signal) in VALUE microseconds. + If INTERVAL is nonzero, when the alarm goes off, the timer is reset to go + off every INTERVAL microseconds thereafter. + + Returns the number of microseconds remaining before the alarm. */ +unsigned int +ualarm (value, interval) + unsigned int value; + unsigned int interval; +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (ualarm) +#include <stub-tag.h> diff --git a/sysdeps/generic/udiv_qrnnd.c b/sysdeps/generic/udiv_qrnnd.c new file mode 100644 index 0000000000..d32796c04d --- /dev/null +++ b/sysdeps/generic/udiv_qrnnd.c @@ -0,0 +1,10 @@ +/* For some machines GNU MP needs to define an auxiliary function: + + udiv_qrnnd (quotient, remainder, high_numerator, low_numerator, denominator) + + Divides a two-word unsigned integer, composed by the integers + HIGH_NUMERATOR and LOW_NUMERATOR, by DENOMINATOR and places the quotient + in QUOTIENT and the remainder in REMAINDER. HIGH_NUMERATOR must be less + than DENOMINATOR for correct operation. If, in addition, the most + significant bit of DENOMINATOR must be 1, then the pre-processor symbol + UDIV_NEEDS_NORMALIZATION is defined to 1. */ diff --git a/sysdeps/generic/ulimit.c b/sysdeps/generic/ulimit.c new file mode 100644 index 0000000000..3d90170b50 --- /dev/null +++ b/sysdeps/generic/ulimit.c @@ -0,0 +1,41 @@ +/* Copyright (C) 1991, 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. */ + +#include <sys/resource.h> +#include <errno.h> + +/* Function depends on CMD: + 1 = Return the limit on the size of a file, in units of 512 bytes. + 2 = Set the limit on the size of a file to NEWLIMIT. Only the + super-user can increase the limit. + 3 = Return the maximum possible address of the data segment. + 4 = Return the maximum number of files that the calling process + can open. + Returns -1 on errors. */ +long int +__ulimit (cmd, newlimit) + int cmd; + long int newlimit; +{ + __set_errno (ENOSYS); + return -1; +} +weak_alias (__ulimit, ulimit) + +stub_warning (ulimit) +#include <stub-tag.h> diff --git a/sysdeps/generic/umask.c b/sysdeps/generic/umask.c new file mode 100644 index 0000000000..584780dd3b --- /dev/null +++ b/sysdeps/generic/umask.c @@ -0,0 +1,34 @@ +/* Copyright (C) 1991, 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. */ + +#include <sys/stat.h> +#include <errno.h> +#include <sys/types.h> + +/* Set the file creation mask to MASK, returning the old mask. */ +mode_t +__umask (mask) + mode_t mask; +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (umask) + +weak_alias (__umask, umask) +#include <stub-tag.h> diff --git a/sysdeps/generic/unlink.c b/sysdeps/generic/unlink.c new file mode 100644 index 0000000000..545a24abe0 --- /dev/null +++ b/sysdeps/generic/unlink.c @@ -0,0 +1,41 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <stddef.h> +#include <unistd.h> + + +/* Remove the link named NAME. */ +int +__unlink (name) + const char *name; +{ + if (name == NULL) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} +stub_warning (unlink) + +weak_alias (__unlink, unlink) +#include <stub-tag.h> diff --git a/sysdeps/generic/usleep.c b/sysdeps/generic/usleep.c new file mode 100644 index 0000000000..8c0e851d6d --- /dev/null +++ b/sysdeps/generic/usleep.c @@ -0,0 +1,32 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <unistd.h> + +/* Sleep USECONDS microseconds, or until a previously set timer goes off. */ +unsigned int +usleep (useconds) + unsigned int useconds; +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (usleep) +#include <stub-tag.h> diff --git a/sysdeps/generic/ustat.c b/sysdeps/generic/ustat.c new file mode 100644 index 0000000000..5371641f40 --- /dev/null +++ b/sysdeps/generic/ustat.c @@ -0,0 +1,33 @@ +/* Return info on filesystem. + 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. */ + +#include <unistd.h> +#include <errno.h> +#include <sys/ustat.h> + +int +ustat (dev, ust) + dev_t dev; + struct ustat * ust; +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (ustat) +#include <stub-tag.h> diff --git a/sysdeps/generic/utime.c b/sysdeps/generic/utime.c new file mode 100644 index 0000000000..40b554daa3 --- /dev/null +++ b/sysdeps/generic/utime.c @@ -0,0 +1,43 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <utime.h> + + +/* Set the access and modification times of FILE to those given in TIMES. + If TIMES is NULL, set them to the current time. */ +int +utime (file, times) + const char *file; + const struct utimbuf *times; +{ + if (file == NULL) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} + + + +stub_warning (utime) +#include <stub-tag.h> diff --git a/sysdeps/generic/utimes.c b/sysdeps/generic/utimes.c new file mode 100644 index 0000000000..438673bf17 --- /dev/null +++ b/sysdeps/generic/utimes.c @@ -0,0 +1,43 @@ +/* Copyright (C) 1991, 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. */ + +#include <sys/time.h> +#include <errno.h> +#include <stddef.h> + +/* Change the access time of FILE to TVP[0] and + the modification time of FILE to TVP[1]. */ +int +__utimes (file, tvp) + const char *file; + struct timeval tvp[2]; +{ + if (file == NULL || tvp == NULL) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} + +weak_alias (__utimes, utimes) + +stub_warning (utimes) +#include <stub-tag.h> diff --git a/sysdeps/generic/vdprintf.c b/sysdeps/generic/vdprintf.c new file mode 100644 index 0000000000..29e7fd3ab2 --- /dev/null +++ b/sysdeps/generic/vdprintf.c @@ -0,0 +1,33 @@ +/* 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 <errno.h> +#include <stdio.h> +#include <stdarg.h> + +/* Write formatted output to file descriptor D according to the format string + FORMAT, using the argument list in ARG. */ +int +vdprintf (int d, const char *format, va_list arg) +{ + __set_errno (ENOSYS); + return 0; +} + +stub_warning (vdprintf) +#include <stub-tag.h> diff --git a/sysdeps/generic/vhangup.c b/sysdeps/generic/vhangup.c new file mode 100644 index 0000000000..2e112b14a6 --- /dev/null +++ b/sysdeps/generic/vhangup.c @@ -0,0 +1,33 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <unistd.h> + +/* Revoke access permissions to all processes currently communicating + with the control terminal, and then send a SIGHUP signal to the process + group of the control terminal. */ +int +vhangup () +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (vhangup) +#include <stub-tag.h> diff --git a/sysdeps/generic/wait.c b/sysdeps/generic/wait.c new file mode 100644 index 0000000000..6f1db03f2d --- /dev/null +++ b/sysdeps/generic/wait.c @@ -0,0 +1,34 @@ +/* Copyright (C) 1991, 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. */ + +#include <sys/wait.h> +#include <errno.h> + +/* Wait for a child to die. When one does, put its status in *STAT_LOC + and return its process ID. For errors, return (pid_t) -1. */ +__pid_t +__wait (stat_loc) + __WAIT_STATUS_DEFN stat_loc; +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (wait) + +weak_alias (__wait, wait) +#include <stub-tag.h> diff --git a/sysdeps/generic/wait3.c b/sysdeps/generic/wait3.c new file mode 100644 index 0000000000..4df9d420df --- /dev/null +++ b/sysdeps/generic/wait3.c @@ -0,0 +1,46 @@ +/* Copyright (C) 1991, 1993, 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. */ + +#include <errno.h> +#include <sys/wait.h> +#include <sys/types.h> + +/* Wait for a child to exit. When one does, put its status in *STAT_LOC and + return its process ID. For errors return (pid_t) -1. If USAGE is not nil, + store information about the child's resource usage (as a `struct rusage') + there. If the WUNTRACED bit is set in OPTIONS, return status for stopped + children; otherwise don't. */ +pid_t +__wait3 (stat_loc, options, usage) + __WAIT_STATUS_DEFN stat_loc; + int options; + struct rusage *usage; +{ + if ((options & ~(WNOHANG|WUNTRACED)) != 0) + { + __set_errno (EINVAL); + return (pid_t) -1; + } + + __set_errno (ENOSYS); + return (pid_t) -1; +} +stub_warning (wait3) + +weak_alias (__wait3, wait3) +#include <stub-tag.h> diff --git a/sysdeps/generic/wait4.c b/sysdeps/generic/wait4.c new file mode 100644 index 0000000000..d29d80c73e --- /dev/null +++ b/sysdeps/generic/wait4.c @@ -0,0 +1,36 @@ +/* Copyright (C) 1991, 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. */ + +#include <sys/types.h> +#include <sys/wait.h> +#include <errno.h> + +pid_t +__wait4 (pid, stat_loc, options, usage) + pid_t pid; + __WAIT_STATUS_DEFN stat_loc; + int options; + struct rusage *usage; +{ + __set_errno (ENOSYS); + return (pid_t) -1; +} +stub_warning (wait4) + +weak_alias (__wait4, wait4) +#include <stub-tag.h> diff --git a/sysdeps/generic/waitpid.c b/sysdeps/generic/waitpid.c new file mode 100644 index 0000000000..66d8915556 --- /dev/null +++ b/sysdeps/generic/waitpid.c @@ -0,0 +1,52 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <sys/wait.h> +#include <sys/types.h> + + +/* Wait for a child matching PID to die. + If PID is greater than 0, match any process whose process ID is PID. + If PID is (pid_t) -1, match any process. + If PID is (pid_t) 0, match any process with the + same process group as the current process. + If PID is less than -1, match any process whose + process group is the absolute value of PID. + If the WNOHANG bit is set in OPTIONS, and that child + is not already dead, return (pid_t) 0. If successful, + return PID and store the dead child's status in STAT_LOC. + Return (pid_t) -1 for errors. If the WUNTRACED bit is set in OPTIONS, + return status for stopped children; otherwise don't. */ +pid_t +__libc_waitpid (pid_t pid, int *stat_loc, int options) +{ + if ((options & ~(WNOHANG|WUNTRACED)) != 0) + { + __set_errno (EINVAL); + return (pid_t) -1; + } + + __set_errno (ENOSYS); + return (pid_t) -1; +} +weak_alias (__libc_waitpid, __waitpid) +weak_alias (__libc_waitpid, waitpid) + +stub_warning (waitpid) +#include <stub-tag.h> diff --git a/sysdeps/generic/write.c b/sysdeps/generic/write.c new file mode 100644 index 0000000000..6f98a83623 --- /dev/null +++ b/sysdeps/generic/write.c @@ -0,0 +1,48 @@ +/* Copyright (C) 1991, 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. */ + +#include <sysdep.h> +#include <errno.h> +#include <unistd.h> +#include <stddef.h> + +/* Write NBYTES of BUF to FD. Return the number written, or -1. */ +ssize_t +__libc_write (int fd, const void *buf, size_t nbytes) +{ + if (nbytes == 0) + return 0; + if (fd < 0) + { + __set_errno (EBADF); + return -1; + } + if (buf == NULL) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} +stub_warning (write) + +weak_alias (__libc_write, __write) +weak_alias (__libc_write, write) +#include <stub-tag.h> diff --git a/sysdeps/generic/writev.c b/sysdeps/generic/writev.c new file mode 100644 index 0000000000..fc6bc20095 --- /dev/null +++ b/sysdeps/generic/writev.c @@ -0,0 +1,40 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <unistd.h> +#include <sys/uio.h> + +/* Write data pointed by the buffers described by VECTOR, which + is a vector of COUNT `struct iovec's, to file descriptor FD. + The data is written in the order specified. + Operates just like `write' (see <unistd.h>) except that the data + are taken from VECTOR instead of a contiguous buffer. */ +int +__writev (fd, vector, count) + int fd; + const struct iovec *vector; + int count; +{ + __set_errno (ENOSYS); + return -1; +} +weak_alias (__writev, writev) + +stub_warning (writev) +#include <stub-tag.h> diff --git a/sysdeps/generic/xmknod.c b/sysdeps/generic/xmknod.c new file mode 100644 index 0000000000..6759801638 --- /dev/null +++ b/sysdeps/generic/xmknod.c @@ -0,0 +1,41 @@ +/* Copyright (C) 1991, 1993, 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. */ + +#include <errno.h> +#include <sys/types.h> +#include <sys/stat.h> + +/* Create a device file named PATH, with permission and special bits MODE + and device number DEV (which can be constructed from major and minor + device numbers with the `makedev' macro above). */ +int +__xmknod (int vers, const char *path, mode_t mode, dev_t *dev) +{ + if (vers != _MKNOD_VER) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} +stub_warning (__xmknod) + +weak_alias (__xmknod, _xmknod) +#include <stub-tag.h> diff --git a/sysdeps/generic/xstat.c b/sysdeps/generic/xstat.c new file mode 100644 index 0000000000..02f097f160 --- /dev/null +++ b/sysdeps/generic/xstat.c @@ -0,0 +1,39 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <sys/stat.h> +#include <stddef.h> + +/* Get file information about FILE in BUF. */ +int +__xstat (int vers, const char *file, struct stat *buf) +{ + if (vers != _STAT_VER || file == NULL || buf == NULL) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} +stub_warning (stat) + +weak_alias (__xstat, _xstat) +#include <stub-tag.h> diff --git a/sysdeps/generic/xstat64.c b/sysdeps/generic/xstat64.c new file mode 100644 index 0000000000..8d85360cb8 --- /dev/null +++ b/sysdeps/generic/xstat64.c @@ -0,0 +1,37 @@ +/* Copyright (C) 1991, 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. */ + +#include <errno.h> +#include <sys/stat.h> +#include <stddef.h> + +/* Get file information about FILE in BUF. */ +int +__xstat64 (int vers, const char *file, struct stat64 *buf) +{ + if (vers != _STAT_VER || file == NULL || buf == NULL) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} +stub_warning (stat64) +#include <stub-tag.h> |