Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
SRB2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
STJr
SRB2
Commits
91fc3302
Commit
91fc3302
authored
1 year ago
by
Sal
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' into next
parents
b5b7b7c1
909e07be
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/doomtype.h
+8
-4
8 additions, 4 deletions
src/doomtype.h
src/string.c
+1
-1
1 addition, 1 deletion
src/string.c
with
9 additions
and
5 deletions
src/doomtype.h
+
8
−
4
View file @
91fc3302
...
...
@@ -113,9 +113,13 @@ int endswith (const char *base, const char *tag);
#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
...
...
@@ -125,7 +129,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
...
...
This diff is collapsed.
Click to expand it.
src/string.c
+
1
−
1
View file @
91fc3302
...
...
@@ -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.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment