summaryrefslogtreecommitdiff
path: root/silk
diff options
context:
space:
mode:
authorRalph Giles <giles@thaumas.net>2020-06-13 13:56:47 -0700
committerRalph Giles <giles@thaumas.net>2020-06-13 13:56:47 -0700
commit44e185265023385573edbb5f4198c352a43339ac (patch)
tree4316c08d8c5a3be07007967c80efb2c69d2da712 /silk
parentd99495f41dfb8e48b68d3026344ca41bbada69a4 (diff)
parent3cb71dbefd5a0a2ec4d692c6dd71c9ed6d207ffb (diff)
downloadopus-draft.tar.gz
Merge branch 'draft-willson' into draftdraft
Diffstat (limited to 'silk')
-rw-r--r--silk/MacroCount.h2
-rw-r--r--silk/debug.c3
-rw-r--r--silk/debug.h25
-rw-r--r--silk/typedef.h3
4 files changed, 20 insertions, 13 deletions
diff --git a/silk/MacroCount.h b/silk/MacroCount.h
index 78100ffe..dab2f57a 100644
--- a/silk/MacroCount.h
+++ b/silk/MacroCount.h
@@ -27,9 +27,9 @@ POSSIBILITY OF SUCH DAMAGE.
#ifndef SIGPROCFIX_API_MACROCOUNT_H
#define SIGPROCFIX_API_MACROCOUNT_H
-#include <stdio.h>
#ifdef silk_MACRO_COUNT
+#include <stdio.h>
#define varDefine opus_int64 ops_count = 0;
extern opus_int64 ops_count;
diff --git a/silk/debug.c b/silk/debug.c
index 9253faf7..71e69cc6 100644
--- a/silk/debug.c
+++ b/silk/debug.c
@@ -30,7 +30,10 @@ POSSIBILITY OF SUCH DAMAGE.
#endif
#include "debug.h"
+
+#if SILK_DEBUG || SILK_TIC_TOC
#include "SigProc_FIX.h"
+#endif
#if SILK_TIC_TOC
diff --git a/silk/debug.h b/silk/debug.h
index 6f68c1ca..36163e47 100644
--- a/silk/debug.h
+++ b/silk/debug.h
@@ -28,28 +28,29 @@ POSSIBILITY OF SUCH DAMAGE.
#ifndef SILK_DEBUG_H
#define SILK_DEBUG_H
-#include "typedef.h"
-#include <stdio.h> /* file writing */
-#include <string.h> /* strcpy, strcmp */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-unsigned long GetHighResolutionTime(void); /* O time in usec*/
-
/* Set to 1 to enable DEBUG_STORE_DATA() macros for dumping
* intermediate signals from the codec.
*/
#define SILK_DEBUG 0
/* Flag for using timers */
-#define SILK_TIC_TOC 0
+#define SILK_TIC_TOC 0
+#if SILK_DEBUG || SILK_TIC_TOC
+#include "typedef.h"
+#include <string.h> /* strcpy, strcmp */
+#include <stdio.h> /* file writing */
+#endif
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
#if SILK_TIC_TOC
+unsigned long GetHighResolutionTime(void); /* O time in usec*/
+
#if (defined(_WIN32) || defined(_WINCE))
#include <windows.h> /* timer */
#else /* Linux or Mac*/
diff --git a/silk/typedef.h b/silk/typedef.h
index 97b7e709..793d2c0c 100644
--- a/silk/typedef.h
+++ b/silk/typedef.h
@@ -67,6 +67,9 @@ __attribute__((noreturn))
static OPUS_INLINE void _silk_fatal(const char *str, const char *file, int line)
{
fprintf (stderr, "Fatal (internal) error in %s, line %d: %s\n", file, line, str);
+#if defined(_MSC_VER)
+ _set_abort_behavior( 0, _WRITE_ABORT_MSG);
+#endif
abort();
}
# define silk_assert(COND) {if (!(COND)) {silk_fatal("assertion failed: " #COND);}}