haiku/headers/compatibility/gnu/stdlib.h
Augustin Cavalier 90dca2bc8e headers: Change most remaining include guards to _DEFAULT_SOURCE.
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>
2024-09-19 16:43:31 +00:00

38 lines
649 B
C

/*
* Copyright 2020 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Isaac Turner, turner.isaac@gmail.com
* Jacob Secunda, secundaja@gmail.com
*/
#ifndef _GNU_STDLIB_H_
#define _GNU_STDLIB_H_
#include_next <stdlib.h>
#include <features.h>
#ifdef _DEFAULT_SOURCE
#ifdef __cplusplus
extern "C" {
#endif
typedef int (*_compare_function_qsort_r)(const void*, const void*, void*);
extern void qsort_r(void* base, size_t numElements, size_t sizeOfElement,
_compare_function_qsort_r, void* cookie);
#ifdef __cplusplus
}
#endif
#endif /* _DEFAULT_SOURCE */
#endif /* _GNU_STDLIB_H_ */