mirror of
https://review.haiku-os.org/haiku
synced 2024-11-23 15:28:58 +01:00
90dca2bc8e
We automatically enable _DEFAULT_SOURCE if _GNU_SOURCE is defined. Rather than having even more optional methods undefined unless _GNU_SOURCE manually is, just change all remaining guarts to use _DEFAULT_SOURCE instead. Fixes #19095. Change-Id: I5c7baf40b7fb37913e24279589fc1ae706448a45 Reviewed-on: https://review.haiku-os.org/c/haiku/+/8330 Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk> Reviewed-by: waddlesplash <waddlesplash@gmail.com> Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
34 lines
634 B
C
34 lines
634 B
C
/*
|
|
* Copyright 2002-2021 Haiku, Inc. All Rights Reserved.
|
|
* Distributed under the terms of the MIT License.
|
|
*/
|
|
#ifndef _MALLOC_H
|
|
#define _MALLOC_H
|
|
|
|
|
|
#include <unistd.h>
|
|
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
|
|
extern void *malloc(size_t numBytes);
|
|
extern void *realloc(void *oldPointer, size_t newSize);
|
|
extern void *calloc(size_t numElements, size_t size);
|
|
extern void free(void *pointer);
|
|
extern void *memalign(size_t alignment, size_t numBytes) _ALIGNED_BY_ARG(1);
|
|
extern void *valloc(size_t numBytes);
|
|
|
|
#ifdef _DEFAULT_SOURCE
|
|
size_t malloc_usable_size(void *ptr);
|
|
#endif
|
|
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* _MALLOC_H */
|