aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Melnichuk <alexeymelnichuck@gmail.com>2017-02-02 11:42:04 +0300
committerAlexey Melnichuk <alexeymelnichuck@gmail.com>2017-02-02 11:42:04 +0300
commit3240832746eeb7623e6a30b29a8bc4bdcdb2f705 (patch)
tree165293512c28be4ed8a83553f4ca53e5cca25f4c
parentd5efef63150935b136635767da75d48d18f8d1a7 (diff)
downloadlua-llthreads2-3240832746eeb7623e6a30b29a8bc4bdcdb2f705.tar.gz
lua-llthreads2-3240832746eeb7623e6a30b29a8bc4bdcdb2f705.tar.bz2
lua-llthreads2-3240832746eeb7623e6a30b29a8bc4bdcdb2f705.zip
Fix. Warning about undefined `pthread_kill` on some systems. (Close #8 #10)
-rw-r--r--.travis.yml12
-rw-r--r--appveyor.yml78
-rw-r--r--src/llthread.c3
3 files changed, 92 insertions, 1 deletions
diff --git a/.travis.yml b/.travis.yml
index 335473d..c4f54b4 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,16 +2,24 @@ sudo: false
2 2
3matrix: 3matrix:
4 include: 4 include:
5 - compiler: ": Lua51-osx"
6 env: LUA="lua 5.1"
7 os: osx
5 - compiler: ": Lua51" 8 - compiler: ": Lua51"
6 env: LUA="lua 5.1" 9 env: LUA="lua 5.1"
10 os: linux
7 - compiler: ": Lua52" 11 - compiler: ": Lua52"
8 env: LUA="lua 5.2" 12 env: LUA="lua 5.2"
13 os: linux
9 - compiler: ": Lua53" 14 - compiler: ": Lua53"
10 env: LUA="lua 5.3" 15 env: LUA="lua 5.3"
16 os: linux
11 - compiler: ": LuaJIT20" 17 - compiler: ": LuaJIT20"
12 env: LUA="luajit 2.0" 18 env: LUA="luajit 2.0"
19 os: linux
13 - compiler: ": LuaJIT21" 20 - compiler: ": LuaJIT21"
14 env: LUA="luajit 2.1" 21 env: LUA="luajit 2.1"
22 os: linux
15 23
16cache: 24cache:
17 directories: 25 directories:
@@ -24,6 +32,8 @@ branches:
24 32
25before_install: 33before_install:
26 - export CC=gcc 34 - export CC=gcc
35 - gcc --version
36 - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export PATH=$PATH:~/Library/Python/2.7/bin/; fi
27 - pip install --user hererocks 37 - pip install --user hererocks
28 - hererocks here -r^ --$LUA; 38 - hererocks here -r^ --$LUA;
29 - export PATH=$PATH:$PWD/here/bin 39 - export PATH=$PATH:$PWD/here/bin
@@ -52,7 +62,7 @@ script:
52 - lua test_threads_ex_opt_2.lua 62 - lua test_threads_ex_opt_2.lua
53 - lua test_threads_attr.lua 63 - lua test_threads_attr.lua
54 - lua test_integer.lua 64 - lua test_integer.lua
55 # - lua$LUA_SFX test_register_llthreads.lua 65 # - lua test_register_llthreads.lua
56 66
57notifications: 67notifications:
58 email: 68 email:
diff --git a/appveyor.yml b/appveyor.yml
new file mode 100644
index 0000000..db2206e
--- /dev/null
+++ b/appveyor.yml
@@ -0,0 +1,78 @@
1version: 0.3.2.{build}
2
3os:
4- Windows Server 2012 R2
5
6shallow_clone: true
7
8environment:
9 LR_EXTERNAL: c:\external
10
11 matrix:
12 - LUA: "lua 5.1"
13 - LUA: "lua 5.2"
14 - LUA: "lua 5.3"
15
16platform:
17 - x64
18 - x86
19 # - mingw
20
21cache:
22 - c:\hererocks -> appveyor.yml
23 - c:\external -> appveyor.yml
24
25install:
26 - echo "Setup..."
27 - set PATH=C:\Python27\Scripts;%LR_EXTERNAL%;%PATH%
28 - if /I "%platform%"=="x86" set HR_TARGET=vs_32
29 - if /I "%platform%"=="x64" set HR_TARGET=vs_64
30 - if /I "%platform%"=="mingw" set HR_TARGET=mingw
31 - if /I "%platform%"=="mingw" set PATH=C:\MinGW\bin;%PATH%
32 - if not exist "%LR_EXTERNAL%" (
33 mkdir "%LR_EXTERNAL%" &&
34 mkdir "%LR_EXTERNAL%\lib" &&
35 mkdir "%LR_EXTERNAL%\include"
36 )
37 - if not exist c:\hererocks (
38 pip install hererocks &&
39 hererocks c:\hererocks --%LUA% --target %HR_TARGET% -rlatest
40 )
41 - call c:\hererocks\bin\activate
42
43before_build:
44 # external deps
45
46build_script:
47 - echo "Making..."
48 - luarocks make rockspecs/lua-llthreads2-compat-scm-0.rockspec
49 - luarocks make rockspecs/lua-llthreads2-scm-0.rockspec
50
51before_test:
52 # test deps
53
54test_script:
55 - echo "Testing..."
56 - cd %APPVEYOR_BUILD_FOLDER%\test
57 - lua test_version.lua
58 - lua test_table_copy.lua
59 - lua test_threads.lua 10
60 - lua test_llthreads.lua
61 - lua test_join_timeout.lua
62 - lua test_join_detach.lua
63 - lua test_join_error.lua
64 - lua test_register_ffi.lua
65 - lua test_logger.lua
66 - lua test_pass_cfunction.lua
67 - lua test_load_llthreads2.lua
68 - lua test_alive.lua
69 - lua test_threads_ex.lua 10
70 - lua test_threads_ex_arg.lua
71 - lua test_threads_ex_opt.lua
72 - lua test_threads_ex_opt_2.lua
73 - lua test_threads_attr.lua
74 - lua test_integer.lua
75 # - lua test_register_llthreads.lua
76
77after_test:
78 # deploy
diff --git a/src/llthread.c b/src/llthread.c
index 97405d0..eee7290 100644
--- a/src/llthread.c
+++ b/src/llthread.c
@@ -12,6 +12,9 @@
12# include <process.h> 12# include <process.h>
13#else 13#else
14# include <pthread.h> 14# include <pthread.h>
15# ifndef _WIN32
16# include <signal.h>
17# endif
15#endif 18#endif
16 19
17#include <stdlib.h> 20#include <stdlib.h>