[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commits] r18138 - in /fsf/trunk/libc: ./ nptl/ nptl/sysdeps/x86_64/ sysdeps/unix/ sysdeps/unix/common/ sysdeps/unix/sysv/ sysdeps/uni...
- To: commits@xxxxxxxxxx
- Subject: [Commits] r18138 - in /fsf/trunk/libc: ./ nptl/ nptl/sysdeps/x86_64/ sysdeps/unix/ sysdeps/unix/common/ sysdeps/unix/sysv/ sysdeps/uni...
- From: eglibc@xxxxxxxxxx
- Date: Sat, 21 Apr 2012 00:01:28 -0000
Author: eglibc
Date: Sat Apr 21 00:01:27 2012
New Revision: 18138
Log:
Import glibc-mainline for 2012-04-21
Removed:
fsf/trunk/libc/sysdeps/unix/common/lxstat.c
fsf/trunk/libc/sysdeps/unix/fxstat.c
fsf/trunk/libc/sysdeps/unix/getppid.S
fsf/trunk/libc/sysdeps/unix/mkdir.c
fsf/trunk/libc/sysdeps/unix/rmdir.c
fsf/trunk/libc/sysdeps/unix/siglist.c
fsf/trunk/libc/sysdeps/unix/sysv/Makefile
fsf/trunk/libc/sysdeps/unix/sysv/bits/
fsf/trunk/libc/sysdeps/unix/sysv/direct.h
fsf/trunk/libc/sysdeps/unix/sysv/i386/
fsf/trunk/libc/sysdeps/unix/sysv/setrlimit.c
fsf/trunk/libc/sysdeps/unix/sysv/settimeofday.c
fsf/trunk/libc/sysdeps/unix/sysv/sigaction.c
fsf/trunk/libc/sysdeps/unix/sysv/sysv_termio.h
fsf/trunk/libc/sysdeps/unix/sysv/tcdrain.c
fsf/trunk/libc/sysdeps/unix/sysv/tcflow.c
fsf/trunk/libc/sysdeps/unix/sysv/tcflush.c
fsf/trunk/libc/sysdeps/unix/sysv/tcgetattr.c
fsf/trunk/libc/sysdeps/unix/sysv/tcgetpgrp.c
fsf/trunk/libc/sysdeps/unix/sysv/tcsendbrk.c
fsf/trunk/libc/sysdeps/unix/sysv/tcsetattr.c
fsf/trunk/libc/sysdeps/unix/sysv/tcsetpgrp.c
fsf/trunk/libc/sysdeps/unix/xmknod.c
fsf/trunk/libc/sysdeps/unix/xstat.c
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/nptl/ChangeLog
fsf/trunk/libc/nptl/sysdeps/x86_64/tls.h
fsf/trunk/libc/sysdeps/unix/common/syscalls.list
fsf/trunk/libc/sysdeps/unix/syscalls.list
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Sat Apr 21 00:01:27 2012
@@ -1,3 +1,56 @@
+2012-04-20 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/unix/common/lxstat.c: Remove file.
+ * sysdeps/unix/common/syscalls.list (sys_lstat): Remove.
+
+ * sysdeps/unix/sysv/Makefile: Remove file.
+
+ * sysdeps/unix/sysv/direct.h: Remove file.
+
+ * sysdeps/unix/sysv/bits/dirent.h: Remove file.
+ * sysdeps/unix/sysv/bits/fcntl.h: Likewise.
+ * sysdeps/unix/sysv/bits/local_lim.h: Likewise.
+ * sysdeps/unix/sysv/bits/signum.h: Likewise.
+ * sysdeps/unix/sysv/bits/stat.h: Likewise.
+ * sysdeps/unix/sysv/bits/utmp.h: Likewise.
+ * sysdeps/unix/sysv/bits/utsname.h: Likewise.
+
+ * sysdeps/unix/sysv/setrlimit.c: Remove file.
+
+ * sysdeps/unix/xmknod.c: Remove file.
+ * sysdeps/unix/syscalls.list (sys_mknod): Remove.
+
+ * sysdeps/unix/sysv/settimeofday.c: Remove file.
+
+ * sysdeps/unix/sysv/i386/time.S: Remove file.
+
+ * sysdeps/unix/fxstat.c: Remove file.
+ * sysdeps/unix/xstat.c: Likewise.
+ * sysdeps/unix/syscalls.list (sys_fstat, sys_stat): Remove.
+
+ * sysdeps/unix/sysv/sigaction.c: Remove file.
+
+ * sysdeps/unix/sysv/Makefile [termio.h not in sysdep_headers]
+ (sysdep_headers): Remove variable.
+ [termio.h not in sysdep_headers] (generated): Likewise.
+ [termio.h not in sysdep_headers] ($(objpfx)termio.h): Remove rule.
+ * sysdeps/unix/sysv/sysv_termio.h: Remove file.
+ * sysdeps/unix/sysv/tcdrain.c: Likewise.
+ * sysdeps/unix/sysv/tcflow.c: Likewise.
+ * sysdeps/unix/sysv/tcflush.c: Likewise.
+ * sysdeps/unix/sysv/tcgetattr.c: Likewise.
+ * sysdeps/unix/sysv/tcgetpgrp.c: Likewise.
+ * sysdeps/unix/sysv/tcsendbrk.c: Likewise.
+ * sysdeps/unix/sysv/tcsetattr.c: Likewise.
+ * sysdeps/unix/sysv/tcsetpgrp.c: Likewise.
+
+ * sysdeps/unix/siglist.c: Remove file.
+
+ * sysdeps/unix/getppid.S: Remove file.
+
+ * sysdeps/unix/mkdir.c: Remove file.
+ * sysdeps/unix/rmdir.c: Likewise.
+
2012-04-19 Andreas Schwab <schwab@xxxxxxxxxxxxxx>
* sysdeps/gnu/errlist-compat.awk (END): Correct computation of
Modified: fsf/trunk/libc/nptl/ChangeLog
==============================================================================
--- fsf/trunk/libc/nptl/ChangeLog (original)
+++ fsf/trunk/libc/nptl/ChangeLog Sat Apr 21 00:01:27 2012
@@ -1,3 +1,7 @@
+2012-04-20 Paul Pluzhnikov <ppluzhnikov@xxxxxxxxxx>
+
+ * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
+
2012-03-27 David S. Miller <davem@xxxxxxxxxxxxx>
* tst-cond16.c (do_test): Use a thread stack size which is either
Modified: fsf/trunk/libc/nptl/sysdeps/x86_64/tls.h
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/x86_64/tls.h (original)
+++ fsf/trunk/libc/nptl/sysdeps/x86_64/tls.h Sat Apr 21 00:01:27 2012
@@ -1,5 +1,5 @@
/* Definition for thread-local data handling. nptl/x86_64 version.
- Copyright (C) 2002-2007, 2008, 2009, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2002-2009, 2011-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -133,13 +133,6 @@
(((tcbhead_t *) (descr))->dtv)
-/* Macros to load from and store into segment registers. */
-# define TLS_GET_FS() \
- ({ int __seg; __asm ("movl %%fs, %0" : "=q" (__seg)); __seg; })
-# define TLS_SET_FS(val) \
- __asm ("movl %0, %%fs" :: "q" (val))
-
-
/* Code to initially initialize the thread pointer. This might need
special attention since 'errno' is not yet available and if the
operation can cause a failure 'errno' must not be touched.
Removed: fsf/trunk/libc/sysdeps/unix/common/lxstat.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/common/lxstat.c (original)
+++ fsf/trunk/libc/sysdeps/unix/common/lxstat.c (removed)
@@ -1,38 +1,0 @@
-/* lxstat using old-style Unix lstat system call.
- Copyright (C) 1991,1995,1996,1997,2000,2002 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <stddef.h>
-#include <sys/stat.h>
-#include <bp-checks.h>
-
-extern int __syscall_lstat (const char *__unbounded, struct stat *__unbounded);
-
-int
-__lxstat (int vers, const char *file, struct stat *buf)
-{
- if (vers != _STAT_VER)
- {
- __set_errno (EINVAL);
- return -1;
- }
-
- return __syscall_lstat (CHECK_STRING (file), CHECK_1 (buf));
-}
-hidden_def (__lxstat)
-weak_alias (__lxstat, _lxstat)
Modified: fsf/trunk/libc/sysdeps/unix/common/syscalls.list
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/common/syscalls.list (original)
+++ fsf/trunk/libc/sysdeps/unix/common/syscalls.list Sat Apr 21 00:01:27 2012
@@ -11,6 +11,5 @@
setregid - setregid i:ii __setregid setregid
setreuid - setreuid i:ii __setreuid setreuid
sigaction - sigaction i:ipp __sigaction sigaction
-sys_lstat lxstat lstat i:sp __syscall_lstat
truncate - truncate i:si __truncate truncate
vhangup - vhangup i:i vhangup
Removed: fsf/trunk/libc/sysdeps/unix/fxstat.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/fxstat.c (original)
+++ fsf/trunk/libc/sysdeps/unix/fxstat.c (removed)
@@ -1,39 +1,0 @@
-/* fxstat using old-style Unix fstat system call.
- Copyright (C) 1991,1995,1996,1997,2000,2002 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <stddef.h>
-#include <sys/stat.h>
-#include <bp-checks.h>
-
-extern int __syscall_fstat (int, struct stat *__unbounded);
-
-/* 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;
- }
-
- return __syscall_fstat (fd, CHECK_1 (buf));
-}
-hidden_def (__fxstat)
-weak_alias (__fxstat, _fxstat)
Removed: fsf/trunk/libc/sysdeps/unix/getppid.S
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/getppid.S (original)
+++ fsf/trunk/libc/sysdeps/unix/getppid.S (removed)
@@ -1,29 +1,0 @@
-/* Copyright (C) 1991, 1992, 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 Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <sysdep.h>
-
-#ifdef SYS_getppid
-SYSCALL__ (getppid, 0)
-#else
-PSEUDO (__getppid, getpid, 0)
- MOVE(r1, r0)
-#endif
- ret
-PSEUDO_END(__getppid)
-
-weak_alias (__getppid, getppid)
Removed: fsf/trunk/libc/sysdeps/unix/mkdir.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/mkdir.c (original)
+++ fsf/trunk/libc/sysdeps/unix/mkdir.c (removed)
@@ -1,97 +1,0 @@
-/* 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 Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <stddef.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <stdlib.h>
-#include <sys/wait.h>
-#include <string.h>
-
-/* Create a directory named PATH with protections MODE. */
-int
-__mkdir (path, mode)
- const char *path;
- mode_t mode;
-{
- char *cmd = __alloca (80 + strlen (path));
- char *p;
- int status;
- mode_t mask;
- int save;
- struct stat statbuf;
-
- if (path == NULL)
- {
- __set_errno (EINVAL);
- return -1;
- }
-
- /* Check for some errors. */
- if (__stat (path, &statbuf) < 0)
- {
- if (errno != ENOENT)
- return -1;
- /* There is no file by that name. Good. */
- }
- else
- {
- __set_errno (EEXIST);
- return -1;
- }
-
- /* Race condition, but how else to do it? */
- mask = __umask (0777);
- (void) __umask (mask);
-
- p = cmd;
- *p++ = 'm';
- *p++ = 'k';
- *p++ = 'd';
- *p++ = 'i';
- *p++ = 'r';
- *p++ = ' ';
-
- mode &= ~mask;
- *p++ = '-';
- *p++ = 'm';
- *p++ = ' ';
- *p++ = ((mode & 07000) >> 9) + '0';
- *p++ = ((mode & 0700) >> 6) + '0';
- *p++ = ((mode & 070) >> 3) + '0';
- *p++ = ((mode & 07)) + '0';
- *p++ = ' ';
-
- strcpy (p, path);
-
- save = errno;
- /* If system doesn't set errno, but the mkdir fails, we really
- have no idea what went wrong. EIO is the vaguest error I
- can think of, so I'll use that. */
- __set_errno (EIO);
- status = system (cmd);
- if (WIFEXITED (status) && WEXITSTATUS (status) == 0)
- {
- __set_errno (save);
- return 0;
- }
- else
- return -1;
-}
-
-weak_alias (__mkdir, mkdir)
Removed: fsf/trunk/libc/sysdeps/unix/rmdir.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/rmdir.c (original)
+++ fsf/trunk/libc/sysdeps/unix/rmdir.c (removed)
@@ -1,77 +1,0 @@
-/* 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 Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <stddef.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <stdlib.h>
-#include <sys/wait.h>
-#include <string.h>
-
-/* Create a directory named PATH with protections MODE. */
-int
-__rmdir (path)
- const char *path;
-{
- char *cmd = __alloca (80 + strlen (path));
- char *p;
- int status;
- int save;
- struct stat statbuf;
-
- if (path == NULL)
- {
- __set_errno (EINVAL);
- return -1;
- }
-
- /* Check for some errors. */
- if (__stat (path, &statbuf) < 0)
- return -1;
- if (!S_ISDIR (statbuf.st_mode))
- {
- __set_errno (ENOTDIR);
- return -1;
- }
-
- p = cmd;
- *p++ = 'r';
- *p++ = 'm';
- *p++ = 'd';
- *p++ = 'i';
- *p++ = 'r';
- *p++ = ' ';
-
- strcpy (p, path);
-
- save = errno;
- /* If system doesn't set errno, but the rmdir fails, we really
- have no idea what went wrong. EIO is the vaguest error I
- can think of, so I'll use that. */
- __set_errno (EIO);
- status = system (cmd);
- if (WIFEXITED (status) && WEXITSTATUS (status) == 0)
- {
- return 0;
- __set_errno (save);
- }
- else
- return -1;
-}
-
-weak_alias (__rmdir, rmdir)
Removed: fsf/trunk/libc/sysdeps/unix/siglist.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/siglist.c (original)
+++ fsf/trunk/libc/sysdeps/unix/siglist.c (removed)
@@ -1,61 +1,0 @@
-/* Copyright (C) 1996, 1997, 1998, 2002 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <stddef.h>
-#include <libintl.h>
-
-/* This is a list of all known signal numbers. */
-
-const char *const _sys_siglist[] =
- {
- N_("Signal 0"),
- N_("Hangup"),
- N_("Interrupt"),
- N_("Quit"),
- N_("Illegal instruction"),
- N_("Trace/breakpoint trap"),
- N_("IOT trap"),
- N_("EMT trap"),
- N_("Floating point exception"),
- N_("Killed"),
- N_("Bus error"),
- N_("Segmentation fault"),
- N_("Bad system call"),
- N_("Broken pipe"),
- N_("Alarm clock"),
- N_("Terminated"),
- N_("Urgent I/O condition"),
- N_("Stopped (signal)"),
- N_("Stopped"),
- N_("Continued"),
- N_("Child exited"),
- N_("Stopped (tty input)"),
- N_("Stopped (tty output)"),
- N_("I/O possible"),
- N_("CPU time limit exceeded"),
- N_("File size limit exceeded"),
- N_("Virtual timer expired"),
- N_("Profiling timer expired"),
- N_("Window changed"),
- N_("Resource lost"),
- N_("User defined signal 1"),
- N_("User defined signal 2"),
- NULL
- };
-strong_alias (_sys_siglist, _sys_siglist_internal)
-
-weak_alias (_sys_siglist, sys_siglist)
Modified: fsf/trunk/libc/sysdeps/unix/syscalls.list
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/syscalls.list (original)
+++ fsf/trunk/libc/sysdeps/unix/syscalls.list Sat Apr 21 00:01:27 2012
@@ -56,9 +56,6 @@
symlink - symlink i:ss __symlink symlink
sync - sync i: sync
syncfs - syncfs i:i syncfs
-sys_fstat fxstat fstat i:ip __syscall_fstat
-sys_mknod xmknod mknod i:sii __syscall_mknod
-sys_stat xstat stat i:sp __syscall_stat
umask - umask Ei:i __umask umask
uname - uname i:p __uname uname
unlink - unlink i:s __unlink unlink
Removed: fsf/trunk/libc/sysdeps/unix/sysv/Makefile
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/Makefile (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/Makefile (removed)
@@ -1,41 +1,0 @@
-# Copyright (C) 1992, 1993, 1994, 1996, 1997 Free Software Foundation, Inc.
-# This file is part of the GNU C Library.
-
-# The GNU C Library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-
-# The GNU C Library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-
-# You should have received a copy of the GNU Lesser General Public
-# License along with the GNU C Library; if not, see
-# <http://www.gnu.org/licenses/>.
-
-ifeq ($(subdir),termios)
-
-ifeq (,$(filter termio.h,$(sysdep_headers)))
-
-sysdep_headers := $(sysdep_headers) termio.h
-generated := $(generated) termio.h
-
-# termio.h is just like sysv_termio.h except it uses the same names for
-# everything that System V termio does. sysv_termio.h is necessary to
-# include in __tcgetatr.c et al, because some of the names in termio.h
-# conflict with termios.h. The C library doesn't actually use termio.h,
-# but we generate it for those application programs which use it.
-$(objpfx)termio.h: $(..)sysdeps/unix/sysv/sysv_termio.h
- sed < $< > $@-tmp \
- -e 's/_SYSV_//' \
- -e 's/^#define[ ]*_T/#define T/'\
- -e 's/__sysv_termio/termio/'
- mv $@-tmp $@
-
-endif
-endif
-
-# In SYSV style archives the symbol table member has an empty name.
-ar-symtab-name =
Removed: fsf/trunk/libc/sysdeps/unix/sysv/direct.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/direct.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/direct.h (removed)
@@ -1,10 +1,0 @@
-struct direct
- {
- unsigned short int d_fileno;
- char d_name[14];
- };
-
-#define D_NAMLEN(d) \
- ((d)->d_name[13] == '\0' ? strlen ((d)->d_name) : 14)
-
-#define D_RECLEN(d) (sizeof (*(d)))
Removed: fsf/trunk/libc/sysdeps/unix/sysv/setrlimit.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/setrlimit.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/setrlimit.c (removed)
@@ -1,56 +1,0 @@
-/* setrlimit function for systems with ulimit system call (SYSV).
- Copyright (C) 1991, 1992, 1996, 1997, 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-/* This only implements those functions which are available via ulimit. */
-
-#include <sys/resource.h>
-#include <stddef.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;
- const struct rlimit *rlimits;
-{
- if (rlimits == NULL)
- {
- __set_errno (EINVAL);
- return -1;
- }
-
- switch (resource)
- {
- case RLIMIT_FSIZE:
- return __ulimit (2, rlimits->rlim_cur);
-
- case RLIMIT_DATA:
- case RLIMIT_CPU:
- case RLIMIT_STACK:
- case RLIMIT_CORE:
- case RLIMIT_RSS:
- __set_errno (ENOSYS);
- return -1;
-
- default:
- __set_errno (EINVAL);
- return -1;
- }
-}
Removed: fsf/trunk/libc/sysdeps/unix/sysv/settimeofday.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/settimeofday.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/settimeofday.c (removed)
@@ -1,47 +1,0 @@
-/* Copyright (C) 1992, 1995, 1996, 1997, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <time.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;
-{
- time_t when;
-
- if (tv == NULL)
- {
- __set_errno (EINVAL);
- return -1;
- }
-
- if (tz != NULL || tv->tv_usec % 1000000 != 0)
- {
- __set_errno (ENOSYS);
- return -1;
- }
-
- when = tv->tv_sec + (tv->tv_usec / 1000000);
- return stime (&when);
-}
-
-weak_alias (__settimeofday, settimeofday)
Removed: fsf/trunk/libc/sysdeps/unix/sysv/sigaction.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/sigaction.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/sigaction.c (removed)
@@ -1,83 +1,0 @@
-/* Copyright (C) 1992,1994,1995,1996,1997,2002 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <sysdep.h>
-#include <errno.h>
-#include <stddef.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;
-{
- sighandler_t handler;
- int save;
-
- if (sig <= 0 || sig >= NSIG)
- {
- __set_errno (EINVAL);
- return -1;
- }
-
- if (act == NULL)
- {
- if (oact == NULL)
- return 0;
- /* Race condition, but this is the only way to do it. */
- handler = signal (sig, SIG_IGN);
- if (handler == SIG_ERR)
- return -1;
- save = errno;
- (void) signal (sig, handler);
- __set_errno (save);
- }
- else
- {
- int i;
-
- if (act->sa_flags != 0)
- {
- unimplemented:
- __set_errno (ENOSYS);
- return -1;
- }
-
- for (i = 1; i < NSIG; ++i)
- if (__sigismember (&act->sa_mask, i))
- goto unimplemented;
-
- handler = signal (sig, act->sa_handler);
- if (handler == SIG_ERR)
- return -1;
- }
-
- if (oact != NULL)
- {
- oact->sa_handler = handler;
- __sigemptyset (&oact->sa_mask);
- oact->sa_flags = 0;
- }
-
- return 0;
-}
-libc_hidden_def (__sigaction)
-weak_alias (__sigaction, sigaction)
Removed: fsf/trunk/libc/sysdeps/unix/sysv/sysv_termio.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/sysv_termio.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/sysv_termio.h (removed)
@@ -1,154 +1,0 @@
-/* Copyright (C) 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 Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-/* In various parts of this file we define the System V values for
- things as _SYSV_<whatever>. Those are the values that System V
- uses for termio, and also (SVR4) termios. Not necessarily the
- same as the GNU termios that the library user sees. */
-
-/* Number of elements of c_cc. termio only. */
-#define _SYSV_NCC 8
-
-#define _SYSV_VINTR 0
-#define _SYSV_VQUIT 1
-#define _SYSV_VERASE 2
-#define _SYSV_VKILL 3
-#define _SYSV_VEOF 4
-/* This field means VEOF if ICANON, VMIN if not. */
-#define _SYSV_VMIN 4
-#define _SYSV_VEOL 5
-/* This field means VEOL if ICANON, VTIME if not. */
-#define _SYSV_VTIME 5
-#define _SYSV_VEOL2 6
-
-/* Flags in c_iflag. */
-#define _SYSV_IGNBRK 1
-#define _SYSV_BRKINT 2
-#define _SYSV_IGNPAR 4
-#define _SYSV_PARMRK 8
-#define _SYSV_INPCK 0x10
-#define _SYSV_ISTRIP 0x20
-#define _SYSV_INLCR 0x40
-#define _SYSV_IGNCR 0x80
-#define _SYSV_ICRNL 0x100
-#define _SYSV_IUCLC 0x200
-#define _SYSV_IXON 0x400
-#define _SYSV_IXANY 0x800
-#define _SYSV_IXOFF 0x1000
-#define _SYSV_IMAXBEL 0x2000
-
-/* Flags in c_cflag. */
-#define _SYSV_CBAUD 0xf
-#define _SYSV_CIBAUD 0xf0000 /* termios only. */
-#define _SYSV_IBSHIFT 16
-/* Values for CBAUD and CIBAUD. */
-#define _SYSV_B0 0
-#define _SYSV_B50 1
-#define _SYSV_B75 2
-#define _SYSV_B110 3
-#define _SYSV_B134 4
-#define _SYSV_B150 5
-#define _SYSV_B200 6
-#define _SYSV_B300 7
-#define _SYSV_B600 8
-#define _SYSV_B1200 9
-#define _SYSV_B1800 10
-#define _SYSV_B2400 11
-#define _SYSV_B4800 12
-#define _SYSV_B9600 13
-#define _SYSV_B19200 14
-#define _SYSV_B38400 15
-
-#define _SYSV_CS5 0
-#define _SYSV_CS6 0x10
-#define _SYSV_CS7 0x20
-#define _SYSV_CS8 0x30
-#define _SYSV_CSIZE 0x30
-#define _SYSV_CSTOPB 0x40
-#define _SYSV_CREAD 0x80
-#define _SYSV_PARENB 0x100
-#define _SYSV_PARODD 0x200
-#define _SYSV_HUPCL 0x400
-#define _SYSV_CLOCAL 0x800
-
-/* Flags in c_lflag. */
-#define _SYSV_ISIG 1
-#define _SYSV_ICANON 2
-#define _SYSV_ECHO 8
-#define _SYSV_ECHOE 0x10
-#define _SYSV_ECHOK 0x20
-#define _SYSV_ECHONL 0x40
-#define _SYSV_NOFLSH 0x80
-#define _SYSV_TOSTOP 0x100
-#define _SYSV_ECHOCTL 0x200
-#define _SYSV_ECHOPRT 0x400
-#define _SYSV_ECHOKE 0x800
-#define _SYSV_FLUSHO 0x2000
-#define _SYSV_PENDIN 0x4000
-#define _SYSV_IEXTEN 0x8000
-
-/* Flags in c_oflag. */
-#define _SYSV_OPOST 1
-#define _SYSV_OLCUC 2
-#define _SYSV_ONLCR 4
-#define _SYSV_NLDLY 0x100
-#define _SYSV_NL0 0
-#define _SYSV_NL1 0x100
-#define _SYSV_CRDLY 0x600
-#define _SYSV_CR0 0
-#define _SYSV_CR1 0x200
-#define _SYSV_CR2 0x400
-#define _SYSV_CR3 0x600
-#define _SYSV_TABDLY 0x1800
-#define _SYSV_TAB0 0
-#define _SYSV_TAB1 0x0800
-#define _SYSV_TAB2 0x1000
-/* TAB3 is an obsolete name for XTABS. But we provide it since some
- programs expect it to exist. */
-#define _SYSV_TAB3 0x1800
-#define _SYSV_XTABS 0x1800
-#define _SYSV_BSDLY 0x2000
-#define _SYSV_BS0 0
-#define _SYSV_BS1 0x2000
-#define _SYSV_VTDLY 0x4000
-#define _SYSV_VT0 0
-#define _SYSV_VT1 0x4000
-#define _SYSV_FFDLY 0x8000
-#define _SYSV_FF0 0
-#define _SYSV_FF1 0x8000
-
-/* ioctl's. */
-
-#define _TCGETA 0x5401
-#define _TCSETA 0x5402
-#define _TCSETAW 0x5403
-#define _TCSETAF 0x5404
-#define _TCSBRK 0x5405
-#define _TCXONC 0x5406
-#define _TCFLSH 0x5407
-#define _TIOCGPGRP 0x7414
-#define _TIOCSPGRP 0x7415
-
-struct __sysv_termio
- {
- unsigned short c_iflag;
- unsigned short c_oflag;
- unsigned short c_cflag;
- unsigned short c_lflag;
- char c_line;
- unsigned char c_cc[_SYSV_NCC];
- };
Removed: fsf/trunk/libc/sysdeps/unix/sysv/tcdrain.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/tcdrain.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/tcdrain.c (removed)
@@ -1,32 +1,0 @@
-/* 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 Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <stddef.h>
-#include <termios.h>
-#include <unistd.h>
-#include <sysv_termio.h>
-#include <sys/ioctl.h>
-
-/* Wait for pending output to be written on FD. */
-int
-__libc_tcdrain (int fd)
-{
- /* With an argument of 1, TCSBRK just waits for output to drain. */
- return __ioctl (fd, _TCSBRK, 1);
-}
-weak_alias (__libc_tcdrain, tcdrain)
Removed: fsf/trunk/libc/sysdeps/unix/sysv/tcflow.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/tcflow.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/tcflow.c (removed)
@@ -1,46 +1,0 @@
-/* Copyright (C) 1992, 1996, 1997, 2005 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <stddef.h>
-#include <termios.h>
-#include <unistd.h>
-#include <sys/ioctl.h>
-
-#include <sysv_termio.h>
-
-/* Suspend or restart transmission on FD. */
-int
-tcflow (fd, action)
- int fd;
- int action;
-{
- switch (action)
- {
- case TCOOFF:
- return __ioctl (fd, _TCXONC, 0);
- case TCOON:
- return __ioctl (fd, _TCXONC, 1);
- case TCIOFF:
- return __ioctl (fd, _TCXONC, 2);
- case TCION:
- return __ioctl (fd, _TCXONC, 3);
- default:
- __set_errno (EINVAL);
- return -1;
- }
-}
Removed: fsf/trunk/libc/sysdeps/unix/sysv/tcflush.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/tcflush.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/tcflush.c (removed)
@@ -1,44 +1,0 @@
-/* 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 Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <stddef.h>
-#include <termios.h>
-#include <unistd.h>
-#include <sys/ioctl.h>
-
-#include <sysv_termio.h>
-
-/* Flush pending data on FD. */
-int
-tcflush (fd, queue_selector)
- int fd;
- int queue_selector;
-{
- switch (queue_selector)
- {
- case TCIFLUSH:
- return __ioctl (fd, _TCFLSH, 0);
- case TCOFLUSH:
- return __ioctl (fd, _TCFLSH, 1);
- case TCIOFLUSH:
- return __ioctl (fd, _TCFLSH, 2);
- default:
- __set_errno (EINVAL);
- return -1;
- }
-}
Removed: fsf/trunk/libc/sysdeps/unix/sysv/tcgetattr.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/tcgetattr.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/tcgetattr.c (removed)
@@ -1,170 +1,0 @@
-/* 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 Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <stddef.h>
-#include <sysv_termio.h>
-#include <termios.h>
-#include <sys/ioctl.h>
-
-/* Put the state of FD into *TERMIOS_P. */
-int
-__tcgetattr (fd, termios_p)
- int fd;
- struct termios *termios_p;
-{
- struct __sysv_termio buf;
- int termio_speed;
-
- if (termios_p == NULL)
- {
- __set_errno (EINVAL);
- return -1;
- }
-
- if (__ioctl (fd, _TCGETA, &buf) < 0)
- return -1;
-
- termio_speed = buf.c_cflag & _SYSV_CBAUD;
- termios_p->__ospeed =
- (termio_speed == _SYSV_B0 ? 0 :
- termio_speed == _SYSV_B50 ? 50 :
- termio_speed == _SYSV_B75 ? 75 :
- termio_speed == _SYSV_B110 ? 110 :
- termio_speed == _SYSV_B134 ? 134 :
- termio_speed == _SYSV_B150 ? 150 :
- termio_speed == _SYSV_B200 ? 200 :
- termio_speed == _SYSV_B300 ? 300 :
- termio_speed == _SYSV_B600 ? 600 :
- termio_speed == _SYSV_B1200 ? 1200 :
- termio_speed == _SYSV_B1800 ? 1800 :
- termio_speed == _SYSV_B2400 ? 2400 :
- termio_speed == _SYSV_B4800 ? 4800 :
- termio_speed == _SYSV_B9600 ? 9600 :
- termio_speed == _SYSV_B19200 ? 19200 :
- termio_speed == _SYSV_B38400 ? 38400 :
- -1);
- termios_p->__ispeed = termios_p->__ospeed;
-
- termios_p->c_iflag = 0;
- if (buf.c_iflag & _SYSV_IGNBRK)
- termios_p->c_iflag |= IGNBRK;
- if (buf.c_iflag & _SYSV_BRKINT)
- termios_p->c_iflag |= BRKINT;
- if (buf.c_iflag & _SYSV_IGNPAR)
- termios_p->c_iflag |= IGNPAR;
- if (buf.c_iflag & _SYSV_PARMRK)
- termios_p->c_iflag |= PARMRK;
- if (buf.c_iflag & _SYSV_INPCK)
- termios_p->c_iflag |= INPCK;
- if (buf.c_iflag & _SYSV_ISTRIP)
- termios_p->c_iflag |= ISTRIP;
- if (buf.c_iflag & _SYSV_INLCR)
- termios_p->c_iflag |= INLCR;
- if (buf.c_iflag & _SYSV_IGNCR)
- termios_p->c_iflag |= IGNCR;
- if (buf.c_iflag & _SYSV_ICRNL)
- termios_p->c_iflag |= ICRNL;
- if (buf.c_iflag & _SYSV_IXON)
- termios_p->c_iflag |= IXON;
- if (buf.c_iflag & _SYSV_IXOFF)
- termios_p->c_iflag |= IXOFF;
- if (buf.c_iflag & _SYSV_IXANY)
- termios_p->c_iflag |= IXANY;
- if (buf.c_iflag & _SYSV_IMAXBEL)
- termios_p->c_iflag |= IMAXBEL;
-
- termios_p->c_oflag = 0;
- if (buf.c_oflag & OPOST)
- termios_p->c_oflag |= OPOST;
- if (buf.c_oflag & ONLCR)
- termios_p->c_oflag |= ONLCR;
- termios_p->c_cflag = 0;
- switch (buf.c_cflag & _SYSV_CSIZE)
- {
- case _SYSV_CS5:
- termios_p->c_cflag |= CS5;
- break;
- case _SYSV_CS6:
- termios_p->c_cflag |= CS6;
- break;
- case _SYSV_CS7:
- termios_p->c_cflag |= CS7;
- break;
- case _SYSV_CS8:
- termios_p->c_cflag |= CS8;
- break;
- }
- if (buf.c_cflag & _SYSV_CSTOPB)
- termios_p->c_cflag |= CSTOPB;
- if (buf.c_cflag & _SYSV_CREAD)
- termios_p->c_cflag |= CREAD;
- if (buf.c_cflag & _SYSV_PARENB)
- termios_p->c_cflag |= PARENB;
- if (buf.c_cflag & _SYSV_PARODD)
- termios_p->c_cflag |= PARODD;
- if (buf.c_cflag & _SYSV_HUPCL)
- termios_p->c_cflag |= HUPCL;
- if (buf.c_cflag & _SYSV_CLOCAL)
- termios_p->c_cflag |= CLOCAL;
- termios_p->c_lflag = 0;
- if (buf.c_lflag & _SYSV_ISIG)
- termios_p->c_lflag |= _ISIG;
- if (buf.c_lflag & _SYSV_ICANON)
- termios_p->c_lflag |= _ICANON;
- if (buf.c_lflag & _SYSV_ECHO)
- termios_p->c_lflag |= _ECHO;
- if (buf.c_lflag & _SYSV_ECHOE)
- termios_p->c_lflag |= _ECHOE;
- if (buf.c_lflag & _SYSV_ECHOK)
- termios_p->c_lflag |= _ECHOK;
- if (buf.c_lflag & _SYSV_ECHONL)
- termios_p->c_lflag |= _ECHONL;
- if (buf.c_lflag & _SYSV_NOFLSH)
- termios_p->c_lflag |= _NOFLSH;
- if (buf.c_lflag & _SYSV_TOSTOP)
- termios_p->c_lflag |= _TOSTOP;
- if (buf.c_lflag & _SYSV_ECHOKE)
- termios_p->c_lflag |= ECHOKE;
- if (buf.c_lflag & _SYSV_ECHOPRT)
- termios_p->c_lflag |= ECHOPRT;
- if (buf.c_lflag & _SYSV_ECHOCTL)
- termios_p->c_lflag |= ECHOCTL;
- if (buf.c_lflag & _SYSV_FLUSHO)
- termios_p->c_lflag |= FLUSHO;
- if (buf.c_lflag & _SYSV_PENDIN)
- termios_p->c_lflag |= PENDIN;
- if (buf.c_lflag & _SYSV_IEXTEN)
- termios_p->c_lflag |= IEXTEN;
-
- termios_p->c_cc[VEOF] = buf.c_cc[_SYSV_VEOF];
- termios_p->c_cc[VEOL] = buf.c_cc[_SYSV_VEOL];
- termios_p->c_cc[VEOL2] = buf.c_cc[_SYSV_VEOL2];
- termios_p->c_cc[VERASE] = buf.c_cc[_SYSV_VERASE];
- termios_p->c_cc[VKILL] = buf.c_cc[_SYSV_VKILL];
- termios_p->c_cc[VINTR] = buf.c_cc[_SYSV_VINTR];
- termios_p->c_cc[VQUIT] = buf.c_cc[_SYSV_VQUIT];
- termios_p->c_cc[VSTART] = '\021'; /* XON (^Q). */
- termios_p->c_cc[VSTOP] = '\023'; /* XOFF (^S). */
- termios_p->c_cc[VSUSP] = '\0'; /* System V release 3 lacks job control. */
- termios_p->c_cc[VMIN] = buf.c_cc[_SYSV_VMIN];
- termios_p->c_cc[VTIME] = buf.c_cc[_SYSV_VTIME];
-
- return 0;
-}
-
-weak_alias (__tcgetattr, tcgetattr)
Removed: fsf/trunk/libc/sysdeps/unix/sysv/tcgetpgrp.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/tcgetpgrp.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/tcgetpgrp.c (removed)
@@ -1,35 +1,0 @@
-/* Copyright (C) 1992, 1997, 2002 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <termios.h>
-#include <sysv_termio.h>
-#include <errno.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/ioctl.h>
-
-/* Return the foreground process group ID of FD. */
-pid_t
-tcgetpgrp (fd)
- int fd;
-{
- int pgrp;
- if (__ioctl (fd, _TIOCGPGRP, &pgrp) < 0)
- return (pid_t) -1;
- return (pid_t) pgrp;
-}
-libc_hidden_def (tcgetpgrp)
Removed: fsf/trunk/libc/sysdeps/unix/sysv/tcsendbrk.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/tcsendbrk.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/tcsendbrk.c (removed)
@@ -1,43 +1,0 @@
-/* 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 Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <stddef.h>
-#include <signal.h>
-#include <termios.h>
-#include <unistd.h>
-#include <sysv_termio.h>
-#include <sys/ioctl.h>
-
-/* Send zero bits on FD. */
-int
-tcsendbreak (fd, duration)
- int fd;
- int duration;
-{
- /* The break lasts 0.25 to 0.5 seconds if DURATION is zero,
- and an implementation-defined period if DURATION is nonzero.
- We define a positive DURATION to be number of milliseconds to break. */
- if (duration <= 0)
- return __ioctl (fd, _TCSBRK, 0);
-
- /* ioctl can't send a break of any other duration for us.
- This could be changed to use trickery (e.g. lower speed and
- send a '\0') to send the break, but for now just return an error. */
- __set_errno (EINVAL);
- return -1;
-}
Removed: fsf/trunk/libc/sysdeps/unix/sysv/tcsetattr.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/tcsetattr.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/tcsetattr.c (removed)
@@ -1,209 +1,0 @@
-/* Copyright (C) 1992, 1995, 1996, 1997, 2002 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <stddef.h>
-#include <termios.h>
-#include <sys/ioctl.h>
-
-#include <sysv_termio.h>
-
-
-const speed_t __unix_speeds[] =
- {
- 0,
- 50,
- 75,
- 110,
- 134,
- 150,
- 200,
- 300,
- 600,
- 1200,
- 1800,
- 2400,
- 4800,
- 9600,
- 19200,
- 38400,
- };
-
-
-/* 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;
-{
- struct __sysv_termio buf;
- int ioctl_function;
- size_t i;
-
- if (termios_p == NULL)
- {
- __set_errno (EINVAL);
- return -1;
- }
- switch (optional_actions)
- {
- case TCSANOW:
- ioctl_function = _TCSETA;
- break;
- case TCSADRAIN:
- ioctl_function = _TCSETAW;
- break;
- case TCSAFLUSH:
- ioctl_function = _TCSETAF;
- break;
- default:
- __set_errno (EINVAL);
- return -1;
- }
-
- if (termios_p->__ispeed != termios_p->__ospeed)
- {
- __set_errno (EINVAL);
- return -1;
- }
- buf.c_cflag = -1;
- for (i = 0; i <= sizeof (__unix_speeds) / sizeof (__unix_speeds[0]); ++i)
- {
- if (__unix_speeds[i] == termios_p->__ispeed)
- buf.c_cflag = i;
- }
- if (buf.c_cflag == -1)
- {
- __set_errno (EINVAL);
- return -1;
- }
-
- buf.c_iflag = 0;
- if (termios_p->c_iflag & IGNBRK)
- buf.c_iflag |= _SYSV_IGNBRK;
- if (termios_p->c_iflag & BRKINT)
- buf.c_iflag |= _SYSV_BRKINT;
- if (termios_p->c_iflag & IGNPAR)
- buf.c_iflag |= _SYSV_IGNPAR;
- if (termios_p->c_iflag & PARMRK)
- buf.c_iflag |= _SYSV_PARMRK;
- if (termios_p->c_iflag & INPCK)
- buf.c_iflag |= _SYSV_INPCK;
- if (termios_p->c_iflag & ISTRIP)
- buf.c_iflag |= _SYSV_ISTRIP;
- if (termios_p->c_iflag & INLCR)
- buf.c_iflag |= _SYSV_INLCR;
- if (termios_p->c_iflag & IGNCR)
- buf.c_iflag |= _SYSV_IGNCR;
- if (termios_p->c_iflag & ICRNL)
- buf.c_iflag |= _SYSV_ICRNL;
- if (termios_p->c_iflag & IXON)
- buf.c_iflag |= _SYSV_IXON;
- if (termios_p->c_iflag & IXOFF)
- buf.c_iflag |= _SYSV_IXOFF;
- if (termios_p->c_iflag & IXANY)
- buf.c_iflag |= _SYSV_IXANY;
- if (termios_p->c_iflag & IMAXBEL)
- buf.c_iflag |= _SYSV_IMAXBEL;
-
- buf.c_oflag = 0;
- if (termios_p->c_oflag & OPOST)
- buf.c_oflag |= _SYSV_OPOST;
- if (termios_p->c_oflag & ONLCR)
- buf.c_oflag |= _SYSV_ONLCR;
-
- /* So far, buf.c_cflag contains the speed in CBAUD. */
- if (termios_p->c_cflag & CSTOPB)
- buf.c_cflag |= _SYSV_CSTOPB;
- if (termios_p->c_cflag & CREAD)
- buf.c_cflag |= _SYSV_CREAD;
- if (termios_p->c_cflag & PARENB)
- buf.c_cflag |= _SYSV_PARENB;
- if (termios_p->c_cflag & PARODD)
- buf.c_cflag |= _SYSV_PARODD;
- if (termios_p->c_cflag & HUPCL)
- buf.c_cflag |= _SYSV_HUPCL;
- if (termios_p->c_cflag & CLOCAL)
- buf.c_cflag |= _SYSV_CLOCAL;
- switch (termios_p->c_cflag & CSIZE)
- {
- case CS5:
- buf.c_cflag |= _SYSV_CS5;
- break;
- case CS6:
- buf.c_cflag |= _SYSV_CS6;
- break;
- case CS7:
- buf.c_cflag |= _SYSV_CS7;
- break;
- case CS8:
- buf.c_cflag |= _SYSV_CS8;
- break;
- }
-
- buf.c_lflag = 0;
- if (termios_p->c_lflag & ISIG)
- buf.c_lflag |= _SYSV_ISIG;
- if (termios_p->c_lflag & ICANON)
- buf.c_lflag |= _SYSV_ICANON;
- if (termios_p->c_lflag & ECHO)
- buf.c_lflag |= _SYSV_ECHO;
- if (termios_p->c_lflag & ECHOE)
- buf.c_lflag |= _SYSV_ECHOE;
- if (termios_p->c_lflag & ECHOK)
- buf.c_lflag |= _SYSV_ECHOK;
- if (termios_p->c_lflag & ECHONL)
- buf.c_lflag |= _SYSV_ECHONL;
- if (termios_p->c_lflag & NOFLSH)
- buf.c_lflag |= _SYSV_NOFLSH;
- if (termios_p->c_lflag & TOSTOP)
- buf.c_lflag |= _SYSV_TOSTOP;
- if (termios_p->c_lflag & ECHOCTL)
- buf.c_lflag |= _SYSV_ECHOCTL;
- if (termios_p->c_lflag & ECHOPRT)
- buf.c_lflag |= _SYSV_ECHOPRT;
- if (termios_p->c_lflag & ECHOKE)
- buf.c_lflag |= _SYSV_ECHOKE;
- if (termios_p->c_lflag & FLUSHO)
- buf.c_lflag |= _SYSV_FLUSHO;
- if (termios_p->c_lflag & PENDIN)
- buf.c_lflag |= _SYSV_PENDIN;
- if (termios_p->c_lflag & IEXTEN)
- buf.c_lflag |= _SYSV_IEXTEN;
-
- buf.c_cc[_SYSV_VINTR] = termios_p->c_cc[VINTR];
- buf.c_cc[_SYSV_VQUIT] = termios_p->c_cc[VQUIT];
- buf.c_cc[_SYSV_VERASE] = termios_p->c_cc[VERASE];
- buf.c_cc[_SYSV_VKILL] = termios_p->c_cc[VKILL];
- if (buf.c_lflag & _SYSV_ICANON)
- {
- buf.c_cc[_SYSV_VEOF] = termios_p->c_cc[VEOF];
- buf.c_cc[_SYSV_VEOL] = termios_p->c_cc[VEOL];
- }
- else
- {
- buf.c_cc[_SYSV_VMIN] = termios_p->c_cc[VMIN];
- buf.c_cc[_SYSV_VTIME] = termios_p->c_cc[VTIME];
- }
- buf.c_cc[_SYSV_VEOL2] = termios_p->c_cc[VEOL2];
-
- if (__ioctl (fd, ioctl_function, &buf) < 0)
- return -1;
- return 0;
-}
-libc_hidden_def (tcsetattr)
Removed: fsf/trunk/libc/sysdeps/unix/sysv/tcsetpgrp.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/tcsetpgrp.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/tcsetpgrp.c (removed)
@@ -1,31 +1,0 @@
-/* Copyright (C) 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 Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <sys/types.h>
-#include <sysv_termio.h>
-#include <errno.h>
-#include <unistd.h>
-#include <sys/ioctl.h>
-
-/* Set the foreground process group ID of FD set PGRP_ID. */
-int
-tcsetpgrp (fd, pgrp_id)
- int fd;
- pid_t pgrp_id;
-{
- return __ioctl (fd, _TIOCSPGRP, &pgrp_id);
-}
Removed: fsf/trunk/libc/sysdeps/unix/xmknod.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/xmknod.c (original)
+++ fsf/trunk/libc/sysdeps/unix/xmknod.c (removed)
@@ -1,41 +1,0 @@
-/* xmknod call using old-style Unix mknod system call.
- Copyright (C) 1991,1993,1995,1996,1997,2002 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-extern int __syscall_mknod (const char *, mode_t, dev_t);
-
-/* 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;
- }
-
- return __syscall_mknod (path, mode, *dev);
-}
-
-weak_alias (__xmknod, _xmknod)
-libc_hidden_def (__xmknod)
Removed: fsf/trunk/libc/sysdeps/unix/xstat.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/xstat.c (original)
+++ fsf/trunk/libc/sysdeps/unix/xstat.c (removed)
@@ -1,38 +1,0 @@
-/* xstat using old-style Unix stat system call.
- Copyright (C) 1991,1995,1996,1997,2000,2002 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <stddef.h>
-#include <sys/stat.h>
-#include <bp-checks.h>
-
-extern int __syscall_stat (const char *__unbounded, struct stat *__unbounded);
-
-int
-__xstat (int vers, const char *file, struct stat *buf)
-{
- if (vers != _STAT_VER)
- {
- __set_errno (EINVAL);
- return -1;
- }
-
- return __syscall_stat (CHECK_STRING (file), CHECK_1 (buf));
-}
-hidden_def (__xstat)
-weak_alias (__xstat, _xstat)
_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits