diff options
| author | @syxhe <https://t.me/syxhe> | 2025-01-06 21:19:38 -0600 |
|---|---|---|
| committer | @syxhe <https://t.me/syxhe> | 2025-01-06 21:19:38 -0600 |
| commit | 5a5e604eac5cf7473c2d129b38b517dc1968c441 (patch) | |
| tree | 34e87a69b4fd0b72a7c2d6db24a601eecfa6ad97 /src/shared.h | |
| parent | 227bc3560762ae770564fcd8bad36b334696bb0b (diff) | |
Use GNU macro (v)asprintf only if _GNU_SOURCE is defined
Diffstat (limited to 'src/shared.h')
| -rw-r--r-- | src/shared.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/shared.h b/src/shared.h index b10462e..684fb9f 100644 --- a/src/shared.h +++ b/src/shared.h | |||
| @@ -15,4 +15,9 @@ void* xcalloc(size_t nmemb, size_t size); | |||
| 15 | // `reallocarray()` with error checking. Calls `error()` or `abort()` on error, depending on the value of `___VXGG___XCALLOC_EXIT_ON_ERROR___` | 15 | // `reallocarray()` with error checking. Calls `error()` or `abort()` on error, depending on the value of `___VXGG___XCALLOC_EXIT_ON_ERROR___` |
| 16 | void* xreallocarray(void *ptr, size_t nmemb, size_t size); | 16 | void* xreallocarray(void *ptr, size_t nmemb, size_t size); |
| 17 | 17 | ||
| 18 | #if !defined _GNU_SOURCE | ||
| 19 | int vasprintf(char **str, const char *format, va_list ap); | ||
| 20 | int asprintf(char **str, const char *format, ...); | ||
| 21 | #endif | ||
| 22 | |||
| 18 | #endif \ No newline at end of file | 23 | #endif \ No newline at end of file |
