diff options
Diffstat (limited to 'misc')
148 files changed, 460 insertions, 284 deletions
diff --git a/misc/Makefile b/misc/Makefile index b039182fa0..aecb0dae9d 100644 --- a/misc/Makefile +++ b/misc/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 1991-2014 Free Software Foundation, Inc. +# Copyright (C) 1991-2015 Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or @@ -21,6 +21,8 @@ subdir := misc +include ../Makeconfig + headers := sys/uio.h bits/uio.h sys/ioctl.h bits/ioctls.h bits/ioctl-types.h \ sys/ptrace.h sys/file.h sys/dir.h sys/cdefs.h \ ar.h a.out.h libgen.h stab.h bits/stab.def sgtty.h \ @@ -67,9 +69,7 @@ routines := brk sbrk sstk ioctl \ listxattr lgetxattr llistxattr lremovexattr lsetxattr \ removexattr setxattr getauxval ifunc-impl-list -generated := tst-error1.mtrace tst-error1-mem - -include ../Makeconfig +generated += tst-error1.mtrace tst-error1-mem.out aux := init-misc install-lib := libg.a @@ -78,7 +78,7 @@ gpl2lgpl := error.c error.h tests := tst-dirname tst-tsearch tst-fdset tst-efgcvt tst-mntent tst-hsearch \ tst-error1 tst-pselect tst-insremque tst-mntent2 bug-hsearch1 ifeq ($(run-built-tests),yes) -tests: $(objpfx)tst-error1-mem +tests-special += $(objpfx)tst-error1-mem.out endif CFLAGS-select.c = -fexceptions -fasynchronous-unwind-tables @@ -102,13 +102,10 @@ include ../Rules $(objpfx)libg.a: $(dep-dummy-lib); $(make-dummy-lib) -ifeq ($(build-shared),yes) -$(objpfx)tst-tsearch: $(common-objpfx)math/libm.so$(libm.so-version) -else -$(objpfx)tst-tsearch: $(common-objpfx)math/libm.a -endif +$(objpfx)tst-tsearch: $(libm) tst-error1-ENV = MALLOC_TRACE=$(objpfx)tst-error1.mtrace tst-error1-ARGS = $(objpfx)tst-error1.out -$(objpfx)tst-error1-mem: $(objpfx)tst-error1.out - $(common-objpfx)malloc/mtrace $(objpfx)tst-error1.mtrace > $@ +$(objpfx)tst-error1-mem.out: $(objpfx)tst-error1.out + $(common-objpfx)malloc/mtrace $(objpfx)tst-error1.mtrace > $@; \ + $(evaluate-test) diff --git a/misc/Versions b/misc/Versions index ec5aea7b52..534d1a3fca 100644 --- a/misc/Versions +++ b/misc/Versions @@ -153,5 +153,6 @@ libc { __madvise; __mktemp; __libc_ifunc_impl_list; + __tdelete; __tfind; __tsearch; __twalk; } } diff --git a/misc/acct.c b/misc/acct.c index e24fdf1f13..c5569e5afa 100644 --- a/misc/acct.c +++ b/misc/acct.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2014 Free Software Foundation, Inc. +/* Copyright (C) 1991-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -1,5 +1,5 @@ /* Header describing `ar' archive file format. - Copyright (C) 1996-2014 Free Software Foundation, Inc. + Copyright (C) 1996-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/bits/error.h b/misc/bits/error.h index 5408450ab0..d903bcdbb4 100644 --- a/misc/bits/error.h +++ b/misc/bits/error.h @@ -1,5 +1,5 @@ /* Specializations for error functions. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/bits/select2.h b/misc/bits/select2.h index 8906ba1f03..9b37e3bdb3 100644 --- a/misc/bits/select2.h +++ b/misc/bits/select2.h @@ -1,5 +1,5 @@ /* Checking macros for select functions. - Copyright (C) 2011-2014 Free Software Foundation, Inc. + Copyright (C) 2011-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/bits/stab.def b/misc/bits/stab.def index 7e68c0d143..68df2db56e 100644 --- a/misc/bits/stab.def +++ b/misc/bits/stab.def @@ -1,5 +1,5 @@ /* Table of DBX symbol codes for the GNU system. - Copyright (C) 1988, 1997-2014 Free Software Foundation, Inc. + Copyright (C) 1988, 1997-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/bits/syslog-ldbl.h b/misc/bits/syslog-ldbl.h index 989978d94d..7e5362d44a 100644 --- a/misc/bits/syslog-ldbl.h +++ b/misc/bits/syslog-ldbl.h @@ -1,5 +1,5 @@ /* -mlong-double-64 compatibility mode for syslog functions. - Copyright (C) 2006-2014 Free Software Foundation, Inc. + Copyright (C) 2006-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -22,14 +22,14 @@ __LDBL_REDIR_DECL (syslog) -#ifdef __USE_BSD +#ifdef __USE_MISC __LDBL_REDIR_DECL (vsyslog) #endif #if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function __LDBL_REDIR_DECL (__syslog_chk) -# ifdef __USE_BSD +# ifdef __USE_MISC __LDBL_REDIR_DECL (__vsyslog_chk) # endif #endif diff --git a/misc/bits/syslog.h b/misc/bits/syslog.h index a5c693a134..7a84be4eac 100644 --- a/misc/bits/syslog.h +++ b/misc/bits/syslog.h @@ -1,5 +1,5 @@ /* Checking macros for syslog functions. - Copyright (C) 2005-2014 Free Software Foundation, Inc. + Copyright (C) 2005-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ syslog (int __pri, const char *__fmt, ...) #endif -#ifdef __USE_BSD +#ifdef __USE_MISC extern void __vsyslog_chk (int __pri, int __flag, const char *__fmt, __gnuc_va_list __ap) __attribute__ ((__format__ (__printf__, 3, 0))); diff --git a/misc/brk.c b/misc/brk.c index cb2ca124a6..28c4203399 100644 --- a/misc/brk.c +++ b/misc/brk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2014 Free Software Foundation, Inc. +/* Copyright (C) 1991-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/chflags.c b/misc/chflags.c index 011ca69e3f..241be86be7 100644 --- a/misc/chflags.c +++ b/misc/chflags.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2014 Free Software Foundation, Inc. +/* Copyright (C) 1991-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -21,12 +21,12 @@ /* Change the flags of FILE to FLAGS. */ -int chflags (const char *file, int flags) __THROW; +int chflags (const char *file, unsigned long int flags) __THROW; int chflags (file, flags) const char *file; - int flags; + unsigned long int flags; { if (file == NULL) { diff --git a/misc/chroot.c b/misc/chroot.c index 5737d582a4..232a29f363 100644 --- a/misc/chroot.c +++ b/misc/chroot.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2014 Free Software Foundation, Inc. +/* Copyright (C) 1991-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/dirname.c b/misc/dirname.c index d95e200cd9..0ddae88865 100644 --- a/misc/dirname.c +++ b/misc/dirname.c @@ -1,5 +1,5 @@ /* dirname - return directory part of PATH. - Copyright (C) 1996-2014 Free Software Foundation, Inc. + Copyright (C) 1996-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. diff --git a/misc/efgcvt.c b/misc/efgcvt.c index a0be534f2c..7c7939192b 100644 --- a/misc/efgcvt.c +++ b/misc/efgcvt.c @@ -1,5 +1,5 @@ /* Compatibility functions for floating point formatting. - Copyright (C) 1995-2014 Free Software Foundation, Inc. + Copyright (C) 1995-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/efgcvt_r.c b/misc/efgcvt_r.c index cd6f4e7628..2761222d87 100644 --- a/misc/efgcvt_r.c +++ b/misc/efgcvt_r.c @@ -1,5 +1,5 @@ /* Compatibility functions for floating point formatting, reentrant versions. - Copyright (C) 1995-2014 Free Software Foundation, Inc. + Copyright (C) 1995-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -251,13 +251,13 @@ __APPEND (FUNC_PREFIX, ecvt_r) (value, ndigit, decpt, sign, buf, len) # define cvt_symbol(symbol) \ cvt_symbol_1 (libc, __APPEND (FUNC_PREFIX, symbol), \ APPEND (q, symbol), GLIBC_2_0); \ - strong_alias (__APPEND (FUNC_PREFIX, symbol), APPEND (FUNC_PREFIX, symbol)) + weak_alias (__APPEND (FUNC_PREFIX, symbol), APPEND (FUNC_PREFIX, symbol)) # define cvt_symbol_1(lib, local, symbol, version) \ compat_symbol (lib, local, symbol, version) # endif #else # define cvt_symbol(symbol) \ - strong_alias (__APPEND (FUNC_PREFIX, symbol), APPEND (FUNC_PREFIX, symbol)) + weak_alias (__APPEND (FUNC_PREFIX, symbol), APPEND (FUNC_PREFIX, symbol)) #endif cvt_symbol(fcvt_r); cvt_symbol(ecvt_r); diff --git a/misc/err.c b/misc/err.c index 44fa28dcef..7b98157d59 100644 --- a/misc/err.c +++ b/misc/err.c @@ -1,5 +1,5 @@ /* 4.4BSD utility functions for error messages. - Copyright (C) 1995-2014 Free Software Foundation, Inc. + Copyright (C) 1995-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/err.h b/misc/err.h index fabd836560..99e1cdd88e 100644 --- a/misc/err.h +++ b/misc/err.h @@ -1,5 +1,5 @@ /* 4.4BSD utility functions for error messages. - Copyright (C) 1995-2014 Free Software Foundation, Inc. + Copyright (C) 1995-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/error.c b/misc/error.c index dfaa240857..aaa120d5ab 100644 --- a/misc/error.c +++ b/misc/error.c @@ -1,5 +1,5 @@ /* Error handler for noninteractive utilities - Copyright (C) 1990-2014 Free Software Foundation, Inc. + Copyright (C) 1990-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,24 +18,36 @@ /* Written by David MacKenzie <djm@gnu.ai.mit.edu>. */ -#ifdef HAVE_CONFIG_H +#if !_LIBC # include <config.h> #endif +#include "error.h" + #include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> +#if !_LIBC && ENABLE_NLS +# include "gettext.h" +# define _(msgid) gettext (msgid) +#endif + #ifdef _LIBC # include <libintl.h> # include <stdbool.h> # include <stdint.h> # include <wchar.h> # define mbsrtowcs __mbsrtowcs +# define USE_UNLOCKED_IO 0 +# define _GL_ATTRIBUTE_FORMAT_PRINTF(a, b) +# define _GL_ARG_NONNULL(a) #endif -#include "error.h" +#if USE_UNLOCKED_IO +# include "unlocked-io.h" +#endif #ifndef _ # define _(String) String @@ -46,7 +58,7 @@ function without parameters instead. */ void (*error_print_progname) (void); -/* This variable is incremented each time `error' is called. */ +/* This variable is incremented each time 'error' is called. */ unsigned int error_message_count; #ifdef _LIBC @@ -57,7 +69,7 @@ unsigned int error_message_count; # include <limits.h> # include <libio/libioP.h> -/* In GNU libc we want do not want to use the common name `error' directly. +/* In GNU libc we want do not want to use the common name 'error' directly. Instead make it a weak alias. */ extern void __error (int status, int errnum, const char *message, ...) __attribute__ ((__format__ (__printf__, 3, 4))); @@ -77,11 +89,29 @@ extern void __error_at_line (int status, int errnum, const char *file_name, #else /* not _LIBC */ -# if !HAVE_DECL_STRERROR_R && STRERROR_R_CHAR_P +# include <fcntl.h> +# include <unistd.h> + +# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +/* Get declarations of the native Windows API functions. */ +# define WIN32_LEAN_AND_MEAN +# include <windows.h> +/* Get _get_osfhandle. */ +# include "msvc-nothrow.h" +# endif + +/* The gnulib override of fcntl is not needed in this file. */ +# undef fcntl + +# if !HAVE_DECL_STRERROR_R # ifndef HAVE_DECL_STRERROR_R "this configure-time declaration test was not run" # endif +# if STRERROR_R_CHAR_P char *strerror_r (); +# else +int strerror_r (); +# endif # endif /* The calling program should define program_name and set it to the @@ -93,6 +123,51 @@ extern char *program_name; # endif /* HAVE_STRERROR_R || defined strerror_r */ #endif /* not _LIBC */ +#if !_LIBC +/* Return non-zero if FD is open. */ +static int +is_open (int fd) +{ +# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ + /* On native Windows: The initial state of unassigned standard file + descriptors is that they are open but point to an INVALID_HANDLE_VALUE. + There is no fcntl, and the gnulib replacement fcntl does not support + F_GETFL. */ + return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE; +# else +# ifndef F_GETFL +# error Please port fcntl to your platform +# endif + return 0 <= fcntl (fd, F_GETFL); +# endif +} +#endif + +static void +flush_stdout (void) +{ +#if !_LIBC + int stdout_fd; + +# if GNULIB_FREOPEN_SAFER + /* Use of gnulib's freopen-safer module normally ensures that + fileno (stdout) == 1 + whenever stdout is open. */ + stdout_fd = STDOUT_FILENO; +# else + /* POSIX states that fileno (stdout) after fclose is unspecified. But in + practice it is not a problem, because stdout is statically allocated and + the fd of a FILE stream is stored as a field in its allocated memory. */ + stdout_fd = fileno (stdout); +# endif + /* POSIX states that fflush (stdout) after fclose is unspecified; it + is safe in glibc, but not on all other platforms. fflush (NULL) + is always defined, but too draconian. */ + if (0 <= stdout_fd && is_open (stdout_fd)) +#endif + fflush (stdout); +} + static void print_errno_message (int errnum) { @@ -100,7 +175,7 @@ print_errno_message (int errnum) #if defined HAVE_STRERROR_R || _LIBC char errbuf[1024]; -# if STRERROR_R_CHAR_P || _LIBC +# if _LIBC || STRERROR_R_CHAR_P s = __strerror_r (errnum, errbuf, sizeof errbuf); # else if (__strerror_r (errnum, errbuf, sizeof errbuf) == 0) @@ -124,7 +199,7 @@ print_errno_message (int errnum) #endif } -static void +static void _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) _GL_ARG_NONNULL ((3)) error_tail (int status, int errnum, const char *message, va_list args) { #if _LIBC @@ -227,7 +302,7 @@ error (int status, int errnum, const char *message, ...) 0); #endif - fflush (stdout); + flush_stdout (); #ifdef _LIBC _IO_flockfile (stderr); #endif @@ -273,6 +348,7 @@ error_at_line (int status, int errnum, const char *file_name, || (old_file_name != NULL && file_name != NULL && strcmp (old_file_name, file_name) == 0))) + /* Simply return and print nothing. */ return; @@ -288,7 +364,7 @@ error_at_line (int status, int errnum, const char *file_name, 0); #endif - fflush (stdout); + flush_stdout (); #ifdef _LIBC _IO_flockfile (stderr); #endif diff --git a/misc/error.h b/misc/error.h index a3c7ef0c45..7356677c09 100644 --- a/misc/error.h +++ b/misc/error.h @@ -1,5 +1,5 @@ /* Declaration for error-reporting function - Copyright (C) 1995-2014 Free Software Foundation, Inc. + Copyright (C) 1995-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/fchflags.c b/misc/fchflags.c index c08ff51713..b9f267583b 100644 --- a/misc/fchflags.c +++ b/misc/fchflags.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2014 Free Software Foundation, Inc. +/* Copyright (C) 1991-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -21,12 +21,12 @@ /* Change the flags of the file referenced by FD to FLAGS. */ -int fchflags (int fd, int flags) __THROW; +int fchflags (int fd, unsigned long int flags) __THROW; int fchflags (fd, flags) int fd; - int flags; + unsigned long int flags; { if (fd < 0) { diff --git a/misc/fdatasync.c b/misc/fdatasync.c index d98981e009..60ebee1db3 100644 --- a/misc/fdatasync.c +++ b/misc/fdatasync.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2014 Free Software Foundation, Inc. +/* Copyright (C) 1996-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/fgetxattr.c b/misc/fgetxattr.c index 1f42ff6a9e..360a990156 100644 --- a/misc/fgetxattr.c +++ b/misc/fgetxattr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2014 Free Software Foundation, Inc. +/* Copyright (C) 2002-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/flistxattr.c b/misc/flistxattr.c index 37104fc8ef..69562be0ed 100644 --- a/misc/flistxattr.c +++ b/misc/flistxattr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2014 Free Software Foundation, Inc. +/* Copyright (C) 2002-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/fremovexattr.c b/misc/fremovexattr.c index 316c37acd8..7692319c0f 100644 --- a/misc/fremovexattr.c +++ b/misc/fremovexattr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2014 Free Software Foundation, Inc. +/* Copyright (C) 2002-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/fsetxattr.c b/misc/fsetxattr.c index 8ca13599b3..500fe47d12 100644 --- a/misc/fsetxattr.c +++ b/misc/fsetxattr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2014 Free Software Foundation, Inc. +/* Copyright (C) 2002-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/fstab.c b/misc/fstab.c index 6cb33be046..2d2e93216e 100644 --- a/misc/fstab.c +++ b/misc/fstab.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2014 Free Software Foundation, Inc. +/* Copyright (C) 1995-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/fsync.c b/misc/fsync.c index 47fc53f2b8..05f3acfc0a 100644 --- a/misc/fsync.c +++ b/misc/fsync.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2014 Free Software Foundation, Inc. +/* Copyright (C) 1991-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/ftruncate.c b/misc/ftruncate.c index ba3dd24818..2d43c76a37 100644 --- a/misc/ftruncate.c +++ b/misc/ftruncate.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2014 Free Software Foundation, Inc. +/* Copyright (C) 1991-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/ftruncate64.c b/misc/ftruncate64.c index 8377576803..1c41fea5a5 100644 --- a/misc/ftruncate64.c +++ b/misc/ftruncate64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2014 Free Software Foundation, Inc. +/* Copyright (C) 1997-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/futimes.c b/misc/futimes.c index 8cc100923e..9459c3a8fb 100644 --- a/misc/futimes.c +++ b/misc/futimes.c @@ -1,5 +1,5 @@ /* futimes -- change access and modification times of open file. Stub version. - Copyright (C) 2002-2014 Free Software Foundation, Inc. + Copyright (C) 2002-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/futimesat.c b/misc/futimesat.c index e9042c8f0d..c675aa5ef1 100644 --- a/misc/futimesat.c +++ b/misc/futimesat.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2014 Free Software Foundation, Inc. +/* Copyright (C) 2005-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/getauxval.c b/misc/getauxval.c index 80881afc38..be41149936 100644 --- a/misc/getauxval.c +++ b/misc/getauxval.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2012-2014 Free Software Foundation, Inc. +/* Copyright (C) 2012-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/getclktck.c b/misc/getclktck.c index 9098c84472..e16c120b03 100644 --- a/misc/getclktck.c +++ b/misc/getclktck.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2014 Free Software Foundation, Inc. +/* Copyright (C) 2000-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/getdomain.c b/misc/getdomain.c index e3c786277c..c5ab3a5e5e 100644 --- a/misc/getdomain.c +++ b/misc/getdomain.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994-2014 Free Software Foundation, Inc. +/* Copyright (C) 1994-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/getdtsz.c b/misc/getdtsz.c index 3a4a64e422..182bb9e1e5 100644 --- a/misc/getdtsz.c +++ b/misc/getdtsz.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2014 Free Software Foundation, Inc. +/* Copyright (C) 1991-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/gethostid.c b/misc/gethostid.c index 2232b5af25..30b38f8ef0 100644 --- a/misc/gethostid.c +++ b/misc/gethostid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2014 Free Software Foundation, Inc. +/* Copyright (C) 1991-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/gethostname.c b/misc/gethostname.c index 021aad09a5..15097a80ce 100644 --- a/misc/gethostname.c +++ b/misc/gethostname.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2014 Free Software Foundation, Inc. +/* Copyright (C) 1991-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/getloadavg.c b/misc/getloadavg.c index ef89589566..5fad0e4cbf 100644 --- a/misc/getloadavg.c +++ b/misc/getloadavg.c @@ -1,5 +1,5 @@ /* Get system load averages. Stub version. - Copyright (C) 1999-2014 Free Software Foundation, Inc. + Copyright (C) 1999-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/getpagesize.c b/misc/getpagesize.c index 4a5ba5a4d6..93e86194ef 100644 --- a/misc/getpagesize.c +++ b/misc/getpagesize.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2014 Free Software Foundation, Inc. +/* Copyright (C) 1991-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/getpass.c b/misc/getpass.c index 575959354e..dcaff3855c 100644 --- a/misc/getpass.c +++ b/misc/getpass.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992-2014 Free Software Foundation, Inc. +/* Copyright (C) 1992-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -91,7 +91,7 @@ getpass (prompt) /* Write the prompt. */ __fxprintf (out, "%s", prompt); - fflush_unlocked (out); + __fflush_unlocked (out); /* Read the password. */ nread = __getline (&buf, &bufsize, in); diff --git a/misc/getsysstats.c b/misc/getsysstats.c index 4a44b0dcbf..d2dc86971c 100644 --- a/misc/getsysstats.c +++ b/misc/getsysstats.c @@ -1,5 +1,5 @@ /* getsysstats - Determine various system internal values, stub version. - Copyright (C) 1996-2014 Free Software Foundation, Inc. + Copyright (C) 1996-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. diff --git a/misc/getttyent.c b/misc/getttyent.c index 864f65f523..fcdbc2274c 100644 --- a/misc/getttyent.c +++ b/misc/getttyent.c @@ -44,24 +44,24 @@ static char zapchar; static FILE *tf; struct ttyent * -getttynam(tty) - const char *tty; +__getttynam (const char *tty) { struct ttyent *t; - setttyent(); - while ((t = getttyent())) + __setttyent(); + while ((t = __getttyent())) if (!strcmp(tty, t->ty_name)) break; - endttyent(); + __endttyent(); return (t); } +weak_alias (__getttynam, getttynam) static char *skip (char *) __THROW internal_function; static char *value (char *) __THROW internal_function; struct ttyent * -getttyent (void) +__getttyent (void) { static struct ttyent tty; int c; @@ -69,11 +69,11 @@ getttyent (void) #define MAXLINELENGTH 100 static char line[MAXLINELENGTH]; - if (!tf && !setttyent()) + if (!tf && !__setttyent()) return (NULL); flockfile (tf); for (;;) { - if (!fgets_unlocked(p = line, sizeof(line), tf)) { + if (!__fgets_unlocked(p = line, sizeof(line), tf)) { funlockfile (tf); return (NULL); } @@ -131,7 +131,8 @@ getttyent (void) *p = '\0'; return (&tty); } -libc_hidden_def (getttyent) +libc_hidden_def (__getttyent) +weak_alias (__getttyent, getttyent) #define QUOTED 1 @@ -184,7 +185,7 @@ value(p) } int -setttyent (void) +__setttyent (void) { if (tf) { @@ -197,10 +198,11 @@ setttyent (void) } return (0); } -libc_hidden_def (setttyent) +libc_hidden_def (__setttyent) +weak_alias (__setttyent, setttyent) int -endttyent (void) +__endttyent (void) { int rval; @@ -211,4 +213,5 @@ endttyent (void) } return (1); } -libc_hidden_def (endttyent) +libc_hidden_def (__endttyent) +weak_alias (__endttyent, endttyent) diff --git a/misc/getxattr.c b/misc/getxattr.c index cc374916cc..d90b192bd3 100644 --- a/misc/getxattr.c +++ b/misc/getxattr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2014 Free Software Foundation, Inc. +/* Copyright (C) 2002-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/gtty.c b/misc/gtty.c index ac674d2401..9a64a9a0dc 100644 --- a/misc/gtty.c +++ b/misc/gtty.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2014 Free Software Foundation, Inc. +/* Copyright (C) 1991-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/hsearch.c b/misc/hsearch.c index 4f3d12e58c..7a0b0dc406 100644 --- a/misc/hsearch.c +++ b/misc/hsearch.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993-2014 Free Software Foundation, Inc. +/* Copyright (C) 1993-2015 Free Software Foundation, Inc. Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu> This file is part of the GNU C Library. @@ -30,7 +30,7 @@ hsearch (item, action) { ENTRY *result; - (void) hsearch_r (item, action, &result, &htab); + (void) __hsearch_r (item, action, &result, &htab); return result; } @@ -40,14 +40,14 @@ int hcreate (nel) size_t nel; { - return hcreate_r (nel, &htab); + return __hcreate_r (nel, &htab); } void __hdestroy (void) { - hdestroy_r (&htab); + __hdestroy_r (&htab); } weak_alias (__hdestroy, hdestroy) diff --git a/misc/hsearch_r.c b/misc/hsearch_r.c index 81c27d800c..9f55e845cf 100644 --- a/misc/hsearch_r.c +++ b/misc/hsearch_r.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993-2014 Free Software Foundation, Inc. +/* Copyright (C) 1993-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1993. @@ -62,7 +62,7 @@ isprime (unsigned int number) The contents of the table is zeroed, especially the field used becomes zero. */ int -hcreate_r (nel, htab) +__hcreate_r (nel, htab) size_t nel; struct hsearch_data *htab; { @@ -97,13 +97,14 @@ hcreate_r (nel, htab) /* everything went alright */ return 1; } -libc_hidden_def (hcreate_r) +libc_hidden_def (__hcreate_r) +weak_alias (__hcreate_r, hcreate_r) /* After using the hash table it has to be destroyed. The used memory can be freed and the local static variable can be marked as not used. */ void -hdestroy_r (htab) +__hdestroy_r (htab) struct hsearch_data *htab; { /* Test for correct arguments. */ @@ -119,7 +120,8 @@ hdestroy_r (htab) /* the sign for an existing table is an value != NULL in htable */ htab->table = NULL; } -libc_hidden_def (hdestroy_r) +libc_hidden_def (__hdestroy_r) +weak_alias (__hdestroy_r, hdestroy_r) /* This is the search function. It uses double hashing with open addressing. @@ -136,7 +138,7 @@ libc_hidden_def (hdestroy_r) equality of the stored and the parameter value. This helps to prevent unnecessary expensive calls of strcmp. */ int -hsearch_r (item, action, retval, htab) +__hsearch_r (item, action, retval, htab) ENTRY item; ACTION action; ENTRY **retval; @@ -224,4 +226,5 @@ hsearch_r (item, action, retval, htab) *retval = NULL; return 0; } -libc_hidden_def (hsearch_r) +libc_hidden_def (__hsearch_r) +weak_alias (__hsearch_r, hsearch_r) diff --git a/misc/ifunc-impl-list.c b/misc/ifunc-impl-list.c index 97b58add16..446c74f736 100644 --- a/misc/ifunc-impl-list.c +++ b/misc/ifunc-impl-list.c @@ -1,5 +1,5 @@ /* Enumerate available IFUNC implementations of a function. Stub version. - Copyright (C) 2012-2014 Free Software Foundation, Inc. + Copyright (C) 2012-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/init-misc.c b/misc/init-misc.c index b6cfa91bdf..9254f02903 100644 --- a/misc/init-misc.c +++ b/misc/init-misc.c @@ -1,5 +1,5 @@ /* Define and initialize `__progname' et. al. - Copyright (C) 1994-2014 Free Software Foundation, Inc. + Copyright (C) 1994-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/insremque.c b/misc/insremque.c index 6a4724d3d7..3c56f514b6 100644 --- a/misc/insremque.c +++ b/misc/insremque.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992-2014 Free Software Foundation, Inc. +/* Copyright (C) 1992-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/ioctl.c b/misc/ioctl.c index ccc482e1a4..f75f3e41b2 100644 --- a/misc/ioctl.c +++ b/misc/ioctl.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2014 Free Software Foundation, Inc. +/* Copyright (C) 1991-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/lgetxattr.c b/misc/lgetxattr.c index 947849d677..f6e9a514d1 100644 --- a/misc/lgetxattr.c +++ b/misc/lgetxattr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2014 Free Software Foundation, Inc. +/* Copyright (C) 2002-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/libgen.h b/misc/libgen.h index 19aeecefa0..964a72f1b4 100644 --- a/misc/libgen.h +++ b/misc/libgen.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2014 Free Software Foundation, Inc. +/* Copyright (C) 1996-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/listxattr.c b/misc/listxattr.c index 11004825ed..a09565edbc 100644 --- a/misc/listxattr.c +++ b/misc/listxattr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2014 Free Software Foundation, Inc. +/* Copyright (C) 2002-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/llistxattr.c b/misc/llistxattr.c index 37a36ef98e..e9820760d1 100644 --- a/misc/llistxattr.c +++ b/misc/llistxattr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2014 Free Software Foundation, Inc. +/* Copyright (C) 2002-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/lremovexattr.c b/misc/lremovexattr.c index f2ff7cf8c0..85532817e1 100644 --- a/misc/lremovexattr.c +++ b/misc/lremovexattr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2014 Free Software Foundation, Inc. +/* Copyright (C) 2002-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/lsearch.c b/misc/lsearch.c index 8674b32261..08ade2b69f 100644 --- a/misc/lsearch.c +++ b/misc/lsearch.c @@ -1,5 +1,5 @@ /* Linear search functions. - Copyright (C) 1996-2014 Free Software Foundation, Inc. + Copyright (C) 1996-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. diff --git a/misc/lsetxattr.c b/misc/lsetxattr.c index 3dbfb797db..ea6bb7e5ce 100644 --- a/misc/lsetxattr.c +++ b/misc/lsetxattr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2014 Free Software Foundation, Inc. +/* Copyright (C) 2002-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/lutimes.c b/misc/lutimes.c index ee071e9af6..76d13bfef6 100644 --- a/misc/lutimes.c +++ b/misc/lutimes.c @@ -1,5 +1,5 @@ /* lutimes -- change access and modification times of a symlink. Stub version. - Copyright (C) 2002-2014 Free Software Foundation, Inc. + Copyright (C) 2002-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/madvise.c b/misc/madvise.c index ecc6896b28..55f82d0491 100644 --- a/misc/madvise.c +++ b/misc/madvise.c @@ -1,5 +1,5 @@ /* Advise system about intentions for a memory region. Stub version. - Copyright (C) 1994-2014 Free Software Foundation, Inc. + Copyright (C) 1994-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/mincore.c b/misc/mincore.c index 12f6f5afaa..ea54670add 100644 --- a/misc/mincore.c +++ b/misc/mincore.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2014 Free Software Foundation, Inc. +/* Copyright (C) 2000-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/mkdtemp.c b/misc/mkdtemp.c index 6bd72cab49..1f733cdfaa 100644 --- a/misc/mkdtemp.c +++ b/misc/mkdtemp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999-2014 Free Software Foundation, Inc. +/* Copyright (C) 1999-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/mkostemp.c b/misc/mkostemp.c index f0dc3c1b0d..807e4770a0 100644 --- a/misc/mkostemp.c +++ b/misc/mkostemp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998-2014 Free Software Foundation, Inc. +/* Copyright (C) 1998-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/mkostemp64.c b/misc/mkostemp64.c index c68e03dff5..2b9c868cd0 100644 --- a/misc/mkostemp64.c +++ b/misc/mkostemp64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2014 Free Software Foundation, Inc. +/* Copyright (C) 2000-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/mkostemps.c b/misc/mkostemps.c index 2f9745ce14..892dc69ba2 100644 --- a/misc/mkostemps.c +++ b/misc/mkostemps.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2009-2014 Free Software Foundation, Inc. +/* Copyright (C) 2009-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/mkostemps64.c b/misc/mkostemps64.c index 1d1d3faf2f..7b48b5c8c0 100644 --- a/misc/mkostemps64.c +++ b/misc/mkostemps64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2014 Free Software Foundation, Inc. +/* Copyright (C) 2000-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/mkstemp.c b/misc/mkstemp.c index a01095b3b7..c5018d154a 100644 --- a/misc/mkstemp.c +++ b/misc/mkstemp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998-2014 Free Software Foundation, Inc. +/* Copyright (C) 1998-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/mkstemp64.c b/misc/mkstemp64.c index 3ca465722f..e4b8605950 100644 --- a/misc/mkstemp64.c +++ b/misc/mkstemp64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2014 Free Software Foundation, Inc. +/* Copyright (C) 2000-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/mkstemps.c b/misc/mkstemps.c index d58fce36da..ca17d1d71a 100644 --- a/misc/mkstemps.c +++ b/misc/mkstemps.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2009-2014 Free Software Foundation, Inc. +/* Copyright (C) 2009-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/mkstemps64.c b/misc/mkstemps64.c index 1b0f024257..dd786f13ab 100644 --- a/misc/mkstemps64.c +++ b/misc/mkstemps64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2014 Free Software Foundation, Inc. +/* Copyright (C) 2000-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/mktemp.c b/misc/mktemp.c index a60f95c067..fc82ede790 100644 --- a/misc/mktemp.c +++ b/misc/mktemp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998-2014 Free Software Foundation, Inc. +/* Copyright (C) 1998-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/mlock.c b/misc/mlock.c index 7556d9d357..c84ca2e077 100644 --- a/misc/mlock.c +++ b/misc/mlock.c @@ -1,5 +1,5 @@ /* mlock -- guarantee pages are resident in memory. Stub version. - Copyright (C) 2001-2014 Free Software Foundation, Inc. + Copyright (C) 2001-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/mlockall.c b/misc/mlockall.c index 5b688d4adf..be3e4f897d 100644 --- a/misc/mlockall.c +++ b/misc/mlockall.c @@ -1,5 +1,5 @@ /* mlockall -- lock in core all the pages in this process. Stub version. - Copyright (C) 2001-2014 Free Software Foundation, Inc. + Copyright (C) 2001-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/mmap.c b/misc/mmap.c index 4ffcd4deee..9447067fcb 100644 --- a/misc/mmap.c +++ b/misc/mmap.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994-2014 Free Software Foundation, Inc. +/* Copyright (C) 1994-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/mmap64.c b/misc/mmap64.c index 98aacbbbd3..1797ed401b 100644 --- a/misc/mmap64.c +++ b/misc/mmap64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2014 Free Software Foundation, Inc. +/* Copyright (C) 1997-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/mntent.c b/misc/mntent.c index 2f0aa6ef63..7dedc62387 100644 --- a/misc/mntent.c +++ b/misc/mntent.c @@ -1,5 +1,5 @@ /* Utilities for reading/writing fstab, mtab, etc. - Copyright (C) 1995-2014 Free Software Foundation, Inc. + Copyright (C) 1995-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/mntent.h b/misc/mntent.h index 879264c6a5..cddb074ec6 100644 --- a/misc/mntent.h +++ b/misc/mntent.h @@ -1,5 +1,5 @@ /* Utilities for reading/writing fstab, mtab, etc. - Copyright (C) 1995-2014 Free Software Foundation, Inc. + Copyright (C) 1995-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/mntent_r.c b/misc/mntent_r.c index e68ec8e845..615987347a 100644 --- a/misc/mntent_r.c +++ b/misc/mntent_r.c @@ -1,5 +1,5 @@ /* Utilities for reading/writing fstab, mtab, etc. - Copyright (C) 1995-2014 Free Software Foundation, Inc. + Copyright (C) 1995-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -127,7 +127,7 @@ __getmntent_r (FILE *stream, struct mntent *mp, char *buffer, int bufsiz) { char *end_ptr; - if (fgets_unlocked (buffer, bufsiz, stream) == NULL) + if (__fgets_unlocked (buffer, bufsiz, stream) == NULL) { funlockfile (stream); return NULL; @@ -135,12 +135,16 @@ __getmntent_r (FILE *stream, struct mntent *mp, char *buffer, int bufsiz) end_ptr = strchr (buffer, '\n'); if (end_ptr != NULL) /* chop newline */ - *end_ptr = '\0'; + { + while (end_ptr[-1] == ' ' || end_ptr[-1] == '\t') + end_ptr--; + *end_ptr = '\0'; + } else { /* Not the whole line was read. Do it now but forget it. */ char tmp[1024]; - while (fgets_unlocked (tmp, sizeof tmp, stream) != NULL) + while (__fgets_unlocked (tmp, sizeof tmp, stream) != NULL) if (strchr (tmp, '\n') != NULL) break; } diff --git a/misc/mprotect.c b/misc/mprotect.c index 2a33ad1f3e..64a72c4580 100644 --- a/misc/mprotect.c +++ b/misc/mprotect.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994-2014 Free Software Foundation, Inc. +/* Copyright (C) 1994-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/msync.c b/misc/msync.c index d148676ccb..82589dd972 100644 --- a/misc/msync.c +++ b/misc/msync.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994-2014 Free Software Foundation, Inc. +/* Copyright (C) 1994-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/munlock.c b/misc/munlock.c index bea8d542d4..50f3ae4b85 100644 --- a/misc/munlock.c +++ b/misc/munlock.c @@ -1,5 +1,5 @@ /* munlock -- undo the effects of prior mlock calls. Stub version. - Copyright (C) 2001-2014 Free Software Foundation, Inc. + Copyright (C) 2001-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/munlockall.c b/misc/munlockall.c index 077c32f0da..0c26450928 100644 --- a/misc/munlockall.c +++ b/misc/munlockall.c @@ -1,5 +1,5 @@ /* munlockall -- undo the effects of all prior mlock calls. Stub version. - Copyright (C) 2001-2014 Free Software Foundation, Inc. + Copyright (C) 2001-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/munmap.c b/misc/munmap.c index abbfc613b9..2f42b1aacb 100644 --- a/misc/munmap.c +++ b/misc/munmap.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994-2014 Free Software Foundation, Inc. +/* Copyright (C) 1994-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/preadv.c b/misc/preadv.c index 07828db85d..36296e3e98 100644 --- a/misc/preadv.c +++ b/misc/preadv.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2009-2014 Free Software Foundation, Inc. +/* Copyright (C) 2009-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/preadv64.c b/misc/preadv64.c index 4f4f54bc2f..d73ad87357 100644 --- a/misc/preadv64.c +++ b/misc/preadv64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2009-2014 Free Software Foundation, Inc. +/* Copyright (C) 2009-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/pselect.c b/misc/pselect.c index 2f6517b2a0..2f8d0a3edf 100644 --- a/misc/pselect.c +++ b/misc/pselect.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2014 Free Software Foundation, Inc. +/* Copyright (C) 1996-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. @@ -45,7 +45,7 @@ __pselect (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, { /* Catch bugs which would be hidden by the TIMESPEC_TO_TIMEVAL computations. The division by 1000 truncates values. */ - if (__builtin_expect (timeout->tv_nsec < 0, 0)) + if (__glibc_unlikely (timeout->tv_nsec < 0)) { __set_errno (EINVAL); return -1; @@ -73,7 +73,6 @@ __pselect (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, } #ifndef __pselect weak_alias (__pselect, pselect) -strong_alias (__pselect, __libc_pselect) /* __select handles cancellation. */ LIBC_CANCEL_HANDLED (); #endif diff --git a/misc/ptrace.c b/misc/ptrace.c index f999e73b4f..095ad3fe18 100644 --- a/misc/ptrace.c +++ b/misc/ptrace.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2014 Free Software Foundation, Inc. +/* Copyright (C) 1991-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -19,6 +19,7 @@ #include <sys/ptrace.h> #include <sys/types.h> #include <stdarg.h> +#include <libc-internal.h> /* Perform process tracing functions. REQUEST is one of the values in <sys/ptrace.h>, and determines the action to be taken. @@ -30,8 +31,7 @@ pid_t PID, void *ADDR, int DATA, void *ADDR2 after PID. */ int -ptrace (request) - enum __ptrace_request request; +ptrace (enum __ptrace_request request, ...) { pid_t pid; void *addr; @@ -60,32 +60,41 @@ ptrace (request) case PTRACE_SETFPREGS: case PTRACE_GETFPAREGS: case PTRACE_SETFPAREGS: - va_start(ap, request); - pid = va_arg(ap, pid_t); - addr = va_arg(ap, void *); - va_end(ap); + va_start (ap, request); + pid = va_arg (ap, pid_t); + addr = va_arg (ap, void *); + va_end (ap); + ignore_value (pid); + ignore_value (addr); break; case PTRACE_POKETEXT: case PTRACE_POKEDATA: case PTRACE_POKEUSER: - va_start(ap, request); - pid = va_arg(ap, pid_t); - addr = va_arg(ap, void *); - data = va_arg(ap, int); - va_end(ap); + va_start (ap, request); + pid = va_arg (ap, pid_t); + addr = va_arg (ap, void *); + data = va_arg (ap, int); + va_end (ap); + ignore_value (pid); + ignore_value (addr); + ignore_value (data); break; case PTRACE_READDATA: case PTRACE_WRITEDATA: case PTRACE_READTEXT: case PTRACE_WRITETEXT: - va_start(ap, request); - pid = va_arg(ap, pid_t); - addr = va_arg(ap, void *); - data = va_arg(ap, int); - addr2 = va_arg(ap, void *); - va_end(ap); + va_start (ap, request); + pid = va_arg (ap, pid_t); + addr = va_arg (ap, void *); + data = va_arg (ap, int); + addr2 = va_arg (ap, void *); + va_end (ap); + ignore_value (pid); + ignore_value (addr); + ignore_value (data); + ignore_value (addr2); break; default: @@ -97,5 +106,4 @@ ptrace (request) return -1; } - stub_warning (ptrace) diff --git a/misc/pwritev.c b/misc/pwritev.c index 10d76dc3f8..0b09809a48 100644 --- a/misc/pwritev.c +++ b/misc/pwritev.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2009-2014 Free Software Foundation, Inc. +/* Copyright (C) 2009-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/pwritev64.c b/misc/pwritev64.c index 53fcc10537..8201b2c5f1 100644 --- a/misc/pwritev64.c +++ b/misc/pwritev64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2009-2014 Free Software Foundation, Inc. +/* Copyright (C) 2009-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/qefgcvt.c b/misc/qefgcvt.c index 5b8668c0bb..bc884a6686 100644 --- a/misc/qefgcvt.c +++ b/misc/qefgcvt.c @@ -1,5 +1,5 @@ /* Compatibility functions for floating point formatting, long double version. - Copyright (C) 1996-2014 Free Software Foundation, Inc. + Copyright (C) 1996-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/qefgcvt_r.c b/misc/qefgcvt_r.c index e2b8e23a9d..77a76280ff 100644 --- a/misc/qefgcvt_r.c +++ b/misc/qefgcvt_r.c @@ -1,6 +1,6 @@ /* Compatibility functions for floating point formatting, reentrant, long double versions. - Copyright (C) 1996-2014 Free Software Foundation, Inc. + Copyright (C) 1996-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/readv.c b/misc/readv.c index 5cc24eba25..de78708dc6 100644 --- a/misc/readv.c +++ b/misc/readv.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2014 Free Software Foundation, Inc. +/* Copyright (C) 1991-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -25,7 +25,7 @@ Operates just like `read' (see <unistd.h>) except that data are put in VECTOR instead of a contiguous buffer. */ ssize_t -__libc_readv (fd, vector, count) +__readv (fd, vector, count) int fd; const struct iovec *vector; int count; @@ -33,7 +33,6 @@ __libc_readv (fd, vector, count) __set_errno (ENOSYS); return -1; } -strong_alias (__libc_readv, __readv) -weak_alias (__libc_readv, readv) +weak_alias (__readv, readv) stub_warning (readv) diff --git a/misc/reboot.c b/misc/reboot.c index 3b3c21f616..de70662491 100644 --- a/misc/reboot.c +++ b/misc/reboot.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992-2014 Free Software Foundation, Inc. +/* Copyright (C) 1992-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -18,15 +18,16 @@ #include <errno.h> #include <unistd.h> #include <sys/reboot.h> +#include <libc-internal.h> /* Reboot the system. */ int -reboot (howto) - int howto; +reboot (int howto) { + ignore_value (howto); + __set_errno (ENOSYS); return -1; } - stub_warning (reboot) diff --git a/misc/regexp.c b/misc/regexp.c index d31ef774df..ee7d572111 100644 --- a/misc/regexp.c +++ b/misc/regexp.c @@ -1,5 +1,5 @@ /* Define function and variables for the obsolete <regexp.h> interface. - Copyright (C) 1996-2014 Free Software Foundation, Inc. + Copyright (C) 1996-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. @@ -17,8 +17,10 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#define __DO_NOT_DEFINE_COMPILE -#include <regexp.h> +/* We don't include regexp.h here because of the macros it requires, and + because it now contains an unconditional #warning. */ + +#include <regex.h> /* Define the variables used for the interface. */ char *loc1; @@ -32,7 +34,6 @@ char *locs; found in the buffer starting at EXPBUF. `loc1' will return the first character matched and `loc2' points to the next unmatched character. */ -extern int __step (const char *string, const char *expbuf); int __step (const char *string, const char *expbuf) { @@ -55,7 +56,6 @@ weak_alias (__step, step) /* Match the beginning of STRING with the compiled regular expression in EXPBUF. If the match is successful `loc2' will contain the position of the first unmatched character. */ -extern int __advance (const char *string, const char *expbuf); int __advance (const char *string, const char *expbuf) { diff --git a/misc/regexp.h b/misc/regexp.h index 2af2bdf2c8..346098945d 100644 --- a/misc/regexp.h +++ b/misc/regexp.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2014 Free Software Foundation, Inc. +/* Copyright (C) 1996-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. @@ -19,14 +19,17 @@ #ifndef _REGEXP_H #define _REGEXP_H 1 -/* The contents of this header file was first standardized in X/Open - System Interface and Headers Issue 2, originally coming from SysV. - In issue 4, version 2, it is marked as TO BE WITDRAWN, and it has - been withdrawn in SUSv3. +/* The contents of this header file were standardized in the + Single Unix Specification, Version 2 (1997) but marked as + LEGACY; new applications were already being encouraged to + use <regex.h> instead. POSIX.1-2001 removed this header. - This code shouldn't be used in any newly written code. It is - included only for compatibility reasons. Use the POSIX definition - in <regex.h> for portable applications and a reasonable interface. */ + This header is provided only for backward compatibility. + It will be removed in the next release of the GNU C Library. + New code should use <regex.h> instead. */ + +#warning "<regexp.h> will be removed in the next release of the GNU C Library." +#warning "Please update your code to use <regex.h> instead (no trailing 'p')." #include <features.h> #include <alloca.h> @@ -182,19 +185,19 @@ compile (char *__restrict instring, char *__restrict expbuf, case REG_ERPAREN: default: /* There is no matching error code. */ - RETURN (36); + ERROR (36); case REG_ESUBREG: - RETURN (25); + ERROR (25); case REG_EBRACK: - RETURN (49); + ERROR (49); case REG_EPAREN: - RETURN (42); + ERROR (42); case REG_EBRACE: - RETURN (44); + ERROR (44); case REG_BADBR: - RETURN (46); + ERROR (46); case REG_ERANGE: - RETURN (11); + ERROR (11); case REG_ESPACE: case REG_ESIZE: ERROR (50); diff --git a/misc/remap_file_pages.c b/misc/remap_file_pages.c index 15d579b7e6..6440726e8e 100644 --- a/misc/remap_file_pages.c +++ b/misc/remap_file_pages.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003-2014 Free Software Foundation, Inc. +/* Copyright (C) 2003-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/removexattr.c b/misc/removexattr.c index 6c88d11f69..26bfb0b58a 100644 --- a/misc/removexattr.c +++ b/misc/removexattr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2014 Free Software Foundation, Inc. +/* Copyright (C) 2002-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/revoke.c b/misc/revoke.c index 7aa019a9d4..2baf5d6911 100644 --- a/misc/revoke.c +++ b/misc/revoke.c @@ -1,5 +1,5 @@ /* Revoke the access of all descriptors currently open on a file. - Copyright (C) 1995-2014 Free Software Foundation, Inc. + Copyright (C) 1995-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/sbrk.c b/misc/sbrk.c index 42e125537b..89ab9c4a8c 100644 --- a/misc/sbrk.c +++ b/misc/sbrk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2014 Free Software Foundation, Inc. +/* Copyright (C) 1991-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -47,10 +47,15 @@ __sbrk (intptr_t increment) return __curbrk; oldbrk = __curbrk; - if ((increment > 0 - ? ((uintptr_t) oldbrk + (uintptr_t) increment < (uintptr_t) oldbrk) - : ((uintptr_t) oldbrk < (uintptr_t) -increment)) - || __brk (oldbrk + increment) < 0) + if (increment > 0 + ? ((uintptr_t) oldbrk + (uintptr_t) increment < (uintptr_t) oldbrk) + : ((uintptr_t) oldbrk < (uintptr_t) -increment)) + { + __set_errno (ENOMEM); + return (void *) -1; + } + + if (__brk (oldbrk + increment) < 0) return (void *) -1; return oldbrk; diff --git a/misc/search.h b/misc/search.h index e09790c832..60e37463e8 100644 --- a/misc/search.h +++ b/misc/search.h @@ -1,5 +1,5 @@ /* Declarations for System V style searching functions. - Copyright (C) 1995-2014 Free Software Foundation, Inc. + Copyright (C) 1995-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -26,7 +26,7 @@ __BEGIN_DECLS -#if defined __USE_SVID || defined __USE_XOPEN_EXTENDED +#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED /* Prototype structure for a linked-list data structure. This is the type used by the `insque' and `remque' functions. */ diff --git a/misc/select.c b/misc/select.c index 8a5e65fe89..e5cd18e4e0 100644 --- a/misc/select.c +++ b/misc/select.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2014 Free Software Foundation, Inc. +/* Copyright (C) 1991-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/setdomain.c b/misc/setdomain.c index 63b022b9d3..3cc03b1a1c 100644 --- a/misc/setdomain.c +++ b/misc/setdomain.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994-2014 Free Software Foundation, Inc. +/* Copyright (C) 1994-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/setegid.c b/misc/setegid.c index 7a70e964ba..37a3b6ac63 100644 --- a/misc/setegid.c +++ b/misc/setegid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992-2014 Free Software Foundation, Inc. +/* Copyright (C) 1992-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/seteuid.c b/misc/seteuid.c index 2e10ebf639..af92bcdb8c 100644 --- a/misc/seteuid.c +++ b/misc/seteuid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992-2014 Free Software Foundation, Inc. +/* Copyright (C) 1992-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/sethostid.c b/misc/sethostid.c index 58f97c50ea..96c750ea75 100644 --- a/misc/sethostid.c +++ b/misc/sethostid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2014 Free Software Foundation, Inc. +/* Copyright (C) 1991-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/sethostname.c b/misc/sethostname.c index 753d56c480..c6c1440c7b 100644 --- a/misc/sethostname.c +++ b/misc/sethostname.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2014 Free Software Foundation, Inc. +/* Copyright (C) 1991-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/setregid.c b/misc/setregid.c index 08fbe364ec..692bff0105 100644 --- a/misc/setregid.c +++ b/misc/setregid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2014 Free Software Foundation, Inc. +/* Copyright (C) 1991-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/setreuid.c b/misc/setreuid.c index 811dcc2254..a6290f0eeb 100644 --- a/misc/setreuid.c +++ b/misc/setreuid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2014 Free Software Foundation, Inc. +/* Copyright (C) 1991-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/setxattr.c b/misc/setxattr.c index 7521cbb383..148f78703b 100644 --- a/misc/setxattr.c +++ b/misc/setxattr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2014 Free Software Foundation, Inc. +/* Copyright (C) 2002-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/sgtty.h b/misc/sgtty.h index a2128ebe24..ec08a7cfcc 100644 --- a/misc/sgtty.h +++ b/misc/sgtty.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2014 Free Software Foundation, Inc. +/* Copyright (C) 1991-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/sstk.c b/misc/sstk.c index a9ebf60ac9..437deb173e 100644 --- a/misc/sstk.c +++ b/misc/sstk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2014 Free Software Foundation, Inc. +/* Copyright (C) 1991-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/stty.c b/misc/stty.c index b44d297747..0ce3e60e17 100644 --- a/misc/stty.c +++ b/misc/stty.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2014 Free Software Foundation, Inc. +/* Copyright (C) 1991-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/swapoff.c b/misc/swapoff.c index 58899cc022..c5ef7e2180 100644 --- a/misc/swapoff.c +++ b/misc/swapoff.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2014 Free Software Foundation, Inc. +/* Copyright (C) 1996-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/swapon.c b/misc/swapon.c index 350f6dd791..aadb910a12 100644 --- a/misc/swapon.c +++ b/misc/swapon.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2014 Free Software Foundation, Inc. +/* Copyright (C) 1991-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/sync.c b/misc/sync.c index b6c24c0493..9e437e76a9 100644 --- a/misc/sync.c +++ b/misc/sync.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2014 Free Software Foundation, Inc. +/* Copyright (C) 1991-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/syncfs.c b/misc/syncfs.c index 52499e7e4c..e9460569af 100644 --- a/misc/syncfs.c +++ b/misc/syncfs.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2014 Free Software Foundation, Inc. +/* Copyright (C) 2011-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/sys/auxv.h b/misc/sys/auxv.h index b2db69e473..81b1918477 100644 --- a/misc/sys/auxv.h +++ b/misc/sys/auxv.h @@ -1,5 +1,5 @@ /* Access to the auxiliary vector. - Copyright (C) 2012-2014 Free Software Foundation, Inc. + Copyright (C) 2012-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h index 4d958ea066..99e94cce86 100644 --- a/misc/sys/cdefs.h +++ b/misc/sys/cdefs.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992-2014 Free Software Foundation, Inc. +/* Copyright (C) 1992-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -131,7 +131,6 @@ /* Fortify support. */ #define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1) #define __bos0(ptr) __builtin_object_size (ptr, 0) -#define __fortify_function __extern_always_inline __attribute_artificial__ #if __GNUC_PREREQ (4,3) # define __warndecl(name, msg) \ @@ -318,12 +317,19 @@ # define __attribute_artificial__ /* Ignore */ #endif -#ifdef __GNUC__ -/* One of these will be defined if the __gnu_inline__ attribute is - available. In C++, __GNUC_GNU_INLINE__ will be defined even though - __inline does not use the GNU inlining rules. If neither macro is - defined, this version of GCC only supports GNU inline semantics. */ -# if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ +/* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 + inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ + or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions + older than 4.3 may define these macros and still not guarantee GNU inlining + semantics. + + clang++ identifies itself as gcc-4.2, but has support for GNU inlining + semantics, that can be checked fot by using the __GNUC_STDC_INLINE_ and + __GNUC_GNU_INLINE__ macro definitions. */ +#if (!defined __cplusplus || __GNUC_PREREQ (4,3) \ + || (defined __clang__ && (defined __GNUC_STDC_INLINE__ \ + || defined __GNUC_GNU_INLINE__))) +# if defined __GNUC_STDC_INLINE__ || defined __cplusplus # define __extern_inline extern __inline __attribute__ ((__gnu_inline__)) # define __extern_always_inline \ extern __always_inline __attribute__ ((__gnu_inline__)) @@ -331,9 +337,10 @@ # define __extern_inline extern __inline # define __extern_always_inline extern __always_inline # endif -#else /* Not GCC. */ -# define __extern_inline /* Ignore */ -# define __extern_always_inline /* Ignore */ +#endif + +#ifdef __extern_always_inline +# define __fortify_function __extern_always_inline __attribute_artificial__ #endif /* GCC 4.3 and above allow passing all anonymous arguments of an @@ -382,6 +389,24 @@ # define __glibc_likely(cond) (cond) #endif +#if (!defined _Noreturn \ + && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \ + && !__GNUC_PREREQ (4,7)) +# if __GNUC_PREREQ (2,8) +# define _Noreturn __attribute__ ((__noreturn__)) +# else +# define _Noreturn +# endif +#endif + +#if (!defined _Static_assert && !defined __cplusplus \ + && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \ + && (!__GNUC_PREREQ (4, 6) || defined __STRICT_ANSI__)) +# define _Static_assert(expr, diagnostic) \ + extern int (*__Static_assert_function (void)) \ + [!!sizeof (struct { int __error_if_negative: (expr) ? 2 : -1; })] +#endif + #include <bits/wordsize.h> #if defined __LONG_DOUBLE_MATH_OPTIONAL && defined __NO_LONG_DOUBLE_MATH diff --git a/misc/sys/dir.h b/misc/sys/dir.h index 31a56f399f..1ffcd2a338 100644 --- a/misc/sys/dir.h +++ b/misc/sys/dir.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2014 Free Software Foundation, Inc. +/* Copyright (C) 1991-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/sys/file.h b/misc/sys/file.h index 3b00dc4b25..e55b39e11b 100644 --- a/misc/sys/file.h +++ b/misc/sys/file.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2014 Free Software Foundation, Inc. +/* Copyright (C) 1991-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/sys/ioctl.h b/misc/sys/ioctl.h index c4d35d9b4f..b4bf0bd5f8 100644 --- a/misc/sys/ioctl.h +++ b/misc/sys/ioctl.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2014 Free Software Foundation, Inc. +/* Copyright (C) 1991-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/sys/mman.h b/misc/sys/mman.h index 5a3be79b3c..56e31b718d 100644 --- a/misc/sys/mman.h +++ b/misc/sys/mman.h @@ -1,5 +1,5 @@ /* Definitions for BSD-style memory management. - Copyright (C) 1994-2014 Free Software Foundation, Inc. + Copyright (C) 1994-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -88,7 +88,7 @@ extern int mprotect (void *__addr, size_t __len, int __prot) __THROW; __THROW. */ extern int msync (void *__addr, size_t __len, int __flags); -#ifdef __USE_BSD +#ifdef __USE_MISC /* Advise the system about particular usage patterns the program follows for the region starting at ADDR and extending LEN bytes. */ extern int madvise (void *__addr, size_t __len, int __advice) __THROW; diff --git a/misc/sys/param.h b/misc/sys/param.h index 8ac62ac64b..62b7ed26f4 100644 --- a/misc/sys/param.h +++ b/misc/sys/param.h @@ -1,5 +1,5 @@ /* Compatibility header for old-style Unix parameters and limits. - Copyright (C) 1995-2014 Free Software Foundation, Inc. + Copyright (C) 1995-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/sys/select.h b/misc/sys/select.h index fd13bab41a..313107dcb8 100644 --- a/misc/sys/select.h +++ b/misc/sys/select.h @@ -1,5 +1,5 @@ /* `fd_set' type and related macros, and `select'/`pselect' declarations. - Copyright (C) 1996-2014 Free Software Foundation, Inc. + Copyright (C) 1996-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -58,7 +58,7 @@ typedef long int __fd_mask; /* It's easier to assume 8-bit bytes than to get CHAR_BIT. */ #define __NFDBITS (8 * (int) sizeof (__fd_mask)) #define __FD_ELT(d) ((d) / __NFDBITS) -#define __FD_MASK(d) ((__fd_mask) 1 << ((d) % __NFDBITS)) +#define __FD_MASK(d) ((__fd_mask) (1UL << ((d) % __NFDBITS))) /* fd_set for select and pselect. */ typedef struct diff --git a/misc/sys/syslog.h b/misc/sys/syslog.h index 41331a8fd1..ee01478c4b 100644 --- a/misc/sys/syslog.h +++ b/misc/sys/syslog.h @@ -190,7 +190,7 @@ extern int setlogmask (int __mask) __THROW; extern void syslog (int __pri, const char *__fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3))); -#ifdef __USE_BSD +#ifdef __USE_MISC /* Generate a log message using FMT and using arguments pointed to by AP. This function is not part of POSIX and therefore no official diff --git a/misc/sys/uio.h b/misc/sys/uio.h index 183ea9de49..928f327de1 100644 --- a/misc/sys/uio.h +++ b/misc/sys/uio.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2014 Free Software Foundation, Inc. +/* Copyright (C) 1991-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -51,7 +51,7 @@ extern ssize_t writev (int __fd, const struct iovec *__iovec, int __count) __wur; -#ifdef __USE_BSD +#ifdef __USE_MISC # ifndef __USE_FILE_OFFSET64 /* Read data from file descriptor FD at the given position OFFSET without change the file pointer, and put the result in the buffers @@ -115,7 +115,7 @@ extern ssize_t preadv64 (int __fd, const struct iovec *__iovec, int __count, extern ssize_t pwritev64 (int __fd, const struct iovec *__iovec, int __count, __off64_t __offset) __wur; # endif -#endif /* Use BSD */ +#endif /* Use misc. */ __END_DECLS diff --git a/misc/sys/ustat.h b/misc/sys/ustat.h index ee82a45d8b..0b811a2762 100644 --- a/misc/sys/ustat.h +++ b/misc/sys/ustat.h @@ -1,5 +1,5 @@ /* Header describing obsolete `ustat' interface. - Copyright (C) 1996-2014 Free Software Foundation, Inc. + Copyright (C) 1996-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/sys/xattr.h b/misc/sys/xattr.h index 929cd87639..29ba1da6e4 100644 --- a/misc/sys/xattr.h +++ b/misc/sys/xattr.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2014 Free Software Foundation, Inc. +/* Copyright (C) 2002-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -26,6 +26,7 @@ __BEGIN_DECLS /* The following constants should be used for the fifth parameter of `*setxattr'. */ +#ifndef __USE_KERNEL_XATTR_DEFS enum { XATTR_CREATE = 1, /* set value, fail if attr already exists. */ @@ -33,6 +34,7 @@ enum XATTR_REPLACE = 2 /* set value, fail if attr does not exist. */ #define XATTR_REPLACE XATTR_REPLACE }; +#endif /* Set the attribute NAME of the file pointed to by PATH to VALUE (which is SIZE bytes long). Return 0 on success, -1 for errors. */ diff --git a/misc/syscall.c b/misc/syscall.c index 5b9ea928aa..7590ad3044 100644 --- a/misc/syscall.c +++ b/misc/syscall.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993-2014 Free Software Foundation, Inc. +/* Copyright (C) 1993-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/syslog.c b/misc/syslog.c index 70daa9e1f3..9dd4cde18c 100644 --- a/misc/syslog.c +++ b/misc/syslog.c @@ -164,7 +164,7 @@ __vsyslog_chk(int pri, int flag, const char *fmt, va_list ap) pri |= LogFacility; /* Build the message in a memory-buffer stream. */ - f = open_memstream (&buf, &bufsize); + f = __open_memstream (&buf, &bufsize); if (f == NULL) { /* We cannot get a stream. There is not much we can do but @@ -202,7 +202,7 @@ __vsyslog_chk(int pri, int flag, const char *fmt, va_list ap) if (LogTag == NULL) LogTag = __progname; if (LogTag != NULL) - fputs_unlocked (LogTag, f); + __fputs_unlocked (LogTag, f); if (LogStat & LOG_PID) fprintf (f, "[%d]", (int) __getpid ()); if (LogTag != NULL) @@ -298,7 +298,7 @@ __vsyslog_chk(int pri, int flag, const char *fmt, va_list ap) if (LogStat & LOG_CONS && (fd = __open(_PATH_CONSOLE, O_WRONLY|O_NOCTTY, 0)) >= 0) { - dprintf (fd, "%s\r\n", buf + msgoff); + __dprintf (fd, "%s\r\n", buf + msgoff); (void)__close(fd); } } @@ -324,7 +324,7 @@ __vsyslog(int pri, const char *fmt, va_list ap) __vsyslog_chk (pri, -1, fmt, ap); } ldbl_hidden_def (__vsyslog, vsyslog) -ldbl_strong_alias (__vsyslog, vsyslog) +ldbl_weak_alias (__vsyslog, vsyslog) static struct sockaddr_un SyslogAddr; /* AF_UNIX address of local logger */ diff --git a/misc/truncate.c b/misc/truncate.c index 7b96d85cfc..750f9553af 100644 --- a/misc/truncate.c +++ b/misc/truncate.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2014 Free Software Foundation, Inc. +/* Copyright (C) 1991-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/truncate64.c b/misc/truncate64.c index 8c332deb9a..d1bb4ade2e 100644 --- a/misc/truncate64.c +++ b/misc/truncate64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2014 Free Software Foundation, Inc. +/* Copyright (C) 1997-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/tsearch.c b/misc/tsearch.c index dd8761b873..869dc9bec7 100644 --- a/misc/tsearch.c +++ b/misc/tsearch.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2014 Free Software Foundation, Inc. +/* Copyright (C) 1995-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Bernd Schmidt <crux@Pool.Informatik.RWTH-Aachen.DE>, 1997. @@ -293,6 +293,7 @@ __tsearch (const void *key, void **vrootp, __compar_fn_t compar) return q; } +libc_hidden_def (__tsearch) weak_alias (__tsearch, tsearch) @@ -325,6 +326,7 @@ __tfind (key, vrootp, compar) } return NULL; } +libc_hidden_def (__tfind) weak_alias (__tfind, tfind) @@ -585,6 +587,7 @@ __tdelete (const void *key, void **vrootp, __compar_fn_t compar) free (unchained); return retval; } +libc_hidden_def (__tdelete) weak_alias (__tdelete, tdelete) @@ -625,6 +628,7 @@ __twalk (const void *vroot, __action_fn_t action) if (root != NULL && action != NULL) trecurse (root, action, 0); } +libc_hidden_def (__twalk) weak_alias (__twalk, twalk) diff --git a/misc/tst-dirname.c b/misc/tst-dirname.c index d8f33dfc94..db08a8d40d 100644 --- a/misc/tst-dirname.c +++ b/misc/tst-dirname.c @@ -1,5 +1,5 @@ /* Test program for dirname function a la XPG. - Copyright (C) 1996-2014 Free Software Foundation, Inc. + Copyright (C) 1996-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. @@ -37,8 +37,8 @@ test (const char *input, const char *result) return retval; } -int -main (void) +static int +do_test (void) { int result = 0; @@ -67,3 +67,6 @@ main (void) return result != 0; } + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff --git a/misc/tst-efgcvt.c b/misc/tst-efgcvt.c index 303042d36e..5083fec91e 100644 --- a/misc/tst-efgcvt.c +++ b/misc/tst-efgcvt.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998-2014 Free Software Foundation, Inc. +/* Copyright (C) 1998-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -200,8 +200,8 @@ special (void) } -int -main (void) +static int +do_test (void) { test (ecvt_tests, ecvt, "ecvt"); test (fcvt_tests, fcvt, "fcvt"); @@ -211,3 +211,6 @@ main (void) return error_count; } + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff --git a/misc/tst-error1.c b/misc/tst-error1.c index e84843ed2f..a97a22ce9d 100644 --- a/misc/tst-error1.c +++ b/misc/tst-error1.c @@ -3,6 +3,7 @@ #include <stdio.h> #include <string.h> #include <wchar.h> +#include <libc-internal.h> static int do_test (int argc, char *argv[]) @@ -16,8 +17,18 @@ do_test (int argc, char *argv[]) for (int i = 0; i < 1000; ++i) memcpy (&buf[i * (sizeof (str) - 1)], str, sizeof (str)); error (0, 0, str); + + /* We're testing a large format string here and need to generate it + to avoid this source file being ridiculous. So disable the warning + about a generated format string. */ + DIAG_PUSH_NEEDS_COMMENT; + DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wformat-security"); + error (0, 0, buf); error (0, 0, buf); + + DIAG_POP_NEEDS_COMMENT; + error (0, 0, str); return 0; } diff --git a/misc/tst-fdset.c b/misc/tst-fdset.c index 78a34e9e5e..077e0dbb8f 100644 --- a/misc/tst-fdset.c +++ b/misc/tst-fdset.c @@ -1,5 +1,5 @@ /* Test FD* macros. - Copyright (C) 1997-2014 Free Software Foundation, Inc. + Copyright (C) 1997-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Robert Bihlmeyer <robbe@orcus.priv.at>. @@ -20,8 +20,8 @@ #include <stdio.h> #include <sys/types.h> -int -main (void) +static int +do_test (void) { int retval = 0; int i; @@ -62,3 +62,6 @@ main (void) return retval; } + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff --git a/misc/tst-hsearch.c b/misc/tst-hsearch.c index 6c19b22472..d390f1dcf3 100644 --- a/misc/tst-hsearch.c +++ b/misc/tst-hsearch.c @@ -1,8 +1,8 @@ #include <search.h> #include <stdio.h> -int -main (void) +static int +do_test (void) { int a = 1; int b = 2; @@ -29,3 +29,6 @@ main (void) return 0; } + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff --git a/misc/tst-mntent.c b/misc/tst-mntent.c index 802b56e437..876c89f8ed 100644 --- a/misc/tst-mntent.c +++ b/misc/tst-mntent.c @@ -73,7 +73,27 @@ main (int argc, char *argv[]) puts ("Error while reading written entry back in"); result = 1; } - } + + /* Part III: Entry with whitespaces at the end of a line. */ + rewind (fp); + + fputs ("/foo\\040dir /bar\\040dir auto bind \t \n", fp); + + rewind (fp); + + mnt = getmntent (fp); + + if (strcmp (mnt->mnt_fsname, "/foo dir") != 0 + || strcmp (mnt->mnt_dir, "/bar dir") != 0 + || strcmp (mnt->mnt_type, "auto") != 0 + || strcmp (mnt->mnt_opts, "bind") != 0 + || mnt->mnt_freq != 0 + || mnt->mnt_passno != 0) + { + puts ("Error while reading entry with trailing whitespaces"); + result = 1; + } + } return result; } diff --git a/misc/tst-mntent2.c b/misc/tst-mntent2.c index 6c25e0127c..ba1ee0ae19 100644 --- a/misc/tst-mntent2.c +++ b/misc/tst-mntent2.c @@ -3,8 +3,8 @@ #include <string.h> -int -main (void) +static int +do_test (void) { int result = 0; struct mntent mef; @@ -17,7 +17,7 @@ main (void) mef.mnt_passno = 2; #define TEST(opt, found) \ - if (!!hasmntopt (&mef, (opt)) != (found)) \ + if ((!!hasmntopt (&mef, (opt))) != (found)) \ { \ printf ("Option %s was %sfound\n", (opt), (found) ? "not " : ""); \ result = 1; \ @@ -39,3 +39,6 @@ main (void) return result; } + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff --git a/misc/tst-pselect.c b/misc/tst-pselect.c index 36bc46da6c..0d11a809a0 100644 --- a/misc/tst-pselect.c +++ b/misc/tst-pselect.c @@ -31,17 +31,18 @@ do_test (void) } sa.sa_handler = SIG_IGN; - sa.sa_flags = SA_NOCLDWAIT; - if (sigaction (SIGCHLD, &sa, NULL) != 0) { puts ("2nd sigaction failed"); return 1; } - if (sigblock (sigmask (SIGUSR1)) != 0) + sigset_t ss_usr1; + sigemptyset (&ss_usr1); + sigaddset (&ss_usr1, SIGUSR1); + if (sigprocmask (SIG_BLOCK, &ss_usr1, NULL) != 0) { - puts ("sigblock failed"); + puts ("sigprocmask failed"); return 1; } diff --git a/misc/tst-tsearch.c b/misc/tst-tsearch.c index 2dc5a670ab..70b6c339fc 100644 --- a/misc/tst-tsearch.c +++ b/misc/tst-tsearch.c @@ -1,5 +1,5 @@ /* Test program for tsearch et al. - Copyright (C) 1997-2014 Free Software Foundation, Inc. + Copyright (C) 1997-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/ttyslot.c b/misc/ttyslot.c index 9c69589dae..0ed14d73ea 100644 --- a/misc/ttyslot.c +++ b/misc/ttyslot.c @@ -53,20 +53,20 @@ ttyslot (void) name = __alloca (buflen); - setttyent(); + __setttyent(); for (cnt = 0; cnt < 3; ++cnt) if (__ttyname_r (cnt, name, buflen) == 0) { if ((p = rindex(name, '/'))) ++p; else p = name; - for (slot = 1; (ttyp = getttyent()); ++slot) + for (slot = 1; (ttyp = __getttyent()); ++slot) if (!strcmp(ttyp->ty_name, p)) { - endttyent(); + __endttyent(); return(slot); } break; } - endttyent(); + __endttyent(); return(0); } diff --git a/misc/ualarm.c b/misc/ualarm.c index 628a7b0a5b..c6b097270f 100644 --- a/misc/ualarm.c +++ b/misc/ualarm.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2014 Free Software Foundation, Inc. +/* Copyright (C) 1991-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/usleep.c b/misc/usleep.c index e082ffab09..a28b77c22b 100644 --- a/misc/usleep.c +++ b/misc/usleep.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2014 Free Software Foundation, Inc. +/* Copyright (C) 1991-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/ustat.c b/misc/ustat.c index cb187511c5..1e84062b50 100644 --- a/misc/ustat.c +++ b/misc/ustat.c @@ -1,5 +1,5 @@ /* Return info on filesystem. - Copyright (C) 1995-2014 Free Software Foundation, Inc. + Copyright (C) 1995-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/utimes.c b/misc/utimes.c index 92f5fbe147..6b969e7b50 100644 --- a/misc/utimes.c +++ b/misc/utimes.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2014 Free Software Foundation, Inc. +/* Copyright (C) 1991-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/vhangup.c b/misc/vhangup.c index 0912b1a9ef..97825406c7 100644 --- a/misc/vhangup.c +++ b/misc/vhangup.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2014 Free Software Foundation, Inc. +/* Copyright (C) 1991-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or diff --git a/misc/writev.c b/misc/writev.c index b703aacd9a..34e7841584 100644 --- a/misc/writev.c +++ b/misc/writev.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2014 Free Software Foundation, Inc. +/* Copyright (C) 1991-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -25,7 +25,7 @@ Operates just like `write' (see <unistd.h>) except that the data are taken from VECTOR instead of a contiguous buffer. */ ssize_t -__libc_writev (fd, vector, count) +__writev (fd, vector, count) int fd; const struct iovec *vector; int count; @@ -33,7 +33,6 @@ __libc_writev (fd, vector, count) __set_errno (ENOSYS); return -1; } -strong_alias (__libc_writev, __writev) -weak_alias (__libc_writev, writev) +weak_alias (__writev, writev) stub_warning (writev) |