mirror of
https://review.haiku-os.org/haiku
synced 2024-11-23 07:18:40 +01:00
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>
This commit is contained in:
parent
5c1f231967
commit
90dca2bc8e
@ -7,9 +7,10 @@
|
||||
|
||||
|
||||
#include_next <math.h>
|
||||
#include <features.h>
|
||||
|
||||
|
||||
#ifdef _GNU_SOURCE
|
||||
#ifdef _DEFAULT_SOURCE
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -9,7 +9,8 @@
|
||||
#include_next <pthread.h>
|
||||
#include <features.h>
|
||||
|
||||
#ifdef _GNU_SOURCE
|
||||
|
||||
#ifdef _DEFAULT_SOURCE
|
||||
|
||||
|
||||
#include <sched.h>
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include <sys/types.h>
|
||||
|
||||
|
||||
#ifdef _GNU_SOURCE
|
||||
#ifdef _DEFAULT_SOURCE
|
||||
|
||||
|
||||
#ifndef CPU_SETSIZE
|
||||
|
@ -7,9 +7,10 @@
|
||||
|
||||
|
||||
#include_next <spawn.h>
|
||||
#include <features.h>
|
||||
|
||||
|
||||
#ifdef _GNU_SOURCE
|
||||
#ifdef _DEFAULT_SOURCE
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -11,9 +11,10 @@
|
||||
|
||||
|
||||
#include_next <stdlib.h>
|
||||
#include <features.h>
|
||||
|
||||
|
||||
#ifdef _GNU_SOURCE
|
||||
#ifdef _DEFAULT_SOURCE
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -30,7 +31,7 @@ extern void qsort_r(void* base, size_t numElements, size_t sizeOfElement,
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* _GNU_SOURCE */
|
||||
#endif /* _DEFAULT_SOURCE */
|
||||
|
||||
|
||||
#endif /* _GNU_STDLIB_H_ */
|
||||
|
@ -7,9 +7,10 @@
|
||||
|
||||
|
||||
#include_next <string.h>
|
||||
#include <features.h>
|
||||
|
||||
|
||||
#ifdef _GNU_SOURCE
|
||||
#ifdef _DEFAULT_SOURCE
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -13,6 +13,7 @@
|
||||
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);
|
||||
@ -20,10 +21,11 @@ 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 _GNU_SOURCE
|
||||
#ifdef _DEFAULT_SOURCE
|
||||
size_t malloc_usable_size(void *ptr);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -49,7 +49,7 @@ extern void *tsearch(const void *key, void **_root,
|
||||
extern void twalk(const void *root,
|
||||
void (*action)(const void *, VISIT, int ));
|
||||
|
||||
#ifdef _GNU_SOURCE
|
||||
#ifdef _DEFAULT_SOURCE
|
||||
extern void tdestroy(void *root, void (*free_key)(void *));
|
||||
#endif
|
||||
|
||||
|
@ -70,7 +70,7 @@ extern FILE *fopen(const char *name, const char *mode);
|
||||
extern FILE *freopen(const char *name, const char *mode, FILE *stream);
|
||||
extern FILE *fdopen(int fd, const char *mode);
|
||||
extern int fclose(FILE *stream);
|
||||
#ifdef _GNU_SOURCE
|
||||
#ifdef _DEFAULT_SOURCE
|
||||
extern int fcloseall(void);
|
||||
#endif
|
||||
|
||||
@ -103,7 +103,7 @@ extern FILE *fmemopen(void *buf, size_t size, const char *mode);
|
||||
extern FILE *open_memstream(char **buf, size_t *size);
|
||||
|
||||
/* callback streams */
|
||||
#ifdef _GNU_SOURCE
|
||||
#ifdef _DEFAULT_SOURCE
|
||||
typedef ssize_t (*cookie_read_function_t)(void *cookie, char *buf, size_t size);
|
||||
typedef ssize_t (*cookie_write_function_t)(void *cookie, const char *buf, size_t size);
|
||||
typedef ssize_t (*cookie_seek_function_t)(void *cookie, off_t *offset, int whence);
|
||||
@ -115,7 +115,7 @@ typedef struct {
|
||||
cookie_close_function_t *close;
|
||||
} cookie_io_functions_t;
|
||||
extern FILE *fopencookie(void *cookie, const char *mode, cookie_io_functions_t io_funcs);
|
||||
#endif /*_GNU_SOURCE*/
|
||||
#endif /* _DEFAULT_SOURCE */
|
||||
|
||||
/* file I/O */
|
||||
extern int fflush(FILE *stream);
|
||||
|
@ -23,7 +23,7 @@ extern void *memccpy(void *dest, const void *source, int stopByte, size_t lengt
|
||||
extern void *memmove(void *dest, const void *source, size_t length);
|
||||
extern void *memset(void *dest, int value, size_t length);
|
||||
|
||||
#ifdef _GNU_SOURCE
|
||||
#ifdef _DEFAULT_SOURCE
|
||||
extern void *memrchr(const void *source, int value, size_t length);
|
||||
#endif
|
||||
|
||||
@ -41,7 +41,7 @@ extern char *strchr(const char *string, int character);
|
||||
extern char *strrchr(const char *string, int character);
|
||||
extern char *strstr(const char *string, const char *searchString);
|
||||
|
||||
#ifdef _GNU_SOURCE
|
||||
#ifdef _DEFAULT_SOURCE
|
||||
extern char *strchrnul(const char *string, int character);
|
||||
#endif
|
||||
|
||||
|
@ -97,7 +97,7 @@ extern int wcscasecmp(const wchar_t *wcs1, const wchar_t *wcs2);
|
||||
extern int wcscasecmp_l(const wchar_t *wcs1, const wchar_t *wcs2, locale_t locale);
|
||||
extern wchar_t *wcscat(wchar_t *dest, const wchar_t *src);
|
||||
extern wchar_t *wcschr(const wchar_t *wcs, wchar_t wc);
|
||||
#ifdef _GNU_SOURCE
|
||||
#ifdef _DEFAULT_SOURCE
|
||||
extern wchar_t *wcschrnul(const wchar_t *wcs, wchar_t wc);
|
||||
#endif
|
||||
extern int wcscmp(const wchar_t *wcs1, const wchar_t *wcs2);
|
||||
@ -149,7 +149,7 @@ extern wchar_t *wmemchr(const wchar_t *wcs, wchar_t wc, size_t n);
|
||||
extern int wmemcmp(const wchar_t *wcs1, const wchar_t *wcs2, size_t n);
|
||||
extern wchar_t *wmemcpy(wchar_t *dest, const wchar_t *src, size_t n);
|
||||
extern wchar_t *wmemmove(wchar_t *dest, const wchar_t *src, size_t n);
|
||||
#ifdef _GNU_SOURCE
|
||||
#ifdef _DEFAULT_SOURCE
|
||||
extern wchar_t *wmempcpy(wchar_t *dest, const wchar_t *src, size_t n);
|
||||
#endif
|
||||
extern wchar_t *wmemset(wchar_t *dest, wchar_t wc, size_t n);
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
#include <SupportDefs.h>
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#define _DEFAULT_SOURCE
|
||||
#include <string.h>
|
||||
|
||||
#include "atombios.h"
|
||||
|
@ -27,7 +27,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#define _DEFAULT_SOURCE
|
||||
#include <string.h>
|
||||
|
||||
/*
|
||||
|
@ -5,7 +5,7 @@
|
||||
* for further information
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#define _DEFAULT_SOURCE
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -1,4 +1,4 @@
|
||||
#define _GNU_SOURCE
|
||||
#define _DEFAULT_SOURCE
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
#include <limits.h>
|
||||
|
@ -1,4 +1,4 @@
|
||||
#define _GNU_SOURCE
|
||||
#define _DEFAULT_SOURCE
|
||||
#include <string.h>
|
||||
|
||||
#define BITOP(a,b,op) \
|
||||
|
Loading…
Reference in New Issue
Block a user