From e7a9a104aba2c0f3d5558021b54298cce3488467 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Sat, 25 Mar 2017 09:50:43 +0000
Subject: gcc2 patch


diff --git a/configure.ac b/configure.ac
index 7b54dfb..a7c20c2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10,7 +10,7 @@ AC_CANONICAL_HOST
 AC_CANONICAL_BUILD
 AC_CANONICAL_TARGET
 
-AM_INIT_AUTOMAKE(foreign)
+AM_INIT_AUTOMAKE([subdir-objects] [foreign])
 AC_CONFIG_SRCDIR([config.h.in])
 AC_CONFIG_HEADER([config.h])
 
diff --git a/src/t4k_main.c b/src/t4k_main.c
index 95d3ec2..97dd368 100644
--- a/src/t4k_main.c
+++ b/src/t4k_main.c
@@ -59,7 +59,8 @@ int T4K_HandleStdEvents (const SDL_Event* event)
   if (event->type != SDL_KEYDOWN)
     return 0;
     
-  SDLKey key = event->key.keysym.sym;
+  {
+  	SDLKey key = event->key.keysym.sym;
       
   /* Toggle screen mode: */
   if (key == SDLK_F10)
@@ -79,4 +80,5 @@ int T4K_HandleStdEvents (const SDL_Event* event)
 #endif
   
   return ret;
+  }
 }
diff --git a/src/t4k_menu.c b/src/t4k_menu.c
index b1ed842..6b1ab42 100644
--- a/src/t4k_menu.c
+++ b/src/t4k_menu.c
@@ -828,7 +828,8 @@ int T4K_RunMenu(int index, bool return_choice, void (*draw_background)(), int (*
 
 	  first_loop = 0;
           
-          int key = event.key.keysym.sym;
+          {
+          	int key = event.key.keysym.sym;
           
           if (key == SDLK_F10) {
 	    T4K_PrerenderAll();	 // Important when the screen is being RESIZED
@@ -887,6 +888,7 @@ int T4K_RunMenu(int index, bool return_choice, void (*draw_background)(), int (*
 
           }
           old_loc = loc;
+          }
         }
 
         /* handle special action that was caused by an event */
-- 
2.7.0


From f08c8e2305921766fee2e44ee528fa99afd94b40 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Sun, 26 Mar 2017 15:24:57 +0000
Subject: fix missing const define for ICONV_CONST


diff --git a/src/linebreak/linebreak.c b/src/linebreak/linebreak.c
index f9c88a1..e050d3d 100644
--- a/src/linebreak/linebreak.c
+++ b/src/linebreak/linebreak.c
@@ -21,7 +21,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
  * to allow compilation under mingw-cross-env:
  */
 
-#if defined BUILD_MINGW32 && !defined ICONV_CONST
+#if (defined(MINGW32) || defined(__HAIKU__)) && !defined ICONV_CONST
 #define ICONV_CONST const
 #endif
 
-- 
2.7.0

