2008-07-25 19:06:50 +02:00
|
|
|
/* Copyright (C) 1996-2001, 2002, 2003, 2004, 2005, 2006, 2008
|
2005-03-24 01:16:58 +01:00
|
|
|
Free Software Foundation, Inc.
|
1996-12-11 02:40:39 +01:00
|
|
|
This file is part of the GNU C Library.
|
1999-12-18 20:45:25 +01:00
|
|
|
Contributed by Thorsten Kukuk <kukuk@suse.de>, 1996.
|
1996-12-11 02:40:39 +01:00
|
|
|
|
|
|
|
The GNU C Library is free software; you can redistribute it and/or
|
2001-07-06 06:58:11 +02:00
|
|
|
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.
|
1996-12-11 02:40:39 +01:00
|
|
|
|
|
|
|
The GNU C Library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2001-07-06 06:58:11 +02:00
|
|
|
Lesser General Public License for more details.
|
1996-12-11 02:40:39 +01:00
|
|
|
|
2001-07-06 06:58:11 +02:00
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
|
|
License along with the GNU C Library; if not, write to the Free
|
|
|
|
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
|
|
|
02111-1307 USA. */
|
1996-12-11 02:40:39 +01:00
|
|
|
|
1998-05-12 14:22:17 +02:00
|
|
|
#include <errno.h>
|
Update.
1997-11-11 21:30 Ulrich Drepper <drepper@cygnus.com>
* include/sys/stat.h: Define stat, fstat, lstat and *64 variants
as macros so the the library compiles correctly even without
optimization.
* io/fstat.c: Undef fstat.
* io/fstat64.c: Undef fstat64
* io/lstat.c: Undef lstat.
* io/lstat64.c: Undef lstat64
* io/stat.c: Undef stat.
* io/stat64.c: Undef stat64
* io/fts.c: Include <include/sys/stat.h> to get macro definitions.
* io/ftw.c: Likewise.
* io/getdirname.c: Likewise.
* Makefile (install): Run test-installation.pl if possible.
* db2/Makefile: Update from db-2.3.12.
* db2/db.h: Likewise.
* db2/db_int.h: Likewise.
* db2/btree/bt_cursor.c: Likewise.
* db2/btree/bt_delete.c: Likewise.
* db2/btree/bt_open.c: Likewise.
* db2/btree/bt_put.c: Likewise.
* db2/btree/bt_rec.c: Likewise.
* db2/btree/bt_recno.c: Likewise.
* db2/btree/bt_search.c: Likewise.
* db2/btree/bt_split.c: Likewise.
* db2/btree/bt_stat.c: Likewise.
* db2/btree/btree.src: Likewise.
* db2/btree/btree_auto.c: Likewise.
* db2/btree/bt_cursor.c: Likewise.
* db2/btree/bt_delete.c: Likewise.
* db2/btree/bt_open.c: Likewise.
* db2/btree/bt_put.c: Likewise.
* db2/btree/bt_rec.c: Likewise.
* db2/btree/bt_recno.c: Likewise.
* db2/btree/bt_search.c: Likewise.
* db2/btree/bt_split.c: Likewise.
* db2/btree/bt_stat.c: Likewise.
* db2/btree/btree.src: Likewise.
* db2/btree/btree_auto.c: Likewise.
* db2/common/db_appinit.c: Likewise.
* db2/common/db_apprec.c: Likewise.
* db2/common/db_byteorder.c: Likewise.
* db2/common/db_region.c: Likewise.
* db2/db/db.c: Likewise
* db2/db/db.src: Likewise
* db2/db/db_auto.c: Likewise
* db2/db/db_dispatch.c: Likewise
* db2/db/db_dup.c: Likewise
* db2/db/db_overflow.c: Likewise
* db2/db/db_pr.c: Likewise
* db2/db/db_rec.c: Likewise
* db2/db/db_ret.c: Likewise
* db2/db/db_thread.c: Likewise
* db2/db185/db185.c: Likewise.
* db2/hash/hash.c: Likewise.
* db2/hash/hash.src: Likewise.
* db2/hash/hash_auto.c: Likewise.
* db2/hash/hash_dup.c: Likewise.
* db2/hash/hash_page.c: Likewise.
* db2/hash/hash_rec.c: Likewise.
* db2/include/btree_auto.h: Likewise.
* db2/include/btree_ext.h: Likewise.
* db2/include/clib_ext.h: Likewise.
* db2/include/common_ext.h: Likewise.
* db2/include/db.h.src: Likewise.
* db2/include/db_am.h: Likewise.
* db2/include/db_auto.h: Likewise.
* db2/include/db_cxx.h: Likewise.
* db2/include/db_ext.h: Likewise.
* db2/include/db_int.h.src: Likewise.
* db2/include/hash.h: Likewise.
* db2/include/hash_auto.h: Likewise.
* db2/include/hash_ext.h: Likewise.
* db2/include/lock.h: Likewise.
* db2/include/lock_ext.h: Likewise.
* db2/include/log.h: Likewise.
* db2/include/log_ext.h: Likewise.
* db2/include/mp.h: Likewise.
* db2/include/mp_ext.h: Likewise.
* db2/include/mutex_ext.h: Likewise.
* db2/include/os_ext.h: Likewise.
* db2/include/os_func.h: Likewise.
* db2/include/txn.h: Likewise.
* db2/include/txn_ext.h: Likewise.
* db2/lock/lock.c: Likewise.
* db2/lock/lock_deadlock.c: Likewise.
* db2/log/log.c: Likewise.
* db2/log/log_archive.c: Likewise.
* db2/log/log_auto.c: Likewise.
* db2/log/log_findckp.c: Likewise.
* db2/log/log_get.c: Likewise.
* db2/log/log_put.c: Likewise.
* db2/log/log_rec.c: Likewise.
* db2/log/log_register.c: Likewise.
* db2/mp/mp_bh.c: Likewise.
* db2/mp/mp_fget.c: Likewise.
* db2/mp/mp_fopen.c: Likewise.
* db2/mp/mp_fput.c: Likewise.
* db2/mp/mp_fset.c: Likewise.
* db2/mp/mp_open.c: Likewise.
* db2/mp/mp_pr.c: Likewise.
* db2/mp/mp_region.c: Likewise.
* db2/mp/mp_sync.c: Likewise.
* db2/mutex/mutex.c: Likewise.
* db2/os/os_abs.c: Likewise.
* db2/os/os_dir.c: Likewise.
* db2/os/os_fid.c: Likewise.
* db2/os/os_fsync.c: Likewise.
* db2/os/os_func.c: Likewise.
* db2/os/os_map.c: Likewise.
* db2/os/os_oflags.c: Likewise.
* db2/os/os_open.c: Likewise.
* db2/os/os_rpath.c: Likewise.
* db2/os/os_rw.c: Likewise.
* db2/os/os_seek.c: Likewise.
* db2/os/os_sleep.c: Likewise.
* db2/os/os_stat.c: Likewise.
* db2/os/os_unlink.c: Likewise.
* db2/progs/db_deadlock/db_deadlock.c: Likewise.
* db2/progs/db_dump/db_dump.c: Likewise.
* db2/progs/db_load/db_load.c: Likewise.
* db2/progs/db_recover/db_recover.c: Likewise.
* db2/progs/db_stat/db_stat.c: Likewise.
* db2/txn/txn.c: Likewise.
* db2/txn/txn_auto.c: Likewise.
* db2/txn/txn_rec.c: Likewise.
* db2/os/db_os_abs.c: Removed.
* db2/os/db_os_dir.c: Removed.
* db2/os/db_os_fid.c: Removed.
* db2/os/db_os_lseek.c: Removed.
* db2/os/db_os_mmap.c: Removed.
* db2/os/db_os_open.c: Removed.
* db2/os/db_os_rw.c: Removed.
* db2/os/db_os_sleep.c: Removed.
* db2/os/db_os_stat.c: Removed.
* db2/os/db_os_unlink.c: Removed.
* libio/stdio.h (fopen): Add __restrict to parameters.
* manual/process.texi (system): Describe behaviour for NULL argument.
* stdio-common/printf-parse.h: Parse hh modifier.
* stdio-common/vfprintf.c: Handle hh modifier.
* stdio-common/vfscanf.c: Likewise.
* manual/stdio.texi: Describe hh modifier for scanf/printf.
* math/complex.h: Don't define _Imaginary_I, but instead _Complex_I.
gcc does no yet know the `imaginary' keyword.
* math/test-math.c: Add little test for know gcc bug.
* math/tgmath.h: Make complex versions of log10() only available
if __USE_GNU.
* stdlib/test-canon.c: Fix typo.
* sysdeps/generic/setenv.c: Avoid compilation warnings.
Reported by Jim Meyering.
* sysdeps/generic/bits/errno.h: EILSEQ is an ISO C error number.
* sysdeps/mach/hurd/bits/errno.h: Likewise.
* sysdeps/standalone/bits/errno.h: Likewise.
* sysdeps/unix/sysv/linux/bits/errno.h: Likewise.
* sysdeps/i386/i586/memcpy.S: New file.
* sysdeps/i386/i586/mempcpy.S: New file.
* sysdeps/i386/i586/memset.S: Fix typo.
* sysdeps/posix/getcwd.c: Define HAVE_MEMPCPY for _LIBC. Add casts.
* sysdeps/posix/system.c: Add comment to explain code.
* sysdeps/wordsize-32/inttypes.h: Include <stddef.h> for wchar_t.
Define PTRDIFF_{MIN,MAX}, SIG_ATOMIC_{MIN,MAX}, SIZE_MAX,
WCHAR_{MIN,MAX}, WINT_{MIN,MAX}.
Define wcstoimax, wcstoumax.
* sysdeps/wordsize-64/inttypes.h: Likewise.
* wcsmbs/wchar.h: Define WCHAR_{MIN,MAX} if not already defined.
Declare __wcsto{l,ul,ll,ull}_internal only if not already done.
* time/Makefile (routines): Add strfxtime.
* time/strftime.c: Implement %F and %f format.
* time/strfxtime.c: New file.
* time/time.h: Define new types and symbols from ISO C 9X.
* time/mktime.c: Little comment correction.
1997-11-10 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* sysdeps/libm-ieee754/s_sincosl.c: Fix typo.
* sysdeps/libm-ieee754/s_tanl.c: Fix typo.
* sysdeps/libm-ieee754/s_floorl.c: Correct typos.
* sysdeps/libm-ieee754/e_remainderl.c: Replace
EXTRACT_LDOUBLE_WORDS by GET_LDOUBLE_WORDS.
* sysdeps/libm-ieee754/e_atan2l.c: Replace EXTRACT_LDOUBLE_WORDS
by GET_LDOUBLE_WORDS.
* sysdeps/libm-ieee754/s_scalbnl.c: Replace ";" by "," for correct
variable declaration.
* sysdeps/libm-ieee754/s_scalblnl.c: Likewise.
* sysdeps/libm-ieee754/s_lrint.c (__lrint): Correct function.
* math/libm-test.c (sqrt_test): Add test for sqrt (0.25).
(asin_test): Add more test.
1997-11-10 23:34 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/libm-ieee754/e_asin.c: Add braces to make code clearer
and to not confuse the poor compiler.
* sysdeps/libm-ieee754/e_asinf.c: Likewise.
Reported by vertex@cagent.com.
1997-11-09 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* elf/dl-lookup.c (do_lookup): Don't accept the base version if we
require a specific one.
* libio/oldfreopen.c: Bind old symbols to version GLIBC_2.0.
* libio/oldiofopen.c: Likewise.
* libio/oldstdfiles.c: Likewise.
* libc.map: Export them.
1997-11-10 07:40 H.J. Lu <hjl@gnu.ai.mit.edu>
* stdlib/exit.c (exit): Handle recursive calls to exit ().
1997-11-09 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/fpu/s_llrint.c: Fixed to take double argument
instead of long double.
* sysdeps/m68k/fpu/s_llrintf.c: New file.
* sysdeps/m68k/fpu/s_llrintl.c: New file.
* sysdeps/libm-ieee754/s_llrint.c: Make compilable and fix
overflow condition.
* sysdeps/libm-ieee754/s_llrintf.c: Fix overflow condition.
* sysdeps/libm-ieee754/s_llrintl.c: Likewise.
* sysdeps/libm-ieee754/s_llround.c: Likewise.
* sysdeps/libm-ieee754/s_llroundf.c: Likewise.
* sysdeps/libm-ieee754/s_llroundl.c: Likewise.
* sysdeps/libm-ieee754/s_lrint.c: Likewise.
* sysdeps/libm-ieee754/s_lrintf.c: Likewise.
* sysdeps/libm-ieee754/s_lrintl.c: Likewise.
* sysdeps/libm-ieee754/s_lround.c: Likewise.
* sysdeps/libm-ieee754/s_lroundf.c: Likewise.
* sysdeps/libm-ieee754/s_lroundl.c: Likewise.
* math/libm-test.c: Test all three variants of lrint and llrint.
Fix typos in lround and llround tests. Add tests for boundary
cases for lrint and llround.
1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* manual/arith.texi: Misc doc fixes.
* manual/ctype.texi: Likewise.
* manual/pattern.texi: Likewise.
* manual/terminal.texi: Likewise.
1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/xstatconv.c: Use struct assignment
instead of memcpy to let the compiler use whatever it regards as
optimal.
* sysdeps/unix/sysv/linux/alpha/xstatconv.c: Likewise.
1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/Makefile (sysdep_headers)
[$(subdir)=misc]: Add sys/prctl.h.
* sysdeps/unix/sysv/linux/Dist: Distribute it.
1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* io/ftwtest-sh: Don't use the unknown which command, instead try
pwd as /bin/pwd and /usr/bin/pwd.
1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* manual/maint.texi (Tools for Installation): Don't recommend
broken version 3.76.1 of make.
(Porting): Fix wording.
1997-11-06 06:13 H.J. Lu <hjl@gnu.ai.mit.edu>
* config.make.in (build-pic-default): New, defined with
pic_default.
* configure.in (pic_default): New, set to yes if PIC is
default.
* Makeconfig (CPPFLAGS-.o, CPPFLAGS-.op, CPPFLAGS-.og,
CPPFLAGS-.ob): Add -DPIC if $(build-pic-default) is yes.
1997-11-09 18:15 Ulrich Drepper <drepper@cygnus.com>
* Makerules (libc.so): Fix typo.
* csu/Makefile (CFLAGS-initfini.s): Correctly fix moving function
definition. Patch by Zack Weinberg <zack@rabi.phys.columbia.edu>.
* stdlib/strtod.c: Handle numbers like 0.0e10000 correctly which
produce ±0.0. Reported by Joe Keane <jgk@jgk.org>.
* sysdeps/libm-ieee754/s_ceill.c: Fix typos.
* sysdeps/libm-ieee754/s_llrint.c: Correct code, it never worked.
1997-11-06 07:00 H.J. Lu <hjl@gnu.ai.mit.edu>
* sysdeps/unix/sysv/i386/i686/time.S: Removed.
1997-11-08 14:07 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
* nis/libnsl.map: Add __do_niscall2 for nis_cachemgr.
* nis/nis_call.c: Set UDP resend timeout correct.
* nis/nss_compat/compat-grp.c: Rewritten to make it faster.
* nis/nss_compat/compat-pwd.c: Likewise.
* nis/nss_compat/compat-spwd.c: Likewise.
* nis/ypclnt.c: Fix UDP resend timeout, fix yp_bind/do_ypcall
interaction.
* inet/protocols/routed.h: Include sys/socket.h.
* inet/protocols/talkd.h: Likewise.
* inet/protocols/timed.h: Include rpc/types.h.
* sunrpc/rpc/pmap_clnt.h: Include rpc/clnt.h.
1997-11-06 01:39 Ulrich Drepper <drepper@cygnus.com>
* Makerules (libc.so): Add missing closing brace.
1997-11-05 Brendan Kehoe <brendan@lisa.cygnus.com>
* libio.h (__P): Name its arg `p' instead of `params'.
This was added solely to work around problems with
the definition of __P in the Solaris math.h header.
1997-11-12 01:06:02 +01:00
|
|
|
#include <fcntl.h>
|
1996-12-11 02:40:39 +01:00
|
|
|
#include <string.h>
|
|
|
|
#include <unistd.h>
|
1999-06-19 11:58:37 +02:00
|
|
|
#include <libintl.h>
|
1997-04-05 03:26:47 +02:00
|
|
|
#include <rpc/rpc.h>
|
Update.
1997-07-13 01:18 Ulrich Drepper <drepper@cygnus.com>
* setjmp/setjmp.h: Define _setjmp and _longjmp also if __USE_XOPEN.
* sysdeps/unix/sysv/linux/bits/ipc.h: Fix comment.
* sysdeps/unix/sysv/linux/bits/msq.h: Likewise.
* sysdeps/unix/sysv/linux/bits/sem.h: Likewise.
* sysdeps/unix/sysv/linux/bits/shm.h: Likewise.
* time/Makefile (routines): Add getdate.
* time/time.h: Add prototype for getdate and getdate_r.
* time/getdate.c: New file.
Provided by Mark Kettenis <kettenis@phys.uva.nl>.
1997-06-30 14:49 H.J. Lu <hjl@gnu.ai.mit.edu>
From Ralf Baechle <ralf@informatik.uni-koblenz.de> on
Sat Jun 21 18:11:21 1997:
* sysdeps/unix/sysv/linux/syscalls.list (swapon): Add __swapon alias.
(swapoff): New.
* elf/Makefile: Add linker script support.
(headers): Add bits/dlfcn.h.
* elf/dl-load.c (MAP_BASE_ADDR): New.
* elf/dlfcn.h: Include <bits/dlfcn.h>.
* elf/elf.h: Add MIPS support.
* sysdeps/generic/Dist: Add entry.h.
* sysdeps/generic/entry.h: New, define the entry symbol.
* elf/rtld.c (_start): Include <entry.h>. Change to ENTRY_POINT.
* sysdeps/generic/dl-sysdep.c (_start): Likewise.
* mips/elf/start.S (_start): Likewise.
* sysdeps/mips/bsd-_setjmp.S: Fix PIC.
* sysdeps/mips/bsd-setjmp.S: Likewise.
* sysdeps/mips/setjmp.S: Likewise.
* mips/elf/start.S: Likewise.
* sysdeps/unix/mips/brk.S: Likewise.
* sysdeps/unix/mips/sysdep.S: Likewise.
* sysdeps/unix/mips/sysdep.h: Likewise.
* sysdeps/unix/mips/wait.S: Likewise.
* sysdeps/mips/dl-machine.h: Update for Linux/MIPS.
* sysdeps/mips/fpu_control.h: Likewise.
* sysdeps/generic/bits/dlfcn.h: New file.
* sysdeps/mips/rtld-ldscript.in: New for Linux/MIPS.
* sysdeps/mips/rtld-parms: Likewise.
* sysdeps/mips/bits/dlfcn.h: Likewise.
* sysdeps/mips/mips64/rtld-parms: Likewise.
* sysdeps/mips/mipsel/rtld-parms: Likewise.
* sysdeps/unix/sysv/linux/mips/Dist: Likewise.
* sysdeps/unix/sysv/linux/mips/Makefile: Likewise.
* sysdeps/unix/sysv/linux/mips/clone.S: Likewise.
* sysdeps/unix/sysv/linux/mips/entry.h: Likewise.
* sysdeps/unix/sysv/linux/mips/fpregdef.h: Likewise.
* sysdeps/unix/sysv/linux/mips/fxstat.c: Likewise.
* sysdeps/unix/sysv/linux/mips/kernel_sigaction.h: Likewise.
* sysdeps/unix/sysv/linux/mips/kernel_stat.h: Likewise.
* sysdeps/unix/sysv/linux/mips/kernel_termios.h: Likewise.
* sysdeps/unix/sysv/linux/mips/lxstat.c: Likewise.
* sysdeps/unix/sysv/linux/mips/regdef.h: Likewise.
* sysdeps/unix/sysv/linux/mips/sgidefs.h: Likewise.
* sysdeps/unix/sysv/linux/mips/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/mips/ustat.c: Likewise.
* sysdeps/unix/sysv/linux/mips/xmknod.c: Likewise.
* sysdeps/unix/sysv/linux/mips/xstat.c: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/endian.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/ioctl-types.h:
* sysdeps/unix/sysv/linux/mips/bits/ipc.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/shm.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/sigaction.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/signum.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/socket.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/stat.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/statfs.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/termios.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/time.h: Likewise.
* sysdeps/unix/sysv/linux/mips/sys/acct.h: Likewise.
* sysdeps/unix/sysv/linux/mips/sys/asm.h: Likewise.
* sysdeps/unix/sysv/linux/mips/sys/cachectl.h: Likewise.
* sysdeps/unix/sysv/linux/mips/sys/fpregdef.h: Likewise.
* sysdeps/unix/sysv/linux/mips/sys/procfs.h: Likewise.
* sysdeps/unix/sysv/linux/mips/sys/regdef.h: Likewise.
* sysdeps/unix/sysv/linux/mips/sys/syscall.h: Likewise.
* sysdeps/unix/sysv/linux/mips/sys/sysmips.h: Likewise.
1997-04-09 19:05 H.J. Lu (hjl@gnu.ai.mit.edu)
* isomac.c (xstrndup): New, use it instead of strndup ().
1997-07-02 08:55 H.J. Lu <hjl@gnu.ai.mit.edu>
* sysdeps/i386/dl-machine.h (elf_machine_rel): Print
the program name for different sizes.
1997-07-10 15:47 Fila Kolodny <fila@ibi.com>
* nis/ypclnt.c: Change references to MAXHOSTNAMELEN to NIS_MAXNAMELEN.
Add include of rpcsvc/nis.h.
* inet/getnameinfo.c: Delete references to MAXHOSTNAMELEN.
* sysdeps/posix/getaddrinfo.c: Likewise.
Change size of variable buffer to be big enough to hold an IPv6
address in printable format.
1997-07-12 18:47 Ulrich Drepper <drepper@cygnus.com>
* assert/assert.h [!NDEBUG] (assert, assert_perror): Don't use ||
and && in tests to allow use in C++ code which overloads these
operators. Reported by Istvan Marko <istvan@cmdmail.amd.com>.
* configure.in: Move mips64* recognition before mips*.
Patch by Zack Weinberg <zack@rabi.phys.columbia.edu>.
1997-07-03 20:44 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Makerules (lib%.so, $(common-objpfx)libc.so): Don't use
automatic variables in dependency lists.
(build-shlib): Always filter out the version script file.
* extra-lib.mk ($(objpfx)$(lib).so): Depend on version script.
1997-07-12 17:56 Ulrich Drepper <drepper@cygnus.com>
* login/login.c (tty_name): Test return value of ttyname_r for !=
0, not < 0.
* misc/ttyslot.c (ttyslot): Test return value of ttyname_r for ==
0, not >= 0.
* sysdeps/unix/getlogin.c (getlogin): Test return value of
ttyname_r for != 0.
* sysdeps/unix/getlogin_r.c (getlogin_r): Likewise.
1997-07-10 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* login/utmp_file.c (getutline_r_file): Fix type: compare with
*result.
1997-07-11 00:21 Mark Kettenis <kettenis@phys.uva.nl>
* login/Makefile (headers): Add utmpx.h and bits/utmpx.h.
1997-07-09 19:21 Mark Kettenis <kettenis@phys.uva.nl>
* login/programs/utmpd.c, login/programs/database.c,
login/programs/request.c: Prepare messages for
internationalization.
* login/programs/utmpd.c:
(main): Change handling of errors in opening the database.
* login/programs/database.c:
(open_database, synchronize_dtatabase, initialize_database):
Properly handle errors.
(get_mtime): Use fstat instead of stat. All callers changed.
* login/getutent_r.c: Make setutxent a weak alias for __setutxent.
* login/getutent.c: Rename getutent to __getutent and make
getutent a weak alias.
Make getutxent a weak alias for __getutent.
* login/utmpx.h: New file.
* sysdeps/gnu/bits/utmp.h: Cleanup. Added comments.
* sysdeps/gnu/bits/utmpx.h: New file.
* stdio-common/strops.c: Partialy undo last change. Will need
more investigation.
1997-07-13 01:35:19 +02:00
|
|
|
#include <rpcsvc/nis.h>
|
1996-12-11 02:40:39 +01:00
|
|
|
#include <rpcsvc/yp.h>
|
|
|
|
#include <rpcsvc/ypclnt.h>
|
|
|
|
#include <rpcsvc/ypupd.h>
|
2008-07-25 19:06:50 +02:00
|
|
|
#include <sys/socket.h>
|
1998-01-30 14:22:30 +01:00
|
|
|
#include <sys/uio.h>
|
Update.
1997-11-11 21:30 Ulrich Drepper <drepper@cygnus.com>
* include/sys/stat.h: Define stat, fstat, lstat and *64 variants
as macros so the the library compiles correctly even without
optimization.
* io/fstat.c: Undef fstat.
* io/fstat64.c: Undef fstat64
* io/lstat.c: Undef lstat.
* io/lstat64.c: Undef lstat64
* io/stat.c: Undef stat.
* io/stat64.c: Undef stat64
* io/fts.c: Include <include/sys/stat.h> to get macro definitions.
* io/ftw.c: Likewise.
* io/getdirname.c: Likewise.
* Makefile (install): Run test-installation.pl if possible.
* db2/Makefile: Update from db-2.3.12.
* db2/db.h: Likewise.
* db2/db_int.h: Likewise.
* db2/btree/bt_cursor.c: Likewise.
* db2/btree/bt_delete.c: Likewise.
* db2/btree/bt_open.c: Likewise.
* db2/btree/bt_put.c: Likewise.
* db2/btree/bt_rec.c: Likewise.
* db2/btree/bt_recno.c: Likewise.
* db2/btree/bt_search.c: Likewise.
* db2/btree/bt_split.c: Likewise.
* db2/btree/bt_stat.c: Likewise.
* db2/btree/btree.src: Likewise.
* db2/btree/btree_auto.c: Likewise.
* db2/btree/bt_cursor.c: Likewise.
* db2/btree/bt_delete.c: Likewise.
* db2/btree/bt_open.c: Likewise.
* db2/btree/bt_put.c: Likewise.
* db2/btree/bt_rec.c: Likewise.
* db2/btree/bt_recno.c: Likewise.
* db2/btree/bt_search.c: Likewise.
* db2/btree/bt_split.c: Likewise.
* db2/btree/bt_stat.c: Likewise.
* db2/btree/btree.src: Likewise.
* db2/btree/btree_auto.c: Likewise.
* db2/common/db_appinit.c: Likewise.
* db2/common/db_apprec.c: Likewise.
* db2/common/db_byteorder.c: Likewise.
* db2/common/db_region.c: Likewise.
* db2/db/db.c: Likewise
* db2/db/db.src: Likewise
* db2/db/db_auto.c: Likewise
* db2/db/db_dispatch.c: Likewise
* db2/db/db_dup.c: Likewise
* db2/db/db_overflow.c: Likewise
* db2/db/db_pr.c: Likewise
* db2/db/db_rec.c: Likewise
* db2/db/db_ret.c: Likewise
* db2/db/db_thread.c: Likewise
* db2/db185/db185.c: Likewise.
* db2/hash/hash.c: Likewise.
* db2/hash/hash.src: Likewise.
* db2/hash/hash_auto.c: Likewise.
* db2/hash/hash_dup.c: Likewise.
* db2/hash/hash_page.c: Likewise.
* db2/hash/hash_rec.c: Likewise.
* db2/include/btree_auto.h: Likewise.
* db2/include/btree_ext.h: Likewise.
* db2/include/clib_ext.h: Likewise.
* db2/include/common_ext.h: Likewise.
* db2/include/db.h.src: Likewise.
* db2/include/db_am.h: Likewise.
* db2/include/db_auto.h: Likewise.
* db2/include/db_cxx.h: Likewise.
* db2/include/db_ext.h: Likewise.
* db2/include/db_int.h.src: Likewise.
* db2/include/hash.h: Likewise.
* db2/include/hash_auto.h: Likewise.
* db2/include/hash_ext.h: Likewise.
* db2/include/lock.h: Likewise.
* db2/include/lock_ext.h: Likewise.
* db2/include/log.h: Likewise.
* db2/include/log_ext.h: Likewise.
* db2/include/mp.h: Likewise.
* db2/include/mp_ext.h: Likewise.
* db2/include/mutex_ext.h: Likewise.
* db2/include/os_ext.h: Likewise.
* db2/include/os_func.h: Likewise.
* db2/include/txn.h: Likewise.
* db2/include/txn_ext.h: Likewise.
* db2/lock/lock.c: Likewise.
* db2/lock/lock_deadlock.c: Likewise.
* db2/log/log.c: Likewise.
* db2/log/log_archive.c: Likewise.
* db2/log/log_auto.c: Likewise.
* db2/log/log_findckp.c: Likewise.
* db2/log/log_get.c: Likewise.
* db2/log/log_put.c: Likewise.
* db2/log/log_rec.c: Likewise.
* db2/log/log_register.c: Likewise.
* db2/mp/mp_bh.c: Likewise.
* db2/mp/mp_fget.c: Likewise.
* db2/mp/mp_fopen.c: Likewise.
* db2/mp/mp_fput.c: Likewise.
* db2/mp/mp_fset.c: Likewise.
* db2/mp/mp_open.c: Likewise.
* db2/mp/mp_pr.c: Likewise.
* db2/mp/mp_region.c: Likewise.
* db2/mp/mp_sync.c: Likewise.
* db2/mutex/mutex.c: Likewise.
* db2/os/os_abs.c: Likewise.
* db2/os/os_dir.c: Likewise.
* db2/os/os_fid.c: Likewise.
* db2/os/os_fsync.c: Likewise.
* db2/os/os_func.c: Likewise.
* db2/os/os_map.c: Likewise.
* db2/os/os_oflags.c: Likewise.
* db2/os/os_open.c: Likewise.
* db2/os/os_rpath.c: Likewise.
* db2/os/os_rw.c: Likewise.
* db2/os/os_seek.c: Likewise.
* db2/os/os_sleep.c: Likewise.
* db2/os/os_stat.c: Likewise.
* db2/os/os_unlink.c: Likewise.
* db2/progs/db_deadlock/db_deadlock.c: Likewise.
* db2/progs/db_dump/db_dump.c: Likewise.
* db2/progs/db_load/db_load.c: Likewise.
* db2/progs/db_recover/db_recover.c: Likewise.
* db2/progs/db_stat/db_stat.c: Likewise.
* db2/txn/txn.c: Likewise.
* db2/txn/txn_auto.c: Likewise.
* db2/txn/txn_rec.c: Likewise.
* db2/os/db_os_abs.c: Removed.
* db2/os/db_os_dir.c: Removed.
* db2/os/db_os_fid.c: Removed.
* db2/os/db_os_lseek.c: Removed.
* db2/os/db_os_mmap.c: Removed.
* db2/os/db_os_open.c: Removed.
* db2/os/db_os_rw.c: Removed.
* db2/os/db_os_sleep.c: Removed.
* db2/os/db_os_stat.c: Removed.
* db2/os/db_os_unlink.c: Removed.
* libio/stdio.h (fopen): Add __restrict to parameters.
* manual/process.texi (system): Describe behaviour for NULL argument.
* stdio-common/printf-parse.h: Parse hh modifier.
* stdio-common/vfprintf.c: Handle hh modifier.
* stdio-common/vfscanf.c: Likewise.
* manual/stdio.texi: Describe hh modifier for scanf/printf.
* math/complex.h: Don't define _Imaginary_I, but instead _Complex_I.
gcc does no yet know the `imaginary' keyword.
* math/test-math.c: Add little test for know gcc bug.
* math/tgmath.h: Make complex versions of log10() only available
if __USE_GNU.
* stdlib/test-canon.c: Fix typo.
* sysdeps/generic/setenv.c: Avoid compilation warnings.
Reported by Jim Meyering.
* sysdeps/generic/bits/errno.h: EILSEQ is an ISO C error number.
* sysdeps/mach/hurd/bits/errno.h: Likewise.
* sysdeps/standalone/bits/errno.h: Likewise.
* sysdeps/unix/sysv/linux/bits/errno.h: Likewise.
* sysdeps/i386/i586/memcpy.S: New file.
* sysdeps/i386/i586/mempcpy.S: New file.
* sysdeps/i386/i586/memset.S: Fix typo.
* sysdeps/posix/getcwd.c: Define HAVE_MEMPCPY for _LIBC. Add casts.
* sysdeps/posix/system.c: Add comment to explain code.
* sysdeps/wordsize-32/inttypes.h: Include <stddef.h> for wchar_t.
Define PTRDIFF_{MIN,MAX}, SIG_ATOMIC_{MIN,MAX}, SIZE_MAX,
WCHAR_{MIN,MAX}, WINT_{MIN,MAX}.
Define wcstoimax, wcstoumax.
* sysdeps/wordsize-64/inttypes.h: Likewise.
* wcsmbs/wchar.h: Define WCHAR_{MIN,MAX} if not already defined.
Declare __wcsto{l,ul,ll,ull}_internal only if not already done.
* time/Makefile (routines): Add strfxtime.
* time/strftime.c: Implement %F and %f format.
* time/strfxtime.c: New file.
* time/time.h: Define new types and symbols from ISO C 9X.
* time/mktime.c: Little comment correction.
1997-11-10 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* sysdeps/libm-ieee754/s_sincosl.c: Fix typo.
* sysdeps/libm-ieee754/s_tanl.c: Fix typo.
* sysdeps/libm-ieee754/s_floorl.c: Correct typos.
* sysdeps/libm-ieee754/e_remainderl.c: Replace
EXTRACT_LDOUBLE_WORDS by GET_LDOUBLE_WORDS.
* sysdeps/libm-ieee754/e_atan2l.c: Replace EXTRACT_LDOUBLE_WORDS
by GET_LDOUBLE_WORDS.
* sysdeps/libm-ieee754/s_scalbnl.c: Replace ";" by "," for correct
variable declaration.
* sysdeps/libm-ieee754/s_scalblnl.c: Likewise.
* sysdeps/libm-ieee754/s_lrint.c (__lrint): Correct function.
* math/libm-test.c (sqrt_test): Add test for sqrt (0.25).
(asin_test): Add more test.
1997-11-10 23:34 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/libm-ieee754/e_asin.c: Add braces to make code clearer
and to not confuse the poor compiler.
* sysdeps/libm-ieee754/e_asinf.c: Likewise.
Reported by vertex@cagent.com.
1997-11-09 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* elf/dl-lookup.c (do_lookup): Don't accept the base version if we
require a specific one.
* libio/oldfreopen.c: Bind old symbols to version GLIBC_2.0.
* libio/oldiofopen.c: Likewise.
* libio/oldstdfiles.c: Likewise.
* libc.map: Export them.
1997-11-10 07:40 H.J. Lu <hjl@gnu.ai.mit.edu>
* stdlib/exit.c (exit): Handle recursive calls to exit ().
1997-11-09 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/fpu/s_llrint.c: Fixed to take double argument
instead of long double.
* sysdeps/m68k/fpu/s_llrintf.c: New file.
* sysdeps/m68k/fpu/s_llrintl.c: New file.
* sysdeps/libm-ieee754/s_llrint.c: Make compilable and fix
overflow condition.
* sysdeps/libm-ieee754/s_llrintf.c: Fix overflow condition.
* sysdeps/libm-ieee754/s_llrintl.c: Likewise.
* sysdeps/libm-ieee754/s_llround.c: Likewise.
* sysdeps/libm-ieee754/s_llroundf.c: Likewise.
* sysdeps/libm-ieee754/s_llroundl.c: Likewise.
* sysdeps/libm-ieee754/s_lrint.c: Likewise.
* sysdeps/libm-ieee754/s_lrintf.c: Likewise.
* sysdeps/libm-ieee754/s_lrintl.c: Likewise.
* sysdeps/libm-ieee754/s_lround.c: Likewise.
* sysdeps/libm-ieee754/s_lroundf.c: Likewise.
* sysdeps/libm-ieee754/s_lroundl.c: Likewise.
* math/libm-test.c: Test all three variants of lrint and llrint.
Fix typos in lround and llround tests. Add tests for boundary
cases for lrint and llround.
1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* manual/arith.texi: Misc doc fixes.
* manual/ctype.texi: Likewise.
* manual/pattern.texi: Likewise.
* manual/terminal.texi: Likewise.
1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/xstatconv.c: Use struct assignment
instead of memcpy to let the compiler use whatever it regards as
optimal.
* sysdeps/unix/sysv/linux/alpha/xstatconv.c: Likewise.
1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/Makefile (sysdep_headers)
[$(subdir)=misc]: Add sys/prctl.h.
* sysdeps/unix/sysv/linux/Dist: Distribute it.
1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* io/ftwtest-sh: Don't use the unknown which command, instead try
pwd as /bin/pwd and /usr/bin/pwd.
1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* manual/maint.texi (Tools for Installation): Don't recommend
broken version 3.76.1 of make.
(Porting): Fix wording.
1997-11-06 06:13 H.J. Lu <hjl@gnu.ai.mit.edu>
* config.make.in (build-pic-default): New, defined with
pic_default.
* configure.in (pic_default): New, set to yes if PIC is
default.
* Makeconfig (CPPFLAGS-.o, CPPFLAGS-.op, CPPFLAGS-.og,
CPPFLAGS-.ob): Add -DPIC if $(build-pic-default) is yes.
1997-11-09 18:15 Ulrich Drepper <drepper@cygnus.com>
* Makerules (libc.so): Fix typo.
* csu/Makefile (CFLAGS-initfini.s): Correctly fix moving function
definition. Patch by Zack Weinberg <zack@rabi.phys.columbia.edu>.
* stdlib/strtod.c: Handle numbers like 0.0e10000 correctly which
produce ±0.0. Reported by Joe Keane <jgk@jgk.org>.
* sysdeps/libm-ieee754/s_ceill.c: Fix typos.
* sysdeps/libm-ieee754/s_llrint.c: Correct code, it never worked.
1997-11-06 07:00 H.J. Lu <hjl@gnu.ai.mit.edu>
* sysdeps/unix/sysv/i386/i686/time.S: Removed.
1997-11-08 14:07 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
* nis/libnsl.map: Add __do_niscall2 for nis_cachemgr.
* nis/nis_call.c: Set UDP resend timeout correct.
* nis/nss_compat/compat-grp.c: Rewritten to make it faster.
* nis/nss_compat/compat-pwd.c: Likewise.
* nis/nss_compat/compat-spwd.c: Likewise.
* nis/ypclnt.c: Fix UDP resend timeout, fix yp_bind/do_ypcall
interaction.
* inet/protocols/routed.h: Include sys/socket.h.
* inet/protocols/talkd.h: Likewise.
* inet/protocols/timed.h: Include rpc/types.h.
* sunrpc/rpc/pmap_clnt.h: Include rpc/clnt.h.
1997-11-06 01:39 Ulrich Drepper <drepper@cygnus.com>
* Makerules (libc.so): Add missing closing brace.
1997-11-05 Brendan Kehoe <brendan@lisa.cygnus.com>
* libio.h (__P): Name its arg `p' instead of `params'.
This was added solely to work around problems with
the definition of __P in the Solaris math.h header.
1997-11-12 01:06:02 +01:00
|
|
|
#include <bits/libc-lock.h>
|
1996-12-11 02:40:39 +01:00
|
|
|
|
1998-01-30 14:22:30 +01:00
|
|
|
/* This should only be defined on systems with a BSD compatible ypbind */
|
|
|
|
#ifndef BINDINGDIR
|
|
|
|
# define BINDINGDIR "/var/yp/binding"
|
|
|
|
#endif
|
|
|
|
|
1996-12-11 02:40:39 +01:00
|
|
|
struct dom_binding
|
|
|
|
{
|
|
|
|
struct dom_binding *dom_pnext;
|
|
|
|
char dom_domain[YPMAXDOMAIN + 1];
|
|
|
|
struct sockaddr_in dom_server_addr;
|
|
|
|
int dom_socket;
|
|
|
|
CLIENT *dom_client;
|
|
|
|
};
|
|
|
|
typedef struct dom_binding dom_binding;
|
|
|
|
|
2005-11-27 02:20:12 +01:00
|
|
|
static const struct timeval RPCTIMEOUT = {25, 0};
|
|
|
|
static const struct timeval UDPTIMEOUT = {5, 0};
|
1999-03-09 10:55:51 +01:00
|
|
|
static int const MAXTRIES = 2;
|
2005-11-26 23:16:03 +01:00
|
|
|
static char ypdomainname[NIS_MAXNAMELEN + 1];
|
1996-12-11 02:40:39 +01:00
|
|
|
__libc_lock_define_initialized (static, ypbindlist_lock)
|
2005-11-26 23:16:03 +01:00
|
|
|
static dom_binding *ypbindlist = NULL;
|
1996-12-11 02:40:39 +01:00
|
|
|
|
update from main archive 961211
Thu Dec 12 03:32:21 1996 Ulrich Drepper <drepper@cygnus.com>
* libio/_G_config.h: Add definition of _G_int16_t, _G_int32_t,
_G_uint16_t, _G_uin32_t, _G_HAVE_BOOL, _G_HAVE_MMAP, and
_G_ARGS.
Change libio buffer handling to allocate internal buffers using
mmap if possible.
* libio/filedoalloc.c (_IO_file_doallocate): Change call to
ALLOC_BUF.
* libio/genops.c (_IO_setb, _IO_default_finish): Change call
to FREE_BUF.
(_IO_default_doallocate): Change call to ALLOC_BUF.
* libio/libioP.h: Change definition of ALLOC_BUF and FREE_BUF
to use mmap/munmap when possible.
* libio/memstream.c: Don't use ALLOC_BUF, but directly malloc.
* libio/vasprintf.c: Likewise.
Patch by HJ Lu.
* libio/libio.h: Define NULL as __null only for gcc-2.8 and up.
* libio/libioP.h: Likewise.
* libio/fileops.c (_IO_file_read, _IO_file_write): Don't
restart syscall when EINTR was returned. Necessary for POSIX.1.
* libio/strops.c (_IO_str_overflow): Add cast to prevent warning.
* new-malloc/malloc.c (heap_trim): Correctly place parentheses to
prevent warnings.
* nis/Makefile: Remove rules for bsd-tools which are not part
of glibc.
Patch by Thorsten Kukuk.
* nis/ypclnt.c: Add prototype for xdr_free.
Add const to first parameter for __yp_bind.
* nis/nss_compat/compat-pwd.c (getpwent_next_netgr, getpwent_next_nis,
getpwent_next_file): Variable `p2len' must have type size_t.
* nis/nss_nis/nis-alias.c: Add casts to prevent warnings.
* nis/nss_nis/nis-ethers.c: Likewise.
* nis/nss_nis/nis-grp.c: Likewise.
* nis/nss_nis/nis-hosts.c: Likewise.
* nis/nss_nis/nis-network.c: Likewise.
* nis/nss_nis/nis-proto.c: Likewise.
* nis/nss_nis/nis-pwd.c: Likewise.
* nis/nss_nis/nis-rpc.c: Likewise.
* nis/nss_nis/nis-service.c: Likewise.
* nis/nss_nis/nis-spwd.c: Likewise.
* nis/rpcsvc/yp_prot.h (ypreq_key): Change type of members to
`const char *'.
(ypmaplist): Change member names to `map' and `next' and provide
#defines for old names.
Patch by Thorsten Kukuk.
* nss/nss_files/files-parse.c (parse_line, parse_list): Change
type for `datalen' parameter to size_t.
* shsdow/lckpwdf.c: Use fcntl forlocking, not flock.
* stdio-common/printf.c [USE_IN_LIBIO]: Provide alias _IO_printf
for printf.
* stdio-common/sscanf.c [USE_IN_LIBIO]: Provide alias _IO_sscanf
for sscanf.
Patch by HJ Lu.
* stdio-common/tmpfile.c: Update copyright.
* stdio-common/vfscanf.c: Correctly handle EINTR error from fgetc
function.
Don't eat white space for `C' format.
* stdlib/tst-strtol.c [~0UL != 0xffffffff]: Fix typo in test data.
* sysdeps/generic/abort.c: Update copyright. De-ANSI-declfy.
* sysdeps/i386/abort.c: Removed. This version does not use
signal SIGABRT.
* sysdeps/i386/fpu/__math.h: Define __NO_MATH_INLINES if not using
gcc-2.8 or up.
Patch by HJ Lu.
* sysdeps/posix/tempname.c: Test for error but EEXIST after open
call. If EMFILE, ENFILE, or EINTR return with error.
Wed Dec 11 14:43:52 1996 Ulrich Drepper <drepper@cygnus.com>
* gnu-versions.h: Set _GNU_OBSTACK_INTERFACE_VERSION back to 1.
We are compatible again.
* new-malloc/obstack.h (struct obstack): Add back alloc_failed bit
even though it is not used.
* malloc/obstack.h: Likewise.
* new-malloc/obstack.c (_obstack_begin, _obstack_begin_1): Initialize
alloc_failed bit to 0.
* time/strftime.c: Extend for Emacs' needs. Recognize field width,
%P format and `0' modifier.
Tue Dec 10 21:20:44 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Makerules (make-link): Don't discard exit codes of intermediate
commands. Always use rellns-sh if symbolic links are available.
Tue Dec 10 20:09:51 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/netinet/in.h: Enclose #include
<linux/in.h> in __BEGIN_DECLS/__END_DECLS to avoid linkage
conflict of ntohs etc. in <asm/byteorder.h>.
1996-12-12 04:24:48 +01:00
|
|
|
|
2004-02-09 21:33:35 +01:00
|
|
|
static void
|
2004-02-09 22:19:19 +01:00
|
|
|
yp_bind_client_create (const char *domain, dom_binding *ysd,
|
|
|
|
struct ypbind_resp *ypbr)
|
2004-02-09 21:33:35 +01:00
|
|
|
{
|
|
|
|
ysd->dom_server_addr.sin_family = AF_INET;
|
|
|
|
memcpy (&ysd->dom_server_addr.sin_port,
|
|
|
|
ypbr->ypbind_resp_u.ypbind_bindinfo.ypbind_binding_port,
|
|
|
|
sizeof (ysd->dom_server_addr.sin_port));
|
|
|
|
memcpy (&ysd->dom_server_addr.sin_addr.s_addr,
|
|
|
|
ypbr->ypbind_resp_u.ypbind_bindinfo.ypbind_binding_addr,
|
|
|
|
sizeof (ysd->dom_server_addr.sin_addr.s_addr));
|
|
|
|
strncpy (ysd->dom_domain, domain, YPMAXDOMAIN);
|
|
|
|
ysd->dom_domain[YPMAXDOMAIN] = '\0';
|
|
|
|
|
|
|
|
ysd->dom_socket = RPC_ANYSOCK;
|
2008-07-25 19:06:50 +02:00
|
|
|
#ifdef SOCK_CLOEXEC
|
|
|
|
# define xflags SOCK_CLOEXEC
|
|
|
|
#else
|
|
|
|
# define xflags 0
|
|
|
|
#endif
|
|
|
|
ysd->dom_client = __libc_clntudp_bufcreate (&ysd->dom_server_addr, YPPROG,
|
|
|
|
YPVERS, UDPTIMEOUT,
|
|
|
|
&ysd->dom_socket,
|
|
|
|
UDPMSGSIZE, UDPMSGSIZE,
|
|
|
|
xflags);
|
2004-02-09 21:33:35 +01:00
|
|
|
|
|
|
|
if (ysd->dom_client != NULL)
|
|
|
|
{
|
2008-07-25 19:06:50 +02:00
|
|
|
#ifndef SOCK_CLOEXEC
|
2004-02-09 21:33:35 +01:00
|
|
|
/* If the program exits, close the socket */
|
2004-09-25 03:14:47 +02:00
|
|
|
if (fcntl (ysd->dom_socket, F_SETFD, FD_CLOEXEC) == -1)
|
2004-02-09 21:33:35 +01:00
|
|
|
perror ("fcntl: F_SETFD");
|
2008-07-25 19:06:50 +02:00
|
|
|
#endif
|
2004-02-09 21:33:35 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-02-09 22:19:19 +01:00
|
|
|
#if USE_BINDINGDIR
|
2004-02-09 21:33:35 +01:00
|
|
|
static void
|
2004-02-09 22:19:19 +01:00
|
|
|
yp_bind_file (const char *domain, dom_binding *ysd)
|
2004-02-09 21:33:35 +01:00
|
|
|
{
|
2004-09-25 03:14:47 +02:00
|
|
|
char path[sizeof (BINDINGDIR) + strlen (domain) + 3 * sizeof (unsigned) + 3];
|
2004-02-09 21:33:35 +01:00
|
|
|
|
2004-09-25 03:14:47 +02:00
|
|
|
snprintf (path, sizeof (path), "%s/%s.%u", BINDINGDIR, domain, YPBINDVERS);
|
|
|
|
int fd = open (path, O_RDONLY);
|
2004-02-09 21:33:35 +01:00
|
|
|
if (fd >= 0)
|
|
|
|
{
|
2004-09-25 03:14:47 +02:00
|
|
|
/* We have a binding file and could save a RPC call. The file
|
|
|
|
contains a port number and the YPBIND_RESP record. The port
|
|
|
|
number (16 bits) can be ignored. */
|
|
|
|
struct ypbind_resp ypbr;
|
2004-02-09 21:33:35 +01:00
|
|
|
|
2004-09-25 03:14:47 +02:00
|
|
|
if (pread (fd, &ypbr, sizeof (ypbr), 2) == sizeof (ypbr))
|
2004-02-09 22:19:19 +01:00
|
|
|
yp_bind_client_create (domain, ysd, &ypbr);
|
2004-02-09 21:33:35 +01:00
|
|
|
|
|
|
|
close (fd);
|
|
|
|
}
|
|
|
|
}
|
2004-02-09 22:19:19 +01:00
|
|
|
#endif
|
2004-02-09 21:33:35 +01:00
|
|
|
|
1996-12-11 02:40:39 +01:00
|
|
|
static int
|
2004-02-09 22:19:19 +01:00
|
|
|
yp_bind_ypbindprog (const char *domain, dom_binding *ysd)
|
1996-12-11 02:40:39 +01:00
|
|
|
{
|
|
|
|
struct sockaddr_in clnt_saddr;
|
|
|
|
struct ypbind_resp ypbr;
|
|
|
|
int clnt_sock;
|
|
|
|
CLIENT *client;
|
2004-02-09 21:33:35 +01:00
|
|
|
|
|
|
|
clnt_saddr.sin_family = AF_INET;
|
2005-11-26 23:16:03 +01:00
|
|
|
clnt_saddr.sin_port = 0;
|
2004-02-09 21:33:35 +01:00
|
|
|
clnt_saddr.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
|
|
|
|
clnt_sock = RPC_ANYSOCK;
|
|
|
|
client = clnttcp_create (&clnt_saddr, YPBINDPROG, YPBINDVERS,
|
|
|
|
&clnt_sock, 0, 0);
|
|
|
|
if (client == NULL)
|
|
|
|
return YPERR_YPBIND;
|
|
|
|
|
|
|
|
/* Check the port number -- should be < IPPORT_RESERVED.
|
|
|
|
If not, it's possible someone has registered a bogus
|
|
|
|
ypbind with the portmapper and is trying to trick us. */
|
|
|
|
if (ntohs (clnt_saddr.sin_port) >= IPPORT_RESERVED)
|
|
|
|
{
|
|
|
|
clnt_destroy (client);
|
|
|
|
return YPERR_YPBIND;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (clnt_call (client, YPBINDPROC_DOMAIN,
|
|
|
|
(xdrproc_t) xdr_domainname, (caddr_t) &domain,
|
|
|
|
(xdrproc_t) xdr_ypbind_resp,
|
|
|
|
(caddr_t) &ypbr, RPCTIMEOUT) != RPC_SUCCESS)
|
|
|
|
{
|
|
|
|
clnt_destroy (client);
|
|
|
|
return YPERR_YPBIND;
|
|
|
|
}
|
|
|
|
|
|
|
|
clnt_destroy (client);
|
|
|
|
|
|
|
|
if (ypbr.ypbind_status != YPBIND_SUCC_VAL)
|
|
|
|
{
|
2005-11-26 23:16:03 +01:00
|
|
|
fprintf (stderr, "YPBINDPROC_DOMAIN: %s\n",
|
2004-02-09 21:33:35 +01:00
|
|
|
ypbinderr_string (ypbr.ypbind_resp_u.ypbind_error));
|
|
|
|
return YPERR_DOMAIN;
|
|
|
|
}
|
|
|
|
memset (&ysd->dom_server_addr, '\0', sizeof ysd->dom_server_addr);
|
|
|
|
|
2004-02-09 22:19:19 +01:00
|
|
|
yp_bind_client_create (domain, ysd, &ypbr);
|
2004-02-09 21:33:35 +01:00
|
|
|
|
|
|
|
return YPERR_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
|
|
__yp_bind (const char *domain, dom_binding **ypdb)
|
|
|
|
{
|
|
|
|
dom_binding *ysd = NULL;
|
1996-12-11 02:40:39 +01:00
|
|
|
int is_new = 0;
|
|
|
|
|
1998-09-29 01:58:33 +02:00
|
|
|
if (domain == NULL || domain[0] == '\0')
|
1996-12-11 02:40:39 +01:00
|
|
|
return YPERR_BADARGS;
|
|
|
|
|
2003-04-24 00:18:09 +02:00
|
|
|
ysd = *ypdb;
|
|
|
|
while (ysd != NULL)
|
1996-12-11 02:40:39 +01:00
|
|
|
{
|
2003-04-24 00:18:09 +02:00
|
|
|
if (strcmp (domain, ysd->dom_domain) == 0)
|
|
|
|
break;
|
|
|
|
ysd = ysd->dom_pnext;
|
1996-12-11 02:40:39 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if (ysd == NULL)
|
|
|
|
{
|
|
|
|
is_new = 1;
|
1997-12-14 23:24:57 +01:00
|
|
|
ysd = (dom_binding *) calloc (1, sizeof *ysd);
|
2000-04-22 05:58:39 +02:00
|
|
|
if (__builtin_expect (ysd == NULL, 0))
|
2000-03-17 19:34:30 +01:00
|
|
|
return YPERR_RESRC;
|
1996-12-11 02:40:39 +01:00
|
|
|
}
|
|
|
|
|
1998-01-30 14:22:30 +01:00
|
|
|
#if USE_BINDINGDIR
|
2004-09-25 03:14:47 +02:00
|
|
|
/* Try binding dir at first if we have no binding */
|
2004-02-09 21:33:35 +01:00
|
|
|
if (ysd->dom_client == NULL)
|
2004-09-25 03:14:47 +02:00
|
|
|
yp_bind_file (domain, ysd);
|
1998-01-30 14:22:30 +01:00
|
|
|
#endif /* USE_BINDINGDIR */
|
|
|
|
|
1999-12-18 20:45:25 +01:00
|
|
|
if (ysd->dom_client == NULL)
|
|
|
|
{
|
2004-02-09 22:19:19 +01:00
|
|
|
int retval = yp_bind_ypbindprog (domain, ysd);
|
2004-02-09 21:33:35 +01:00
|
|
|
if (retval != YPERR_SUCCESS)
|
1999-12-18 20:45:25 +01:00
|
|
|
{
|
|
|
|
if (is_new)
|
|
|
|
free (ysd);
|
2004-02-09 21:33:35 +01:00
|
|
|
return retval;
|
1999-12-18 20:45:25 +01:00
|
|
|
}
|
1996-12-11 02:40:39 +01:00
|
|
|
}
|
|
|
|
|
1999-12-18 20:45:25 +01:00
|
|
|
if (ysd->dom_client == NULL)
|
|
|
|
{
|
|
|
|
if (is_new)
|
|
|
|
free (ysd);
|
|
|
|
return YPERR_YPSERV;
|
|
|
|
}
|
1996-12-11 02:40:39 +01:00
|
|
|
|
2003-04-24 00:06:25 +02:00
|
|
|
if (is_new)
|
1996-12-11 02:40:39 +01:00
|
|
|
{
|
2003-04-24 00:18:09 +02:00
|
|
|
ysd->dom_pnext = *ypdb;
|
|
|
|
*ypdb = ysd;
|
1996-12-11 02:40:39 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return YPERR_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
__yp_unbind (dom_binding *ydb)
|
|
|
|
{
|
|
|
|
clnt_destroy (ydb->dom_client);
|
2003-04-24 00:18:09 +02:00
|
|
|
free (ydb);
|
1999-12-18 20:45:25 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
yp_bind (const char *indomain)
|
|
|
|
{
|
|
|
|
int status;
|
|
|
|
|
|
|
|
__libc_lock_lock (ypbindlist_lock);
|
|
|
|
|
2005-11-26 23:16:03 +01:00
|
|
|
status = __yp_bind (indomain, &ypbindlist);
|
1999-12-18 20:45:25 +01:00
|
|
|
|
|
|
|
__libc_lock_unlock (ypbindlist_lock);
|
|
|
|
|
|
|
|
return status;
|
|
|
|
}
|
2004-10-24 22:29:20 +02:00
|
|
|
libnsl_hidden_def (yp_bind)
|
1999-12-18 20:45:25 +01:00
|
|
|
|
|
|
|
static void
|
|
|
|
yp_unbind_locked (const char *indomain)
|
|
|
|
{
|
|
|
|
dom_binding *ydbptr, *ydbptr2;
|
|
|
|
|
|
|
|
ydbptr2 = NULL;
|
2005-11-26 23:16:03 +01:00
|
|
|
ydbptr = ypbindlist;
|
1999-12-18 20:45:25 +01:00
|
|
|
|
|
|
|
while (ydbptr != NULL)
|
|
|
|
{
|
|
|
|
if (strcmp (ydbptr->dom_domain, indomain) == 0)
|
|
|
|
{
|
|
|
|
dom_binding *work;
|
|
|
|
|
|
|
|
work = ydbptr;
|
|
|
|
if (ydbptr2 == NULL)
|
2005-11-26 23:16:03 +01:00
|
|
|
ypbindlist = ypbindlist->dom_pnext;
|
1999-12-18 20:45:25 +01:00
|
|
|
else
|
|
|
|
ydbptr2 = ydbptr->dom_pnext;
|
|
|
|
__yp_unbind (work);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
ydbptr2 = ydbptr;
|
|
|
|
ydbptr = ydbptr->dom_pnext;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
yp_unbind (const char *indomain)
|
|
|
|
{
|
|
|
|
__libc_lock_lock (ypbindlist_lock);
|
|
|
|
|
|
|
|
yp_unbind_locked (indomain);
|
|
|
|
|
|
|
|
__libc_lock_unlock (ypbindlist_lock);
|
|
|
|
|
|
|
|
return;
|
1996-12-11 02:40:39 +01:00
|
|
|
}
|
|
|
|
|
2004-02-09 21:33:35 +01:00
|
|
|
static int
|
|
|
|
__ypclnt_call (const char *domain, u_long prog, xdrproc_t xargs,
|
|
|
|
caddr_t req, xdrproc_t xres, caddr_t resp, dom_binding **ydb,
|
|
|
|
int print_error)
|
|
|
|
{
|
|
|
|
enum clnt_stat result;
|
|
|
|
|
|
|
|
result = clnt_call ((*ydb)->dom_client, prog,
|
|
|
|
xargs, req, xres, resp, RPCTIMEOUT);
|
|
|
|
|
|
|
|
if (result != RPC_SUCCESS)
|
|
|
|
{
|
|
|
|
/* We don't print an error message, if we try our old,
|
|
|
|
cached data. Only print this for data, which should work. */
|
|
|
|
if (print_error)
|
|
|
|
clnt_perror ((*ydb)->dom_client, "do_ypcall: clnt_call");
|
|
|
|
|
|
|
|
return YPERR_RPC;
|
|
|
|
}
|
|
|
|
|
|
|
|
return YPERR_SUCCESS;
|
|
|
|
}
|
|
|
|
|
1996-12-11 02:40:39 +01:00
|
|
|
static int
|
|
|
|
do_ypcall (const char *domain, u_long prog, xdrproc_t xargs,
|
|
|
|
caddr_t req, xdrproc_t xres, caddr_t resp)
|
|
|
|
{
|
2004-02-09 21:33:35 +01:00
|
|
|
dom_binding *ydb;
|
|
|
|
int status;
|
1998-03-06 10:18:45 +01:00
|
|
|
int saved_errno = errno;
|
1996-12-11 02:40:39 +01:00
|
|
|
|
1998-02-26 12:20:59 +01:00
|
|
|
status = YPERR_YPERR;
|
1996-12-11 02:40:39 +01:00
|
|
|
|
Update.
1997-11-11 21:30 Ulrich Drepper <drepper@cygnus.com>
* include/sys/stat.h: Define stat, fstat, lstat and *64 variants
as macros so the the library compiles correctly even without
optimization.
* io/fstat.c: Undef fstat.
* io/fstat64.c: Undef fstat64
* io/lstat.c: Undef lstat.
* io/lstat64.c: Undef lstat64
* io/stat.c: Undef stat.
* io/stat64.c: Undef stat64
* io/fts.c: Include <include/sys/stat.h> to get macro definitions.
* io/ftw.c: Likewise.
* io/getdirname.c: Likewise.
* Makefile (install): Run test-installation.pl if possible.
* db2/Makefile: Update from db-2.3.12.
* db2/db.h: Likewise.
* db2/db_int.h: Likewise.
* db2/btree/bt_cursor.c: Likewise.
* db2/btree/bt_delete.c: Likewise.
* db2/btree/bt_open.c: Likewise.
* db2/btree/bt_put.c: Likewise.
* db2/btree/bt_rec.c: Likewise.
* db2/btree/bt_recno.c: Likewise.
* db2/btree/bt_search.c: Likewise.
* db2/btree/bt_split.c: Likewise.
* db2/btree/bt_stat.c: Likewise.
* db2/btree/btree.src: Likewise.
* db2/btree/btree_auto.c: Likewise.
* db2/btree/bt_cursor.c: Likewise.
* db2/btree/bt_delete.c: Likewise.
* db2/btree/bt_open.c: Likewise.
* db2/btree/bt_put.c: Likewise.
* db2/btree/bt_rec.c: Likewise.
* db2/btree/bt_recno.c: Likewise.
* db2/btree/bt_search.c: Likewise.
* db2/btree/bt_split.c: Likewise.
* db2/btree/bt_stat.c: Likewise.
* db2/btree/btree.src: Likewise.
* db2/btree/btree_auto.c: Likewise.
* db2/common/db_appinit.c: Likewise.
* db2/common/db_apprec.c: Likewise.
* db2/common/db_byteorder.c: Likewise.
* db2/common/db_region.c: Likewise.
* db2/db/db.c: Likewise
* db2/db/db.src: Likewise
* db2/db/db_auto.c: Likewise
* db2/db/db_dispatch.c: Likewise
* db2/db/db_dup.c: Likewise
* db2/db/db_overflow.c: Likewise
* db2/db/db_pr.c: Likewise
* db2/db/db_rec.c: Likewise
* db2/db/db_ret.c: Likewise
* db2/db/db_thread.c: Likewise
* db2/db185/db185.c: Likewise.
* db2/hash/hash.c: Likewise.
* db2/hash/hash.src: Likewise.
* db2/hash/hash_auto.c: Likewise.
* db2/hash/hash_dup.c: Likewise.
* db2/hash/hash_page.c: Likewise.
* db2/hash/hash_rec.c: Likewise.
* db2/include/btree_auto.h: Likewise.
* db2/include/btree_ext.h: Likewise.
* db2/include/clib_ext.h: Likewise.
* db2/include/common_ext.h: Likewise.
* db2/include/db.h.src: Likewise.
* db2/include/db_am.h: Likewise.
* db2/include/db_auto.h: Likewise.
* db2/include/db_cxx.h: Likewise.
* db2/include/db_ext.h: Likewise.
* db2/include/db_int.h.src: Likewise.
* db2/include/hash.h: Likewise.
* db2/include/hash_auto.h: Likewise.
* db2/include/hash_ext.h: Likewise.
* db2/include/lock.h: Likewise.
* db2/include/lock_ext.h: Likewise.
* db2/include/log.h: Likewise.
* db2/include/log_ext.h: Likewise.
* db2/include/mp.h: Likewise.
* db2/include/mp_ext.h: Likewise.
* db2/include/mutex_ext.h: Likewise.
* db2/include/os_ext.h: Likewise.
* db2/include/os_func.h: Likewise.
* db2/include/txn.h: Likewise.
* db2/include/txn_ext.h: Likewise.
* db2/lock/lock.c: Likewise.
* db2/lock/lock_deadlock.c: Likewise.
* db2/log/log.c: Likewise.
* db2/log/log_archive.c: Likewise.
* db2/log/log_auto.c: Likewise.
* db2/log/log_findckp.c: Likewise.
* db2/log/log_get.c: Likewise.
* db2/log/log_put.c: Likewise.
* db2/log/log_rec.c: Likewise.
* db2/log/log_register.c: Likewise.
* db2/mp/mp_bh.c: Likewise.
* db2/mp/mp_fget.c: Likewise.
* db2/mp/mp_fopen.c: Likewise.
* db2/mp/mp_fput.c: Likewise.
* db2/mp/mp_fset.c: Likewise.
* db2/mp/mp_open.c: Likewise.
* db2/mp/mp_pr.c: Likewise.
* db2/mp/mp_region.c: Likewise.
* db2/mp/mp_sync.c: Likewise.
* db2/mutex/mutex.c: Likewise.
* db2/os/os_abs.c: Likewise.
* db2/os/os_dir.c: Likewise.
* db2/os/os_fid.c: Likewise.
* db2/os/os_fsync.c: Likewise.
* db2/os/os_func.c: Likewise.
* db2/os/os_map.c: Likewise.
* db2/os/os_oflags.c: Likewise.
* db2/os/os_open.c: Likewise.
* db2/os/os_rpath.c: Likewise.
* db2/os/os_rw.c: Likewise.
* db2/os/os_seek.c: Likewise.
* db2/os/os_sleep.c: Likewise.
* db2/os/os_stat.c: Likewise.
* db2/os/os_unlink.c: Likewise.
* db2/progs/db_deadlock/db_deadlock.c: Likewise.
* db2/progs/db_dump/db_dump.c: Likewise.
* db2/progs/db_load/db_load.c: Likewise.
* db2/progs/db_recover/db_recover.c: Likewise.
* db2/progs/db_stat/db_stat.c: Likewise.
* db2/txn/txn.c: Likewise.
* db2/txn/txn_auto.c: Likewise.
* db2/txn/txn_rec.c: Likewise.
* db2/os/db_os_abs.c: Removed.
* db2/os/db_os_dir.c: Removed.
* db2/os/db_os_fid.c: Removed.
* db2/os/db_os_lseek.c: Removed.
* db2/os/db_os_mmap.c: Removed.
* db2/os/db_os_open.c: Removed.
* db2/os/db_os_rw.c: Removed.
* db2/os/db_os_sleep.c: Removed.
* db2/os/db_os_stat.c: Removed.
* db2/os/db_os_unlink.c: Removed.
* libio/stdio.h (fopen): Add __restrict to parameters.
* manual/process.texi (system): Describe behaviour for NULL argument.
* stdio-common/printf-parse.h: Parse hh modifier.
* stdio-common/vfprintf.c: Handle hh modifier.
* stdio-common/vfscanf.c: Likewise.
* manual/stdio.texi: Describe hh modifier for scanf/printf.
* math/complex.h: Don't define _Imaginary_I, but instead _Complex_I.
gcc does no yet know the `imaginary' keyword.
* math/test-math.c: Add little test for know gcc bug.
* math/tgmath.h: Make complex versions of log10() only available
if __USE_GNU.
* stdlib/test-canon.c: Fix typo.
* sysdeps/generic/setenv.c: Avoid compilation warnings.
Reported by Jim Meyering.
* sysdeps/generic/bits/errno.h: EILSEQ is an ISO C error number.
* sysdeps/mach/hurd/bits/errno.h: Likewise.
* sysdeps/standalone/bits/errno.h: Likewise.
* sysdeps/unix/sysv/linux/bits/errno.h: Likewise.
* sysdeps/i386/i586/memcpy.S: New file.
* sysdeps/i386/i586/mempcpy.S: New file.
* sysdeps/i386/i586/memset.S: Fix typo.
* sysdeps/posix/getcwd.c: Define HAVE_MEMPCPY for _LIBC. Add casts.
* sysdeps/posix/system.c: Add comment to explain code.
* sysdeps/wordsize-32/inttypes.h: Include <stddef.h> for wchar_t.
Define PTRDIFF_{MIN,MAX}, SIG_ATOMIC_{MIN,MAX}, SIZE_MAX,
WCHAR_{MIN,MAX}, WINT_{MIN,MAX}.
Define wcstoimax, wcstoumax.
* sysdeps/wordsize-64/inttypes.h: Likewise.
* wcsmbs/wchar.h: Define WCHAR_{MIN,MAX} if not already defined.
Declare __wcsto{l,ul,ll,ull}_internal only if not already done.
* time/Makefile (routines): Add strfxtime.
* time/strftime.c: Implement %F and %f format.
* time/strfxtime.c: New file.
* time/time.h: Define new types and symbols from ISO C 9X.
* time/mktime.c: Little comment correction.
1997-11-10 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* sysdeps/libm-ieee754/s_sincosl.c: Fix typo.
* sysdeps/libm-ieee754/s_tanl.c: Fix typo.
* sysdeps/libm-ieee754/s_floorl.c: Correct typos.
* sysdeps/libm-ieee754/e_remainderl.c: Replace
EXTRACT_LDOUBLE_WORDS by GET_LDOUBLE_WORDS.
* sysdeps/libm-ieee754/e_atan2l.c: Replace EXTRACT_LDOUBLE_WORDS
by GET_LDOUBLE_WORDS.
* sysdeps/libm-ieee754/s_scalbnl.c: Replace ";" by "," for correct
variable declaration.
* sysdeps/libm-ieee754/s_scalblnl.c: Likewise.
* sysdeps/libm-ieee754/s_lrint.c (__lrint): Correct function.
* math/libm-test.c (sqrt_test): Add test for sqrt (0.25).
(asin_test): Add more test.
1997-11-10 23:34 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/libm-ieee754/e_asin.c: Add braces to make code clearer
and to not confuse the poor compiler.
* sysdeps/libm-ieee754/e_asinf.c: Likewise.
Reported by vertex@cagent.com.
1997-11-09 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* elf/dl-lookup.c (do_lookup): Don't accept the base version if we
require a specific one.
* libio/oldfreopen.c: Bind old symbols to version GLIBC_2.0.
* libio/oldiofopen.c: Likewise.
* libio/oldstdfiles.c: Likewise.
* libc.map: Export them.
1997-11-10 07:40 H.J. Lu <hjl@gnu.ai.mit.edu>
* stdlib/exit.c (exit): Handle recursive calls to exit ().
1997-11-09 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/fpu/s_llrint.c: Fixed to take double argument
instead of long double.
* sysdeps/m68k/fpu/s_llrintf.c: New file.
* sysdeps/m68k/fpu/s_llrintl.c: New file.
* sysdeps/libm-ieee754/s_llrint.c: Make compilable and fix
overflow condition.
* sysdeps/libm-ieee754/s_llrintf.c: Fix overflow condition.
* sysdeps/libm-ieee754/s_llrintl.c: Likewise.
* sysdeps/libm-ieee754/s_llround.c: Likewise.
* sysdeps/libm-ieee754/s_llroundf.c: Likewise.
* sysdeps/libm-ieee754/s_llroundl.c: Likewise.
* sysdeps/libm-ieee754/s_lrint.c: Likewise.
* sysdeps/libm-ieee754/s_lrintf.c: Likewise.
* sysdeps/libm-ieee754/s_lrintl.c: Likewise.
* sysdeps/libm-ieee754/s_lround.c: Likewise.
* sysdeps/libm-ieee754/s_lroundf.c: Likewise.
* sysdeps/libm-ieee754/s_lroundl.c: Likewise.
* math/libm-test.c: Test all three variants of lrint and llrint.
Fix typos in lround and llround tests. Add tests for boundary
cases for lrint and llround.
1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* manual/arith.texi: Misc doc fixes.
* manual/ctype.texi: Likewise.
* manual/pattern.texi: Likewise.
* manual/terminal.texi: Likewise.
1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/xstatconv.c: Use struct assignment
instead of memcpy to let the compiler use whatever it regards as
optimal.
* sysdeps/unix/sysv/linux/alpha/xstatconv.c: Likewise.
1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/Makefile (sysdep_headers)
[$(subdir)=misc]: Add sys/prctl.h.
* sysdeps/unix/sysv/linux/Dist: Distribute it.
1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* io/ftwtest-sh: Don't use the unknown which command, instead try
pwd as /bin/pwd and /usr/bin/pwd.
1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* manual/maint.texi (Tools for Installation): Don't recommend
broken version 3.76.1 of make.
(Porting): Fix wording.
1997-11-06 06:13 H.J. Lu <hjl@gnu.ai.mit.edu>
* config.make.in (build-pic-default): New, defined with
pic_default.
* configure.in (pic_default): New, set to yes if PIC is
default.
* Makeconfig (CPPFLAGS-.o, CPPFLAGS-.op, CPPFLAGS-.og,
CPPFLAGS-.ob): Add -DPIC if $(build-pic-default) is yes.
1997-11-09 18:15 Ulrich Drepper <drepper@cygnus.com>
* Makerules (libc.so): Fix typo.
* csu/Makefile (CFLAGS-initfini.s): Correctly fix moving function
definition. Patch by Zack Weinberg <zack@rabi.phys.columbia.edu>.
* stdlib/strtod.c: Handle numbers like 0.0e10000 correctly which
produce ±0.0. Reported by Joe Keane <jgk@jgk.org>.
* sysdeps/libm-ieee754/s_ceill.c: Fix typos.
* sysdeps/libm-ieee754/s_llrint.c: Correct code, it never worked.
1997-11-06 07:00 H.J. Lu <hjl@gnu.ai.mit.edu>
* sysdeps/unix/sysv/i386/i686/time.S: Removed.
1997-11-08 14:07 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
* nis/libnsl.map: Add __do_niscall2 for nis_cachemgr.
* nis/nis_call.c: Set UDP resend timeout correct.
* nis/nss_compat/compat-grp.c: Rewritten to make it faster.
* nis/nss_compat/compat-pwd.c: Likewise.
* nis/nss_compat/compat-spwd.c: Likewise.
* nis/ypclnt.c: Fix UDP resend timeout, fix yp_bind/do_ypcall
interaction.
* inet/protocols/routed.h: Include sys/socket.h.
* inet/protocols/talkd.h: Likewise.
* inet/protocols/timed.h: Include rpc/types.h.
* sunrpc/rpc/pmap_clnt.h: Include rpc/clnt.h.
1997-11-06 01:39 Ulrich Drepper <drepper@cygnus.com>
* Makerules (libc.so): Add missing closing brace.
1997-11-05 Brendan Kehoe <brendan@lisa.cygnus.com>
* libio.h (__P): Name its arg `p' instead of `params'.
This was added solely to work around problems with
the definition of __P in the Solaris math.h header.
1997-11-12 01:06:02 +01:00
|
|
|
__libc_lock_lock (ypbindlist_lock);
|
2005-11-26 23:16:03 +01:00
|
|
|
ydb = ypbindlist;
|
2004-09-25 07:55:20 +02:00
|
|
|
while (ydb != NULL)
|
1996-12-11 02:40:39 +01:00
|
|
|
{
|
2004-09-25 07:55:20 +02:00
|
|
|
if (strcmp (domain, ydb->dom_domain) == 0)
|
2004-02-09 21:33:35 +01:00
|
|
|
{
|
|
|
|
if (__yp_bind (domain, &ydb) == 0)
|
|
|
|
{
|
|
|
|
/* Call server, print no error message, do not unbind. */
|
|
|
|
status = __ypclnt_call (domain, prog, xargs, req, xres,
|
|
|
|
resp, &ydb, 0);
|
|
|
|
if (status == YPERR_SUCCESS)
|
|
|
|
{
|
2004-09-25 07:55:20 +02:00
|
|
|
__libc_lock_unlock (ypbindlist_lock);
|
2004-02-09 21:33:35 +01:00
|
|
|
__set_errno (saved_errno);
|
|
|
|
return status;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/* We use ypbindlist, and the old cached data is
|
|
|
|
invalid. unbind now and create a new binding */
|
|
|
|
yp_unbind_locked (domain);
|
2004-09-25 07:55:20 +02:00
|
|
|
|
|
|
|
break;
|
2004-02-09 21:33:35 +01:00
|
|
|
}
|
2004-09-25 07:55:20 +02:00
|
|
|
ydb = ydb->dom_pnext;
|
Update.
1997-11-11 21:30 Ulrich Drepper <drepper@cygnus.com>
* include/sys/stat.h: Define stat, fstat, lstat and *64 variants
as macros so the the library compiles correctly even without
optimization.
* io/fstat.c: Undef fstat.
* io/fstat64.c: Undef fstat64
* io/lstat.c: Undef lstat.
* io/lstat64.c: Undef lstat64
* io/stat.c: Undef stat.
* io/stat64.c: Undef stat64
* io/fts.c: Include <include/sys/stat.h> to get macro definitions.
* io/ftw.c: Likewise.
* io/getdirname.c: Likewise.
* Makefile (install): Run test-installation.pl if possible.
* db2/Makefile: Update from db-2.3.12.
* db2/db.h: Likewise.
* db2/db_int.h: Likewise.
* db2/btree/bt_cursor.c: Likewise.
* db2/btree/bt_delete.c: Likewise.
* db2/btree/bt_open.c: Likewise.
* db2/btree/bt_put.c: Likewise.
* db2/btree/bt_rec.c: Likewise.
* db2/btree/bt_recno.c: Likewise.
* db2/btree/bt_search.c: Likewise.
* db2/btree/bt_split.c: Likewise.
* db2/btree/bt_stat.c: Likewise.
* db2/btree/btree.src: Likewise.
* db2/btree/btree_auto.c: Likewise.
* db2/btree/bt_cursor.c: Likewise.
* db2/btree/bt_delete.c: Likewise.
* db2/btree/bt_open.c: Likewise.
* db2/btree/bt_put.c: Likewise.
* db2/btree/bt_rec.c: Likewise.
* db2/btree/bt_recno.c: Likewise.
* db2/btree/bt_search.c: Likewise.
* db2/btree/bt_split.c: Likewise.
* db2/btree/bt_stat.c: Likewise.
* db2/btree/btree.src: Likewise.
* db2/btree/btree_auto.c: Likewise.
* db2/common/db_appinit.c: Likewise.
* db2/common/db_apprec.c: Likewise.
* db2/common/db_byteorder.c: Likewise.
* db2/common/db_region.c: Likewise.
* db2/db/db.c: Likewise
* db2/db/db.src: Likewise
* db2/db/db_auto.c: Likewise
* db2/db/db_dispatch.c: Likewise
* db2/db/db_dup.c: Likewise
* db2/db/db_overflow.c: Likewise
* db2/db/db_pr.c: Likewise
* db2/db/db_rec.c: Likewise
* db2/db/db_ret.c: Likewise
* db2/db/db_thread.c: Likewise
* db2/db185/db185.c: Likewise.
* db2/hash/hash.c: Likewise.
* db2/hash/hash.src: Likewise.
* db2/hash/hash_auto.c: Likewise.
* db2/hash/hash_dup.c: Likewise.
* db2/hash/hash_page.c: Likewise.
* db2/hash/hash_rec.c: Likewise.
* db2/include/btree_auto.h: Likewise.
* db2/include/btree_ext.h: Likewise.
* db2/include/clib_ext.h: Likewise.
* db2/include/common_ext.h: Likewise.
* db2/include/db.h.src: Likewise.
* db2/include/db_am.h: Likewise.
* db2/include/db_auto.h: Likewise.
* db2/include/db_cxx.h: Likewise.
* db2/include/db_ext.h: Likewise.
* db2/include/db_int.h.src: Likewise.
* db2/include/hash.h: Likewise.
* db2/include/hash_auto.h: Likewise.
* db2/include/hash_ext.h: Likewise.
* db2/include/lock.h: Likewise.
* db2/include/lock_ext.h: Likewise.
* db2/include/log.h: Likewise.
* db2/include/log_ext.h: Likewise.
* db2/include/mp.h: Likewise.
* db2/include/mp_ext.h: Likewise.
* db2/include/mutex_ext.h: Likewise.
* db2/include/os_ext.h: Likewise.
* db2/include/os_func.h: Likewise.
* db2/include/txn.h: Likewise.
* db2/include/txn_ext.h: Likewise.
* db2/lock/lock.c: Likewise.
* db2/lock/lock_deadlock.c: Likewise.
* db2/log/log.c: Likewise.
* db2/log/log_archive.c: Likewise.
* db2/log/log_auto.c: Likewise.
* db2/log/log_findckp.c: Likewise.
* db2/log/log_get.c: Likewise.
* db2/log/log_put.c: Likewise.
* db2/log/log_rec.c: Likewise.
* db2/log/log_register.c: Likewise.
* db2/mp/mp_bh.c: Likewise.
* db2/mp/mp_fget.c: Likewise.
* db2/mp/mp_fopen.c: Likewise.
* db2/mp/mp_fput.c: Likewise.
* db2/mp/mp_fset.c: Likewise.
* db2/mp/mp_open.c: Likewise.
* db2/mp/mp_pr.c: Likewise.
* db2/mp/mp_region.c: Likewise.
* db2/mp/mp_sync.c: Likewise.
* db2/mutex/mutex.c: Likewise.
* db2/os/os_abs.c: Likewise.
* db2/os/os_dir.c: Likewise.
* db2/os/os_fid.c: Likewise.
* db2/os/os_fsync.c: Likewise.
* db2/os/os_func.c: Likewise.
* db2/os/os_map.c: Likewise.
* db2/os/os_oflags.c: Likewise.
* db2/os/os_open.c: Likewise.
* db2/os/os_rpath.c: Likewise.
* db2/os/os_rw.c: Likewise.
* db2/os/os_seek.c: Likewise.
* db2/os/os_sleep.c: Likewise.
* db2/os/os_stat.c: Likewise.
* db2/os/os_unlink.c: Likewise.
* db2/progs/db_deadlock/db_deadlock.c: Likewise.
* db2/progs/db_dump/db_dump.c: Likewise.
* db2/progs/db_load/db_load.c: Likewise.
* db2/progs/db_recover/db_recover.c: Likewise.
* db2/progs/db_stat/db_stat.c: Likewise.
* db2/txn/txn.c: Likewise.
* db2/txn/txn_auto.c: Likewise.
* db2/txn/txn_rec.c: Likewise.
* db2/os/db_os_abs.c: Removed.
* db2/os/db_os_dir.c: Removed.
* db2/os/db_os_fid.c: Removed.
* db2/os/db_os_lseek.c: Removed.
* db2/os/db_os_mmap.c: Removed.
* db2/os/db_os_open.c: Removed.
* db2/os/db_os_rw.c: Removed.
* db2/os/db_os_sleep.c: Removed.
* db2/os/db_os_stat.c: Removed.
* db2/os/db_os_unlink.c: Removed.
* libio/stdio.h (fopen): Add __restrict to parameters.
* manual/process.texi (system): Describe behaviour for NULL argument.
* stdio-common/printf-parse.h: Parse hh modifier.
* stdio-common/vfprintf.c: Handle hh modifier.
* stdio-common/vfscanf.c: Likewise.
* manual/stdio.texi: Describe hh modifier for scanf/printf.
* math/complex.h: Don't define _Imaginary_I, but instead _Complex_I.
gcc does no yet know the `imaginary' keyword.
* math/test-math.c: Add little test for know gcc bug.
* math/tgmath.h: Make complex versions of log10() only available
if __USE_GNU.
* stdlib/test-canon.c: Fix typo.
* sysdeps/generic/setenv.c: Avoid compilation warnings.
Reported by Jim Meyering.
* sysdeps/generic/bits/errno.h: EILSEQ is an ISO C error number.
* sysdeps/mach/hurd/bits/errno.h: Likewise.
* sysdeps/standalone/bits/errno.h: Likewise.
* sysdeps/unix/sysv/linux/bits/errno.h: Likewise.
* sysdeps/i386/i586/memcpy.S: New file.
* sysdeps/i386/i586/mempcpy.S: New file.
* sysdeps/i386/i586/memset.S: Fix typo.
* sysdeps/posix/getcwd.c: Define HAVE_MEMPCPY for _LIBC. Add casts.
* sysdeps/posix/system.c: Add comment to explain code.
* sysdeps/wordsize-32/inttypes.h: Include <stddef.h> for wchar_t.
Define PTRDIFF_{MIN,MAX}, SIG_ATOMIC_{MIN,MAX}, SIZE_MAX,
WCHAR_{MIN,MAX}, WINT_{MIN,MAX}.
Define wcstoimax, wcstoumax.
* sysdeps/wordsize-64/inttypes.h: Likewise.
* wcsmbs/wchar.h: Define WCHAR_{MIN,MAX} if not already defined.
Declare __wcsto{l,ul,ll,ull}_internal only if not already done.
* time/Makefile (routines): Add strfxtime.
* time/strftime.c: Implement %F and %f format.
* time/strfxtime.c: New file.
* time/time.h: Define new types and symbols from ISO C 9X.
* time/mktime.c: Little comment correction.
1997-11-10 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* sysdeps/libm-ieee754/s_sincosl.c: Fix typo.
* sysdeps/libm-ieee754/s_tanl.c: Fix typo.
* sysdeps/libm-ieee754/s_floorl.c: Correct typos.
* sysdeps/libm-ieee754/e_remainderl.c: Replace
EXTRACT_LDOUBLE_WORDS by GET_LDOUBLE_WORDS.
* sysdeps/libm-ieee754/e_atan2l.c: Replace EXTRACT_LDOUBLE_WORDS
by GET_LDOUBLE_WORDS.
* sysdeps/libm-ieee754/s_scalbnl.c: Replace ";" by "," for correct
variable declaration.
* sysdeps/libm-ieee754/s_scalblnl.c: Likewise.
* sysdeps/libm-ieee754/s_lrint.c (__lrint): Correct function.
* math/libm-test.c (sqrt_test): Add test for sqrt (0.25).
(asin_test): Add more test.
1997-11-10 23:34 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/libm-ieee754/e_asin.c: Add braces to make code clearer
and to not confuse the poor compiler.
* sysdeps/libm-ieee754/e_asinf.c: Likewise.
Reported by vertex@cagent.com.
1997-11-09 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* elf/dl-lookup.c (do_lookup): Don't accept the base version if we
require a specific one.
* libio/oldfreopen.c: Bind old symbols to version GLIBC_2.0.
* libio/oldiofopen.c: Likewise.
* libio/oldstdfiles.c: Likewise.
* libc.map: Export them.
1997-11-10 07:40 H.J. Lu <hjl@gnu.ai.mit.edu>
* stdlib/exit.c (exit): Handle recursive calls to exit ().
1997-11-09 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/fpu/s_llrint.c: Fixed to take double argument
instead of long double.
* sysdeps/m68k/fpu/s_llrintf.c: New file.
* sysdeps/m68k/fpu/s_llrintl.c: New file.
* sysdeps/libm-ieee754/s_llrint.c: Make compilable and fix
overflow condition.
* sysdeps/libm-ieee754/s_llrintf.c: Fix overflow condition.
* sysdeps/libm-ieee754/s_llrintl.c: Likewise.
* sysdeps/libm-ieee754/s_llround.c: Likewise.
* sysdeps/libm-ieee754/s_llroundf.c: Likewise.
* sysdeps/libm-ieee754/s_llroundl.c: Likewise.
* sysdeps/libm-ieee754/s_lrint.c: Likewise.
* sysdeps/libm-ieee754/s_lrintf.c: Likewise.
* sysdeps/libm-ieee754/s_lrintl.c: Likewise.
* sysdeps/libm-ieee754/s_lround.c: Likewise.
* sysdeps/libm-ieee754/s_lroundf.c: Likewise.
* sysdeps/libm-ieee754/s_lroundl.c: Likewise.
* math/libm-test.c: Test all three variants of lrint and llrint.
Fix typos in lround and llround tests. Add tests for boundary
cases for lrint and llround.
1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* manual/arith.texi: Misc doc fixes.
* manual/ctype.texi: Likewise.
* manual/pattern.texi: Likewise.
* manual/terminal.texi: Likewise.
1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/xstatconv.c: Use struct assignment
instead of memcpy to let the compiler use whatever it regards as
optimal.
* sysdeps/unix/sysv/linux/alpha/xstatconv.c: Likewise.
1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/Makefile (sysdep_headers)
[$(subdir)=misc]: Add sys/prctl.h.
* sysdeps/unix/sysv/linux/Dist: Distribute it.
1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* io/ftwtest-sh: Don't use the unknown which command, instead try
pwd as /bin/pwd and /usr/bin/pwd.
1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* manual/maint.texi (Tools for Installation): Don't recommend
broken version 3.76.1 of make.
(Porting): Fix wording.
1997-11-06 06:13 H.J. Lu <hjl@gnu.ai.mit.edu>
* config.make.in (build-pic-default): New, defined with
pic_default.
* configure.in (pic_default): New, set to yes if PIC is
default.
* Makeconfig (CPPFLAGS-.o, CPPFLAGS-.op, CPPFLAGS-.og,
CPPFLAGS-.ob): Add -DPIC if $(build-pic-default) is yes.
1997-11-09 18:15 Ulrich Drepper <drepper@cygnus.com>
* Makerules (libc.so): Fix typo.
* csu/Makefile (CFLAGS-initfini.s): Correctly fix moving function
definition. Patch by Zack Weinberg <zack@rabi.phys.columbia.edu>.
* stdlib/strtod.c: Handle numbers like 0.0e10000 correctly which
produce ±0.0. Reported by Joe Keane <jgk@jgk.org>.
* sysdeps/libm-ieee754/s_ceill.c: Fix typos.
* sysdeps/libm-ieee754/s_llrint.c: Correct code, it never worked.
1997-11-06 07:00 H.J. Lu <hjl@gnu.ai.mit.edu>
* sysdeps/unix/sysv/i386/i686/time.S: Removed.
1997-11-08 14:07 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
* nis/libnsl.map: Add __do_niscall2 for nis_cachemgr.
* nis/nis_call.c: Set UDP resend timeout correct.
* nis/nss_compat/compat-grp.c: Rewritten to make it faster.
* nis/nss_compat/compat-pwd.c: Likewise.
* nis/nss_compat/compat-spwd.c: Likewise.
* nis/ypclnt.c: Fix UDP resend timeout, fix yp_bind/do_ypcall
interaction.
* inet/protocols/routed.h: Include sys/socket.h.
* inet/protocols/talkd.h: Likewise.
* inet/protocols/timed.h: Include rpc/types.h.
* sunrpc/rpc/pmap_clnt.h: Include rpc/clnt.h.
1997-11-06 01:39 Ulrich Drepper <drepper@cygnus.com>
* Makerules (libc.so): Add missing closing brace.
1997-11-05 Brendan Kehoe <brendan@lisa.cygnus.com>
* libio.h (__P): Name its arg `p' instead of `params'.
This was added solely to work around problems with
the definition of __P in the Solaris math.h header.
1997-11-12 01:06:02 +01:00
|
|
|
}
|
2004-02-09 22:19:19 +01:00
|
|
|
__libc_lock_unlock (ypbindlist_lock);
|
1996-12-11 02:40:39 +01:00
|
|
|
|
2004-02-09 21:33:35 +01:00
|
|
|
/* First try with cached data failed. Now try to get
|
|
|
|
current data from the system. */
|
|
|
|
ydb = NULL;
|
|
|
|
if (__yp_bind (domain, &ydb) == 0)
|
Update.
1997-11-11 21:30 Ulrich Drepper <drepper@cygnus.com>
* include/sys/stat.h: Define stat, fstat, lstat and *64 variants
as macros so the the library compiles correctly even without
optimization.
* io/fstat.c: Undef fstat.
* io/fstat64.c: Undef fstat64
* io/lstat.c: Undef lstat.
* io/lstat64.c: Undef lstat64
* io/stat.c: Undef stat.
* io/stat64.c: Undef stat64
* io/fts.c: Include <include/sys/stat.h> to get macro definitions.
* io/ftw.c: Likewise.
* io/getdirname.c: Likewise.
* Makefile (install): Run test-installation.pl if possible.
* db2/Makefile: Update from db-2.3.12.
* db2/db.h: Likewise.
* db2/db_int.h: Likewise.
* db2/btree/bt_cursor.c: Likewise.
* db2/btree/bt_delete.c: Likewise.
* db2/btree/bt_open.c: Likewise.
* db2/btree/bt_put.c: Likewise.
* db2/btree/bt_rec.c: Likewise.
* db2/btree/bt_recno.c: Likewise.
* db2/btree/bt_search.c: Likewise.
* db2/btree/bt_split.c: Likewise.
* db2/btree/bt_stat.c: Likewise.
* db2/btree/btree.src: Likewise.
* db2/btree/btree_auto.c: Likewise.
* db2/btree/bt_cursor.c: Likewise.
* db2/btree/bt_delete.c: Likewise.
* db2/btree/bt_open.c: Likewise.
* db2/btree/bt_put.c: Likewise.
* db2/btree/bt_rec.c: Likewise.
* db2/btree/bt_recno.c: Likewise.
* db2/btree/bt_search.c: Likewise.
* db2/btree/bt_split.c: Likewise.
* db2/btree/bt_stat.c: Likewise.
* db2/btree/btree.src: Likewise.
* db2/btree/btree_auto.c: Likewise.
* db2/common/db_appinit.c: Likewise.
* db2/common/db_apprec.c: Likewise.
* db2/common/db_byteorder.c: Likewise.
* db2/common/db_region.c: Likewise.
* db2/db/db.c: Likewise
* db2/db/db.src: Likewise
* db2/db/db_auto.c: Likewise
* db2/db/db_dispatch.c: Likewise
* db2/db/db_dup.c: Likewise
* db2/db/db_overflow.c: Likewise
* db2/db/db_pr.c: Likewise
* db2/db/db_rec.c: Likewise
* db2/db/db_ret.c: Likewise
* db2/db/db_thread.c: Likewise
* db2/db185/db185.c: Likewise.
* db2/hash/hash.c: Likewise.
* db2/hash/hash.src: Likewise.
* db2/hash/hash_auto.c: Likewise.
* db2/hash/hash_dup.c: Likewise.
* db2/hash/hash_page.c: Likewise.
* db2/hash/hash_rec.c: Likewise.
* db2/include/btree_auto.h: Likewise.
* db2/include/btree_ext.h: Likewise.
* db2/include/clib_ext.h: Likewise.
* db2/include/common_ext.h: Likewise.
* db2/include/db.h.src: Likewise.
* db2/include/db_am.h: Likewise.
* db2/include/db_auto.h: Likewise.
* db2/include/db_cxx.h: Likewise.
* db2/include/db_ext.h: Likewise.
* db2/include/db_int.h.src: Likewise.
* db2/include/hash.h: Likewise.
* db2/include/hash_auto.h: Likewise.
* db2/include/hash_ext.h: Likewise.
* db2/include/lock.h: Likewise.
* db2/include/lock_ext.h: Likewise.
* db2/include/log.h: Likewise.
* db2/include/log_ext.h: Likewise.
* db2/include/mp.h: Likewise.
* db2/include/mp_ext.h: Likewise.
* db2/include/mutex_ext.h: Likewise.
* db2/include/os_ext.h: Likewise.
* db2/include/os_func.h: Likewise.
* db2/include/txn.h: Likewise.
* db2/include/txn_ext.h: Likewise.
* db2/lock/lock.c: Likewise.
* db2/lock/lock_deadlock.c: Likewise.
* db2/log/log.c: Likewise.
* db2/log/log_archive.c: Likewise.
* db2/log/log_auto.c: Likewise.
* db2/log/log_findckp.c: Likewise.
* db2/log/log_get.c: Likewise.
* db2/log/log_put.c: Likewise.
* db2/log/log_rec.c: Likewise.
* db2/log/log_register.c: Likewise.
* db2/mp/mp_bh.c: Likewise.
* db2/mp/mp_fget.c: Likewise.
* db2/mp/mp_fopen.c: Likewise.
* db2/mp/mp_fput.c: Likewise.
* db2/mp/mp_fset.c: Likewise.
* db2/mp/mp_open.c: Likewise.
* db2/mp/mp_pr.c: Likewise.
* db2/mp/mp_region.c: Likewise.
* db2/mp/mp_sync.c: Likewise.
* db2/mutex/mutex.c: Likewise.
* db2/os/os_abs.c: Likewise.
* db2/os/os_dir.c: Likewise.
* db2/os/os_fid.c: Likewise.
* db2/os/os_fsync.c: Likewise.
* db2/os/os_func.c: Likewise.
* db2/os/os_map.c: Likewise.
* db2/os/os_oflags.c: Likewise.
* db2/os/os_open.c: Likewise.
* db2/os/os_rpath.c: Likewise.
* db2/os/os_rw.c: Likewise.
* db2/os/os_seek.c: Likewise.
* db2/os/os_sleep.c: Likewise.
* db2/os/os_stat.c: Likewise.
* db2/os/os_unlink.c: Likewise.
* db2/progs/db_deadlock/db_deadlock.c: Likewise.
* db2/progs/db_dump/db_dump.c: Likewise.
* db2/progs/db_load/db_load.c: Likewise.
* db2/progs/db_recover/db_recover.c: Likewise.
* db2/progs/db_stat/db_stat.c: Likewise.
* db2/txn/txn.c: Likewise.
* db2/txn/txn_auto.c: Likewise.
* db2/txn/txn_rec.c: Likewise.
* db2/os/db_os_abs.c: Removed.
* db2/os/db_os_dir.c: Removed.
* db2/os/db_os_fid.c: Removed.
* db2/os/db_os_lseek.c: Removed.
* db2/os/db_os_mmap.c: Removed.
* db2/os/db_os_open.c: Removed.
* db2/os/db_os_rw.c: Removed.
* db2/os/db_os_sleep.c: Removed.
* db2/os/db_os_stat.c: Removed.
* db2/os/db_os_unlink.c: Removed.
* libio/stdio.h (fopen): Add __restrict to parameters.
* manual/process.texi (system): Describe behaviour for NULL argument.
* stdio-common/printf-parse.h: Parse hh modifier.
* stdio-common/vfprintf.c: Handle hh modifier.
* stdio-common/vfscanf.c: Likewise.
* manual/stdio.texi: Describe hh modifier for scanf/printf.
* math/complex.h: Don't define _Imaginary_I, but instead _Complex_I.
gcc does no yet know the `imaginary' keyword.
* math/test-math.c: Add little test for know gcc bug.
* math/tgmath.h: Make complex versions of log10() only available
if __USE_GNU.
* stdlib/test-canon.c: Fix typo.
* sysdeps/generic/setenv.c: Avoid compilation warnings.
Reported by Jim Meyering.
* sysdeps/generic/bits/errno.h: EILSEQ is an ISO C error number.
* sysdeps/mach/hurd/bits/errno.h: Likewise.
* sysdeps/standalone/bits/errno.h: Likewise.
* sysdeps/unix/sysv/linux/bits/errno.h: Likewise.
* sysdeps/i386/i586/memcpy.S: New file.
* sysdeps/i386/i586/mempcpy.S: New file.
* sysdeps/i386/i586/memset.S: Fix typo.
* sysdeps/posix/getcwd.c: Define HAVE_MEMPCPY for _LIBC. Add casts.
* sysdeps/posix/system.c: Add comment to explain code.
* sysdeps/wordsize-32/inttypes.h: Include <stddef.h> for wchar_t.
Define PTRDIFF_{MIN,MAX}, SIG_ATOMIC_{MIN,MAX}, SIZE_MAX,
WCHAR_{MIN,MAX}, WINT_{MIN,MAX}.
Define wcstoimax, wcstoumax.
* sysdeps/wordsize-64/inttypes.h: Likewise.
* wcsmbs/wchar.h: Define WCHAR_{MIN,MAX} if not already defined.
Declare __wcsto{l,ul,ll,ull}_internal only if not already done.
* time/Makefile (routines): Add strfxtime.
* time/strftime.c: Implement %F and %f format.
* time/strfxtime.c: New file.
* time/time.h: Define new types and symbols from ISO C 9X.
* time/mktime.c: Little comment correction.
1997-11-10 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* sysdeps/libm-ieee754/s_sincosl.c: Fix typo.
* sysdeps/libm-ieee754/s_tanl.c: Fix typo.
* sysdeps/libm-ieee754/s_floorl.c: Correct typos.
* sysdeps/libm-ieee754/e_remainderl.c: Replace
EXTRACT_LDOUBLE_WORDS by GET_LDOUBLE_WORDS.
* sysdeps/libm-ieee754/e_atan2l.c: Replace EXTRACT_LDOUBLE_WORDS
by GET_LDOUBLE_WORDS.
* sysdeps/libm-ieee754/s_scalbnl.c: Replace ";" by "," for correct
variable declaration.
* sysdeps/libm-ieee754/s_scalblnl.c: Likewise.
* sysdeps/libm-ieee754/s_lrint.c (__lrint): Correct function.
* math/libm-test.c (sqrt_test): Add test for sqrt (0.25).
(asin_test): Add more test.
1997-11-10 23:34 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/libm-ieee754/e_asin.c: Add braces to make code clearer
and to not confuse the poor compiler.
* sysdeps/libm-ieee754/e_asinf.c: Likewise.
Reported by vertex@cagent.com.
1997-11-09 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* elf/dl-lookup.c (do_lookup): Don't accept the base version if we
require a specific one.
* libio/oldfreopen.c: Bind old symbols to version GLIBC_2.0.
* libio/oldiofopen.c: Likewise.
* libio/oldstdfiles.c: Likewise.
* libc.map: Export them.
1997-11-10 07:40 H.J. Lu <hjl@gnu.ai.mit.edu>
* stdlib/exit.c (exit): Handle recursive calls to exit ().
1997-11-09 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/fpu/s_llrint.c: Fixed to take double argument
instead of long double.
* sysdeps/m68k/fpu/s_llrintf.c: New file.
* sysdeps/m68k/fpu/s_llrintl.c: New file.
* sysdeps/libm-ieee754/s_llrint.c: Make compilable and fix
overflow condition.
* sysdeps/libm-ieee754/s_llrintf.c: Fix overflow condition.
* sysdeps/libm-ieee754/s_llrintl.c: Likewise.
* sysdeps/libm-ieee754/s_llround.c: Likewise.
* sysdeps/libm-ieee754/s_llroundf.c: Likewise.
* sysdeps/libm-ieee754/s_llroundl.c: Likewise.
* sysdeps/libm-ieee754/s_lrint.c: Likewise.
* sysdeps/libm-ieee754/s_lrintf.c: Likewise.
* sysdeps/libm-ieee754/s_lrintl.c: Likewise.
* sysdeps/libm-ieee754/s_lround.c: Likewise.
* sysdeps/libm-ieee754/s_lroundf.c: Likewise.
* sysdeps/libm-ieee754/s_lroundl.c: Likewise.
* math/libm-test.c: Test all three variants of lrint and llrint.
Fix typos in lround and llround tests. Add tests for boundary
cases for lrint and llround.
1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* manual/arith.texi: Misc doc fixes.
* manual/ctype.texi: Likewise.
* manual/pattern.texi: Likewise.
* manual/terminal.texi: Likewise.
1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/xstatconv.c: Use struct assignment
instead of memcpy to let the compiler use whatever it regards as
optimal.
* sysdeps/unix/sysv/linux/alpha/xstatconv.c: Likewise.
1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/Makefile (sysdep_headers)
[$(subdir)=misc]: Add sys/prctl.h.
* sysdeps/unix/sysv/linux/Dist: Distribute it.
1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* io/ftwtest-sh: Don't use the unknown which command, instead try
pwd as /bin/pwd and /usr/bin/pwd.
1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* manual/maint.texi (Tools for Installation): Don't recommend
broken version 3.76.1 of make.
(Porting): Fix wording.
1997-11-06 06:13 H.J. Lu <hjl@gnu.ai.mit.edu>
* config.make.in (build-pic-default): New, defined with
pic_default.
* configure.in (pic_default): New, set to yes if PIC is
default.
* Makeconfig (CPPFLAGS-.o, CPPFLAGS-.op, CPPFLAGS-.og,
CPPFLAGS-.ob): Add -DPIC if $(build-pic-default) is yes.
1997-11-09 18:15 Ulrich Drepper <drepper@cygnus.com>
* Makerules (libc.so): Fix typo.
* csu/Makefile (CFLAGS-initfini.s): Correctly fix moving function
definition. Patch by Zack Weinberg <zack@rabi.phys.columbia.edu>.
* stdlib/strtod.c: Handle numbers like 0.0e10000 correctly which
produce ±0.0. Reported by Joe Keane <jgk@jgk.org>.
* sysdeps/libm-ieee754/s_ceill.c: Fix typos.
* sysdeps/libm-ieee754/s_llrint.c: Correct code, it never worked.
1997-11-06 07:00 H.J. Lu <hjl@gnu.ai.mit.edu>
* sysdeps/unix/sysv/i386/i686/time.S: Removed.
1997-11-08 14:07 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
* nis/libnsl.map: Add __do_niscall2 for nis_cachemgr.
* nis/nis_call.c: Set UDP resend timeout correct.
* nis/nss_compat/compat-grp.c: Rewritten to make it faster.
* nis/nss_compat/compat-pwd.c: Likewise.
* nis/nss_compat/compat-spwd.c: Likewise.
* nis/ypclnt.c: Fix UDP resend timeout, fix yp_bind/do_ypcall
interaction.
* inet/protocols/routed.h: Include sys/socket.h.
* inet/protocols/talkd.h: Likewise.
* inet/protocols/timed.h: Include rpc/types.h.
* sunrpc/rpc/pmap_clnt.h: Include rpc/clnt.h.
1997-11-06 01:39 Ulrich Drepper <drepper@cygnus.com>
* Makerules (libc.so): Add missing closing brace.
1997-11-05 Brendan Kehoe <brendan@lisa.cygnus.com>
* libio.h (__P): Name its arg `p' instead of `params'.
This was added solely to work around problems with
the definition of __P in the Solaris math.h header.
1997-11-12 01:06:02 +01:00
|
|
|
{
|
2004-02-09 21:33:35 +01:00
|
|
|
status = __ypclnt_call (domain, prog, xargs, req, xres,
|
|
|
|
resp, &ydb, 1);
|
|
|
|
__yp_unbind (ydb);
|
|
|
|
}
|
1996-12-11 02:40:39 +01:00
|
|
|
|
2004-02-09 21:33:35 +01:00
|
|
|
#if USE_BINDINGDIR
|
|
|
|
/* If we support binding dir data, we have a third chance:
|
|
|
|
Ask ypbind. */
|
|
|
|
if (status != YPERR_SUCCESS)
|
|
|
|
{
|
|
|
|
ydb = calloc (1, sizeof (dom_binding));
|
2005-11-26 23:16:03 +01:00
|
|
|
if (ydb != NULL && yp_bind_ypbindprog (domain, ydb) == YPERR_SUCCESS)
|
1996-12-11 02:40:39 +01:00
|
|
|
{
|
2004-02-09 21:33:35 +01:00
|
|
|
status = __ypclnt_call (domain, prog, xargs, req, xres,
|
|
|
|
resp, &ydb, 1);
|
|
|
|
__yp_unbind (ydb);
|
1996-12-11 02:40:39 +01:00
|
|
|
}
|
1998-02-26 12:20:59 +01:00
|
|
|
else
|
2004-02-09 21:33:35 +01:00
|
|
|
free (ydb);
|
1996-12-11 02:40:39 +01:00
|
|
|
}
|
2004-02-09 21:33:35 +01:00
|
|
|
#endif
|
1996-12-11 02:40:39 +01:00
|
|
|
|
1998-03-06 10:18:45 +01:00
|
|
|
__set_errno (saved_errno);
|
|
|
|
|
1998-02-26 12:20:59 +01:00
|
|
|
return status;
|
1996-12-11 02:40:39 +01:00
|
|
|
}
|
|
|
|
|
2005-11-26 23:16:03 +01:00
|
|
|
/* Like do_ypcall, but translate the status value if necessary. */
|
|
|
|
static int
|
|
|
|
do_ypcall_tr (const char *domain, u_long prog, xdrproc_t xargs,
|
|
|
|
caddr_t req, xdrproc_t xres, caddr_t resp)
|
|
|
|
{
|
|
|
|
int status = do_ypcall (domain, prog, xargs, req, xres, resp);
|
|
|
|
if (status == YPERR_SUCCESS)
|
|
|
|
/* We cast to ypresp_val although the pointer could also be of
|
|
|
|
type ypresp_key_val or ypresp_master or ypresp_order or
|
|
|
|
ypresp_maplist. But the stat element is in a common prefix so
|
|
|
|
this does not matter. */
|
|
|
|
status = ypprot_err (((struct ypresp_val *) resp)->stat);
|
|
|
|
return status;
|
|
|
|
}
|
|
|
|
|
1996-12-11 02:40:39 +01:00
|
|
|
|
|
|
|
__libc_lock_define_initialized (static, domainname_lock)
|
|
|
|
|
|
|
|
int
|
|
|
|
yp_get_default_domain (char **outdomain)
|
|
|
|
{
|
|
|
|
int result = YPERR_SUCCESS;;
|
|
|
|
*outdomain = NULL;
|
|
|
|
|
|
|
|
__libc_lock_lock (domainname_lock);
|
|
|
|
|
2005-11-26 23:16:03 +01:00
|
|
|
if (ypdomainname[0] == '\0')
|
1996-12-11 02:40:39 +01:00
|
|
|
{
|
2005-11-26 23:16:03 +01:00
|
|
|
if (getdomainname (ypdomainname, NIS_MAXNAMELEN))
|
1996-12-11 02:40:39 +01:00
|
|
|
result = YPERR_NODOM;
|
2005-11-26 23:16:03 +01:00
|
|
|
else if (strcmp (ypdomainname, "(none)") == 0)
|
1998-05-12 14:22:17 +02:00
|
|
|
{
|
1999-12-18 20:45:25 +01:00
|
|
|
/* If domainname is not set, some systems will return "(none)" */
|
2005-11-26 23:16:03 +01:00
|
|
|
ypdomainname[0] = '\0';
|
1998-05-12 14:22:17 +02:00
|
|
|
result = YPERR_NODOM;
|
|
|
|
}
|
1996-12-11 02:40:39 +01:00
|
|
|
else
|
2005-11-26 23:16:03 +01:00
|
|
|
*outdomain = ypdomainname;
|
1996-12-11 02:40:39 +01:00
|
|
|
}
|
|
|
|
else
|
2005-11-26 23:16:03 +01:00
|
|
|
*outdomain = ypdomainname;
|
1996-12-11 02:40:39 +01:00
|
|
|
|
|
|
|
__libc_lock_unlock (domainname_lock);
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
2004-10-24 22:29:20 +02:00
|
|
|
libnsl_hidden_def (yp_get_default_domain)
|
1996-12-11 02:40:39 +01:00
|
|
|
|
|
|
|
int
|
|
|
|
__yp_check (char **domain)
|
|
|
|
{
|
|
|
|
char *unused;
|
|
|
|
|
2005-11-26 23:16:03 +01:00
|
|
|
if (ypdomainname[0] == '\0')
|
1996-12-11 02:40:39 +01:00
|
|
|
if (yp_get_default_domain (&unused))
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
if (domain)
|
2005-11-26 23:16:03 +01:00
|
|
|
*domain = ypdomainname;
|
1996-12-11 02:40:39 +01:00
|
|
|
|
2005-11-26 23:16:03 +01:00
|
|
|
if (yp_bind (ypdomainname) == 0)
|
1996-12-11 02:40:39 +01:00
|
|
|
return 1;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
yp_match (const char *indomain, const char *inmap, const char *inkey,
|
|
|
|
const int inkeylen, char **outval, int *outvallen)
|
|
|
|
{
|
|
|
|
ypreq_key req;
|
|
|
|
ypresp_val resp;
|
1998-02-26 12:20:59 +01:00
|
|
|
enum clnt_stat result;
|
1996-12-11 02:40:39 +01:00
|
|
|
|
|
|
|
if (indomain == NULL || indomain[0] == '\0' ||
|
|
|
|
inmap == NULL || inmap[0] == '\0' ||
|
|
|
|
inkey == NULL || inkey[0] == '\0' || inkeylen <= 0)
|
|
|
|
return YPERR_BADARGS;
|
|
|
|
|
1996-12-15 03:15:29 +01:00
|
|
|
req.domain = (char *) indomain;
|
|
|
|
req.map = (char *) inmap;
|
|
|
|
req.key.keydat_val = (char *) inkey;
|
1996-12-11 02:40:39 +01:00
|
|
|
req.key.keydat_len = inkeylen;
|
|
|
|
|
|
|
|
*outval = NULL;
|
|
|
|
*outvallen = 0;
|
|
|
|
memset (&resp, '\0', sizeof (resp));
|
|
|
|
|
2005-11-26 23:16:03 +01:00
|
|
|
result = do_ypcall_tr (indomain, YPPROC_MATCH, (xdrproc_t) xdr_ypreq_key,
|
|
|
|
(caddr_t) &req, (xdrproc_t) xdr_ypresp_val,
|
|
|
|
(caddr_t) &resp);
|
1996-12-11 02:40:39 +01:00
|
|
|
|
1998-04-07 11:21:28 +02:00
|
|
|
if (result != YPERR_SUCCESS)
|
|
|
|
return result;
|
1996-12-11 02:40:39 +01:00
|
|
|
|
|
|
|
*outvallen = resp.val.valdat_len;
|
|
|
|
*outval = malloc (*outvallen + 1);
|
2005-11-26 23:16:03 +01:00
|
|
|
int status = YPERR_RESRC;
|
|
|
|
if (__builtin_expect (*outval != NULL, 1))
|
|
|
|
{
|
|
|
|
memcpy (*outval, resp.val.valdat_val, *outvallen);
|
|
|
|
(*outval)[*outvallen] = '\0';
|
|
|
|
status = YPERR_SUCCESS;
|
|
|
|
}
|
1996-12-11 02:40:39 +01:00
|
|
|
|
|
|
|
xdr_free ((xdrproc_t) xdr_ypresp_val, (char *) &resp);
|
|
|
|
|
2005-11-26 23:16:03 +01:00
|
|
|
return status;
|
1996-12-11 02:40:39 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
yp_first (const char *indomain, const char *inmap, char **outkey,
|
|
|
|
int *outkeylen, char **outval, int *outvallen)
|
|
|
|
{
|
|
|
|
ypreq_nokey req;
|
|
|
|
ypresp_key_val resp;
|
1998-02-26 12:20:59 +01:00
|
|
|
enum clnt_stat result;
|
1996-12-11 02:40:39 +01:00
|
|
|
|
|
|
|
if (indomain == NULL || indomain[0] == '\0' ||
|
|
|
|
inmap == NULL || inmap[0] == '\0')
|
|
|
|
return YPERR_BADARGS;
|
|
|
|
|
1996-12-15 03:15:29 +01:00
|
|
|
req.domain = (char *) indomain;
|
|
|
|
req.map = (char *) inmap;
|
1996-12-11 02:40:39 +01:00
|
|
|
|
|
|
|
*outkey = *outval = NULL;
|
|
|
|
*outkeylen = *outvallen = 0;
|
|
|
|
memset (&resp, '\0', sizeof (resp));
|
|
|
|
|
|
|
|
result = do_ypcall (indomain, YPPROC_FIRST, (xdrproc_t) xdr_ypreq_nokey,
|
2005-11-26 23:16:03 +01:00
|
|
|
(caddr_t) &req, (xdrproc_t) xdr_ypresp_key_val,
|
|
|
|
(caddr_t) &resp);
|
1996-12-11 02:40:39 +01:00
|
|
|
|
|
|
|
if (result != RPC_SUCCESS)
|
1998-02-26 12:20:59 +01:00
|
|
|
return YPERR_RPC;
|
1996-12-11 02:40:39 +01:00
|
|
|
if (resp.stat != YP_TRUE)
|
|
|
|
return ypprot_err (resp.stat);
|
|
|
|
|
2005-11-26 23:16:03 +01:00
|
|
|
int status;
|
|
|
|
if (__builtin_expect ((*outkey = malloc (resp.key.keydat_len + 1)) != NULL
|
|
|
|
&& (*outval = malloc (resp.val.valdat_len
|
|
|
|
+ 1)) != NULL, 1))
|
|
|
|
{
|
|
|
|
*outkeylen = resp.key.keydat_len;
|
|
|
|
memcpy (*outkey, resp.key.keydat_val, *outkeylen);
|
|
|
|
(*outkey)[*outkeylen] = '\0';
|
|
|
|
|
|
|
|
*outvallen = resp.val.valdat_len;
|
|
|
|
memcpy (*outval, resp.val.valdat_val, *outvallen);
|
|
|
|
(*outval)[*outvallen] = '\0';
|
|
|
|
|
|
|
|
status = YPERR_SUCCESS;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
free (*outkey);
|
|
|
|
status = YPERR_RESRC;
|
|
|
|
}
|
1996-12-11 02:40:39 +01:00
|
|
|
|
|
|
|
xdr_free ((xdrproc_t) xdr_ypresp_key_val, (char *) &resp);
|
|
|
|
|
2005-11-26 23:16:03 +01:00
|
|
|
return status;
|
1996-12-11 02:40:39 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
yp_next (const char *indomain, const char *inmap, const char *inkey,
|
|
|
|
const int inkeylen, char **outkey, int *outkeylen, char **outval,
|
|
|
|
int *outvallen)
|
|
|
|
{
|
|
|
|
ypreq_key req;
|
|
|
|
ypresp_key_val resp;
|
1998-02-26 12:20:59 +01:00
|
|
|
enum clnt_stat result;
|
1996-12-11 02:40:39 +01:00
|
|
|
|
|
|
|
if (indomain == NULL || indomain[0] == '\0' ||
|
|
|
|
inmap == NULL || inmap[0] == '\0' ||
|
|
|
|
inkeylen <= 0 || inkey == NULL || inkey[0] == '\0')
|
|
|
|
return YPERR_BADARGS;
|
|
|
|
|
1996-12-15 03:15:29 +01:00
|
|
|
req.domain = (char *) indomain;
|
|
|
|
req.map = (char *) inmap;
|
|
|
|
req.key.keydat_val = (char *) inkey;
|
1996-12-11 02:40:39 +01:00
|
|
|
req.key.keydat_len = inkeylen;
|
|
|
|
|
|
|
|
*outkey = *outval = NULL;
|
|
|
|
*outkeylen = *outvallen = 0;
|
|
|
|
memset (&resp, '\0', sizeof (resp));
|
|
|
|
|
2005-11-26 23:16:03 +01:00
|
|
|
result = do_ypcall_tr (indomain, YPPROC_NEXT, (xdrproc_t) xdr_ypreq_key,
|
|
|
|
(caddr_t) &req, (xdrproc_t) xdr_ypresp_key_val,
|
|
|
|
(caddr_t) &resp);
|
1996-12-11 02:40:39 +01:00
|
|
|
|
1998-04-07 11:21:28 +02:00
|
|
|
if (result != YPERR_SUCCESS)
|
|
|
|
return result;
|
1996-12-11 02:40:39 +01:00
|
|
|
|
2005-11-26 23:16:03 +01:00
|
|
|
int status;
|
|
|
|
if (__builtin_expect ((*outkey = malloc (resp.key.keydat_len + 1)) != NULL
|
|
|
|
&& (*outval = malloc (resp.val.valdat_len
|
|
|
|
+ 1)) != NULL, 1))
|
|
|
|
{
|
|
|
|
*outkeylen = resp.key.keydat_len;
|
|
|
|
memcpy (*outkey, resp.key.keydat_val, *outkeylen);
|
|
|
|
(*outkey)[*outkeylen] = '\0';
|
|
|
|
|
|
|
|
*outvallen = resp.val.valdat_len;
|
|
|
|
memcpy (*outval, resp.val.valdat_val, *outvallen);
|
|
|
|
(*outval)[*outvallen] = '\0';
|
|
|
|
|
|
|
|
status = YPERR_SUCCESS;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
free (*outkey);
|
|
|
|
status = YPERR_RESRC;
|
|
|
|
}
|
1996-12-11 02:40:39 +01:00
|
|
|
|
|
|
|
xdr_free ((xdrproc_t) xdr_ypresp_key_val, (char *) &resp);
|
|
|
|
|
2005-11-26 23:16:03 +01:00
|
|
|
return status;
|
1996-12-11 02:40:39 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
yp_master (const char *indomain, const char *inmap, char **outname)
|
|
|
|
{
|
|
|
|
ypreq_nokey req;
|
|
|
|
ypresp_master resp;
|
1998-02-26 12:20:59 +01:00
|
|
|
enum clnt_stat result;
|
1996-12-11 02:40:39 +01:00
|
|
|
|
|
|
|
if (indomain == NULL || indomain[0] == '\0' ||
|
|
|
|
inmap == NULL || inmap[0] == '\0')
|
|
|
|
return YPERR_BADARGS;
|
|
|
|
|
1996-12-15 03:15:29 +01:00
|
|
|
req.domain = (char *) indomain;
|
|
|
|
req.map = (char *) inmap;
|
1996-12-11 02:40:39 +01:00
|
|
|
|
|
|
|
memset (&resp, '\0', sizeof (ypresp_master));
|
|
|
|
|
2005-11-26 23:16:03 +01:00
|
|
|
result = do_ypcall_tr (indomain, YPPROC_MASTER, (xdrproc_t) xdr_ypreq_nokey,
|
|
|
|
(caddr_t) &req, (xdrproc_t) xdr_ypresp_master,
|
|
|
|
(caddr_t) &resp);
|
1996-12-11 02:40:39 +01:00
|
|
|
|
1998-04-07 11:21:28 +02:00
|
|
|
if (result != YPERR_SUCCESS)
|
|
|
|
return result;
|
1996-12-11 02:40:39 +01:00
|
|
|
|
|
|
|
*outname = strdup (resp.peer);
|
|
|
|
xdr_free ((xdrproc_t) xdr_ypresp_master, (char *) &resp);
|
|
|
|
|
1998-02-26 12:20:59 +01:00
|
|
|
return *outname == NULL ? YPERR_YPERR : YPERR_SUCCESS;
|
1996-12-11 02:40:39 +01:00
|
|
|
}
|
2004-10-24 22:29:20 +02:00
|
|
|
libnsl_hidden_def (yp_master)
|
1996-12-11 02:40:39 +01:00
|
|
|
|
|
|
|
int
|
|
|
|
yp_order (const char *indomain, const char *inmap, unsigned int *outorder)
|
|
|
|
{
|
|
|
|
struct ypreq_nokey req;
|
|
|
|
struct ypresp_order resp;
|
1998-02-26 12:20:59 +01:00
|
|
|
enum clnt_stat result;
|
1996-12-11 02:40:39 +01:00
|
|
|
|
|
|
|
if (indomain == NULL || indomain[0] == '\0' ||
|
2005-11-25 17:05:57 +01:00
|
|
|
inmap == NULL || inmap[0] == '\0')
|
1996-12-11 02:40:39 +01:00
|
|
|
return YPERR_BADARGS;
|
|
|
|
|
1996-12-15 03:15:29 +01:00
|
|
|
req.domain = (char *) indomain;
|
|
|
|
req.map = (char *) inmap;
|
1996-12-11 02:40:39 +01:00
|
|
|
|
|
|
|
memset (&resp, '\0', sizeof (resp));
|
|
|
|
|
2005-11-26 23:16:03 +01:00
|
|
|
result = do_ypcall_tr (indomain, YPPROC_ORDER, (xdrproc_t) xdr_ypreq_nokey,
|
|
|
|
(caddr_t) &req, (xdrproc_t) xdr_ypresp_order,
|
|
|
|
(caddr_t) &resp);
|
1996-12-11 02:40:39 +01:00
|
|
|
|
2008-03-04 01:28:04 +01:00
|
|
|
if (result != YPERR_SUCCESS)
|
1998-04-07 11:21:28 +02:00
|
|
|
return result;
|
1996-12-11 02:40:39 +01:00
|
|
|
|
|
|
|
*outorder = resp.ordernum;
|
|
|
|
xdr_free ((xdrproc_t) xdr_ypresp_order, (char *) &resp);
|
|
|
|
|
2005-11-26 23:16:03 +01:00
|
|
|
return result;
|
1996-12-11 02:40:39 +01:00
|
|
|
}
|
|
|
|
|
2004-05-26 06:47:00 +02:00
|
|
|
struct ypresp_all_data
|
|
|
|
{
|
|
|
|
unsigned long status;
|
|
|
|
void *data;
|
|
|
|
int (*foreach) (int status, char *key, int keylen,
|
|
|
|
char *val, int vallen, char *data);
|
|
|
|
};
|
1996-12-11 02:40:39 +01:00
|
|
|
|
|
|
|
static bool_t
|
2004-05-26 06:47:00 +02:00
|
|
|
__xdr_ypresp_all (XDR *xdrs, struct ypresp_all_data *objp)
|
1996-12-11 02:40:39 +01:00
|
|
|
{
|
|
|
|
while (1)
|
|
|
|
{
|
|
|
|
struct ypresp_all resp;
|
|
|
|
|
|
|
|
memset (&resp, '\0', sizeof (struct ypresp_all));
|
|
|
|
if (!xdr_ypresp_all (xdrs, &resp))
|
|
|
|
{
|
|
|
|
xdr_free ((xdrproc_t) xdr_ypresp_all, (char *) &resp);
|
2004-05-26 06:47:00 +02:00
|
|
|
objp->status = YP_YPERR;
|
1998-02-26 12:20:59 +01:00
|
|
|
return FALSE;
|
1996-12-11 02:40:39 +01:00
|
|
|
}
|
|
|
|
if (resp.more == 0)
|
|
|
|
{
|
|
|
|
xdr_free ((xdrproc_t) xdr_ypresp_all, (char *) &resp);
|
2004-05-26 06:47:00 +02:00
|
|
|
objp->status = YP_NOMORE;
|
1998-02-26 12:20:59 +01:00
|
|
|
return TRUE;
|
1996-12-11 02:40:39 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
switch (resp.ypresp_all_u.val.stat)
|
|
|
|
{
|
|
|
|
case YP_TRUE:
|
|
|
|
{
|
|
|
|
char key[resp.ypresp_all_u.val.key.keydat_len + 1];
|
|
|
|
char val[resp.ypresp_all_u.val.val.valdat_len + 1];
|
|
|
|
int keylen = resp.ypresp_all_u.val.key.keydat_len;
|
|
|
|
int vallen = resp.ypresp_all_u.val.val.valdat_len;
|
|
|
|
|
1999-12-18 20:45:25 +01:00
|
|
|
/* We are not allowed to modify the key and val data.
|
|
|
|
But we are allowed to add data behind the buffer,
|
|
|
|
if we don't modify the length. So add an extra NUL
|
|
|
|
character to avoid trouble with broken code. */
|
2004-05-26 06:47:00 +02:00
|
|
|
objp->status = YP_TRUE;
|
2006-04-28 19:01:50 +02:00
|
|
|
*((char *) __mempcpy (key, resp.ypresp_all_u.val.key.keydat_val,
|
|
|
|
keylen)) = '\0';
|
|
|
|
*((char *) __mempcpy (val, resp.ypresp_all_u.val.val.valdat_val,
|
|
|
|
vallen)) = '\0';
|
1996-12-11 02:40:39 +01:00
|
|
|
xdr_free ((xdrproc_t) xdr_ypresp_all, (char *) &resp);
|
2004-05-26 06:47:00 +02:00
|
|
|
if ((*objp->foreach) (objp->status, key, keylen,
|
|
|
|
val, vallen, objp->data))
|
1996-12-11 02:40:39 +01:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
default:
|
2004-05-26 06:47:00 +02:00
|
|
|
objp->status = resp.ypresp_all_u.val.stat;
|
1996-12-11 02:40:39 +01:00
|
|
|
xdr_free ((xdrproc_t) xdr_ypresp_all, (char *) &resp);
|
1999-12-18 20:45:25 +01:00
|
|
|
/* Sun says we don't need to make this call, but must return
|
2006-04-28 19:01:50 +02:00
|
|
|
immediately. Since Solaris makes this call, we will call
|
1999-12-18 20:45:25 +01:00
|
|
|
the callback function, too. */
|
2004-05-26 06:47:00 +02:00
|
|
|
(*objp->foreach) (objp->status, NULL, 0, NULL, 0, objp->data);
|
1996-12-11 02:40:39 +01:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
yp_all (const char *indomain, const char *inmap,
|
|
|
|
const struct ypall_callback *incallback)
|
|
|
|
{
|
|
|
|
struct ypreq_nokey req;
|
Update.
1997-11-11 21:30 Ulrich Drepper <drepper@cygnus.com>
* include/sys/stat.h: Define stat, fstat, lstat and *64 variants
as macros so the the library compiles correctly even without
optimization.
* io/fstat.c: Undef fstat.
* io/fstat64.c: Undef fstat64
* io/lstat.c: Undef lstat.
* io/lstat64.c: Undef lstat64
* io/stat.c: Undef stat.
* io/stat64.c: Undef stat64
* io/fts.c: Include <include/sys/stat.h> to get macro definitions.
* io/ftw.c: Likewise.
* io/getdirname.c: Likewise.
* Makefile (install): Run test-installation.pl if possible.
* db2/Makefile: Update from db-2.3.12.
* db2/db.h: Likewise.
* db2/db_int.h: Likewise.
* db2/btree/bt_cursor.c: Likewise.
* db2/btree/bt_delete.c: Likewise.
* db2/btree/bt_open.c: Likewise.
* db2/btree/bt_put.c: Likewise.
* db2/btree/bt_rec.c: Likewise.
* db2/btree/bt_recno.c: Likewise.
* db2/btree/bt_search.c: Likewise.
* db2/btree/bt_split.c: Likewise.
* db2/btree/bt_stat.c: Likewise.
* db2/btree/btree.src: Likewise.
* db2/btree/btree_auto.c: Likewise.
* db2/btree/bt_cursor.c: Likewise.
* db2/btree/bt_delete.c: Likewise.
* db2/btree/bt_open.c: Likewise.
* db2/btree/bt_put.c: Likewise.
* db2/btree/bt_rec.c: Likewise.
* db2/btree/bt_recno.c: Likewise.
* db2/btree/bt_search.c: Likewise.
* db2/btree/bt_split.c: Likewise.
* db2/btree/bt_stat.c: Likewise.
* db2/btree/btree.src: Likewise.
* db2/btree/btree_auto.c: Likewise.
* db2/common/db_appinit.c: Likewise.
* db2/common/db_apprec.c: Likewise.
* db2/common/db_byteorder.c: Likewise.
* db2/common/db_region.c: Likewise.
* db2/db/db.c: Likewise
* db2/db/db.src: Likewise
* db2/db/db_auto.c: Likewise
* db2/db/db_dispatch.c: Likewise
* db2/db/db_dup.c: Likewise
* db2/db/db_overflow.c: Likewise
* db2/db/db_pr.c: Likewise
* db2/db/db_rec.c: Likewise
* db2/db/db_ret.c: Likewise
* db2/db/db_thread.c: Likewise
* db2/db185/db185.c: Likewise.
* db2/hash/hash.c: Likewise.
* db2/hash/hash.src: Likewise.
* db2/hash/hash_auto.c: Likewise.
* db2/hash/hash_dup.c: Likewise.
* db2/hash/hash_page.c: Likewise.
* db2/hash/hash_rec.c: Likewise.
* db2/include/btree_auto.h: Likewise.
* db2/include/btree_ext.h: Likewise.
* db2/include/clib_ext.h: Likewise.
* db2/include/common_ext.h: Likewise.
* db2/include/db.h.src: Likewise.
* db2/include/db_am.h: Likewise.
* db2/include/db_auto.h: Likewise.
* db2/include/db_cxx.h: Likewise.
* db2/include/db_ext.h: Likewise.
* db2/include/db_int.h.src: Likewise.
* db2/include/hash.h: Likewise.
* db2/include/hash_auto.h: Likewise.
* db2/include/hash_ext.h: Likewise.
* db2/include/lock.h: Likewise.
* db2/include/lock_ext.h: Likewise.
* db2/include/log.h: Likewise.
* db2/include/log_ext.h: Likewise.
* db2/include/mp.h: Likewise.
* db2/include/mp_ext.h: Likewise.
* db2/include/mutex_ext.h: Likewise.
* db2/include/os_ext.h: Likewise.
* db2/include/os_func.h: Likewise.
* db2/include/txn.h: Likewise.
* db2/include/txn_ext.h: Likewise.
* db2/lock/lock.c: Likewise.
* db2/lock/lock_deadlock.c: Likewise.
* db2/log/log.c: Likewise.
* db2/log/log_archive.c: Likewise.
* db2/log/log_auto.c: Likewise.
* db2/log/log_findckp.c: Likewise.
* db2/log/log_get.c: Likewise.
* db2/log/log_put.c: Likewise.
* db2/log/log_rec.c: Likewise.
* db2/log/log_register.c: Likewise.
* db2/mp/mp_bh.c: Likewise.
* db2/mp/mp_fget.c: Likewise.
* db2/mp/mp_fopen.c: Likewise.
* db2/mp/mp_fput.c: Likewise.
* db2/mp/mp_fset.c: Likewise.
* db2/mp/mp_open.c: Likewise.
* db2/mp/mp_pr.c: Likewise.
* db2/mp/mp_region.c: Likewise.
* db2/mp/mp_sync.c: Likewise.
* db2/mutex/mutex.c: Likewise.
* db2/os/os_abs.c: Likewise.
* db2/os/os_dir.c: Likewise.
* db2/os/os_fid.c: Likewise.
* db2/os/os_fsync.c: Likewise.
* db2/os/os_func.c: Likewise.
* db2/os/os_map.c: Likewise.
* db2/os/os_oflags.c: Likewise.
* db2/os/os_open.c: Likewise.
* db2/os/os_rpath.c: Likewise.
* db2/os/os_rw.c: Likewise.
* db2/os/os_seek.c: Likewise.
* db2/os/os_sleep.c: Likewise.
* db2/os/os_stat.c: Likewise.
* db2/os/os_unlink.c: Likewise.
* db2/progs/db_deadlock/db_deadlock.c: Likewise.
* db2/progs/db_dump/db_dump.c: Likewise.
* db2/progs/db_load/db_load.c: Likewise.
* db2/progs/db_recover/db_recover.c: Likewise.
* db2/progs/db_stat/db_stat.c: Likewise.
* db2/txn/txn.c: Likewise.
* db2/txn/txn_auto.c: Likewise.
* db2/txn/txn_rec.c: Likewise.
* db2/os/db_os_abs.c: Removed.
* db2/os/db_os_dir.c: Removed.
* db2/os/db_os_fid.c: Removed.
* db2/os/db_os_lseek.c: Removed.
* db2/os/db_os_mmap.c: Removed.
* db2/os/db_os_open.c: Removed.
* db2/os/db_os_rw.c: Removed.
* db2/os/db_os_sleep.c: Removed.
* db2/os/db_os_stat.c: Removed.
* db2/os/db_os_unlink.c: Removed.
* libio/stdio.h (fopen): Add __restrict to parameters.
* manual/process.texi (system): Describe behaviour for NULL argument.
* stdio-common/printf-parse.h: Parse hh modifier.
* stdio-common/vfprintf.c: Handle hh modifier.
* stdio-common/vfscanf.c: Likewise.
* manual/stdio.texi: Describe hh modifier for scanf/printf.
* math/complex.h: Don't define _Imaginary_I, but instead _Complex_I.
gcc does no yet know the `imaginary' keyword.
* math/test-math.c: Add little test for know gcc bug.
* math/tgmath.h: Make complex versions of log10() only available
if __USE_GNU.
* stdlib/test-canon.c: Fix typo.
* sysdeps/generic/setenv.c: Avoid compilation warnings.
Reported by Jim Meyering.
* sysdeps/generic/bits/errno.h: EILSEQ is an ISO C error number.
* sysdeps/mach/hurd/bits/errno.h: Likewise.
* sysdeps/standalone/bits/errno.h: Likewise.
* sysdeps/unix/sysv/linux/bits/errno.h: Likewise.
* sysdeps/i386/i586/memcpy.S: New file.
* sysdeps/i386/i586/mempcpy.S: New file.
* sysdeps/i386/i586/memset.S: Fix typo.
* sysdeps/posix/getcwd.c: Define HAVE_MEMPCPY for _LIBC. Add casts.
* sysdeps/posix/system.c: Add comment to explain code.
* sysdeps/wordsize-32/inttypes.h: Include <stddef.h> for wchar_t.
Define PTRDIFF_{MIN,MAX}, SIG_ATOMIC_{MIN,MAX}, SIZE_MAX,
WCHAR_{MIN,MAX}, WINT_{MIN,MAX}.
Define wcstoimax, wcstoumax.
* sysdeps/wordsize-64/inttypes.h: Likewise.
* wcsmbs/wchar.h: Define WCHAR_{MIN,MAX} if not already defined.
Declare __wcsto{l,ul,ll,ull}_internal only if not already done.
* time/Makefile (routines): Add strfxtime.
* time/strftime.c: Implement %F and %f format.
* time/strfxtime.c: New file.
* time/time.h: Define new types and symbols from ISO C 9X.
* time/mktime.c: Little comment correction.
1997-11-10 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* sysdeps/libm-ieee754/s_sincosl.c: Fix typo.
* sysdeps/libm-ieee754/s_tanl.c: Fix typo.
* sysdeps/libm-ieee754/s_floorl.c: Correct typos.
* sysdeps/libm-ieee754/e_remainderl.c: Replace
EXTRACT_LDOUBLE_WORDS by GET_LDOUBLE_WORDS.
* sysdeps/libm-ieee754/e_atan2l.c: Replace EXTRACT_LDOUBLE_WORDS
by GET_LDOUBLE_WORDS.
* sysdeps/libm-ieee754/s_scalbnl.c: Replace ";" by "," for correct
variable declaration.
* sysdeps/libm-ieee754/s_scalblnl.c: Likewise.
* sysdeps/libm-ieee754/s_lrint.c (__lrint): Correct function.
* math/libm-test.c (sqrt_test): Add test for sqrt (0.25).
(asin_test): Add more test.
1997-11-10 23:34 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/libm-ieee754/e_asin.c: Add braces to make code clearer
and to not confuse the poor compiler.
* sysdeps/libm-ieee754/e_asinf.c: Likewise.
Reported by vertex@cagent.com.
1997-11-09 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* elf/dl-lookup.c (do_lookup): Don't accept the base version if we
require a specific one.
* libio/oldfreopen.c: Bind old symbols to version GLIBC_2.0.
* libio/oldiofopen.c: Likewise.
* libio/oldstdfiles.c: Likewise.
* libc.map: Export them.
1997-11-10 07:40 H.J. Lu <hjl@gnu.ai.mit.edu>
* stdlib/exit.c (exit): Handle recursive calls to exit ().
1997-11-09 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/fpu/s_llrint.c: Fixed to take double argument
instead of long double.
* sysdeps/m68k/fpu/s_llrintf.c: New file.
* sysdeps/m68k/fpu/s_llrintl.c: New file.
* sysdeps/libm-ieee754/s_llrint.c: Make compilable and fix
overflow condition.
* sysdeps/libm-ieee754/s_llrintf.c: Fix overflow condition.
* sysdeps/libm-ieee754/s_llrintl.c: Likewise.
* sysdeps/libm-ieee754/s_llround.c: Likewise.
* sysdeps/libm-ieee754/s_llroundf.c: Likewise.
* sysdeps/libm-ieee754/s_llroundl.c: Likewise.
* sysdeps/libm-ieee754/s_lrint.c: Likewise.
* sysdeps/libm-ieee754/s_lrintf.c: Likewise.
* sysdeps/libm-ieee754/s_lrintl.c: Likewise.
* sysdeps/libm-ieee754/s_lround.c: Likewise.
* sysdeps/libm-ieee754/s_lroundf.c: Likewise.
* sysdeps/libm-ieee754/s_lroundl.c: Likewise.
* math/libm-test.c: Test all three variants of lrint and llrint.
Fix typos in lround and llround tests. Add tests for boundary
cases for lrint and llround.
1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* manual/arith.texi: Misc doc fixes.
* manual/ctype.texi: Likewise.
* manual/pattern.texi: Likewise.
* manual/terminal.texi: Likewise.
1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/xstatconv.c: Use struct assignment
instead of memcpy to let the compiler use whatever it regards as
optimal.
* sysdeps/unix/sysv/linux/alpha/xstatconv.c: Likewise.
1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/Makefile (sysdep_headers)
[$(subdir)=misc]: Add sys/prctl.h.
* sysdeps/unix/sysv/linux/Dist: Distribute it.
1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* io/ftwtest-sh: Don't use the unknown which command, instead try
pwd as /bin/pwd and /usr/bin/pwd.
1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* manual/maint.texi (Tools for Installation): Don't recommend
broken version 3.76.1 of make.
(Porting): Fix wording.
1997-11-06 06:13 H.J. Lu <hjl@gnu.ai.mit.edu>
* config.make.in (build-pic-default): New, defined with
pic_default.
* configure.in (pic_default): New, set to yes if PIC is
default.
* Makeconfig (CPPFLAGS-.o, CPPFLAGS-.op, CPPFLAGS-.og,
CPPFLAGS-.ob): Add -DPIC if $(build-pic-default) is yes.
1997-11-09 18:15 Ulrich Drepper <drepper@cygnus.com>
* Makerules (libc.so): Fix typo.
* csu/Makefile (CFLAGS-initfini.s): Correctly fix moving function
definition. Patch by Zack Weinberg <zack@rabi.phys.columbia.edu>.
* stdlib/strtod.c: Handle numbers like 0.0e10000 correctly which
produce ±0.0. Reported by Joe Keane <jgk@jgk.org>.
* sysdeps/libm-ieee754/s_ceill.c: Fix typos.
* sysdeps/libm-ieee754/s_llrint.c: Correct code, it never worked.
1997-11-06 07:00 H.J. Lu <hjl@gnu.ai.mit.edu>
* sysdeps/unix/sysv/i386/i686/time.S: Removed.
1997-11-08 14:07 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
* nis/libnsl.map: Add __do_niscall2 for nis_cachemgr.
* nis/nis_call.c: Set UDP resend timeout correct.
* nis/nss_compat/compat-grp.c: Rewritten to make it faster.
* nis/nss_compat/compat-pwd.c: Likewise.
* nis/nss_compat/compat-spwd.c: Likewise.
* nis/ypclnt.c: Fix UDP resend timeout, fix yp_bind/do_ypcall
interaction.
* inet/protocols/routed.h: Include sys/socket.h.
* inet/protocols/talkd.h: Likewise.
* inet/protocols/timed.h: Include rpc/types.h.
* sunrpc/rpc/pmap_clnt.h: Include rpc/clnt.h.
1997-11-06 01:39 Ulrich Drepper <drepper@cygnus.com>
* Makerules (libc.so): Add missing closing brace.
1997-11-05 Brendan Kehoe <brendan@lisa.cygnus.com>
* libio.h (__P): Name its arg `p' instead of `params'.
This was added solely to work around problems with
the definition of __P in the Solaris math.h header.
1997-11-12 01:06:02 +01:00
|
|
|
dom_binding *ydb = NULL;
|
1998-02-26 12:20:59 +01:00
|
|
|
int try, res;
|
|
|
|
enum clnt_stat result;
|
1996-12-11 02:40:39 +01:00
|
|
|
struct sockaddr_in clnt_sin;
|
|
|
|
CLIENT *clnt;
|
2004-05-26 06:47:00 +02:00
|
|
|
struct ypresp_all_data data;
|
1996-12-11 02:40:39 +01:00
|
|
|
int clnt_sock;
|
1998-03-06 10:18:45 +01:00
|
|
|
int saved_errno = errno;
|
1996-12-11 02:40:39 +01:00
|
|
|
|
2005-11-26 23:16:03 +01:00
|
|
|
if (indomain == NULL || indomain[0] == '\0'
|
|
|
|
|| inmap == NULL || inmap[0] == '\0')
|
1996-12-11 02:40:39 +01:00
|
|
|
return YPERR_BADARGS;
|
|
|
|
|
|
|
|
try = 0;
|
1998-02-26 12:20:59 +01:00
|
|
|
res = YPERR_YPERR;
|
1996-12-11 02:40:39 +01:00
|
|
|
|
1998-02-26 12:20:59 +01:00
|
|
|
while (try < MAXTRIES && res != YPERR_SUCCESS)
|
1996-12-11 02:40:39 +01:00
|
|
|
{
|
|
|
|
if (__yp_bind (indomain, &ydb) != 0)
|
|
|
|
{
|
1998-03-06 10:18:45 +01:00
|
|
|
__set_errno (saved_errno);
|
1996-12-11 02:40:39 +01:00
|
|
|
return YPERR_DOMAIN;
|
|
|
|
}
|
|
|
|
|
|
|
|
clnt_sock = RPC_ANYSOCK;
|
|
|
|
clnt_sin = ydb->dom_server_addr;
|
|
|
|
clnt_sin.sin_port = 0;
|
2002-03-21 01:43:13 +01:00
|
|
|
|
|
|
|
/* We don't need the UDP connection anymore. */
|
|
|
|
__yp_unbind (ydb);
|
2003-04-24 00:06:25 +02:00
|
|
|
ydb = NULL;
|
2002-03-21 01:43:13 +01:00
|
|
|
|
1996-12-11 02:40:39 +01:00
|
|
|
clnt = clnttcp_create (&clnt_sin, YPPROG, YPVERS, &clnt_sock, 0, 0);
|
|
|
|
if (clnt == NULL)
|
1998-03-06 10:18:45 +01:00
|
|
|
{
|
|
|
|
__set_errno (saved_errno);
|
|
|
|
return YPERR_PMAP;
|
|
|
|
}
|
1996-12-15 03:15:29 +01:00
|
|
|
req.domain = (char *) indomain;
|
|
|
|
req.map = (char *) inmap;
|
1996-12-11 02:40:39 +01:00
|
|
|
|
2004-05-26 06:47:00 +02:00
|
|
|
data.foreach = incallback->foreach;
|
|
|
|
data.data = (void *) incallback->data;
|
1996-12-11 02:40:39 +01:00
|
|
|
|
Update.
1997-03-25 02:15 Ulrich Drepper <drepper@cygnus.com>
* gmon/gmon.c: Optimize a bit by using more sets of records to
write in a single writev call.
* math/math.h: Add definitions of macros __MATHCALLX and __MATHDECLX.
* math/mathcalls.h: Use __MATHCALLX for fabs, infnan, copysign,
nan, isnan, nextafter, trunc, __fpclassify and signbit to mark as
`const'.
Use __MATHDECLX for isinf and finite.
* sysdeps/generic/setenv.c [_LIBC]: Define __clearenv and make
clearenv a weak alias.
Implement complex exponential function.
* sysdeps/libm-ieee754/s_cexp.c: New file.
* sysdeps/libm-ieee754/s_cexpf.c: New file.
* sysdeps/libm-ieee754/s_cexpl.c: New file.
* sysdeps/libm-ieee754/s_nan.c: Define function as __nan and make
nan a weak alias.
* sysdeps/libm-ieee754/s_nanf.c: Likewise for nanf.
* sysdeps/libm-ieee754/s_nanl.c: Likewise for nanl.
* sysdeps/unix/sysv/linux/iovec.h: Don't use kernel header because
of type clashes. Add all definitions here.
* sysdeps/unix/sysv/linux/shmat.c: Likewise. Correct types according
to XPG4.2.
* sysdeps/unix/sysv/linux/shmdt.c: Likewise.
* sysdeps/unix/sysv/linux/msgrcv.c: Likewise.
* sysvipc/sys/shm.h (shmat, shmdt): Correct types.
* sysdeps/unix/sysv/linux/sys/kd.h: Define _LINUX_TYPES_H to avoid
use of kernel types.
1997-03-25 00:00 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/netinet/ip.h (struct ip_timestamp):
Correct typos. Reported by a sun <asun@zoology.washington.edu>.
1997-03-20 21:58 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/libm-ieee754/s_asinhl.c: Fix sign of result.
1997-03-20 16:20 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/libm-ieee754/e_atan2l.c: Fix typo.
1997-03-20 14:23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/fpu/__math.h (__logb, logb): Don't define.
* sysdeps/m68k/fpu/s_logb.c: Removed.
* sysdeps/m68k/fpu/s_logbf.c: Removed.
* sysdeps/m68k/fpu/s_logbl.c: Removed.
* sysdeps/m68k/fpu/__math.h (__ieee754_atan2, __ieee754_pow):
Don't define here.
* sysdeps/m68k/fpu/e_atan2.c: Rewritten.
* sysdeps/m68k/fpu/e_pow.c: Likewise.
* sysdeps/m68k/fpu/e_atan2f.c: Based on e_atan2.c.
* sysdeps/m68k/fpu/e_atan2l.c: Likewise.
* sysdeps/m68k/fpu/e_powf.c: Based on e_pow.c.
* sysdeps/m68k/fpu/e_powl.c: Likewise.
* sysdeps/m68k/fpu/s_log2.c: New file.
* sysdeps/m68k/fpu/s_log2f.c: New file.
* sysdeps/m68k/fpu/s_log2l.c: New file.
* sysdeps/m68k/fpu/s_exp2.c: New file.
* sysdeps/m68k/fpu/s_exp2f.c: New file.
* sysdeps/m68k/fpu/s_exp2l.c: New file.
1997-03-20 14:46 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Makeconfig (all): Make sure this is always the default goal.
1997-03-20 11:09 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* math/libm-test.c: Increase epsilon in many places. Fix many
typos. Allow optinal argument also for short option.
1997-03-20 11:09 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* math/Makefile ($(objpfx)$(tests)): Link against libm.
1997-03-24 23:14 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/libm-ieee754/s_fpclassifyl.c: Correct recognition of
denormalized numbers.
* sysdeps/i386/huge_val.h: Remove references to byte order macros.
Don't include <endian.h>.
1997-03-19 15:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/huge_val.h: Remove references to byte order macros.
Don't include <endian.h>.
1997-03-24 23:09 Ulrich Drepper <drepper@cygnus.com>
* inet/rcmd.c (iruserok): Use access instead of euidaccess.
1997-03-15 18:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* math/cmathcalls.h: Remove whitespace before function name in use
of __MATHDECL macro, to make it compilable with a traditional
preprocessor.
1997-03-24 15:31 Ulrich Drepper <drepper@cygnus.com>
* configure.in: Use AC_PROG_CC instead of AC_PROG_TOOL to find
compiler.
1997-03-24 02:34 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/libm-ieee754/s_finitel.c (__finitel): Shift return value
by 31 positions to get 0/1 result.
Patch by Joe Keane <jgk@jgk.org>.
1997-03-23 12:15 H.J. Lu <hjl@gnu.ai.mit.edu>
* posix/getopt.c (__getopt_nonoption_flags): Make it extern
to prevent from ld linking in getopt.o even if there is another
incompatible one.
* posix/getopt_init.c (__getopt_nonoption_flags): Remove extern.
1997-03-23 23:30 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
* nis/nis_call.c (__do_niscall): Print message if cold start file
does not exist.
* nis/nis_file.c: Don't print error messages.
* nis/nis_local_name.c (nis_local_host): Fix pointer errors.
* nis/rpcsvc/ypclnt.h: Fix copyright and prototypes.
* nis/rpcsvc/nis.h: Likewise.
* nis/ypclnt.c: Fix prototypes.
1997-03-24 01:36 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/libm-i387/e_scalb.S: Pop additional result before
returning.
* sysdeps/libm-i387/e_scalbf.S: Likewise.
* sysdeps/libm-i387/e_scalbl.S: Likewise.
Reported by Andreas Jaeger <aj@arthur.pfalz.de>.
* elf/rtld.c (dl_main): Set main_map->l_opencount to 1 also if
dynamic linker was called implicitly by the kernel.
Reported by Eric Youngdale <eric@andante.jic.com>.
* math/Makefile (CFLAGS-test-float.c, CFLAGS-test-double.c,
CFLAGS-test-longdouble.c): New variables. Set to -fno-inline to
prevent clever optimizations which corrupt the tests.
1997-03-23 21:33 Andreas Jaeger <aj@arthur.pfalz.de>
* math/libm-test.c (scalb_test): New function.
(sqrt_test): New function.
(scalbn_test): New function.
(ilogb_test): New function.
(main): Added calls for new test functions.
(ldexp_test): Add another test for ldexp(x,0).
1997-03-23 12:35 Andreas Jaeger <aj@arthur.pfalz.de>
* math/libm-test.c (remquo_test): Correct messages so that they
match the tests.
(copysign_test): Likewise.
1997-03-23 16:28 Ulrich Drepper <drepper@cygnus.com>
* stdio-common/Makefile (routines): Add printf_size.
* stdio-common/printf.h: Add declarations for printf_size and
printf_size_info.
* stdio-common/printf-parse.h (__printf_arginfo_table): Correct
declaration.
(parse_one_spec): Test whether __printf_function_table is not NULL
before using registered handlers and don't test
__printf_arginfo_table. Update nargs also when handler is
registered.
* stdio-common/vfprintf.c (vfprintf): Count number of specifiers
processed in fast loop.
* stdio-common/printf_size: New file.
1997-03-22 04:53 Ulgmon_out_readrich Drepper <drepper@cygnus.com>
1997-03-25 02:45:04 +01:00
|
|
|
result = clnt_call (clnt, YPPROC_ALL, (xdrproc_t) xdr_ypreq_nokey,
|
|
|
|
(caddr_t) &req, (xdrproc_t) __xdr_ypresp_all,
|
2004-05-26 06:47:00 +02:00
|
|
|
(caddr_t) &data, RPCTIMEOUT);
|
1996-12-11 02:40:39 +01:00
|
|
|
|
2005-11-26 23:16:03 +01:00
|
|
|
if (__builtin_expect (result != RPC_SUCCESS, 0))
|
1996-12-11 02:40:39 +01:00
|
|
|
{
|
2005-11-26 23:16:03 +01:00
|
|
|
/* Print the error message only on the last try. */
|
2001-04-04 02:01:02 +02:00
|
|
|
if (try == MAXTRIES - 1)
|
|
|
|
clnt_perror (clnt, "yp_all: clnt_call");
|
1998-02-26 12:20:59 +01:00
|
|
|
res = YPERR_RPC;
|
1996-12-11 02:40:39 +01:00
|
|
|
}
|
|
|
|
else
|
1998-02-26 12:20:59 +01:00
|
|
|
res = YPERR_SUCCESS;
|
|
|
|
|
|
|
|
clnt_destroy (clnt);
|
1996-12-11 02:40:39 +01:00
|
|
|
|
2004-05-26 06:47:00 +02:00
|
|
|
if (res == YPERR_SUCCESS && data.status != YP_NOMORE)
|
1998-03-06 10:18:45 +01:00
|
|
|
{
|
|
|
|
__set_errno (saved_errno);
|
2004-05-26 06:47:00 +02:00
|
|
|
return ypprot_err (data.status);
|
1998-03-06 10:18:45 +01:00
|
|
|
}
|
|
|
|
++try;
|
1996-12-11 02:40:39 +01:00
|
|
|
}
|
|
|
|
|
1998-03-06 10:18:45 +01:00
|
|
|
__set_errno (saved_errno);
|
|
|
|
|
1998-02-26 12:20:59 +01:00
|
|
|
return res;
|
1996-12-11 02:40:39 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
int
|
2005-11-26 23:16:03 +01:00
|
|
|
|
1996-12-11 02:40:39 +01:00
|
|
|
yp_maplist (const char *indomain, struct ypmaplist **outmaplist)
|
|
|
|
{
|
|
|
|
struct ypresp_maplist resp;
|
1998-02-26 12:20:59 +01:00
|
|
|
enum clnt_stat result;
|
1996-12-11 02:40:39 +01:00
|
|
|
|
|
|
|
if (indomain == NULL || indomain[0] == '\0')
|
|
|
|
return YPERR_BADARGS;
|
|
|
|
|
|
|
|
memset (&resp, '\0', sizeof (resp));
|
|
|
|
|
2005-11-26 23:16:03 +01:00
|
|
|
result = do_ypcall_tr (indomain, YPPROC_MAPLIST, (xdrproc_t) xdr_domainname,
|
|
|
|
(caddr_t) &indomain, (xdrproc_t) xdr_ypresp_maplist,
|
|
|
|
(caddr_t) &resp);
|
1996-12-11 02:40:39 +01:00
|
|
|
|
2005-11-26 23:16:03 +01:00
|
|
|
if (__builtin_expect (result == YPERR_SUCCESS, 1))
|
|
|
|
{
|
|
|
|
*outmaplist = resp.maps;
|
|
|
|
/* We don't free the list, this will be done by ypserv
|
|
|
|
xdr_free((xdrproc_t)xdr_ypresp_maplist, (char *)&resp); */
|
|
|
|
}
|
2004-12-22 21:10:10 +01:00
|
|
|
|
2005-11-26 23:16:03 +01:00
|
|
|
return result;
|
1996-12-11 02:40:39 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
const char *
|
|
|
|
yperr_string (const int error)
|
|
|
|
{
|
2005-11-26 23:16:03 +01:00
|
|
|
const char *str;
|
1996-12-11 02:40:39 +01:00
|
|
|
switch (error)
|
|
|
|
{
|
|
|
|
case YPERR_SUCCESS:
|
2006-02-22 11:03:04 +01:00
|
|
|
str = N_("Success");
|
2005-11-26 23:16:03 +01:00
|
|
|
break;
|
1996-12-11 02:40:39 +01:00
|
|
|
case YPERR_BADARGS:
|
2006-02-22 11:03:04 +01:00
|
|
|
str = N_("Request arguments bad");
|
2005-11-26 23:16:03 +01:00
|
|
|
break;
|
1996-12-11 02:40:39 +01:00
|
|
|
case YPERR_RPC:
|
2006-02-22 11:03:04 +01:00
|
|
|
str = N_("RPC failure on NIS operation");
|
2005-11-26 23:16:03 +01:00
|
|
|
break;
|
1996-12-11 02:40:39 +01:00
|
|
|
case YPERR_DOMAIN:
|
2006-02-22 11:03:04 +01:00
|
|
|
str = N_("Can't bind to server which serves this domain");
|
2005-11-26 23:16:03 +01:00
|
|
|
break;
|
1996-12-11 02:40:39 +01:00
|
|
|
case YPERR_MAP:
|
2006-02-22 11:03:04 +01:00
|
|
|
str = N_("No such map in server's domain");
|
2005-11-26 23:16:03 +01:00
|
|
|
break;
|
1996-12-11 02:40:39 +01:00
|
|
|
case YPERR_KEY:
|
2006-02-22 11:03:04 +01:00
|
|
|
str = N_("No such key in map");
|
2005-11-26 23:16:03 +01:00
|
|
|
break;
|
1996-12-11 02:40:39 +01:00
|
|
|
case YPERR_YPERR:
|
2006-02-22 11:03:04 +01:00
|
|
|
str = N_("Internal NIS error");
|
2005-11-26 23:16:03 +01:00
|
|
|
break;
|
1996-12-11 02:40:39 +01:00
|
|
|
case YPERR_RESRC:
|
2006-02-22 11:03:04 +01:00
|
|
|
str = N_("Local resource allocation failure");
|
2005-11-26 23:16:03 +01:00
|
|
|
break;
|
1996-12-11 02:40:39 +01:00
|
|
|
case YPERR_NOMORE:
|
2006-02-22 11:03:04 +01:00
|
|
|
str = N_("No more records in map database");
|
2005-11-26 23:16:03 +01:00
|
|
|
break;
|
1996-12-11 02:40:39 +01:00
|
|
|
case YPERR_PMAP:
|
2006-02-22 11:03:04 +01:00
|
|
|
str = N_("Can't communicate with portmapper");
|
2005-11-26 23:16:03 +01:00
|
|
|
break;
|
1996-12-11 02:40:39 +01:00
|
|
|
case YPERR_YPBIND:
|
2006-02-22 11:03:04 +01:00
|
|
|
str = N_("Can't communicate with ypbind");
|
2005-11-26 23:16:03 +01:00
|
|
|
break;
|
1996-12-11 02:40:39 +01:00
|
|
|
case YPERR_YPSERV:
|
2006-02-22 11:03:04 +01:00
|
|
|
str = N_("Can't communicate with ypserv");
|
2005-11-26 23:16:03 +01:00
|
|
|
break;
|
1996-12-11 02:40:39 +01:00
|
|
|
case YPERR_NODOM:
|
2006-02-22 11:03:04 +01:00
|
|
|
str = N_("Local domain name not set");
|
2005-11-26 23:16:03 +01:00
|
|
|
break;
|
1996-12-11 02:40:39 +01:00
|
|
|
case YPERR_BADDB:
|
2006-02-22 11:03:04 +01:00
|
|
|
str = N_("NIS map database is bad");
|
2005-11-26 23:16:03 +01:00
|
|
|
break;
|
1996-12-11 02:40:39 +01:00
|
|
|
case YPERR_VERS:
|
2006-02-22 11:03:04 +01:00
|
|
|
str = N_("NIS client/server version mismatch - can't supply service");
|
2005-11-26 23:16:03 +01:00
|
|
|
break;
|
1996-12-11 02:40:39 +01:00
|
|
|
case YPERR_ACCESS:
|
2006-02-22 11:03:04 +01:00
|
|
|
str = N_("Permission denied");
|
2005-11-26 23:16:03 +01:00
|
|
|
break;
|
1996-12-11 02:40:39 +01:00
|
|
|
case YPERR_BUSY:
|
2006-02-22 11:03:04 +01:00
|
|
|
str = N_("Database is busy");
|
2005-11-26 23:16:03 +01:00
|
|
|
break;
|
|
|
|
default:
|
2006-02-22 11:03:04 +01:00
|
|
|
str = N_("Unknown NIS error code");
|
2005-11-26 23:16:03 +01:00
|
|
|
break;
|
1996-12-11 02:40:39 +01:00
|
|
|
}
|
2005-11-26 23:16:03 +01:00
|
|
|
return _(str);
|
1996-12-11 02:40:39 +01:00
|
|
|
}
|
|
|
|
|
2004-10-24 22:29:20 +02:00
|
|
|
static const int8_t yp_2_yperr[] =
|
|
|
|
{
|
|
|
|
#define YP2YPERR(yp, yperr) [YP_##yp - YP_VERS] = YPERR_##yperr
|
2005-03-24 01:16:58 +01:00
|
|
|
YP2YPERR (TRUE, SUCCESS),
|
|
|
|
YP2YPERR (NOMORE, NOMORE),
|
|
|
|
YP2YPERR (FALSE, YPERR),
|
|
|
|
YP2YPERR (NOMAP, MAP),
|
|
|
|
YP2YPERR (NODOM, DOMAIN),
|
2004-10-24 22:29:20 +02:00
|
|
|
YP2YPERR (NOKEY, KEY),
|
|
|
|
YP2YPERR (BADOP, YPERR),
|
|
|
|
YP2YPERR (BADDB, BADDB),
|
|
|
|
YP2YPERR (YPERR, YPERR),
|
|
|
|
YP2YPERR (BADARGS, BADARGS),
|
|
|
|
YP2YPERR (VERS, VERS)
|
|
|
|
};
|
1996-12-11 02:40:39 +01:00
|
|
|
int
|
|
|
|
ypprot_err (const int code)
|
|
|
|
{
|
2005-03-24 01:16:58 +01:00
|
|
|
if (code < YP_VERS || code > YP_NOMORE)
|
2004-10-24 22:29:20 +02:00
|
|
|
return YPERR_YPERR;
|
2004-11-12 20:06:21 +01:00
|
|
|
return yp_2_yperr[code - YP_VERS];
|
1996-12-11 02:40:39 +01:00
|
|
|
}
|
2004-10-24 22:29:20 +02:00
|
|
|
libnsl_hidden_def (ypprot_err)
|
1996-12-11 02:40:39 +01:00
|
|
|
|
|
|
|
const char *
|
|
|
|
ypbinderr_string (const int error)
|
|
|
|
{
|
2005-11-26 23:16:03 +01:00
|
|
|
const char *str;
|
1996-12-11 02:40:39 +01:00
|
|
|
switch (error)
|
|
|
|
{
|
|
|
|
case 0:
|
2006-02-22 11:03:04 +01:00
|
|
|
str = N_("Success");
|
2005-11-26 23:16:03 +01:00
|
|
|
break;
|
1996-12-11 02:40:39 +01:00
|
|
|
case YPBIND_ERR_ERR:
|
2006-02-22 11:03:04 +01:00
|
|
|
str = N_("Internal ypbind error");
|
2005-11-26 23:16:03 +01:00
|
|
|
break;
|
1996-12-11 02:40:39 +01:00
|
|
|
case YPBIND_ERR_NOSERV:
|
2006-02-22 11:03:04 +01:00
|
|
|
str = N_("Domain not bound");
|
2005-11-26 23:16:03 +01:00
|
|
|
break;
|
1996-12-11 02:40:39 +01:00
|
|
|
case YPBIND_ERR_RESC:
|
2006-02-22 11:03:04 +01:00
|
|
|
str = N_("System resource allocation failure");
|
2005-11-26 23:16:03 +01:00
|
|
|
break;
|
1996-12-11 02:40:39 +01:00
|
|
|
default:
|
2006-02-22 11:03:04 +01:00
|
|
|
str = N_("Unknown ypbind error");
|
2005-11-26 23:16:03 +01:00
|
|
|
break;
|
1996-12-11 02:40:39 +01:00
|
|
|
}
|
2005-11-26 23:16:03 +01:00
|
|
|
return _(str);
|
1996-12-11 02:40:39 +01:00
|
|
|
}
|
2004-10-24 22:29:20 +02:00
|
|
|
libnsl_hidden_def (ypbinderr_string)
|
1996-12-11 02:40:39 +01:00
|
|
|
|
|
|
|
#define WINDOW 60
|
|
|
|
|
|
|
|
int
|
|
|
|
yp_update (char *domain, char *map, unsigned ypop,
|
|
|
|
char *key, int keylen, char *data, int datalen)
|
|
|
|
{
|
|
|
|
union
|
|
|
|
{
|
|
|
|
ypupdate_args update_args;
|
|
|
|
ypdelete_args delete_args;
|
|
|
|
}
|
|
|
|
args;
|
|
|
|
xdrproc_t xdr_argument;
|
|
|
|
unsigned res = 0;
|
|
|
|
CLIENT *clnt;
|
|
|
|
char *master;
|
|
|
|
struct sockaddr saddr;
|
|
|
|
char servername[MAXNETNAMELEN + 1];
|
|
|
|
int r;
|
|
|
|
|
|
|
|
if (!domain || !map || !key || (ypop != YPOP_DELETE && !data))
|
|
|
|
return YPERR_BADARGS;
|
|
|
|
|
|
|
|
args.update_args.mapname = map;
|
|
|
|
args.update_args.key.yp_buf_len = keylen;
|
|
|
|
args.update_args.key.yp_buf_val = key;
|
|
|
|
args.update_args.datum.yp_buf_len = datalen;
|
|
|
|
args.update_args.datum.yp_buf_val = data;
|
|
|
|
|
2006-04-07 06:29:25 +02:00
|
|
|
if ((r = yp_master (domain, map, &master)) != YPERR_SUCCESS)
|
1996-12-11 02:40:39 +01:00
|
|
|
return r;
|
|
|
|
|
|
|
|
if (!host2netname (servername, master, domain))
|
|
|
|
{
|
|
|
|
fputs (_("yp_update: cannot convert host to netname\n"), stderr);
|
2006-04-07 06:29:25 +02:00
|
|
|
free (master);
|
1996-12-11 02:40:39 +01:00
|
|
|
return YPERR_YPERR;
|
|
|
|
}
|
|
|
|
|
2006-04-07 06:29:25 +02:00
|
|
|
clnt = clnt_create (master, YPU_PROG, YPU_VERS, "tcp");
|
|
|
|
|
|
|
|
/* We do not need the string anymore. */
|
|
|
|
free (master);
|
|
|
|
|
|
|
|
if (clnt == NULL)
|
1996-12-11 02:40:39 +01:00
|
|
|
{
|
|
|
|
clnt_pcreateerror ("yp_update: clnt_create");
|
|
|
|
return YPERR_RPC;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!clnt_control (clnt, CLGET_SERVER_ADDR, (char *) &saddr))
|
|
|
|
{
|
|
|
|
fputs (_("yp_update: cannot get server address\n"), stderr);
|
|
|
|
return YPERR_RPC;
|
|
|
|
}
|
|
|
|
|
|
|
|
switch (ypop)
|
|
|
|
{
|
|
|
|
case YPOP_CHANGE:
|
|
|
|
case YPOP_INSERT:
|
|
|
|
case YPOP_STORE:
|
|
|
|
xdr_argument = (xdrproc_t) xdr_ypupdate_args;
|
|
|
|
break;
|
|
|
|
case YPOP_DELETE:
|
|
|
|
xdr_argument = (xdrproc_t) xdr_ypdelete_args;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
return YPERR_BADARGS;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
clnt->cl_auth = authdes_create (servername, WINDOW, &saddr, NULL);
|
|
|
|
|
|
|
|
if (clnt->cl_auth == NULL)
|
|
|
|
clnt->cl_auth = authunix_create_default ();
|
|
|
|
|
|
|
|
again:
|
1997-04-05 03:26:47 +02:00
|
|
|
r = clnt_call (clnt, ypop, xdr_argument, (caddr_t) &args,
|
Update.
1997-11-11 21:30 Ulrich Drepper <drepper@cygnus.com>
* include/sys/stat.h: Define stat, fstat, lstat and *64 variants
as macros so the the library compiles correctly even without
optimization.
* io/fstat.c: Undef fstat.
* io/fstat64.c: Undef fstat64
* io/lstat.c: Undef lstat.
* io/lstat64.c: Undef lstat64
* io/stat.c: Undef stat.
* io/stat64.c: Undef stat64
* io/fts.c: Include <include/sys/stat.h> to get macro definitions.
* io/ftw.c: Likewise.
* io/getdirname.c: Likewise.
* Makefile (install): Run test-installation.pl if possible.
* db2/Makefile: Update from db-2.3.12.
* db2/db.h: Likewise.
* db2/db_int.h: Likewise.
* db2/btree/bt_cursor.c: Likewise.
* db2/btree/bt_delete.c: Likewise.
* db2/btree/bt_open.c: Likewise.
* db2/btree/bt_put.c: Likewise.
* db2/btree/bt_rec.c: Likewise.
* db2/btree/bt_recno.c: Likewise.
* db2/btree/bt_search.c: Likewise.
* db2/btree/bt_split.c: Likewise.
* db2/btree/bt_stat.c: Likewise.
* db2/btree/btree.src: Likewise.
* db2/btree/btree_auto.c: Likewise.
* db2/btree/bt_cursor.c: Likewise.
* db2/btree/bt_delete.c: Likewise.
* db2/btree/bt_open.c: Likewise.
* db2/btree/bt_put.c: Likewise.
* db2/btree/bt_rec.c: Likewise.
* db2/btree/bt_recno.c: Likewise.
* db2/btree/bt_search.c: Likewise.
* db2/btree/bt_split.c: Likewise.
* db2/btree/bt_stat.c: Likewise.
* db2/btree/btree.src: Likewise.
* db2/btree/btree_auto.c: Likewise.
* db2/common/db_appinit.c: Likewise.
* db2/common/db_apprec.c: Likewise.
* db2/common/db_byteorder.c: Likewise.
* db2/common/db_region.c: Likewise.
* db2/db/db.c: Likewise
* db2/db/db.src: Likewise
* db2/db/db_auto.c: Likewise
* db2/db/db_dispatch.c: Likewise
* db2/db/db_dup.c: Likewise
* db2/db/db_overflow.c: Likewise
* db2/db/db_pr.c: Likewise
* db2/db/db_rec.c: Likewise
* db2/db/db_ret.c: Likewise
* db2/db/db_thread.c: Likewise
* db2/db185/db185.c: Likewise.
* db2/hash/hash.c: Likewise.
* db2/hash/hash.src: Likewise.
* db2/hash/hash_auto.c: Likewise.
* db2/hash/hash_dup.c: Likewise.
* db2/hash/hash_page.c: Likewise.
* db2/hash/hash_rec.c: Likewise.
* db2/include/btree_auto.h: Likewise.
* db2/include/btree_ext.h: Likewise.
* db2/include/clib_ext.h: Likewise.
* db2/include/common_ext.h: Likewise.
* db2/include/db.h.src: Likewise.
* db2/include/db_am.h: Likewise.
* db2/include/db_auto.h: Likewise.
* db2/include/db_cxx.h: Likewise.
* db2/include/db_ext.h: Likewise.
* db2/include/db_int.h.src: Likewise.
* db2/include/hash.h: Likewise.
* db2/include/hash_auto.h: Likewise.
* db2/include/hash_ext.h: Likewise.
* db2/include/lock.h: Likewise.
* db2/include/lock_ext.h: Likewise.
* db2/include/log.h: Likewise.
* db2/include/log_ext.h: Likewise.
* db2/include/mp.h: Likewise.
* db2/include/mp_ext.h: Likewise.
* db2/include/mutex_ext.h: Likewise.
* db2/include/os_ext.h: Likewise.
* db2/include/os_func.h: Likewise.
* db2/include/txn.h: Likewise.
* db2/include/txn_ext.h: Likewise.
* db2/lock/lock.c: Likewise.
* db2/lock/lock_deadlock.c: Likewise.
* db2/log/log.c: Likewise.
* db2/log/log_archive.c: Likewise.
* db2/log/log_auto.c: Likewise.
* db2/log/log_findckp.c: Likewise.
* db2/log/log_get.c: Likewise.
* db2/log/log_put.c: Likewise.
* db2/log/log_rec.c: Likewise.
* db2/log/log_register.c: Likewise.
* db2/mp/mp_bh.c: Likewise.
* db2/mp/mp_fget.c: Likewise.
* db2/mp/mp_fopen.c: Likewise.
* db2/mp/mp_fput.c: Likewise.
* db2/mp/mp_fset.c: Likewise.
* db2/mp/mp_open.c: Likewise.
* db2/mp/mp_pr.c: Likewise.
* db2/mp/mp_region.c: Likewise.
* db2/mp/mp_sync.c: Likewise.
* db2/mutex/mutex.c: Likewise.
* db2/os/os_abs.c: Likewise.
* db2/os/os_dir.c: Likewise.
* db2/os/os_fid.c: Likewise.
* db2/os/os_fsync.c: Likewise.
* db2/os/os_func.c: Likewise.
* db2/os/os_map.c: Likewise.
* db2/os/os_oflags.c: Likewise.
* db2/os/os_open.c: Likewise.
* db2/os/os_rpath.c: Likewise.
* db2/os/os_rw.c: Likewise.
* db2/os/os_seek.c: Likewise.
* db2/os/os_sleep.c: Likewise.
* db2/os/os_stat.c: Likewise.
* db2/os/os_unlink.c: Likewise.
* db2/progs/db_deadlock/db_deadlock.c: Likewise.
* db2/progs/db_dump/db_dump.c: Likewise.
* db2/progs/db_load/db_load.c: Likewise.
* db2/progs/db_recover/db_recover.c: Likewise.
* db2/progs/db_stat/db_stat.c: Likewise.
* db2/txn/txn.c: Likewise.
* db2/txn/txn_auto.c: Likewise.
* db2/txn/txn_rec.c: Likewise.
* db2/os/db_os_abs.c: Removed.
* db2/os/db_os_dir.c: Removed.
* db2/os/db_os_fid.c: Removed.
* db2/os/db_os_lseek.c: Removed.
* db2/os/db_os_mmap.c: Removed.
* db2/os/db_os_open.c: Removed.
* db2/os/db_os_rw.c: Removed.
* db2/os/db_os_sleep.c: Removed.
* db2/os/db_os_stat.c: Removed.
* db2/os/db_os_unlink.c: Removed.
* libio/stdio.h (fopen): Add __restrict to parameters.
* manual/process.texi (system): Describe behaviour for NULL argument.
* stdio-common/printf-parse.h: Parse hh modifier.
* stdio-common/vfprintf.c: Handle hh modifier.
* stdio-common/vfscanf.c: Likewise.
* manual/stdio.texi: Describe hh modifier for scanf/printf.
* math/complex.h: Don't define _Imaginary_I, but instead _Complex_I.
gcc does no yet know the `imaginary' keyword.
* math/test-math.c: Add little test for know gcc bug.
* math/tgmath.h: Make complex versions of log10() only available
if __USE_GNU.
* stdlib/test-canon.c: Fix typo.
* sysdeps/generic/setenv.c: Avoid compilation warnings.
Reported by Jim Meyering.
* sysdeps/generic/bits/errno.h: EILSEQ is an ISO C error number.
* sysdeps/mach/hurd/bits/errno.h: Likewise.
* sysdeps/standalone/bits/errno.h: Likewise.
* sysdeps/unix/sysv/linux/bits/errno.h: Likewise.
* sysdeps/i386/i586/memcpy.S: New file.
* sysdeps/i386/i586/mempcpy.S: New file.
* sysdeps/i386/i586/memset.S: Fix typo.
* sysdeps/posix/getcwd.c: Define HAVE_MEMPCPY for _LIBC. Add casts.
* sysdeps/posix/system.c: Add comment to explain code.
* sysdeps/wordsize-32/inttypes.h: Include <stddef.h> for wchar_t.
Define PTRDIFF_{MIN,MAX}, SIG_ATOMIC_{MIN,MAX}, SIZE_MAX,
WCHAR_{MIN,MAX}, WINT_{MIN,MAX}.
Define wcstoimax, wcstoumax.
* sysdeps/wordsize-64/inttypes.h: Likewise.
* wcsmbs/wchar.h: Define WCHAR_{MIN,MAX} if not already defined.
Declare __wcsto{l,ul,ll,ull}_internal only if not already done.
* time/Makefile (routines): Add strfxtime.
* time/strftime.c: Implement %F and %f format.
* time/strfxtime.c: New file.
* time/time.h: Define new types and symbols from ISO C 9X.
* time/mktime.c: Little comment correction.
1997-11-10 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* sysdeps/libm-ieee754/s_sincosl.c: Fix typo.
* sysdeps/libm-ieee754/s_tanl.c: Fix typo.
* sysdeps/libm-ieee754/s_floorl.c: Correct typos.
* sysdeps/libm-ieee754/e_remainderl.c: Replace
EXTRACT_LDOUBLE_WORDS by GET_LDOUBLE_WORDS.
* sysdeps/libm-ieee754/e_atan2l.c: Replace EXTRACT_LDOUBLE_WORDS
by GET_LDOUBLE_WORDS.
* sysdeps/libm-ieee754/s_scalbnl.c: Replace ";" by "," for correct
variable declaration.
* sysdeps/libm-ieee754/s_scalblnl.c: Likewise.
* sysdeps/libm-ieee754/s_lrint.c (__lrint): Correct function.
* math/libm-test.c (sqrt_test): Add test for sqrt (0.25).
(asin_test): Add more test.
1997-11-10 23:34 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/libm-ieee754/e_asin.c: Add braces to make code clearer
and to not confuse the poor compiler.
* sysdeps/libm-ieee754/e_asinf.c: Likewise.
Reported by vertex@cagent.com.
1997-11-09 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* elf/dl-lookup.c (do_lookup): Don't accept the base version if we
require a specific one.
* libio/oldfreopen.c: Bind old symbols to version GLIBC_2.0.
* libio/oldiofopen.c: Likewise.
* libio/oldstdfiles.c: Likewise.
* libc.map: Export them.
1997-11-10 07:40 H.J. Lu <hjl@gnu.ai.mit.edu>
* stdlib/exit.c (exit): Handle recursive calls to exit ().
1997-11-09 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/fpu/s_llrint.c: Fixed to take double argument
instead of long double.
* sysdeps/m68k/fpu/s_llrintf.c: New file.
* sysdeps/m68k/fpu/s_llrintl.c: New file.
* sysdeps/libm-ieee754/s_llrint.c: Make compilable and fix
overflow condition.
* sysdeps/libm-ieee754/s_llrintf.c: Fix overflow condition.
* sysdeps/libm-ieee754/s_llrintl.c: Likewise.
* sysdeps/libm-ieee754/s_llround.c: Likewise.
* sysdeps/libm-ieee754/s_llroundf.c: Likewise.
* sysdeps/libm-ieee754/s_llroundl.c: Likewise.
* sysdeps/libm-ieee754/s_lrint.c: Likewise.
* sysdeps/libm-ieee754/s_lrintf.c: Likewise.
* sysdeps/libm-ieee754/s_lrintl.c: Likewise.
* sysdeps/libm-ieee754/s_lround.c: Likewise.
* sysdeps/libm-ieee754/s_lroundf.c: Likewise.
* sysdeps/libm-ieee754/s_lroundl.c: Likewise.
* math/libm-test.c: Test all three variants of lrint and llrint.
Fix typos in lround and llround tests. Add tests for boundary
cases for lrint and llround.
1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* manual/arith.texi: Misc doc fixes.
* manual/ctype.texi: Likewise.
* manual/pattern.texi: Likewise.
* manual/terminal.texi: Likewise.
1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/xstatconv.c: Use struct assignment
instead of memcpy to let the compiler use whatever it regards as
optimal.
* sysdeps/unix/sysv/linux/alpha/xstatconv.c: Likewise.
1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/Makefile (sysdep_headers)
[$(subdir)=misc]: Add sys/prctl.h.
* sysdeps/unix/sysv/linux/Dist: Distribute it.
1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* io/ftwtest-sh: Don't use the unknown which command, instead try
pwd as /bin/pwd and /usr/bin/pwd.
1997-11-08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* manual/maint.texi (Tools for Installation): Don't recommend
broken version 3.76.1 of make.
(Porting): Fix wording.
1997-11-06 06:13 H.J. Lu <hjl@gnu.ai.mit.edu>
* config.make.in (build-pic-default): New, defined with
pic_default.
* configure.in (pic_default): New, set to yes if PIC is
default.
* Makeconfig (CPPFLAGS-.o, CPPFLAGS-.op, CPPFLAGS-.og,
CPPFLAGS-.ob): Add -DPIC if $(build-pic-default) is yes.
1997-11-09 18:15 Ulrich Drepper <drepper@cygnus.com>
* Makerules (libc.so): Fix typo.
* csu/Makefile (CFLAGS-initfini.s): Correctly fix moving function
definition. Patch by Zack Weinberg <zack@rabi.phys.columbia.edu>.
* stdlib/strtod.c: Handle numbers like 0.0e10000 correctly which
produce ±0.0. Reported by Joe Keane <jgk@jgk.org>.
* sysdeps/libm-ieee754/s_ceill.c: Fix typos.
* sysdeps/libm-ieee754/s_llrint.c: Correct code, it never worked.
1997-11-06 07:00 H.J. Lu <hjl@gnu.ai.mit.edu>
* sysdeps/unix/sysv/i386/i686/time.S: Removed.
1997-11-08 14:07 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
* nis/libnsl.map: Add __do_niscall2 for nis_cachemgr.
* nis/nis_call.c: Set UDP resend timeout correct.
* nis/nss_compat/compat-grp.c: Rewritten to make it faster.
* nis/nss_compat/compat-pwd.c: Likewise.
* nis/nss_compat/compat-spwd.c: Likewise.
* nis/ypclnt.c: Fix UDP resend timeout, fix yp_bind/do_ypcall
interaction.
* inet/protocols/routed.h: Include sys/socket.h.
* inet/protocols/talkd.h: Likewise.
* inet/protocols/timed.h: Include rpc/types.h.
* sunrpc/rpc/pmap_clnt.h: Include rpc/clnt.h.
1997-11-06 01:39 Ulrich Drepper <drepper@cygnus.com>
* Makerules (libc.so): Add missing closing brace.
1997-11-05 Brendan Kehoe <brendan@lisa.cygnus.com>
* libio.h (__P): Name its arg `p' instead of `params'.
This was added solely to work around problems with
the definition of __P in the Solaris math.h header.
1997-11-12 01:06:02 +01:00
|
|
|
(xdrproc_t) xdr_u_int, (caddr_t) &res, RPCTIMEOUT);
|
1996-12-11 02:40:39 +01:00
|
|
|
|
|
|
|
if (r == RPC_AUTHERROR)
|
|
|
|
{
|
|
|
|
if (clnt->cl_auth->ah_cred.oa_flavor == AUTH_DES)
|
|
|
|
{
|
2005-12-08 16:42:25 +01:00
|
|
|
auth_destroy (clnt->cl_auth);
|
1996-12-11 02:40:39 +01:00
|
|
|
clnt->cl_auth = authunix_create_default ();
|
|
|
|
goto again;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
return YPERR_ACCESS;
|
|
|
|
}
|
|
|
|
if (r != RPC_SUCCESS)
|
|
|
|
{
|
|
|
|
clnt_perror (clnt, "yp_update: clnt_call");
|
|
|
|
return YPERR_RPC;
|
|
|
|
}
|
|
|
|
return res;
|
|
|
|
}
|