From 51702635af8445431054291c86aaace7c30b0970 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 7 May 1997 15:31:21 +0000 Subject: Update. * locale/categories.def: Change type of _NL_CTYPE_CLASS_NAMES and _NL_CTYPE_MAP_NAMES field to stringlist. Change name of _NL_CTYPE_CODESET_NAME to "charmap". * locale/localeinfo.h (enum value_type): Add stringlist. * locale/programs/locale.c (show_info): Handle stringlist. * locale/programs/charmap.c (charmap_read): If charmap file is not using the given name try to find it by looking through all available charmap files and compare the code set name. * locale/programs/locale.c (write_charmaps): Also print names of charset in fields in the files. * elf/ldd.bash.in: Correct translatable strings. * posix/TESTS: Add some more tests for character class matching. * posix/regex.c: Merge with GNU awk version. (regex_compile): Use ISO C/amend 1 functions for character class handling. * posix/regex.h: Merge with GNU awk version. * posix/getopt.c: Declare as master copies. * posix/getopt1.c: Likewise. * posix/getopt.h: Likewise. * sysdeps/unix/sysv/linux/sys/mount.h: Add definitions for option value to mount functions. Patch by a sun . * stdio-common/bug4.c (main): Use /tmp/bug4.test for concurrency with other tests. * sunrpc/svc_run.c (svc_exit): New, defined. (svc_run): Test for svc_stop variable. * sysdeps/m68k/s_cexp.c: Rewritten. * sysdeps/m68k/s_cexpf.c: Likewise. * sysdeps/m68k/s_cexpl.c: Likewise. --- sysdeps/unix/sysv/linux/abi-tag.h | 8 ++-- sysdeps/unix/sysv/linux/alpha/brk.S | 12 +++++- sysdeps/unix/sysv/linux/alpha/clone.S | 13 +++++-- sysdeps/unix/sysv/linux/sys/mount.h | 70 ++++++++++++++++++++++++++++++++++- 4 files changed, 94 insertions(+), 9 deletions(-) (limited to 'sysdeps/unix/sysv/linux') diff --git a/sysdeps/unix/sysv/linux/abi-tag.h b/sysdeps/unix/sysv/linux/abi-tag.h index 166e6a1..6c71eec 100644 --- a/sysdeps/unix/sysv/linux/abi-tag.h +++ b/sysdeps/unix/sysv/linux/abi-tag.h @@ -10,7 +10,9 @@ #define ABI_LINUX_MINOR 0 #define ABI_LINUX_PATCH 0 -#define ABI_TAG ((ABI_LINUX_TAG << 24) | \ - (ABI_LINUX_MAJOR << 16) | \ - (ABI_LINUX_MINOR << 8) | \ +/* Don't use `|' in this expression, it is a comment character in the + assembler. */ +#define ABI_TAG ((ABI_LINUX_TAG << 24) + \ + (ABI_LINUX_MAJOR << 16) + \ + (ABI_LINUX_MINOR << 8) + \ (ABI_LINUX_PATCH << 0)) diff --git a/sysdeps/unix/sysv/linux/alpha/brk.S b/sysdeps/unix/sysv/linux/alpha/brk.S index f44686b..74fef64 100644 --- a/sysdeps/unix/sysv/linux/alpha/brk.S +++ b/sysdeps/unix/sysv/linux/alpha/brk.S @@ -37,8 +37,9 @@ __curbrk: .skip 8 #endif .text -LEAF(__brk, 0) +LEAF(__brk, 8) ldgp gp, 0(t12) + subq sp, 8, sp #ifdef PROF .set noat lda AT, _mcount @@ -47,9 +48,14 @@ LEAF(__brk, 0) #endif .prologue 1 + /* Save the requested brk across the system call. */ + stq a0, 0(sp) + ldiq v0, __NR_brk call_pal PAL_callsys + ldq a0, 0(sp) + /* Be prepared for an OSF-style brk. */ bne a3, $err1 beq v0, $ok @@ -62,11 +68,13 @@ LEAF(__brk, 0) /* Update __curbrk and return cleanly. */ mov zero, v0 $ok: stq a0, __curbrk + addq sp, 8, sp ret /* What a horrible way to die. */ $err0: ldi v0, ENOMEM -$err1: jmp zero, __syscall_error +$err1: addq sp, 8, sp + jmp zero, __syscall_error END(__brk) diff --git a/sysdeps/unix/sysv/linux/alpha/clone.S b/sysdeps/unix/sysv/linux/alpha/clone.S index 5d36e25..aab4e59 100644 --- a/sysdeps/unix/sysv/linux/alpha/clone.S +++ b/sysdeps/unix/sysv/linux/alpha/clone.S @@ -42,9 +42,12 @@ ENTRY(__clone) beq a0,$error /* no NULL function pointers */ beq a1,$error /* no NULL stack pointers */ + /* Save the fn ptr and arg on the new stack. */ + subq a1,16,a1 + stq a0,0(a1) + stq a3,8(a1) + /* Do the system call */ - mov a0,pv /* get fn ptr out of the way */ - mov a3,t0 /* get fn arg out of the way */ mov a2,a0 ldiq v0,__NR_clone call_pal PAL_callsys @@ -73,8 +76,12 @@ thread_start: mov zero,fp .prologue 0 + /* Load up the arguments. */ + ldq pv,0(sp) + ldq a0,8(sp) + addq sp,16,sp + /* Call the user's function */ - mov t0,a0 jsr ra,(pv) ldgp gp,0(ra) diff --git a/sysdeps/unix/sysv/linux/sys/mount.h b/sysdeps/unix/sysv/linux/sys/mount.h index 59a1aa4..08a2e31 100644 --- a/sysdeps/unix/sysv/linux/sys/mount.h +++ b/sysdeps/unix/sysv/linux/sys/mount.h @@ -1,5 +1,5 @@ /* Header file for mounting/unmount Linux filesystems. - Copyright (C) 1996 Free Software Foundation, Inc. + 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 @@ -17,13 +17,81 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* This is taken from /usr/include/linux/fs.h. */ + #ifndef _SYS_MOUNT_H #define _SYS_MOUNT_H 1 #include +#include + __BEGIN_DECLS +#define BLOCK_SIZE 1024 +#define BLOCK_SIZE_BITS 10 + + +/* These are the fs-independent mount-flags: up to 16 flags are + supported */ +#define MS_RDONLY 1 /* Mount read-only. */ +#define MS_NOSUID 2 /* Ignore suid and sgid bits. */ +#define MS_NODEV 4 /* Disallow access to device special files. */ +#define MS_NOEXEC 8 /* Disallow program execution. */ +#define MS_SYNCHRONOUS 16 /* Writes are synced at once. */ +#define MS_REMOUNT 32 /* Alter flags of a mounted FS. */ +#define MS_MANDLOCK 64 /* Allow mandatory locks on an FS. */ +#define S_WRITE 128 /* Write on file/directory/symlink. */ +#define S_APPEND 256 /* Append-only file. */ +#define S_IMMUTABLE 512 /* Immutable file. */ +#define MS_NOATIME 1024 /* Do not update access times. */ + + +/* Flags that can be altered by MS_REMOUNT */ +#define MS_RMT_MASK (MS_RDONLY | MS_MANDLOCK) + + +/* Magic mount flag number. Has to be or-ed to the flag values. */ + +#define MS_MGC_VAL 0xc0ed0000 /* Magic flag number to indicate "new" flags */ +#define MS_MGC_MSK 0xffff0000 /* Magic flag number mask */ + + +/* Note that read-only etc flags are inode-specific: setting some + file-system flags just means all the inodes inherit those flags by + default. It might be possible to override it selectively if you + really wanted to with some ioctl() that is not currently + implemented. + + Exception: MS_RDONLY is always applied to the entire file system. */ +#define IS_RDONLY(inode) \ + (((inode)->i_sb) && ((inode)->i_sb->s_flags & MS_RDONLY)) +#define DO_UPDATE_ATIME(inode) \ + (!((inode)->i_flags & MS_NOATIME) && !IS_RDONLY (inode)) +#define IS_NOSUID(inode) ((inode)->i_flags & MS_NOSUID) +#define IS_NODEV(inode) ((inode)->i_flags & MS_NODEV) +#define IS_NOEXEC(inode) ((inode)->i_flags & MS_NOEXEC) +#define IS_SYNC(inode) ((inode)->i_flags & MS_SYNCHRONOUS) +#define IS_MANDLOCK(inode) ((inode)->i_flags & MS_MANDLOCK) + +#define IS_WRITABLE(inode) ((inode)->i_flags & S_WRITE) +#define IS_APPEND(inode) ((inode)->i_flags & S_APPEND) +#define IS_IMMUTABLE(inode) ((inode)->i_flags & S_IMMUTABLE) + + +/* The read-only stuff doesn't really belong here, but any other place + is probably as bad and I don't want to create yet another include + file. */ + +#define BLKROSET _IO(0x12, 93) /* Set device read-only (0 = read-write). */ +#define BLKROGET _IO(0x12, 94) /* Get read-only status (0 = read_write). */ +#define BLKRRPART _IO(0x12, 95) /* Re-read partition table. */ +#define BLKGETSIZE _IO(0x12, 96) /* Return device size. */ +#define BLKFLSBUF _IO(0x12, 97) /* Flush buffer cache. */ +#define BLKRASET _IO(0x12, 98) /* Set read ahead for block device. */ +#define BLKRAGET _IO(0x12, 99) /* Get current read ahead setting. */ + + /* Mount a filesystem. */ extern int mount __P ((__const char *__special_file, __const char *__dir, __const char *__fstype, unsigned long int __rwflag, -- cgit v1.1