Hello developers,

the attached patch fixes compilation with the new GNU coreutils. Especially important is the "-k" parameter for "sort", because otherwise an empty opcodes.c file will be generated which will lead to an immediate SIGSEGV when using "explain".

--
---> doj / cubic
----> http://cubic.org/~doj
-----> http://llg.cubic.org
Index: sqlite-3.2.2/Makefile.in
===================================================================
--- sqlite-3.2.2.orig/Makefile.in       2005-06-06 16:44:41.000000000 +0200
+++ sqlite-3.2.2/Makefile.in    2005-07-03 13:49:25.000000000 +0200
@@ -222,7 +222,7 @@
 # of the most recently modified source code file
 #
 last_change:   $(SRC)
-       cat $(SRC) | grep '$$Id: ' | sort +4 | tail -1 \
+       cat $(SRC) | grep '$$Id: ' | sort -k 3 | tail -n 1 \
           | awk '{print $$5,$$6}' >last_change
 
 libsqlite3.la: $(LIBOBJ)
@@ -311,7 +311,7 @@
        $(LTCOMPILE) -c opcodes.c
 
 opcodes.c:     opcodes.h $(TOP)/mkopcodec.awk
-       sort -n -b +2 opcodes.h | awk -f $(TOP)/mkopcodec.awk >opcodes.c
+       sort -n -b -k 3 opcodes.h | awk -f $(TOP)/mkopcodec.awk >opcodes.c
 
 opcodes.h:     parse.h $(TOP)/src/vdbe.c $(TOP)/mkopcodeh.awk
        cat parse.h $(TOP)/src/vdbe.c | awk -f $(TOP)/mkopcodeh.awk >opcodes.h

Reply via email to