am 6f4220c4: Merge "Move the meat of <features.h> into <sys/cdefs.h>."
				
					
				
			* commit '6f4220c49e90b18a50d36e47cc9287c7593af939': Move the meat of <features.h> into <sys/cdefs.h>.
This commit is contained in:
		@@ -29,12 +29,7 @@
 | 
				
			|||||||
#ifndef _FEATURES_H_
 | 
					#ifndef _FEATURES_H_
 | 
				
			||||||
#define _FEATURES_H_
 | 
					#define _FEATURES_H_
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if defined(_BSD_SOURCE)
 | 
					/* Our <features.h> macro fun is all in <sys/cdefs.h>. */
 | 
				
			||||||
# define __USE_BSD 1
 | 
					#include <sys/cdefs.h>
 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#if defined(_GNU_SOURCE)
 | 
					 | 
				
			||||||
# define __USE_GNU 1
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif /* _FEATURES_H_ */
 | 
					#endif /* _FEATURES_H_ */
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -28,7 +28,6 @@
 | 
				
			|||||||
#ifndef _SCHED_H_
 | 
					#ifndef _SCHED_H_
 | 
				
			||||||
#define _SCHED_H_
 | 
					#define _SCHED_H_
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <features.h>
 | 
					 | 
				
			||||||
#include <sys/cdefs.h>
 | 
					#include <sys/cdefs.h>
 | 
				
			||||||
#include <sys/time.h>
 | 
					#include <sys/time.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -355,9 +355,23 @@
 | 
				
			|||||||
#define __RCSID(_s) /* nothing */
 | 
					#define __RCSID(_s) /* nothing */
 | 
				
			||||||
#define __SCCSID(_s) /* nothing */
 | 
					#define __SCCSID(_s) /* nothing */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * _BSD_SOURCE and _GNU_SOURCE are expected to be defined by callers before
 | 
				
			||||||
 | 
					 * any standard header file is included. In those header files we test
 | 
				
			||||||
 | 
					 * against __USE_BSD and __USE_GNU. glibc does this in <features.h> but we
 | 
				
			||||||
 | 
					 * do it in <sys/cdefs.h> instead because that's where our existing
 | 
				
			||||||
 | 
					 * _POSIX_C_SOURCE tests were, and we're already confident that <sys/cdefs.h>
 | 
				
			||||||
 | 
					 * is included everywhere it should be.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					#if defined(_BSD_SOURCE)
 | 
				
			||||||
 | 
					# define __USE_BSD 1
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if defined(_GNU_SOURCE)
 | 
				
			||||||
 | 
					# define __USE_GNU 1
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*-
 | 
					/*-
 | 
				
			||||||
 * The following definitions are an extension of the behavior originally
 | 
					 | 
				
			||||||
 * implemented in <sys/_posix.h>, but with a different level of granularity.
 | 
					 | 
				
			||||||
 * POSIX.1 requires that the macros we test be defined before any standard
 | 
					 * POSIX.1 requires that the macros we test be defined before any standard
 | 
				
			||||||
 * header file is included.
 | 
					 * header file is included.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -29,7 +29,6 @@
 | 
				
			|||||||
#ifndef _SYS_STAT_H_
 | 
					#ifndef _SYS_STAT_H_
 | 
				
			||||||
#define _SYS_STAT_H_
 | 
					#define _SYS_STAT_H_
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <features.h>
 | 
					 | 
				
			||||||
#include <sys/cdefs.h>
 | 
					#include <sys/cdefs.h>
 | 
				
			||||||
#include <sys/types.h>
 | 
					#include <sys/types.h>
 | 
				
			||||||
#include <sys/time.h>
 | 
					#include <sys/time.h>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -25,10 +25,10 @@
 | 
				
			|||||||
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 | 
					 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 | 
				
			||||||
 * SUCH DAMAGE.
 | 
					 * SUCH DAMAGE.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef _UNISTD_H_
 | 
					#ifndef _UNISTD_H_
 | 
				
			||||||
#define _UNISTD_H_
 | 
					#define _UNISTD_H_
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <features.h>
 | 
					 | 
				
			||||||
#include <stddef.h>
 | 
					#include <stddef.h>
 | 
				
			||||||
#include <sys/cdefs.h>
 | 
					#include <sys/cdefs.h>
 | 
				
			||||||
#include <sys/types.h>
 | 
					#include <sys/types.h>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -17,7 +17,6 @@
 | 
				
			|||||||
#ifndef _MATH_H_
 | 
					#ifndef _MATH_H_
 | 
				
			||||||
#define	_MATH_H_
 | 
					#define	_MATH_H_
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <features.h>
 | 
					 | 
				
			||||||
#include <sys/cdefs.h>
 | 
					#include <sys/cdefs.h>
 | 
				
			||||||
#include <limits.h>
 | 
					#include <limits.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -15,7 +15,6 @@
 | 
				
			|||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <sys/cdefs.h>
 | 
					#include <sys/cdefs.h>
 | 
				
			||||||
#include <features.h>
 | 
					 | 
				
			||||||
#include <gtest/gtest.h>
 | 
					#include <gtest/gtest.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// getauxval() was only added as of glibc version 2.16.
 | 
					// getauxval() was only added as of glibc version 2.16.
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -17,7 +17,6 @@
 | 
				
			|||||||
#include <time.h>
 | 
					#include <time.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <errno.h>
 | 
					#include <errno.h>
 | 
				
			||||||
#include <features.h>
 | 
					 | 
				
			||||||
#include <gtest/gtest.h>
 | 
					#include <gtest/gtest.h>
 | 
				
			||||||
#include <pthread.h>
 | 
					#include <pthread.h>
 | 
				
			||||||
#include <signal.h>
 | 
					#include <signal.h>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -19,7 +19,6 @@
 | 
				
			|||||||
#if defined(__BIONIC__)
 | 
					#if defined(__BIONIC__)
 | 
				
			||||||
#define HAVE_UCHAR 1
 | 
					#define HAVE_UCHAR 1
 | 
				
			||||||
#elif defined(__GLIBC__)
 | 
					#elif defined(__GLIBC__)
 | 
				
			||||||
#include <features.h>
 | 
					 | 
				
			||||||
#define HAVE_UCHAR __GLIBC_PREREQ(2, 16)
 | 
					#define HAVE_UCHAR __GLIBC_PREREQ(2, 16)
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user