[llvm-commits] CVS: llvm-test/MultiSource/Applications/obsequi/Makefile obsequi.c

Chris Lattner lattner at cs.uiuc.edu
Sat Mar 4 13:48:03 PST 2006



Changes in directory llvm-test/MultiSource/Applications/obsequi:

Makefile updated: 1.3 -> 1.4
obsequi.c updated: 1.2 -> 1.3
---
Log message:

more portability fixes, obsequi now works on darwin.


---
Diffs of the changes:  (+8 -3)

 Makefile  |    4 ++--
 obsequi.c |    7 ++++++-
 2 files changed, 8 insertions(+), 3 deletions(-)


Index: llvm-test/MultiSource/Applications/obsequi/Makefile
diff -u llvm-test/MultiSource/Applications/obsequi/Makefile:1.3 llvm-test/MultiSource/Applications/obsequi/Makefile:1.4
--- llvm-test/MultiSource/Applications/obsequi/Makefile:1.3	Sat Jan 15 21:16:10 2005
+++ llvm-test/MultiSource/Applications/obsequi/Makefile	Sat Mar  4 15:47:51 2006
@@ -2,7 +2,7 @@
 PROG = Obsequi
 CPPFLAGS += -DCOUNTBITS16 -DLASTBIT16 -DCOUNTMOVES_TABLE -DHASHCODEBITS=23
 CPPFLAGS += -DTWO_STAGE_GENERATION
-LDFLAGS = -lsupc++
-LIBS += -lsupc++
+LDFLAGS = -lsupc++ -lcurses
+LIBS += -lsupc++ -lcurses
 STDIN_FILENAME=$(PROJ_SRC_DIR)/input
 include ../../Makefile.multisrc


Index: llvm-test/MultiSource/Applications/obsequi/obsequi.c
diff -u llvm-test/MultiSource/Applications/obsequi/obsequi.c:1.2 llvm-test/MultiSource/Applications/obsequi/obsequi.c:1.3
--- llvm-test/MultiSource/Applications/obsequi/obsequi.c:1.2	Tue May 11 15:11:16 2004
+++ llvm-test/MultiSource/Applications/obsequi/obsequi.c	Sat Mar  4 15:47:51 2006
@@ -34,6 +34,12 @@
 #include "cppflags.h"
 #include "interface.h"
 
+// LLVM: define our own getline for portability
+#define getline getline_llvm
+
+ssize_t getline(char **lineptr, size_t *n, FILE *stream) {
+  return getstr (lineptr, n, stream, '\n', 0, 0);
+}
 
 //########################################################
 // Function templates.
@@ -172,7 +178,6 @@
   char   c1, c2;
 
   s32bit r, c;
-    
   while( (len = getline(&line, &line_size, stdin)) != -1){
     s32bit t;
     






More information about the llvm-commits mailing list