aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-rw-r--r--src/Makefile2
-rw-r--r--src/compat.h4
-rw-r--r--src/keeper.c5
-rw-r--r--src/lanes.c6
-rw-r--r--src/threading.c1
-rw-r--r--src/tools.c4
7 files changed, 9 insertions, 15 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 99686d7..b6ac9e5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -38,7 +38,7 @@ ENDIF(CYGWIN)
38 38
39# Build 39# Build
40INCLUDE_DIRECTORIES(src) 40INCLUDE_DIRECTORIES(src)
41ADD_LIBRARY(lua51-lanes MODULE src/lanes.c src/threading.c src/tools.c src/keeper.c) 41ADD_LIBRARY(lua51-lanes MODULE src/lanes.c src/threading.c src/tools.c src/keeper.c src/compat.c)
42 42
43IF(UNIX AND NOT CYGWIN) 43IF(UNIX AND NOT CYGWIN)
44 SET(LIBS pthread) 44 SET(LIBS pthread)
diff --git a/src/Makefile b/src/Makefile
index 539f56e..6a92ce2 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -7,7 +7,7 @@
7 7
8MODULE=lanes 8MODULE=lanes
9 9
10SRC=lanes.c threading.c tools.c keeper.c 10SRC=lanes.c compat.c threading.c tools.c keeper.c
11 11
12OBJ=$(SRC:.c=.o) 12OBJ=$(SRC:.c=.o)
13 13
diff --git a/src/compat.h b/src/compat.h
index a5801c4..496986b 100644
--- a/src/compat.h
+++ b/src/compat.h
@@ -1,6 +1,10 @@
1#if !defined( __COMPAT_H__) 1#if !defined( __COMPAT_H__)
2#define __COMPAT_H__ 1 2#define __COMPAT_H__ 1
3 3
4#include "lua.h"
5#include "lualib.h"
6#include "lauxlib.h"
7
4// code is now using Lua 5.2 API 8// code is now using Lua 5.2 API
5// add Lua 5.2 API when building for Lua 5.1 9// add Lua 5.2 API when building for Lua 5.1
6#if LUA_VERSION_NUM == 501 10#if LUA_VERSION_NUM == 501
diff --git a/src/keeper.c b/src/keeper.c
index 63ae7ff..8bece77 100644
--- a/src/keeper.c
+++ b/src/keeper.c
@@ -43,11 +43,8 @@
43#include <stdlib.h> 43#include <stdlib.h>
44#include <ctype.h> 44#include <ctype.h>
45 45
46#include "lua.h"
47#include "lualib.h"
48#include "lauxlib.h"
49
50#include "threading.h" 46#include "threading.h"
47#include "compat.h"
51#include "tools.h" 48#include "tools.h"
52#include "keeper.h" 49#include "keeper.h"
53 50
diff --git a/src/lanes.c b/src/lanes.c
index 5f2f492..abda889 100644
--- a/src/lanes.c
+++ b/src/lanes.c
@@ -86,9 +86,6 @@ THE SOFTWARE.
86#include <stdlib.h> 86#include <stdlib.h>
87#include <ctype.h> 87#include <ctype.h>
88 88
89#include "lua.h"
90#include "lauxlib.h"
91
92#include "threading.h" 89#include "threading.h"
93#include "compat.h" 90#include "compat.h"
94#include "tools.h" 91#include "tools.h"
@@ -457,7 +454,7 @@ static void check_key_types( lua_State* L, int start_, int end_)
457LUAG_FUNC( linda_send) 454LUAG_FUNC( linda_send)
458{ 455{
459 struct s_Linda* linda = lua_toLinda( L, 1); 456 struct s_Linda* linda = lua_toLinda( L, 1);
460 bool_t ret; 457 bool_t ret = FALSE;
461 enum e_cancel_request cancel = CANCEL_NONE; 458 enum e_cancel_request cancel = CANCEL_NONE;
462 int pushed; 459 int pushed;
463 time_d timeout = -1.0; 460 time_d timeout = -1.0;
@@ -528,7 +525,6 @@ LUAG_FUNC( linda_send)
528 pushed = keeper_call( linda->U, KL, KEEPER_API( send), L, linda, key_i); 525 pushed = keeper_call( linda->U, KL, KEEPER_API( send), L, linda, key_i);
529 if( pushed < 0) 526 if( pushed < 0)
530 { 527 {
531 ret = FALSE;
532 break; 528 break;
533 } 529 }
534 ASSERT_L( pushed == 1); 530 ASSERT_L( pushed == 1);
diff --git a/src/threading.c b/src/threading.c
index 3e181ba..7898d1b 100644
--- a/src/threading.c
+++ b/src/threading.c
@@ -41,7 +41,6 @@ THE SOFTWARE.
41#include <math.h> 41#include <math.h>
42 42
43#include "threading.h" 43#include "threading.h"
44#include "lua.h"
45 44
46#if !defined( PLATFORM_XBOX) && !defined( PLATFORM_WIN32) && !defined( PLATFORM_POCKETPC) 45#if !defined( PLATFORM_XBOX) && !defined( PLATFORM_WIN32) && !defined( PLATFORM_POCKETPC)
47# include <sys/time.h> 46# include <sys/time.h>
diff --git a/src/tools.c b/src/tools.c
index d2b316b..becf31e 100644
--- a/src/tools.c
+++ b/src/tools.c
@@ -31,13 +31,11 @@ THE SOFTWARE.
31=============================================================================== 31===============================================================================
32*/ 32*/
33 33
34#include "compat.h"
34#include "tools.h" 35#include "tools.h"
35#include "keeper.h" 36#include "keeper.h"
36#include "lanes.h" 37#include "lanes.h"
37 38
38#include "lualib.h"
39#include "lauxlib.h"
40
41#include <stdio.h> 39#include <stdio.h>
42#include <string.h> 40#include <string.h>
43#include <ctype.h> 41#include <ctype.h>