summaryrefslogtreecommitdiff
path: root/io
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2016-08-20 19:50:45 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2016-08-20 19:50:45 +0200
commit4dd9e35bfd35d3138bc44169baba098005bad51e (patch)
treea4939c43a9c3fe00eb27f023e14acc5e1fe8808c /io
parentbd42a4599d1b6f77bcfe1e4f67b7cbd9e1cb2dfd (diff)
parentf76453c31593957fec1a99b986bfa5506618b79c (diff)
Merge commit 'refs/top-bases/t/bigmem' into t/bigmem
Diffstat (limited to 'io')
-rw-r--r--io/Makefile13
-rw-r--r--io/access.c2
-rw-r--r--io/bits/fcntl2.h20
-rw-r--r--io/bits/poll2.h2
-rw-r--r--io/bug-ftw1.c2
-rw-r--r--io/bug-ftw2.c2
-rw-r--r--io/bug-ftw4.c2
-rw-r--r--io/chdir.c2
-rw-r--r--io/chmod.c2
-rw-r--r--io/chown.c2
-rw-r--r--io/close.c2
-rw-r--r--io/creat.c5
-rw-r--r--io/creat64.c2
-rw-r--r--io/dup.c2
-rw-r--r--io/dup2.c2
-rw-r--r--io/dup3.c2
-rw-r--r--io/euidaccess.c2
-rw-r--r--io/faccessat.c2
-rw-r--r--io/fchdir.c2
-rw-r--r--io/fchmod.c2
-rw-r--r--io/fchmodat.c2
-rw-r--r--io/fchown.c2
-rw-r--r--io/fchownat.c2
-rw-r--r--io/fcntl.c2
-rw-r--r--io/fcntl.h18
-rw-r--r--io/flock.c2
-rw-r--r--io/fstat.c2
-rw-r--r--io/fstat64.c2
-rw-r--r--io/fstatat.c2
-rw-r--r--io/fstatat64.c2
-rw-r--r--io/fstatfs.c2
-rw-r--r--io/fstatfs64.c2
-rw-r--r--io/fstatvfs.c2
-rw-r--r--io/fstatvfs64.c2
-rw-r--r--io/fts.c16
-rw-r--r--io/ftw.c6
-rw-r--r--io/ftw.h4
-rw-r--r--io/ftw64.c2
-rw-r--r--io/ftwtest-sh6
-rw-r--r--io/futimens.c2
-rw-r--r--io/fxstat.c2
-rw-r--r--io/fxstat64.c2
-rw-r--r--io/fxstatat.c2
-rw-r--r--io/fxstatat64.c2
-rw-r--r--io/getcwd.c2
-rw-r--r--io/getdirname.c2
-rw-r--r--io/getwd.c2
-rw-r--r--io/have_o_cloexec.c2
-rw-r--r--io/isatty.c2
-rw-r--r--io/lchmod.c2
-rw-r--r--io/lchown.c2
-rw-r--r--io/link.c2
-rw-r--r--io/linkat.c2
-rw-r--r--io/lockf.c2
-rw-r--r--io/lockf64.c2
-rw-r--r--io/lseek.c2
-rw-r--r--io/lseek64.c2
-rw-r--r--io/lstat.c2
-rw-r--r--io/lstat64.c2
-rw-r--r--io/lxstat.c2
-rw-r--r--io/lxstat64.c2
-rw-r--r--io/mkdir.c2
-rw-r--r--io/mkdirat.c2
-rw-r--r--io/mkfifo.c2
-rw-r--r--io/mkfifoat.c2
-rw-r--r--io/mknod.c2
-rw-r--r--io/mknodat.c2
-rw-r--r--io/open.c6
-rw-r--r--io/open64.c6
-rw-r--r--io/open64_2.c6
-rw-r--r--io/open_2.c6
-rw-r--r--io/openat.c14
-rw-r--r--io/openat64.c14
-rw-r--r--io/openat64_2.c6
-rw-r--r--io/openat_2.c6
-rw-r--r--io/pipe.c2
-rw-r--r--io/pipe2.c2
-rw-r--r--io/poll.c2
-rw-r--r--io/posix_fadvise.c2
-rw-r--r--io/posix_fadvise64.c2
-rw-r--r--io/posix_fallocate.c5
-rw-r--r--io/posix_fallocate64.c5
-rw-r--r--io/ppoll.c2
-rw-r--r--io/pwd.c2
-rw-r--r--io/read.c2
-rw-r--r--io/readlink.c2
-rw-r--r--io/readlinkat.c2
-rw-r--r--io/rmdir.c2
-rw-r--r--io/sendfile.c2
-rw-r--r--io/sendfile64.c2
-rw-r--r--io/stat.c2
-rw-r--r--io/stat64.c2
-rw-r--r--io/statfs.c2
-rw-r--r--io/statfs64.c2
-rw-r--r--io/statvfs.c2
-rw-r--r--io/statvfs64.c2
-rw-r--r--io/symlink.c2
-rw-r--r--io/symlinkat.c2
-rw-r--r--io/sys/poll.h2
-rw-r--r--io/sys/sendfile.h2
-rw-r--r--io/sys/stat.h35
-rw-r--r--io/sys/statfs.h2
-rw-r--r--io/sys/statvfs.h2
-rw-r--r--io/test-lfs.c2
-rw-r--r--io/test-stat.c9
-rw-r--r--io/test-stat2.c2
-rw-r--r--io/test-utime.c14
-rw-r--r--io/tst-fcntl.c2
-rw-r--r--io/tst-getcwd.c2
-rw-r--r--io/ttyname.c2
-rw-r--r--io/ttyname_r.c2
-rw-r--r--io/umask.c2
-rw-r--r--io/unlink.c2
-rw-r--r--io/unlinkat.c2
-rw-r--r--io/utime.c2
-rw-r--r--io/utime.h2
-rw-r--r--io/utimensat.c2
-rw-r--r--io/write.c2
-rw-r--r--io/xmknod.c2
-rw-r--r--io/xmknodat.c2
-rw-r--r--io/xstat.c2
-rw-r--r--io/xstat64.c2
122 files changed, 221 insertions, 201 deletions
diff --git a/io/Makefile b/io/Makefile
index 19d3a6b113..613dce0124 100644
--- a/io/Makefile
+++ b/io/Makefile
@@ -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
@@ -20,6 +20,8 @@
#
subdir := io
+include ../Makeconfig
+
headers := sys/stat.h bits/stat.h sys/statfs.h bits/statfs.h sys/vfs.h \
sys/statvfs.h bits/statvfs.h fcntl.h sys/fcntl.h bits/fcntl.h \
poll.h sys/poll.h bits/poll.h bits/fcntl2.h bits/poll2.h \
@@ -71,6 +73,10 @@ tests := test-utime test-stat test-stat2 test-lfs tst-getcwd \
tst-mknodat tst-mkfifoat tst-ttyname_r bug-ftw5 \
tst-posix_fallocate
+ifeq ($(run-built-tests),yes)
+tests-special += $(objpfx)ftwtest.out
+endif
+
include ../Rules
CFLAGS-open.c = -fexceptions -fasynchronous-unwind-tables
@@ -101,8 +107,7 @@ test-stat2-ARGS = Makefile . $(objpfx)test-stat2
tst-statvfs-ARGS = $(objpfx)tst-statvfs tst-statvfs.c /tmp
ifeq ($(run-built-tests),yes)
-tests: $(objpfx)ftwtest.out
-
$(objpfx)ftwtest.out: ftwtest-sh $(objpfx)ftwtest
- $(SHELL) $< $(common-objpfx) '$(test-program-cmd)' > $@
+ $(SHELL) $< $(common-objpfx) '$(test-program-cmd)' > $@; \
+ $(evaluate-test)
endif
diff --git a/io/access.c b/io/access.c
index 7aa320d0af..43445a1a55 100644
--- a/io/access.c
+++ b/io/access.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/io/bits/fcntl2.h b/io/bits/fcntl2.h
index 4f13b10706..2ac54b200a 100644
--- a/io/bits/fcntl2.h
+++ b/io/bits/fcntl2.h
@@ -1,5 +1,5 @@
/* Checking macros for fcntl 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
@@ -20,7 +20,7 @@
# error "Never include <bits/fcntl2.h> directly; use <fcntl.h> instead."
#endif
-/* Check that calls to open and openat with O_CREAT set have an
+/* Check that calls to open and openat with O_CREAT or O_TMPFILE set have an
appropriate third/fourth parameter. */
#ifndef __USE_FILE_OFFSET64
extern int __open_2 (const char *__path, int __oflag) __nonnull ((1));
@@ -35,7 +35,7 @@ extern int __REDIRECT (__open_alias, (const char *__path, int __oflag, ...),
__errordecl (__open_too_many_args,
"open can be called either with 2 or 3 arguments, not more");
__errordecl (__open_missing_mode,
- "open with O_CREAT in second argument needs 3 arguments");
+ "open with O_CREAT or O_TMPFILE in second argument needs 3 arguments");
__fortify_function int
open (const char *__path, int __oflag, ...)
@@ -45,7 +45,7 @@ open (const char *__path, int __oflag, ...)
if (__builtin_constant_p (__oflag))
{
- if ((__oflag & O_CREAT) != 0 && __va_arg_pack_len () < 1)
+ if (__OPEN_NEEDS_MODE (__oflag) && __va_arg_pack_len () < 1)
{
__open_missing_mode ();
return __open_2 (__path, __oflag);
@@ -67,7 +67,7 @@ extern int __REDIRECT (__open64_alias, (const char *__path, int __oflag,
__errordecl (__open64_too_many_args,
"open64 can be called either with 2 or 3 arguments, not more");
__errordecl (__open64_missing_mode,
- "open64 with O_CREAT in second argument needs 3 arguments");
+ "open64 with O_CREAT or O_TMPFILE in second argument needs 3 arguments");
__fortify_function int
open64 (const char *__path, int __oflag, ...)
@@ -77,7 +77,7 @@ open64 (const char *__path, int __oflag, ...)
if (__builtin_constant_p (__oflag))
{
- if ((__oflag & O_CREAT) != 0 && __va_arg_pack_len () < 1)
+ if (__OPEN_NEEDS_MODE (__oflag) && __va_arg_pack_len () < 1)
{
__open64_missing_mode ();
return __open64_2 (__path, __oflag);
@@ -111,7 +111,7 @@ extern int __REDIRECT (__openat_alias, (int __fd, const char *__path,
__errordecl (__openat_too_many_args,
"openat can be called either with 3 or 4 arguments, not more");
__errordecl (__openat_missing_mode,
- "openat with O_CREAT in third argument needs 4 arguments");
+ "openat with O_CREAT or O_TMPFILE in third argument needs 4 arguments");
__fortify_function int
openat (int __fd, const char *__path, int __oflag, ...)
@@ -121,7 +121,7 @@ openat (int __fd, const char *__path, int __oflag, ...)
if (__builtin_constant_p (__oflag))
{
- if ((__oflag & O_CREAT) != 0 && __va_arg_pack_len () < 1)
+ if (__OPEN_NEEDS_MODE (__oflag) && __va_arg_pack_len () < 1)
{
__openat_missing_mode ();
return __openat_2 (__fd, __path, __oflag);
@@ -145,7 +145,7 @@ extern int __REDIRECT (__openat64_alias, (int __fd, const char *__path,
__errordecl (__openat64_too_many_args,
"openat64 can be called either with 3 or 4 arguments, not more");
__errordecl (__openat64_missing_mode,
- "openat64 with O_CREAT in third argument needs 4 arguments");
+ "openat64 with O_CREAT or O_TMPFILE in third argument needs 4 arguments");
__fortify_function int
openat64 (int __fd, const char *__path, int __oflag, ...)
@@ -155,7 +155,7 @@ openat64 (int __fd, const char *__path, int __oflag, ...)
if (__builtin_constant_p (__oflag))
{
- if ((__oflag & O_CREAT) != 0 && __va_arg_pack_len () < 1)
+ if (__OPEN_NEEDS_MODE (__oflag) && __va_arg_pack_len () < 1)
{
__openat64_missing_mode ();
return __openat64_2 (__fd, __path, __oflag);
diff --git a/io/bits/poll2.h b/io/bits/poll2.h
index cc303ceee4..a19bd19fd0 100644
--- a/io/bits/poll2.h
+++ b/io/bits/poll2.h
@@ -1,5 +1,5 @@
/* Checking macros for poll functions.
- 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/io/bug-ftw1.c b/io/bug-ftw1.c
index ef81eedc4c..fe0557779a 100644
--- a/io/bug-ftw1.c
+++ b/io/bug-ftw1.c
@@ -1,5 +1,5 @@
/* Test for ftw function searching in root directory.
- 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.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 2001.
diff --git a/io/bug-ftw2.c b/io/bug-ftw2.c
index 325f8cbf44..4c1ea87d3c 100644
--- a/io/bug-ftw2.c
+++ b/io/bug-ftw2.c
@@ -1,5 +1,5 @@
/* Test for ftw function searching in current directory.
- 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.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 2001.
diff --git a/io/bug-ftw4.c b/io/bug-ftw4.c
index 659525b0c5..2d2b43e4f4 100644
--- a/io/bug-ftw4.c
+++ b/io/bug-ftw4.c
@@ -1,5 +1,5 @@
/* Test if ftw function doesn't leak fds.
- 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.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
diff --git a/io/chdir.c b/io/chdir.c
index be7865610e..1003b9d200 100644
--- a/io/chdir.c
+++ b/io/chdir.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/io/chmod.c b/io/chmod.c
index ceee813727..3dcc8937b0 100644
--- a/io/chmod.c
+++ b/io/chmod.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/io/chown.c b/io/chown.c
index 813e3b5337..280f2c1d59 100644
--- a/io/chown.c
+++ b/io/chown.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/io/close.c b/io/close.c
index 83f6ca073d..267cfbc7e9 100644
--- a/io/close.c
+++ b/io/close.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/io/creat.c b/io/creat.c
index 0ff524cca2..c03810d962 100644
--- a/io/creat.c
+++ b/io/creat.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
@@ -23,13 +23,12 @@
/* Create FILE with protections MODE. */
int
-__libc_creat (file, mode)
+creat (file, mode)
const char *file;
mode_t mode;
{
return __open (file, O_WRONLY|O_CREAT|O_TRUNC, mode);
}
-weak_alias (__libc_creat, creat)
/* __open handles cancellation. */
LIBC_CANCEL_HANDLED ();
diff --git a/io/creat64.c b/io/creat64.c
index b5f1d8b815..6be8a77374 100644
--- a/io/creat64.c
+++ b/io/creat64.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/io/dup.c b/io/dup.c
index 03cccee1e8..a461a42f68 100644
--- a/io/dup.c
+++ b/io/dup.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/io/dup2.c b/io/dup2.c
index 6201a4c7f3..fa3c5d59a5 100644
--- a/io/dup2.c
+++ b/io/dup2.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/io/dup3.c b/io/dup3.c
index 9afd6d1290..1f7f093204 100644
--- a/io/dup3.c
+++ b/io/dup3.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008-2014 Free Software Foundation, Inc.
+/* Copyright (C) 2008-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/io/euidaccess.c b/io/euidaccess.c
index 724d608271..0adead8d7d 100644
--- a/io/euidaccess.c
+++ b/io/euidaccess.c
@@ -1,5 +1,5 @@
/* Test for access to FILE using effective UID and GID. Stub version.
- 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/io/faccessat.c b/io/faccessat.c
index e8ed638cf7..3bf8b79035 100644
--- a/io/faccessat.c
+++ b/io/faccessat.c
@@ -1,5 +1,5 @@
/* Test for access to file, relative to open directory. Stub version.
- 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
diff --git a/io/fchdir.c b/io/fchdir.c
index b3cc3677f7..d4ae2bb7d0 100644
--- a/io/fchdir.c
+++ b/io/fchdir.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/io/fchmod.c b/io/fchmod.c
index 6688d3a138..f0aac92225 100644
--- a/io/fchmod.c
+++ b/io/fchmod.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/io/fchmodat.c b/io/fchmodat.c
index 63e3042578..1cd794bf73 100644
--- a/io/fchmodat.c
+++ b/io/fchmodat.c
@@ -1,5 +1,5 @@
/* Change the protections of file relative to open directory. Stub version.
- 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
diff --git a/io/fchown.c b/io/fchown.c
index ad3e32a2fd..441e55953c 100644
--- a/io/fchown.c
+++ b/io/fchown.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/io/fchownat.c b/io/fchownat.c
index daf0529d70..e9e3bd6ffe 100644
--- a/io/fchownat.c
+++ b/io/fchownat.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/io/fcntl.c b/io/fcntl.c
index 73e264d344..5b1156d301 100644
--- a/io/fcntl.c
+++ b/io/fcntl.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/io/fcntl.h b/io/fcntl.h
index 28d83aeab5..c6812c467b 100644
--- a/io/fcntl.h
+++ b/io/fcntl.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
@@ -34,6 +34,15 @@ __BEGIN_DECLS
numbers and flag bits for `open', `fcntl', et al. */
#include <bits/fcntl.h>
+/* Detect if open needs mode as a third argument (or for openat as a fourth
+ argument). */
+#ifdef __O_TMPFILE
+# define __OPEN_NEEDS_MODE(oflag) \
+ (((oflag) & O_CREAT) != 0 || ((oflag) & __O_TMPFILE) == __O_TMPFILE)
+#else
+# define __OPEN_NEEDS_MODE(oflag) (((oflag) & O_CREAT) != 0)
+#endif
+
/* POSIX.1-2001 specifies that these types are defined by <fcntl.h>.
Earlier POSIX standards permitted any type ending in `_t' to be defined
by any POSIX header, so we don't conditionalize the definitions here. */
@@ -87,7 +96,7 @@ typedef __pid_t pid_t;
# define S_ISUID __S_ISUID /* Set user ID on execution. */
# define S_ISGID __S_ISGID /* Set group ID on execution. */
-# if defined __USE_BSD || defined __USE_MISC || defined __USE_XOPEN
+# if defined __USE_MISC || defined __USE_XOPEN
/* Save swapped text after use (sticky bit). This is pretty well obsolete. */
# define S_ISVTX __S_ISVTX
# endif
@@ -160,8 +169,9 @@ typedef __pid_t pid_t;
extern int fcntl (int __fd, int __cmd, ...);
/* Open FILE and return a new file descriptor for it, or -1 on error.
- OFLAG determines the type of access used. If O_CREAT is on OFLAG,
- the third argument is taken as a `mode_t', the mode of the created file.
+ OFLAG determines the type of access used. If O_CREAT or O_TMPFILE is set
+ in OFLAG, the third argument is taken as a `mode_t', the mode of the
+ created file.
This function is a cancellation point and therefore not marked with
__THROW. */
diff --git a/io/flock.c b/io/flock.c
index b4105014da..fc999ade77 100644
--- a/io/flock.c
+++ b/io/flock.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/io/fstat.c b/io/fstat.c
index b44939fe74..78606c88c9 100644
--- a/io/fstat.c
+++ b/io/fstat.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/io/fstat64.c b/io/fstat64.c
index 4fdf344570..57cb60f314 100644
--- a/io/fstat64.c
+++ b/io/fstat64.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/io/fstatat.c b/io/fstatat.c
index bdc434b070..b9c225e410 100644
--- a/io/fstatat.c
+++ b/io/fstatat.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/io/fstatat64.c b/io/fstatat64.c
index 8a6379aaf0..a71ea4deb9 100644
--- a/io/fstatat64.c
+++ b/io/fstatat64.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/io/fstatfs.c b/io/fstatfs.c
index 817bc694e1..535023ee00 100644
--- a/io/fstatfs.c
+++ b/io/fstatfs.c
@@ -1,5 +1,5 @@
/* Return information about the filesystem on which FD resides.
- 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/io/fstatfs64.c b/io/fstatfs64.c
index 69bca30104..378a3c3be8 100644
--- a/io/fstatfs64.c
+++ b/io/fstatfs64.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/io/fstatvfs.c b/io/fstatvfs.c
index 8a9207e140..d7124b9130 100644
--- a/io/fstatvfs.c
+++ b/io/fstatvfs.c
@@ -1,5 +1,5 @@
/* Return information about the filesystem on which FD resides.
- 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/io/fstatvfs64.c b/io/fstatvfs64.c
index 63ae5147b5..9834f0db00 100644
--- a/io/fstatvfs64.c
+++ b/io/fstatvfs64.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/io/fts.c b/io/fts.c
index c9c054d6d3..46cbb72571 100644
--- a/io/fts.c
+++ b/io/fts.c
@@ -561,6 +561,16 @@ fts_children(sp, instr)
return (sp->fts_child);
}
+static inline int
+dirent_not_directory(const struct dirent *dp)
+{
+#if defined DT_DIR && defined _DIRENT_HAVE_D_TYPE
+ return dp->d_type != DT_DIR && dp->d_type != DT_UNKNOWN;
+#else
+ return 0;
+#endif
+}
+
/*
* This is the tricky part -- do not casually change *anything* in here. The
* idea is to build the linked list of entries that are used by fts_children
@@ -759,11 +769,7 @@ mem1: saved_errno = errno;
p->fts_info = FTS_NSOK;
p->fts_accpath = cur->fts_accpath;
} else if (nlinks == 0
-#if defined DT_DIR && defined _DIRENT_HAVE_D_TYPE
- || (nostat &&
- dp->d_type != DT_DIR && dp->d_type != DT_UNKNOWN)
-#endif
- ) {
+ || (nostat && dirent_not_directory(dp))) {
p->fts_accpath =
ISSET(FTS_NOCHDIR) ? p->fts_path : p->fts_name;
p->fts_info = FTS_NSOK;
diff --git a/io/ftw.c b/io/ftw.c
index b058b7465a..b95da60bb0 100644
--- a/io/ftw.c
+++ b/io/ftw.c
@@ -1,5 +1,5 @@
/* File tree walker 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.
@@ -66,9 +66,7 @@ char *alloca ();
#include <string.h>
#include <unistd.h>
#include <not-cancel.h>
-#if HAVE_SYS_PARAM_H || defined _LIBC
-# include <sys/param.h>
-#endif
+#include <sys/param.h>
#ifdef _LIBC
# include <include/sys/stat.h>
#else
diff --git a/io/ftw.h b/io/ftw.h
index e5e3dd0c49..942add1ea0 100644
--- a/io/ftw.h
+++ b/io/ftw.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
@@ -43,7 +43,7 @@ enum
FTW_NS, /* Unstatable file. */
#define FTW_NS FTW_NS
-#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
+#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
FTW_SL, /* Symbolic link. */
# define FTW_SL FTW_SL
diff --git a/io/ftw64.c b/io/ftw64.c
index 92591b75d4..642a346163 100644
--- a/io/ftw64.c
+++ b/io/ftw64.c
@@ -1,5 +1,5 @@
/* File tree walker functions. LFS 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/io/ftwtest-sh b/io/ftwtest-sh
index 7341c1f654..478171db78 100644
--- a/io/ftwtest-sh
+++ b/io/ftwtest-sh
@@ -1,6 +1,6 @@
#! /bin/sh
# Test for nftw(3).
-# 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
@@ -40,8 +40,6 @@ fi
# Since we use `sort' we must make sure to use the same locale everywhere.
LC_ALL=C
export LC_ALL
-LANG=C
-export LANG
# First create our scenario:
tmp=${objpfx}io
@@ -69,7 +67,7 @@ ln -s $tmpdir/foo/lvl1/lvl2/lvl3/lvl4 $tmpdir/foo/lvl1/link@1
echo > $tmpdir/bar/xo
chmod a-x,a+r $tmpdir/bar
-testout=$tmp/ftwtest.out
+testout=$tmp/ftwtest-tmp.out
$testprogram $tmpdir |
sort > $testout
diff --git a/io/futimens.c b/io/futimens.c
index 3fe8be596b..cda95a8cfe 100644
--- a/io/futimens.c
+++ b/io/futimens.c
@@ -1,5 +1,5 @@
/* Change access and modification times of open file. Linux version.
- 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/io/fxstat.c b/io/fxstat.c
index 1b61fde565..c91eac5a2d 100644
--- a/io/fxstat.c
+++ b/io/fxstat.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/io/fxstat64.c b/io/fxstat64.c
index c8a9646faa..31ace24c0b 100644
--- a/io/fxstat64.c
+++ b/io/fxstat64.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/io/fxstatat.c b/io/fxstatat.c
index ecb65fe455..fbf74d3c7e 100644
--- a/io/fxstatat.c
+++ b/io/fxstatat.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/io/fxstatat64.c b/io/fxstatat64.c
index f3c80938d9..3faf88b50f 100644
--- a/io/fxstatat64.c
+++ b/io/fxstatat64.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/io/getcwd.c b/io/getcwd.c
index 89caf62b16..c6d0443f17 100644
--- a/io/getcwd.c
+++ b/io/getcwd.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/io/getdirname.c b/io/getdirname.c
index 88febbe381..9e334de98c 100644
--- a/io/getdirname.c
+++ b/io/getdirname.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/io/getwd.c b/io/getwd.c
index cc0bee8e61..bbda67c6e2 100644
--- a/io/getwd.c
+++ b/io/getwd.c
@@ -1,5 +1,5 @@
/* Obsolete function to get current working directory.
- 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/io/have_o_cloexec.c b/io/have_o_cloexec.c
index 4a6cd173ed..0b61a44859 100644
--- a/io/have_o_cloexec.c
+++ b/io/have_o_cloexec.c
@@ -1,4 +1,4 @@
-/* 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/io/isatty.c b/io/isatty.c
index 182d07012b..ea68464d2b 100644
--- a/io/isatty.c
+++ b/io/isatty.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/io/lchmod.c b/io/lchmod.c
index cb64f93ca3..a4a9ca8555 100644
--- a/io/lchmod.c
+++ b/io/lchmod.c
@@ -1,5 +1,5 @@
/* lchmod -- Change the protections of a file or symbolic link. 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/io/lchown.c b/io/lchown.c
index 2ffb426444..eceaf62ad2 100644
--- a/io/lchown.c
+++ b/io/lchown.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/io/link.c b/io/link.c
index 6501ceb2cc..1a42557dbc 100644
--- a/io/link.c
+++ b/io/link.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/io/linkat.c b/io/linkat.c
index e01ffdba8f..b999f24d73 100644
--- a/io/linkat.c
+++ b/io/linkat.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/io/lockf.c b/io/lockf.c
index a73092f035..6a10bf2830 100644
--- a/io/lockf.c
+++ b/io/lockf.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/io/lockf64.c b/io/lockf64.c
index c4500d72b3..131b0703d5 100644
--- a/io/lockf64.c
+++ b/io/lockf64.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/io/lseek.c b/io/lseek.c
index 91be3c5e4b..ac90483862 100644
--- a/io/lseek.c
+++ b/io/lseek.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/io/lseek64.c b/io/lseek64.c
index 39e2f40bdf..dab4d5daea 100644
--- a/io/lseek64.c
+++ b/io/lseek64.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/io/lstat.c b/io/lstat.c
index 9592f3b7ed..17557086bc 100644
--- a/io/lstat.c
+++ b/io/lstat.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/io/lstat64.c b/io/lstat64.c
index f8f4f0e1eb..e159600eb6 100644
--- a/io/lstat64.c
+++ b/io/lstat64.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/io/lxstat.c b/io/lxstat.c
index 8f58c92fb2..e83672f9ab 100644
--- a/io/lxstat.c
+++ b/io/lxstat.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/io/lxstat64.c b/io/lxstat64.c
index eb6745d9f7..4083c2519d 100644
--- a/io/lxstat64.c
+++ b/io/lxstat64.c
@@ -1,5 +1,5 @@
/* lxstat64 -- get file metadata, not following symlinks. Stub version.
- 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/io/mkdir.c b/io/mkdir.c
index 4ffa5c0893..e1dfe8400e 100644
--- a/io/mkdir.c
+++ b/io/mkdir.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/io/mkdirat.c b/io/mkdirat.c
index f3f4a09caf..7ba3145d1b 100644
--- a/io/mkdirat.c
+++ b/io/mkdirat.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/io/mkfifo.c b/io/mkfifo.c
index 616632da56..fddd6c97b8 100644
--- a/io/mkfifo.c
+++ b/io/mkfifo.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/io/mkfifoat.c b/io/mkfifoat.c
index 748d934747..311e0097b0 100644
--- a/io/mkfifoat.c
+++ b/io/mkfifoat.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/io/mknod.c b/io/mknod.c
index 3701e5dc15..1f185cd410 100644
--- a/io/mknod.c
+++ b/io/mknod.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/io/mknodat.c b/io/mknodat.c
index c59b964d7a..80285e7732 100644
--- a/io/mknodat.c
+++ b/io/mknodat.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/io/open.c b/io/open.c
index 24aa380339..c0000bacd6 100644
--- a/io/open.c
+++ b/io/open.c
@@ -1,5 +1,5 @@
/* Open a file by name. Stub version.
- 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
@@ -23,7 +23,7 @@
#include <stdio.h>
-/* Open FILE with access OFLAG. If OFLAG includes O_CREAT,
+/* Open FILE with access OFLAG. If O_CREAT or O_TMPFILE is in OFLAG,
a third argument is the file protection. */
int
__libc_open (file, oflag)
@@ -38,7 +38,7 @@ __libc_open (file, oflag)
return -1;
}
- if (oflag & O_CREAT)
+ if (__OPEN_NEEDS_MODE (oflag))
{
va_list arg;
va_start(arg, oflag);
diff --git a/io/open64.c b/io/open64.c
index 3f3d2e8bbd..f87ee57099 100644
--- a/io/open64.c
+++ b/io/open64.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,7 +21,7 @@
#include <stddef.h>
#include <stdio.h>
-/* Open FILE with access OFLAG. If OFLAG includes O_CREAT,
+/* Open FILE with access OFLAG. If O_CREAT or O_TMPFILE is in OFLAG,
a third argument is the file protection. */
int
__libc_open64 (file, oflag)
@@ -36,7 +36,7 @@ __libc_open64 (file, oflag)
return -1;
}
- if (oflag & O_CREAT)
+ if (__OPEN_NEEDS_MODE (oflag))
{
va_list arg;
va_start (arg, oflag);
diff --git a/io/open64_2.c b/io/open64_2.c
index 7cafbba4fc..0fd562dc0f 100644
--- a/io/open64_2.c
+++ b/io/open64_2.c
@@ -1,5 +1,5 @@
/* _FORTIFY_SOURCE wrapper for open64.
- Copyright (C) 2013-2014 Free Software Foundation, Inc.
+ Copyright (C) 2013-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,8 +22,8 @@
int
__open64_2 (const char *file, int oflag)
{
- if (oflag & O_CREAT)
- __fortify_fail ("invalid open64 call: O_CREAT without mode");
+ if (__OPEN_NEEDS_MODE (oflag))
+ __fortify_fail ("invalid open64 call: O_CREAT or O_TMPFILE without mode");
return __open64 (file, oflag);
}
diff --git a/io/open_2.c b/io/open_2.c
index 65d2c1c845..f11ebe00bb 100644
--- a/io/open_2.c
+++ b/io/open_2.c
@@ -1,5 +1,5 @@
/* _FORTIFY_SOURCE wrapper for open.
- Copyright (C) 2013-2014 Free Software Foundation, Inc.
+ Copyright (C) 2013-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,8 +22,8 @@
int
__open_2 (const char *file, int oflag)
{
- if (oflag & O_CREAT)
- __fortify_fail ("invalid open call: O_CREAT without mode");
+ if (__OPEN_NEEDS_MODE (oflag))
+ __fortify_fail ("invalid open call: O_CREAT or O_TMPFILE without mode");
return __open (file, oflag);
}
diff --git a/io/openat.c b/io/openat.c
index 2d822702af..08d61843fa 100644
--- a/io/openat.c
+++ b/io/openat.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
@@ -22,6 +22,7 @@
#include <stdio.h>
#include <sys/stat.h>
#include <kernel-features.h>
+#include <libc-internal.h>
/* Some mostly-generic code (e.g. sysdeps/posix/getcwd.c) uses this variable
if __ASSUME_ATFCTS is not defined. */
@@ -30,13 +31,10 @@ int __have_atfcts;
#endif
/* Open FILE with access OFLAG. Interpret relative paths relative to
- the directory associated with FD. If OFLAG includes O_CREAT, a
+ the directory associated with FD. If O_CREAT or O_TMPFILE is in OFLAG, a
third argument is the file protection. */
int
-__openat (fd, file, oflag)
- int fd;
- const char *file;
- int oflag;
+__openat (int fd, const char *file, int oflag, ...)
{
int mode;
@@ -60,12 +58,14 @@ __openat (fd, file, oflag)
}
}
- if (oflag & O_CREAT)
+ if (__OPEN_NEEDS_MODE (oflag))
{
va_list arg;
va_start (arg, oflag);
mode = va_arg (arg, int);
va_end (arg);
+
+ ignore_value (mode);
}
__set_errno (ENOSYS);
diff --git a/io/openat64.c b/io/openat64.c
index c0c4e19589..060fdf9045 100644
--- a/io/openat64.c
+++ b/io/openat64.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
@@ -21,15 +21,13 @@
#include <stddef.h>
#include <stdio.h>
#include <sys/stat.h>
+#include <libc-internal.h>
/* Open FILE with access OFLAG. Interpret relative paths relative to
- the directory associated with FD. If OFLAG includes O_CREAT, a
+ the directory associated with FD. If O_CREAT or O_TMPFILE is in OFLAG, a
third argument is the file protection. */
int
-__openat64 (fd, file, oflag)
- int fd;
- const char *file;
- int oflag;
+__openat64 (int fd, const char *file, int oflag, ...)
{
int mode;
@@ -53,12 +51,14 @@ __openat64 (fd, file, oflag)
}
}
- if (oflag & O_CREAT)
+ if (__OPEN_NEEDS_MODE (oflag))
{
va_list arg;
va_start (arg, oflag);
mode = va_arg (arg, int);
va_end (arg);
+
+ ignore_value (mode);
}
__set_errno (ENOSYS);
diff --git a/io/openat64_2.c b/io/openat64_2.c
index 6cfea6a9aa..8548c3d557 100644
--- a/io/openat64_2.c
+++ b/io/openat64_2.c
@@ -1,5 +1,5 @@
/* _FORTIFY_SOURCE wrapper for openat64.
- Copyright (C) 2013-2014 Free Software Foundation, Inc.
+ Copyright (C) 2013-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,8 +22,8 @@
int
__openat64_2 (int fd, const char *file, int oflag)
{
- if (oflag & O_CREAT)
- __fortify_fail ("invalid openat64 call: O_CREAT without mode");
+ if (__OPEN_NEEDS_MODE (oflag))
+ __fortify_fail ("invalid openat64 call: O_CREAT or O_TMPFILE without mode");
return __openat64 (fd, file, oflag);
}
diff --git a/io/openat_2.c b/io/openat_2.c
index 9e38c14267..54a98bece8 100644
--- a/io/openat_2.c
+++ b/io/openat_2.c
@@ -1,5 +1,5 @@
/* _FORTIFY_SOURCE wrapper for openat.
- Copyright (C) 2013-2014 Free Software Foundation, Inc.
+ Copyright (C) 2013-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,8 +22,8 @@
int
__openat_2 (int fd, const char *file, int oflag)
{
- if (oflag & O_CREAT)
- __fortify_fail ("invalid openat call: O_CREAT without mode");
+ if (__OPEN_NEEDS_MODE (oflag))
+ __fortify_fail ("invalid openat call: O_CREAT or O_TMPFILE without mode");
return __openat (fd, file, oflag);
}
diff --git a/io/pipe.c b/io/pipe.c
index 7b113f5bbc..8cc20f1ae0 100644
--- a/io/pipe.c
+++ b/io/pipe.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/io/pipe2.c b/io/pipe2.c
index 7f60b484e1..d06ed7af9f 100644
--- a/io/pipe2.c
+++ b/io/pipe2.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/io/poll.c b/io/poll.c
index 976640c13e..dbba44753e 100644
--- a/io/poll.c
+++ b/io/poll.c
@@ -1,5 +1,5 @@
/* Poll (or wait) for file descriptor I/O availability. 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/io/posix_fadvise.c b/io/posix_fadvise.c
index b3084658c2..9205c6799d 100644
--- a/io/posix_fadvise.c
+++ b/io/posix_fadvise.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/io/posix_fadvise64.c b/io/posix_fadvise64.c
index 456b2bd6a9..50cd39af6b 100644
--- a/io/posix_fadvise64.c
+++ b/io/posix_fadvise64.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/io/posix_fallocate.c b/io/posix_fallocate.c
index d9b2b9881d..8eefc625fc 100644
--- a/io/posix_fallocate.c
+++ b/io/posix_fallocate.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
@@ -23,7 +23,6 @@
int
posix_fallocate (int fd, __off_t offset, __off_t len)
{
- __set_errno (ENOSYS);
- return -1;
+ return ENOSYS;
}
stub_warning (posix_fallocate)
diff --git a/io/posix_fallocate64.c b/io/posix_fallocate64.c
index 1ff698d978..05922d16e6 100644
--- a/io/posix_fallocate64.c
+++ b/io/posix_fallocate64.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
@@ -23,7 +23,6 @@
int
posix_fallocate64 (int fd, __off64_t offset, __off64_t len)
{
- __set_errno (ENOSYS);
- return -1;
+ return ENOSYS;
}
stub_warning (posix_fallocate64)
diff --git a/io/ppoll.c b/io/ppoll.c
index e31c7d4388..f64c737913 100644
--- a/io/ppoll.c
+++ b/io/ppoll.c
@@ -1,4 +1,4 @@
-/* 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.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2006.
diff --git a/io/pwd.c b/io/pwd.c
index ea0731ecbc..c2c78441cb 100644
--- a/io/pwd.c
+++ b/io/pwd.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/io/read.c b/io/read.c
index 0b579acfd0..7725fda9e0 100644
--- a/io/read.c
+++ b/io/read.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/io/readlink.c b/io/readlink.c
index 93de80325f..4516e6401c 100644
--- a/io/readlink.c
+++ b/io/readlink.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/io/readlinkat.c b/io/readlinkat.c
index 62cfa17353..63b48ea1fe 100644
--- a/io/readlinkat.c
+++ b/io/readlinkat.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/io/rmdir.c b/io/rmdir.c
index 4a6fc0c86b..f4ad1662b5 100644
--- a/io/rmdir.c
+++ b/io/rmdir.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/io/sendfile.c b/io/sendfile.c
index 26d1e4c28e..22a0d134b8 100644
--- a/io/sendfile.c
+++ b/io/sendfile.c
@@ -1,5 +1,5 @@
/* sendfile -- copy data directly from one file descriptor to another
- 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/io/sendfile64.c b/io/sendfile64.c
index 341dcd2271..7126eca0f8 100644
--- a/io/sendfile64.c
+++ b/io/sendfile64.c
@@ -1,5 +1,5 @@
/* sendfile -- copy data directly from one file descriptor to another
- 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/io/stat.c b/io/stat.c
index c37a6a1e78..c0302e571d 100644
--- a/io/stat.c
+++ b/io/stat.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/io/stat64.c b/io/stat64.c
index 3afe141251..2bcb8f09c9 100644
--- a/io/stat64.c
+++ b/io/stat64.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/io/statfs.c b/io/statfs.c
index 1652006574..fbad09fc10 100644
--- a/io/statfs.c
+++ b/io/statfs.c
@@ -1,5 +1,5 @@
/* statfs -- Return information about the filesystem on which FILE resides.
- 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/io/statfs64.c b/io/statfs64.c
index 37a23a9e47..8a893e800f 100644
--- a/io/statfs64.c
+++ b/io/statfs64.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/io/statvfs.c b/io/statvfs.c
index 34480e72ec..a3f210bb12 100644
--- a/io/statvfs.c
+++ b/io/statvfs.c
@@ -1,5 +1,5 @@
/* Return information about the filesystem on which FILE resides.
- 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/io/statvfs64.c b/io/statvfs64.c
index 5caf7ecd25..c2203e2ba0 100644
--- a/io/statvfs64.c
+++ b/io/statvfs64.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/io/symlink.c b/io/symlink.c
index 53ae05b3c0..77d1203007 100644
--- a/io/symlink.c
+++ b/io/symlink.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/io/symlinkat.c b/io/symlinkat.c
index ce70409a06..0c8747d3c2 100644
--- a/io/symlinkat.c
+++ b/io/symlinkat.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/io/sys/poll.h b/io/sys/poll.h
index 35d2f0beb4..dc097daa29 100644
--- a/io/sys/poll.h
+++ b/io/sys/poll.h
@@ -1,5 +1,5 @@
/* Compatibility definitions for System V `poll' interface.
- 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/io/sys/sendfile.h b/io/sys/sendfile.h
index 3cccab62a8..1d2a698817 100644
--- a/io/sys/sendfile.h
+++ b/io/sys/sendfile.h
@@ -1,5 +1,5 @@
/* sendfile -- copy data directly from one file descriptor to another
- 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/io/sys/stat.h b/io/sys/stat.h
index 63e64dd777..5c571a921e 100644
--- a/io/sys/stat.h
+++ b/io/sys/stat.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
@@ -26,12 +26,11 @@
#include <bits/types.h> /* For __mode_t and __dev_t. */
-#if defined __USE_XOPEN || defined __USE_XOPEN2K || defined __USE_MISC \
- || defined __USE_ATFILE
+#if defined __USE_XOPEN || defined __USE_XOPEN2K || defined __USE_ATFILE
# if defined __USE_XOPEN || defined __USE_XOPEN2K
# define __need_time_t
# endif
-# if defined __USE_MISC || defined __USE_ATFILE
+# ifdef __USE_ATFILE
# define __need_timespec
# endif
# include <time.h> /* For time_t resp. timespec. */
@@ -104,7 +103,7 @@ __BEGIN_DECLS
#include <bits/stat.h>
-#if defined __USE_BSD || defined __USE_MISC || defined __USE_XOPEN
+#if defined __USE_MISC || defined __USE_XOPEN
# define S_IFMT __S_IFMT
# define S_IFDIR __S_IFDIR
# define S_IFCHR __S_IFCHR
@@ -116,7 +115,7 @@ __BEGIN_DECLS
# ifdef __S_IFLNK
# define S_IFLNK __S_IFLNK
# endif
-# if (defined __USE_BSD || defined __USE_MISC || defined __USE_UNIX98) \
+# if (defined __USE_MISC || defined __USE_UNIX98) \
&& defined __S_IFSOCK
# define S_IFSOCK __S_IFSOCK
# endif
@@ -137,11 +136,11 @@ __BEGIN_DECLS
# define S_ISLNK(mode) __S_ISTYPE((mode), __S_IFLNK)
#endif
-#if defined __USE_BSD && !defined __S_IFLNK
+#if defined __USE_MISC && !defined __S_IFLNK
# define S_ISLNK(mode) 0
#endif
-#if (defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K) \
+#if (defined __USE_UNIX98 || defined __USE_XOPEN2K) \
&& defined __S_IFSOCK
# define S_ISSOCK(mode) __S_ISTYPE((mode), __S_IFSOCK)
#elif defined __USE_XOPEN2K
@@ -164,7 +163,7 @@ __BEGIN_DECLS
#define S_ISUID __S_ISUID /* Set user ID on execution. */
#define S_ISGID __S_ISGID /* Set group ID on execution. */
-#if defined __USE_BSD || defined __USE_MISC || defined __USE_XOPEN
+#if defined __USE_MISC || defined __USE_XOPEN
/* Save swapped text after use (sticky bit). This is pretty well obsolete. */
# define S_ISVTX __S_ISVTX
#endif
@@ -175,7 +174,7 @@ __BEGIN_DECLS
/* Read, write, and execute by owner. */
#define S_IRWXU (__S_IREAD|__S_IWRITE|__S_IEXEC)
-#if defined __USE_MISC && defined __USE_BSD
+#ifdef __USE_MISC
# define S_IREAD S_IRUSR
# define S_IWRITE S_IWUSR
# define S_IEXEC S_IXUSR
@@ -194,7 +193,7 @@ __BEGIN_DECLS
#define S_IRWXO (S_IRWXG >> 3)
-#ifdef __USE_BSD
+#ifdef __USE_MISC
/* Macros for common mode bit masks. */
# define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) /* 0777 */
# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */
@@ -256,7 +255,7 @@ extern int fstatat64 (int __fd, const char *__restrict __file,
# endif
#endif
-#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K
+#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K
# ifndef __USE_FILE_OFFSET64
/* Get file attributes about FILE and put them in BUF.
If FILE is a symbolic link, do not follow it. */
@@ -284,7 +283,7 @@ extern int lstat64 (const char *__restrict __file,
extern int chmod (const char *__file, __mode_t __mode)
__THROW __nonnull ((1));
-#ifdef __USE_BSD
+#ifdef __USE_MISC
/* Set file access permissions for FILE to MODE.
If FILE is a symbolic link, this affects the link itself
rather than its target. */
@@ -293,7 +292,7 @@ extern int lchmod (const char *__file, __mode_t __mode)
#endif
/* Set file access permissions of the file FD is open on to MODE. */
-#if defined __USE_BSD || defined __USE_POSIX
+#ifdef __USE_POSIX
extern int fchmod (int __fd, __mode_t __mode) __THROW;
#endif
@@ -332,7 +331,7 @@ extern int mkdirat (int __fd, const char *__path, __mode_t __mode)
/* Create a device file named PATH, with permission and special bits MODE
and device number DEV (which can be constructed from major and minor
device numbers with the `makedev' macro above). */
-#if defined __USE_MISC || defined __USE_BSD || defined __USE_XOPEN_EXTENDED
+#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
extern int mknod (const char *__path, __mode_t __mode, __dev_t __dev)
__THROW __nonnull ((1));
@@ -455,7 +454,7 @@ __NTH (stat (const char *__path, struct stat *__statbuf))
return __xstat (_STAT_VER, __path, __statbuf);
}
-# if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
+# if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
__extern_inline int
__NTH (lstat (const char *__path, struct stat *__statbuf))
{
@@ -478,7 +477,7 @@ __NTH (fstatat (int __fd, const char *__filename, struct stat *__statbuf,
}
# endif
-# if defined __USE_MISC || defined __USE_BSD
+# ifdef __USE_MISC
__extern_inline int
__NTH (mknod (const char *__path, __mode_t __mode, __dev_t __dev))
{
@@ -504,7 +503,7 @@ __NTH (stat64 (const char *__path, struct stat64 *__statbuf))
return __xstat64 (_STAT_VER, __path, __statbuf);
}
-# if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
+# if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
__extern_inline int
__NTH (lstat64 (const char *__path, struct stat64 *__statbuf))
{
diff --git a/io/sys/statfs.h b/io/sys/statfs.h
index a78481e02d..531b44b3dd 100644
--- a/io/sys/statfs.h
+++ b/io/sys/statfs.h
@@ -1,5 +1,5 @@
/* Definitions for getting information about a filesystem.
- 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/io/sys/statvfs.h b/io/sys/statvfs.h
index 5264385442..175badcb97 100644
--- a/io/sys/statvfs.h
+++ b/io/sys/statvfs.h
@@ -1,5 +1,5 @@
/* Definitions for getting information about a filesystem.
- 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/io/test-lfs.c b/io/test-lfs.c
index ec32cc1095..539c2a2b14 100644
--- a/io/test-lfs.c
+++ b/io/test-lfs.c
@@ -1,5 +1,5 @@
/* Some basic tests for LFS.
- 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.
Contributed by Andreas Jaeger <aj@suse.de>, 2000.
diff --git a/io/test-stat.c b/io/test-stat.c
index c5cfd26fe5..a58e1b2868 100644
--- a/io/test-stat.c
+++ b/io/test-stat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2014 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2015 Free Software Foundation, Inc.
Contributed by Maciej W. Rozycki <macro@ds2.pg.gda.pl>, 2000.
This file is part of the GNU C Library.
@@ -25,8 +25,8 @@
#include <stddef.h>
#include <sys/stat.h>
-int
-main (void)
+static int
+do_test (void)
{
/* With _FILE_OFFSET_BITS=64 struct stat and struct stat64 should
be identical. */
@@ -65,3 +65,6 @@ main (void)
#endif
return 0;
}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/io/test-stat2.c b/io/test-stat2.c
index 89eb73e52a..d2b7f25328 100644
--- a/io/test-stat2.c
+++ b/io/test-stat2.c
@@ -1,5 +1,5 @@
/* Test consistence of results of stat and stat64.
- 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.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2000.
diff --git a/io/test-utime.c b/io/test-utime.c
index 26a5464ce9..085926cb08 100644
--- a/io/test-utime.c
+++ b/io/test-utime.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
@@ -109,25 +109,29 @@ main (int argc, char *argv[])
if (st.st_mtime != ut.modtime)
{
- printf ("modtime %ld != %ld\n", st.st_mtime, ut.modtime);
+ printf ("modtime %jd != %jd\n",
+ (intmax_t) st.st_mtime, (intmax_t) ut.modtime);
return 1;
}
if (st.st_atime != ut.actime)
{
- printf ("actime %ld != %ld\n", st.st_atime, ut.actime);
+ printf ("actime %jd != %jd\n",
+ (intmax_t) st.st_atime, (intmax_t) ut.actime);
return 1;
}
if (stnow.st_mtime < now1 || stnow.st_mtime > now2)
{
- printf ("modtime %ld <%ld >%ld\n", stnow.st_mtime, now1, now2);
+ printf ("modtime %jd <%jd >%jd\n",
+ (intmax_t) stnow.st_mtime, (intmax_t) now1, (intmax_t) now2);
return 1;
}
if (stnow.st_atime < now1 || stnow.st_atime > now2)
{
- printf ("actime %ld <%ld >%ld\n", stnow.st_atime, now1, now2);
+ printf ("actime %jd <%jd >%jd\n",
+ (intmax_t) stnow.st_atime, (intmax_t) now1, (intmax_t) now2);
return 1;
}
diff --git a/io/tst-fcntl.c b/io/tst-fcntl.c
index bf7eb7d1d4..dfdb42eea4 100644
--- a/io/tst-fcntl.c
+++ b/io/tst-fcntl.c
@@ -1,5 +1,5 @@
/* Tests for fcntl.
- 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.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 2000.
diff --git a/io/tst-getcwd.c b/io/tst-getcwd.c
index 0db4d01146..858d7ba4dd 100644
--- a/io/tst-getcwd.c
+++ b/io/tst-getcwd.c
@@ -1,5 +1,5 @@
/* Test of getcwd function.
- 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.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 2000.
diff --git a/io/ttyname.c b/io/ttyname.c
index 8bc31c6d7c..6332d29916 100644
--- a/io/ttyname.c
+++ b/io/ttyname.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/io/ttyname_r.c b/io/ttyname_r.c
index e7028cc160..50dbd67467 100644
--- a/io/ttyname_r.c
+++ b/io/ttyname_r.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/io/umask.c b/io/umask.c
index 29b518b41b..2afb8372c3 100644
--- a/io/umask.c
+++ b/io/umask.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/io/unlink.c b/io/unlink.c
index 989f608bc9..65ec5c66ca 100644
--- a/io/unlink.c
+++ b/io/unlink.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/io/unlinkat.c b/io/unlinkat.c
index dd8933baa5..9122d73c41 100644
--- a/io/unlinkat.c
+++ b/io/unlinkat.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/io/utime.c b/io/utime.c
index c56a6e1284..830d3414e9 100644
--- a/io/utime.c
+++ b/io/utime.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/io/utime.h b/io/utime.h
index 727e107aef..9fbfc193aa 100644
--- a/io/utime.h
+++ b/io/utime.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/io/utimensat.c b/io/utimensat.c
index dea4294946..7c878da984 100644
--- a/io/utimensat.c
+++ b/io/utimensat.c
@@ -1,5 +1,5 @@
/* Change access and modification times of open file. Stub version.
- 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/io/write.c b/io/write.c
index e4ed8e8bc2..2bc8662364 100644
--- a/io/write.c
+++ b/io/write.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/io/xmknod.c b/io/xmknod.c
index 7f17daf043..e5dd951c2e 100644
--- a/io/xmknod.c
+++ b/io/xmknod.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/io/xmknodat.c b/io/xmknodat.c
index 876257d103..e92817e3d2 100644
--- a/io/xmknodat.c
+++ b/io/xmknodat.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/io/xstat.c b/io/xstat.c
index 0465ac25b9..03c6edeb2b 100644
--- a/io/xstat.c
+++ b/io/xstat.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/io/xstat64.c b/io/xstat64.c
index f072d1063b..3ef4c42a50 100644
--- a/io/xstat64.c
+++ b/io/xstat64.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