From 80fd73873bd51e58039983a9416ef3bb97bdac57 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 6 Oct 1995 04:50:55 +0000 Subject: Fri Sep 29 03:43:51 1995 Paul Eggert Rewrite mktime from scratch for performance, and for correctness in the presence of leap seconds. * time/mktime.c (ydhms_tm_diff, not_equal_tm, print_tm, check_result): New functions. (LEAP_SECONDS_POSSIBLE, CHAR_BIT, INT_MIN, INT_MAX, TIME_T_MIN, TIME_T_MAX, TM_YEAR_BASE, EPOCH_YEAR): New macros. , : New #includes. (main): Support tests with given broken-down value; support benchmarks. (__mon_lengths, debugging_enabled, printtm, dist_tm, doit, do_normalization, normalize, BAD_STRUCT_TM, SKIP_VALUE, ): Remove. * time/time.h, time/mktime.c (__mktime_internal): New offset arg. * time/mktime.c (mktime), time/timegm.c (timegm): Use it. * time/mktime.c (__mon_yday): New variable; replaces `__mon_lengths'. time/offtime.c (__offtime), time/tzset.c (compute_change): Use it. * time/offtime.c (__offtime): Remove useless assignment `tp->tm_isdst = -1'. * manual/maint.texi: Update credits. Fri Oct 6 00:28:53 1995 Roland McGrath * sysdeps/unix/common/readv.S: Moved to sysdeps/unix/bsd. * sysdeps/unix/common/writev.S: Moved to sysdeps/unix/bsd. * sysdeps/unix/sysv/linux/readv.c: File removed. * sysdeps/unix/sysv/linux/writev.c: File removed. * sysdeps/unix/configure.in: Check for readv and writev syscalls. * sysdeps/unix/configure.in: If eval doesn't set $unix_srcname, set it to $unix_syscall instead of $unix_function. --- sysdeps/unix/bsd/readv.S | 22 ++++++++++++++++++++++ sysdeps/unix/bsd/writev.S | 22 ++++++++++++++++++++++ sysdeps/unix/common/readv.S | 22 ---------------------- sysdeps/unix/common/writev.S | 22 ---------------------- sysdeps/unix/configure.in | 16 +++++++++------- sysdeps/unix/sysv/linux/readv.c | 1 - sysdeps/unix/sysv/linux/writev.c | 1 - 7 files changed, 53 insertions(+), 53 deletions(-) create mode 100644 sysdeps/unix/bsd/readv.S create mode 100644 sysdeps/unix/bsd/writev.S delete mode 100644 sysdeps/unix/common/readv.S delete mode 100644 sysdeps/unix/common/writev.S delete mode 100644 sysdeps/unix/sysv/linux/readv.c delete mode 100644 sysdeps/unix/sysv/linux/writev.c (limited to 'sysdeps/unix') diff --git a/sysdeps/unix/bsd/readv.S b/sysdeps/unix/bsd/readv.S new file mode 100644 index 0000000000..1d643ac6d3 --- /dev/null +++ b/sysdeps/unix/bsd/readv.S @@ -0,0 +1,22 @@ +/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU 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. */ + +#include + +SYSCALL (readv, 3) + ret diff --git a/sysdeps/unix/bsd/writev.S b/sysdeps/unix/bsd/writev.S new file mode 100644 index 0000000000..3d1692c8fe --- /dev/null +++ b/sysdeps/unix/bsd/writev.S @@ -0,0 +1,22 @@ +/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU 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. */ + +#include + +SYSCALL (writev, 3) + ret diff --git a/sysdeps/unix/common/readv.S b/sysdeps/unix/common/readv.S deleted file mode 100644 index 1d643ac6d3..0000000000 --- a/sysdeps/unix/common/readv.S +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU 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. */ - -#include - -SYSCALL (readv, 3) - ret diff --git a/sysdeps/unix/common/writev.S b/sysdeps/unix/common/writev.S deleted file mode 100644 index 3d1692c8fe..0000000000 --- a/sysdeps/unix/common/writev.S +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright (C) 1991, 1992 Free Software Foundation, Inc. -This file is part of the GNU C Library. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU 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. */ - -#include - -SYSCALL (writev, 3) - ret diff --git a/sysdeps/unix/configure.in b/sysdeps/unix/configure.in index 6d8a1fd006..74456fe18c 100644 --- a/sysdeps/unix/configure.in +++ b/sysdeps/unix/configure.in @@ -72,7 +72,7 @@ for unix_function in \ getitimer setitimer \ getdomainname/getdomain=bsd/bsd4.4 \ setdomainname/setdomain=bsd/bsd4.4 \ - profil=bsd \ + profil=bsd readv=bsd writev=bsd \ getpriority setpriority \ getrlimit setrlimit do @@ -85,7 +85,7 @@ do eval "unix_syscall=`echo $unix_function | \ sed -e 's@=\(.*\)$@ unix_srcdir=\1@' \ -e 's@/\(.*\)$@ unix_srcname=\1@'`" - test -z "$unix_srcname" && unix_srcname=$unix_function + test -z "$unix_srcname" && unix_srcname=$unix_syscall unix_implementor=none for unix_dir in $sysnames; do @@ -97,11 +97,13 @@ do fi done - # mkdir and rmdir have implementations in unix/sysv, but - # the simple syscall versions are preferable if available. - test $unix_syscall = mkdir -o $unix_syscall = rmdir && \ - test $unix_implementor = unix/sysv && \ - unix_implementor=generic + case $unix_syscall in + mkdir|rmdir) + # mkdir and rmdir have implementations in unix/sysv, but + # the simple syscall versions are preferable if available. + test $unix_implementor = unix/sysv && unix_implementor=generic + ;; + esac case $unix_implementor in none|stub|generic|posix) diff --git a/sysdeps/unix/sysv/linux/readv.c b/sysdeps/unix/sysv/linux/readv.c deleted file mode 100644 index baa976da6d..0000000000 --- a/sysdeps/unix/sysv/linux/readv.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/writev.c b/sysdeps/unix/sysv/linux/writev.c deleted file mode 100644 index 0dc6a76014..0000000000 --- a/sysdeps/unix/sysv/linux/writev.c +++ /dev/null @@ -1 +0,0 @@ -#include -- cgit v1.2.3