Reckordp
707933aa8e
Helper for link window's library
2020-04-03 20:34:00 +07:00
dearblue
cc1db2d117
Remove unnecessary 'stdio.h'; ref #4947
...
'stdio.h' is included in 'mruby.h' ('mrbconf.h').
However, keep 'stdio.h' used by mruby-test.
2020-03-08 21:42:09 +09:00
Reckordp
7c85a1ff07
Increase flexibility of CrossBuild
2020-03-08 14:23:55 +07:00
dearblue
8020374d6b
Fix builds for old mingw in mruby-socket; ref #4914
2020-02-01 15:58:32 +09:00
Yukihiro "Matz" Matsumoto
9174b18f34
Rename mrb_num_args_error to mrb_argnum_error; ref #4863
2020-01-01 22:37:14 +09:00
Yukihiro "Matz" Matsumoto
b9c78c3fcc
Merge pull request #4863 from shuujii/add-mrb_num_args_error-for-wrong-number-of-arguments-error
...
Add `mrb_num_args_error()` for "wrong number of arguments" error
2020-01-01 22:34:22 +09:00
KOBAYASHI Shuji
81de1f159c
Add mrb_num_args_error() for "wrong number of arguments" error
...
To unify the style of messages.
2019-12-12 11:45:58 +09:00
dearblue
56de911b7a
Add "mruby developers" into some gems; Resolve #4709
...
It is writing side by side with the original authors.
2019-12-09 23:49:03 +09:00
KOBAYASHI Shuji
feaf80d899
Use type predicate macros instead of mrb_type if possible
...
For efficiency with `MRB_WORD_BOXING` (implement type predicate macros for
all `enum mrb_vtype`).
2019-09-26 22:23:27 +09:00
Yukihiro "Matz" Matsumoto
5a0204bb45
Remove unnecessary files from mruby-{io,pack,socket}.
2019-09-13 02:23:16 +09:00
Takeshi Watanabe
2e172fd932
Fix link of mruby-io
2019-08-20 23:54:36 +09:00
Yukihiro "Matz" Matsumoto
98fc887cb3
Reorganize mrb_string_value_cstr and related functions.
...
`mrb_string_value_cstr` and `mrb_string_value_len`: obsolete
`mrb_string_cstr`: new function to retrieve NULL terminated C string
`RSTRING_CSTR`: wrapper macro of `mrb_string_cstr`
2019-08-07 15:52:10 +09:00
KOBAYASHI Shuji
334afb167c
Use new specifiers/modifiers of mrb_vfromat()
...
The binary sizes (gems are only `mruby-bin-mruby`) are reduced slightly in
my environment than before the introduction of new specifiers/modifiers
(5116789a ) with this change.
------------+-------------------+-------------------+--------
BINARY | BEFORE (5116789a ) | AFTER (This PR) | RATIO
------------+-------------------+-------------------+--------
mruby | 593416 bytes | 593208 bytes | -0.04%
libmruby.a | 769048 bytes | 767264 bytes | -0.23%
------------+-------------------+-------------------+--------
BTW, I accidentally changed `tasks/toolchains/visualcpp.rake` at #4613 ,
so I put it back.
2019-08-05 13:18:50 +09:00
Hiroshi Mimaki
b630bf59ef
Fix path of error.h.
2019-06-18 13:27:16 +09:00
KOBAYASHI Shuji
e2604c1550
Avoid using mrb_str_to_cstr if possible
...
Because it always allocate new string. Replace with the followings:
- Use `RSRING_PTR` if string is guaranteed to be null-terminated.
- Use `mrb_string_value_cstr` or `mrb_get_args("z")` if return value isn't
modified.
2019-05-06 23:32:53 +09:00
KOBAYASHI Shuji
0ccb058b90
Use mrb_fixnum_to_str() instead of Fixnum#to_s
2019-05-05 20:31:12 +09:00
KOBAYASHI Shuji
d68eb3d043
Fix wrong assertion method in some tests
2019-02-18 21:24:20 +09:00
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