miniboost: update to 1.69.0

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
Ivailo Monev 2019-04-28 22:53:57 +00:00
parent abecf0543d
commit d4d6af2023
392 changed files with 11024 additions and 14523 deletions

View file

@ -1,58 +0,0 @@
/* This file is needed by libio to define various configuration parameters.
These are always the same in the GNU C library. */
#ifndef _G_config_h
#define _G_config_h 1
/* Define types for libio in terms of the standard internal type names. */
#include <bits/types.h>
#define __need_size_t
#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
# define __need_wchar_t
#endif
#define __need_NULL
#include <stddef.h>
#define __need_mbstate_t
#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
# define __need_wint_t
#endif
#include <wchar.h>
typedef struct
{
__off_t __pos;
__mbstate_t __state;
} _G_fpos_t;
typedef struct
{
__off64_t __pos;
__mbstate_t __state;
} _G_fpos64_t;
#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
# include <gconv.h>
typedef union
{
struct __gconv_info __cd;
struct
{
struct __gconv_info __cd;
struct __gconv_step_data __data;
} __combined;
} _G_iconv_t;
#endif
/* These library features are always available in the GNU C library. */
#define _G_va_list __gnuc_va_list
#define _G_HAVE_MMAP 1
#define _G_HAVE_MREMAP 1
#define _G_IO_IO_FILE_VERSION 0x20001
/* This is defined by <bits/stat.h> if `st_blksize' exists. */
#define _G_HAVE_ST_BLKSIZE defined (_STATBUF_ST_BLKSIZE)
#define _G_BUFSIZ 8192
#endif /* _G_config.h */

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1992-2017 Free Software Foundation, Inc.
/* Copyright (C) 1992-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
#ifndef _ASM_GENERIC_ERRNO_BASE_H
#define _ASM_GENERIC_ERRNO_BASE_H

View file

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
#ifndef _ASM_GENERIC_ERRNO_H
#define _ASM_GENERIC_ERRNO_H

View file

@ -1,3 +1,4 @@
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
#ifndef __ASM_GENERIC_PARAM_H
#define __ASM_GENERIC_PARAM_H

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1991-2017 Free Software Foundation, Inc.
/* Copyright (C) 1991-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -85,19 +85,29 @@ __END_DECLS
/* When possible, define assert so that it does not add extra
parentheses around EXPR. Otherwise, those added parentheses would
suppress warnings we'd expect to be detected by gcc's -Wparentheses. */
# if !defined __GNUC__ || defined __STRICT_ANSI__
# if defined __cplusplus
# define assert(expr) \
(static_cast <bool> (expr) \
? void (0) \
: __assert_fail (#expr, __FILE__, __LINE__, __ASSERT_FUNCTION))
# elif !defined __GNUC__ || defined __STRICT_ANSI__
# define assert(expr) \
((expr) \
? __ASSERT_VOID_CAST (0) \
: __assert_fail (#expr, __FILE__, __LINE__, __ASSERT_FUNCTION))
# else
/* The first occurrence of EXPR is not evaluated due to the sizeof,
but will trigger any pedantic warnings masked by the __extension__
for the second occurrence. The ternary operator is required to
support function pointers and bit fields in this context, and to
suppress the evaluation of variable length arrays. */
# define assert(expr) \
({ \
((void) sizeof ((expr) ? 1 : 0), __extension__ ({ \
if (expr) \
; /* empty */ \
else \
__assert_fail (#expr, __FILE__, __LINE__, __ASSERT_FUNCTION); \
})
}))
# endif
# ifdef __USE_GNU
@ -113,7 +123,7 @@ __END_DECLS
C9x has a similar variable called __func__, but prefer the GCC one since
it demangles C++ function names. */
# if defined __cplusplus ? __GNUC_PREREQ (2, 6) : __GNUC_PREREQ (2, 4)
# define __ASSERT_FUNCTION __PRETTY_FUNCTION__
# define __ASSERT_FUNCTION __extension__ __PRETTY_FUNCTION__
# else
# if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
# define __ASSERT_FUNCTION __func__

View file

@ -1,49 +0,0 @@
/* Macros to swap the order of bytes in 16-bit integer values.
Copyright (C) 2012-2017 Free Software 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 _BITS_BYTESWAP_H
# error "Never use <bits/byteswap-16.h> directly; include <byteswap.h> instead."
#endif
#ifdef __GNUC__
# if __GNUC__ >= 2
# define __bswap_16(x) \
(__extension__ \
({ unsigned short int __v, __x = (unsigned short int) (x); \
if (__builtin_constant_p (__x)) \
__v = __bswap_constant_16 (__x); \
else \
__asm__ ("rorw $8, %w0" \
: "=r" (__v) \
: "0" (__x) \
: "cc"); \
__v; }))
# else
/* This is better than nothing. */
# define __bswap_16(x) \
(__extension__ \
({ unsigned short int __x = (unsigned short int) (x); \
__bswap_constant_16 (__x); }))
# endif
#else
static __inline unsigned short int
__bswap_16 (unsigned short int __bsx)
{
return __bswap_constant_16 (__bsx);
}
#endif

View file

@ -1,5 +1,5 @@
/* Macros to swap the order of bytes in integer values.
Copyright (C) 1997-2017 Free Software Foundation, Inc.
/* Macros and inline functions to swap the order of bytes in integer values.
Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -25,117 +25,38 @@
#include <features.h>
#include <bits/types.h>
#include <bits/wordsize.h>
/* Swap bytes in 16 bit value. */
/* Swap bytes in 16-bit value. */
#define __bswap_constant_16(x) \
((unsigned short int) ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)))
((__uint16_t) ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)))
/* Get __bswap_16. */
#include <bits/byteswap-16.h>
/* Swap bytes in 32 bit value. */
#define __bswap_constant_32(x) \
((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \
(((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24))
#ifdef __GNUC__
# if __GNUC_PREREQ (4, 3)
static __inline unsigned int
__bswap_32 (unsigned int __bsx)
static __inline __uint16_t
__bswap_16 (__uint16_t __bsx)
{
return __builtin_bswap32 (__bsx);
}
# elif __GNUC__ >= 2
# if __WORDSIZE == 64 || (defined __i486__ || defined __pentium__ \
|| defined __pentiumpro__ || defined __pentium4__ \
|| defined __k8__ || defined __athlon__ \
|| defined __k6__ || defined __nocona__ \
|| defined __core2__ || defined __geode__ \
|| defined __amdfam10__)
/* To swap the bytes in a word the i486 processors and up provide the
`bswap' opcode. On i386 we have to use three instructions. */
# define __bswap_32(x) \
(__extension__ \
({ unsigned int __v, __x = (x); \
if (__builtin_constant_p (__x)) \
__v = __bswap_constant_32 (__x); \
else \
__asm__ ("bswap %0" : "=r" (__v) : "0" (__x)); \
__v; }))
# else
# define __bswap_32(x) \
(__extension__ \
({ unsigned int __v, __x = (x); \
if (__builtin_constant_p (__x)) \
__v = __bswap_constant_32 (__x); \
else \
__asm__ ("rorw $8, %w0;" \
"rorl $16, %0;" \
"rorw $8, %w0" \
: "=r" (__v) \
: "0" (__x) \
: "cc"); \
__v; }))
# endif
# else
# define __bswap_32(x) \
(__extension__ \
({ unsigned int __x = (x); __bswap_constant_32 (__x); }))
# endif
#if __GNUC_PREREQ (4, 8)
return __builtin_bswap16 (__bsx);
#else
static __inline unsigned int
__bswap_32 (unsigned int __bsx)
{
return __bswap_constant_32 (__bsx);
}
return __bswap_constant_16 (__bsx);
#endif
#if __GNUC_PREREQ (2, 0)
/* Swap bytes in 64 bit value. */
# define __bswap_constant_64(x) \
(__extension__ ((((x) & 0xff00000000000000ull) >> 56) \
| (((x) & 0x00ff000000000000ull) >> 40) \
| (((x) & 0x0000ff0000000000ull) >> 24) \
| (((x) & 0x000000ff00000000ull) >> 8) \
| (((x) & 0x00000000ff000000ull) << 8) \
| (((x) & 0x0000000000ff0000ull) << 24) \
| (((x) & 0x000000000000ff00ull) << 40) \
| (((x) & 0x00000000000000ffull) << 56)))
# if __GNUC_PREREQ (4, 3)
static __inline __uint64_t
__bswap_64 (__uint64_t __bsx)
{
return __builtin_bswap64 (__bsx);
}
# elif __WORDSIZE == 64
# define __bswap_64(x) \
(__extension__ \
({ __uint64_t __v, __x = (x); \
if (__builtin_constant_p (__x)) \
__v = __bswap_constant_64 (__x); \
else \
__asm__ ("bswap %q0" : "=r" (__v) : "0" (__x)); \
__v; }))
# else
# define __bswap_64(x) \
(__extension__ \
({ union { __extension__ __uint64_t __ll; \
unsigned int __l[2]; } __w, __r; \
if (__builtin_constant_p (x)) \
__r.__ll = __bswap_constant_64 (x); \
else \
{ \
__w.__ll = (x); \
__r.__l[0] = __bswap_32 (__w.__l[1]); \
__r.__l[1] = __bswap_32 (__w.__l[0]); \
} \
__r.__ll; }))
# endif
/* Swap bytes in 32-bit value. */
#define __bswap_constant_32(x) \
((((x) & 0xff000000u) >> 24) | (((x) & 0x00ff0000u) >> 8) \
| (((x) & 0x0000ff00u) << 8) | (((x) & 0x000000ffu) << 24))
static __inline __uint32_t
__bswap_32 (__uint32_t __bsx)
{
#if __GNUC_PREREQ (4, 3)
return __builtin_bswap32 (__bsx);
#else
# define __bswap_constant_64(x) \
return __bswap_constant_32 (__bsx);
#endif
}
/* Swap bytes in 64-bit value. */
#define __bswap_constant_64(x) \
((((x) & 0xff00000000000000ull) >> 56) \
| (((x) & 0x00ff000000000000ull) >> 40) \
| (((x) & 0x0000ff0000000000ull) >> 24) \
@ -145,11 +66,14 @@ __bswap_64 (__uint64_t __bsx)
| (((x) & 0x000000000000ff00ull) << 40) \
| (((x) & 0x00000000000000ffull) << 56))
static __inline __uint64_t
__extension__ static __inline __uint64_t
__bswap_64 (__uint64_t __bsx)
{
#if __GNUC_PREREQ (4, 3)
return __builtin_bswap64 (__bsx);
#else
return __bswap_constant_64 (__bsx);
}
#endif
}
#endif /* _BITS_BYTESWAP_H */

View file

@ -1,5 +1,5 @@
/* `sysconf', `pathconf', and `confstr' NAME values. Generic version.
Copyright (C) 1993-2017 Free Software Foundation, Inc.
Copyright (C) 1993-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

124
miniboost/bits/cpu-set.h Normal file
View file

@ -0,0 +1,124 @@
/* Definition of the cpu_set_t structure used by the POSIX 1003.1b-1993
scheduling interface.
Copyright (C) 1996-2018 Free Software 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 _BITS_CPU_SET_H
#define _BITS_CPU_SET_H 1
#ifndef _SCHED_H
# error "Never include <bits/cpu-set.h> directly; use <sched.h> instead."
#endif
/* Size definition for CPU sets. */
#define __CPU_SETSIZE 1024
#define __NCPUBITS (8 * sizeof (__cpu_mask))
/* Type for array elements in 'cpu_set_t'. */
typedef __CPU_MASK_TYPE __cpu_mask;
/* Basic access functions. */
#define __CPUELT(cpu) ((cpu) / __NCPUBITS)
#define __CPUMASK(cpu) ((__cpu_mask) 1 << ((cpu) % __NCPUBITS))
/* Data structure to describe CPU mask. */
typedef struct
{
__cpu_mask __bits[__CPU_SETSIZE / __NCPUBITS];
} cpu_set_t;
/* Access functions for CPU masks. */
#if __GNUC_PREREQ (2, 91)
# define __CPU_ZERO_S(setsize, cpusetp) \
do __builtin_memset (cpusetp, '\0', setsize); while (0)
#else
# define __CPU_ZERO_S(setsize, cpusetp) \
do { \
size_t __i; \
size_t __imax = (setsize) / sizeof (__cpu_mask); \
__cpu_mask *__bits = (cpusetp)->__bits; \
for (__i = 0; __i < __imax; ++__i) \
__bits[__i] = 0; \
} while (0)
#endif
#define __CPU_SET_S(cpu, setsize, cpusetp) \
(__extension__ \
({ size_t __cpu = (cpu); \
__cpu / 8 < (setsize) \
? (((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] \
|= __CPUMASK (__cpu)) \
: 0; }))
#define __CPU_CLR_S(cpu, setsize, cpusetp) \
(__extension__ \
({ size_t __cpu = (cpu); \
__cpu / 8 < (setsize) \
? (((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] \
&= ~__CPUMASK (__cpu)) \
: 0; }))
#define __CPU_ISSET_S(cpu, setsize, cpusetp) \
(__extension__ \
({ size_t __cpu = (cpu); \
__cpu / 8 < (setsize) \
? ((((const __cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] \
& __CPUMASK (__cpu))) != 0 \
: 0; }))
#define __CPU_COUNT_S(setsize, cpusetp) \
__sched_cpucount (setsize, cpusetp)
#if __GNUC_PREREQ (2, 91)
# define __CPU_EQUAL_S(setsize, cpusetp1, cpusetp2) \
(__builtin_memcmp (cpusetp1, cpusetp2, setsize) == 0)
#else
# define __CPU_EQUAL_S(setsize, cpusetp1, cpusetp2) \
(__extension__ \
({ const __cpu_mask *__arr1 = (cpusetp1)->__bits; \
const __cpu_mask *__arr2 = (cpusetp2)->__bits; \
size_t __imax = (setsize) / sizeof (__cpu_mask); \
size_t __i; \
for (__i = 0; __i < __imax; ++__i) \
if (__arr1[__i] != __arr2[__i]) \
break; \
__i == __imax; }))
#endif
#define __CPU_OP_S(setsize, destset, srcset1, srcset2, op) \
(__extension__ \
({ cpu_set_t *__dest = (destset); \
const __cpu_mask *__arr1 = (srcset1)->__bits; \
const __cpu_mask *__arr2 = (srcset2)->__bits; \
size_t __imax = (setsize) / sizeof (__cpu_mask); \
size_t __i; \
for (__i = 0; __i < __imax; ++__i) \
((__cpu_mask *) __dest->__bits)[__i] = __arr1[__i] op __arr2[__i]; \
__dest; }))
#define __CPU_ALLOC_SIZE(count) \
((((count) + __NCPUBITS - 1) / __NCPUBITS) * sizeof (__cpu_mask))
#define __CPU_ALLOC(count) __sched_cpualloc (count)
#define __CPU_FREE(cpuset) __sched_cpufree (cpuset)
__BEGIN_DECLS
extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp)
__THROW;
extern cpu_set_t *__sched_cpualloc (size_t __count) __THROW __wur;
extern void __sched_cpufree (cpu_set_t *__set) __THROW;
__END_DECLS
#endif /* bits/cpu-set.h */

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1999-2017 Free Software Foundation, Inc.
/* Copyright (C) 1999-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Error constants. Linux specific version.
Copyright (C) 1996-2017 Free Software Foundation, Inc.
Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -16,24 +16,29 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifdef _ERRNO_H
#ifndef _BITS_ERRNO_H
#define _BITS_ERRNO_H 1
#if !defined _ERRNO_H
# error "Never include <bits/errno.h> directly; use <errno.h> instead."
#endif
# undef EDOM
# undef EILSEQ
# undef ERANGE
# include <linux/errno.h>
/* Linux has no ENOTSUP error code. */
/* Older Linux headers do not define these constants. */
# ifndef ENOTSUP
# define ENOTSUP EOPNOTSUPP
# endif
/* Older Linux versions also had no ECANCELED error code. */
# ifndef ECANCELED
# define ECANCELED 125
# endif
/* Support for error codes to support robust mutexes was added later, too. */
# ifndef EOWNERDEAD
# define EOWNERDEAD 130
# endif
#ifndef ENOTRECOVERABLE
# define ENOTRECOVERABLE 131
# endif
@ -45,22 +50,4 @@
# define EHWPOISON 133
# endif
# ifndef __ASSEMBLER__
/* Function to get address of global `errno' variable. */
extern int *__errno_location (void) __THROW __attribute__ ((__const__));
# if !defined _LIBC || defined _LIBC_REENTRANT
/* When using threads, errno is a per-thread value. */
# define errno (*__errno_location ())
# endif
# endif /* !__ASSEMBLER__ */
#endif /* _ERRNO_H */
#if !defined _ERRNO_H && defined __need_Emath
/* This is ugly but the kernel header is not clean enough. We must
define only the values EDOM, EILSEQ and ERANGE in case __need_Emath is
defined. */
# define EDOM 33 /* Math argument out of domain of function. */
# define EILSEQ 84 /* Illegal byte sequence. */
# define ERANGE 34 /* Math result not representable. */
#endif /* !_ERRNO_H && __need_Emath */
#endif /* bits/errno.h. */

View file

@ -0,0 +1,329 @@
/* Macros to control TS 18661-3 glibc features where the same
definitions are appropriate for all platforms.
Copyright (C) 2017-2018 Free Software 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 _BITS_FLOATN_COMMON_H
#define _BITS_FLOATN_COMMON_H
#include <features.h>
#include <bits/long-double.h>
/* This header should be included at the bottom of each bits/floatn.h.
It defines the following macros for each _FloatN and _FloatNx type,
where the same definitions, or definitions based only on the macros
in bits/floatn.h, are appropriate for all glibc configurations. */
/* Defined to 1 if the current compiler invocation provides a
floating-point type with the right format for this type, and this
glibc includes corresponding *fN or *fNx interfaces for it. */
#define __HAVE_FLOAT16 0
#define __HAVE_FLOAT32 1
#define __HAVE_FLOAT64 1
#define __HAVE_FLOAT32X 1
#define __HAVE_FLOAT128X 0
/* Defined to 1 if the corresponding __HAVE_<type> macro is 1 and the
type is the first with its format in the sequence of (the default
choices for) float, double, long double, _Float16, _Float32,
_Float64, _Float128, _Float32x, _Float64x, _Float128x for this
glibc; that is, if functions present once per floating-point format
rather than once per type are present for this type.
All configurations supported by glibc have _Float32 the same format
as float, _Float64 and _Float32x the same format as double, the
_Float64x the same format as either long double or _Float128. No
configurations support _Float128x or, as of GCC 7, have compiler
support for a type meeting the requirements for _Float128x. */
#define __HAVE_DISTINCT_FLOAT16 __HAVE_FLOAT16
#define __HAVE_DISTINCT_FLOAT32 0
#define __HAVE_DISTINCT_FLOAT64 0
#define __HAVE_DISTINCT_FLOAT32X 0
#define __HAVE_DISTINCT_FLOAT64X 0
#define __HAVE_DISTINCT_FLOAT128X __HAVE_FLOAT128X
/* Defined to 1 if the corresponding _FloatN type is not binary compatible
with the corresponding ISO C type in the current compilation unit as
opposed to __HAVE_DISTINCT_FLOATN, which indicates the default types built
in glibc. */
#define __HAVE_FLOAT128_UNLIKE_LDBL (__HAVE_DISTINCT_FLOAT128 \
&& __LDBL_MANT_DIG__ != 113)
/* Defined to 1 if any _FloatN or _FloatNx types that are not
ABI-distinct are however distinct types at the C language level (so
for the purposes of __builtin_types_compatible_p and _Generic). */
#if __GNUC_PREREQ (7, 0) && !defined __cplusplus
# define __HAVE_FLOATN_NOT_TYPEDEF 1
#else
# define __HAVE_FLOATN_NOT_TYPEDEF 0
#endif
#ifndef __ASSEMBLER__
/* Defined to concatenate the literal suffix to be used with _FloatN
or _FloatNx types, if __HAVE_<type> is 1. The corresponding
literal suffixes exist since GCC 7, for C only. */
# if __HAVE_FLOAT16
# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
/* No corresponding suffix available for this type. */
# define __f16(x) ((_Float16) x##f)
# else
# define __f16(x) x##f16
# endif
# endif
# if __HAVE_FLOAT32
# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
# define __f32(x) x##f
# else
# define __f32(x) x##f32
# endif
# endif
# if __HAVE_FLOAT64
# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
# ifdef __NO_LONG_DOUBLE_MATH
# define __f64(x) x##l
# else
# define __f64(x) x
# endif
# else
# define __f64(x) x##f64
# endif
# endif
# if __HAVE_FLOAT32X
# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
# define __f32x(x) x
# else
# define __f32x(x) x##f32x
# endif
# endif
# if __HAVE_FLOAT64X
# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
# if __HAVE_FLOAT64X_LONG_DOUBLE
# define __f64x(x) x##l
# else
# define __f64x(x) __f128 (x)
# endif
# else
# define __f64x(x) x##f64x
# endif
# endif
# if __HAVE_FLOAT128X
# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
# error "_Float128X supported but no constant suffix"
# else
# define __f128x(x) x##f128x
# endif
# endif
/* Defined to a complex type if __HAVE_<type> is 1. */
# if __HAVE_FLOAT16
# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
typedef _Complex float __cfloat16 __attribute__ ((__mode__ (__HC__)));
# define __CFLOAT16 __cfloat16
# else
# define __CFLOAT16 _Complex _Float16
# endif
# endif
# if __HAVE_FLOAT32
# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
# define __CFLOAT32 _Complex float
# else
# define __CFLOAT32 _Complex _Float32
# endif
# endif
# if __HAVE_FLOAT64
# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
# ifdef __NO_LONG_DOUBLE_MATH
# define __CFLOAT64 _Complex long double
# else
# define __CFLOAT64 _Complex double
# endif
# else
# define __CFLOAT64 _Complex _Float64
# endif
# endif
# if __HAVE_FLOAT32X
# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
# define __CFLOAT32X _Complex double
# else
# define __CFLOAT32X _Complex _Float32x
# endif
# endif
# if __HAVE_FLOAT64X
# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
# if __HAVE_FLOAT64X_LONG_DOUBLE
# define __CFLOAT64X _Complex long double
# else
# define __CFLOAT64X __CFLOAT128
# endif
# else
# define __CFLOAT64X _Complex _Float64x
# endif
# endif
# if __HAVE_FLOAT128X
# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
# error "_Float128X supported but no complex type"
# else
# define __CFLOAT128X _Complex _Float128x
# endif
# endif
/* The remaining of this file provides support for older compilers. */
# if __HAVE_FLOAT16
# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
typedef float _Float16 __attribute__ ((__mode__ (__HF__)));
# endif
# if !__GNUC_PREREQ (7, 0)
# define __builtin_huge_valf16() ((_Float16) __builtin_huge_val ())
# define __builtin_inff16() ((_Float16) __builtin_inf ())
# define __builtin_nanf16(x) ((_Float16) __builtin_nan (x))
# define __builtin_nansf16(x) ((_Float16) __builtin_nans (x))
# endif
# endif
# if __HAVE_FLOAT32
# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
typedef float _Float32;
# endif
# if !__GNUC_PREREQ (7, 0)
# define __builtin_huge_valf32() (__builtin_huge_valf ())
# define __builtin_inff32() (__builtin_inff ())
# define __builtin_nanf32(x) (__builtin_nanf (x))
# define __builtin_nansf32(x) (__builtin_nansf (x))
# endif
# endif
# if __HAVE_FLOAT64
/* If double, long double and _Float64 all have the same set of
values, TS 18661-3 requires the usual arithmetic conversions on
long double and _Float64 to produce _Float64. For this to be the
case when building with a compiler without a distinct _Float64
type, _Float64 must be a typedef for long double, not for
double. */
# ifdef __NO_LONG_DOUBLE_MATH
# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
typedef long double _Float64;
# endif
# if !__GNUC_PREREQ (7, 0)
# define __builtin_huge_valf64() (__builtin_huge_vall ())
# define __builtin_inff64() (__builtin_infl ())
# define __builtin_nanf64(x) (__builtin_nanl (x))
# define __builtin_nansf64(x) (__builtin_nansl (x))
# endif
# else
# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
typedef double _Float64;
# endif
# if !__GNUC_PREREQ (7, 0)
# define __builtin_huge_valf64() (__builtin_huge_val ())
# define __builtin_inff64() (__builtin_inf ())
# define __builtin_nanf64(x) (__builtin_nan (x))
# define __builtin_nansf64(x) (__builtin_nans (x))
# endif
# endif
# endif
# if __HAVE_FLOAT32X
# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
typedef double _Float32x;
# endif
# if !__GNUC_PREREQ (7, 0)
# define __builtin_huge_valf32x() (__builtin_huge_val ())
# define __builtin_inff32x() (__builtin_inf ())
# define __builtin_nanf32x(x) (__builtin_nan (x))
# define __builtin_nansf32x(x) (__builtin_nans (x))
# endif
# endif
# if __HAVE_FLOAT64X
# if __HAVE_FLOAT64X_LONG_DOUBLE
# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
typedef long double _Float64x;
# endif
# if !__GNUC_PREREQ (7, 0)
# define __builtin_huge_valf64x() (__builtin_huge_vall ())
# define __builtin_inff64x() (__builtin_infl ())
# define __builtin_nanf64x(x) (__builtin_nanl (x))
# define __builtin_nansf64x(x) (__builtin_nansl (x))
# endif
# else
# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
typedef _Float128 _Float64x;
# endif
# if !__GNUC_PREREQ (7, 0)
# define __builtin_huge_valf64x() (__builtin_huge_valf128 ())
# define __builtin_inff64x() (__builtin_inff128 ())
# define __builtin_nanf64x(x) (__builtin_nanf128 (x))
# define __builtin_nansf64x(x) (__builtin_nansf128 (x))
# endif
# endif
# endif
# if __HAVE_FLOAT128X
# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
# error "_Float128x supported but no type"
# endif
# if !__GNUC_PREREQ (7, 0)
# define __builtin_huge_valf128x() ((_Float128x) __builtin_huge_val ())
# define __builtin_inff128x() ((_Float128x) __builtin_inf ())
# define __builtin_nanf128x(x) ((_Float128x) __builtin_nan (x))
# define __builtin_nansf128x(x) ((_Float128x) __builtin_nans (x))
# endif
# endif
#endif /* !__ASSEMBLER__. */
#endif /* _BITS_FLOATN_COMMON_H */

121
miniboost/bits/floatn.h Normal file
View file

@ -0,0 +1,121 @@
/* Macros to control TS 18661-3 glibc features on x86.
Copyright (C) 2017-2018 Free Software 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 _BITS_FLOATN_H
#define _BITS_FLOATN_H
#include <features.h>
/* Defined to 1 if the current compiler invocation provides a
floating-point type with the IEEE 754 binary128 format, and this
glibc includes corresponding *f128 interfaces for it. The required
libgcc support was added some time after the basic compiler
support, for x86_64 and x86. */
#if (defined __x86_64__ \
? __GNUC_PREREQ (4, 3) \
: (defined __GNU__ ? __GNUC_PREREQ (4, 5) : __GNUC_PREREQ (4, 4)))
# define __HAVE_FLOAT128 1
#else
# define __HAVE_FLOAT128 0
#endif
/* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct
from the default float, double and long double types in this glibc. */
#if __HAVE_FLOAT128
# define __HAVE_DISTINCT_FLOAT128 1
#else
# define __HAVE_DISTINCT_FLOAT128 0
#endif
/* Defined to 1 if the current compiler invocation provides a
floating-point type with the right format for _Float64x, and this
glibc includes corresponding *f64x interfaces for it. */
#define __HAVE_FLOAT64X 1
/* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format
of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has
the format of _Float128, which must be different from that of long
double. */
#define __HAVE_FLOAT64X_LONG_DOUBLE 1
#ifndef __ASSEMBLER__
/* Defined to concatenate the literal suffix to be used with _Float128
types, if __HAVE_FLOAT128 is 1. */
# if __HAVE_FLOAT128
# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
/* The literal suffix f128 exists only since GCC 7.0. */
# define __f128(x) x##q
# else
# define __f128(x) x##f128
# endif
# endif
/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */
# if __HAVE_FLOAT128
# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
/* Add a typedef for older GCC compilers which don't natively support
_Complex _Float128. */
typedef _Complex float __cfloat128 __attribute__ ((__mode__ (__TC__)));
# define __CFLOAT128 __cfloat128
# else
# define __CFLOAT128 _Complex _Float128
# endif
# endif
/* The remaining of this file provides support for older compilers. */
# if __HAVE_FLOAT128
/* The type _Float128 exists only since GCC 7.0. */
# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
typedef __float128 _Float128;
# endif
/* __builtin_huge_valf128 doesn't exist before GCC 7.0. */
# if !__GNUC_PREREQ (7, 0)
# define __builtin_huge_valf128() ((_Float128) __builtin_huge_val ())
# endif
/* Older GCC has only a subset of built-in functions for _Float128 on
x86, and __builtin_infq is not usable in static initializers.
Converting a narrower sNaN to _Float128 produces a quiet NaN, so
attempts to use _Float128 sNaNs will not work properly with older
compilers. */
# if !__GNUC_PREREQ (7, 0)
# define __builtin_copysignf128 __builtin_copysignq
# define __builtin_fabsf128 __builtin_fabsq
# define __builtin_inff128() ((_Float128) __builtin_inf ())
# define __builtin_nanf128(x) ((_Float128) __builtin_nan (x))
# define __builtin_nansf128(x) ((_Float128) __builtin_nans (x))
# endif
/* In math/math.h, __MATH_TG will expand signbit to __builtin_signbit*,
e.g.: __builtin_signbitf128, before GCC 6. However, there has never
been a __builtin_signbitf128 in GCC and the type-generic builtin is
only available since GCC 6. */
# if !__GNUC_PREREQ (6, 0)
# define __builtin_signbitf128 __signbitf128
# endif
# endif
#endif /* !__ASSEMBLER__. */
#include <bits/floatn-common.h>
#endif /* _BITS_FLOATN_H */

View file

@ -0,0 +1,96 @@
/* Declarations for getopt (basic, portable features only).
Copyright (C) 1989-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library and is also part of gnulib.
Patches to this file should be submitted to both projects.
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 _GETOPT_CORE_H
#define _GETOPT_CORE_H 1
/* This header should not be used directly; include getopt.h or
unistd.h instead. Unlike most bits headers, it does not have
a protective #error, because the guard macro for getopt.h in
gnulib is not fixed. */
__BEGIN_DECLS
/* For communication from 'getopt' to the caller.
When 'getopt' finds an option that takes an argument,
the argument value is returned here.
Also, when 'ordering' is RETURN_IN_ORDER,
each non-option ARGV-element is returned here. */
extern char *optarg;
/* Index in ARGV of the next element to be scanned.
This is used for communication to and from the caller
and for communication between successive calls to 'getopt'.
On entry to 'getopt', zero means this is the first call; initialize.
When 'getopt' returns -1, this is the index of the first of the
non-option elements that the caller should itself scan.
Otherwise, 'optind' communicates from one call to the next
how much of ARGV has been scanned so far. */
extern int optind;
/* Callers store zero here to inhibit the error message 'getopt' prints
for unrecognized options. */
extern int opterr;
/* Set to an option character which was unrecognized. */
extern int optopt;
/* Get definitions and prototypes for functions to process the
arguments in ARGV (ARGC of them, minus the program name) for
options given in OPTS.
Return the option character from OPTS just read. Return -1 when
there are no more options. For unrecognized options, or options
missing arguments, 'optopt' is set to the option letter, and '?' is
returned.
The OPTS string is a list of characters which are recognized option
letters, optionally followed by colons, specifying that that letter
takes an argument, to be placed in 'optarg'.
If a letter in OPTS is followed by two colons, its argument is
optional. This behavior is specific to the GNU 'getopt'.
The argument '--' causes premature termination of argument
scanning, explicitly telling 'getopt' that there are no more
options.
If OPTS begins with '-', then non-option arguments are treated as
arguments to the option '\1'. This behavior is specific to the GNU
'getopt'. If OPTS begins with '+', or POSIXLY_CORRECT is set in
the environment, then do not permute arguments.
For standards compliance, the 'argv' argument has the type
char *const *, but this is inaccurate; if argument permutation is
enabled, the argv array (not the strings it points to) must be
writable. */
extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
__THROW __nonnull ((2, 3));
__END_DECLS
#endif /* getopt_core.h */

View file

@ -0,0 +1,51 @@
/* Declarations for getopt (POSIX compatibility shim).
Copyright (C) 1989-2018 Free Software Foundation, Inc.
Unlike the bulk of the getopt implementation, this file is NOT part
of gnulib.
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 _GETOPT_POSIX_H
#define _GETOPT_POSIX_H 1
#if !defined _UNISTD_H && !defined _STDIO_H
#error "Never include getopt_posix.h directly; use unistd.h instead."
#endif
#include <bits/getopt_core.h>
__BEGIN_DECLS
#if defined __USE_POSIX2 && !defined __USE_POSIX_IMPLICITLY \
&& !defined __USE_GNU && !defined _GETOPT_H
/* GNU getopt has more functionality than POSIX getopt. When we are
explicitly conforming to POSIX and not GNU, and getopt.h (which is
not part of POSIX) has not been included, the extra functionality
is disabled. */
# ifdef __REDIRECT
extern int __REDIRECT_NTH (getopt, (int ___argc, char *const *___argv,
const char *__shortopts),
__posix_getopt);
# else
extern int __posix_getopt (int ___argc, char *const *___argv,
const char *__shortopts)
__THROW __nonnull ((2, 3));
# define getopt __posix_getopt
# endif
#endif
__END_DECLS
#endif /* getopt_posix.h */

View file

@ -1,5 +1,5 @@
/* Handle feature test macros at the start of a header.
Copyright (C) 2016-2017 Free Software Foundation, Inc.
Copyright (C) 2016-2018 Free Software 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,3 +59,12 @@
#else
# define __GLIBC_USE_IEC_60559_FUNCS_EXT 0
#endif
/* ISO/IEC TS 18661-3:2015 defines the
__STDC_WANT_IEC_60559_TYPES_EXT__ macro. */
#undef __GLIBC_USE_IEC_60559_TYPES_EXT
#if defined __USE_GNU || defined __STDC_WANT_IEC_60559_TYPES_EXT__
# define __GLIBC_USE_IEC_60559_TYPES_EXT 1
#else
# define __GLIBC_USE_IEC_60559_TYPES_EXT 0
#endif

View file

@ -1,5 +1,5 @@
/* Minimum guaranteed maximum values for system limits. Linux version.
Copyright (C) 1993-2017 Free Software Foundation, Inc.
Copyright (C) 1993-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Properties of long double type. ldbl-96 version.
Copyright (C) 2016-2017 Free Software Foundation, Inc.
Copyright (C) 2016-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Old-style Unix parameters and limits. Linux version.
Copyright (C) 1995-2017 Free Software Foundation, Inc.
Copyright (C) 1995-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1991-2017 Free Software Foundation, Inc.
/* Copyright (C) 1991-2018 Free Software 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,6 +24,7 @@
#ifndef _BITS_POSIX1_LIM_H
#define _BITS_POSIX1_LIM_H 1
#include <bits/wordsize.h>
/* These are the standard-mandated minimum values. */
@ -161,7 +162,14 @@
#ifndef SSIZE_MAX
/* ssize_t is not formally required to be the signed type
corresponding to size_t, but it is for all configurations supported
by glibc. */
# if __WORDSIZE == 64 || __WORDSIZE32_SIZE_ULONG
# define SSIZE_MAX LONG_MAX
# else
# define SSIZE_MAX INT_MAX
# endif
#endif

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1991-2017 Free Software Foundation, Inc.
/* Copyright (C) 1991-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Define POSIX options for Linux.
Copyright (C) 1996-2017 Free Software Foundation, Inc.
Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -0,0 +1,106 @@
/* Copyright (C) 2002-2018 Free Software 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 _BITS_PTHREADTYPES_ARCH_H
#define _BITS_PTHREADTYPES_ARCH_H 1
#include <bits/wordsize.h>
#ifdef __x86_64__
# if __WORDSIZE == 64
# define __SIZEOF_PTHREAD_MUTEX_T 40
# define __SIZEOF_PTHREAD_ATTR_T 56
# define __SIZEOF_PTHREAD_MUTEX_T 40
# define __SIZEOF_PTHREAD_RWLOCK_T 56
# define __SIZEOF_PTHREAD_BARRIER_T 32
# else
# define __SIZEOF_PTHREAD_MUTEX_T 32
# define __SIZEOF_PTHREAD_ATTR_T 32
# define __SIZEOF_PTHREAD_MUTEX_T 32
# define __SIZEOF_PTHREAD_RWLOCK_T 44
# define __SIZEOF_PTHREAD_BARRIER_T 20
# endif
#else
# define __SIZEOF_PTHREAD_MUTEX_T 24
# define __SIZEOF_PTHREAD_ATTR_T 36
# define __SIZEOF_PTHREAD_MUTEX_T 24
# define __SIZEOF_PTHREAD_RWLOCK_T 32
# define __SIZEOF_PTHREAD_BARRIER_T 20
#endif
#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
#define __SIZEOF_PTHREAD_COND_T 48
#define __SIZEOF_PTHREAD_CONDATTR_T 4
#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
/* Definitions for internal mutex struct. */
#define __PTHREAD_COMPAT_PADDING_MID
#define __PTHREAD_COMPAT_PADDING_END
#define __PTHREAD_MUTEX_LOCK_ELISION 1
#ifdef __x86_64__
# define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 0
# define __PTHREAD_MUTEX_USE_UNION 0
#else
# define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 1
# define __PTHREAD_MUTEX_USE_UNION 1
#endif
#define __LOCK_ALIGNMENT
#define __ONCE_ALIGNMENT
struct __pthread_rwlock_arch_t
{
unsigned int __readers;
unsigned int __writers;
unsigned int __wrphase_futex;
unsigned int __writers_futex;
unsigned int __pad3;
unsigned int __pad4;
#ifdef __x86_64__
int __cur_writer;
int __shared;
signed char __rwelision;
# ifdef __ILP32__
unsigned char __pad1[3];
# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0 }
# else
unsigned char __pad1[7];
# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0, 0, 0, 0, 0 }
# endif
unsigned long int __pad2;
/* FLAGS must stay at this position in the structure to maintain
binary compatibility. */
unsigned int __flags;
# define __PTHREAD_RWLOCK_INT_FLAGS_SHARED 1
#else
/* FLAGS must stay at this position in the structure to maintain
binary compatibility. */
unsigned char __flags;
unsigned char __shared;
signed char __rwelision;
# define __PTHREAD_RWLOCK_ELISION_EXTRA 0
unsigned char __pad2;
int __cur_writer;
#endif
};
#ifndef __x86_64__
/* Extra attributes for the cleanup functions. */
# define __cleanup_fct_attribute __attribute__ ((__regparm__ (1)))
#endif
#endif /* bits/pthreadtypes.h */

View file

@ -1,4 +1,5 @@
/* Copyright (C) 2002-2017 Free Software Foundation, Inc.
/* Declaration of common pthread types for all architectures.
Copyright (C) 2017-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -15,51 +16,43 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef _BITS_PTHREADTYPES_H
#define _BITS_PTHREADTYPES_H 1
#include <bits/wordsize.h>
#ifdef __x86_64__
# if __WORDSIZE == 64
# define __SIZEOF_PTHREAD_ATTR_T 56
# define __SIZEOF_PTHREAD_MUTEX_T 40
# define __SIZEOF_PTHREAD_MUTEXATTR_T 4
# define __SIZEOF_PTHREAD_COND_T 48
# define __SIZEOF_PTHREAD_CONDATTR_T 4
# define __SIZEOF_PTHREAD_RWLOCK_T 56
# define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
# define __SIZEOF_PTHREAD_BARRIER_T 32
# define __SIZEOF_PTHREAD_BARRIERATTR_T 4
# else
# define __SIZEOF_PTHREAD_ATTR_T 32
# define __SIZEOF_PTHREAD_MUTEX_T 32
# define __SIZEOF_PTHREAD_MUTEXATTR_T 4
# define __SIZEOF_PTHREAD_COND_T 48
# define __SIZEOF_PTHREAD_CONDATTR_T 4
# define __SIZEOF_PTHREAD_RWLOCK_T 44
# define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
# define __SIZEOF_PTHREAD_BARRIER_T 20
# define __SIZEOF_PTHREAD_BARRIERATTR_T 4
# endif
#else
# define __SIZEOF_PTHREAD_ATTR_T 36
# define __SIZEOF_PTHREAD_MUTEX_T 24
# define __SIZEOF_PTHREAD_MUTEXATTR_T 4
# define __SIZEOF_PTHREAD_COND_T 48
# define __SIZEOF_PTHREAD_CONDATTR_T 4
# define __SIZEOF_PTHREAD_RWLOCK_T 32
# define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
# define __SIZEOF_PTHREAD_BARRIER_T 20
# define __SIZEOF_PTHREAD_BARRIERATTR_T 4
#endif
#ifndef _BITS_PTHREADTYPES_COMMON_H
# define _BITS_PTHREADTYPES_COMMON_H 1
/* For internal mutex and condition variable definitions. */
#include <bits/thread-shared-types.h>
/* Thread identifiers. The structure of the attribute type is not
exposed on purpose. */
typedef unsigned long int pthread_t;
/* Data structures for mutex handling. The structure of the attribute
type is not exposed on purpose. */
typedef union
{
char __size[__SIZEOF_PTHREAD_MUTEXATTR_T];
int __align;
} pthread_mutexattr_t;
/* Data structure for condition variable handling. The structure of
the attribute type is not exposed on purpose. */
typedef union
{
char __size[__SIZEOF_PTHREAD_CONDATTR_T];
int __align;
} pthread_condattr_t;
/* Keys for thread-specific data */
typedef unsigned int pthread_key_t;
/* Once-only execution */
typedef int __ONCE_ALIGNMENT pthread_once_t;
union pthread_attr_t
{
char __size[__SIZEOF_PTHREAD_ATTR_T];
@ -71,165 +64,28 @@ typedef union pthread_attr_t pthread_attr_t;
#endif
#ifdef __x86_64__
typedef struct __pthread_internal_list
{
struct __pthread_internal_list *__prev;
struct __pthread_internal_list *__next;
} __pthread_list_t;
#else
typedef struct __pthread_internal_slist
{
struct __pthread_internal_slist *__next;
} __pthread_slist_t;
#endif
/* Data structures for mutex handling. The structure of the attribute
type is not exposed on purpose. */
typedef union
{
struct __pthread_mutex_s
{
int __lock;
unsigned int __count;
int __owner;
#ifdef __x86_64__
unsigned int __nusers;
#endif
/* KIND must stay at this position in the structure to maintain
binary compatibility with static initializers. */
int __kind;
#ifdef __x86_64__
short __spins;
short __elision;
__pthread_list_t __list;
# define __PTHREAD_MUTEX_HAVE_PREV 1
/* Mutex __spins initializer used by PTHREAD_MUTEX_INITIALIZER. */
# define __PTHREAD_SPINS 0, 0
#else
unsigned int __nusers;
__extension__ union
{
struct
{
short __espins;
short __elision;
# define __spins __elision_data.__espins
# define __elision __elision_data.__elision
# define __PTHREAD_SPINS { 0, 0 }
} __elision_data;
__pthread_slist_t __list;
};
#endif
} __data;
struct __pthread_mutex_s __data;
char __size[__SIZEOF_PTHREAD_MUTEX_T];
long int __align;
} pthread_mutex_t;
typedef union
{
char __size[__SIZEOF_PTHREAD_MUTEXATTR_T];
int __align;
} pthread_mutexattr_t;
/* Data structure for conditional variable handling. The structure of
the attribute type is not exposed on purpose. */
typedef union
{
struct
{
__extension__ union
{
__extension__ unsigned long long int __wseq;
struct {
unsigned int __low;
unsigned int __high;
} __wseq32;
};
__extension__ union
{
__extension__ unsigned long long int __g1_start;
struct {
unsigned int __low;
unsigned int __high;
} __g1_start32;
};
unsigned int __g_refs[2];
unsigned int __g_size[2];
unsigned int __g1_orig_size;
unsigned int __wrefs;
unsigned int __g_signals[2];
} __data;
struct __pthread_cond_s __data;
char __size[__SIZEOF_PTHREAD_COND_T];
__extension__ long long int __align;
} pthread_cond_t;
typedef union
{
char __size[__SIZEOF_PTHREAD_CONDATTR_T];
int __align;
} pthread_condattr_t;
/* Keys for thread-specific data */
typedef unsigned int pthread_key_t;
/* Once-only execution */
typedef int pthread_once_t;
#if defined __USE_UNIX98 || defined __USE_XOPEN2K
/* Data structure for read-write lock variable handling. The
structure of the attribute type is not exposed on purpose. */
/* Data structure for reader-writer lock variable handling. The
structure of the attribute type is deliberately not exposed. */
typedef union
{
# ifdef __x86_64__
struct
{
unsigned int __readers;
unsigned int __writers;
unsigned int __wrphase_futex;
unsigned int __writers_futex;
unsigned int __pad3;
unsigned int __pad4;
int __cur_writer;
int __shared;
signed char __rwelision;
# ifdef __ILP32__
unsigned char __pad1[3];
# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0 }
# else
unsigned char __pad1[7];
# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0, 0, 0, 0, 0 }
# endif
unsigned long int __pad2;
/* FLAGS must stay at this position in the structure to maintain
binary compatibility. */
unsigned int __flags;
# define __PTHREAD_RWLOCK_INT_FLAGS_SHARED 1
} __data;
# else
struct
{
unsigned int __readers;
unsigned int __writers;
unsigned int __wrphase_futex;
unsigned int __writers_futex;
unsigned int __pad3;
unsigned int __pad4;
/* FLAGS must stay at this position in the structure to maintain
binary compatibility. */
unsigned char __flags;
unsigned char __shared;
signed char __rwelision;
# define __PTHREAD_RWLOCK_ELISION_EXTRA 0
unsigned char __pad2;
int __cur_writer;
} __data;
# endif
struct __pthread_rwlock_arch_t __data;
char __size[__SIZEOF_PTHREAD_RWLOCK_T];
long int __align;
} pthread_rwlock_t;
@ -262,10 +118,4 @@ typedef union
} pthread_barrierattr_t;
#endif
#ifndef __x86_64__
/* Extra attributes for the cleanup functions. */
# define __cleanup_fct_attribute __attribute__ ((__regparm__ (1)))
#endif
#endif /* bits/pthreadtypes.h */

View file

@ -1,6 +1,6 @@
/* Definitions of constants and data structure for POSIX 1003.1b-1993
scheduling interface.
Copyright (C) 1996-2017 Free Software Foundation, Inc.
Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -17,20 +17,22 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef __need_schedparam
#ifndef _BITS_SCHED_H
#define _BITS_SCHED_H 1
#ifndef _SCHED_H
# error "Never include <bits/sched.h> directly; use <sched.h> instead."
#endif
/* Scheduling algorithms. */
#define SCHED_OTHER 0
#define SCHED_FIFO 1
#define SCHED_RR 2
#ifdef __USE_GNU
# define SCHED_BATCH 3
# define SCHED_ISO 4
# define SCHED_IDLE 5
# define SCHED_DEADLINE 6
# define SCHED_RESET_ON_FORK 0x40000000
#endif
@ -69,11 +71,7 @@
# define CLONE_IO 0x80000000 /* Clone I/O context. */
#endif
/* The official definition. */
struct sched_param
{
int __sched_priority;
};
#include <bits/types/struct_sched_param.h>
__BEGIN_DECLS
@ -92,120 +90,6 @@ extern int sched_getcpu (void) __THROW;
extern int setns (int __fd, int __nstype) __THROW;
#endif
__END_DECLS
#endif /* need schedparam */
#if !defined __defined_schedparam \
&& (defined __need_schedparam || defined _SCHED_H)
# define __defined_schedparam 1
/* Data structure to describe a process' schedulability. */
struct __sched_param
{
int __sched_priority;
};
# undef __need_schedparam
#endif
#if defined _SCHED_H && !defined __cpu_set_t_defined
# define __cpu_set_t_defined
/* Size definition for CPU sets. */
# define __CPU_SETSIZE 1024
# define __NCPUBITS (8 * sizeof (__cpu_mask))
/* Type for array elements in 'cpu_set_t'. */
typedef __CPU_MASK_TYPE __cpu_mask;
/* Basic access functions. */
# define __CPUELT(cpu) ((cpu) / __NCPUBITS)
# define __CPUMASK(cpu) ((__cpu_mask) 1 << ((cpu) % __NCPUBITS))
/* Data structure to describe CPU mask. */
typedef struct
{
__cpu_mask __bits[__CPU_SETSIZE / __NCPUBITS];
} cpu_set_t;
/* Access functions for CPU masks. */
# if __GNUC_PREREQ (2, 91)
# define __CPU_ZERO_S(setsize, cpusetp) \
do __builtin_memset (cpusetp, '\0', setsize); while (0)
# else
# define __CPU_ZERO_S(setsize, cpusetp) \
do { \
size_t __i; \
size_t __imax = (setsize) / sizeof (__cpu_mask); \
__cpu_mask *__bits = (cpusetp)->__bits; \
for (__i = 0; __i < __imax; ++__i) \
__bits[__i] = 0; \
} while (0)
# endif
# define __CPU_SET_S(cpu, setsize, cpusetp) \
(__extension__ \
({ size_t __cpu = (cpu); \
__cpu / 8 < (setsize) \
? (((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] \
|= __CPUMASK (__cpu)) \
: 0; }))
# define __CPU_CLR_S(cpu, setsize, cpusetp) \
(__extension__ \
({ size_t __cpu = (cpu); \
__cpu / 8 < (setsize) \
? (((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] \
&= ~__CPUMASK (__cpu)) \
: 0; }))
# define __CPU_ISSET_S(cpu, setsize, cpusetp) \
(__extension__ \
({ size_t __cpu = (cpu); \
__cpu / 8 < (setsize) \
? ((((const __cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] \
& __CPUMASK (__cpu))) != 0 \
: 0; }))
# define __CPU_COUNT_S(setsize, cpusetp) \
__sched_cpucount (setsize, cpusetp)
# if __GNUC_PREREQ (2, 91)
# define __CPU_EQUAL_S(setsize, cpusetp1, cpusetp2) \
(__builtin_memcmp (cpusetp1, cpusetp2, setsize) == 0)
# else
# define __CPU_EQUAL_S(setsize, cpusetp1, cpusetp2) \
(__extension__ \
({ const __cpu_mask *__arr1 = (cpusetp1)->__bits; \
const __cpu_mask *__arr2 = (cpusetp2)->__bits; \
size_t __imax = (setsize) / sizeof (__cpu_mask); \
size_t __i; \
for (__i = 0; __i < __imax; ++__i) \
if (__arr1[__i] != __arr2[__i]) \
break; \
__i == __imax; }))
# endif
# define __CPU_OP_S(setsize, destset, srcset1, srcset2, op) \
(__extension__ \
({ cpu_set_t *__dest = (destset); \
const __cpu_mask *__arr1 = (srcset1)->__bits; \
const __cpu_mask *__arr2 = (srcset2)->__bits; \
size_t __imax = (setsize) / sizeof (__cpu_mask); \
size_t __i; \
for (__i = 0; __i < __imax; ++__i) \
((__cpu_mask *) __dest->__bits)[__i] = __arr1[__i] op __arr2[__i]; \
__dest; }))
# define __CPU_ALLOC_SIZE(count) \
((((count) + __NCPUBITS - 1) / __NCPUBITS) * sizeof (__cpu_mask))
# define __CPU_ALLOC(count) __sched_cpualloc (count)
# define __CPU_FREE(cpuset) __sched_cpufree (cpuset)
__BEGIN_DECLS
extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp)
__THROW;
extern cpu_set_t *__sched_cpualloc (size_t __count) __THROW __wur;
extern void __sched_cpufree (cpu_set_t *__set) __THROW;
__END_DECLS
#endif
#endif /* bits/sched.h */

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1997-2017 Free Software Foundation, Inc.
/* Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Checking macros for select functions.
Copyright (C) 2011-2017 Free Software Foundation, Inc.
Copyright (C) 2011-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2001-2017 Free Software Foundation, Inc.
/* Copyright (C) 2001-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* The proper definitions for Linux's sigaction.
Copyright (C) 1993-2017 Free Software Foundation, Inc.
Copyright (C) 1993-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -16,6 +16,9 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef _BITS_SIGACTION_H
#define _BITS_SIGACTION_H 1
#ifndef _SIGNAL_H
# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
#endif
@ -24,7 +27,7 @@
struct sigaction
{
/* Signal handler. */
#ifdef __USE_POSIX199309
#if defined __USE_POSIX199309 || defined __USE_XOPEN_EXTENDED
union
{
/* Used if SA_SIGINFO is not set. */
@ -54,10 +57,10 @@ struct sigaction
#define SA_NOCLDWAIT 2 /* Don't create zombie on child death. */
#define SA_SIGINFO 4 /* Invoke signal-catching function with
three arguments instead of one. */
#if defined __USE_UNIX98 || defined __USE_MISC
#if defined __USE_XOPEN_EXTENDED || defined __USE_MISC
# define SA_ONSTACK 0x08000000 /* Use signal stack by using `sa_restorer'. */
#endif
#if defined __USE_UNIX98 || defined __USE_XOPEN2K8
#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
# define SA_RESTART 0x10000000 /* Restart syscall on signal return. */
# define SA_NODEFER 0x40000000 /* Don't automatically block the signal when
its handler is being executed. */
@ -76,3 +79,5 @@ struct sigaction
#define SIG_BLOCK 0 /* Block signals. */
#define SIG_UNBLOCK 1 /* Unblock signals. */
#define SIG_SETMASK 2 /* Set the set of blocked signals. */
#endif

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2002-2017 Free Software Foundation, Inc.
/* Copyright (C) 2002-2018 Free Software 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,8 @@
# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
#endif
#include <bits/types.h>
#define FP_XSTATE_MAGIC1 0x46505853U
#define FP_XSTATE_MAGIC2 0x46505845U
#define FP_XSTATE_MAGIC2_SIZE sizeof(FP_XSTATE_MAGIC2)
@ -32,7 +34,7 @@ struct _fpx_sw_bytes
__uint32_t extended_size;
__uint64_t xstate_bv;
__uint32_t xstate_size;
__uint32_t padding[7];
__uint32_t __glibc_reserved1[7];
};
struct _fpreg
@ -45,7 +47,7 @@ struct _fpxreg
{
unsigned short significand[4];
unsigned short exponent;
unsigned short padding[3];
unsigned short __glibc_reserved1[3];
};
struct _xmmreg
@ -74,10 +76,10 @@ struct _fpstate
/* FXSR FPU environment. */
__uint32_t _fxsr_env[6];
__uint32_t mxcsr;
__uint32_t reserved;
__uint32_t __glibc_reserved1;
struct _fpxreg _fxsr_st[8];
struct _xmmreg _xmm[8];
__uint32_t padding[56];
__uint32_t __glibc_reserved2[56];
};
#ifndef sigcontext_struct
@ -131,7 +133,7 @@ struct _fpstate
__uint32_t mxcr_mask;
struct _fpxreg _st[8];
struct _xmmreg _xmm[16];
__uint32_t padding[24];
__uint32_t __glibc_reserved1[24];
};
struct sigcontext
@ -175,8 +177,8 @@ struct sigcontext
struct _xsave_hdr
{
__uint64_t xstate_bv;
__uint64_t reserved1[2];
__uint64_t reserved2[5];
__uint64_t __glibc_reserved1[2];
__uint64_t __glibc_reserved2[5];
};
struct _ymmh_state

View file

@ -0,0 +1,41 @@
/* sigevent constants. Linux version.
Copyright (C) 1997-2018 Free Software 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 _BITS_SIGEVENT_CONSTS_H
#define _BITS_SIGEVENT_CONSTS_H 1
#if !defined _SIGNAL_H && !defined _AIO_H
#error "Don't include <bits/sigevent-consts.h> directly; use <signal.h> instead."
#endif
/* `sigev_notify' values. */
enum
{
SIGEV_SIGNAL = 0, /* Notify via signal. */
# define SIGEV_SIGNAL SIGEV_SIGNAL
SIGEV_NONE, /* Other notification: meaningless. */
# define SIGEV_NONE SIGEV_NONE
SIGEV_THREAD, /* Deliver via thread creation. */
# define SIGEV_THREAD SIGEV_THREAD
SIGEV_THREAD_ID = 4 /* Send signal to specific thread.
This is a Linux extension. */
#define SIGEV_THREAD_ID SIGEV_THREAD_ID
};
#endif

View file

@ -0,0 +1,17 @@
/* Architecture-specific adjustments to siginfo_t. x86 version. */
#ifndef _BITS_SIGINFO_ARCH_H
#define _BITS_SIGINFO_ARCH_H 1
#if defined __x86_64__ && __WORDSIZE == 32
/* si_utime and si_stime must be 4 byte aligned for x32 to match the
kernel. We align siginfo_t to 8 bytes so that si_utime and
si_stime are actually aligned to 8 bytes since their offsets are
multiple of 8 bytes. Note: with some compilers, the alignment
attribute would be ignored if it were put in __SI_CLOCK_T instead
of encapsulated in a typedef. */
typedef __clock_t __attribute__ ((__aligned__ (4))) __sigchld_clock_t;
# define __SI_ALIGNMENT __attribute__ ((__aligned__ (8)))
# define __SI_CLOCK_T __sigchld_clock_t
#endif
#endif

View file

@ -0,0 +1,7 @@
/* Architecture-specific additional siginfo constants. */
#ifndef _BITS_SIGINFO_CONSTS_ARCH_H
#define _BITS_SIGINFO_CONSTS_ARCH_H 1
/* This architecture has no additional siginfo constants. */
#endif

View file

@ -0,0 +1,191 @@
/* siginfo constants. Linux version.
Copyright (C) 1997-2018 Free Software 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 _BITS_SIGINFO_CONSTS_H
#define _BITS_SIGINFO_CONSTS_H 1
#ifndef _SIGNAL_H
#error "Don't include <bits/siginfo-consts.h> directly; use <signal.h> instead."
#endif
/* Most of these constants are uniform across all architectures, but there
is one exception. */
#include <bits/siginfo-arch.h>
#ifndef __SI_ASYNCIO_AFTER_SIGIO
# define __SI_ASYNCIO_AFTER_SIGIO 1
#endif
/* Values for `si_code'. Positive values are reserved for kernel-generated
signals. */
enum
{
SI_ASYNCNL = -60, /* Sent by asynch name lookup completion. */
SI_TKILL = -6, /* Sent by tkill. */
SI_SIGIO, /* Sent by queued SIGIO. */
#if __SI_ASYNCIO_AFTER_SIGIO
SI_ASYNCIO, /* Sent by AIO completion. */
SI_MESGQ, /* Sent by real time mesq state change. */
SI_TIMER, /* Sent by timer expiration. */
#else
SI_MESGQ,
SI_TIMER,
SI_ASYNCIO,
#endif
SI_QUEUE, /* Sent by sigqueue. */
SI_USER, /* Sent by kill, sigsend. */
SI_KERNEL = 0x80 /* Send by kernel. */
#define SI_ASYNCNL SI_ASYNCNL
#define SI_TKILL SI_TKILL
#define SI_SIGIO SI_SIGIO
#define SI_ASYNCIO SI_ASYNCIO
#define SI_MESGQ SI_MESGQ
#define SI_TIMER SI_TIMER
#define SI_ASYNCIO SI_ASYNCIO
#define SI_QUEUE SI_QUEUE
#define SI_USER SI_USER
#define SI_KERNEL SI_KERNEL
};
# 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
ILL_ILLOPN, /* Illegal operand. */
# define ILL_ILLOPN ILL_ILLOPN
ILL_ILLADR, /* Illegal addressing mode. */
# define ILL_ILLADR ILL_ILLADR
ILL_ILLTRP, /* Illegal trap. */
# define ILL_ILLTRP ILL_ILLTRP
ILL_PRVOPC, /* Privileged opcode. */
# define ILL_PRVOPC ILL_PRVOPC
ILL_PRVREG, /* Privileged register. */
# define ILL_PRVREG ILL_PRVREG
ILL_COPROC, /* Coprocessor error. */
# define ILL_COPROC ILL_COPROC
ILL_BADSTK /* Internal stack error. */
# define ILL_BADSTK ILL_BADSTK
};
/* `si_code' values for SIGFPE signal. */
enum
{
FPE_INTDIV = 1, /* Integer divide by zero. */
# define FPE_INTDIV FPE_INTDIV
FPE_INTOVF, /* Integer overflow. */
# define FPE_INTOVF FPE_INTOVF
FPE_FLTDIV, /* Floating point divide by zero. */
# define FPE_FLTDIV FPE_FLTDIV
FPE_FLTOVF, /* Floating point overflow. */
# define FPE_FLTOVF FPE_FLTOVF
FPE_FLTUND, /* Floating point underflow. */
# define FPE_FLTUND FPE_FLTUND
FPE_FLTRES, /* Floating point inexact result. */
# define FPE_FLTRES FPE_FLTRES
FPE_FLTINV, /* Floating point invalid operation. */
# define FPE_FLTINV FPE_FLTINV
FPE_FLTSUB /* Subscript out of range. */
# 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
SEGV_ACCERR, /* Invalid permissions for mapped object. */
# define SEGV_ACCERR SEGV_ACCERR
SEGV_BNDERR, /* Bounds checking failure. */
# define SEGV_BNDERR SEGV_BNDERR
SEGV_PKUERR /* Protection key checking failure. */
# define SEGV_PKUERR SEGV_PKUERR
};
/* `si_code' values for SIGBUS signal. */
enum
{
BUS_ADRALN = 1, /* Invalid address alignment. */
# define BUS_ADRALN BUS_ADRALN
BUS_ADRERR, /* Non-existant physical address. */
# define BUS_ADRERR BUS_ADRERR
BUS_OBJERR, /* Object specific hardware error. */
# define BUS_OBJERR BUS_OBJERR
BUS_MCEERR_AR, /* Hardware memory error: action required. */
# define BUS_MCEERR_AR BUS_MCEERR_AR
BUS_MCEERR_AO /* Hardware memory error: action optional. */
# define BUS_MCEERR_AO BUS_MCEERR_AO
};
# endif
# ifdef __USE_XOPEN_EXTENDED
/* `si_code' values for SIGTRAP signal. */
enum
{
TRAP_BRKPT = 1, /* Process breakpoint. */
# define TRAP_BRKPT TRAP_BRKPT
TRAP_TRACE /* Process trace trap. */
# 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
CLD_KILLED, /* Child was killed. */
# define CLD_KILLED CLD_KILLED
CLD_DUMPED, /* Child terminated abnormally. */
# define CLD_DUMPED CLD_DUMPED
CLD_TRAPPED, /* Traced child has trapped. */
# define CLD_TRAPPED CLD_TRAPPED
CLD_STOPPED, /* Child has stopped. */
# define CLD_STOPPED CLD_STOPPED
CLD_CONTINUED /* Stopped child has continued. */
# define CLD_CONTINUED CLD_CONTINUED
};
/* `si_code' values for SIGPOLL signal. */
enum
{
POLL_IN = 1, /* Data input available. */
# define POLL_IN POLL_IN
POLL_OUT, /* Output buffers available. */
# define POLL_OUT POLL_OUT
POLL_MSG, /* Input message available. */
# define POLL_MSG POLL_MSG
POLL_ERR, /* I/O error. */
# define POLL_ERR POLL_ERR
POLL_PRI, /* High priority input available. */
# define POLL_PRI POLL_PRI
POLL_HUP /* Device disconnected. */
# define POLL_HUP POLL_HUP
};
# endif
/* Architectures might also add architecture-specific constants.
These are all considered GNU extensions. */
#ifdef __USE_GNU
# include <bits/siginfo-consts-arch.h>
#endif
#endif

View file

@ -1,360 +0,0 @@
/* siginfo_t, sigevent and constants. Linux x86-64 version.
Copyright (C) 2012-2017 Free Software 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/>. */
#if !defined _SIGNAL_H && !defined __need_siginfo_t \
&& !defined __need_sigevent_t
# error "Never include this file directly. Use <signal.h> instead"
#endif
#include <bits/wordsize.h>
#if (!defined __have_sigval_t \
&& (defined _SIGNAL_H || defined __need_siginfo_t \
|| defined __need_sigevent_t))
# define __have_sigval_t 1
/* Type for data associated with a signal. */
typedef union sigval
{
int sival_int;
void *sival_ptr;
} sigval_t;
#endif
#if (!defined __have_siginfo_t \
&& (defined _SIGNAL_H || defined __need_siginfo_t))
# define __have_siginfo_t 1
# define __SI_MAX_SIZE 128
# if __WORDSIZE == 64
# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 4)
# else
# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3)
# endif
# if defined __x86_64__ && __WORDSIZE == 32
/* si_utime and si_stime must be 4 byte aligned for x32 to match the
kernel. We align siginfo_t to 8 bytes so that si_utime and si_stime
are actually aligned to 8 bytes since their offsets are multiple of
8 bytes. */
typedef __clock_t __attribute__ ((__aligned__ (4))) __sigchld_clock_t;
# define __SI_ALIGNMENT __attribute__ ((__aligned__ (8)))
# else
typedef __clock_t __sigchld_clock_t;
# define __SI_ALIGNMENT
# endif
typedef struct
{
int si_signo; /* Signal number. */
int si_errno; /* If non-zero, an errno value associated with
this signal, as defined in <errno.h>. */
int si_code; /* Signal code. */
union
{
int _pad[__SI_PAD_SIZE];
/* kill(). */
struct
{
__pid_t si_pid; /* Sending process ID. */
__uid_t si_uid; /* Real user ID of sending process. */
} _kill;
/* POSIX.1b timers. */
struct
{
int si_tid; /* Timer ID. */
int si_overrun; /* Overrun count. */
sigval_t si_sigval; /* Signal value. */
} _timer;
/* POSIX.1b signals. */
struct
{
__pid_t si_pid; /* Sending process ID. */
__uid_t si_uid; /* Real user ID of sending process. */
sigval_t si_sigval; /* Signal value. */
} _rt;
/* SIGCHLD. */
struct
{
__pid_t si_pid; /* Which child. */
__uid_t si_uid; /* Real user ID of sending process. */
int si_status; /* Exit value or signal. */
__sigchld_clock_t si_utime;
__sigchld_clock_t si_stime;
} _sigchld;
/* SIGILL, SIGFPE, SIGSEGV, SIGBUS. */
struct
{
void *si_addr; /* Faulting insn/memory ref. */
short int si_addr_lsb; /* Valid LSB of the reported address. */
struct
{
void *_lower;
void *_upper;
} si_addr_bnd;
} _sigfault;
/* SIGPOLL. */
struct
{
long int si_band; /* Band event for SIGPOLL. */
int si_fd;
} _sigpoll;
/* SIGSYS. */
struct
{
void *_call_addr; /* Calling user insn. */
int _syscall; /* Triggering system call number. */
unsigned int _arch; /* AUDIT_ARCH_* of syscall. */
} _sigsys;
} _sifields;
} siginfo_t __SI_ALIGNMENT;
/* X/Open requires some more fields with fixed names. */
# define si_pid _sifields._kill.si_pid
# define si_uid _sifields._kill.si_uid
# define si_timerid _sifields._timer.si_tid
# define si_overrun _sifields._timer.si_overrun
# define si_status _sifields._sigchld.si_status
# define si_utime _sifields._sigchld.si_utime
# define si_stime _sifields._sigchld.si_stime
# define si_value _sifields._rt.si_sigval
# define si_int _sifields._rt.si_sigval.sival_int
# define si_ptr _sifields._rt.si_sigval.sival_ptr
# define si_addr _sifields._sigfault.si_addr
# define si_addr_lsb _sifields._sigfault.si_addr_lsb
# define si_lower _sifields._sigfault.si_addr_bnd._lower
# define si_upper _sifields._sigfault.si_addr_bnd._upper
# define si_band _sifields._sigpoll.si_band
# define si_fd _sifields._sigpoll.si_fd
# define si_call_addr _sifields._sigsys._call_addr
# define si_syscall _sifields._sigsys._syscall
# define si_arch _sifields._sigsys._arch
/* Values for `si_code'. Positive values are reserved for kernel-generated
signals. */
enum
{
SI_ASYNCNL = -60, /* Sent by asynch name lookup completion. */
# define SI_ASYNCNL SI_ASYNCNL
SI_TKILL = -6, /* Sent by tkill. */
# define SI_TKILL SI_TKILL
SI_SIGIO, /* Sent by queued SIGIO. */
# define SI_SIGIO SI_SIGIO
SI_ASYNCIO, /* Sent by AIO completion. */
# define SI_ASYNCIO SI_ASYNCIO
SI_MESGQ, /* Sent by real time mesq state change. */
# define SI_MESGQ SI_MESGQ
SI_TIMER, /* Sent by timer expiration. */
# define SI_TIMER SI_TIMER
SI_QUEUE, /* Sent by sigqueue. */
# define SI_QUEUE SI_QUEUE
SI_USER, /* Sent by kill, sigsend. */
# define SI_USER SI_USER
SI_KERNEL = 0x80 /* Send by kernel. */
#define SI_KERNEL SI_KERNEL
};
# 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
ILL_ILLOPN, /* Illegal operand. */
# define ILL_ILLOPN ILL_ILLOPN
ILL_ILLADR, /* Illegal addressing mode. */
# define ILL_ILLADR ILL_ILLADR
ILL_ILLTRP, /* Illegal trap. */
# define ILL_ILLTRP ILL_ILLTRP
ILL_PRVOPC, /* Privileged opcode. */
# define ILL_PRVOPC ILL_PRVOPC
ILL_PRVREG, /* Privileged register. */
# define ILL_PRVREG ILL_PRVREG
ILL_COPROC, /* Coprocessor error. */
# define ILL_COPROC ILL_COPROC
ILL_BADSTK /* Internal stack error. */
# define ILL_BADSTK ILL_BADSTK
};
/* `si_code' values for SIGFPE signal. */
enum
{
FPE_INTDIV = 1, /* Integer divide by zero. */
# define FPE_INTDIV FPE_INTDIV
FPE_INTOVF, /* Integer overflow. */
# define FPE_INTOVF FPE_INTOVF
FPE_FLTDIV, /* Floating point divide by zero. */
# define FPE_FLTDIV FPE_FLTDIV
FPE_FLTOVF, /* Floating point overflow. */
# define FPE_FLTOVF FPE_FLTOVF
FPE_FLTUND, /* Floating point underflow. */
# define FPE_FLTUND FPE_FLTUND
FPE_FLTRES, /* Floating point inexact result. */
# define FPE_FLTRES FPE_FLTRES
FPE_FLTINV, /* Floating point invalid operation. */
# define FPE_FLTINV FPE_FLTINV
FPE_FLTSUB /* Subscript out of range. */
# 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
SEGV_ACCERR /* Invalid permissions for mapped object. */
# define SEGV_ACCERR SEGV_ACCERR
};
/* `si_code' values for SIGBUS signal. */
enum
{
BUS_ADRALN = 1, /* Invalid address alignment. */
# define BUS_ADRALN BUS_ADRALN
BUS_ADRERR, /* Non-existant physical address. */
# define BUS_ADRERR BUS_ADRERR
BUS_OBJERR, /* Object specific hardware error. */
# define BUS_OBJERR BUS_OBJERR
BUS_MCEERR_AR, /* Hardware memory error: action required. */
# define BUS_MCEERR_AR BUS_MCEERR_AR
BUS_MCEERR_AO /* Hardware memory error: action optional. */
# define BUS_MCEERR_AO BUS_MCEERR_AO
};
# endif
# ifdef __USE_XOPEN_EXTENDED
/* `si_code' values for SIGTRAP signal. */
enum
{
TRAP_BRKPT = 1, /* Process breakpoint. */
# define TRAP_BRKPT TRAP_BRKPT
TRAP_TRACE /* Process trace trap. */
# 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
CLD_KILLED, /* Child was killed. */
# define CLD_KILLED CLD_KILLED
CLD_DUMPED, /* Child terminated abnormally. */
# define CLD_DUMPED CLD_DUMPED
CLD_TRAPPED, /* Traced child has trapped. */
# define CLD_TRAPPED CLD_TRAPPED
CLD_STOPPED, /* Child has stopped. */
# define CLD_STOPPED CLD_STOPPED
CLD_CONTINUED /* Stopped child has continued. */
# define CLD_CONTINUED CLD_CONTINUED
};
/* `si_code' values for SIGPOLL signal. */
enum
{
POLL_IN = 1, /* Data input available. */
# define POLL_IN POLL_IN
POLL_OUT, /* Output buffers available. */
# define POLL_OUT POLL_OUT
POLL_MSG, /* Input message available. */
# define POLL_MSG POLL_MSG
POLL_ERR, /* I/O error. */
# define POLL_ERR POLL_ERR
POLL_PRI, /* High priority input available. */
# define POLL_PRI POLL_PRI
POLL_HUP /* Device disconnected. */
# define POLL_HUP POLL_HUP
};
# endif
# undef __need_siginfo_t
#endif /* !have siginfo_t && (have _SIGNAL_H || need siginfo_t). */
#if (defined _SIGNAL_H || defined __need_sigevent_t) \
&& !defined __have_sigevent_t
# define __have_sigevent_t 1
/* Structure to transport application-defined values with signals. */
# define __SIGEV_MAX_SIZE 64
# if __WORDSIZE == 64
# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
# else
# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3)
# endif
/* Forward declaration. */
# ifndef __have_pthread_attr_t
typedef union pthread_attr_t pthread_attr_t;
# define __have_pthread_attr_t 1
# endif
typedef struct sigevent
{
sigval_t sigev_value;
int sigev_signo;
int sigev_notify;
union
{
int _pad[__SIGEV_PAD_SIZE];
/* When SIGEV_SIGNAL and SIGEV_THREAD_ID set, LWP ID of the
thread to receive the signal. */
__pid_t _tid;
struct
{
void (*_function) (sigval_t); /* Function to start. */
pthread_attr_t *_attribute; /* Thread attributes. */
} _sigev_thread;
} _sigev_un;
} sigevent_t;
/* POSIX names to access some of the members. */
# define sigev_notify_function _sigev_un._sigev_thread._function
# define sigev_notify_attributes _sigev_un._sigev_thread._attribute
/* `sigev_notify' values. */
enum
{
SIGEV_SIGNAL = 0, /* Notify via signal. */
# define SIGEV_SIGNAL SIGEV_SIGNAL
SIGEV_NONE, /* Other notification: meaningless. */
# define SIGEV_NONE SIGEV_NONE
SIGEV_THREAD, /* Deliver via thread creation. */
# define SIGEV_THREAD SIGEV_THREAD
SIGEV_THREAD_ID = 4 /* Send signal to specific thread. */
#define SIGEV_THREAD_ID SIGEV_THREAD_ID
};
#endif /* have _SIGNAL_H. */

View file

@ -0,0 +1,102 @@
/* Signal number constants. Generic template.
Copyright (C) 1991-2018 Free Software 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 _BITS_SIGNUM_GENERIC_H
#define _BITS_SIGNUM_GENERIC_H 1
#ifndef _SIGNAL_H
#error "Never include <bits/signum-generic.h> directly; use <signal.h> instead."
#endif
/* Fake signal functions. */
#define SIG_ERR ((__sighandler_t) -1) /* Error return. */
#define SIG_DFL ((__sighandler_t) 0) /* Default action. */
#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */
#ifdef __USE_XOPEN
# 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);
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, we use the BSD numbers.
There are two unallocated signal numbers in the 1-31 range: 7 and 29.
Signal number 0 is reserved for use as kill(pid, 0), to test whether
a process exists without sending it a signal. */
/* ISO C99 signals. */
#define SIGINT 2 /* Interactive attention signal. */
#define SIGILL 4 /* Illegal instruction. */
#define SIGABRT 6 /* Abnormal termination. */
#define SIGFPE 8 /* Erroneous arithmetic operation. */
#define SIGSEGV 11 /* Invalid access to storage. */
#define SIGTERM 15 /* Termination request. */
/* Historical signals specified by POSIX. */
#define SIGHUP 1 /* Hangup. */
#define SIGQUIT 3 /* Quit. */
#define SIGTRAP 5 /* Trace/breakpoint trap. */
#define SIGKILL 9 /* Killed. */
#define SIGBUS 10 /* Bus error. */
#define SIGSYS 12 /* Bad system call. */
#define SIGPIPE 13 /* Broken pipe. */
#define SIGALRM 14 /* Alarm clock. */
/* New(er) POSIX signals (1003.1-2008, 1003.1-2013). */
#define SIGURG 16 /* Urgent data is available at a socket. */
#define SIGSTOP 17 /* Stop, unblockable. */
#define SIGTSTP 18 /* Keyboard stop. */
#define SIGCONT 19 /* Continue. */
#define SIGCHLD 20 /* Child terminated or stopped. */
#define SIGTTIN 21 /* Background read from control terminal. */
#define SIGTTOU 22 /* Background write to control terminal. */
#define SIGPOLL 23 /* Pollable event occurred (System V). */
#define SIGXCPU 24 /* CPU time limit exceeded. */
#define SIGXFSZ 25 /* File size limit exceeded. */
#define SIGVTALRM 26 /* Virtual timer expired. */
#define SIGPROF 27 /* Profiling timer expired. */
#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). */
/* Archaic names for compatibility. */
#define SIGIO SIGPOLL /* I/O now possible (4.2 BSD). */
#define SIGIOT SIGABRT /* IOT instruction, abort() on a PDP-11. */
#define SIGCLD SIGCHLD /* Old System V name */
/* Not all systems support real-time signals. bits/signum.h indicates
that they are supported by overriding __SIGRTMAX to a value greater
than __SIGRTMIN. These constants give the kernel-level hard limits,
but some real-time signals may be used internally by glibc. Do not
use these constants in application code; use SIGRTMIN and SIGRTMAX
(defined in signal.h) instead. */
#define __SIGRTMIN 32
#define __SIGRTMAX __SIGRTMIN
/* Biggest signal number + 1 (including real-time signals). */
#define _NSIG (__SIGRTMAX + 1)
#endif /* bits/signum-generic.h. */

View file

@ -1,5 +1,5 @@
/* Signal number definitions. Linux version.
Copyright (C) 1995-2017 Free Software Foundation, Inc.
Copyright (C) 1995-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -16,64 +16,43 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifdef _SIGNAL_H
#ifndef _BITS_SIGNUM_H
#define _BITS_SIGNUM_H 1
/* Fake signal functions. */
#define SIG_ERR ((__sighandler_t) -1) /* Error return. */
#define SIG_DFL ((__sighandler_t) 0) /* Default action. */
#define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */
#ifdef __USE_UNIX98
# define SIG_HOLD ((__sighandler_t) 2) /* Add signal to hold mask. */
#ifndef _SIGNAL_H
#error "Never include <bits/signum.h> directly; use <signal.h> instead."
#endif
#include <bits/signum-generic.h>
/* Signals. */
#define SIGHUP 1 /* Hangup (POSIX). */
#define SIGINT 2 /* Interrupt (ANSI). */
#define SIGQUIT 3 /* Quit (POSIX). */
#define SIGILL 4 /* Illegal instruction (ANSI). */
#define SIGTRAP 5 /* Trace trap (POSIX). */
#define SIGABRT 6 /* Abort (ANSI). */
#define SIGIOT 6 /* IOT trap (4.2 BSD). */
#define SIGBUS 7 /* BUS error (4.2 BSD). */
#define SIGFPE 8 /* Floating-point exception (ANSI). */
#define SIGKILL 9 /* Kill, unblockable (POSIX). */
#define SIGUSR1 10 /* User-defined signal 1 (POSIX). */
#define SIGSEGV 11 /* Segmentation violation (ANSI). */
#define SIGUSR2 12 /* User-defined signal 2 (POSIX). */
#define SIGPIPE 13 /* Broken pipe (POSIX). */
#define SIGALRM 14 /* Alarm clock (POSIX). */
#define SIGTERM 15 /* Termination (ANSI). */
#define SIGSTKFLT 16 /* Stack fault. */
#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */
#define SIGCHLD 17 /* Child status has changed (POSIX). */
#define SIGCONT 18 /* Continue (POSIX). */
#define SIGSTOP 19 /* Stop, unblockable (POSIX). */
#define SIGTSTP 20 /* Keyboard stop (POSIX). */
#define SIGTTIN 21 /* Background read from tty (POSIX). */
#define SIGTTOU 22 /* Background write to tty (POSIX). */
#define SIGURG 23 /* Urgent condition on socket (4.2 BSD). */
#define SIGXCPU 24 /* CPU limit exceeded (4.2 BSD). */
#define SIGXFSZ 25 /* File size limit exceeded (4.2 BSD). */
#define SIGVTALRM 26 /* Virtual alarm clock (4.2 BSD). */
#define SIGPROF 27 /* Profiling alarm clock (4.2 BSD). */
#define SIGWINCH 28 /* Window size change (4.3 BSD, Sun). */
#define SIGPOLL SIGIO /* Pollable event occurred (System V). */
#define SIGIO 29 /* I/O now possible (4.2 BSD). */
#define SIGPWR 30 /* Power failure restart (System V). */
#define SIGSYS 31 /* Bad system call. */
#define SIGUNUSED 31
/* Adjustments and additions to the signal number constants for
most Linux systems. */
#define _NSIG 65 /* Biggest signal number + 1
(including real-time signals). */
#define SIGSTKFLT 16 /* Stack fault (obsolete). */
#define SIGPWR 30 /* Power failure imminent. */
#define SIGRTMIN (__libc_current_sigrtmin ())
#define SIGRTMAX (__libc_current_sigrtmax ())
#undef SIGBUS
#define SIGBUS 7
#undef SIGUSR1
#define SIGUSR1 10
#undef SIGUSR2
#define SIGUSR2 12
#undef SIGCHLD
#define SIGCHLD 17
#undef SIGCONT
#define SIGCONT 18
#undef SIGSTOP
#define SIGSTOP 19
#undef SIGTSTP
#define SIGTSTP 20
#undef SIGURG
#define SIGURG 23
#undef SIGPOLL
#define SIGPOLL 29
#undef SIGSYS
#define SIGSYS 31
/* These are the hard limits of the kernel. These values should not be
used directly at user level. */
#define __SIGRTMIN 32
#define __SIGRTMAX (_NSIG - 1)
#undef __SIGRTMAX
#define __SIGRTMAX 64
#endif /* <signal.h> included. */

View file

@ -1,124 +0,0 @@
/* __sig_atomic_t, __sigset_t, and related definitions. Linux version.
Copyright (C) 1991-2017 Free Software 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 _SIGSET_H_types
# define _SIGSET_H_types 1
typedef int __sig_atomic_t;
/* A `sigset_t' has a bit for each signal. */
# define _SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int)))
typedef struct
{
unsigned long int __val[_SIGSET_NWORDS];
} __sigset_t;
#endif
/* We only want to define these functions if <signal.h> was actually
included; otherwise we were included just to define the types. Since we
are namespace-clean, it wouldn't hurt to define extra macros. But
trouble can be caused by functions being defined (e.g., any global
register vars declared later will cause compilation errors). */
#if !defined _SIGSET_H_fns && defined _SIGNAL_H
# define _SIGSET_H_fns 1
# ifndef _EXTERN_INLINE
# define _EXTERN_INLINE __extern_inline
# endif
/* Return a mask that includes the bit for SIG only. */
# define __sigmask(sig) \
(((unsigned long int) 1) << (((sig) - 1) % (8 * sizeof (unsigned long int))))
/* Return the word index for SIG. */
# define __sigword(sig) (((sig) - 1) / (8 * sizeof (unsigned long int)))
# if defined __GNUC__ && __GNUC__ >= 2
# define __sigemptyset(set) \
(__extension__ ({ int __cnt = _SIGSET_NWORDS; \
sigset_t *__set = (set); \
while (--__cnt >= 0) __set->__val[__cnt] = 0; \
0; }))
# define __sigfillset(set) \
(__extension__ ({ int __cnt = _SIGSET_NWORDS; \
sigset_t *__set = (set); \
while (--__cnt >= 0) __set->__val[__cnt] = ~0UL; \
0; }))
# ifdef __USE_GNU
/* The POSIX does not specify for handling the whole signal set in one
command. This is often wanted and so we define three more functions
here. */
# define __sigisemptyset(set) \
(__extension__ ({ int __cnt = _SIGSET_NWORDS; \
const sigset_t *__set = (set); \
int __ret = __set->__val[--__cnt]; \
while (!__ret && --__cnt >= 0) \
__ret = __set->__val[__cnt]; \
__ret == 0; }))
# define __sigandset(dest, left, right) \
(__extension__ ({ int __cnt = _SIGSET_NWORDS; \
sigset_t *__dest = (dest); \
const sigset_t *__left = (left); \
const sigset_t *__right = (right); \
while (--__cnt >= 0) \
__dest->__val[__cnt] = (__left->__val[__cnt] \
& __right->__val[__cnt]); \
0; }))
# define __sigorset(dest, left, right) \
(__extension__ ({ int __cnt = _SIGSET_NWORDS; \
sigset_t *__dest = (dest); \
const sigset_t *__left = (left); \
const sigset_t *__right = (right); \
while (--__cnt >= 0) \
__dest->__val[__cnt] = (__left->__val[__cnt] \
| __right->__val[__cnt]); \
0; }))
# endif
# endif
/* These functions needn't check for a bogus signal number -- error
checking is done in the non __ versions. */
extern int __sigismember (const __sigset_t *, int);
extern int __sigaddset (__sigset_t *, int);
extern int __sigdelset (__sigset_t *, int);
# ifdef __USE_EXTERN_INLINES
# define __SIGSETFN(NAME, BODY, CONST) \
_EXTERN_INLINE int \
NAME (CONST __sigset_t *__set, int __sig) \
{ \
unsigned long int __mask = __sigmask (__sig); \
unsigned long int __word = __sigword (__sig); \
return BODY; \
}
__SIGSETFN (__sigismember, (__set->__val[__word] & __mask) ? 1 : 0, const)
__SIGSETFN (__sigaddset, ((__set->__val[__word] |= __mask), 0), )
__SIGSETFN (__sigdelset, ((__set->__val[__word] &= ~__mask), 0), )
# undef __SIGSETFN
# endif
#endif /* ! _SIGSET_H_fns. */

View file

@ -1,5 +1,5 @@
/* sigstack, sigaltstack definitions.
Copyright (C) 1998-2017 Free Software Foundation, Inc.
Copyright (C) 1998-2018 Free Software 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,33 +23,6 @@
# error "Never include this file directly. Use <signal.h> instead"
#endif
#define __need_size_t
#include <stddef.h>
/* Structure describing a signal stack (obsolete). */
struct sigstack
{
void *ss_sp; /* Signal stack pointer. */
int ss_onstack; /* Nonzero if executing on this stack. */
};
/* Alternate, preferred interface. */
typedef struct sigaltstack
{
void *ss_sp;
int ss_flags;
size_t ss_size;
} stack_t;
/* Possible values for `ss_flags'. */
enum
{
SS_ONSTACK = 1,
#define SS_ONSTACK SS_ONSTACK
SS_DISABLE
#define SS_DISABLE SS_DISABLE
};
/* Minimum stack size for a signal handler. */
#define MINSIGSTKSZ 2048

View file

@ -1,5 +1,5 @@
/* Signal handling function for threaded programs.
Copyright (C) 1998-2017 Free Software Foundation, Inc.
Copyright (C) 1998-2018 Free Software 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,10 +20,11 @@
#define _BITS_SIGTHREAD_H 1
#if !defined _SIGNAL_H && !defined _PTHREAD_H
# error "Never include this file directly. Use <pthread.h> instead"
# error "Never include this file directly. Use <signal.h> instead"
#endif
/* Functions for handling signals. */
#include <bits/types/__sigset_t.h>
/* Modify the signal mask for the calling thread. The arguments have
the same meaning as for sigprocmask(2). */

View file

@ -1,4 +1,5 @@
/* Copyright (C) 1994-2017 Free Software Foundation, Inc.
/* ss_flags values for stack_t. Linux version.
Copyright (C) 1998-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -15,28 +16,20 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#if !defined _STDIO_H && !defined __need_FOPEN_MAX && !defined __need_IOV_MAX
# error "Never include <bits/stdio_lim.h> directly; use <stdio.h> instead."
#ifndef _BITS_SS_FLAGS_H
#define _BITS_SS_FLAGS_H 1
#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
# error "Never include this file directly. Use <signal.h> instead"
#endif
#ifdef _STDIO_H
# define L_tmpnam 20
# define TMP_MAX 238328
# define FILENAME_MAX 4096
/* Possible values for `ss_flags'. */
enum
{
SS_ONSTACK = 1,
#define SS_ONSTACK SS_ONSTACK
SS_DISABLE
#define SS_DISABLE SS_DISABLE
};
# ifdef __USE_POSIX
# define L_ctermid 9
# if !defined __USE_XOPEN2K || defined __USE_GNU
# define L_cuserid 9
# endif
# endif
#endif
#if defined __need_FOPEN_MAX || defined _STDIO_H
# undef FOPEN_MAX
# define FOPEN_MAX 16
#endif
#if defined __need_IOV_MAX && !defined IOV_MAX
# define IOV_MAX 1024
#endif
#endif /* bits/ss_flags.h */

View file

@ -0,0 +1,29 @@
/* Define intN_t types.
Copyright (C) 2017-2018 Free Software 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 _BITS_STDINT_INTN_H
#define _BITS_STDINT_INTN_H 1
#include <bits/types.h>
typedef __int8_t int8_t;
typedef __int16_t int16_t;
typedef __int32_t int32_t;
typedef __int64_t int64_t;
#endif /* bits/stdint-intn.h */

View file

@ -0,0 +1,29 @@
/* Define uintN_t types.
Copyright (C) 2017-2018 Free Software 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 _BITS_STDINT_UINTN_H
#define _BITS_STDINT_UINTN_H 1
#include <bits/types.h>
typedef __uint8_t uint8_t;
typedef __uint16_t uint16_t;
typedef __uint32_t uint32_t;
typedef __uint64_t uint64_t;
#endif /* bits/stdint-uintn.h */

View file

@ -1,101 +0,0 @@
/* -mlong-double-64 compatibility mode for stdio functions.
Copyright (C) 2006-2017 Free Software 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 _STDIO_H
# error "Never include <bits/stdio-ldbl.h> directly; use <stdio.h> instead."
#endif
__BEGIN_NAMESPACE_STD
__LDBL_REDIR_DECL (fprintf)
__LDBL_REDIR_DECL (printf)
__LDBL_REDIR_DECL (sprintf)
__LDBL_REDIR_DECL (vfprintf)
__LDBL_REDIR_DECL (vprintf)
__LDBL_REDIR_DECL (vsprintf)
#if defined __USE_ISOC99 && !defined __USE_GNU \
&& !defined __REDIRECT \
&& (defined __STRICT_ANSI__ || defined __USE_XOPEN2K)
__LDBL_REDIR1_DECL (fscanf, __nldbl___isoc99_fscanf)
__LDBL_REDIR1_DECL (scanf, __nldbl___isoc99_scanf)
__LDBL_REDIR1_DECL (sscanf, __nldbl___isoc99_sscanf)
#else
__LDBL_REDIR_DECL (fscanf)
__LDBL_REDIR_DECL (scanf)
__LDBL_REDIR_DECL (sscanf)
#endif
__END_NAMESPACE_STD
#if defined __USE_ISOC99 || defined __USE_UNIX98
__BEGIN_NAMESPACE_C99
__LDBL_REDIR_DECL (snprintf)
__LDBL_REDIR_DECL (vsnprintf)
__END_NAMESPACE_C99
#endif
#ifdef __USE_ISOC99
__BEGIN_NAMESPACE_C99
# if !defined __USE_GNU && !defined __REDIRECT \
&& (defined __STRICT_ANSI__ || defined __USE_XOPEN2K)
__LDBL_REDIR1_DECL (vfscanf, __nldbl___isoc99_vfscanf)
__LDBL_REDIR1_DECL (vscanf, __nldbl___isoc99_vscanf)
__LDBL_REDIR1_DECL (vsscanf, __nldbl___isoc99_vsscanf)
# else
__LDBL_REDIR_DECL (vfscanf)
__LDBL_REDIR_DECL (vsscanf)
__LDBL_REDIR_DECL (vscanf)
# endif
__END_NAMESPACE_C99
#endif
#ifdef __USE_XOPEN2K8
__LDBL_REDIR_DECL (vdprintf)
__LDBL_REDIR_DECL (dprintf)
#endif
#ifdef __USE_GNU
__LDBL_REDIR_DECL (vasprintf)
__LDBL_REDIR_DECL (__asprintf)
__LDBL_REDIR_DECL (asprintf)
__LDBL_REDIR_DECL (obstack_printf)
__LDBL_REDIR_DECL (obstack_vprintf)
#endif
#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
__LDBL_REDIR_DECL (__sprintf_chk)
__LDBL_REDIR_DECL (__vsprintf_chk)
# if defined __USE_ISOC99 || defined __USE_UNIX98
__LDBL_REDIR_DECL (__snprintf_chk)
__LDBL_REDIR_DECL (__vsnprintf_chk)
# endif
# if __USE_FORTIFY_LEVEL > 1
__LDBL_REDIR_DECL (__fprintf_chk)
__LDBL_REDIR_DECL (__printf_chk)
__LDBL_REDIR_DECL (__vfprintf_chk)
__LDBL_REDIR_DECL (__vprintf_chk)
# ifdef __USE_XOPEN2K8
__LDBL_REDIR_DECL (__dprintf_chk)
__LDBL_REDIR_DECL (__vdprintf_chk)
# endif
# ifdef __USE_GNU
__LDBL_REDIR_DECL (__asprintf_chk)
__LDBL_REDIR_DECL (__vasprintf_chk)
__LDBL_REDIR_DECL (__obstack_printf_chk)
__LDBL_REDIR_DECL (__obstack_vprintf_chk)
# endif
# endif
#endif

View file

@ -1,190 +0,0 @@
/* Optimizing macros and inline functions for stdio functions.
Copyright (C) 1998-2017 Free Software 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 _STDIO_H
# error "Never include <bits/stdio.h> directly; use <stdio.h> instead."
#endif
#ifndef __extern_inline
# define __STDIO_INLINE inline
#else
# define __STDIO_INLINE __extern_inline
#endif
#ifdef __USE_EXTERN_INLINES
/* For -D_FORTIFY_SOURCE{,=2} bits/stdio2.h will define a different
inline. */
# if !(__USE_FORTIFY_LEVEL > 0 && defined __fortify_function)
/* Write formatted output to stdout from argument list ARG. */
__STDIO_INLINE int
vprintf (const char *__restrict __fmt, _G_va_list __arg)
{
return vfprintf (stdout, __fmt, __arg);
}
# endif
/* Read a character from stdin. */
__STDIO_INLINE int
getchar (void)
{
return _IO_getc (stdin);
}
# ifdef __USE_MISC
/* Faster version when locking is not necessary. */
__STDIO_INLINE int
fgetc_unlocked (FILE *__fp)
{
return _IO_getc_unlocked (__fp);
}
# endif /* misc */
# ifdef __USE_POSIX
/* This is defined in POSIX.1:1996. */
__STDIO_INLINE int
getc_unlocked (FILE *__fp)
{
return _IO_getc_unlocked (__fp);
}
/* This is defined in POSIX.1:1996. */
__STDIO_INLINE int
getchar_unlocked (void)
{
return _IO_getc_unlocked (stdin);
}
# endif /* POSIX */
/* Write a character to stdout. */
__STDIO_INLINE int
putchar (int __c)
{
return _IO_putc (__c, stdout);
}
# ifdef __USE_MISC
/* Faster version when locking is not necessary. */
__STDIO_INLINE int
fputc_unlocked (int __c, FILE *__stream)
{
return _IO_putc_unlocked (__c, __stream);
}
# endif /* misc */
# ifdef __USE_POSIX
/* This is defined in POSIX.1:1996. */
__STDIO_INLINE int
putc_unlocked (int __c, FILE *__stream)
{
return _IO_putc_unlocked (__c, __stream);
}
/* This is defined in POSIX.1:1996. */
__STDIO_INLINE int
putchar_unlocked (int __c)
{
return _IO_putc_unlocked (__c, stdout);
}
# endif /* POSIX */
# ifdef __USE_GNU
/* Like `getdelim', but reads up to a newline. */
__STDIO_INLINE _IO_ssize_t
getline (char **__lineptr, size_t *__n, FILE *__stream)
{
return __getdelim (__lineptr, __n, '\n', __stream);
}
# endif /* GNU */
# ifdef __USE_MISC
/* Faster versions when locking is not required. */
__STDIO_INLINE int
__NTH (feof_unlocked (FILE *__stream))
{
return _IO_feof_unlocked (__stream);
}
/* Faster versions when locking is not required. */
__STDIO_INLINE int
__NTH (ferror_unlocked (FILE *__stream))
{
return _IO_ferror_unlocked (__stream);
}
# endif /* misc */
#endif /* Use extern inlines. */
#if defined __USE_MISC && defined __GNUC__ && defined __OPTIMIZE__ \
&& !defined __cplusplus
/* Perform some simple optimizations. */
# define fread_unlocked(ptr, size, n, stream) \
(__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) \
&& (size_t) (size) * (size_t) (n) <= 8 \
&& (size_t) (size) != 0) \
? ({ char *__ptr = (char *) (ptr); \
FILE *__stream = (stream); \
size_t __cnt; \
for (__cnt = (size_t) (size) * (size_t) (n); \
__cnt > 0; --__cnt) \
{ \
int __c = _IO_getc_unlocked (__stream); \
if (__c == EOF) \
break; \
*__ptr++ = __c; \
} \
((size_t) (size) * (size_t) (n) - __cnt) \
/ (size_t) (size); }) \
: (((__builtin_constant_p (size) && (size_t) (size) == 0) \
|| (__builtin_constant_p (n) && (size_t) (n) == 0)) \
/* Evaluate all parameters once. */ \
? ((void) (ptr), (void) (stream), (void) (size), \
(void) (n), (size_t) 0) \
: fread_unlocked (ptr, size, n, stream))))
# define fwrite_unlocked(ptr, size, n, stream) \
(__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) \
&& (size_t) (size) * (size_t) (n) <= 8 \
&& (size_t) (size) != 0) \
? ({ const char *__ptr = (const char *) (ptr); \
FILE *__stream = (stream); \
size_t __cnt; \
for (__cnt = (size_t) (size) * (size_t) (n); \
__cnt > 0; --__cnt) \
if (_IO_putc_unlocked (*__ptr++, __stream) == EOF) \
break; \
((size_t) (size) * (size_t) (n) - __cnt) \
/ (size_t) (size); }) \
: (((__builtin_constant_p (size) && (size_t) (size) == 0) \
|| (__builtin_constant_p (n) && (size_t) (n) == 0)) \
/* Evaluate all parameters once. */ \
? ((void) (ptr), (void) (stream), (void) (size), \
(void) (n), (size_t) 0) \
: fwrite_unlocked (ptr, size, n, stream))))
#endif
/* Define helper macro. */
#undef __STDIO_INLINE

View file

@ -1,382 +0,0 @@
/* Checking macros for stdio functions.
Copyright (C) 2004-2017 Free Software 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 _STDIO_H
# error "Never include <bits/stdio2.h> directly; use <stdio.h> instead."
#endif
extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen,
const char *__restrict __format, ...) __THROW;
extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen,
const char *__restrict __format,
_G_va_list __ap) __THROW;
#ifdef __va_arg_pack
__fortify_function int
__NTH (sprintf (char *__restrict __s, const char *__restrict __fmt, ...))
{
return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
__bos (__s), __fmt, __va_arg_pack ());
}
#elif !defined __cplusplus
# define sprintf(str, ...) \
__builtin___sprintf_chk (str, __USE_FORTIFY_LEVEL - 1, __bos (str), \
__VA_ARGS__)
#endif
__fortify_function int
__NTH (vsprintf (char *__restrict __s, const char *__restrict __fmt,
_G_va_list __ap))
{
return __builtin___vsprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
__bos (__s), __fmt, __ap);
}
#if defined __USE_ISOC99 || defined __USE_UNIX98
extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag,
size_t __slen, const char *__restrict __format,
...) __THROW;
extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag,
size_t __slen, const char *__restrict __format,
_G_va_list __ap) __THROW;
# ifdef __va_arg_pack
__fortify_function int
__NTH (snprintf (char *__restrict __s, size_t __n,
const char *__restrict __fmt, ...))
{
return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
__bos (__s), __fmt, __va_arg_pack ());
}
# elif !defined __cplusplus
# define snprintf(str, len, ...) \
__builtin___snprintf_chk (str, len, __USE_FORTIFY_LEVEL - 1, __bos (str), \
__VA_ARGS__)
# endif
__fortify_function int
__NTH (vsnprintf (char *__restrict __s, size_t __n,
const char *__restrict __fmt, _G_va_list __ap))
{
return __builtin___vsnprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
__bos (__s), __fmt, __ap);
}
#endif
#if __USE_FORTIFY_LEVEL > 1
extern int __fprintf_chk (FILE *__restrict __stream, int __flag,
const char *__restrict __format, ...);
extern int __printf_chk (int __flag, const char *__restrict __format, ...);
extern int __vfprintf_chk (FILE *__restrict __stream, int __flag,
const char *__restrict __format, _G_va_list __ap);
extern int __vprintf_chk (int __flag, const char *__restrict __format,
_G_va_list __ap);
# ifdef __va_arg_pack
__fortify_function int
fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...)
{
return __fprintf_chk (__stream, __USE_FORTIFY_LEVEL - 1, __fmt,
__va_arg_pack ());
}
__fortify_function int
printf (const char *__restrict __fmt, ...)
{
return __printf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ());
}
# elif !defined __cplusplus
# define printf(...) \
__printf_chk (__USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
# define fprintf(stream, ...) \
__fprintf_chk (stream, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
# endif
__fortify_function int
vprintf (const char *__restrict __fmt, _G_va_list __ap)
{
#ifdef __USE_EXTERN_INLINES
return __vfprintf_chk (stdout, __USE_FORTIFY_LEVEL - 1, __fmt, __ap);
#else
return __vprintf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, __ap);
#endif
}
__fortify_function int
vfprintf (FILE *__restrict __stream,
const char *__restrict __fmt, _G_va_list __ap)
{
return __vfprintf_chk (__stream, __USE_FORTIFY_LEVEL - 1, __fmt, __ap);
}
# ifdef __USE_XOPEN2K8
extern int __dprintf_chk (int __fd, int __flag, const char *__restrict __fmt,
...) __attribute__ ((__format__ (__printf__, 3, 4)));
extern int __vdprintf_chk (int __fd, int __flag,
const char *__restrict __fmt, _G_va_list __arg)
__attribute__ ((__format__ (__printf__, 3, 0)));
# ifdef __va_arg_pack
__fortify_function int
dprintf (int __fd, const char *__restrict __fmt, ...)
{
return __dprintf_chk (__fd, __USE_FORTIFY_LEVEL - 1, __fmt,
__va_arg_pack ());
}
# elif !defined __cplusplus
# define dprintf(fd, ...) \
__dprintf_chk (fd, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
# endif
__fortify_function int
vdprintf (int __fd, const char *__restrict __fmt, _G_va_list __ap)
{
return __vdprintf_chk (__fd, __USE_FORTIFY_LEVEL - 1, __fmt, __ap);
}
# endif
# ifdef __USE_GNU
extern int __asprintf_chk (char **__restrict __ptr, int __flag,
const char *__restrict __fmt, ...)
__THROW __attribute__ ((__format__ (__printf__, 3, 4))) __wur;
extern int __vasprintf_chk (char **__restrict __ptr, int __flag,
const char *__restrict __fmt, _G_va_list __arg)
__THROW __attribute__ ((__format__ (__printf__, 3, 0))) __wur;
extern int __obstack_printf_chk (struct obstack *__restrict __obstack,
int __flag, const char *__restrict __format,
...)
__THROW __attribute__ ((__format__ (__printf__, 3, 4)));
extern int __obstack_vprintf_chk (struct obstack *__restrict __obstack,
int __flag,
const char *__restrict __format,
_G_va_list __args)
__THROW __attribute__ ((__format__ (__printf__, 3, 0)));
# ifdef __va_arg_pack
__fortify_function int
__NTH (asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...))
{
return __asprintf_chk (__ptr, __USE_FORTIFY_LEVEL - 1, __fmt,
__va_arg_pack ());
}
__fortify_function int
__NTH (__asprintf (char **__restrict __ptr, const char *__restrict __fmt,
...))
{
return __asprintf_chk (__ptr, __USE_FORTIFY_LEVEL - 1, __fmt,
__va_arg_pack ());
}
__fortify_function int
__NTH (obstack_printf (struct obstack *__restrict __obstack,
const char *__restrict __fmt, ...))
{
return __obstack_printf_chk (__obstack, __USE_FORTIFY_LEVEL - 1, __fmt,
__va_arg_pack ());
}
# elif !defined __cplusplus
# define asprintf(ptr, ...) \
__asprintf_chk (ptr, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
# define __asprintf(ptr, ...) \
__asprintf_chk (ptr, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
# define obstack_printf(obstack, ...) \
__obstack_printf_chk (obstack, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
# endif
__fortify_function int
__NTH (vasprintf (char **__restrict __ptr, const char *__restrict __fmt,
_G_va_list __ap))
{
return __vasprintf_chk (__ptr, __USE_FORTIFY_LEVEL - 1, __fmt, __ap);
}
__fortify_function int
__NTH (obstack_vprintf (struct obstack *__restrict __obstack,
const char *__restrict __fmt, _G_va_list __ap))
{
return __obstack_vprintf_chk (__obstack, __USE_FORTIFY_LEVEL - 1, __fmt,
__ap);
}
# endif
#endif
#if !defined __USE_ISOC11 \
|| (defined __cplusplus && __cplusplus <= 201103L && !defined __USE_GNU)
extern char *__gets_chk (char *__str, size_t) __wur;
extern char *__REDIRECT (__gets_warn, (char *__str), gets)
__wur __warnattr ("please use fgets or getline instead, gets can't "
"specify buffer size");
__fortify_function __wur char *
gets (char *__str)
{
if (__bos (__str) != (size_t) -1)
return __gets_chk (__str, __bos (__str));
return __gets_warn (__str);
}
#endif
extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n,
FILE *__restrict __stream) __wur;
extern char *__REDIRECT (__fgets_alias,
(char *__restrict __s, int __n,
FILE *__restrict __stream), fgets) __wur;
extern char *__REDIRECT (__fgets_chk_warn,
(char *__restrict __s, size_t __size, int __n,
FILE *__restrict __stream), __fgets_chk)
__wur __warnattr ("fgets called with bigger size than length "
"of destination buffer");
__fortify_function __wur char *
fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
{
if (__bos (__s) != (size_t) -1)
{
if (!__builtin_constant_p (__n) || __n <= 0)
return __fgets_chk (__s, __bos (__s), __n, __stream);
if ((size_t) __n > __bos (__s))
return __fgets_chk_warn (__s, __bos (__s), __n, __stream);
}
return __fgets_alias (__s, __n, __stream);
}
extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen,
size_t __size, size_t __n,
FILE *__restrict __stream) __wur;
extern size_t __REDIRECT (__fread_alias,
(void *__restrict __ptr, size_t __size,
size_t __n, FILE *__restrict __stream),
fread) __wur;
extern size_t __REDIRECT (__fread_chk_warn,
(void *__restrict __ptr, size_t __ptrlen,
size_t __size, size_t __n,
FILE *__restrict __stream),
__fread_chk)
__wur __warnattr ("fread called with bigger size * nmemb than length "
"of destination buffer");
__fortify_function __wur size_t
fread (void *__restrict __ptr, size_t __size, size_t __n,
FILE *__restrict __stream)
{
if (__bos0 (__ptr) != (size_t) -1)
{
if (!__builtin_constant_p (__size)
|| !__builtin_constant_p (__n)
|| (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2)))
return __fread_chk (__ptr, __bos0 (__ptr), __size, __n, __stream);
if (__size * __n > __bos0 (__ptr))
return __fread_chk_warn (__ptr, __bos0 (__ptr), __size, __n, __stream);
}
return __fread_alias (__ptr, __size, __n, __stream);
}
#ifdef __USE_GNU
extern char *__fgets_unlocked_chk (char *__restrict __s, size_t __size,
int __n, FILE *__restrict __stream) __wur;
extern char *__REDIRECT (__fgets_unlocked_alias,
(char *__restrict __s, int __n,
FILE *__restrict __stream), fgets_unlocked) __wur;
extern char *__REDIRECT (__fgets_unlocked_chk_warn,
(char *__restrict __s, size_t __size, int __n,
FILE *__restrict __stream), __fgets_unlocked_chk)
__wur __warnattr ("fgets_unlocked called with bigger size than length "
"of destination buffer");
__fortify_function __wur char *
fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream)
{
if (__bos (__s) != (size_t) -1)
{
if (!__builtin_constant_p (__n) || __n <= 0)
return __fgets_unlocked_chk (__s, __bos (__s), __n, __stream);
if ((size_t) __n > __bos (__s))
return __fgets_unlocked_chk_warn (__s, __bos (__s), __n, __stream);
}
return __fgets_unlocked_alias (__s, __n, __stream);
}
#endif
#ifdef __USE_MISC
# undef fread_unlocked
extern size_t __fread_unlocked_chk (void *__restrict __ptr, size_t __ptrlen,
size_t __size, size_t __n,
FILE *__restrict __stream) __wur;
extern size_t __REDIRECT (__fread_unlocked_alias,
(void *__restrict __ptr, size_t __size,
size_t __n, FILE *__restrict __stream),
fread_unlocked) __wur;
extern size_t __REDIRECT (__fread_unlocked_chk_warn,
(void *__restrict __ptr, size_t __ptrlen,
size_t __size, size_t __n,
FILE *__restrict __stream),
__fread_unlocked_chk)
__wur __warnattr ("fread_unlocked called with bigger size * nmemb than "
"length of destination buffer");
__fortify_function __wur size_t
fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n,
FILE *__restrict __stream)
{
if (__bos0 (__ptr) != (size_t) -1)
{
if (!__builtin_constant_p (__size)
|| !__builtin_constant_p (__n)
|| (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2)))
return __fread_unlocked_chk (__ptr, __bos0 (__ptr), __size, __n,
__stream);
if (__size * __n > __bos0 (__ptr))
return __fread_unlocked_chk_warn (__ptr, __bos0 (__ptr), __size, __n,
__stream);
}
# ifdef __USE_EXTERN_INLINES
if (__builtin_constant_p (__size)
&& __builtin_constant_p (__n)
&& (__size | __n) < (((size_t) 1) << (8 * sizeof (size_t) / 2))
&& __size * __n <= 8)
{
size_t __cnt = __size * __n;
char *__cptr = (char *) __ptr;
if (__cnt == 0)
return 0;
for (; __cnt > 0; --__cnt)
{
int __c = _IO_getc_unlocked (__stream);
if (__c == EOF)
break;
*__cptr++ = __c;
}
return (__cptr - (char *) __ptr) / __size;
}
# endif
return __fread_unlocked_alias (__ptr, __size, __n, __stream);
}
#endif

View file

@ -1,5 +1,5 @@
/* Perform binary search - inline version.
Copyright (C) 1991-2017 Free Software Foundation, Inc.
Copyright (C) 1991-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Floating-point inline functions for stdlib.h.
Copyright (C) 2012-2017 Free Software Foundation, Inc.
Copyright (C) 2012-2018 Free Software 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,11 +21,9 @@
#endif
#ifdef __USE_EXTERN_INLINES
__BEGIN_NAMESPACE_STD
__extern_inline double
__NTH (atof (const char *__nptr))
{
return strtod (__nptr, (char **) NULL);
}
__END_NAMESPACE_STD
#endif /* Optimizing and Inlining. */

View file

@ -1,5 +1,5 @@
/* -mlong-double-64 compatibility mode for <stdlib.h> functions.
Copyright (C) 2006-2017 Free Software Foundation, Inc.
Copyright (C) 2006-2018 Free Software 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,9 +21,7 @@
#endif
#ifdef __USE_ISOC99
__BEGIN_NAMESPACE_C99
__LDBL_REDIR1_DECL (strtold, strtod)
__END_NAMESPACE_C99
#endif
#ifdef __USE_GNU

View file

@ -1,5 +1,5 @@
/* Checking macros for stdlib functions.
Copyright (C) 2005-2017 Free Software Foundation, Inc.
Copyright (C) 2005-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

File diff suppressed because it is too large Load diff

View file

@ -1,246 +0,0 @@
/* Machine-independant string function optimizations.
Copyright (C) 1997-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
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 _STRING_H
# error "Never use <bits/string2.h> directly; include <string.h> instead."
#endif
#ifndef __NO_STRING_INLINES
/* Unlike the definitions in the header <bits/string.h> the
definitions contained here are not optimized down to assembler
level. Those optimizations are not always a good idea since this
means the code size increases a lot. Instead the definitions here
optimize some functions in a way which do not dramatically
increase the code size and which do not use assembler. The main
trick is to use GCC's `__builtin_constant_p' function.
Every function XXX which has a defined version in
<bits/string.h> must be accompanied by a symbol _HAVE_STRING_ARCH_XXX
to make sure we don't get redefinitions.
We must use here macros instead of inline functions since the
trick won't work with the latter. */
#ifndef __STRING_INLINE
# ifdef __cplusplus
# define __STRING_INLINE inline
# else
# define __STRING_INLINE __extern_inline
# endif
#endif
/* Dereferencing a pointer arg to run sizeof on it fails for the void
pointer case, so we use this instead.
Note that __x is evaluated twice. */
#define __string2_1bptr_p(__x) \
((size_t)(const void *)((__x) + 1) - (size_t)(const void *)(__x) == 1)
/* Set N bytes of S to 0. */
#if !defined _HAVE_STRING_ARCH_memset
# define __bzero(s, n) __builtin_memset (s, '\0', n)
#endif
#ifndef _HAVE_STRING_ARCH_strchr
extern void *__rawmemchr (const void *__s, int __c);
# define strchr(s, c) \
(__extension__ (__builtin_constant_p (c) && !__builtin_constant_p (s) \
&& (c) == '\0' \
? (char *) __rawmemchr (s, c) \
: __builtin_strchr (s, c)))
#endif
/* Copy SRC to DEST, returning pointer to final NUL byte. */
#ifdef __USE_GNU
# ifndef _HAVE_STRING_ARCH_stpcpy
# define __stpcpy(dest, src) __builtin_stpcpy (dest, src)
/* In glibc we use this function frequently but for namespace reasons
we have to use the name `__stpcpy'. */
# define stpcpy(dest, src) __stpcpy (dest, src)
# endif
#endif
/* Copy no more than N characters of SRC to DEST. */
#ifndef _HAVE_STRING_ARCH_strncpy
# define strncpy(dest, src, n) __builtin_strncpy (dest, src, n)
#endif
/* Append no more than N characters from SRC onto DEST. */
#ifndef _HAVE_STRING_ARCH_strncat
# ifdef _USE_STRING_ARCH_strchr
# define strncat(dest, src, n) \
(__extension__ ({ char *__dest = (dest); \
__builtin_constant_p (src) && __builtin_constant_p (n) \
? (strlen (src) < ((size_t) (n)) \
? strcat (__dest, src) \
: (*((char *) __mempcpy (strchr (__dest, '\0'), \
src, n)) = '\0', __dest)) \
: strncat (dest, src, n); }))
# else
# define strncat(dest, src, n) __builtin_strncat (dest, src, n)
# endif
#endif
/* Compare characters of S1 and S2. */
#ifndef _HAVE_STRING_ARCH_strcmp
# define strcmp(s1, s2) \
__extension__ \
({ size_t __s1_len, __s2_len; \
(__builtin_constant_p (s1) && __builtin_constant_p (s2) \
&& (__s1_len = strlen (s1), __s2_len = strlen (s2), \
(!__string2_1bptr_p (s1) || __s1_len >= 4) \
&& (!__string2_1bptr_p (s2) || __s2_len >= 4)) \
? __builtin_strcmp (s1, s2) \
: (__builtin_constant_p (s1) && __string2_1bptr_p (s1) \
&& (__s1_len = strlen (s1), __s1_len < 4) \
? (__builtin_constant_p (s2) && __string2_1bptr_p (s2) \
? __builtin_strcmp (s1, s2) \
: __strcmp_cg (s1, s2, __s1_len)) \
: (__builtin_constant_p (s2) && __string2_1bptr_p (s2) \
&& (__s2_len = strlen (s2), __s2_len < 4) \
? (__builtin_constant_p (s1) && __string2_1bptr_p (s1) \
? __builtin_strcmp (s1, s2) \
: -__strcmp_cg (s2, s1, __s2_len)) \
: __builtin_strcmp (s1, s2)))); })
# define __strcmp_cg(s1, s2, l1) \
(__extension__ ({ const unsigned char *__s2 = \
(const unsigned char *) (const char *) (s2); \
int __result = \
(((const unsigned char *) (const char *) (s1))[0] \
- __s2[0]); \
if (l1 > 0 && __result == 0) \
{ \
__result = (((const unsigned char *) \
(const char *) (s1))[1] - __s2[1]); \
if (l1 > 1 && __result == 0) \
{ \
__result = (((const unsigned char *) \
(const char *) (s1))[2] - __s2[2]); \
if (l1 > 2 && __result == 0) \
__result = (((const unsigned char *) \
(const char *) (s1))[3] \
- __s2[3]); \
} \
} \
__result; }))
#endif
/* Compare N characters of S1 and S2. */
#ifndef _HAVE_STRING_ARCH_strncmp
# define strncmp(s1, s2, n) \
(__extension__ (__builtin_constant_p (n) \
&& ((__builtin_constant_p (s1) \
&& strlen (s1) < ((size_t) (n))) \
|| (__builtin_constant_p (s2) \
&& strlen (s2) < ((size_t) (n)))) \
? strcmp (s1, s2) : strncmp (s1, s2, n)))
#endif
/* Return the length of the initial segment of S which
consists entirely of characters not in REJECT. */
#ifndef _HAVE_STRING_ARCH_strcspn
# define strcspn(s, reject) __builtin_strcspn (s, reject)
#endif
/* Return the length of the initial segment of S which
consists entirely of characters in ACCEPT. */
#ifndef _HAVE_STRING_ARCH_strspn
# define strspn(s, accept) __builtin_strspn (s, accept)
#endif
/* Find the first occurrence in S of any character in ACCEPT. */
#ifndef _HAVE_STRING_ARCH_strpbrk
# define strpbrk(s, accept) __builtin_strpbrk (s, accept)
#endif
/* We need the memory allocation functions for inline strdup().
Referring to stdlib.h (even minimally) is not allowed
in any of the tight standards compliant modes. */
#ifdef __USE_MISC
# if !defined _HAVE_STRING_ARCH_strdup || !defined _HAVE_STRING_ARCH_strndup
# define __need_malloc_and_calloc
# include <stdlib.h>
# endif
# ifndef _HAVE_STRING_ARCH_strdup
extern char *__strdup (const char *__string) __THROW __attribute_malloc__;
# define __strdup(s) \
(__extension__ (__builtin_constant_p (s) && __string2_1bptr_p (s) \
? (((const char *) (s))[0] == '\0' \
? (char *) calloc ((size_t) 1, (size_t) 1) \
: ({ size_t __len = strlen (s) + 1; \
char *__retval = (char *) malloc (__len); \
if (__retval != NULL) \
__retval = (char *) memcpy (__retval, s, __len); \
__retval; })) \
: __strdup (s)))
# if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
# define strdup(s) __strdup (s)
# endif
# endif
# ifndef _HAVE_STRING_ARCH_strndup
extern char *__strndup (const char *__string, size_t __n)
__THROW __attribute_malloc__;
# define __strndup(s, n) \
(__extension__ (__builtin_constant_p (s) && __string2_1bptr_p (s) \
? (((const char *) (s))[0] == '\0' \
? (char *) calloc ((size_t) 1, (size_t) 1) \
: ({ size_t __len = strlen (s) + 1; \
size_t __n = (n); \
char *__retval; \
if (__n < __len) \
__len = __n + 1; \
__retval = (char *) malloc (__len); \
if (__retval != NULL) \
{ \
__retval[__len - 1] = '\0'; \
__retval = (char *) memcpy (__retval, s, \
__len - 1); \
} \
__retval; })) \
: __strndup (s, n)))
# ifdef __USE_XOPEN2K8
# define strndup(s, n) __strndup (s, n)
# endif
# endif
#endif /* Use misc. or use GNU. */
#ifndef _FORCE_INLINES
# undef __STRING_INLINE
#endif
#endif /* No string inlines. */

View file

@ -1,4 +1,4 @@
/* Copyright (C) 2004-2017 Free Software Foundation, Inc.
/* Copyright (C) 2004-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -15,8 +15,11 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef _BITS_STRING_FORTIFIED_H
#define _BITS_STRING_FORTIFIED_H 1
#ifndef _STRING_H
# error "Never use <bits/string3.h> directly; include <string.h> instead."
# error "Never use <bits/string_fortified.h> directly; include <string.h> instead."
#endif
#if !__GNUC_PREREQ (5,0)
@ -24,28 +27,6 @@ __warndecl (__warn_memset_zero_len,
"memset used with constant zero length parameter; this could be due to transposed parameters");
#endif
#ifndef __cplusplus
/* XXX This is temporarily. We should not redefine any of the symbols
and instead integrate the error checking into the original
definitions. */
# undef memcpy
# undef memmove
# undef memset
# undef strcat
# undef strcpy
# undef strncat
# undef strncpy
# ifdef __USE_GNU
# undef mempcpy
# undef stpcpy
# endif
# ifdef __USE_MISC
# undef bcopy
# undef bzero
# endif
#endif
__fortify_function void *
__NTH (memcpy (void *__restrict __dest, const void *__restrict __src,
size_t __len))
@ -154,3 +135,5 @@ __NTH (strncat (char *__restrict __dest, const char *__restrict __src,
{
return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest));
}
#endif /* bits/string_fortified.h */

View file

@ -1,5 +1,5 @@
/* Fortify macros for strings.h functions.
Copyright (C) 2017 Free Software Foundation, Inc.
Copyright (C) 2017-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,74 +0,0 @@
/* Definitions of macros to access `dev_t' values.
Copyright (C) 1996-2017 Free Software 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 _BITS_SYSMACROS_H
#define _BITS_SYSMACROS_H 1
#ifndef _SYS_SYSMACROS_H
# error "Never include <bits/sysmacros.h> directly; use <sys/sysmacros.h> instead."
#endif
/* dev_t in glibc is a 64-bit quantity, with 32-bit major and minor numbers.
Our default encoding is MMMM Mmmm mmmM MMmm, where M is a hex digit of
the major number and m is a hex digit of the minor number. This is
downward compatible with legacy systems where dev_t is 16 bits wide,
encoded as MMmm. It is also downward compatible with the Linux kernel,
which (as of 2016) uses 32-bit dev_t, encoded as mmmM MMmm.
Systems that use an incompatible encoding for dev_t should override this
file in the appropriate sysdeps subdirectory. */
#define __SYSMACROS_DECLARE_MAJOR(DECL_TEMPL) \
DECL_TEMPL(unsigned int, major, (__dev_t __dev))
#define __SYSMACROS_DEFINE_MAJOR(DECL_TEMPL) \
__SYSMACROS_DECLARE_MAJOR (DECL_TEMPL) \
{ \
unsigned int __major; \
__major = ((__dev & (__dev_t) 0x00000000000fff00u) >> 8); \
__major |= ((__dev & (__dev_t) 0xfffff00000000000u) >> 32); \
return __major; \
}
#define __SYSMACROS_DECLARE_MINOR(DECL_TEMPL) \
DECL_TEMPL(unsigned int, minor, (__dev_t __dev))
#define __SYSMACROS_DEFINE_MINOR(DECL_TEMPL) \
__SYSMACROS_DECLARE_MINOR (DECL_TEMPL) \
{ \
unsigned int __minor; \
__minor = ((__dev & (__dev_t) 0x00000000000000ffu) >> 0); \
__minor |= ((__dev & (__dev_t) 0x00000ffffff00000u) >> 12); \
return __minor; \
}
#define __SYSMACROS_DECLARE_MAKEDEV(DECL_TEMPL) \
DECL_TEMPL(__dev_t, makedev, (unsigned int __major, unsigned int __minor))
#define __SYSMACROS_DEFINE_MAKEDEV(DECL_TEMPL) \
__SYSMACROS_DECLARE_MAKEDEV (DECL_TEMPL) \
{ \
__dev_t __dev; \
__dev = (((__dev_t) (__major & 0x00000fffu)) << 8); \
__dev |= (((__dev_t) (__major & 0xfffff000u)) << 32); \
__dev |= (((__dev_t) (__minor & 0x000000ffu)) << 0); \
__dev |= (((__dev_t) (__minor & 0xffffff00u)) << 12); \
return __dev; \
}
#endif /* bits/sysmacros.h */

View file

@ -0,0 +1,178 @@
/* Common threading primitives definitions for both POSIX and C11.
Copyright (C) 2017-2018 Free Software 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 _THREAD_SHARED_TYPES_H
#define _THREAD_SHARED_TYPES_H 1
/* Arch-specific definitions. Each architecture must define the following
macros to define the expected sizes of pthread data types:
__SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t.
__SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t.
__SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t.
__SIZEOF_PTHREAD_COND_T - size of pthread_cond_t.
__SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t.
__SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t.
__SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t.
__SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t.
__SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t.
Also, the following macros must be define for internal pthread_mutex_t
struct definitions (struct __pthread_mutex_s):
__PTHREAD_COMPAT_PADDING_MID - any additional members after 'kind'
and before '__spin' (for 64 bits) or
'__nusers' (for 32 bits).
__PTHREAD_COMPAT_PADDING_END - any additional members at the end of
the internal structure.
__PTHREAD_MUTEX_LOCK_ELISION - 1 if the architecture supports lock
elision or 0 otherwise.
__PTHREAD_MUTEX_NUSERS_AFTER_KIND - control where to put __nusers. The
preferred value for new architectures
is 0.
__PTHREAD_MUTEX_USE_UNION - control whether internal __spins and
__list will be place inside a union for
linuxthreads compatibility.
The preferred value for new architectures
is 0.
For a new port the preferred values for the required defines are:
#define __PTHREAD_COMPAT_PADDING_MID
#define __PTHREAD_COMPAT_PADDING_END
#define __PTHREAD_MUTEX_LOCK_ELISION 0
#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 0
#define __PTHREAD_MUTEX_USE_UNION 0
__PTHREAD_MUTEX_LOCK_ELISION can be set to 1 if the hardware plans to
eventually support lock elision using transactional memory.
The additional macro defines any constraint for the lock alignment
inside the thread structures:
__LOCK_ALIGNMENT - for internal lock/futex usage.
Same idea but for the once locking primitive:
__ONCE_ALIGNMENT - for pthread_once_t/once_flag definition.
And finally the internal pthread_rwlock_t (struct __pthread_rwlock_arch_t)
must be defined.
*/
#include <bits/pthreadtypes-arch.h>
/* Common definition of pthread_mutex_t. */
#if !__PTHREAD_MUTEX_USE_UNION
typedef struct __pthread_internal_list
{
struct __pthread_internal_list *__prev;
struct __pthread_internal_list *__next;
} __pthread_list_t;
#else
typedef struct __pthread_internal_slist
{
struct __pthread_internal_slist *__next;
} __pthread_slist_t;
#endif
/* Lock elision support. */
#if __PTHREAD_MUTEX_LOCK_ELISION
# if !__PTHREAD_MUTEX_USE_UNION
# define __PTHREAD_SPINS_DATA \
short __spins; \
short __elision
# define __PTHREAD_SPINS 0, 0
# else
# define __PTHREAD_SPINS_DATA \
struct \
{ \
short __espins; \
short __eelision; \
} __elision_data
# define __PTHREAD_SPINS { 0, 0 }
# define __spins __elision_data.__espins
# define __elision __elision_data.__eelision
# endif
#else
# define __PTHREAD_SPINS_DATA int __spins
/* Mutex __spins initializer used by PTHREAD_MUTEX_INITIALIZER. */
# define __PTHREAD_SPINS 0
#endif
struct __pthread_mutex_s
{
int __lock __LOCK_ALIGNMENT;
unsigned int __count;
int __owner;
#if !__PTHREAD_MUTEX_NUSERS_AFTER_KIND
unsigned int __nusers;
#endif
/* KIND must stay at this position in the structure to maintain
binary compatibility with static initializers. */
int __kind;
__PTHREAD_COMPAT_PADDING_MID
#if __PTHREAD_MUTEX_NUSERS_AFTER_KIND
unsigned int __nusers;
#endif
#if !__PTHREAD_MUTEX_USE_UNION
__PTHREAD_SPINS_DATA;
__pthread_list_t __list;
# define __PTHREAD_MUTEX_HAVE_PREV 1
#else
__extension__ union
{
__PTHREAD_SPINS_DATA;
__pthread_slist_t __list;
};
# define __PTHREAD_MUTEX_HAVE_PREV 0
#endif
__PTHREAD_COMPAT_PADDING_END
};
/* Common definition of pthread_cond_t. */
struct __pthread_cond_s
{
__extension__ union
{
__extension__ unsigned long long int __wseq;
struct
{
unsigned int __low;
unsigned int __high;
} __wseq32;
};
__extension__ union
{
__extension__ unsigned long long int __g1_start;
struct
{
unsigned int __low;
unsigned int __high;
} __g1_start32;
};
unsigned int __g_refs[2] __LOCK_ALIGNMENT;
unsigned int __g_size[2];
unsigned int __g1_orig_size;
unsigned int __wrefs;
unsigned int __g_signals[2];
};
#endif /* _THREAD_SHARED_TYPES_H */

View file

@ -1,5 +1,5 @@
/* System-dependent timing definitions. Linux version.
Copyright (C) 1996-2017 Free Software Foundation, Inc.
Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1995-2017 Free Software Foundation, Inc.
/* Copyright (C) 1995-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* bits/types.h -- definitions of __*_t types underlying *_t types.
Copyright (C) 2002-2017 Free Software Foundation, Inc.
Copyright (C) 2002-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -47,6 +47,16 @@ __extension__ typedef signed long long int __int64_t;
__extension__ typedef unsigned long long int __uint64_t;
#endif
/* Smallest types with at least a given width. */
typedef __int8_t __int_least8_t;
typedef __uint8_t __uint_least8_t;
typedef __int16_t __int_least16_t;
typedef __uint16_t __uint_least16_t;
typedef __int32_t __int_least32_t;
typedef __uint32_t __uint_least32_t;
typedef __int64_t __int_least64_t;
typedef __uint64_t __uint_least64_t;
/* quad_t is also 64 bits. */
#if __WORDSIZE == 64
typedef long int __quad_t;
@ -188,7 +198,6 @@ __STD_TYPE __SYSCALL_ULONG_TYPE __syscall_ulong_t;
/* These few don't really vary by system, they always correspond
to one of the other defined types. */
typedef __off64_t __loff_t; /* Type of file sizes and offsets (LFS). */
typedef __quad_t *__qaddr_t;
typedef char *__caddr_t;
/* Duplicates info from stdint.h but this is used in unistd.h. */
@ -197,6 +206,10 @@ __STD_TYPE __SWORD_TYPE __intptr_t;
/* Duplicate info from sys/socket.h. */
__STD_TYPE __U32_TYPE __socklen_t;
/* C99: An integer type that can be accessed as an atomic entity,
even in the presence of asynchronous interrupts.
It is not currently necessary for this to be machine-specific. */
typedef int __sig_atomic_t;
#undef __STD_TYPE

View file

@ -0,0 +1,9 @@
#ifndef __FILE_defined
#define __FILE_defined 1
struct _IO_FILE;
/* The opaque type of streams. This is the definition used elsewhere. */
typedef struct _IO_FILE FILE;
#endif

View file

@ -0,0 +1,7 @@
#ifndef ____FILE_defined
#define ____FILE_defined 1
struct _IO_FILE;
typedef struct _IO_FILE __FILE;
#endif

View file

@ -1,5 +1,5 @@
/* Definition of locale datatype.
Copyright (C) 1997-2017 Free Software Foundation, Inc.
/* Definition of struct __locale_struct and __locale_t.
Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@ -17,14 +17,15 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef _XLOCALE_H
#define _XLOCALE_H 1
#ifndef _BITS_TYPES___LOCALE_T_H
#define _BITS_TYPES___LOCALE_T_H 1
/* Structure for reentrant locale using functions. This is an
(almost) opaque type for the user level programs. The file and
this data structure is not standardized. Don't rely on it. It can
go away without warning. */
typedef struct __locale_struct
/* POSIX.1-2008: the locale_t type, representing a locale context
(implementation-namespace version). This type should be treated
as opaque by applications; some details are exposed for the sake of
efficiency in e.g. ctype functions. */
struct __locale_struct
{
/* Note: LC_ALL is not a valid index into this array. */
struct __locale_data *__locales[13]; /* 13 = __LC_LAST. */
@ -36,9 +37,8 @@ typedef struct __locale_struct
/* Note: LC_ALL is not a valid index into this array. */
const char *__names[13];
} *__locale_t;
};
/* POSIX 2008 makes locale_t official. */
typedef __locale_t locale_t;
typedef struct __locale_struct *__locale_t;
#endif /* xlocale.h */
#endif /* bits/types/__locale_t.h */

View file

@ -0,0 +1,23 @@
#ifndef ____mbstate_t_defined
#define ____mbstate_t_defined 1
/* Integral type unchanged by default argument promotions that can
hold any value corresponding to members of the extended character
set, as well as at least one value that does not correspond to any
member of the extended character set. */
#ifndef __WINT_TYPE__
# define __WINT_TYPE__ unsigned int
#endif
/* Conversion state information. */
typedef struct
{
int __count;
union
{
__WINT_TYPE__ __wch;
char __wchb[4];
} __value; /* Value so far. */
} __mbstate_t;
#endif

View file

@ -0,0 +1,10 @@
#ifndef ____sigset_t_defined
#define ____sigset_t_defined
#define _SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int)))
typedef struct
{
unsigned long int __val[_SIGSET_NWORDS];
} __sigset_t;
#endif

View file

@ -1,5 +1,5 @@
/* Declare sys_errlist and sys_nerr, or don't. Compatibility (do) version.
Copyright (C) 2002-2017 Free Software Foundation, Inc.
/* Define __sigval_t.
Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -16,17 +16,26 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef _STDIO_H
# error "Never include <bits/sys_errlist.h> directly; use <stdio.h> instead."
#ifndef ____sigval_t_defined
#define ____sigval_t_defined
/* Type for data associated with a signal. */
#ifdef __USE_POSIX199309
union sigval
{
int sival_int;
void *sival_ptr;
};
typedef union sigval __sigval_t;
#else
union __sigval
{
int __sival_int;
void *__sival_ptr;
};
typedef union __sigval __sigval_t;
#endif
/* sys_errlist and sys_nerr are deprecated. Use strerror instead. */
#ifdef __USE_MISC
extern int sys_nerr;
extern const char *const sys_errlist[];
#endif
#ifdef __USE_GNU
extern int _sys_nerr;
extern const char *const _sys_errlist[];
#endif

View file

@ -3,13 +3,7 @@
#include <bits/types.h>
__BEGIN_NAMESPACE_STD
/* Returned by `clock'. */
typedef __clock_t clock_t;
__END_NAMESPACE_STD
#if defined __USE_XOPEN || defined __USE_POSIX
__USING_NAMESPACE_STD(clock_t)
#endif
#endif

View file

@ -1,5 +1,5 @@
/* -mlong-double-64 compatibility mode for libio functions.
Copyright (C) 2006-2017 Free Software Foundation, Inc.
/* Define error_t.
Copyright (C) 1991-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -16,9 +16,9 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef _IO_STDIO_H
# error "Never include <bits/libio-ldbl.h> directly; use <libio.h> instead."
#endif
#ifndef __error_t_defined
# define __error_t_defined 1
__LDBL_REDIR_DECL (_IO_vfscanf)
__LDBL_REDIR_DECL (_IO_vfprintf)
typedef int error_t;
#endif

View file

@ -0,0 +1,26 @@
/* Definition of locale_t.
Copyright (C) 2017-2018 Free Software 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 _BITS_TYPES_LOCALE_T_H
#define _BITS_TYPES_LOCALE_T_H 1
#include <bits/types/__locale_t.h>
typedef __locale_t locale_t;
#endif /* bits/types/locale_t.h */

View file

@ -0,0 +1,8 @@
#ifndef __mbstate_t_defined
#define __mbstate_t_defined 1
#include <bits/types/__mbstate_t.h>
typedef __mbstate_t mbstate_t;
#endif

View file

@ -0,0 +1,10 @@
#ifndef __sig_atomic_t_defined
#define __sig_atomic_t_defined 1
#include <bits/types.h>
/* An integral type that can be modified atomically, without the
possibility of a signal arriving in the middle of the operation. */
typedef __sig_atomic_t sig_atomic_t;
#endif

View file

@ -0,0 +1,48 @@
#ifndef __sigevent_t_defined
#define __sigevent_t_defined 1
#include <bits/wordsize.h>
#include <bits/types.h>
#include <bits/types/__sigval_t.h>
#define __SIGEV_MAX_SIZE 64
#if __WORDSIZE == 64
# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
#else
# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3)
#endif
/* Forward declaration. */
#ifndef __have_pthread_attr_t
typedef union pthread_attr_t pthread_attr_t;
# define __have_pthread_attr_t 1
#endif
/* Structure to transport application-defined values with signals. */
typedef struct sigevent
{
__sigval_t sigev_value;
int sigev_signo;
int sigev_notify;
union
{
int _pad[__SIGEV_PAD_SIZE];
/* When SIGEV_SIGNAL and SIGEV_THREAD_ID set, LWP ID of the
thread to receive the signal. */
__pid_t _tid;
struct
{
void (*_function) (__sigval_t); /* Function to start. */
pthread_attr_t *_attribute; /* Thread attributes. */
} _sigev_thread;
} _sigev_un;
} sigevent_t;
/* POSIX names to access some of the members. */
#define sigev_notify_function _sigev_un._sigev_thread._function
#define sigev_notify_attributes _sigev_un._sigev_thread._attribute
#endif

View file

@ -0,0 +1,151 @@
#ifndef __siginfo_t_defined
#define __siginfo_t_defined 1
#include <bits/wordsize.h>
#include <bits/types.h>
#include <bits/types/__sigval_t.h>
#define __SI_MAX_SIZE 128
#if __WORDSIZE == 64
# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 4)
#else
# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3)
#endif
/* Some fields of siginfo_t have architecture-specific variations. */
#include <bits/siginfo-arch.h>
#ifndef __SI_ALIGNMENT
# define __SI_ALIGNMENT /* nothing */
#endif
#ifndef __SI_BAND_TYPE
# define __SI_BAND_TYPE long int
#endif
#ifndef __SI_CLOCK_T
# define __SI_CLOCK_T __clock_t
#endif
#ifndef __SI_ERRNO_THEN_CODE
# define __SI_ERRNO_THEN_CODE 1
#endif
#ifndef __SI_HAVE_SIGSYS
# define __SI_HAVE_SIGSYS 1
#endif
#ifndef __SI_SIGFAULT_ADDL
# define __SI_SIGFAULT_ADDL /* nothing */
#endif
typedef struct
{
int si_signo; /* Signal number. */
#if __SI_ERRNO_THEN_CODE
int si_errno; /* If non-zero, an errno value associated with
this signal, as defined in <errno.h>. */
int si_code; /* Signal code. */
#else
int si_code;
int si_errno;
#endif
#if __WORDSIZE == 64
int __pad0; /* Explicit padding. */
#endif
union
{
int _pad[__SI_PAD_SIZE];
/* kill(). */
struct
{
__pid_t si_pid; /* Sending process ID. */
__uid_t si_uid; /* Real user ID of sending process. */
} _kill;
/* POSIX.1b timers. */
struct
{
int si_tid; /* Timer ID. */
int si_overrun; /* Overrun count. */
__sigval_t si_sigval; /* Signal value. */
} _timer;
/* POSIX.1b signals. */
struct
{
__pid_t si_pid; /* Sending process ID. */
__uid_t si_uid; /* Real user ID of sending process. */
__sigval_t si_sigval; /* Signal value. */
} _rt;
/* SIGCHLD. */
struct
{
__pid_t si_pid; /* Which child. */
__uid_t si_uid; /* Real user ID of sending process. */
int si_status; /* Exit value or signal. */
__SI_CLOCK_T si_utime;
__SI_CLOCK_T si_stime;
} _sigchld;
/* SIGILL, SIGFPE, SIGSEGV, SIGBUS. */
struct
{
void *si_addr; /* Faulting insn/memory ref. */
__SI_SIGFAULT_ADDL
short int si_addr_lsb; /* Valid LSB of the reported address. */
union
{
/* used when si_code=SEGV_BNDERR */
struct
{
void *_lower;
void *_upper;
} _addr_bnd;
/* used when si_code=SEGV_PKUERR */
__uint32_t _pkey;
} _bounds;
} _sigfault;
/* SIGPOLL. */
struct
{
long int si_band; /* Band event for SIGPOLL. */
int si_fd;
} _sigpoll;
/* SIGSYS. */
#if __SI_HAVE_SIGSYS
struct
{
void *_call_addr; /* Calling user insn. */
int _syscall; /* Triggering system call number. */
unsigned int _arch; /* AUDIT_ARCH_* of syscall. */
} _sigsys;
#endif
} _sifields;
} siginfo_t __SI_ALIGNMENT;
/* X/Open requires some more fields with fixed names. */
#define si_pid _sifields._kill.si_pid
#define si_uid _sifields._kill.si_uid
#define si_timerid _sifields._timer.si_tid
#define si_overrun _sifields._timer.si_overrun
#define si_status _sifields._sigchld.si_status
#define si_utime _sifields._sigchld.si_utime
#define si_stime _sifields._sigchld.si_stime
#define si_value _sifields._rt.si_sigval
#define si_int _sifields._rt.si_sigval.sival_int
#define si_ptr _sifields._rt.si_sigval.sival_ptr
#define si_addr _sifields._sigfault.si_addr
#define si_addr_lsb _sifields._sigfault.si_addr_lsb
#define si_lower _sifields._sigfault._bounds._addr_bnd._lower
#define si_upper _sifields._sigfault._bounds._addr_bnd._upper
#define si_pkey _sifields._sigfault._bounds._pkey
#define si_band _sifields._sigpoll.si_band
#define si_fd _sifields._sigpoll.si_fd
#if __SI_HAVE_SIGSYS
# define si_call_addr _sifields._sigsys._call_addr
# define si_syscall _sifields._sigsys._syscall
# define si_arch _sifields._sigsys._arch
#endif
#endif

View file

@ -0,0 +1,9 @@
#ifndef __sigset_t_defined
#define __sigset_t_defined 1
#include <bits/types/__sigset_t.h>
/* A set of signals to be blocked, unblocked, or waited for. */
typedef __sigset_t sigset_t;
#endif

View file

@ -0,0 +1,18 @@
#ifndef __sigval_t_defined
#define __sigval_t_defined
#include <bits/types/__sigval_t.h>
/* To avoid sigval_t (not a standard type name) having C++ name
mangling depending on whether the selected standard includes union
sigval, it should not be defined at all when using a standard for
which the sigval name is not reserved; in that case, headers should
not include <bits/types/sigval_t.h> and should use only the
internal __sigval_t name. */
#ifndef __USE_POSIX199309
# error "sigval_t defined for standard not including union sigval"
#endif
typedef __sigval_t sigval_t;
#endif

View file

@ -0,0 +1,33 @@
/* Define stack_t. Linux version.
Copyright (C) 1998-2018 Free Software 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 __stack_t_defined
#define __stack_t_defined 1
#define __need_size_t
#include <stddef.h>
/* Structure describing a signal stack. */
typedef struct
{
void *ss_sp;
int ss_flags;
size_t ss_size;
} stack_t;
#endif

View file

@ -0,0 +1,28 @@
/* Sched parameter structure. Generic version.
Copyright (C) 1996-2018 Free Software 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 _BITS_TYPES_STRUCT_SCHED_PARAM
#define _BITS_TYPES_STRUCT_SCHED_PARAM 1
/* Data structure to describe a process' schedulability. */
struct sched_param
{
int sched_priority;
};
#endif /* bits/types/struct_sched_param.h */

View file

@ -0,0 +1,29 @@
/* Define struct sigstack.
Copyright (C) 1998-2018 Free Software 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 __sigstack_defined
#define __sigstack_defined 1
/* Structure describing a signal stack (obsolete). */
struct sigstack
{
void *ss_sp; /* Signal stack pointer. */
int ss_onstack; /* Nonzero if executing on this stack. */
};
#endif

View file

@ -1,5 +1,6 @@
#ifndef __timespec_defined
#define __timespec_defined 1
/* NB: Include guard matches what <linux/time.h> uses. */
#ifndef _STRUCT_TIMESPEC
#define _STRUCT_TIMESPEC 1
#include <bits/types.h>

View file

@ -4,7 +4,6 @@
#include <bits/types.h>
/* ISO C `broken-down time' structure. */
__BEGIN_NAMESPACE_STD
struct tm
{
int tm_sec; /* Seconds. [0-60] (1 leap second) */
@ -25,9 +24,5 @@ struct tm
const char *__tm_zone; /* Timezone abbreviation. */
# endif
};
__END_NAMESPACE_STD
#if defined __USE_XOPEN || defined __USE_POSIX
__USING_NAMESPACE_STD(tm)
#endif
#endif

View file

@ -3,12 +3,7 @@
#include <bits/types.h>
__BEGIN_NAMESPACE_STD
/* Returned by `time'. */
typedef __time_t time_t;
__END_NAMESPACE_STD
#ifdef __USE_POSIX
__USING_NAMESPACE_STD(time_t)
#endif
#endif

View file

@ -0,0 +1,23 @@
#ifndef __wint_t_defined
#define __wint_t_defined 1
/* Some versions of stddef.h provide wint_t, even though neither the
C nor C++ standards, nor POSIX, specifies this. We assume that
stddef.h will define the macro _WINT_T if and only if it provides
wint_t, and conversely, that it will avoid providing wint_t if
_WINT_T is already defined. */
#ifndef _WINT_T
#define _WINT_T 1
/* Integral type unchanged by default argument promotions that can
hold any value corresponding to members of the extended character
set, as well as at least one value that does not correspond to any
member of the extended character set. */
#ifndef __WINT_TYPE__
# define __WINT_TYPE__ unsigned int
#endif
typedef __WINT_TYPE__ wint_t;
#endif /* _WINT_T */
#endif /* bits/types/wint_t.h */

View file

@ -1,5 +1,5 @@
/* bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version.
Copyright (C) 2012-2017 Free Software Foundation, Inc.
Copyright (C) 2012-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Inline functions to return unsigned integer values unchanged.
Copyright (C) 2017 Free Software Foundation, Inc.
Copyright (C) 2017-2018 Free Software 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
miniboost/bits/uio_lim.h Normal file
View file

@ -0,0 +1,32 @@
/* Implementation limits related to sys/uio.h - Linux version.
Copyright (C) 2017-2018 Free Software 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 _BITS_UIO_LIM_H
#define _BITS_UIO_LIM_H 1
/* Maximum length of the 'struct iovec' array in a single call to
readv or writev.
This macro has different values in different kernel versions. The
latest versions of the kernel use 1024 and this is good choice. Since
the C library implementation of readv/writev is able to emulate the
functionality even if the currently running kernel does not support
this large value the readv/writev call will not fail because of this. */
#define __IOV_MAX 1024
#endif

View file

@ -1,5 +1,5 @@
/* Checking macros for unistd functions.
Copyright (C) 2005-2017 Free Software Foundation, Inc.
Copyright (C) 2005-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Definitions of flag bits for `waitpid' et al.
Copyright (C) 1992-2017 Free Software Foundation, Inc.
Copyright (C) 1992-2018 Free Software 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,10 +26,12 @@
#define WUNTRACED 2 /* Report status of stopped children. */
/* Bits in the fourth argument to `waitid'. */
#define WSTOPPED 2 /* Report stopped child (same as WUNTRACED). */
#define WEXITED 4 /* Report dead child. */
#define WCONTINUED 8 /* Report continued child. */
#define WNOWAIT 0x01000000 /* Don't reap, just poll status. */
#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
# define WSTOPPED 2 /* Report stopped child (same as WUNTRACED). */
# define WEXITED 4 /* Report dead child. */
# define WCONTINUED 8 /* Report continued child. */
# define WNOWAIT 0x01000000 /* Don't reap, just poll status. */
#endif
#define __WNOTHREAD 0x20000000 /* Don't wait on children of other threads
in this group */

View file

@ -1,5 +1,5 @@
/* Definitions of status bits for `wait' et al.
Copyright (C) 1992-2017 Free Software Foundation, Inc.
Copyright (C) 1992-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* -mlong-double-64 compatibility mode for <wchar.h> functions.
Copyright (C) 2006-2017 Free Software Foundation, Inc.
Copyright (C) 2006-2018 Free Software 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,6 @@
#endif
#if defined __USE_ISOC95 || defined __USE_UNIX98
__BEGIN_NAMESPACE_C99
__LDBL_REDIR_DECL (fwprintf);
__LDBL_REDIR_DECL (wprintf);
__LDBL_REDIR_DECL (swprintf);
@ -39,11 +38,9 @@ __LDBL_REDIR_DECL (fwscanf);
__LDBL_REDIR_DECL (wscanf);
__LDBL_REDIR_DECL (swscanf);
# endif
__END_NAMESPACE_C99
#endif
#ifdef __USE_ISOC99
__BEGIN_NAMESPACE_C99
__LDBL_REDIR1_DECL (wcstold, wcstod);
# if !defined __USE_GNU && !defined __REDIRECT \
&& (defined __STRICT_ANSI__ || defined __USE_XOPEN2K)
@ -55,7 +52,6 @@ __LDBL_REDIR_DECL (vfwscanf);
__LDBL_REDIR_DECL (vwscanf);
__LDBL_REDIR_DECL (vswscanf);
# endif
__END_NAMESPACE_C99
#endif
#ifdef __USE_GNU

View file

@ -1,5 +1,5 @@
/* wchar_t type related definitions.
Copyright (C) 2000-2017 Free Software Foundation, Inc.
Copyright (C) 2000-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,5 +1,5 @@
/* Checking macros for wchar functions.
Copyright (C) 2005-2017 Free Software Foundation, Inc.
Copyright (C) 2005-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1996-2017 Free Software Foundation, Inc.
/* Copyright (C) 1996-2018 Free Software 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,37 +20,22 @@
* Wide character classification and mapping utilities <wctype.h>
*/
#ifndef _WCTYPE_H
#ifndef _BITS_WCTYPE_WCHAR_H
#define _BITS_WCTYPE_WCHAR_H 1
#include <features.h>
#include <bits/types.h>
#ifndef __need_iswxxx
# define _WCTYPE_H 1
/* Get wint_t from <wchar.h>. */
# define __need_wint_t
# include <wchar.h>
/* Constant expression of type `wint_t' whose value does not correspond
to any member of the extended character set. */
# ifndef WEOF
# define WEOF (0xffffffffu)
# endif
#if !defined _WCTYPE_H && !defined _WCHAR_H
#error "Never include <bits/wctype-wchar.h> directly; include <wctype.h> or <wchar.h> instead."
#endif
#undef __need_iswxxx
#include <bits/types.h>
#include <bits/types/wint_t.h>
/* The following part is also used in the <wcsmbs.h> header when compiled
in the Unix98 compatibility mode. */
#ifndef __iswxxx_defined
# define __iswxxx_defined 1
/* The definitions in this header are specified to appear in <wctype.h>
in ISO C99, but in <wchar.h> in Unix98. _GNU_SOURCE follows C99. */
__BEGIN_NAMESPACE_C99
/* Scalar type that can hold values which represent locale-specific
character classifications. */
typedef unsigned long int wctype_t;
__END_NAMESPACE_C99
# ifndef _ISwbit
/* The characteristics are stored always in network byte order (big
@ -101,7 +86,6 @@ enum
__BEGIN_DECLS
__BEGIN_NAMESPACE_C99
/*
* Wide-character classification functions: 7.15.2.1.
*/
@ -173,146 +157,17 @@ extern wctype_t wctype (const char *__property) __THROW;
/* Determine whether the wide-character WC has the property described by
DESC. */
extern int iswctype (wint_t __wc, wctype_t __desc) __THROW;
__END_NAMESPACE_C99
/*
* Wide-character case-mapping functions: 7.15.3.1.
*/
__BEGIN_NAMESPACE_C99
/* Scalar type that can hold values which represent locale-specific
character mappings. */
typedef const __int32_t *wctrans_t;
__END_NAMESPACE_C99
#ifdef __USE_GNU
__USING_NAMESPACE_C99(wctrans_t)
#endif
__BEGIN_NAMESPACE_C99
/* Converts an uppercase letter to the corresponding lowercase letter. */
extern wint_t towlower (wint_t __wc) __THROW;
/* Converts an lowercase letter to the corresponding uppercase letter. */
extern wint_t towupper (wint_t __wc) __THROW;
__END_NAMESPACE_C99
__END_DECLS
#endif /* need iswxxx. */
/* The remaining definitions and declarations must not appear in the
<wchar.h> header. */
#ifdef _WCTYPE_H
/*
* Extensible wide-character mapping functions: 7.15.3.2.
*/
__BEGIN_DECLS
__BEGIN_NAMESPACE_C99
/* Construct value that describes a mapping between wide characters
identified by the string argument PROPERTY. */
extern wctrans_t wctrans (const char *__property) __THROW;
/* Map the wide character WC using the mapping described by DESC. */
extern wint_t towctrans (wint_t __wc, wctrans_t __desc) __THROW;
__END_NAMESPACE_C99
# ifdef __USE_XOPEN2K8
/* Declare the interface to extended locale model. */
# include <xlocale.h>
/* Test for any wide character for which `iswalpha' or `iswdigit' is
true. */
extern int iswalnum_l (wint_t __wc, __locale_t __locale) __THROW;
/* Test for any wide character for which `iswupper' or 'iswlower' is
true, or any wide character that is one of a locale-specific set of
wide-characters for which none of `iswcntrl', `iswdigit',
`iswpunct', or `iswspace' is true. */
extern int iswalpha_l (wint_t __wc, __locale_t __locale) __THROW;
/* Test for any control wide character. */
extern int iswcntrl_l (wint_t __wc, __locale_t __locale) __THROW;
/* Test for any wide character that corresponds to a decimal-digit
character. */
extern int iswdigit_l (wint_t __wc, __locale_t __locale) __THROW;
/* Test for any wide character for which `iswprint' is true and
`iswspace' is false. */
extern int iswgraph_l (wint_t __wc, __locale_t __locale) __THROW;
/* Test for any wide character that corresponds to a lowercase letter
or is one of a locale-specific set of wide characters for which
none of `iswcntrl', `iswdigit', `iswpunct', or `iswspace' is true. */
extern int iswlower_l (wint_t __wc, __locale_t __locale) __THROW;
/* Test for any printing wide character. */
extern int iswprint_l (wint_t __wc, __locale_t __locale) __THROW;
/* Test for any printing wide character that is one of a
locale-specific et of wide characters for which neither `iswspace'
nor `iswalnum' is true. */
extern int iswpunct_l (wint_t __wc, __locale_t __locale) __THROW;
/* Test for any wide character that corresponds to a locale-specific
set of wide characters for which none of `iswalnum', `iswgraph', or
`iswpunct' is true. */
extern int iswspace_l (wint_t __wc, __locale_t __locale) __THROW;
/* Test for any wide character that corresponds to an uppercase letter
or is one of a locale-specific set of wide character for which none
of `iswcntrl', `iswdigit', `iswpunct', or `iswspace' is true. */
extern int iswupper_l (wint_t __wc, __locale_t __locale) __THROW;
/* Test for any wide character that corresponds to a hexadecimal-digit
character equivalent to that performed be the functions described
in the previous subclause. */
extern int iswxdigit_l (wint_t __wc, __locale_t __locale) __THROW;
/* Test for any wide character that corresponds to a standard blank
wide character or a locale-specific set of wide characters for
which `iswalnum' is false. */
extern int iswblank_l (wint_t __wc, __locale_t __locale) __THROW;
/* Construct value that describes a class of wide characters identified
by the string argument PROPERTY. */
extern wctype_t wctype_l (const char *__property, __locale_t __locale)
__THROW;
/* Determine whether the wide-character WC has the property described by
DESC. */
extern int iswctype_l (wint_t __wc, wctype_t __desc, __locale_t __locale)
__THROW;
/*
* Wide-character case-mapping functions.
*/
/* Converts an uppercase letter to the corresponding lowercase letter. */
extern wint_t towlower_l (wint_t __wc, __locale_t __locale) __THROW;
/* Converts an lowercase letter to the corresponding uppercase letter. */
extern wint_t towupper_l (wint_t __wc, __locale_t __locale) __THROW;
/* Construct value that describes a mapping between wide characters
identified by the string argument PROPERTY. */
extern wctrans_t wctrans_l (const char *__property, __locale_t __locale)
__THROW;
/* Map the wide character WC using the mapping described by DESC. */
extern wint_t towctrans_l (wint_t __wc, wctrans_t __desc,
__locale_t __locale) __THROW;
# endif /* Use POSIX 2008. */
__END_DECLS
#endif /* __WCTYPE_H defined. */
#endif /* wctype.h */
#endif /* bits/wctype-wchar.h. */

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1996-2017 Free Software Foundation, Inc.
/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -29,9 +29,6 @@
#ifndef _XOPEN_LIM_H
#define _XOPEN_LIM_H 1
#define __need_IOV_MAX
#include <bits/stdio_lim.h>
/* We do not provide fixed values for
ARG_MAX Maximum length of argument to the `exec' function
@ -60,10 +57,16 @@
*/
/* Maximum number of `iovec' structures that one process has available
for use with `readv' or writev'. */
/* Maximum number of `iovec' structures that may be used in a single call
to `readv', `writev', etc. */
#define _XOPEN_IOV_MAX _POSIX_UIO_MAXIOV
#include <bits/uio_lim.h>
#ifdef __IOV_MAX
# define IOV_MAX __IOV_MAX
#else
# undef IOV_MAX
#endif
/* Maximum value of `digit' in calls to the `printf' and `scanf'
functions. We have no limit, so return a reasonable value. */

View file

@ -2122,21 +2122,31 @@ template<class F, class A1, class A2, class A3, class A4, class A5, class A6, cl
#define BOOST_BIND_CC
#define BOOST_BIND_ST
#define BOOST_BIND_NOEXCEPT
#include <boost/bind/bind_cc.hpp>
# if defined( __cpp_noexcept_function_type ) || defined( _NOEXCEPT_TYPES_SUPPORTED )
# undef BOOST_BIND_NOEXCEPT
# define BOOST_BIND_NOEXCEPT noexcept
# include <boost/bind/bind_cc.hpp>
# endif
#undef BOOST_BIND_CC
#undef BOOST_BIND_ST
#undef BOOST_BIND_NOEXCEPT
#ifdef BOOST_BIND_ENABLE_STDCALL
#define BOOST_BIND_CC __stdcall
#define BOOST_BIND_ST
#define BOOST_BIND_NOEXCEPT
#include <boost/bind/bind_cc.hpp>
#undef BOOST_BIND_CC
#undef BOOST_BIND_ST
#undef BOOST_BIND_NOEXCEPT
#endif
@ -2144,11 +2154,13 @@ template<class F, class A1, class A2, class A3, class A4, class A5, class A6, cl
#define BOOST_BIND_CC __fastcall
#define BOOST_BIND_ST
#define BOOST_BIND_NOEXCEPT
#include <boost/bind/bind_cc.hpp>
#undef BOOST_BIND_CC
#undef BOOST_BIND_ST
#undef BOOST_BIND_NOEXCEPT
#endif
@ -2156,11 +2168,13 @@ template<class F, class A1, class A2, class A3, class A4, class A5, class A6, cl
#define BOOST_BIND_ST pascal
#define BOOST_BIND_CC
#define BOOST_BIND_NOEXCEPT
#include <boost/bind/bind_cc.hpp>
#undef BOOST_BIND_ST
#undef BOOST_BIND_CC
#undef BOOST_BIND_NOEXCEPT
#endif
@ -2168,23 +2182,33 @@ template<class F, class A1, class A2, class A3, class A4, class A5, class A6, cl
#define BOOST_BIND_MF_NAME(X) X
#define BOOST_BIND_MF_CC
#define BOOST_BIND_MF_NOEXCEPT
#include <boost/bind/bind_mf_cc.hpp>
#include <boost/bind/bind_mf2_cc.hpp>
# if defined( __cpp_noexcept_function_type ) || defined( _NOEXCEPT_TYPES_SUPPORTED )
# undef BOOST_BIND_MF_NOEXCEPT
# define BOOST_BIND_MF_NOEXCEPT noexcept
# include <boost/bind/bind_mf_cc.hpp>
# endif
#undef BOOST_BIND_MF_NAME
#undef BOOST_BIND_MF_CC
#undef BOOST_BIND_MF_NOEXCEPT
#ifdef BOOST_MEM_FN_ENABLE_CDECL
#define BOOST_BIND_MF_NAME(X) X##_cdecl
#define BOOST_BIND_MF_CC __cdecl
#define BOOST_BIND_MF_NOEXCEPT
#include <boost/bind/bind_mf_cc.hpp>
#include <boost/bind/bind_mf2_cc.hpp>
#undef BOOST_BIND_MF_NAME
#undef BOOST_BIND_MF_CC
#undef BOOST_BIND_MF_NOEXCEPT
#endif
@ -2192,12 +2216,14 @@ template<class F, class A1, class A2, class A3, class A4, class A5, class A6, cl
#define BOOST_BIND_MF_NAME(X) X##_stdcall
#define BOOST_BIND_MF_CC __stdcall
#define BOOST_BIND_MF_NOEXCEPT
#include <boost/bind/bind_mf_cc.hpp>
#include <boost/bind/bind_mf2_cc.hpp>
#undef BOOST_BIND_MF_NAME
#undef BOOST_BIND_MF_CC
#undef BOOST_BIND_MF_NOEXCEPT
#endif
@ -2205,12 +2231,14 @@ template<class F, class A1, class A2, class A3, class A4, class A5, class A6, cl
#define BOOST_BIND_MF_NAME(X) X##_fastcall
#define BOOST_BIND_MF_CC __fastcall
#define BOOST_BIND_MF_NOEXCEPT
#include <boost/bind/bind_mf_cc.hpp>
#include <boost/bind/bind_mf2_cc.hpp>
#undef BOOST_BIND_MF_NAME
#undef BOOST_BIND_MF_CC
#undef BOOST_BIND_MF_NOEXCEPT
#endif
@ -2264,6 +2292,15 @@ template< class R, class T > struct add_cref< R (T::*) () const, 1 >
typedef void type;
};
#if defined( __cpp_noexcept_function_type ) || defined( _NOEXCEPT_TYPES_SUPPORTED )
template< class R, class T > struct add_cref< R (T::*) () const noexcept, 1 >
{
typedef void type;
};
#endif // __cpp_noexcept_function_type
#endif // __IBMCPP__
template<class R> struct isref

View file

@ -13,28 +13,28 @@
//
template<class R>
_bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (), _bi::list0>
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) ())
_bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) () BOOST_BIND_NOEXCEPT, _bi::list0>
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) () BOOST_BIND_NOEXCEPT)
{
typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) ();
typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) () BOOST_BIND_NOEXCEPT;
typedef _bi::list0 list_type;
return _bi::bind_t<R, F, list_type> (f, list_type());
}
template<class R, class B1, class A1>
_bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1), typename _bi::list_av_1<A1>::type>
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1), A1 a1)
_bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1) BOOST_BIND_NOEXCEPT, typename _bi::list_av_1<A1>::type>
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1) BOOST_BIND_NOEXCEPT, A1 a1)
{
typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1);
typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1) BOOST_BIND_NOEXCEPT;
typedef typename _bi::list_av_1<A1>::type list_type;
return _bi::bind_t<R, F, list_type> (f, list_type(a1));
}
template<class R, class B1, class B2, class A1, class A2>
_bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2), typename _bi::list_av_2<A1, A2>::type>
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2), A1 a1, A2 a2)
_bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2) BOOST_BIND_NOEXCEPT, typename _bi::list_av_2<A1, A2>::type>
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2) BOOST_BIND_NOEXCEPT, A1 a1, A2 a2)
{
typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2);
typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2) BOOST_BIND_NOEXCEPT;
typedef typename _bi::list_av_2<A1, A2>::type list_type;
return _bi::bind_t<R, F, list_type> (f, list_type(a1, a2));
}
@ -42,10 +42,10 @@ template<class R, class B1, class B2, class A1, class A2>
template<class R,
class B1, class B2, class B3,
class A1, class A2, class A3>
_bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3), typename _bi::list_av_3<A1, A2, A3>::type>
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3), A1 a1, A2 a2, A3 a3)
_bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3) BOOST_BIND_NOEXCEPT, typename _bi::list_av_3<A1, A2, A3>::type>
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3) BOOST_BIND_NOEXCEPT, A1 a1, A2 a2, A3 a3)
{
typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3);
typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3) BOOST_BIND_NOEXCEPT;
typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3));
}
@ -53,10 +53,10 @@ template<class R,
template<class R,
class B1, class B2, class B3, class B4,
class A1, class A2, class A3, class A4>
_bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3, B4), typename _bi::list_av_4<A1, A2, A3, A4>::type>
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4), A1 a1, A2 a2, A3 a3, A4 a4)
_bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3, B4) BOOST_BIND_NOEXCEPT, typename _bi::list_av_4<A1, A2, A3, A4>::type>
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4) BOOST_BIND_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4)
{
typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4);
typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4) BOOST_BIND_NOEXCEPT;
typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4));
}
@ -64,10 +64,10 @@ template<class R,
template<class R,
class B1, class B2, class B3, class B4, class B5,
class A1, class A2, class A3, class A4, class A5>
_bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3, B4, B5), typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
_bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3, B4, B5) BOOST_BIND_NOEXCEPT, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5) BOOST_BIND_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
{
typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5);
typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5) BOOST_BIND_NOEXCEPT;
typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5));
}
@ -75,10 +75,10 @@ template<class R,
template<class R,
class B1, class B2, class B3, class B4, class B5, class B6,
class A1, class A2, class A3, class A4, class A5, class A6>
_bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3, B4, B5, B6), typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
_bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3, B4, B5, B6) BOOST_BIND_NOEXCEPT, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6) BOOST_BIND_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
{
typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6);
typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6) BOOST_BIND_NOEXCEPT;
typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6));
}
@ -86,10 +86,10 @@ template<class R,
template<class R,
class B1, class B2, class B3, class B4, class B5, class B6, class B7,
class A1, class A2, class A3, class A4, class A5, class A6, class A7>
_bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3, B4, B5, B6, B7), typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
_bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3, B4, B5, B6, B7) BOOST_BIND_NOEXCEPT, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7) BOOST_BIND_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
{
typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7);
typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7) BOOST_BIND_NOEXCEPT;
typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type;
return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7));
}
@ -97,10 +97,10 @@ template<class R,
template<class R,
class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8,
class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
_bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3, B4, B5, B6, B7, B8), typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7, B8), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
_bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3, B4, B5, B6, B7, B8) BOOST_BIND_NOEXCEPT, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7, B8) BOOST_BIND_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
{
typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7, B8);
typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7, B8) BOOST_BIND_NOEXCEPT;
typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8));
}
@ -108,10 +108,10 @@ template<class R,
template<class R,
class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8, class B9,
class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
_bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3, B4, B5, B6, B7, B8, B9), typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7, B8, B9), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
_bi::bind_t<R, BOOST_BIND_ST R (BOOST_BIND_CC *) (B1, B2, B3, B4, B5, B6, B7, B8, B9) BOOST_BIND_NOEXCEPT, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7, B8, B9) BOOST_BIND_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
{
typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7, B8, B9);
typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7, B8, B9) BOOST_BIND_NOEXCEPT;
typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;
return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9));
}

View file

@ -17,7 +17,7 @@
template<class R, class T,
class A1>
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf0)<R, T>, typename _bi::list_av_1<A1>::type>
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (), A1 a1)
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) () BOOST_BIND_MF_NOEXCEPT, A1 a1)
{
typedef _mfi::BOOST_BIND_MF_NAME(mf0)<R, T> F;
typedef typename _bi::list_av_1<A1>::type list_type;
@ -27,7 +27,7 @@ template<class R, class T,
template<class R, class T,
class A1>
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf0)<R, T>, typename _bi::list_av_1<A1>::type>
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) () const, A1 a1)
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) () const BOOST_BIND_MF_NOEXCEPT, A1 a1)
{
typedef _mfi::BOOST_BIND_MF_NAME(cmf0)<R, T> F;
typedef typename _bi::list_av_1<A1>::type list_type;
@ -38,7 +38,7 @@ template<class Rt2, class R, class T,
class A1>
typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf0)<R, T>, typename _bi::list_av_1<A1>::type>
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (), A1 a1)
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) () BOOST_BIND_MF_NOEXCEPT, A1 a1)
{
typedef _mfi::BOOST_BIND_MF_NAME(mf0)<R, T> F;
typedef typename _bi::list_av_1<A1>::type list_type;
@ -49,7 +49,7 @@ template<class Rt2, class R, class T,
class A1>
typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf0)<R, T>, typename _bi::list_av_1<A1>::type>
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) () const, A1 a1)
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) () const BOOST_BIND_MF_NOEXCEPT, A1 a1)
{
typedef _mfi::BOOST_BIND_MF_NAME(cmf0)<R, T> F;
typedef typename _bi::list_av_1<A1>::type list_type;
@ -62,7 +62,7 @@ template<class R, class T,
class B1,
class A1, class A2>
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf1)<R, T, B1>, typename _bi::list_av_2<A1, A2>::type>
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1), A1 a1, A2 a2)
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2)
{
typedef _mfi::BOOST_BIND_MF_NAME(mf1)<R, T, B1> F;
typedef typename _bi::list_av_2<A1, A2>::type list_type;
@ -73,7 +73,7 @@ template<class R, class T,
class B1,
class A1, class A2>
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf1)<R, T, B1>, typename _bi::list_av_2<A1, A2>::type>
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1) const, A1 a1, A2 a2)
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2)
{
typedef _mfi::BOOST_BIND_MF_NAME(cmf1)<R, T, B1> F;
typedef typename _bi::list_av_2<A1, A2>::type list_type;
@ -85,7 +85,7 @@ template<class Rt2, class R, class T,
class A1, class A2>
typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf1)<R, T, B1>, typename _bi::list_av_2<A1, A2>::type>
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1), A1 a1, A2 a2)
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2)
{
typedef _mfi::BOOST_BIND_MF_NAME(mf1)<R, T, B1> F;
typedef typename _bi::list_av_2<A1, A2>::type list_type;
@ -97,7 +97,7 @@ template<class Rt2, class R, class T,
class A1, class A2>
typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf1)<R, T, B1>, typename _bi::list_av_2<A1, A2>::type>
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1) const, A1 a1, A2 a2)
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2)
{
typedef _mfi::BOOST_BIND_MF_NAME(cmf1)<R, T, B1> F;
typedef typename _bi::list_av_2<A1, A2>::type list_type;
@ -110,7 +110,7 @@ template<class R, class T,
class B1, class B2,
class A1, class A2, class A3>
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf2)<R, T, B1, B2>, typename _bi::list_av_3<A1, A2, A3>::type>
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2), A1 a1, A2 a2, A3 a3)
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3)
{
typedef _mfi::BOOST_BIND_MF_NAME(mf2)<R, T, B1, B2> F;
typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
@ -121,7 +121,7 @@ template<class R, class T,
class B1, class B2,
class A1, class A2, class A3>
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf2)<R, T, B1, B2>, typename _bi::list_av_3<A1, A2, A3>::type>
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2) const, A1 a1, A2 a2, A3 a3)
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3)
{
typedef _mfi::BOOST_BIND_MF_NAME(cmf2)<R, T, B1, B2> F;
typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
@ -133,7 +133,7 @@ template<class Rt2, class R, class T,
class A1, class A2, class A3>
typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf2)<R, T, B1, B2>, typename _bi::list_av_3<A1, A2, A3>::type>
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2), A1 a1, A2 a2, A3 a3)
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3)
{
typedef _mfi::BOOST_BIND_MF_NAME(mf2)<R, T, B1, B2> F;
typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
@ -145,7 +145,7 @@ template<class Rt2, class R, class T,
class A1, class A2, class A3>
typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf2)<R, T, B1, B2>, typename _bi::list_av_3<A1, A2, A3>::type>
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2) const, A1 a1, A2 a2, A3 a3)
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3)
{
typedef _mfi::BOOST_BIND_MF_NAME(cmf2)<R, T, B1, B2> F;
typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
@ -158,7 +158,7 @@ template<class R, class T,
class B1, class B2, class B3,
class A1, class A2, class A3, class A4>
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf3)<R, T, B1, B2, B3>, typename _bi::list_av_4<A1, A2, A3, A4>::type>
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3), A1 a1, A2 a2, A3 a3, A4 a4)
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4)
{
typedef _mfi::BOOST_BIND_MF_NAME(mf3)<R, T, B1, B2, B3> F;
typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
@ -169,7 +169,7 @@ template<class R, class T,
class B1, class B2, class B3,
class A1, class A2, class A3, class A4>
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf3)<R, T, B1, B2, B3>, typename _bi::list_av_4<A1, A2, A3, A4>::type>
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) const, A1 a1, A2 a2, A3 a3, A4 a4)
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4)
{
typedef _mfi::BOOST_BIND_MF_NAME(cmf3)<R, T, B1, B2, B3> F;
typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
@ -181,7 +181,7 @@ template<class Rt2, class R, class T,
class A1, class A2, class A3, class A4>
typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf3)<R, T, B1, B2, B3>, typename _bi::list_av_4<A1, A2, A3, A4>::type>
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3), A1 a1, A2 a2, A3 a3, A4 a4)
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4)
{
typedef _mfi::BOOST_BIND_MF_NAME(mf3)<R, T, B1, B2, B3> F;
typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
@ -193,7 +193,7 @@ template<class Rt2, class R, class T,
class A1, class A2, class A3, class A4>
typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf3)<R, T, B1, B2, B3>, typename _bi::list_av_4<A1, A2, A3, A4>::type>
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) const, A1 a1, A2 a2, A3 a3, A4 a4)
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4)
{
typedef _mfi::BOOST_BIND_MF_NAME(cmf3)<R, T, B1, B2, B3> F;
typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
@ -206,7 +206,7 @@ template<class R, class T,
class B1, class B2, class B3, class B4,
class A1, class A2, class A3, class A4, class A5>
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf4)<R, T, B1, B2, B3, B4>, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
{
typedef _mfi::BOOST_BIND_MF_NAME(mf4)<R, T, B1, B2, B3, B4> F;
typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
@ -217,7 +217,7 @@ template<class R, class T,
class B1, class B2, class B3, class B4,
class A1, class A2, class A3, class A4, class A5>
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf4)<R, T, B1, B2, B3, B4>, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
{
typedef _mfi::BOOST_BIND_MF_NAME(cmf4)<R, T, B1, B2, B3, B4> F;
typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
@ -229,7 +229,7 @@ template<class Rt2, class R, class T,
class A1, class A2, class A3, class A4, class A5>
typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf4)<R, T, B1, B2, B3, B4>, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
{
typedef _mfi::BOOST_BIND_MF_NAME(mf4)<R, T, B1, B2, B3, B4> F;
typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
@ -241,7 +241,7 @@ template<class Rt2, class R, class T,
class A1, class A2, class A3, class A4, class A5>
typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf4)<R, T, B1, B2, B3, B4>, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
{
typedef _mfi::BOOST_BIND_MF_NAME(cmf4)<R, T, B1, B2, B3, B4> F;
typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
@ -254,7 +254,7 @@ template<class R, class T,
class B1, class B2, class B3, class B4, class B5,
class A1, class A2, class A3, class A4, class A5, class A6>
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf5)<R, T, B1, B2, B3, B4, B5>, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
{
typedef _mfi::BOOST_BIND_MF_NAME(mf5)<R, T, B1, B2, B3, B4, B5> F;
typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
@ -265,7 +265,7 @@ template<class R, class T,
class B1, class B2, class B3, class B4, class B5,
class A1, class A2, class A3, class A4, class A5, class A6>
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf5)<R, T, B1, B2, B3, B4, B5>, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
{
typedef _mfi::BOOST_BIND_MF_NAME(cmf5)<R, T, B1, B2, B3, B4, B5> F;
typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
@ -277,7 +277,7 @@ template<class Rt2, class R, class T,
class A1, class A2, class A3, class A4, class A5, class A6>
typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf5)<R, T, B1, B2, B3, B4, B5>, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
{
typedef _mfi::BOOST_BIND_MF_NAME(mf5)<R, T, B1, B2, B3, B4, B5> F;
typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
@ -289,7 +289,7 @@ template<class Rt2, class R, class T,
class A1, class A2, class A3, class A4, class A5, class A6>
typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf5)<R, T, B1, B2, B3, B4, B5>, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
{
typedef _mfi::BOOST_BIND_MF_NAME(cmf5)<R, T, B1, B2, B3, B4, B5> F;
typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
@ -302,7 +302,7 @@ template<class R, class T,
class B1, class B2, class B3, class B4, class B5, class B6,
class A1, class A2, class A3, class A4, class A5, class A6, class A7>
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf6)<R, T, B1, B2, B3, B4, B5, B6>, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
{
typedef _mfi::BOOST_BIND_MF_NAME(mf6)<R, T, B1, B2, B3, B4, B5, B6> F;
typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type;
@ -313,7 +313,7 @@ template<class R, class T,
class B1, class B2, class B3, class B4, class B5, class B6,
class A1, class A2, class A3, class A4, class A5, class A6, class A7>
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf6)<R, T, B1, B2, B3, B4, B5, B6>, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
{
typedef _mfi::BOOST_BIND_MF_NAME(cmf6)<R, T, B1, B2, B3, B4, B5, B6> F;
typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type;
@ -325,7 +325,7 @@ template<class Rt2, class R, class T,
class A1, class A2, class A3, class A4, class A5, class A6, class A7>
typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf6)<R, T, B1, B2, B3, B4, B5, B6>, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
{
typedef _mfi::BOOST_BIND_MF_NAME(mf6)<R, T, B1, B2, B3, B4, B5, B6> F;
typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type;
@ -337,7 +337,7 @@ template<class Rt2, class R, class T,
class A1, class A2, class A3, class A4, class A5, class A6, class A7>
typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf6)<R, T, B1, B2, B3, B4, B5, B6>, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
{
typedef _mfi::BOOST_BIND_MF_NAME(cmf6)<R, T, B1, B2, B3, B4, B5, B6> F;
typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type;
@ -350,7 +350,7 @@ template<class R, class T,
class B1, class B2, class B3, class B4, class B5, class B6, class B7,
class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf7)<R, T, B1, B2, B3, B4, B5, B6, B7>, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
{
typedef _mfi::BOOST_BIND_MF_NAME(mf7)<R, T, B1, B2, B3, B4, B5, B6, B7> F;
typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
@ -361,7 +361,7 @@ template<class R, class T,
class B1, class B2, class B3, class B4, class B5, class B6, class B7,
class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf7)<R, T, B1, B2, B3, B4, B5, B6, B7>, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
{
typedef _mfi::BOOST_BIND_MF_NAME(cmf7)<R, T, B1, B2, B3, B4, B5, B6, B7> F;
typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
@ -373,7 +373,7 @@ template<class Rt2, class R, class T,
class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf7)<R, T, B1, B2, B3, B4, B5, B6, B7>, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
{
typedef _mfi::BOOST_BIND_MF_NAME(mf7)<R, T, B1, B2, B3, B4, B5, B6, B7> F;
typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
@ -385,7 +385,7 @@ template<class Rt2, class R, class T,
class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf7)<R, T, B1, B2, B3, B4, B5, B6, B7>, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
{
typedef _mfi::BOOST_BIND_MF_NAME(cmf7)<R, T, B1, B2, B3, B4, B5, B6, B7> F;
typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
@ -398,7 +398,7 @@ template<class R, class T,
class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8,
class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(mf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8>, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
{
typedef _mfi::BOOST_BIND_MF_NAME(mf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8> F;
typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;
@ -409,7 +409,7 @@ template<class R, class T,
class B1, class B2, class B3, class B4, class B5, class B6, class B7, class B8,
class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
_bi::bind_t<R, _mfi::BOOST_BIND_MF_NAME(cmf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8>, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
{
typedef _mfi::BOOST_BIND_MF_NAME(cmf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8> F;
typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;
@ -421,7 +421,7 @@ template<class Rt2, class R, class T,
class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(mf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8>, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
{
typedef _mfi::BOOST_BIND_MF_NAME(mf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8> F;
typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;
@ -433,7 +433,7 @@ template<class Rt2, class R, class T,
class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
typename boost::enable_if_c<!boost::core::is_same<Rt2, R>::value,
_bi::bind_t<Rt2, _mfi::BOOST_BIND_MF_NAME(cmf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8>, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
>::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
{
typedef _mfi::BOOST_BIND_MF_NAME(cmf8)<R, T, B1, B2, B3, B4, B5, B6, B7, B8> F;
typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;

View file

@ -16,7 +16,7 @@
#endif
#include <boost/circular_buffer_fwd.hpp>
#include <boost/detail/workaround.hpp>
#include <boost/config/workaround.hpp>
#include <boost/static_assert.hpp>
// BOOST_CB_ENABLE_DEBUG: Debug support control.
@ -36,10 +36,10 @@
#if BOOST_WORKAROUND(__BORLANDC__, <= 0x0550) || BOOST_WORKAROUND(__MWERKS__, <= 0x2407)
#define BOOST_CB_IS_CONVERTIBLE(Iterator, Type) ((void)0)
#else
#include <boost/detail/iterator.hpp>
#include <iterator>
#include <boost/type_traits/is_convertible.hpp>
#define BOOST_CB_IS_CONVERTIBLE(Iterator, Type) \
BOOST_STATIC_ASSERT((is_convertible<typename detail::iterator_traits<Iterator>::value_type, Type>::value))
BOOST_STATIC_ASSERT((is_convertible<typename std::iterator_traits<Iterator>::value_type, Type>::value))
#endif
// BOOST_CB_ASSERT_TEMPLATED_ITERATOR_CONSTRUCTORS:

View file

@ -0,0 +1,89 @@
// Copyright 2018 Glen Joseph Fernandes
// (glenjofe@gmail.com)
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_CIRCULAR_BUFFER_ALLOCATORS_HPP
#define BOOST_CIRCULAR_BUFFER_ALLOCATORS_HPP
#include <boost/config.hpp>
#if defined(BOOST_NO_CXX11_ALLOCATOR)
#define BOOST_CB_NO_CXX11_ALLOCATOR
#elif defined(BOOST_LIBSTDCXX_VERSION) && (BOOST_LIBSTDCXX_VERSION < 40800)
#define BOOST_CB_NO_CXX11_ALLOCATOR
#endif
#include <limits>
#if !defined(BOOST_CB_NO_CXX11_ALLOCATOR)
#include <memory>
#else
#include <new>
#endif
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
#include <utility>
#endif
namespace boost {
namespace cb_details {
#if !defined(BOOST_CB_NO_CXX11_ALLOCATOR)
template<class A>
struct allocator_traits
: std::allocator_traits<A> {
using typename std::allocator_traits<A>::value_type;
using typename std::allocator_traits<A>::size_type;
static size_type max_size(const A&) BOOST_NOEXCEPT {
return (std::numeric_limits<size_type>::max)() / sizeof(value_type);
}
};
#else
template<class A>
struct allocator_traits {
typedef typename A::value_type value_type;
typedef typename A::pointer pointer;
typedef typename A::const_pointer const_pointer;
typedef typename A::difference_type difference_type;
typedef typename A::size_type size_type;
static size_type max_size(const A&) BOOST_NOEXCEPT {
return (std::numeric_limits<size_type>::max)() / sizeof(value_type);
}
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
template<class U, class... Args>
static void construct(const A&, U* ptr, Args&&... args) {
::new((void*)ptr) U(std::forward<Args>(args)...);
}
#else
template<class U, class V>
static void construct(const A&, U* ptr, V&& value) {
::new((void*)ptr) U(std::forward<V>(value));
}
#endif
#else
template<class U, class V>
static void construct(const A&, U* ptr, const V& value) {
::new((void*)ptr) U(value);
}
template<class U, class V>
static void construct(const A&, U* ptr, V& value) {
::new((void*)ptr) U(value);
}
#endif
template<class U>
static void destroy(const A&, U* ptr) {
(void)ptr;
ptr->~U();
}
};
#endif
} // cb_details
} // boost
#endif

View file

@ -3,7 +3,9 @@
// Copyright (c) 2003-2008 Jan Gaspar
// Copyright (c) 2013 Paul A. Bristow // Doxygen comments changed.
// Copyright (c) 2013 Antony Polukhin // Move semantics implementation.
// Copyright (c) 2014 Glen Fernandes // C++11 allocator model support.
// Copyright 2014,2018 Glen Joseph Fernandes
// (glenjofe@gmail.com)
// Use, modification, and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
@ -17,12 +19,10 @@
#endif
#include <boost/config.hpp>
#include <boost/call_traits.hpp>
#include <boost/concept_check.hpp>
#include <boost/limits.hpp>
#include <boost/container/allocator_traits.hpp>
#include <boost/iterator/reverse_iterator.hpp>
#include <boost/iterator/iterator_traits.hpp>
#include <boost/circular_buffer/allocators.hpp>
#include <boost/core/empty_value.hpp>
#include <boost/type_traits/is_stateless.hpp>
#include <boost/type_traits/is_integral.hpp>
#include <boost/type_traits/is_scalar.hpp>
@ -32,8 +32,8 @@
#include <boost/type_traits/conditional.hpp>
#include <boost/move/adl_move_swap.hpp>
#include <boost/move/move.hpp>
#include <boost/utility/addressof.hpp>
#include <algorithm>
#include <iterator>
#include <utility>
#include <deque>
#include <stdexcept>
@ -70,12 +70,15 @@ namespace boost {
*/
template <class T, class Alloc>
class circular_buffer
:
/*! \cond */
#if BOOST_CB_ENABLE_DEBUG
: public cb_details::debug_iterator_registry
public cb_details::debug_iterator_registry,
#endif
/*! \endcond */
private empty_value<Alloc>
{
typedef empty_value<Alloc> base;
// Requirements
//BOOST_CLASS_REQUIRE(T, boost, SGIAssignableConcept);
@ -96,31 +99,31 @@ public:
typedef circular_buffer<T, Alloc> this_type;
//! The type of elements stored in the <code>circular_buffer</code>.
typedef typename boost::container::allocator_traits<Alloc>::value_type value_type;
typedef typename cb_details::allocator_traits<Alloc>::value_type value_type;
//! A pointer to an element.
typedef typename boost::container::allocator_traits<Alloc>::pointer pointer;
typedef typename cb_details::allocator_traits<Alloc>::pointer pointer;
//! A const pointer to the element.
typedef typename boost::container::allocator_traits<Alloc>::const_pointer const_pointer;
typedef typename cb_details::allocator_traits<Alloc>::const_pointer const_pointer;
//! A reference to an element.
typedef typename boost::container::allocator_traits<Alloc>::reference reference;
typedef value_type& reference;
//! A const reference to an element.
typedef typename boost::container::allocator_traits<Alloc>::const_reference const_reference;
typedef const value_type& const_reference;
//! The distance type.
/*!
(A signed integral type used to represent the distance between two iterators.)
*/
typedef typename boost::container::allocator_traits<Alloc>::difference_type difference_type;
typedef typename cb_details::allocator_traits<Alloc>::difference_type difference_type;
//! The size type.
/*!
(An unsigned integral type that can represent any non-negative value of the container's distance type.)
*/
typedef typename boost::container::allocator_traits<Alloc>::size_type size_type;
typedef typename cb_details::allocator_traits<Alloc>::size_type size_type;
//! The type of an allocator used in the <code>circular_buffer</code>.
typedef Alloc allocator_type;
@ -128,16 +131,16 @@ public:
// Iterators
//! A const (random access) iterator used to iterate through the <code>circular_buffer</code>.
typedef cb_details::iterator< circular_buffer<T, Alloc>, cb_details::const_traits<boost::container::allocator_traits<Alloc> > > const_iterator;
typedef cb_details::iterator< circular_buffer<T, Alloc>, cb_details::const_traits<cb_details::allocator_traits<Alloc> > > const_iterator;
//! A (random access) iterator used to iterate through the <code>circular_buffer</code>.
typedef cb_details::iterator< circular_buffer<T, Alloc>, cb_details::nonconst_traits<boost::container::allocator_traits<Alloc> > > iterator;
typedef cb_details::iterator< circular_buffer<T, Alloc>, cb_details::nonconst_traits<cb_details::allocator_traits<Alloc> > > iterator;
//! A const iterator used to iterate backwards through a <code>circular_buffer</code>.
typedef boost::reverse_iterator<const_iterator> const_reverse_iterator;
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
//! An iterator used to iterate backwards through a <code>circular_buffer</code>.
typedef boost::reverse_iterator<iterator> reverse_iterator;
typedef std::reverse_iterator<iterator> reverse_iterator;
// Container specific types
@ -193,9 +196,6 @@ private:
//! The number of items currently stored in the circular buffer.
size_type m_size;
//! The allocator.
allocator_type m_alloc;
// Friends
#if defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS)
friend iterator;
@ -219,7 +219,7 @@ public:
Constant (in the size of the <code>circular_buffer</code>).
\sa <code>get_allocator()</code> for obtaining an allocator %reference.
*/
allocator_type get_allocator() const BOOST_NOEXCEPT { return m_alloc; }
allocator_type get_allocator() const BOOST_NOEXCEPT { return alloc(); }
//! Get the allocator reference.
/*!
@ -235,7 +235,7 @@ public:
although use of stateful allocators in STL is discouraged.
\sa <code>get_allocator() const</code>
*/
allocator_type& get_allocator() BOOST_NOEXCEPT { return m_alloc; }
allocator_type& get_allocator() BOOST_NOEXCEPT { return alloc(); }
// Element access
@ -666,7 +666,7 @@ public:
break;
}
if (is_uninitialized(dest)) {
boost::container::allocator_traits<Alloc>::construct(m_alloc, boost::addressof(*dest), boost::move_if_noexcept(*src));
cb_details::allocator_traits<Alloc>::construct(alloc(), boost::to_address(dest), boost::move_if_noexcept(*src));
++constructed;
} else {
value_type tmp = boost::move_if_noexcept(*src);
@ -787,7 +787,7 @@ public:
\sa <code>size()</code>, <code>capacity()</code>, <code>reserve()</code>
*/
size_type max_size() const BOOST_NOEXCEPT {
return (std::min<size_type>)(boost::container::allocator_traits<Alloc>::max_size(m_alloc), (std::numeric_limits<difference_type>::max)());
return (std::min<size_type>)(cb_details::allocator_traits<Alloc>::max_size(alloc()), (std::numeric_limits<difference_type>::max)());
}
//! Is the <code>circular_buffer</code> empty?
@ -878,7 +878,7 @@ public:
iterator b = begin();
BOOST_TRY {
reset(buff,
cb_details::uninitialized_move_if_noexcept(b, b + (std::min)(new_capacity, size()), buff, m_alloc),
cb_details::uninitialized_move_if_noexcept(b, b + (std::min)(new_capacity, size()), buff, alloc()),
new_capacity);
} BOOST_CATCH(...) {
deallocate(buff, new_capacity);
@ -954,7 +954,7 @@ public:
iterator e = end();
BOOST_TRY {
reset(buff, cb_details::uninitialized_move_if_noexcept(e - (std::min)(new_capacity, size()),
e, buff, m_alloc), new_capacity);
e, buff, alloc()), new_capacity);
} BOOST_CATCH(...) {
deallocate(buff, new_capacity);
BOOST_RETHROW
@ -1020,7 +1020,7 @@ public:
<code>set_capacity(capacity_type)</code>
*/
explicit circular_buffer(const allocator_type& alloc = allocator_type()) BOOST_NOEXCEPT
: m_buff(0), m_end(0), m_first(0), m_last(0), m_size(0), m_alloc(alloc) {}
: base(boost::empty_init_t(), alloc), m_buff(0), m_end(0), m_first(0), m_last(0), m_size(0) {}
//! Create an empty <code>circular_buffer</code> with the specified capacity.
/*!
@ -1033,7 +1033,7 @@ public:
Constant.
*/
explicit circular_buffer(capacity_type buffer_capacity, const allocator_type& alloc = allocator_type())
: m_size(0), m_alloc(alloc) {
: base(boost::empty_init_t(), alloc), m_size(0) {
initialize_buffer(buffer_capacity);
m_first = m_last = m_buff;
}
@ -1052,7 +1052,7 @@ public:
Linear (in the <code>n</code>).
*/
circular_buffer(size_type n, param_value_type item, const allocator_type& alloc = allocator_type())
: m_size(n), m_alloc(alloc) {
: base(boost::empty_init_t(), alloc), m_size(n) {
initialize_buffer(n, item);
m_first = m_last = m_buff;
}
@ -1074,7 +1074,7 @@ public:
*/
circular_buffer(capacity_type buffer_capacity, size_type n, param_value_type item,
const allocator_type& alloc = allocator_type())
: m_size(n), m_alloc(alloc) {
: base(boost::empty_init_t(), alloc), m_size(n) {
BOOST_CB_ASSERT(buffer_capacity >= size()); // check for capacity lower than size
initialize_buffer(buffer_capacity, item);
m_first = m_buff;
@ -1097,11 +1097,12 @@ public:
#if BOOST_CB_ENABLE_DEBUG
debug_iterator_registry(),
#endif
m_size(cb.size()), m_alloc(cb.get_allocator()) {
base(boost::empty_init_t(), cb.get_allocator()),
m_size(cb.size()) {
initialize_buffer(cb.capacity());
m_first = m_buff;
BOOST_TRY {
m_last = cb_details::uninitialized_copy(cb.begin(), cb.end(), m_buff, m_alloc);
m_last = cb_details::uninitialized_copy(cb.begin(), cb.end(), m_buff, alloc());
} BOOST_CATCH(...) {
deallocate(m_buff, cb.capacity());
BOOST_RETHROW
@ -1121,7 +1122,7 @@ public:
\par Constant.
*/
circular_buffer(circular_buffer<T, Alloc>&& cb) BOOST_NOEXCEPT
: m_buff(0), m_end(0), m_first(0), m_last(0), m_size(0), m_alloc(cb.get_allocator()) {
: base(boost::empty_init_t(), cb.get_allocator()), m_buff(0), m_end(0), m_first(0), m_last(0), m_size(0) {
cb.swap(*this);
}
#endif // BOOST_NO_CXX11_RVALUE_REFERENCES
@ -1144,7 +1145,7 @@ public:
*/
template <class InputIterator>
circular_buffer(InputIterator first, InputIterator last, const allocator_type& alloc = allocator_type())
: m_alloc(alloc) {
: base(boost::empty_init_t(), alloc) {
initialize(first, last, is_integral<InputIterator>());
}
@ -1174,7 +1175,7 @@ public:
template <class InputIterator>
circular_buffer(capacity_type buffer_capacity, InputIterator first, InputIterator last,
const allocator_type& alloc = allocator_type())
: m_alloc(alloc) {
: base(boost::empty_init_t(), alloc) {
initialize(buffer_capacity, first, last, is_integral<InputIterator>());
}
@ -1225,7 +1226,7 @@ public:
return *this;
pointer buff = allocate(cb.capacity());
BOOST_TRY {
reset(buff, cb_details::uninitialized_copy(cb.begin(), cb.end(), buff, m_alloc), cb.capacity());
reset(buff, cb_details::uninitialized_copy(cb.begin(), cb.end(), buff, alloc()), cb.capacity());
} BOOST_CATCH(...) {
deallocate(buff, cb.capacity());
BOOST_RETHROW
@ -1245,7 +1246,7 @@ public:
*/
circular_buffer<T, Alloc>& operator = (circular_buffer<T, Alloc>&& cb) BOOST_NOEXCEPT {
cb.swap(*this); // now `this` holds `cb`
circular_buffer<T, Alloc>(get_allocator()) // temprary that holds initial `cb` allocator
circular_buffer<T, Alloc>(get_allocator()) // temporary that holds initial `cb` allocator
.swap(cb); // makes `cb` empty
return *this;
}
@ -1276,7 +1277,7 @@ public:
<code>assign(capacity_type, InputIterator, InputIterator)</code>
*/
void assign(size_type n, param_value_type item) {
assign_n(n, n, cb_details::assign_n<param_value_type, allocator_type>(n, item, m_alloc));
assign_n(n, n, cb_details::assign_n<param_value_type, allocator_type>(n, item, alloc()));
}
//! Assign <code>n</code> items into the <code>circular_buffer</code> specifying the capacity.
@ -1306,7 +1307,7 @@ public:
*/
void assign(capacity_type buffer_capacity, size_type n, param_value_type item) {
BOOST_CB_ASSERT(buffer_capacity >= n); // check for new capacity lower than n
assign_n(buffer_capacity, n, cb_details::assign_n<param_value_type, allocator_type>(n, item, m_alloc));
assign_n(buffer_capacity, n, cb_details::assign_n<param_value_type, allocator_type>(n, item, alloc()));
}
//! Assign a copy of the range into the <code>circular_buffer</code>.
@ -1422,7 +1423,7 @@ private:
increment(m_last);
m_first = m_last;
} else {
boost::container::allocator_traits<Alloc>::construct(m_alloc, boost::addressof(*m_last), static_cast<ValT>(item));
cb_details::allocator_traits<Alloc>::construct(alloc(), boost::to_address(m_last), static_cast<ValT>(item));
increment(m_last);
++m_size;
}
@ -1439,7 +1440,7 @@ private:
m_last = m_first;
} else {
decrement(m_first);
boost::container::allocator_traits<Alloc>::construct(m_alloc, boost::addressof(*m_first), static_cast<ValT>(item));
cb_details::allocator_traits<Alloc>::construct(alloc(), boost::to_address(m_first), static_cast<ValT>(item));
++m_size;
}
} BOOST_CATCH(...) {
@ -2173,7 +2174,7 @@ public:
the erased element (towards the beginning).
\par Complexity
Linear (in <code>std::distance(begin(), pos)</code>).
\note This method is symetric to the <code>erase(iterator)</code> method and is more effective than
\note This method is symmetric to the <code>erase(iterator)</code> method and is more effective than
<code>erase(iterator)</code> if the iterator <code>pos</code> is close to the beginning of the
<code>circular_buffer</code>. (See the <i>Complexity</i>.)
\sa <code>erase(iterator)</code>, <code>erase(iterator, iterator)</code>,
@ -2214,7 +2215,7 @@ public:
the erased range (towards the beginning).
\par Complexity
Linear (in <code>std::distance(begin(), last)</code>).
\note This method is symetric to the <code>erase(iterator, iterator)</code> method and is more effective than
\note This method is symmetric to the <code>erase(iterator, iterator)</code> method and is more effective than
<code>erase(iterator, iterator)</code> if <code>std::distance(begin(), first)</code> is lower that
<code>std::distance(last, end())</code>.
\sa <code>erase(iterator)</code>, <code>erase(iterator, iterator)</code>, <code>rerase(iterator)</code>,
@ -2367,23 +2368,31 @@ private:
//! Map the null pointer to virtual end of circular buffer.
pointer map_pointer(pointer p) const { return p == 0 ? m_last : p; }
const Alloc& alloc() const {
return base::get();
}
Alloc& alloc() {
return base::get();
}
//! Allocate memory.
pointer allocate(size_type n) {
if (n > max_size())
throw_exception(std::length_error("circular_buffer"));
#if BOOST_CB_ENABLE_DEBUG
pointer p = (n == 0) ? 0 : m_alloc.allocate(n);
pointer p = (n == 0) ? 0 : alloc().allocate(n);
cb_details::do_fill_uninitialized_memory(p, sizeof(value_type) * n);
return p;
#else
return (n == 0) ? 0 : m_alloc.allocate(n);
return (n == 0) ? 0 : alloc().allocate(n);
#endif
}
//! Deallocate memory.
void deallocate(pointer p, size_type n) {
if (p != 0)
m_alloc.deallocate(p, n);
alloc().deallocate(p, n);
}
//! Does the pointer point to the uninitialized memory?
@ -2414,7 +2423,7 @@ private:
*/
void construct_or_replace(bool construct, pointer pos, param_value_type item) {
if (construct)
boost::container::allocator_traits<Alloc>::construct(m_alloc, boost::addressof(*pos), item);
cb_details::allocator_traits<Alloc>::construct(alloc(), boost::to_address(pos), item);
else
replace(pos, item);
}
@ -2426,14 +2435,14 @@ private:
*/
void construct_or_replace(bool construct, pointer pos, rvalue_type item) {
if (construct)
boost::container::allocator_traits<Alloc>::construct(m_alloc, boost::addressof(*pos), boost::move(item));
cb_details::allocator_traits<Alloc>::construct(alloc(), boost::to_address(pos), boost::move(item));
else
replace(pos, boost::move(item));
}
//! Destroy an item.
void destroy_item(pointer p) {
boost::container::allocator_traits<Alloc>::destroy(m_alloc, boost::addressof(*p));
cb_details::allocator_traits<Alloc>::destroy(alloc(), boost::to_address(p));
#if BOOST_CB_ENABLE_DEBUG
invalidate_iterators(iterator(this, p));
cb_details::do_fill_uninitialized_memory(p, sizeof(value_type));
@ -2488,7 +2497,7 @@ private:
void initialize_buffer(capacity_type buffer_capacity, param_value_type item) {
initialize_buffer(buffer_capacity);
BOOST_TRY {
cb_details::uninitialized_fill_n_with_alloc(m_buff, size(), item, m_alloc);
cb_details::uninitialized_fill_n_with_alloc(m_buff, size(), item, alloc());
} BOOST_CATCH(...) {
deallocate(m_buff, size());
BOOST_RETHROW
@ -2509,9 +2518,9 @@ private:
void initialize(Iterator first, Iterator last, const false_type&) {
BOOST_CB_IS_CONVERTIBLE(Iterator, value_type); // check for invalid iterator type
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581))
initialize(first, last, iterator_category<Iterator>::type());
initialize(first, last, std::iterator_traits<Iterator>::iterator_category());
#else
initialize(first, last, BOOST_DEDUCED_TYPENAME iterator_category<Iterator>::type());
initialize(first, last, BOOST_DEDUCED_TYPENAME std::iterator_traits<Iterator>::iterator_category());
#endif
}
@ -2520,7 +2529,7 @@ private:
void initialize(InputIterator first, InputIterator last, const std::input_iterator_tag&) {
BOOST_CB_ASSERT_TEMPLATED_ITERATOR_CONSTRUCTORS // check if the STL provides templated iterator constructors
// for containers
std::deque<value_type, allocator_type> tmp(first, last, m_alloc);
std::deque<value_type, allocator_type> tmp(first, last, alloc());
size_type distance = tmp.size();
initialize(distance, boost::make_move_iterator(tmp.begin()), boost::make_move_iterator(tmp.end()), distance);
}
@ -2548,9 +2557,9 @@ private:
void initialize(capacity_type buffer_capacity, Iterator first, Iterator last, const false_type&) {
BOOST_CB_IS_CONVERTIBLE(Iterator, value_type); // check for invalid iterator type
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581))
initialize(buffer_capacity, first, last, iterator_category<Iterator>::type());
initialize(buffer_capacity, first, last, std::iterator_traits<Iterator>::iterator_category());
#else
initialize(buffer_capacity, first, last, BOOST_DEDUCED_TYPENAME iterator_category<Iterator>::type());
initialize(buffer_capacity, first, last, BOOST_DEDUCED_TYPENAME std::iterator_traits<Iterator>::iterator_category());
#endif
}
@ -2566,7 +2575,7 @@ private:
if (buffer_capacity == 0)
return;
while (first != last && !full()) {
boost::container::allocator_traits<Alloc>::construct(m_alloc, boost::addressof(*m_last), *first++);
cb_details::allocator_traits<Alloc>::construct(alloc(), boost::to_address(m_last), *first++);
increment(m_last);
++m_size;
}
@ -2602,7 +2611,7 @@ private:
m_size = distance;
}
BOOST_TRY {
m_last = cb_details::uninitialized_copy(first, last, m_buff, m_alloc);
m_last = cb_details::uninitialized_copy(first, last, m_buff, alloc());
} BOOST_CATCH(...) {
deallocate(m_buff, buffer_capacity);
BOOST_RETHROW
@ -2628,7 +2637,7 @@ private:
//! Specialized method for swapping the allocator.
void swap_allocator(circular_buffer<T, Alloc>& cb, const false_type&) {
adl_move_swap(m_alloc, cb.m_alloc);
adl_move_swap(alloc(), cb.alloc());
}
//! Specialized assign method.
@ -2642,9 +2651,9 @@ private:
void assign(Iterator first, Iterator last, const false_type&) {
BOOST_CB_IS_CONVERTIBLE(Iterator, value_type); // check for invalid iterator type
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581))
assign(first, last, iterator_category<Iterator>::type());
assign(first, last, std::iterator_traits<Iterator>::iterator_category());
#else
assign(first, last, BOOST_DEDUCED_TYPENAME iterator_category<Iterator>::type());
assign(first, last, BOOST_DEDUCED_TYPENAME std::iterator_traits<Iterator>::iterator_category());
#endif
}
@ -2653,11 +2662,11 @@ private:
void assign(InputIterator first, InputIterator last, const std::input_iterator_tag&) {
BOOST_CB_ASSERT_TEMPLATED_ITERATOR_CONSTRUCTORS // check if the STL provides templated iterator constructors
// for containers
std::deque<value_type, allocator_type> tmp(first, last, m_alloc);
std::deque<value_type, allocator_type> tmp(first, last, alloc());
size_type distance = tmp.size();
assign_n(distance, distance,
cb_details::make_assign_range
(boost::make_move_iterator(tmp.begin()), boost::make_move_iterator(tmp.end()), m_alloc));
(boost::make_move_iterator(tmp.begin()), boost::make_move_iterator(tmp.end()), alloc()));
}
//! Specialized assign method.
@ -2665,7 +2674,7 @@ private:
void assign(ForwardIterator first, ForwardIterator last, const std::forward_iterator_tag&) {
BOOST_CB_ASSERT(std::distance(first, last) >= 0); // check for wrong range
size_type distance = std::distance(first, last);
assign_n(distance, distance, cb_details::make_assign_range(first, last, m_alloc));
assign_n(distance, distance, cb_details::make_assign_range(first, last, alloc()));
}
//! Specialized assign method.
@ -2679,9 +2688,9 @@ private:
void assign(capacity_type new_capacity, Iterator first, Iterator last, const false_type&) {
BOOST_CB_IS_CONVERTIBLE(Iterator, value_type); // check for invalid iterator type
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581))
assign(new_capacity, first, last, iterator_category<Iterator>::type());
assign(new_capacity, first, last, std::iterator_traits<Iterator>::iterator_category());
#else
assign(new_capacity, first, last, BOOST_DEDUCED_TYPENAME iterator_category<Iterator>::type());
assign(new_capacity, first, last, BOOST_DEDUCED_TYPENAME std::iterator_traits<Iterator>::iterator_category());
#endif
}
@ -2692,7 +2701,7 @@ private:
clear();
insert(begin(), first, last);
} else {
circular_buffer<value_type, allocator_type> tmp(new_capacity, first, last, m_alloc);
circular_buffer<value_type, allocator_type> tmp(new_capacity, first, last, alloc());
tmp.swap(*this);
}
}
@ -2708,7 +2717,7 @@ private:
distance = new_capacity;
}
assign_n(new_capacity, distance,
cb_details::make_assign_range(first, last, m_alloc));
cb_details::make_assign_range(first, last, alloc()));
}
//! Helper assign method.
@ -2788,9 +2797,9 @@ private:
void insert(const iterator& pos, Iterator first, Iterator last, const false_type&) {
BOOST_CB_IS_CONVERTIBLE(Iterator, value_type); // check for invalid iterator type
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581))
insert(pos, first, last, iterator_category<Iterator>::type());
insert(pos, first, last, std::iterator_traits<Iterator>::iterator_category());
#else
insert(pos, first, last, BOOST_DEDUCED_TYPENAME iterator_category<Iterator>::type());
insert(pos, first, last, BOOST_DEDUCED_TYPENAME std::iterator_traits<Iterator>::iterator_category());
#endif
}
@ -2831,7 +2840,7 @@ private:
pointer p = m_last;
BOOST_TRY {
for (; ii < construct; ++ii, increment(p))
boost::container::allocator_traits<Alloc>::construct(m_alloc, boost::addressof(*p), *wrapper());
cb_details::allocator_traits<Alloc>::construct(alloc(), boost::to_address(p), *wrapper());
for (;ii < n; ++ii, increment(p))
replace(p, *wrapper());
} BOOST_CATCH(...) {
@ -2879,9 +2888,9 @@ private:
void rinsert(const iterator& pos, Iterator first, Iterator last, const false_type&) {
BOOST_CB_IS_CONVERTIBLE(Iterator, value_type); // check for invalid iterator type
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581))
rinsert(pos, first, last, iterator_category<Iterator>::type());
rinsert(pos, first, last, std::iterator_traits<Iterator>::iterator_category());
#else
rinsert(pos, first, last, BOOST_DEDUCED_TYPENAME iterator_category<Iterator>::type());
rinsert(pos, first, last, BOOST_DEDUCED_TYPENAME std::iterator_traits<Iterator>::iterator_category());
#endif
}
@ -2925,7 +2934,7 @@ private:
for (;ii > construct; --ii, increment(p))
replace(p, *wrapper());
for (; ii > 0; --ii, increment(p))
boost::container::allocator_traits<Alloc>::construct(m_alloc, boost::addressof(*p), *wrapper());
cb_details::allocator_traits<Alloc>::construct(alloc(), boost::to_address(p), *wrapper());
} BOOST_CATCH(...) {
size_type constructed = ii < construct ? construct - ii : 0;
m_last = add(m_last, constructed);

View file

@ -1,7 +1,9 @@
// Helper classes and functions for the circular buffer.
// Copyright (c) 2003-2008 Jan Gaspar
// Copyright (c) 2014 Glen Fernandes // C++11 allocator model support.
// Copyright 2014,2018 Glen Joseph Fernandes
// (glenjofe@gmail.com)
// Use, modification, and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
@ -15,11 +17,11 @@
#endif
#include <boost/throw_exception.hpp>
#include <boost/container/allocator_traits.hpp>
#include <boost/circular_buffer/allocators.hpp>
#include <boost/core/pointer_traits.hpp>
#include <boost/move/move.hpp>
#include <boost/type_traits/is_nothrow_move_constructible.hpp>
#include <boost/utility/addressof.hpp>
#include <boost/detail/no_exceptions_support.hpp>
#include <boost/core/no_exceptions_support.hpp>
#include <iterator>
// Silence MS /W4 warnings like C4913:
@ -55,7 +57,7 @@ struct const_traits {
// Basic types
typedef typename Traits::value_type value_type;
typedef typename Traits::const_pointer pointer;
typedef typename Traits::const_reference reference;
typedef const value_type& reference;
typedef typename Traits::size_type size_type;
typedef typename Traits::difference_type difference_type;
@ -72,7 +74,7 @@ struct nonconst_traits {
// Basic types
typedef typename Traits::value_type value_type;
typedef typename Traits::pointer pointer;
typedef typename Traits::reference reference;
typedef value_type& reference;
typedef typename Traits::size_type size_type;
typedef typename Traits::difference_type difference_type;
@ -112,7 +114,7 @@ private:
*/
template <class Value, class Alloc>
struct assign_n {
typedef typename boost::container::allocator_traits<Alloc>::size_type size_type;
typedef typename allocator_traits<Alloc>::size_type size_type;
size_type m_n;
Value m_item;
Alloc& m_alloc;
@ -194,46 +196,33 @@ public:
for iterating from begin() to end() of the circular buffer.
*/
template <class Buff, class Traits>
struct iterator :
public std::iterator<
std::random_access_iterator_tag,
typename Traits::value_type,
typename Traits::difference_type,
typename Traits::pointer,
typename Traits::reference>
struct iterator
#if BOOST_CB_ENABLE_DEBUG
, public debug_iterator_base
: public debug_iterator_base
#endif // #if BOOST_CB_ENABLE_DEBUG
{
// Helper types
//! Base iterator.
typedef std::iterator<
std::random_access_iterator_tag,
typename Traits::value_type,
typename Traits::difference_type,
typename Traits::pointer,
typename Traits::reference> base_iterator;
//! Non-const iterator.
typedef iterator<Buff, typename Traits::nonconst_self> nonconst_self;
// Basic types
typedef std::random_access_iterator_tag iterator_category;
//! The type of the elements stored in the circular buffer.
typedef typename base_iterator::value_type value_type;
typedef typename Traits::value_type value_type;
//! Pointer to the element.
typedef typename base_iterator::pointer pointer;
typedef typename Traits::pointer pointer;
//! Reference to the element.
typedef typename base_iterator::reference reference;
typedef typename Traits::reference reference;
//! Size type.
typedef typename Traits::size_type size_type;
//! Difference type.
typedef typename base_iterator::difference_type difference_type;
typedef typename Traits::difference_type difference_type;
// Member variables
@ -435,10 +424,10 @@ inline ForwardIterator uninitialized_copy(InputIterator first, InputIterator las
ForwardIterator next = dest;
BOOST_TRY {
for (; first != last; ++first, ++dest)
boost::container::allocator_traits<Alloc>::construct(a, boost::addressof(*dest), *first);
allocator_traits<Alloc>::construct(a, boost::to_address(dest), *first);
} BOOST_CATCH(...) {
for (; next != dest; ++next)
boost::container::allocator_traits<Alloc>::destroy(a, boost::addressof(*next));
allocator_traits<Alloc>::destroy(a, boost::to_address(next));
BOOST_RETHROW
}
BOOST_CATCH_END
@ -449,7 +438,7 @@ template<class InputIterator, class ForwardIterator, class Alloc>
ForwardIterator uninitialized_move_if_noexcept_impl(InputIterator first, InputIterator last, ForwardIterator dest, Alloc& a,
true_type) {
for (; first != last; ++first, ++dest)
boost::container::allocator_traits<Alloc>::construct(a, boost::addressof(*dest), boost::move(*first));
allocator_traits<Alloc>::construct(a, boost::to_address(dest), boost::move(*first));
return dest;
}
@ -465,7 +454,7 @@ ForwardIterator uninitialized_move_if_noexcept_impl(InputIterator first, InputIt
*/
template<class InputIterator, class ForwardIterator, class Alloc>
ForwardIterator uninitialized_move_if_noexcept(InputIterator first, InputIterator last, ForwardIterator dest, Alloc& a) {
typedef typename boost::is_nothrow_move_constructible<typename boost::container::allocator_traits<Alloc>::value_type>::type tag_t;
typedef typename boost::is_nothrow_move_constructible<typename allocator_traits<Alloc>::value_type>::type tag_t;
return uninitialized_move_if_noexcept_impl(first, last, dest, a, tag_t());
}
@ -478,10 +467,10 @@ inline void uninitialized_fill_n_with_alloc(ForwardIterator first, Diff n, const
ForwardIterator next = first;
BOOST_TRY {
for (; n > 0; ++first, --n)
boost::container::allocator_traits<Alloc>::construct(alloc, boost::addressof(*first), item);
allocator_traits<Alloc>::construct(alloc, boost::to_address(first), item);
} BOOST_CATCH(...) {
for (; next != first; ++next)
boost::container::allocator_traits<Alloc>::destroy(alloc, boost::addressof(*next));
allocator_traits<Alloc>::destroy(alloc, boost::to_address(next));
BOOST_RETHROW
}
BOOST_CATCH_END

Some files were not shown because too many files have changed in this diff Show more