From 4e9e7a356c37edc428339b4ba27420fe320d0a3c Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 23 Dec 2011 23:21:15 -0500 Subject: Enable at_quick_exit and quick_exit for ISO C11 --- stdlib/stdlib.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'stdlib/stdlib.h') diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h index f7d128c..754743f 100644 --- a/stdlib/stdlib.h +++ b/stdlib/stdlib.h @@ -517,9 +517,7 @@ extern void abort (void) __THROW __attribute__ ((__noreturn__)); /* Register a function to be called when `exit' is called. */ extern int atexit (void (*__func) (void)) __THROW __nonnull ((1)); -#ifdef __USE_GNU -// XXX There should be a macro to signal with C++ revision is used. -// XXX This function is in the C++1x revision. +#if defined __USE_ISOC11 || defined __USE_ISOCXX11 /* Register a function to be called when `quick_exit' is called. */ # ifdef __cplusplus extern "C++" int at_quick_exit (void (*__func) (void)) @@ -543,9 +541,7 @@ __BEGIN_NAMESPACE_STD perform stdio cleanup, and terminate program execution with STATUS. */ extern void exit (int __status) __THROW __attribute__ ((__noreturn__)); -#ifdef __USE_GNU -// XXX There should be a macro to signal with C++ revision is used. -// XXX This function is in the C++1x revision. +#if defined __USE_ISOC11 || defined __USE_ISOCXX11 /* Call all functions registered with `at_quick_exit' in the reverse of the order in which they were registered and terminate program execution with STATUS. */ -- cgit v1.1 From 380d7e87dc80978581e73063dff0e264283c0306 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 23 Dec 2011 23:49:48 -0500 Subject: Implement aligned_alloc --- stdlib/stdlib.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'stdlib/stdlib.h') diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h index 754743f..5588666 100644 --- a/stdlib/stdlib.h +++ b/stdlib/stdlib.h @@ -509,6 +509,11 @@ extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) __THROW __nonnull ((1)) __wur; #endif +#ifdef __USE_ISOC11 +/* ISO C variant of aligned allocation. */ +extern int aligned_alloc (size_t __alignment, size_t __size) __THROW __wur; +#endif + __BEGIN_NAMESPACE_STD /* Abort execution and generate a core-dump. */ extern void abort (void) __THROW __attribute__ ((__noreturn__)); -- cgit v1.1 From 8b43a4cc567222ed61f157eccc0a8e1411082994 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 27 Dec 2011 07:35:05 -0500 Subject: Fix aligned_alloc prototype --- stdlib/stdlib.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'stdlib/stdlib.h') diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h index 5588666..99c34a4 100644 --- a/stdlib/stdlib.h +++ b/stdlib/stdlib.h @@ -511,7 +511,8 @@ extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) #ifdef __USE_ISOC11 /* ISO C variant of aligned allocation. */ -extern int aligned_alloc (size_t __alignment, size_t __size) __THROW __wur; +extern void *aligned_alloc (size_t __alignment, size_t __size) + __THROW __wur __attribute__ ((__malloc__, __alloc_size__ (2))); #endif __BEGIN_NAMESPACE_STD -- cgit v1.1