aboutsummaryrefslogtreecommitdiffstats
path: root/include/malloc.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-10-18 01:54:05 +0200
committerMattias Andrée <maandree@operamail.com>2015-10-18 01:57:59 +0200
commitd6df803034e4cd3e690010132317faea85ec0619 (patch)
tree318c55b61fa44b3cecef19b132862e2c418c42c9 /include/malloc.h
parentupdate todo (diff)
downloadslibc-d6df803034e4cd3e690010132317faea85ec0619.tar.gz
slibc-d6df803034e4cd3e690010132317faea85ec0619.tar.bz2
slibc-d6df803034e4cd3e690010132317faea85ec0619.tar.xz
m
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'include/malloc.h')
-rw-r--r--include/malloc.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/include/malloc.h b/include/malloc.h
index 9ef95a0..7a1c08b 100644
--- a/include/malloc.h
+++ b/include/malloc.h
@@ -149,7 +149,6 @@ void cfree(void*, ...)
#endif
-#if defined(__GNU_SOURCE) || defined(__SLIBC_SOURCE)
/**
* Variant of `malloc` that returns an address with a
* specified alignment.
@@ -174,13 +173,12 @@ void cfree(void*, ...)
* @throws EINVAL If `boundary` is not a power of two.
*/
void* memalign(size_t, size_t)
-# ifdef __C11__
+#ifdef __C11__
__deprecated("'memalign' has be deprecated by 'aligned_alloc' in C11.")
-# endif
- __GCC_ONLY(__attribute__((__malloc__, __warn_unused_result__)));
#endif
+ __GCC_ONLY(__attribute__((__malloc__, __warn_unused_result__)));
-#if (_POSIX_C_SOURCE >= 200112L) || (_XOPEN_SOURCE >= 600)
+#if (__POSIX_C_SOURCE >= 200112L) || (__XOPEN_SOURCE >= 600)
/**
* `posix_memalign(p, b, n)` is equivalent to
* `(*p = memalign(b, n), *p ? 0 : errno)`, except
@@ -202,7 +200,7 @@ int posix_memalign(void**, size_t, size_t)
__GCC_ONLY(__attribute__((__nonnull__)));
#endif
-#if defined(_BSD_SOURCE) || defined(_XOPEN_SOURCE_EXTENDED) || defined(__SLIBC_SOURCE)
+#if defined(__BSD_SOURCE) || defined(__XOPEN_SOURCE_EXTENDED) || defined(__SLIBC_SOURCE)
/**
* `valloc(n)` is equivalent to `memalign(sysconf(_SC_PAGESIZE), n)`.
*
@@ -224,7 +222,6 @@ void* valloc(size_t)
__deprecated("'valloc' is deprecated, use 'memalign' or 'posix_memalign' instead.");
#endif
-#if defined(__GNU_SOURCE)
/**
* This function works like `valloc`, except the allocation size,
* including auxiliary space, is rounded up to the next multiple
@@ -243,7 +240,6 @@ void* valloc(size_t)
void* pvalloc(size_t)
__GCC_ONLY(__attribute__((__malloc__, __warn_unused_result__)))
__deprecated("'pvalloc' is deprecated, use 'memalign' or 'posix_memalign' instead.");
-#endif
#if defined(__C11__) || defined(__BUILDING_SLIBC)
/**