fasta: Inline function needs to be static
authorJoachim Breitner <mail@joachim-breitner.de>
Sun, 22 Oct 2017 03:20:56 +0000 (23:20 -0400)
committerJoachim Breitner <mail@joachim-breitner.de>
Sun, 22 Oct 2017 03:24:00 +0000 (23:24 -0400)
if I read http://gcc.gnu.org/onlinedocs/gcc/Inline.html correctly.

Also, clean generated files.

shootout/fasta/Makefile
shootout/fasta/fasta-c.c

index f6beb8e..97a8b17 100644 (file)
@@ -5,6 +5,8 @@ include $(TOP)/mk/boilerplate.mk
 # we don't want to include fasta-c.c
 SRCS = Main.hs
 
+CLEAN_FILES += fasta-c fasta.faststdout fasta.stdout fasta.slowstdout
+
 FAST_OPTS = 250000
 NORM_OPTS = 2500000
 SLOW_OPTS = 25000000  # official shootout setting
index 5779316..7219b49 100644 (file)
@@ -37,7 +37,7 @@ amino homosapiens[] = {
 #define WIDTH 60
 #define LENGTH(a) (sizeof(a)/sizeof(a[0]))
 
-inline void str_write(char *s) {
+static inline void str_write(char *s) {
    write(fileno(stdout), s, strlen(s));
 }