Author: cazfi
Date: Tue Feb 17 08:42:00 2015
New Revision: 28185

URL: http://svn.gna.org/viewcvs/freeciv?rev=28185&view=rev
Log:
Fixed compilation of included lua-5.3 to respect local configuration as set in
localluaconf.h

See patch #5836

Modified:
    trunk/configure.ac
    trunk/dependencies/lua-5.3/freeciv_lua.patch
    trunk/dependencies/lua-5.3/src/ldo.c
    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=28185&r1=28184&r2=28185&view=diff
==============================================================================
--- trunk/configure.ac  (original)
+++ trunk/configure.ac  Tue Feb 17 08:42:00 2015
@@ -1257,7 +1257,7 @@
   if test x$gl_cv_func_working_mkstemp = xyes ; then
     AC_DEFINE([HAVE_MKSTEMP], [1], [Have working mkstemp])
   fi
-  AC_CHECK_FUNCS([isatty popen _longjmp _setjmp])
+  AC_CHECK_FUNCS([popen pclose _longjmp _setjmp])
 
   LUA_CFLAGS="-I\$(top_srcdir)/dependencies/lua-5.3/src"
   LUA_LIBS="\$(top_builddir)/dependencies/lua-5.3/src/liblua.la"

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=28185&r1=28184&r2=28185&view=diff
==============================================================================
--- trunk/dependencies/lua-5.3/freeciv_lua.patch        (original)
+++ trunk/dependencies/lua-5.3/freeciv_lua.patch        Tue Feb 17 08:42:00 2015
@@ -1,6 +1,30 @@
+diff -Nurd lua-5.3/src/ldo.c lua-5.3/src/ldo.c
+--- lua-5.3/src/ldo.c  2015-01-30 22:34:26.329033992 +0200
++++ lua-5.3/src/ldo.c  2015-02-14 22:51:25.740710930 +0200
+@@ -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-01-30 22:34:26.329033992 +0200
++++ lua-5.3/src/liolib.c       2015-02-14 22:33:35.100734420 +0200
+@@ -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-02-12 21:13:58.132496638 +0200
-+++ lua-5.3/src/loslib.c       2015-02-12 21:12:52.020498089 +0200
+--- lua-5.3/src/loslib.c       2015-02-14 22:33:05.196735076 +0200
++++ lua-5.3/src/loslib.c       2015-02-14 22:32:40.800735611 +0200
 @@ -58,7 +58,7 @@
  ** uses mkstemp.
  */
@@ -11,8 +35,8 @@
  #include <unistd.h>
  
 diff -Nurd lua-5.3/src/luaconf.h lua-5.3/src/luaconf.h
---- lua-5.3/src/luaconf.h      2015-02-12 21:13:58.132496638 +0200
-+++ lua-5.3/src/luaconf.h      2015-02-12 21:12:25.356498674 +0200
+--- lua-5.3/src/luaconf.h      2015-02-14 22:33:05.196735076 +0200
++++ lua-5.3/src/luaconf.h      2015-02-14 22:32:40.800735611 +0200
 @@ -11,6 +11,7 @@
  #include <limits.h>
  #include <stddef.h>

Modified: trunk/dependencies/lua-5.3/src/ldo.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/dependencies/lua-5.3/src/ldo.c?rev=28185&r1=28184&r2=28185&view=diff
==============================================================================
--- trunk/dependencies/lua-5.3/src/ldo.c        (original)
+++ trunk/dependencies/lua-5.3/src/ldo.c        Tue Feb 17 08:42:00 2015
@@ -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)

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=28185&r1=28184&r2=28185&view=diff
==============================================================================
--- trunk/dependencies/lua-5.3/src/liolib.c     (original)
+++ trunk/dependencies/lua-5.3/src/liolib.c     Tue Feb 17 08:42:00 2015
@@ -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))

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=28185&r1=28184&r2=28185&view=diff
==============================================================================
--- trunk/dependencies/lua-5.3/src/localluaconf.h       (original)
+++ trunk/dependencies/lua-5.3/src/localluaconf.h       Tue Feb 17 08:42:00 2015
@@ -23,10 +23,7 @@
 #ifdef HAVE_MKSTEMP
 #define LUA_USE_MKSTEMP
 #endif
-#ifdef HAVE_ISATTY
-#define LUA_USE_ISATTY
-#endif
-#ifdef HAVE_POPEN
+#if defined(HAVE_POPEN) && defined(HAVE_PCLOSE)
 #define LUA_USE_POPEN
 #endif
 #if defined(HAVE__LONGJMP) && defined(HAVE__SETJMP)


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

Reply via email to