mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Rename HAVE_STRLCPY to SRB2_HAVE_STRLCPY, fix non-glibc compile
- Fix compile with msvcrt - Fix compile with SDL 2.28.2
This commit is contained in:
parent
8bebf33a77
commit
6f88ea2835
2 changed files with 9 additions and 5 deletions
|
|
@ -120,9 +120,13 @@ char *nongnu_strcasestr(const char *in, const char *what);
|
|||
#define HAVE_DOSSTR_FUNCS
|
||||
#endif
|
||||
|
||||
// glibc 2.38: added strlcpy and strlcat to _DEFAULT_SOURCE
|
||||
#if defined (__APPLE__) || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 38)
|
||||
#define HAVE_STRLCPY
|
||||
#if defined (__APPLE__)
|
||||
#define SRB2_HAVE_STRLCPY
|
||||
#elif defined (__GLIBC_PREREQ)
|
||||
// glibc 2.38: added strlcpy and strlcat to _DEFAULT_SOURCE
|
||||
#if __GLIBC_PREREQ(2, 38)
|
||||
#define SRB2_HAVE_STRLCPY
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_DOSSTR_FUNCS
|
||||
|
|
@ -132,7 +136,7 @@ int strlwr(char *n); // from dosstr.c
|
|||
|
||||
#include <stddef.h> // for size_t
|
||||
|
||||
#ifndef HAVE_STRLCPY
|
||||
#ifndef SRB2_HAVE_STRLCPY
|
||||
size_t strlcat(char *dst, const char *src, size_t siz);
|
||||
size_t strlcpy(char *dst, const char *src, size_t siz);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
#include <string.h>
|
||||
#include "doomdef.h"
|
||||
|
||||
#ifndef HAVE_STRLCPY
|
||||
#ifndef SRB2_HAVE_STRLCPY
|
||||
|
||||
// Like the OpenBSD version, but it doesn't check for src not being a valid
|
||||
// C string.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue