[Coco] patch to build toolshed on FC-6
John W. Linville
linville at tuxdriver.com
Sat May 5 17:40:50 EDT 2007
Boisy,
I went to build toolshed from the Sourceforge CVS on my FC-6 box and
I had a couple of burps. You may want to consider applying this patch?
John
P.S. Apparently digittoint isn't quite standard C library stuff...
--- toolshed/build/unix/makewav/makefile.orig 2007-05-05 10:28:01.000000000 -0400
+++ toolshed/build/unix/makewav/makefile 2007-05-05 10:28:58.000000000 -0400
@@ -7,9 +7,10 @@
BINARY = makewav
OBJS = makewav.o
+LIBS = -lm
$(BINARY): $(OBJS)
- $(CC) $(OBJS) -o $@
+ $(CC) $(OBJS) $(LIBS) -o $@
clean:
rm $(BINARY) *.o
--- toolshed/makewav/makewav.c.orig 2007-05-05 10:14:40.000000000 -0400
+++ toolshed/makewav/makewav.c 2007-05-05 16:52:24.000000000 -0400
@@ -19,6 +19,25 @@
#include <stdlib.h>
#include <math.h>
+#ifdef __linux__
+/* implemented based on OSX man page */
+static inline int digittoint(int c)
+{
+ /* if not 0-9, a-f, or A-F then return 0 */
+ if (!isxdigit(c))
+ return 0;
+
+ if (isdigit(c))
+ return c - '0';
+
+ if (isupper(c))
+ return c - 'A' + 10;
+
+ /* not 0-9, not A-F, must be a-f */
+ return c - 'a' + 10;
+}
+#endif
+
#define MAXPATHLEN 512
#define PI 3.1415926
--
John W. Linville
linville at tuxdriver.com
More information about the Coco
mailing list