shithub: sox

Download patch

ref: bf53127e168fffb7718c61000d2da7984e0ec229
parent: e16e2544cc2987a7931961fa48e145d69e9e9ff8
author: cbagwell <cbagwell>
date: Thu Sep 8 21:03:06 EDT 2005

Force st_signalinfo_t to be signed char in case thats not the
compilers default value.

--- a/Changelog
+++ b/Changelog
@@ -8,6 +8,9 @@
 -----------
 
   o Updates to compile under VC6. Jimen Ching
+  o Declare st_signalinfo_t to specifically be signed in case
+    platform does not default ot signed chars.  This
+    is required for NetBSD/powerpc.
 
 sox-12.17.8
 -----------
--- a/src/aiff.c
+++ b/src/aiff.c
@@ -570,7 +570,7 @@
       *text = (char *) malloc((size_t) totalCommentLength + 1);
     }
     else {
-      realloc(*text, (size_t) totalCommentLength + 1);
+      *text = realloc(*text, (size_t) totalCommentLength + 1);
     }
 
     if (*text == NULL) {
--- a/src/au.c
+++ b/src/au.c
@@ -63,7 +63,7 @@
 
 static void auwriteheader(ft_t ft, st_size_t data_size);
 
-static int st_auencodingandsize(int sun_encoding, char *encoding, char *size)
+static int st_auencodingandsize(int sun_encoding, signed char *encoding, signed char *size)
 {
     switch (sun_encoding) {
     case SUN_ULAW:
--- a/src/st.h
+++ b/src/st.h
@@ -67,10 +67,10 @@
 
 typedef struct  st_signalinfo
 {
-    st_rate_t rate;      /* sampling rate */
-    char size;           /* word length of data */
-    char encoding;       /* format of sample numbers */
-    char channels;       /* number of sound channels */
+    st_rate_t rate;         /* sampling rate */
+    signed char size;     /* word length of data */
+    signed char encoding; /* format of sample numbers */
+    signed char channels; /* number of sound channels */
 } st_signalinfo_t;
 
 /* Loop parameters */