summaryrefslogtreecommitdiff
path: root/bits
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2016-08-20 20:54:39 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2016-08-20 20:54:39 +0200
commit29af7775cfef6ed3b466b92e44387574122ed61b (patch)
treec968738daba6d87d69dc4e8b4cb1445a7b6420cb /bits
parent4893e0ed57daaff901442bacc10ae09cd3e1850f (diff)
parentf76453c31593957fec1a99b986bfa5506618b79c (diff)
Merge branch 'baseline' into refs/top-bases/tschwinge/Roger_Whittaker
Diffstat (limited to 'bits')
-rw-r--r--bits/atomic.h2
-rw-r--r--bits/byteswap-16.h2
-rw-r--r--bits/byteswap.h2
-rw-r--r--bits/confname.h2
-rw-r--r--bits/dirent.h2
-rw-r--r--bits/dlfcn.h2
-rw-r--r--bits/environments.h2
-rw-r--r--bits/errno.h2
-rw-r--r--bits/fcntl.h8
-rw-r--r--bits/fenv.h2
-rw-r--r--bits/huge_val.h2
-rw-r--r--bits/huge_valf.h2
-rw-r--r--bits/huge_vall.h2
-rw-r--r--bits/in.h2
-rw-r--r--bits/inf.h2
-rw-r--r--bits/ioctl-types.h20
-rw-r--r--bits/ipc.h2
-rw-r--r--bits/ipctypes.h2
-rw-r--r--bits/libc-lock.h2
-rw-r--r--bits/libc-tsd.h2
-rw-r--r--bits/libm-simd-decl-stubs.h59
-rw-r--r--bits/math-vector.h27
-rw-r--r--bits/mathdef.h8
-rw-r--r--bits/mman-linux.h111
-rw-r--r--bits/mman.h14
-rw-r--r--bits/mqueue.h2
-rw-r--r--bits/msq.h2
-rw-r--r--bits/netdb.h2
-rw-r--r--bits/param.h2
-rw-r--r--bits/poll.h2
-rw-r--r--bits/resource.h2
-rw-r--r--bits/sched.h2
-rw-r--r--bits/select.h2
-rw-r--r--bits/sem.h2
-rw-r--r--bits/shm.h2
-rw-r--r--bits/sigaction.h4
-rw-r--r--bits/sigcontext.h2
-rw-r--r--bits/siginfo.h78
-rw-r--r--bits/signum.h18
-rw-r--r--bits/sigset.h12
-rw-r--r--bits/sigstack.h2
-rw-r--r--bits/sigthread.h2
-rw-r--r--bits/sockaddr.h2
-rw-r--r--bits/socket.h2
-rw-r--r--bits/stat.h2
-rw-r--r--bits/statfs.h2
-rw-r--r--bits/statvfs.h2
-rw-r--r--bits/stdio-lock.h4
-rw-r--r--bits/stdlib-bsearch.h2
-rw-r--r--bits/string.h2
-rw-r--r--bits/stropts.h2
-rw-r--r--bits/sys_errlist.h2
-rw-r--r--bits/syslog-path.h2
-rw-r--r--bits/termios.h46
-rw-r--r--bits/time.h10
-rw-r--r--bits/types.h2
-rw-r--r--bits/typesizes.h2
-rw-r--r--bits/uio.h2
-rw-r--r--bits/ustat.h2
-rw-r--r--bits/utmp.h2
-rw-r--r--bits/utsname.h8
-rw-r--r--bits/waitflags.h2
-rw-r--r--bits/waitstatus.h6
-rw-r--r--bits/wchar.h2
-rw-r--r--bits/xtitypes.h2
65 files changed, 375 insertions, 156 deletions
diff --git a/bits/atomic.h b/bits/atomic.h
index a3d1fa1c56..0a7b9c5a9f 100644
--- a/bits/atomic.h
+++ b/bits/atomic.h
@@ -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.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
diff --git a/bits/byteswap-16.h b/bits/byteswap-16.h
index 10c181a00c..8d64295b60 100644
--- a/bits/byteswap-16.h
+++ b/bits/byteswap-16.h
@@ -1,5 +1,5 @@
/* Macros to swap the order of bytes in 16-bit integer values.
- 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/bits/byteswap.h b/bits/byteswap.h
index 99b7fed302..b5528c24d7 100644
--- a/bits/byteswap.h
+++ b/bits/byteswap.h
@@ -1,5 +1,5 @@
/* Macros to swap the order of bytes in integer values.
- 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/bits/confname.h b/bits/confname.h
index bf2fcc53fb..1c714dfbf9 100644
--- a/bits/confname.h
+++ b/bits/confname.h
@@ -1,5 +1,5 @@
/* `sysconf', `pathconf', and `confstr' NAME values. Generic version.
- 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/bits/dirent.h b/bits/dirent.h
index 3a5466ba09..a6d2eb2d55 100644
--- a/bits/dirent.h
+++ b/bits/dirent.h
@@ -1,5 +1,5 @@
/* Directory entry structure `struct dirent'. 4.4BSD/Generic 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/bits/dlfcn.h b/bits/dlfcn.h
index 836b24670e..783d2177f0 100644
--- a/bits/dlfcn.h
+++ b/bits/dlfcn.h
@@ -1,5 +1,5 @@
/* System dependent definitions for run-time dynamic loading.
- 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/bits/environments.h b/bits/environments.h
index 46f8cb85ce..e9834c7c1e 100644
--- a/bits/environments.h
+++ b/bits/environments.h
@@ -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/bits/errno.h b/bits/errno.h
index bd21da2c9e..b34e7e4a6f 100644
--- a/bits/errno.h
+++ b/bits/errno.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/bits/fcntl.h b/bits/fcntl.h
index 61b42dc166..f273f84221 100644
--- a/bits/fcntl.h
+++ b/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values. 4.4BSD/Generic 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
@@ -58,11 +58,11 @@
#define O_APPEND 0x0008 /* Writes append to the file. */
#define O_NONBLOCK 0x0004 /* Non-blocking I/O. */
-#ifdef __USE_BSD
+#ifdef __USE_MISC
# define O_NDELAY O_NONBLOCK
#endif
-#ifdef __USE_BSD
+#ifdef __USE_MISC
/* Bits in the file status flags returned by F_GETFL.
These are all the O_* flags, plus FREAD and FWRITE, which are
independent bits set by which of O_RDONLY, O_WRONLY, and O_RDWR, was
@@ -88,7 +88,7 @@
#define F_SETFD 2 /* Set file descriptor flags. */
#define F_GETFL 3 /* Get file status flags. */
#define F_SETFL 4 /* Set file status flags. */
-#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K8
+#if defined __USE_UNIX98 || defined __USE_XOPEN2K8
#define F_GETOWN 5 /* Get owner (receiver of SIGIO). */
#define F_SETOWN 6 /* Set owner (receiver of SIGIO). */
#endif
diff --git a/bits/fenv.h b/bits/fenv.h
index 5e8b4b4547..a52aa214a9 100644
--- a/bits/fenv.h
+++ b/bits/fenv.h
@@ -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/bits/huge_val.h b/bits/huge_val.h
index 77fe4a2d17..a49a685d74 100644
--- a/bits/huge_val.h
+++ b/bits/huge_val.h
@@ -1,6 +1,6 @@
/* Stub `HUGE_VAL' constant.
Used by <stdlib.h> and <math.h> functions for overflow.
- 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/bits/huge_valf.h b/bits/huge_valf.h
index 95d81a63b3..9f32f1a672 100644
--- a/bits/huge_valf.h
+++ b/bits/huge_valf.h
@@ -1,6 +1,6 @@
/* Stub `HUGE_VALF' constant.
Used by <stdlib.h> and <math.h> functions for overflow.
- 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/bits/huge_vall.h b/bits/huge_vall.h
index 0c330fe21d..b00a449054 100644
--- a/bits/huge_vall.h
+++ b/bits/huge_vall.h
@@ -1,6 +1,6 @@
/* Default `HUGE_VALL' constant.
Used by <stdlib.h> and <math.h> functions for overflow.
- 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/bits/in.h b/bits/in.h
index 11d858a2b7..4561accc5a 100644
--- a/bits/in.h
+++ b/bits/in.h
@@ -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/bits/inf.h b/bits/inf.h
index 25d1d19d00..e7a1b80a56 100644
--- a/bits/inf.h
+++ b/bits/inf.h
@@ -1,5 +1,5 @@
/* Default `INFINITY' constant.
- Copyright (C) 2004-2014 Free Software Foundation, Inc.
+ Copyright (C) 2004-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/bits/ioctl-types.h b/bits/ioctl-types.h
index 288f38c860..166bfbccef 100644
--- a/bits/ioctl-types.h
+++ b/bits/ioctl-types.h
@@ -1,5 +1,5 @@
/* Structure types for pre-termios terminal ioctls. Generic Unix 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
@@ -32,7 +32,7 @@ struct tchars
char t_brkc; /* Input delimiter character. */
};
-#define _IOT_tchars /* Hurd ioctl type field. */ \
+# define _IOT_tchars /* Hurd ioctl type field. */ \
_IOT (_IOTS (char), 6, 0, 0, 0, 0)
#endif
@@ -48,7 +48,7 @@ struct ltchars
char t_lnextc; /* Literal-next character. */
};
-#define _IOT_ltchars /* Hurd ioctl type field. */ \
+# define _IOT_ltchars /* Hurd ioctl type field. */ \
_IOT (_IOTS (char), 6, 0, 0, 0, 0)
#endif
@@ -77,7 +77,7 @@ struct winsize
unsigned short int ws_ypixel; /* Vertical pixels. */
};
-#define _IOT_winsize /* Hurd ioctl type field. */ \
+# define _IOT_winsize /* Hurd ioctl type field. */ \
_IOT (_IOTS (unsigned short int), 4, 0, 0, 0, 0)
#endif
@@ -86,8 +86,8 @@ struct winsize
in a preprocessor conditional. Since the commands are always unique
regardless of the size bits, we can safely define away `sizeof' for the
purpose of the conditional. */
-# define sizeof(type) 0
-# if defined TIOCGWINSZ && TIOCGSIZE == TIOCGWINSZ
+# define sizeof(type) 0
+# if defined TIOCGWINSZ && TIOCGSIZE == TIOCGWINSZ
/* Many systems that have TIOCGWINSZ define TIOCGSIZE for source
compatibility with Sun; they define `struct ttysize' to have identical
layout as `struct winsize' and #define TIOCGSIZE to be TIOCGWINSZ
@@ -99,8 +99,8 @@ struct ttysize
unsigned short int ts_xxx;
unsigned short int ts_yyy;
};
-#define _IOT_ttysize _IOT_winsize
-# else
+# define _IOT_ttysize _IOT_winsize
+# else
/* Suns use a different layout for `struct ttysize', and TIOCGSIZE and
TIOCGWINSZ are separate commands that do the same thing with different
structures (likewise TIOCSSIZE and TIOCSWINSZ). */
@@ -108,6 +108,6 @@ struct ttysize
{
int ts_lines, ts_cols; /* Lines and columns, in characters. */
};
-# endif
-# undef sizeof /* See above. */
+# endif
+# undef sizeof /* See above. */
#endif
diff --git a/bits/ipc.h b/bits/ipc.h
index 97d5a283df..85493d5c71 100644
--- a/bits/ipc.h
+++ b/bits/ipc.h
@@ -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/bits/ipctypes.h b/bits/ipctypes.h
index 592eeb15b8..ebbd4d250c 100644
--- a/bits/ipctypes.h
+++ b/bits/ipctypes.h
@@ -1,5 +1,5 @@
/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. Generic.
- 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/bits/libc-lock.h b/bits/libc-lock.h
index 7bd935caf4..4e7636b082 100644
--- a/bits/libc-lock.h
+++ b/bits/libc-lock.h
@@ -1,5 +1,5 @@
/* libc-internal interface for mutex locks. 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.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/bits/libc-tsd.h b/bits/libc-tsd.h
index c4249314c9..5889d2eaae 100644
--- a/bits/libc-tsd.h
+++ b/bits/libc-tsd.h
@@ -1,5 +1,5 @@
/* libc-internal interface for thread-specific data. Stub or TLS version.
- 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/bits/libm-simd-decl-stubs.h b/bits/libm-simd-decl-stubs.h
new file mode 100644
index 0000000000..ec1fa69d7d
--- /dev/null
+++ b/bits/libm-simd-decl-stubs.h
@@ -0,0 +1,59 @@
+/* Empty definitions required for __MATHCALL_VEC unfolding in mathcalls.h.
+ Copyright (C) 2014-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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _MATH_H
+# error "Never include <bits/libm-simd-decl-stubs.h> directly;\
+ include <math.h> instead."
+#endif
+
+/* Needed definitions could be generated with:
+ for func in $(grep __MATHCALL_VEC math/bits/mathcalls.h |\
+ sed -r "s|__MATHCALL_VEC.?\(||; s|,.*||"); do
+ echo "#define __DECL_SIMD_${func}";
+ echo "#define __DECL_SIMD_${func}f";
+ echo "#define __DECL_SIMD_${func}l";
+ done
+ */
+
+#ifndef _BITS_LIBM_SIMD_DECL_STUBS_H
+#define _BITS_LIBM_SIMD_DECL_STUBS_H 1
+
+#define __DECL_SIMD_cos
+#define __DECL_SIMD_cosf
+#define __DECL_SIMD_cosl
+
+#define __DECL_SIMD_sin
+#define __DECL_SIMD_sinf
+#define __DECL_SIMD_sinl
+
+#define __DECL_SIMD_sincos
+#define __DECL_SIMD_sincosf
+#define __DECL_SIMD_sincosl
+
+#define __DECL_SIMD_log
+#define __DECL_SIMD_logf
+#define __DECL_SIMD_logl
+
+#define __DECL_SIMD_exp
+#define __DECL_SIMD_expf
+#define __DECL_SIMD_expl
+
+#define __DECL_SIMD_pow
+#define __DECL_SIMD_powf
+#define __DECL_SIMD_powl
+#endif
diff --git a/bits/math-vector.h b/bits/math-vector.h
new file mode 100644
index 0000000000..a407a583cc
--- /dev/null
+++ b/bits/math-vector.h
@@ -0,0 +1,27 @@
+/* Platform-specific SIMD declarations of math functions.
+ Copyright (C) 2014-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
+ modify it under the terms of the GNU Lesser General Public
+ License published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _MATH_H
+# error "Never include <bits/math-vector.h> directly;\
+ include <math.h> instead."
+#endif
+
+/* Get default empty definitions required for __MATHCALL_VEC unfolding.
+ Plaform-specific analogue of this header should redefine them with specific
+ SIMD declarations. */
+#include <bits/libm-simd-decl-stubs.h>
diff --git a/bits/mathdef.h b/bits/mathdef.h
index ca1f464bce..bc3aa29812 100644
--- a/bits/mathdef.h
+++ b/bits/mathdef.h
@@ -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
@@ -35,15 +35,15 @@ typedef double double_t; /* `double' expressions are evaluated as
/* The GCC 4.6 compiler will define __FP_FAST_FMA{,F,L} if the fma{,f,l}
builtins are supported. */
-#if __FP_FAST_FMA
+#ifdef __FP_FAST_FMA
# define FP_FAST_FMA 1
#endif
-#if __FP_FAST_FMAF
+#ifdef __FP_FAST_FMAF
# define FP_FAST_FMAF 1
#endif
-#if __FP_FAST_FMAL
+#ifdef __FP_FAST_FMAL
# define FP_FAST_FMAL 1
#endif
diff --git a/bits/mman-linux.h b/bits/mman-linux.h
new file mode 100644
index 0000000000..cbdd9acc8a
--- /dev/null
+++ b/bits/mman-linux.h
@@ -0,0 +1,111 @@
+/* Definitions for POSIX memory map interface. Linux generic version.
+ 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_MMAN_H
+# error "Never use <bits/mman-linux.h> directly; include <sys/mman.h> instead."
+#endif
+
+/* The following definitions basically come from the kernel headers.
+ But the kernel header is not namespace clean.
+
+ This file is also used by some non-Linux configurations of the
+ GNU C Library, for other systems that use these same bit values. */
+
+
+/* Protections are chosen from these bits, OR'd together. The
+ implementation does not necessarily support PROT_EXEC or PROT_WRITE
+ without PROT_READ. The only guarantees are that no writing will be
+ allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */
+
+#define PROT_READ 0x1 /* Page can be read. */
+#define PROT_WRITE 0x2 /* Page can be written. */
+#define PROT_EXEC 0x4 /* Page can be executed. */
+#define PROT_NONE 0x0 /* Page can not be accessed. */
+#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of
+ growsdown vma (mprotect only). */
+#define PROT_GROWSUP 0x02000000 /* Extend change to start of
+ growsup vma (mprotect only). */
+
+/* Sharing types (must choose one and only one of these). */
+#define MAP_SHARED 0x01 /* Share changes. */
+#define MAP_PRIVATE 0x02 /* Changes are private. */
+#ifdef __USE_MISC
+# define MAP_TYPE 0x0f /* Mask for type of mapping. */
+#endif
+
+/* Other flags. */
+#define MAP_FIXED 0x10 /* Interpret addr exactly. */
+#ifdef __USE_MISC
+# define MAP_FILE 0
+# ifdef __MAP_ANONYMOUS
+# define MAP_ANONYMOUS __MAP_ANONYMOUS /* Don't use a file. */
+# else
+# define MAP_ANONYMOUS 0x20 /* Don't use a file. */
+# endif
+# define MAP_ANON MAP_ANONYMOUS
+/* When MAP_HUGETLB is set bits [26:31] encode the log2 of the huge page size. */
+# define MAP_HUGE_SHIFT 26
+# define MAP_HUGE_MASK 0x3f
+#endif
+
+/* Flags to `msync'. */
+#define MS_ASYNC 1 /* Sync memory asynchronously. */
+#define MS_SYNC 4 /* Synchronous memory sync. */
+#define MS_INVALIDATE 2 /* Invalidate the caches. */
+
+/* Flags for `mremap'. */
+#ifdef __USE_GNU
+# define MREMAP_MAYMOVE 1
+# define MREMAP_FIXED 2
+#endif
+
+/* Advice to `madvise'. */
+#ifdef __USE_MISC
+# define MADV_NORMAL 0 /* No further special treatment. */
+# define MADV_RANDOM 1 /* Expect random page references. */
+# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define MADV_WILLNEED 3 /* Will need these pages. */
+# define MADV_DONTNEED 4 /* Don't need these pages. */
+# define MADV_REMOVE 9 /* Remove these pages and resources. */
+# define MADV_DONTFORK 10 /* Do not inherit across fork. */
+# define MADV_DOFORK 11 /* Do inherit across fork. */
+# define MADV_MERGEABLE 12 /* KSM may merge identical pages. */
+# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */
+# define MADV_HUGEPAGE 14 /* Worth backing with hugepages. */
+# define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages. */
+# define MADV_DONTDUMP 16 /* Explicity exclude from the core dump,
+ overrides the coredump filter bits. */
+# define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag. */
+# define MADV_HWPOISON 100 /* Poison a page for testing. */
+#endif
+
+/* The POSIX people had to invent similar names for the same things. */
+#ifdef __USE_XOPEN2K
+# define POSIX_MADV_NORMAL 0 /* No further special treatment. */
+# define POSIX_MADV_RANDOM 1 /* Expect random page references. */
+# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */
+# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */
+# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */
+#endif
+
+/* Flags for `mlockall'. */
+#ifndef MCL_CURRENT
+# define MCL_CURRENT 1 /* Lock all currently mapped pages. */
+# define MCL_FUTURE 2 /* Lock all additions to address
+ space. */
+#endif
diff --git a/bits/mman.h b/bits/mman.h
index 360f0d0c98..1d9f6f8d9c 100644
--- a/bits/mman.h
+++ b/bits/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
@@ -37,17 +37,15 @@
/* Flags contain mapping type, sharing type and options. */
/* Mapping type (must choose one and only one of these). */
-#ifdef __USE_BSD
+#ifdef __USE_MISC
# define MAP_FILE 0x0001 /* Mapped from a file or device. */
# define MAP_ANON 0x0002 /* Allocated from anonymous virtual memory. */
# define MAP_TYPE 0x000f /* Mask for type field. */
-# ifdef __USE_MISC
-# define MAP_ANONYMOUS MAP_ANON /* Linux name. */
-# endif
+# define MAP_ANONYMOUS MAP_ANON /* Linux name. */
#endif
/* Sharing types (must choose one and only one of these). */
-#ifdef __USE_BSD
+#ifdef __USE_MISC
# define MAP_COPY 0x0020 /* Virtual copy of region at mapping time. */
#endif
#define MAP_SHARED 0x0010 /* Share changes. */
@@ -55,14 +53,14 @@
/* Other flags. */
#define MAP_FIXED 0x0100 /* Map address must be exactly as requested. */
-#ifdef __USE_BSD
+#ifdef __USE_MISC
# define MAP_NOEXTEND 0x0200 /* For MAP_FILE, don't change file size. */
# define MAP_HASSEMPHORE 0x0400 /* Region may contain semaphores. */
# define MAP_INHERIT 0x0800 /* Region is retained after exec. */
#endif
/* Advice to `madvise'. */
-#ifdef __USE_BSD
+#ifdef __USE_MISC
# define MADV_NORMAL 0 /* No further special treatment. */
# define MADV_RANDOM 1 /* Expect random page references. */
# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
diff --git a/bits/mqueue.h b/bits/mqueue.h
index c04e780447..690059c785 100644
--- a/bits/mqueue.h
+++ b/bits/mqueue.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004-2014 Free Software Foundation, Inc.
+/* Copyright (C) 2004-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/bits/msq.h b/bits/msq.h
index 9c7feee247..0b15aeaa92 100644
--- a/bits/msq.h
+++ b/bits/msq.h
@@ -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/bits/netdb.h b/bits/netdb.h
index daf5a41620..bf94a8e207 100644
--- a/bits/netdb.h
+++ b/bits/netdb.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/bits/param.h b/bits/param.h
index 60eed4dc70..18a7b8faf0 100644
--- a/bits/param.h
+++ b/bits/param.h
@@ -1,5 +1,5 @@
/* Old-style Unix parameters and limits. Stub version.
- 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/bits/poll.h b/bits/poll.h
index 9cf011704f..bf574d4b5b 100644
--- a/bits/poll.h
+++ b/bits/poll.h
@@ -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/bits/resource.h b/bits/resource.h
index 5574a7a0fe..e088256950 100644
--- a/bits/resource.h
+++ b/bits/resource.h
@@ -1,5 +1,5 @@
/* Bit values & structures for resource limits. 4.4 BSD/generic GNU 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/bits/sched.h b/bits/sched.h
index e79db042ee..08b2598758 100644
--- a/bits/sched.h
+++ b/bits/sched.h
@@ -1,6 +1,6 @@
/* Definitions of constants and data structure for POSIX 1003.1b-1993
scheduling 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/bits/select.h b/bits/select.h
index 029153d688..af6e1f00be 100644
--- a/bits/select.h
+++ b/bits/select.h
@@ -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/bits/sem.h b/bits/sem.h
index 4edc43bb1a..87b8123e73 100644
--- a/bits/sem.h
+++ b/bits/sem.h
@@ -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/bits/shm.h b/bits/shm.h
index 150fab8c7d..38e94df61a 100644
--- a/bits/shm.h
+++ b/bits/shm.h
@@ -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/bits/sigaction.h b/bits/sigaction.h
index 951a5c41d3..cdeb0dd55b 100644
--- a/bits/sigaction.h
+++ b/bits/sigaction.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
@@ -55,7 +55,7 @@ struct sigaction
#if defined __USE_UNIX98 || defined __USE_MISC
# define SA_ONSTACK 0x0001 /* Take signal on signal stack. */
#endif
-#if defined __USE_UNIX98 || defined __USE_MISC || defined __USE_XOPEN2K8
+#if defined __USE_UNIX98 || defined __USE_XOPEN2K8
# define SA_RESTART 0x0002 /* Restart syscall on signal return. */
# define SA_NODEFER 0x0010 /* Don't automatically block the signal when
its handler is being executed. */
diff --git a/bits/sigcontext.h b/bits/sigcontext.h
index 76d450b4d9..e1fc1c4cef 100644
--- a/bits/sigcontext.h
+++ b/bits/sigcontext.h
@@ -1,5 +1,5 @@
/* Structure describing state saved while handling a signal. 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/bits/siginfo.h b/bits/siginfo.h
index f77d952166..dc803dc150 100644
--- a/bits/siginfo.h
+++ b/bits/siginfo.h
@@ -1,5 +1,5 @@
/* siginfo_t, sigevent and constants. Stub version.
- 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
@@ -70,110 +70,116 @@ enum
};
+# if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
/* `si_code' values for SIGILL signal. */
enum
{
ILL_ILLOPC = 1, /* Illegal opcode. */
-# define ILL_ILLOPC ILL_ILLOPC
+# define ILL_ILLOPC ILL_ILLOPC
ILL_ILLOPN, /* Illegal operand. */
-# define ILL_ILLOPN ILL_ILLOPN
+# define ILL_ILLOPN ILL_ILLOPN
ILL_ILLADR, /* Illegal addressing mode. */
-# define ILL_ILLADR ILL_ILLADR
+# define ILL_ILLADR ILL_ILLADR
ILL_ILLTRP, /* Illegal trap. */
-# define ILL_ILLTRP ILL_ILLTRP
+# define ILL_ILLTRP ILL_ILLTRP
ILL_PRVOPC, /* Privileged opcode. */
-# define ILL_PRVOPC ILL_PRVOPC
+# define ILL_PRVOPC ILL_PRVOPC
ILL_PRVREG, /* Privileged register. */
-# define ILL_PRVREG ILL_PRVREG
+# define ILL_PRVREG ILL_PRVREG
ILL_COPROC, /* Coprocessor error. */
-# define ILL_COPROC ILL_COPROC
+# define ILL_COPROC ILL_COPROC
ILL_BADSTK /* Internal stack error. */
-# define ILL_BADSTK ILL_BADSTK
+# define ILL_BADSTK ILL_BADSTK
};
/* `si_code' values for SIGFPE signal. */
enum
{
FPE_INTDIV = 1, /* Integer divide by zero. */
-# define FPE_INTDIV FPE_INTDIV
+# define FPE_INTDIV FPE_INTDIV
FPE_INTOVF, /* Integer overflow. */
-# define FPE_INTOVF FPE_INTOVF
+# define FPE_INTOVF FPE_INTOVF
FPE_FLTDIV, /* Floating point divide by zero. */
-# define FPE_FLTDIV FPE_FLTDIV
+# define FPE_FLTDIV FPE_FLTDIV
FPE_FLTOVF, /* Floating point overflow. */
-# define FPE_FLTOVF FPE_FLTOVF
+# define FPE_FLTOVF FPE_FLTOVF
FPE_FLTUND, /* Floating point underflow. */
-# define FPE_FLTUND FPE_FLTUND
+# define FPE_FLTUND FPE_FLTUND
FPE_FLTRES, /* Floating point inexact result. */
-# define FPE_FLTRES FPE_FLTRES
+# define FPE_FLTRES FPE_FLTRES
FPE_FLTINV, /* Floating point invalid operation. */
-# define FPE_FLTINV FPE_FLTINV
+# define FPE_FLTINV FPE_FLTINV
FPE_FLTSUB /* Subscript out of range. */
-# define FPE_FLTSUB FPE_FLTSUB
+# define FPE_FLTSUB FPE_FLTSUB
};
/* `si_code' values for SIGSEGV signal. */
enum
{
SEGV_MAPERR = 1, /* Address not mapped to object. */
-# define SEGV_MAPERR SEGV_MAPERR
+# define SEGV_MAPERR SEGV_MAPERR
SEGV_ACCERR /* Invalid permissions for mapped object. */
-# define SEGV_ACCERR SEGV_ACCERR
+# define SEGV_ACCERR SEGV_ACCERR
};
/* `si_code' values for SIGBUS signal. */
enum
{
BUS_ADRALN = 1, /* Invalid address alignment. */
-# define BUS_ADRALN BUS_ADRALN
+# define BUS_ADRALN BUS_ADRALN
BUS_ADRERR, /* Non-existant physical address. */
-# define BUS_ADRERR BUS_ADRERR
+# define BUS_ADRERR BUS_ADRERR
BUS_OBJERR /* Object specific hardware error. */
-# define BUS_OBJERR BUS_OBJERR
+# define BUS_OBJERR BUS_OBJERR
};
+# endif
+# ifdef __USE_XOPEN_EXTENDED
/* `si_code' values for SIGTRAP signal. */
enum
{
TRAP_BRKPT = 1, /* Process breakpoint. */
-# define TRAP_BRKPT TRAP_BRKPT
+# define TRAP_BRKPT TRAP_BRKPT
TRAP_TRACE /* Process trace trap. */
-# define TRAP_TRACE TRAP_TRACE
+# define TRAP_TRACE TRAP_TRACE
};
+# endif
+# if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
/* `si_code' values for SIGCHLD signal. */
enum
{
CLD_EXITED = 1, /* Child has exited. */
-# define CLD_EXITED CLD_EXITED
+# define CLD_EXITED CLD_EXITED
CLD_KILLED, /* Child was killed. */
-# define CLD_KILLED CLD_KILLED
+# define CLD_KILLED CLD_KILLED
CLD_DUMPED, /* Child terminated abnormally. */
-# define CLD_DUMPED CLD_DUMPED
+# define CLD_DUMPED CLD_DUMPED
CLD_TRAPPED, /* Traced child has trapped. */
-# define CLD_TRAPPED CLD_TRAPPED
+# define CLD_TRAPPED CLD_TRAPPED
CLD_STOPPED, /* Child has stopped. */
-# define CLD_STOPPED CLD_STOPPED
+# define CLD_STOPPED CLD_STOPPED
CLD_CONTINUED /* Stopped child has continued. */
-# define CLD_CONTINUED CLD_CONTINUED
+# define CLD_CONTINUED CLD_CONTINUED
};
/* `si_code' values for SIGPOLL signal. */
enum
{
POLL_IN = 1, /* Data input available. */
-# define POLL_IN POLL_IN
+# define POLL_IN POLL_IN
POLL_OUT, /* Output buffers available. */
-# define POLL_OUT POLL_OUT
+# define POLL_OUT POLL_OUT
POLL_MSG, /* Input message available. */
-# define POLL_MSG POLL_MSG
+# define POLL_MSG POLL_MSG
POLL_ERR, /* I/O error. */
-# define POLL_ERR POLL_ERR
+# define POLL_ERR POLL_ERR
POLL_PRI, /* High priority input available. */
-# define POLL_PRI POLL_PRI
+# define POLL_PRI POLL_PRI
POLL_HUP /* Device disconnected. */
-# define POLL_HUP POLL_HUP
+# define POLL_HUP POLL_HUP
};
+# endif
# undef __need_siginfo_t
#endif /* !have siginfo_t && (have _SIGNAL_H || need siginfo_t). */
diff --git a/bits/signum.h b/bits/signum.h
index 763700e83e..e6deefdb00 100644
--- a/bits/signum.h
+++ b/bits/signum.h
@@ -1,5 +1,5 @@
/* Signal number constants. Generic 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
@@ -28,9 +28,13 @@
# define SIG_HOLD ((__sighandler_t) 2) /* Add signal to hold mask. */
#endif
-/* We define here all the signal names listed in POSIX (1003.1-2008).
+/* We define here all the signal names listed in POSIX (1003.1-2008);
+ as of 1003.1-2013, no additional signals have been added by POSIX.
+ We also define here signal names that historically exist in every
+ real-world POSIX variant (e.g. SIGWINCH).
+
Signals in the 1-15 range are defined with their historical numbers.
- For other signals specified by POSIX, we use the BSD numbers. */
+ For other signals, we use the BSD numbers. */
/* ISO C99 signals. */
#define SIGINT 2 /* Interactive attention signal. */
@@ -50,7 +54,7 @@
#define SIGPIPE 13 /* Broken pipe. */
#define SIGALRM 14 /* Alarm clock. */
-/* New(er) POSIX signals (1003.1-2008). */
+/* New(er) POSIX signals (1003.1-2008, 1003.1-2013). */
#define SIGURG 16 /* High bandwidth data is available at a socket. */
#define SIGSTOP 17 /* Stopped (signal). */
#define SIGTSTP 18 /* Stopped. */
@@ -67,10 +71,14 @@
#define SIGUSR1 30 /* User-defined signal 1. */
#define SIGUSR2 31 /* User-defined signal 2. */
+/* Nonstandard signals found in all modern POSIX systems
+ (including both BSD and Linux). */
+#define SIGWINCH 28 /* Window size change (4.3 BSD, Sun). */
+
#define _NSIG 32
/* Archaic names for compatibility. */
-#define SIGIOT SIGABRT /* IOT instruction, abort() on a PDP11 */
+#define SIGIOT SIGABRT /* IOT instruction, abort() on a PDP-11. */
#define SIGCLD SIGCHLD /* Old System V name */
#endif /* <signal.h> included. */
diff --git a/bits/sigset.h b/bits/sigset.h
index 23a6c1fd83..f5f14b0e19 100644
--- a/bits/sigset.h
+++ b/bits/sigset.h
@@ -1,5 +1,5 @@
/* __sig_atomic_t, __sigset_t, and related definitions. Generic/BSD 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
@@ -44,15 +44,17 @@ typedef unsigned long int __sigset_t;
overflow if `sigset_t' is wider than `int'. */
#define __sigmask(sig) (((__sigset_t) 1) << ((sig) - 1))
-#define __sigemptyset(set) ((*(set) = (__sigset_t) 0), 0)
-#define __sigfillset(set) ((*(set) = ~(__sigset_t) 0), 0)
+#define __sigemptyset(set) \
+ (__extension__ ({ *(set) = (__sigset_t) 0; 0; })
+#define __sigfillset(set) \
+ (__extension__ ({ *(set) = ~(__sigset_t) 0; 0; }))
#ifdef _GNU_SOURCE
# define __sigisemptyset(set) (*(set) == (__sigset_t) 0)
# define __sigandset(dest, left, right) \
- ((*(dest) = (*(left) & *(right))), 0)
+ (__extension__ ({ *(dest) = *(left) & *(right); 0; }))
# define __sigorset(dest, left, right) \
- ((*(dest) = (*(left) | *(right))), 0)
+ (__extension__ ({ *(dest) = *(left) | *(right); 0; }))
#endif
/* These functions needn't check for a bogus signal number -- error
diff --git a/bits/sigstack.h b/bits/sigstack.h
index 465156cad1..e3b61a2a45 100644
--- a/bits/sigstack.h
+++ b/bits/sigstack.h
@@ -1,5 +1,5 @@
/* sigstack, sigaltstack definitions.
- 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/bits/sigthread.h b/bits/sigthread.h
index adf6e3f2b8..e4ce536fcf 100644
--- a/bits/sigthread.h
+++ b/bits/sigthread.h
@@ -1,5 +1,5 @@
/* Signal handling function for threaded programs. Generic version.
- 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/bits/sockaddr.h b/bits/sockaddr.h
index 33ac0efa36..70e005e131 100644
--- a/bits/sockaddr.h
+++ b/bits/sockaddr.h
@@ -1,5 +1,5 @@
/* Definition of `struct sockaddr_*' common members. Generic/4.2 BSD version.
- 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/bits/socket.h b/bits/socket.h
index 1b2e2437c5..bcbb624534 100644
--- a/bits/socket.h
+++ b/bits/socket.h
@@ -1,5 +1,5 @@
/* System-specific socket constants and types. 4.4 BSD 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/bits/stat.h b/bits/stat.h
index ee5b2fba38..b2848b322a 100644
--- a/bits/stat.h
+++ b/bits/stat.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
diff --git a/bits/statfs.h b/bits/statfs.h
index 1fbc88f682..9af78066e0 100644
--- a/bits/statfs.h
+++ b/bits/statfs.h
@@ -1,5 +1,5 @@
/* Definition of `struct statfs', 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/bits/statvfs.h b/bits/statvfs.h
index 5a99ff3fd3..f68d36c96b 100644
--- a/bits/statvfs.h
+++ b/bits/statvfs.h
@@ -1,5 +1,5 @@
/* Definition of `struct statvfs', 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/bits/stdio-lock.h b/bits/stdio-lock.h
index 3b29cf89db..25997338f2 100644
--- a/bits/stdio-lock.h
+++ b/bits/stdio-lock.h
@@ -1,5 +1,5 @@
/* Thread package specific definitions of stream lock type. Generic version.
- 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
@@ -44,7 +44,7 @@ __libc_lock_define_recursive (typedef, _IO_lock_t)
#define _IO_cleanup_region_end(_doit) \
__libc_cleanup_region_end (_doit)
-#if defined _LIBC && !defined NOT_IN_libc
+#if defined _LIBC && IS_IN (libc)
# define _IO_acquire_lock(_fp) \
{ \
_IO_FILE *_IO_acquire_lock_file = _fp; \
diff --git a/bits/stdlib-bsearch.h b/bits/stdlib-bsearch.h
index 78b444649f..00a1fbe16e 100644
--- a/bits/stdlib-bsearch.h
+++ b/bits/stdlib-bsearch.h
@@ -1,5 +1,5 @@
/* Perform binary search - inline 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/bits/string.h b/bits/string.h
index f8630d2c52..b88a6bc601 100644
--- a/bits/string.h
+++ b/bits/string.h
@@ -8,5 +8,7 @@
#ifndef _BITS_STRING_H
#define _BITS_STRING_H 1
+/* Define if architecture can access unaligned multi-byte variables. */
+#define _STRING_ARCH_unaligned 0
#endif /* bits/string.h */
diff --git a/bits/stropts.h b/bits/stropts.h
index 246152c879..469f27de67 100644
--- a/bits/stropts.h
+++ b/bits/stropts.h
@@ -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/bits/sys_errlist.h b/bits/sys_errlist.h
index 6610c93e36..539a3b3ece 100644
--- a/bits/sys_errlist.h
+++ b/bits/sys_errlist.h
@@ -1,5 +1,5 @@
/* Declare sys_errlist and sys_nerr, or don't. Don't 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/bits/syslog-path.h b/bits/syslog-path.h
index ae83b2b032..a7aae73f57 100644
--- a/bits/syslog-path.h
+++ b/bits/syslog-path.h
@@ -1,5 +1,5 @@
/* <bits/syslog-path.h> -- _PATH_LOG definition
- 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/bits/termios.h b/bits/termios.h
index 9fd694a284..460729dacd 100644
--- a/bits/termios.h
+++ b/bits/termios.h
@@ -1,5 +1,5 @@
/* termios type and macro definitions. 4.4 BSD/generic GNU version.
- 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
@@ -67,7 +67,7 @@
#endif /* __USE_MISC || __USE_XOPEN */
-#ifdef __USE_BSD
+#ifdef __USE_MISC
# ifdef MDMBUF
# undef MDMBUF
@@ -79,7 +79,7 @@
# undef PENDIN
# endif
-#endif /* __USE_BSD */
+#endif /* __USE_MISC */
#ifdef ECHO
# undef ECHO
@@ -123,10 +123,10 @@ struct termios
#define ICRNL (1 << 8) /* Map CR to NL on input. */
#define IXON (1 << 9) /* Enable start/stop output control. */
#define IXOFF (1 << 10) /* Enable start/stop input control. */
-#if defined __USE_BSD || defined __USE_UNIX98
+#if defined __USE_MISC || defined __USE_UNIX98
# define IXANY (1 << 11) /* Any character will restart after stop. */
#endif
-#ifdef __USE_BSD
+#ifdef __USE_MISC
# define IMAXBEL (1 << 13) /* Ring bell when input queue is full. */
#endif
#ifdef __USE_GNU
@@ -136,14 +136,14 @@ struct termios
/* Output modes. */
tcflag_t c_oflag;
#define OPOST (1 << 0) /* Perform output processing. */
-#if defined __USE_BSD || defined __USE_XOPEN
+#if defined __USE_MISC || defined __USE_XOPEN
# define ONLCR (1 << 1) /* Map NL to CR-NL on output. */
#endif
-#ifdef __USE_BSD
+#ifdef __USE_MISC
# define OXTABS TAB3 /* Expand tabs to spaces. */
# define ONOEOT (1 << 3) /* Discard EOT (^D) on output. */
#endif
-#if defined __USE_BSD || defined __USE_XOPEN
+#if defined __USE_MISC || defined __USE_XOPEN
# define OCRNL (1 << 4) /* Map CR to NL. */
# define ONOCR (1 << 5) /* Discard CR's when on column 0. */
# define ONLRET (1 << 6) /* Move to column 0 on NL. */
@@ -181,7 +181,7 @@ struct termios
/* Control modes. */
tcflag_t c_cflag;
-#ifdef __USE_BSD
+#ifdef __USE_MISC
# define CIGNORE (1 << 0) /* Ignore these control flags. */
#endif
#define CSIZE (CS5|CS6|CS7|CS8) /* Number of bits per byte (mask). */
@@ -195,7 +195,7 @@ struct termios
#define PARODD (1 << 13) /* Odd parity instead of even. */
#define HUPCL (1 << 14) /* Hang up on last close. */
#define CLOCAL (1 << 15) /* Ignore modem status lines. */
-#ifdef __USE_BSD
+#ifdef __USE_MISC
# define CRTSCTS (1 << 16) /* RTS/CTS flow control. */
# define CRTS_IFLOW CRTSCTS /* Compatibility. */
# define CCTS_OFLOW CRTSCTS /* Compatibility. */
@@ -206,7 +206,7 @@ struct termios
/* Local modes. */
tcflag_t c_lflag;
-#ifdef __USE_BSD
+#ifdef __USE_MISC
# define ECHOKE (1 << 0) /* Visual erase for KILL. */
#endif
#define _ECHOE (1 << 1) /* Visual erase for ERASE. */
@@ -217,7 +217,7 @@ struct termios
#define ECHO _ECHO
#define _ECHONL (1 << 4) /* Echo NL even if ECHO is off. */
#define ECHONL _ECHONL
-#ifdef __USE_BSD
+#ifdef __USE_MISC
# define ECHOPRT (1 << 5) /* Hardcopy visual erase. */
# define ECHOCTL (1 << 6) /* Echo control characters as ^X. */
#endif
@@ -225,15 +225,17 @@ struct termios
#define ISIG _ISIG
#define _ICANON (1 << 8) /* Do erase and kill processing. */
#define ICANON _ICANON
-#ifdef __USE_BSD
+#ifdef __USE_MISC
# define ALTWERASE (1 << 9) /* Alternate WERASE algorithm. */
#endif
#define _IEXTEN (1 << 10) /* Enable DISCARD and LNEXT. */
#define IEXTEN _IEXTEN
-#define EXTPROC (1 << 11) /* External processing. */
+#ifdef __USE_MISC
+# define EXTPROC (1 << 11) /* External processing. */
+#endif
#define _TOSTOP (1 << 22) /* Send SIGTTOU for background output. */
#define TOSTOP _TOSTOP
-#ifdef __USE_BSD
+#ifdef __USE_MISC
# define FLUSHO (1 << 23) /* Output being flushed (state). */
# define NOKERNINFO (1 << 25) /* Disable VSTATUS. */
# define PENDIN (1 << 29) /* Retype pending input (state). */
@@ -244,32 +246,32 @@ struct termios
/* Control characters. */
#define VEOF 0 /* End-of-file character [ICANON]. */
#define VEOL 1 /* End-of-line character [ICANON]. */
-#ifdef __USE_BSD
+#ifdef __USE_MISC
# define VEOL2 2 /* Second EOL character [ICANON]. */
#endif
#define VERASE 3 /* Erase character [ICANON]. */
-#ifdef __USE_BSD
+#ifdef __USE_MISC
# define VWERASE 4 /* Word-erase character [ICANON]. */
#endif
#define VKILL 5 /* Kill-line character [ICANON]. */
-#ifdef __USE_BSD
+#ifdef __USE_MISC
# define VREPRINT 6 /* Reprint-line character [ICANON]. */
#endif
#define VINTR 8 /* Interrupt character [ISIG]. */
#define VQUIT 9 /* Quit character [ISIG]. */
#define VSUSP 10 /* Suspend character [ISIG]. */
-#ifdef __USE_BSD
+#ifdef __USE_MISC
# define VDSUSP 11 /* Delayed suspend character [ISIG]. */
#endif
#define VSTART 12 /* Start (X-ON) character [IXON, IXOFF]. */
#define VSTOP 13 /* Stop (X-OFF) character [IXON, IXOFF]. */
-#ifdef __USE_BSD
+#ifdef __USE_MISC
# define VLNEXT 14 /* Literal-next character [IEXTEN]. */
# define VDISCARD 15 /* Discard character [IEXTEN]. */
#endif
#define VMIN 16 /* Minimum number of bytes read at once [!ICANON]. */
#define VTIME 17 /* Time-out value (tenths of a second) [!ICANON]. */
-#ifdef __USE_BSD
+#ifdef __USE_MISC
# define VSTATUS 18 /* Status character [ICANON]. */
#endif
#define NCCS 20 /* Value duplicated in <hurd/tioctl.defs>. */
@@ -325,7 +327,7 @@ struct termios
#define TCSANOW 0 /* Change immediately. */
#define TCSADRAIN 1 /* Change when pending output is written. */
#define TCSAFLUSH 2 /* Flush pending input before changing. */
-#ifdef __USE_BSD
+#ifdef __USE_MISC
# define TCSASOFT 0x10 /* Flag: Don't alter hardware state. */
#endif
diff --git a/bits/time.h b/bits/time.h
index 8b3c8e2d07..7585ddf6e5 100644
--- a/bits/time.h
+++ b/bits/time.h
@@ -1,5 +1,5 @@
/* System-dependent timing definitions. Generic 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
@@ -24,13 +24,13 @@
# ifndef _BITS_TIME_H
# define _BITS_TIME_H 1
-/* ISO/IEC 9899:1990 7.12.1: <time.h>
- The macro `CLOCKS_PER_SEC' is the number per second of the value
- returned by the `clock' function. */
+/* ISO/IEC 9899:1999 7.23.1: Components of time
+ The macro `CLOCKS_PER_SEC' is an expression with type `clock_t' that is
+ the number per second of the value returned by the `clock' function. */
/* CAE XSH, Issue 4, Version 2: <time.h>
The value of CLOCKS_PER_SEC is required to be 1 million on all
XSI-conformant systems. */
-# define CLOCKS_PER_SEC 1000000l
+# define CLOCKS_PER_SEC ((clock_t) 1000000)
# if !defined __STRICT_ANSI__ && !defined __USE_XOPEN2K
/* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK
diff --git a/bits/types.h b/bits/types.h
index 02e1220b46..b1c7ebca39 100644
--- a/bits/types.h
+++ b/bits/types.h
@@ -1,5 +1,5 @@
/* bits/types.h -- definitions of __*_t types underlying *_t types.
- 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/bits/typesizes.h b/bits/typesizes.h
index 95561deda1..0c1e39c6a0 100644
--- a/bits/typesizes.h
+++ b/bits/typesizes.h
@@ -1,5 +1,5 @@
/* bits/typesizes.h -- underlying types for *_t. Generic 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/bits/uio.h b/bits/uio.h
index 3d13ab3916..143bb8c984 100644
--- a/bits/uio.h
+++ b/bits/uio.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/bits/ustat.h b/bits/ustat.h
index 48d7f07548..40fb62b4eb 100644
--- a/bits/ustat.h
+++ b/bits/ustat.h
@@ -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/bits/utmp.h b/bits/utmp.h
index 4af8c05176..6bad1f0807 100644
--- a/bits/utmp.h
+++ b/bits/utmp.h
@@ -1,5 +1,5 @@
/* The `struct utmp' type, describing entries in the utmp file. Generic/BSDish
- 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/bits/utsname.h b/bits/utsname.h
index e41c43820a..e1809cba06 100644
--- a/bits/utsname.h
+++ b/bits/utsname.h
@@ -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
@@ -21,4 +21,8 @@
/* The size of the character arrays used to hold the information
in a `struct utsname'. Enlarge this as necessary. */
-#define _UTSNAME_LENGTH 1024
+#define _UTSNAME_LENGTH 1024
+
+/* If nonzero, the size of of the `domainname` field in `struct utsname'.
+ This is zero to indicate that there should be no such field at all. */
+#define _UTSNAME_DOMAIN_LENGTH 0
diff --git a/bits/waitflags.h b/bits/waitflags.h
index b7d13515c9..9ebc334561 100644
--- a/bits/waitflags.h
+++ b/bits/waitflags.h
@@ -1,5 +1,5 @@
/* Definitions of flag bits for `waitpid' et al.
- 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/bits/waitstatus.h b/bits/waitstatus.h
index baa3962e09..9e698fe6e1 100644
--- a/bits/waitstatus.h
+++ b/bits/waitstatus.h
@@ -1,5 +1,5 @@
/* Definitions of status bits for `wait' et al.
- 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
@@ -59,7 +59,7 @@
#define __WCOREFLAG 0x80
-#ifdef __USE_BSD
+#ifdef __USE_MISC
# include <endian.h>
@@ -102,4 +102,4 @@ union wait
# define w_stopsig __wait_stopped.__w_stopsig
# define w_stopval __wait_stopped.__w_stopval
-#endif /* Use BSD. */
+#endif /* Use misc. */
diff --git a/bits/wchar.h b/bits/wchar.h
index e4ca8dbf00..e806298e73 100644
--- a/bits/wchar.h
+++ b/bits/wchar.h
@@ -1,5 +1,5 @@
/* wchar_t type related definitions.
- 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/bits/xtitypes.h b/bits/xtitypes.h
index 159a7b784b..4272e66c8e 100644
--- a/bits/xtitypes.h
+++ b/bits/xtitypes.h
@@ -1,5 +1,5 @@
/* bits/xtitypes.h -- Define some types used by <bits/stropts.h>. Generic.
- 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