diff options
author | Ulrich Drepper <drepper@redhat.com> | 1996-11-07 01:35:04 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1996-11-07 01:35:04 +0000 |
commit | b57910379e9a0fa1c6985840bbbe19b30595e361 (patch) | |
tree | 9bf68210227e7cc5022fdefaa8510313b651e709 /sysdeps | |
parent | 2c6fe0bd3b270fc644dd4c773f2d47b93f404efe (diff) | |
download | glibc-b57910379e9a0fa1c6985840bbbe19b30595e361.tar.gz glibc-b57910379e9a0fa1c6985840bbbe19b30595e361.tar.xz glibc-b57910379e9a0fa1c6985840bbbe19b30595e361.zip |
update from 961105, second try cvs/libc-961107
Diffstat (limited to 'sysdeps')
27 files changed, 423 insertions, 235 deletions
diff --git a/sysdeps/stub/getpagesize.c b/sysdeps/stub/getpagesize.c index 2c55df1a15..363151be21 100644 --- a/sysdeps/stub/getpagesize.c +++ b/sysdeps/stub/getpagesize.c @@ -1,26 +1,26 @@ /* Copyright (C) 1991, 1993, 1995, 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. + This file is part of the GNU C Library. -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see 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> /* Return the system page size. */ -size_t +int __getpagesize () { __set_errno (ENOSYS); diff --git a/sysdeps/stub/lchown.c b/sysdeps/stub/lchown.c new file mode 100644 index 0000000000..f3aa2a1425 --- /dev/null +++ b/sysdeps/stub/lchown.c @@ -0,0 +1,42 @@ +/* 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) diff --git a/sysdeps/stub/lockfile.c b/sysdeps/stub/lockfile.c index b3ccc7bca7..0328071c08 100644 --- a/sysdeps/stub/lockfile.c +++ b/sysdeps/stub/lockfile.c @@ -53,8 +53,8 @@ __internal_ftrylockfile (FILE *stream) return 1; } #ifdef USE_IN_LIBIO -weak_alias (__internal_ftrylockfile, __ftrylockfile) -#else weak_alias (__internal_ftrylockfile, _IO_ftrylockfile) +#else +weak_alias (__internal_ftrylockfile, __ftrylockfile) #endif weak_alias (__internal_ftrylockfile, ftrylockfile); diff --git a/sysdeps/stub/mkstemp.c b/sysdeps/stub/mkstemp.c index 47dd7125b3..ec78145ead 100644 --- a/sysdeps/stub/mkstemp.c +++ b/sysdeps/stub/mkstemp.c @@ -1,21 +1,22 @@ /* Copyright (C) 1992, 1995, 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. + This file is part of the GNU C Library. -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see 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> diff --git a/sysdeps/stub/mktemp.c b/sysdeps/stub/mktemp.c index 06fe3de0c4..7780140a7a 100644 --- a/sysdeps/stub/mktemp.c +++ b/sysdeps/stub/mktemp.c @@ -1,21 +1,22 @@ /* Copyright (C) 1991, 1995, 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. + This file is part of the GNU C Library. -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see 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> diff --git a/sysdeps/stub/sysconf.c b/sysdeps/stub/sysconf.c index 43ad6d93a9..00480fb2e9 100644 --- a/sysdeps/stub/sysconf.c +++ b/sysdeps/stub/sysconf.c @@ -1,20 +1,20 @@ /* Copyright (C) 1991, 1993, 1995, 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. + This file is part of the GNU C Library. -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see 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> @@ -87,6 +87,60 @@ __sysconf (name) 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: @@ -150,6 +204,9 @@ __sysconf (name) 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: @@ -169,6 +226,21 @@ __sysconf (name) 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; } diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h index 72d84047c2..e27909ad9b 100644 --- a/sysdeps/unix/alpha/sysdep.h +++ b/sysdeps/unix/alpha/sysdep.h @@ -1,20 +1,21 @@ /* Copyright (C) 1992, 1995, 1996 Free Software Foundation, Inc. + This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include <sysdeps/unix/sysdep.h> @@ -27,36 +28,24 @@ Cambridge, MA 02139, USA. */ #endif #ifdef __STDC__ -#define LEAF(name, framesize) \ - .globl name; \ - .align 3; \ - .ent name, 0; \ - name##: \ - .frame sp, framesize, ra +#define __LABEL(x) x##: #else +#define __LABEL(x) x/**/: +#endif + #define LEAF(name, framesize) \ .globl name; \ .align 3; \ .ent name, 0; \ - name/**/: \ + __LABEL(name) \ .frame sp, framesize, ra -#endif -#ifdef __STDC__ -#define ENTRY(name) \ - .globl name; \ - .align 3; \ - .ent name, 0; \ - name##: \ - .frame sp, 0, ra -#else #define ENTRY(name) \ .globl name; \ .align 3; \ .ent name, 0; \ - name/**/: \ + __LABEL(name) \ .frame sp, 0, ra -#endif /* Mark the end of function SYM. */ #undef END @@ -64,16 +53,20 @@ Cambridge, MA 02139, USA. */ /* Note that PSEUDO/PSEUDO_END use label number 1996---do not use a label of that number between those two macros! */ - -#ifdef __STDC__ + +#ifdef PROF #define PSEUDO(name, syscall_name, args) \ .globl name; \ .align 3; \ .ent name,0; \ - \ -name##: \ - .frame sp, 0, ra \ - .prologue 1; /* yes, we do use gp */ \ +__LABEL(name) \ + .frame sp, 0, ra; \ + ldgp gp,0(pv); \ + .set noat; \ + lda AT,_mcount; \ + jsr AT,(AT),_mcount; \ + .set at; \ + .prologue 1; \ ldiq v0, SYS_ify(syscall_name); \ .set noat; \ call_pal PAL_callsys; \ @@ -85,10 +78,9 @@ name##: \ .globl name; \ .align 3; \ .ent name,0; \ - \ -name/**/: \ +__LABEL(name) \ .frame sp, 0, ra \ - .prologue 1; /* yes, we do use gp */ \ + .prologue 0; \ ldiq v0, SYS_ify(syscall_name); \ .set noat; \ call_pal PAL_callsys; \ @@ -98,13 +90,19 @@ name/**/: \ #endif #undef PSEUDO_END - +#ifdef PROF +#define PSEUDO_END(sym) \ +1996: \ + jmp zero, __syscall_error; \ + END(sym) +#else #define PSEUDO_END(sym) \ 1996: \ br gp, 2f; \ 2: ldgp gp, 0(gp); \ jmp zero, __syscall_error; \ END(sym) +#endif #define r0 v0 #define r1 a4 diff --git a/sysdeps/unix/getpagesize.c b/sysdeps/unix/getpagesize.c index 399126e5a1..3470ac7dff 100644 --- a/sysdeps/unix/getpagesize.c +++ b/sysdeps/unix/getpagesize.c @@ -1,27 +1,27 @@ -/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc. -This file is part of the GNU C Library. +/* Copyright (C) 1991, 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 General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. + The GNU C Library is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with the GNU C Library; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ -#include <ansidecl.h> -#include <stddef.h> +#include <unistd.h> #include <sys/param.h> /* Return the system page size. */ -size_t -DEFUN_VOID(__getpagesize) +int +__getpagesize () { #ifdef EXEC_PAGESIZE return EXEC_PAGESIZE; diff --git a/sysdeps/unix/sysdep.h b/sysdeps/unix/sysdep.h index f5845dc7db..f18b2656b1 100644 --- a/sysdeps/unix/sysdep.h +++ b/sysdeps/unix/sysdep.h @@ -1,20 +1,20 @@ /* Copyright (C) 1991, 92, 93, 96 Free Software Foundation, Inc. -This file is part of the GNU C Library. + This file is part of the GNU C Library. -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include <sysdeps/generic/sysdep.h> @@ -44,4 +44,6 @@ Cambridge, MA 02139, USA. */ /* Terminate a system call named SYM. This is used on some platforms to generate correct debugging information. */ +#ifndef PSEUDO_END #define PSEUDO_END(sym) +#endif diff --git a/sysdeps/unix/sysv/linux/Dist b/sysdeps/unix/sysv/linux/Dist index ef0dfbce89..365f0468ac 100644 --- a/sysdeps/unix/sysv/linux/Dist +++ b/sysdeps/unix/sysv/linux/Dist @@ -1,4 +1,5 @@ init-first.h +siglist.h sysctl.c termio.h net/if.h diff --git a/sysdeps/unix/sysv/linux/alpha/brk.S b/sysdeps/unix/sysv/linux/alpha/brk.S index 75be949aff..d31d9e9b4d 100644 --- a/sysdeps/unix/sysv/linux/alpha/brk.S +++ b/sysdeps/unix/sysv/linux/alpha/brk.S @@ -38,6 +38,10 @@ __curbrk: .skip 8 .text LEAF(__brk, 0) ldgp gp, 0(t12) +#ifdef PROF + lda AT, _mcount + jsr AT, (AT), _mcount +#endif .prologue 1 ldiq v0, __NR_brk diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S index 71d8053b12..9dbf3034c9 100644 --- a/sysdeps/unix/sysv/linux/alpha/clone.S +++ b/sysdeps/unix/sysv/linux/alpha/clone.S @@ -32,6 +32,10 @@ ENTRY(__clone) /* Save rest of argument registers for varargs-type work. */ stq a4,0(sp) stq a5,8(sp) +#ifdef PROF + lda AT, _mcount + jsr AT, (AT), _mcount +#endif .prologue 1 /* Sanity check arguments. */ diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S index e09fa738e2..1176a2730f 100644 --- a/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S +++ b/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S @@ -22,9 +22,17 @@ Cambridge, MA 02139, USA. */ .text -LEAF(__ieee_get_fp_control, 8) - lda sp, -8(sp) +LEAF(__ieee_get_fp_control, 16) +#ifdef PROF + ldgp gp, 0(pv) + lda sp, -16(sp) + lda AT, _mcount + jsr AT, (AT), _mcount .prologue 1 +#else + lda sp, -16(sp) + .prologue 0 +#endif mov sp, a1 ldi a0, GSI_IEEE_FP_CONTROL @@ -33,12 +41,14 @@ LEAF(__ieee_get_fp_control, 8) bne a3, error ldq v0, 0(sp) - lda sp, 8(sp) + lda sp, 16(sp) ret -error: lda sp, 8(sp) +error: lda sp, 16(sp) +#ifndef PROF br gp, 1f 1: ldgp gp, 0(gp) +#endif jmp zero, __syscall_error END(__ieee_get_fp_control) diff --git a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S index d748c81142..aa761ecaca 100644 --- a/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S +++ b/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S @@ -20,9 +20,17 @@ Cambridge, MA 02139, USA. */ #define SSI_IEEE_FP_CONTROL 14 -LEAF(__ieee_set_fp_control, 8) - lda sp, -8(sp) +LEAF(__ieee_set_fp_control, 16) +#ifdef PROF + ldgp gp, 0(sp) + lda sp, -16(sp) + lda AT, _mcount + jsr AT, (AT), _mcount .prologue 1 +#else + lda sp, -16(sp) + .prologue 0 +#endif stq a0, 0(sp) mov sp, a1 @@ -30,13 +38,16 @@ LEAF(__ieee_set_fp_control, 8) ldi v0, __NR_osf_setsysinfo call_pal PAL_callsys - lda sp, 8(sp) + lda sp, 16(sp) bne a3, error ret -error: br gp, 1f +error: +#ifndef PROF + br gp, 1f 1: ldgp gp, 0(gp) +#endif jmp zero, __syscall_error END(__ieee_set_fp_control) diff --git a/sysdeps/unix/sysv/linux/alpha/llseek.S b/sysdeps/unix/sysv/linux/alpha/llseek.S index 6020f263cd..45fb349236 100644 --- a/sysdeps/unix/sysv/linux/alpha/llseek.S +++ b/sysdeps/unix/sysv/linux/alpha/llseek.S @@ -24,7 +24,14 @@ Cambridge, MA 02139, USA. */ .text ENTRY(llseek) +#ifdef PROF + ldgp gp, 0(pv) + lda AT, _mcount + jsr AT, (AT), _mcount .prologue 1 +#else + .prologue 0 +#endif sll a1, 32, a1 /* build a 64 bit ofs out of 32 bit operands */ zap a2, 0xf0, a2 @@ -40,8 +47,11 @@ ENTRY(llseek) stq v0, 0(t0) ret -error: br gp, 1f +error: +#ifndef PROF + br gp, 1f 1: ldgp gp, 0(gp) +#endif jmp zero, __syscall_error END(llseek) diff --git a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S index aaae9a308a..83d331fef0 100644 --- a/sysdeps/unix/sysv/linux/alpha/sigsuspend.S +++ b/sysdeps/unix/sysv/linux/alpha/sigsuspend.S @@ -24,7 +24,14 @@ Cambridge, MA 02139, USA. */ .text LEAF(sigsuspend, 0) +#ifdef PROF + ldgp gp, 0(pv) + lda AT, _mcount + jsr AT, (AT), _mcount .prologue 1 +#else + .prologue 0 +#endif ldq a0, 0(a0) ldi v0, __NR_sigsuspend @@ -32,8 +39,11 @@ LEAF(sigsuspend, 0) bne a3, error ret -error: br gp, 1f +error: +#ifndef PROF + br gp, 1f 1: ldgp gp, 0(gp) +#endif jmp zero, __syscall_error END(sigsuspend) diff --git a/sysdeps/unix/sysv/linux/alpha/syscall.S b/sysdeps/unix/sysv/linux/alpha/syscall.S index f1b36e9312..81043c2cdb 100644 --- a/sysdeps/unix/sysv/linux/alpha/syscall.S +++ b/sysdeps/unix/sysv/linux/alpha/syscall.S @@ -42,6 +42,15 @@ Cambridge, MA 02139, USA. */ LEAF(__syscall, 0) +#ifdef PROF + ldgp gp, 0(pv) + lda AT, _mcount + jsr AT, (AT), _mcount + .prologue 1 +#else + .prologue 0 +#endif + mov a0, v0 /* Syscall number -> v0 */ mov a1, a0 /* arg1-arg5 -> a0-a4 */ mov a2, a1 @@ -53,8 +62,11 @@ LEAF(__syscall, 0) bne a3, error ret -error: br gp, 2f +error: +#ifndef PROF + br gp, 2f 2: ldgp gp, 0(gp) +#endif jmp zero, __syscall_error weak_alias(__syscall, syscall) diff --git a/sysdeps/unix/sysv/linux/getpriority.c b/sysdeps/unix/sysv/linux/getpriority.c index 6dd56cce8b..dba7cb3b41 100644 --- a/sysdeps/unix/sysv/linux/getpriority.c +++ b/sysdeps/unix/sysv/linux/getpriority.c @@ -1,20 +1,20 @@ /* getpriority for Linux. -Copyright (C) 1996 Free Software Foundation, Inc. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ + Copyright (C) 1996 Free Software Foundation, Inc. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include <errno.h> #include <sys/resource.h> diff --git a/sysdeps/unix/sysv/linux/i386/syscall.S b/sysdeps/unix/sysv/linux/i386/syscall.S index 018a86ee39..6a020e0d0e 100644 --- a/sysdeps/unix/sysv/linux/i386/syscall.S +++ b/sysdeps/unix/sysv/linux/i386/syscall.S @@ -1,25 +1,25 @@ /* Copyright (C) 1995, 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. + This file is part of the GNU C Library. -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see 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> /* Please consult the file sysdeps/unix/sysv/linux/i386/sysdep.h for - more information about the value -125 used below.*/ + more information about the value -4095 used below.*/ .text ENTRY (syscall) @@ -29,7 +29,7 @@ ENTRY (syscall) movl 16(%esp), %eax /* Load syscall number into %eax. */ int $0x80 /* Do the system call. */ POPARGS_5 /* Restore register contents. */ - cmpl $-125, %eax /* Check %eax for error. */ + cmpl $-4095, %eax /* Check %eax for error. */ jae syscall_error /* Jump to error handler if error. */ ret /* Return to caller. */ diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.S b/sysdeps/unix/sysv/linux/i386/sysdep.S index c9c78842d8..d676004084 100644 --- a/sysdeps/unix/sysv/linux/i386/sysdep.S +++ b/sysdeps/unix/sysv/linux/i386/sysdep.S @@ -1,20 +1,20 @@ /* Copyright (C) 1995, 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. + This file is part of the GNU C Library. -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see 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> @@ -54,7 +54,11 @@ ENTRY (__syscall_error) #endif /* !PIC */ -ENTRY (__errno_location) + .weak __errno_location + .type __errno_location,@function + .align 16 +__errno_location: + CALL_MCOUNT #ifdef PIC call .L2 .L2: popl %ecx diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h index 5d378fd179..7418982c2a 100644 --- a/sysdeps/unix/sysv/linux/i386/sysdep.h +++ b/sysdeps/unix/sysv/linux/i386/sysdep.h @@ -40,16 +40,15 @@ Cambridge, MA 02139, USA. */ negative even if the call succeeded. E.g., the `lseek' system call might return a large offset. Therefore we must not anymore test for < 0, but test for a real error by making sure the value in %eax - is a real error number. For now (as of 2.1.1) 122 is the largest - defined error number. Given a bit room for development, Linus - chose in <asm/unistd.h> to use the values -125 to -1 for error - values. We follow him here. */ + is a real error number. Linus said he will make sure the no syscall + returns a value in -1 .. -4095 as a valid result so we can savely + test with -4095. */ #undef PSEUDO #define PSEUDO(name, syscall_name, args) \ .text; \ ENTRY (name) \ DO_CALL (args, syscall_name); \ - cmpl $-125, %eax; \ + cmpl $-4095, %eax; \ jae syscall_error; #undef PSEUDO_END diff --git a/sysdeps/unix/sysv/linux/m68k/syscall.S b/sysdeps/unix/sysv/linux/m68k/syscall.S index b7417aa911..d2328dc545 100644 --- a/sysdeps/unix/sysv/linux/m68k/syscall.S +++ b/sysdeps/unix/sysv/linux/m68k/syscall.S @@ -1,25 +1,25 @@ /* Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. + This file is part of the GNU C Library. -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see 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> /* Please consult the file sysdeps/unix/sysv/linux/m68k/sysdep.h for - more information about the value -128 used below.*/ + more information about the value -4096 used below.*/ .text ENTRY (syscall) @@ -27,7 +27,7 @@ ENTRY (syscall) _DOARGS_5 (24) /* Frob arguments. */ trap &0 /* Do the system call. */ UNDOARGS_5 /* Unfrob arguments. */ - moveq.l &-128, %d1 + moveq.l &-4096, %d1 cmp.l %d1, %d0 /* Check %d0 for error. */ jcc syscall_error /* Jump to error handler if negative. */ rts /* Return to caller. */ diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.S b/sysdeps/unix/sysv/linux/m68k/sysdep.S index 7016a26a60..95e63542ee 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.S +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.S @@ -1,20 +1,20 @@ /* Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. + This file is part of the GNU C Library. -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see 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> @@ -62,7 +62,11 @@ __syscall_error: END (__syscall_error) #endif /* PIC */ -ENTRY (__errno_location) + .weak __errno_location + .type __errno_location,@function + .align 4 +__errno_location: + CALL_MCOUNT #ifdef PIC move.l (%pc, errno@GOTPC), %a0 #else diff --git a/sysdeps/unix/sysv/linux/m68k/sysdep.h b/sysdeps/unix/sysv/linux/m68k/sysdep.h index 3366caab45..46d5a7e48f 100644 --- a/sysdeps/unix/sysv/linux/m68k/sysdep.h +++ b/sysdeps/unix/sysv/linux/m68k/sysdep.h @@ -74,14 +74,13 @@ Cambridge, MA 02139, USA. */ even if the call succeeded. E.g., the `lseek' system call might return a large offset. Therefore we must not anymore test for < 0, but test for a real error by making sure the value in %d0 is a real error - number. For now (as of 2.1.1) 122 is the largest defined error number. - We allow for a bit of room for development and treat -128 to -1 as - error values. */ + number. Linus said he will make sure the no syscall returns a value + in -1 .. -4095 as a valid result so we can savely test with -4096. */ #define PSEUDO(name, syscall_name, args) \ .text; \ ENTRY (name) \ DO_CALL (&SYS_ify (syscall_name), args); \ - moveq.l &-128, %d1; \ + moveq.l &-4096, %d1; \ cmp.l %d1, %d0; \ jcc syscall_error diff --git a/sysdeps/unix/sysv/linux/paths.h b/sysdeps/unix/sysv/linux/paths.h index 80b6362701..2905e9effd 100644 --- a/sysdeps/unix/sysv/linux/paths.h +++ b/sysdeps/unix/sysv/linux/paths.h @@ -56,6 +56,7 @@ #define _PATH_MOUNTED "/etc/mtab" #define _PATH_NOLOGIN "/etc/nologin" #define _PATH_SENDMAIL "/usr/sbin/sendmail" +#define _PATH_SHADOW "/etc/shadow" #define _PATH_SHELLS "/etc/shells" #define _PATH_TTY "/dev/tty" #define _PATH_UNIX "/vmlinux" diff --git a/sysdeps/unix/sysv/linux/posix_opt.h b/sysdeps/unix/sysv/linux/posix_opt.h index 8a6fad0eb1..a467acfb48 100644 --- a/sysdeps/unix/sysv/linux/posix_opt.h +++ b/sysdeps/unix/sysv/linux/posix_opt.h @@ -1,21 +1,21 @@ /* Define POSIX options for Linux. -Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. + 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 free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _POSIX_OPT_H #define _POSIX_OPT_H 1 @@ -63,4 +63,7 @@ Boston, MA 02111-1307, USA. */ /* Filenames are not silently truncated. */ #define _POSIX_NO_TRUNC 1 +/* XPG4.2 shared memory is supported. */ +#define _XOPEN_SHM 1 + #endif /* posix_opt.h */ diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list index 129951a6dd..01ca1bc8bb 100644 --- a/sysdeps/unix/sysv/linux/syscalls.list +++ b/sysdeps/unix/sysv/linux/syscalls.list @@ -20,7 +20,7 @@ ioperm - ioperm 3 ioperm iopl - iopl 1 iopl ipc msgget ipc 5 __ipc klogctl EXTRA syslog 3 klogctl -llseek EXTRA _llseek 5 _llseek +llseek EXTRA _llseek 5 _llseek llseek mlock EXTRA mlock 2 __mlock mlock mlockall EXTRA mlockall 1 __mlockall mlockall mount EXTRA mount 5 __mount mount |