You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/engine_steamaudio.c
+10Lines changed: 10 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,17 @@ of buffering solution to your node.
17
17
#include"../miniaudio.c"
18
18
19
19
#include<stdint.h>/* Required for uint32_t which is used by STEAMAUDIO_VERSION, and a random use of uint8_t. If there's a Steam Audio maintainer reading this, that needs to be fixed to use IPLuint32 and IPLuint8. */
20
+
21
+
/* Need to silence some warnings from the Steam Audio headers. */
Copy file name to clipboardExpand all lines: external/fs/fs.c
+26-11Lines changed: 26 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,16 @@
3
3
4
4
#include"fs.h"
5
5
6
+
/* TODO: Remove this. To replicate errors, Just comment out this _XOPEN_SOURCE section and compile with `-std=c89` on GCC. */
7
+
/* This is for `-std=c89` compatibility. Without this there will be a few pthread related issues as well as some stdio functions being unavailable. They will need workarounds. */
8
+
#ifndef_XOPEN_SOURCE
9
+
#define_XOPEN_SOURCE 700
10
+
#else
11
+
#if_XOPEN_SOURCE<500
12
+
#error _XOPEN_SOURCE must be >= 500. fs is not usable.
13
+
#endif
14
+
#endif
15
+
6
16
#include<errno.h>
7
17
8
18
/* BEG fs_common_macros.c */
@@ -14,8 +24,12 @@
14
24
/* BEG fs_va_copy.c */
15
25
#ifndeffs_va_copy
16
26
#if !defined(_MSC_VER) ||_MSC_VER >= 1800
17
-
#if (defined(__GNUC__) &&__GNUC__<3)
18
-
#definefs_va_copy(dst, src) ((dst) = (src)) /* This is untested. Not sure if this is correct for old GCC. */
27
+
#if !defined(__STDC_VERSION__) || (defined(__GNUC__) &&__GNUC__<3) /* <-- va_copy() is not available when using `-std=c89`. The `!defined(__STDC_VERSION__)` parts is what checks for this. */
28
+
#if defined(__va_copy)
29
+
#definefs_va_copy(dst, src) __va_copy(dst, src)
30
+
#else
31
+
#definefs_va_copy(dst, src) ((dst) = (src)) /* This is untested. Not sure if this is correct for old GCC. */
32
+
#endif
19
33
#else
20
34
#definefs_va_copy(dst, src) va_copy((dst), (src))
21
35
#endif
@@ -495,14 +509,6 @@ Parameter ordering is the same as c89thread to make amalgamation easier.
495
509
#if defined(_WIN32) && !defined(FS_USE_PTHREAD)
496
510
/* Win32. Don't include windows.h here. */
497
511
#else
498
-
#ifndef_XOPEN_SOURCE
499
-
#define_XOPEN_SOURCE 700
500
-
#else
501
-
#if_XOPEN_SOURCE<500
502
-
#error _XOPEN_SOURCE must be >= 500. c89thread is not usable.
503
-
#endif
504
-
#endif
505
-
506
512
#include<pthread.h>
507
513
typedefpthread_tfs_pthread;
508
514
typedefpthread_mutex_tfs_pthread_mutex;
@@ -7320,6 +7326,12 @@ logic in stb_sprintf() which we might be able to do via the amalgamator.
7320
7326
#defineFS_SPRINTF_NOUNALIGNED
7321
7327
#endif
7322
7328
7329
+
/* We'll get -Wlong-long warnings when forcing C89. Just force disable them. */
0 commit comments