shithub: sox

Download patch

ref: b91c9d5d7ce73a1b90794fa008fc2dc4cde53886
parent: ef1bdbce6791e2bdc0a59993c7caa3276175694a
author: cbagwell <cbagwell>
date: Thu Oct 4 21:33:05 EDT 2001

Making adpcm and ima not define LONG and ULONG. Was breaking on alphas

--- a/Changelog
+++ b/Changelog
@@ -22,6 +22,8 @@
     and causing crashes on most RISC CPU's.  Fixed by going back to
     old style of declaring private data as type "double" which usually
     forces strictest alignment.
+  o ima_rw was miscompiling on alpha's because of a header ordering
+    problem.
 
 sox-12.17.2
 -----------
--- a/src/adpcm.h
+++ b/src/adpcm.h
@@ -1,18 +1,10 @@
 /*
  * adpcm.h
  */
+#include "st.h"
+
 #ifndef SAMPL
 #define SAMPL short
-#endif
-#ifndef LONG
-#define LONG long
-#endif
-/* FIXME: This breaks on Alphas! */
-/* SJB: Not really, because when used with sox, LONG and ULONG are
- *      already defined before adpcm.h is included
- */
-#ifndef ULONG
-#define ULONG unsigned long
 #endif
 
 /* default coef sets */
--- a/src/ima_rw.c
+++ b/src/ima_rw.c
@@ -23,9 +23,8 @@
 #include <math.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include "ima_rw.h"
 #include "st.h"
-
+#include "ima_rw.h"
 /*
  *
  * Lookup tables for IMA ADPCM format
--- a/src/ima_rw.h
+++ b/src/ima_rw.h
@@ -18,15 +18,11 @@
     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  
 */
+
+#include "st.h"
+
 #ifndef SAMPL
 #	define SAMPL short
-#endif
-/* FIXME: This breaks on Alphas! */
-/* SJB: Not really, because when used with sox, LONG and ULONG are
- *      already defined before adpcm.h is included
- */
-#ifndef ULONG
-#	define ULONG unsigned long
 #endif
 
 /* #undef STRICT_IMA makes code a bit faster, but not