Author: cazfi
Date: Tue Jun 28 07:11:45 2016
New Revision: 33071

URL: http://svn.gna.org/viewcvs/freeciv?rev=33071&view=rev
Log:
Added configure check for fseeko. Build included lua accordingly.

See patch #7322

Modified:
    trunk/configure.ac
    trunk/dependencies/lua-5.3/freeciv_lua.patch
    trunk/dependencies/lua-5.3/src/liolib.c
    trunk/dependencies/lua-5.3/src/localluaconf.h

Modified: trunk/configure.ac
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/configure.ac?rev=33071&r1=33070&r2=33071&view=diff
==============================================================================
--- trunk/configure.ac  (original)
+++ trunk/configure.ac  Tue Jun 28 07:11:45 2016
@@ -1346,6 +1346,7 @@
 AC_FUNC_FORK
 AC_FUNC_STRCOLL
 AC_FUNC_VPRINTF
+AC_FUNC_FSEEKO
 
 dnl Windows vsnprintf doesn't support argument reordering (see PR#12932)
 if test "x$MINGW" != "xyes"; then

Modified: trunk/dependencies/lua-5.3/freeciv_lua.patch
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/dependencies/lua-5.3/freeciv_lua.patch?rev=33071&r1=33070&r2=33071&view=diff
==============================================================================
--- trunk/dependencies/lua-5.3/freeciv_lua.patch        (original)
+++ trunk/dependencies/lua-5.3/freeciv_lua.patch        Tue Jun 28 07:11:45 2016
@@ -1,6 +1,81 @@
+diff -Nurd lua-5.3/freeciv_lua.patch lua-5.3/freeciv_lua.patch
+--- lua-5.3/freeciv_lua.patch  2016-06-25 01:06:33.039306525 +0300
++++ lua-5.3/freeciv_lua.patch  2016-06-25 01:10:28.171040689 +0300
+@@ -1,71 +0,0 @@
+-diff -Nurd lua-5.3/src/ldo.c lua-5.3/src/ldo.c
+---- lua-5.3/src/ldo.c 2015-08-05 01:16:36.823491105 +0300
+-+++ lua-5.3/src/ldo.c 2015-08-05 01:02:57.653012740 +0300
+-@@ -60,7 +60,7 @@
+-      try { a } catch(...) { if ((c)->status == 0) (c)->status = -1; }
+- #define luai_jmpbuf          int  /* dummy variable */
+- 
+--#elif defined(LUA_USE_POSIX)                         /* }{ */
+-+#elif defined(LUA_USE_ULONGJMP)                              /* }{ */
+- 
+- /* in POSIX, try _longjmp/_setjmp (more efficient) */
+- #define LUAI_THROW(L,c)              _longjmp((c)->b, 1)
+-diff -Nurd lua-5.3/src/liolib.c lua-5.3/src/liolib.c
+---- lua-5.3/src/liolib.c      2015-08-05 01:16:36.823491105 +0300
+-+++ lua-5.3/src/liolib.c      2015-08-05 01:02:57.653012740 +0300
+-@@ -47,7 +47,7 @@
+- 
+- #if !defined(l_popen)                /* { */
+- 
+--#if defined(LUA_USE_POSIX)   /* { */
+-+#if defined(LUA_USE_POPEN)      /* { */
+- 
+- #define l_popen(L,c,m)               (fflush(NULL), popen(c,m))
+- #define l_pclose(L,file)     (pclose(file))
+-diff -Nurd lua-5.3/src/loslib.c lua-5.3/src/loslib.c
+---- lua-5.3/src/loslib.c      2015-08-05 01:16:36.823491105 +0300
+-+++ lua-5.3/src/loslib.c      2015-08-05 01:23:04.578681552 +0300
+-@@ -65,7 +65,7 @@
+- ** where it uses gmtime_r/localtime_r
+- */
+- 
+--#if defined(LUA_USE_POSIX)   /* { */
+-+#if defined(LUA_USE_GMTIME_R) /* { */
+- 
+- #define l_gmtime(t,r)                gmtime_r(t,r)
+- #define l_localtime(t,r)     localtime_r(t,r)
+-@@ -92,7 +92,7 @@
+- */
+- #if !defined(lua_tmpnam)     /* { */
+- 
+--#if defined(LUA_USE_POSIX)   /* { */
+-+#if defined(LUA_USE_MKSTEMP) /* { */
+- 
+- #include <unistd.h>
+- 
+-diff -Nurd lua-5.3/src/luaconf.h lua-5.3/src/luaconf.h
+---- lua-5.3/src/luaconf.h     2015-08-05 01:16:36.823491105 +0300
+-+++ lua-5.3/src/luaconf.h     2015-08-05 01:02:57.657012735 +0300
+-@@ -11,6 +11,7 @@
+- #include <limits.h>
+- #include <stddef.h>
+- 
+-+#include "localluaconf.h"
+- 
+- /*
+- ** ===================================================================
+-@@ -61,14 +62,12 @@
+- #if defined(LUA_USE_LINUX)
+- #define LUA_USE_POSIX
+- #define LUA_USE_DLOPEN               /* needs an extra library: -ldl */
+--#define LUA_USE_READLINE     /* needs some extra libraries */
+- #endif
+- 
+- 
+- #if defined(LUA_USE_MACOSX)
+- #define LUA_USE_POSIX
+- #define LUA_USE_DLOPEN               /* MacOS does not need -ldl */
+--#define LUA_USE_READLINE     /* needs an extra library: -lreadline */
+- #endif
+- 
+- 
 diff -Nurd lua-5.3/src/ldo.c lua-5.3/src/ldo.c
---- lua-5.3/src/ldo.c  2015-08-05 01:16:36.823491105 +0300
-+++ lua-5.3/src/ldo.c  2015-08-05 01:02:57.653012740 +0300
+--- lua-5.3/src/ldo.c  2016-06-25 01:06:49.199270913 +0300
++++ lua-5.3/src/ldo.c  2016-06-23 09:06:32.878331693 +0300
 @@ -60,7 +60,7 @@
        try { a } catch(...) { if ((c)->status == 0) (c)->status = -1; }
  #define luai_jmpbuf           int  /* dummy variable */
@@ -11,9 +86,9 @@
  /* in POSIX, try _longjmp/_setjmp (more efficient) */
  #define LUAI_THROW(L,c)               _longjmp((c)->b, 1)
 diff -Nurd lua-5.3/src/liolib.c lua-5.3/src/liolib.c
---- lua-5.3/src/liolib.c       2015-08-05 01:16:36.823491105 +0300
-+++ lua-5.3/src/liolib.c       2015-08-05 01:02:57.653012740 +0300
-@@ -47,7 +47,7 @@
+--- lua-5.3/src/liolib.c       2016-06-25 01:07:29.151182940 +0300
++++ lua-5.3/src/liolib.c       2016-06-25 01:05:21.175465084 +0300
+@@ -53,7 +53,7 @@
  
  #if !defined(l_popen)         /* { */
  
@@ -22,30 +97,39 @@
  
  #define l_popen(L,c,m)                (fflush(NULL), popen(c,m))
  #define l_pclose(L,file)      (pclose(file))
+@@ -102,7 +102,7 @@
+ 
+ #if !defined(l_fseek)         /* { */
+ 
+-#if defined(LUA_USE_POSIX)    /* { */
++#if defined(LUA_USE_FSEEKO)   /* { */
+ 
+ #include <sys/types.h>
+ 
 diff -Nurd lua-5.3/src/loslib.c lua-5.3/src/loslib.c
---- lua-5.3/src/loslib.c       2015-08-05 01:16:36.823491105 +0300
-+++ lua-5.3/src/loslib.c       2015-08-05 01:23:04.578681552 +0300
-@@ -65,7 +65,7 @@
+--- lua-5.3/src/loslib.c       2016-06-25 01:09:00.591037419 +0300
++++ lua-5.3/src/loslib.c       2016-06-23 09:06:32.878331693 +0300
+@@ -81,7 +81,7 @@
  ** where it uses gmtime_r/localtime_r
  */
  
 -#if defined(LUA_USE_POSIX)    /* { */
-+#if defined(LUA_USE_GMTIME_R) /* { */
++#if defined(LUA_USE_GMTIME_R)   /* { */
  
  #define l_gmtime(t,r)         gmtime_r(t,r)
  #define l_localtime(t,r)      localtime_r(t,r)
-@@ -92,7 +92,7 @@
+@@ -108,7 +108,7 @@
  */
  #if !defined(lua_tmpnam)      /* { */
  
 -#if defined(LUA_USE_POSIX)    /* { */
-+#if defined(LUA_USE_MKSTEMP) /* { */
++#if defined(LUA_USE_MKSTEMP)    /* { */
  
  #include <unistd.h>
  
 diff -Nurd lua-5.3/src/luaconf.h lua-5.3/src/luaconf.h
---- lua-5.3/src/luaconf.h      2015-08-05 01:16:36.823491105 +0300
-+++ lua-5.3/src/luaconf.h      2015-08-05 01:02:57.657012735 +0300
+--- lua-5.3/src/luaconf.h      2016-06-25 01:06:49.203270905 +0300
++++ lua-5.3/src/luaconf.h      2016-06-23 09:06:32.882331685 +0300
 @@ -11,6 +11,7 @@
  #include <limits.h>
  #include <stddef.h>

Modified: trunk/dependencies/lua-5.3/src/liolib.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/dependencies/lua-5.3/src/liolib.c?rev=33071&r1=33070&r2=33071&view=diff
==============================================================================
--- trunk/dependencies/lua-5.3/src/liolib.c     (original)
+++ trunk/dependencies/lua-5.3/src/liolib.c     Tue Jun 28 07:11:45 2016
@@ -102,7 +102,7 @@
 
 #if !defined(l_fseek)          /* { */
 
-#if defined(LUA_USE_POSIX)     /* { */
+#if defined(LUA_USE_FSEEKO)    /* { */
 
 #include <sys/types.h>
 

Modified: trunk/dependencies/lua-5.3/src/localluaconf.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/dependencies/lua-5.3/src/localluaconf.h?rev=33071&r1=33070&r2=33071&view=diff
==============================================================================
--- trunk/dependencies/lua-5.3/src/localluaconf.h       (original)
+++ trunk/dependencies/lua-5.3/src/localluaconf.h       Tue Jun 28 07:11:45 2016
@@ -1,4 +1,4 @@
-/********************************************************************** 
+/***********************************************************************
  Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -32,6 +32,9 @@
 #if defined(HAVE_GMTIME_R) && defined(HAVE_LOCALTIME_R)
 #define LUA_USE_GMTIME_R
 #endif
+#if defined(HAVE_FSEEKO)
+#define LUA_USE_FSEEKO
+#endif
 
 #ifdef FREECIV_HAVE_LIBREADLINE
 #define LUA_USE_READLINE


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to