shithub: dumb

Download patch

ref: 0f6f4d82ebd96a0e88efa9492a2038f23a2dcbf6
parent: 20ea492bed2a8365a5f508d957dfc8d877d0af10
author: Andreas Gnau <Rondom@Rondom.de>
date: Fri Sep 22 21:22:42 EDT 2017

Move LONG_LONG define to an internal header

--- a/include/dumb.h
+++ b/include/dumb.h
@@ -106,19 +106,6 @@
                           ((unsigned int)(d)      ))
 
 
-
-#ifndef LONG_LONG
-#if defined __GNUC__ || defined __INTEL_COMPILER || defined __MWERKS__
-#define LONG_LONG long long
-#elif defined _MSC_VER || defined __WATCOMC__
-#define LONG_LONG __int64
-#elif defined __sgi
-#define LONG_LONG long long
-#else
-#error 64-bit integer type unknown
-#endif
-#endif
-
 #if __GNUC__ * 100 + __GNUC_MINOR__ >= 301 /* GCC 3.1+ */
 #ifndef DUMB_DECLARE_DEPRECATED
 #define DUMB_DECLARE_DEPRECATED
--- a/include/internal/dumb.h
+++ b/include/internal/dumb.h
@@ -26,6 +26,7 @@
 #ifndef INTERNAL_DUMB_H
 #define INTERNAL_DUMB_H
 
+#include "../dumb.h"
 
 #undef MIN
 #undef MAX
@@ -37,6 +38,16 @@
 
 #undef ABS
 #define ABS(x) (((x) >= 0) ? (x) : (-(x)))
+
+#ifndef LONG_LONG
+# if defined __GNUC__ || defined __INTEL_COMPILER || defined __MWERKS__ || defined __sgi
+#  define LONG_LONG long long
+# elif defined _MSC_VER || defined __WATCOMC__
+#  define LONG_LONG __int64
+# else
+#  error 64-bit integer type unknown
+# endif
+#endif
 
 typedef struct DUH_SIGTYPE_DESC_LINK
 {
--- a/include/internal/tarray.h
+++ b/include/internal/tarray.h
@@ -2,18 +2,7 @@
 #define _T_ARRAY_H_
 
 #include <stdlib.h>
-
-#ifndef LONG_LONG
-#if defined __GNUC__ || defined __INTEL_COMPILER || defined __MWERKS__
-#define LONG_LONG long long
-#elif defined _MSC_VER || defined __WATCOMC__
-#define LONG_LONG __int64
-#elif defined __sgi
-#define LONG_LONG long long
-#else
-#error 64-bit integer type unknown
-#endif
-#endif
+#include "internal/dumb.h"
 
 void * timekeeping_array_create(size_t size);
 void timekeeping_array_destroy(void * array);
--- a/src/helpers/clickrem.c
+++ b/src/helpers/clickrem.c
@@ -20,6 +20,7 @@
 #include <stdlib.h>
 #include <math.h>
 #include "dumb.h"
+#include "internal/dumb.h"
 
 
 
--- a/src/helpers/resample.c
+++ b/src/helpers/resample.c
@@ -43,9 +43,8 @@
  */
 
 #include <math.h>
-#include "dumb.h"
-
 #include "internal/resampler.h"
+#include "internal/dumb.h"