From 53ba61ff1f71c50a26a03909a9b35e12b79d939d Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Mon, 9 Jun 2014 18:01:21 +0200
Subject: Fix build with gcc2.


diff --git a/test/dump.h b/test/dump.h
index 941117c..97a6cfd 100644
--- a/test/dump.h
+++ b/test/dump.h
@@ -733,13 +733,14 @@ void dump_bytecode(css_style *style, char **ptr, uint32_t depth)
 		opcode_t op;
 		uint32_t value;
 		uint32_t opv = *((uint32_t *) bytecode);
+		uint32_t i;
 
 		ADVANCE(sizeof(opv));
 
 		op = getOpcode(opv);
 
 		*((*ptr)++) = '|';
-		for (uint32_t i = 0; i < depth; i++)
+		for (i = 0; i < depth; i++)
 			*((*ptr)++) = ' ';
 		*ptr += sprintf(*ptr, "%s: ", opcode_names[op]);
 
@@ -2657,10 +2658,10 @@ void dump_font_face(css_font_face *font_face, char **ptr)
 		uint32_t i;
 		css_font_face_src *srcs = font_face->srcs;
 		for (i = 0; i < font_face->n_srcs; ++i) {
+			css_font_face_format format;
 			*ptr += sprintf(*ptr, "\n|  src: ");
 			
-			css_font_face_format format = 
-					css_font_face_src_format(&srcs[i]);
+			format = css_font_face_src_format(&srcs[i]);
 			
 			*ptr += sprintf(*ptr, "\n|   format: ");
 			
-- 
1.8.3.4


From 7bb3452686257d7732b6c6cbcf5c8ace35280a09 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Mon, 9 Jun 2014 18:01:32 +0200
Subject: Fix include paths for Haiku.


diff --git a/Makefile b/Makefile
index d80178c..321eb5c 100644
--- a/Makefile
+++ b/Makefile
@@ -44,7 +44,7 @@ endif
 include $(NSBUILD)/Makefile.top
 
 # Extra installation rules
-I := /include/libcss
+I := /$(INCLUDEDIR)/libcss
 
 INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):include/libcss/computed.h
 INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):include/libcss/errors.h
diff --git a/libcss.pc.in b/libcss.pc.in
index 695aa76..8df11b4 100644
--- a/libcss.pc.in
+++ b/libcss.pc.in
@@ -1,7 +1,7 @@
 prefix=PREFIX
 exec_prefix=${prefix}
 libdir=${exec_prefix}/LIBDIR
-includedir=${prefix}/include
+includedir=${prefix}/INCLUDEDIR
 
 Name: libcss
 Description: CSS parsing and selection library
-- 
1.8.3.4

