Hiroshi Mimaki
0711c861ca
Fix mruby-socket test failure on MinGW.
2018-11-22 09:49:00 +09:00
Yukihiro "Matz" Matsumoto
a657117e4e
Avoid warning in MSVC compilation.
2018-09-01 17:36:35 +09:00
Kazuhiro Sera
b03f1f78e3
Fix misspelling words in comments
2018-08-11 00:28:32 +09:00
Sebastián Katzer
0bc8d1979c
Network services might not be available
2018-07-21 10:18:22 +02:00
Yukihiro "Matz" Matsumoto
a9abf65f03
Fixed wrong usages of mrb_raisef(); ref #4043
...
`mrb_raisef()` only takes `%S` specifier. If you don't have extra
arguments, use `mrb_raise()`.
2018-06-15 07:47:18 +09:00
Yukihiro "Matz" Matsumoto
70600c3ba8
Resolve sign comparison warning; ref #4044
2018-06-14 14:16:04 +09:00
Tomoyuki Sahara
af8020e7fd
sa_family_t is not defined on windows.
2018-06-14 13:52:37 +09:00
Tomoyuki Sahara
2eeac91098
set sockaddr_un.sun_len on the systems that have sockaddr.sa_len.
...
If your system has sa_len but is not BSD-derived, define HAVE_SA_LEN=1
on mrbgem.rake or build_config.rb.
2018-06-14 13:36:01 +09:00
Tomoyuki Sahara
5013d2b20f
struct sockaddr_un can be truncated.
...
When we have "struct sockaddr_un *s_un", we could not assume *s_un
points to a memory region which size is at least sizeof(*s_un).
Even worse, it may be shorter than sizeof(struct sockaddr) on some
systems.
2018-06-14 13:28:32 +09:00
Tomoyuki Sahara
3618556a95
struct sockaddr_un can be shorter than struct sockaddr.
...
ref: https://github.com/iij/mruby-socket/issues/45
2018-06-14 13:25:57 +09:00
Sebastián Katzer
e7a4699135
Declare inet_ntop and inet_pton as static
...
To avoid conflicts with multiple definitions of inet_ntop and inet_pton if compiled with # define _WIN32_WINNT _WIN32_WINNT_VISTA
C:/mingw-w64/x86_64-7.2.0-posix-seh-rt_v5-rev1/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw32/lib/../lib/libWs2_32.a(dghfs00169.o):(.text+0x0): multiple definition of `inet_pton'
722C:/projects/iss/mruby/build/host/lib/libmruby.a(socket.o):C:/projects/iss/mruby/mrbgems/mruby-socket/src/socket.c:80: first defined here
define _WIN32_WINNT _WIN32_WINNT_VISTA
2018-06-05 15:59:12 +02:00
Yukihiro "Matz" Matsumoto
0866fa38b0
Avoid unnecessary object allocation (addrinfo) in _accept; ref #3999
2018-04-18 00:18:03 +09:00
Yukihiro "Matz" Matsumoto
4880f6dc89
Socket.accept should have returned [fd, addr]; fix #3999
2018-04-17 17:21:49 +09:00
Yukihiro "Matz" Matsumoto
66b1695ba9
Define SOL_IP and SOL_TCP; ref #3999
2018-04-17 12:01:32 +09:00
Takeshi Watanabe
baff7c63ee
Revert #3984 .
2018-03-26 11:02:05 +09:00
Takeshi Watanabe
306cb99b10
Merge commit '36d016afd663d34607c843d03371bedb71efa34e'
2018-03-25 21:10:11 +09:00
MATSUMOTO, Ryosuke
6ae4fb707a
Depend mruby-io and mruby-pack in mruby core
2018-02-03 14:57:12 +09:00
Yukihiro "Matz" Matsumoto
e02cbb4426
Need fcntl.h and sys/stat.h as well for _open; ref #3938
2018-02-02 14:58:09 +09:00
Yukihiro "Matz" Matsumoto
c9fa7b1919
Need to include io.h anyway for _WIN32/64; ref #3938
2018-02-02 14:18:25 +09:00
Yasuhiro Matsumoto
0e0dad7697
include io.h on mingw
2018-01-31 12:18:35 +09:00
Yukihiro "Matz" Matsumoto
f7ff2d0ee3
Define compatibility only for _MSC_VER; ref #3923
...
Suggested by @mattn.
2018-01-31 12:10:51 +09:00
ksss
e422ba0bff
Use mkstemp instead of tempnam
2018-01-31 11:34:29 +09:00
Hiroshi Mimaki
f55df0da7b
addrinfo.ai_protocol was not set on Cygwin.
2017-12-26 11:12:49 +09:00
Hiroshi Mimaki
bce811a53a
Disabled UNIXSocket test on Cygwin
2017-12-26 11:05:28 +09:00
Yukihiro "Matz" Matsumoto
f0379c8c45
Merge pull request #3892 from mimaki/ipproto-winsock
...
Use IPPROTO enum values on WinSock.
2017-12-14 00:09:45 +09:00
Yukihiro "Matz" Matsumoto
16e473caad
Rename BasicSocket#is_socket= to #_is_socket; ref #3878
2017-12-14 00:07:42 +09:00
Yukihiro "Matz" Matsumoto
69ad12de06
Exclude UNIXSocket tests again; ref #3878
2017-12-14 00:05:23 +09:00
Takeshi Watanabe
d2163d13a8
Declare super class in socket.rb.
2017-12-14 00:05:23 +09:00
Takeshi Watanabe
949bf6ca43
Fix socket closing by using closesocket API in windows instead.
2017-12-14 00:05:23 +09:00
Yukihiro "Matz" Matsumoto
2300c9f737
Merge pull request #3893 from mimaki/add-mrbgem-summary
...
Added mrbgem's summary.
2017-12-14 00:00:10 +09:00
Hiroshi Mimaki
584e4e413a
Added mrbgem's summary.
2017-12-13 16:05:06 +09:00
Hiroshi Mimaki
9fac1a3f8b
Use IPPROTO enum values on WinSock.
2017-12-13 15:58:23 +09:00
Hiroshi Mimaki
398da99d05
Set protocol of AddrInfo
2017-12-13 14:44:13 +09:00
Yukihiro "Matz" Matsumoto
55fced30cd
Use _tempnam instead of tempnam on Windows.
2017-12-13 14:17:49 +09:00
Hiroshi Mimaki
4353623b72
Skip tests on Windows platform
2017-12-13 13:02:59 +09:00
Yukihiro "Matz" Matsumoto
a5b8603aa2
Winsock uses int where UNIX uses size_t.
2017-12-12 17:45:15 +09:00
Yasuhiro Matsumoto
99328695e3
fix build on mingw
2017-12-12 16:47:34 +09:00
Yukihiro "Matz" Matsumoto
9c0426c990
Winsock does not provide ssize_t; Use int instead.
2017-12-12 09:52:39 +09:00
Yukihiro "Matz" Matsumoto
b763759972
Reduce VC++ compiler warnings.
2017-12-11 17:22:46 +09:00
Yukihiro "Matz" Matsumoto
274884abe5
Reduce VC++ compiler warnings.
2017-12-09 16:14:12 +09:00
Yukihiro "Matz" Matsumoto
761218e70b
Skip socket tests on Windows platform.
...
Some test may be OK but we skip everything as a starting point.
2017-12-09 14:22:53 +09:00
Takeshi Watanabe
5de7dc2948
Fix memory leak found by leak sanitizer.
2017-12-08 12:10:28 +09:00
Yukihiro "Matz" Matsumoto
36a0b864ba
Reduce VC++ compiler warnings.
2017-12-08 09:50:02 +09:00
Yukihiro "Matz" Matsumoto
764a568aa4
Remove unused variable usock from mruby-socket/src/socket.c.
2017-12-07 20:25:40 +09:00
Yukihiro "Matz" Matsumoto
ff1194c134
fixup! Fix type casting errors when mruby-socket compiled by C++.
2017-12-07 20:24:13 +09:00
Yukihiro "Matz" Matsumoto
842e6945f2
Fix type casting errors when mruby-socket compiled by C++.
...
Also `bool` is a reserved word in C++.
2017-12-07 18:23:01 +09:00
Yukihiro "Matz" Matsumoto
73ef548c63
Add 'mrbgems/mruby-socket/' from commit 'ab54185005ec87fe4f5b10df95ad29659884141b'
...
git-subtree-dir: mrbgems/mruby-socket
git-subtree-mainline: d75266dd1b
git-subtree-split: ab54185005
2017-12-07 18:11:13 +09:00