shithub: sox

Download patch

ref: 39b71fb516bf18304e0561d316ce2ce82814a4dd
parent: c84212139a233f6ef34f67f8c160493fbf29877e
author: robs <robs>
date: Wed Feb 20 15:58:51 EST 2008

Makes no difference on 32-bit systems.
In theory, this should make us
more portable esp. on 64-bit.
If everything's still working I'll subst away all the sox_(s)size_t
instances.

--- a/src/sox.h
+++ b/src/sox.h
@@ -164,15 +164,10 @@
 
 
 
-typedef uint32_t sox_size_t;
-/* Maximum value size type can hold. (Minimum is 0). */
-#define SOX_SIZE_MAX 0xffffffff
-#define SOX_SAMPLE_BITS (sizeof(sox_size_t) * CHAR_BIT)
-
-typedef int32_t sox_ssize_t;
-/* Minimum and maximum value signed size type can hold. */
-#define SOX_SSIZE_MAX 0x7fffffff
-#define SOX_SSIZE_MIN (-SOX_SSIZE_MAX - 1)
+#include <stddef.h>
+typedef size_t sox_size_t;
+#define SOX_SIZE_MAX (sox_size_t)(-1)
+typedef ptrdiff_t sox_ssize_t;
 
 typedef double sox_rate_t;