shithub: sox

Download patch

ref: 2024869a595118d686682b38386c594c717ea5bd
parent: 37cbdc63bc16efdd9075ab3ceb161d6cab7fc0bb
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Fri Aug 18 17:25:37 EDT 2023

better defaults

--- a/src/libsox.c
+++ b/src/libsox.c
@@ -80,11 +80,17 @@
         "msvc " STRINGIZE(_MSC_FULL_VER),
 #elif defined __SUNPRO_C
     fprintf(file, "sun c " STRINGIZE(__SUNPRO_C),
+#elif defined __plan9__
+        "kencc",
 #else
         NULL,
 #endif
         /* sox_arch */
+#ifdef __arch__
+        __arch__
+#else
         NULL
+#endif
     };
 
     if (!info.version)
@@ -125,7 +131,7 @@
   2,               /* unsigned     verbosity */
   output_message,  /* sox_output_message_handler */
   sox_false,       /* sox_bool     repeatable */
-  8192,            /* size_t       bufsiz */
+  IOUNIT,          /* size_t       bufsiz */
   0,               /* size_t       input_bufsiz */
   0,               /* int32_t      ranqd1 */
   NULL,            /* char const * stdin_in_use_by */
--- a/src/mkfile
+++ b/src/mkfile
@@ -1,7 +1,7 @@
 </$objtype/mkfile
 
 LIB=libsox.a$O
-CFLAGS=$CFLAGS -p -I/sys/include/npe -D__plan9__ -Iplan9
+CFLAGS=$CFLAGS -p -I/sys/include/npe -D__plan9__ -D__arch__="${objtype}" -Iplan9
 
 HFILES=\
 	adpcms.h aiff.h cvsd.h cvsdfilt.h g711.h g72x.h vox.h raw.h formats.h \
--- a/src/plan9/soxconfig.h
+++ b/src/plan9/soxconfig.h
@@ -8,3 +8,4 @@
 #define HAVE_SYS_TYPES_H
 #define HAVE_UNISTD_H
 #define NO_REWIND_PIPE
+#define DISTRO "9front"