summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2015-12-02missing.h: __STDC_WANT_LIB_EXT1__nobu
* include/ruby/missing.h: get rid of redefinition of __STDC_WANT_LIB_EXT1__. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-02missing.h: __STDC_WANT_LIB_EXT1__nobu
* include/ruby/missing.h: __STDC_WANT_LIB_EXT1__ is necessary for memset_s. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-01explicit_bzero.c: needs windows.hnobu
* missing/explicit_bzero.c, random.c (explicit_bzero): SecureZeroMemory() needs windows.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-01missing.h: explicit_bzero by SecureZeroMemorynobu
* include/ruby/missing.h (explicit_bzero): use SecureZeroMemory on Windows. assume Windows XP or later at compile time. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-01missing.h: explicit_bzero by memset_snobu
* include/ruby/missing.h (explicit_bzero_by_memset_s): call memset_s directly if available. * missing/explicit_bzero.c: optimization is not a matter if memset_s is available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-01configure.in: FUNC_UNOPTIMIZEDnobu
* configure.in: check if optimize pragma is supported. * include/ruby/defines.h (FUNC_UNOPTIMIZED): fallback definition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-30* include/ruby/util.h: remove a warning suppression C4723kosaki
(potential divide by zero) for VisualC++. It's meaningless. Before r26197, there is ruby_div0() in this place and it actually made divide by zero. But now it's just garbage. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-30* missing/explicit_bzero.c: new file. define explicit_bzero.kosaki
* common.mk: add a rule for explicit.o. * configure.in: detect explicit_bzero and memset_s. * include/ruby/missing.h: add explicit_bzero. * random.c (init_randomseed): use explicit_bzero() instead of memset(). memset could be eliminated by compiler optimization. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-24Drop support for BeOSnobu
* beos: Drop support for BeOS now that Haiku is stable. [Fix GH-1112] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-23Haiku now best effort supportnobu
* configure.in: remove obsolete workarounds for Haiku. * dln.c, file.c, io.c: remove obsolete Haiku workarounds. * thread_pthread.c: add stack bounds detection for Haiku. * signal.c: get stack pointer from signal context on Haiku. [ruby-core:67923] [Bug #10811] [Fix GH-1109] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-10* time.c (rb_timespec_now): added.naruse
* time.c (rb_time_timespec_new): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-06* include/ruby/ruby.h (RSTRUCT_PTR): need a close parenthese.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-06* include/ruby/ruby.h (rb_array_const_ptr, rb_struct_const_ptr):ngoto
Suppress pointer type mismatch warnings occurred with old version of Fujitsu C Compiler (fcc) on Solaris 10. The warnings cause failure of TestMkmf::TestConvertible. [Bug #11644] [ruby-dev:49326] * include/ruby/ruby.h (FIX_CONST_VALUE_PTR): macro for the above, only effective with fcc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-03include/ruby/ruby.h (struct RObject): hide iv_index_tbl typenormal
This is an implementation detail and should not be exposed to C extension users. We may change this to id_table soon; and id_table should not be exposed as a public API. It is highly unlikely any existing C extensions require this; so the risk of breakage is very low. Ideally, all of RObject could be hidden. [ruby-core:71306] [Feature #11647] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-29* gc.c: introduce rb_wb_unprotected_newobj_of() andko1
rb_wb_protected_newobj_of(), pass the WB_PROTECTED information explicitly. * internal.h: use introduced functions by NEWOBJ_OF(). `flag' is immediate value, so that C compilers can solve them at compile time. * include/ruby/ruby.h: add a commnent about that. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-20missing.h: fix conditionnobu
* include/ruby/missing.h (bytesequence4_or_float): define by configured result. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-19check INFINITY and NAN without C99 optionnobu
* configure.in: check INFINITY and NAN without an option for C99 so that rb_infinity and rb_nan are respectively available regardless that option if they may be used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18disable warnings unless optimizednobu
* include/ruby/ruby.h (rb_data_object_{wrap,get}): move declarations inside ifdef too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18disable warnings unless optimizednobu
* include/ruby/ruby.h (rb_data_object_{wrap,get,make}): warn only if optimized, as __builtin_choose_expr() does not work fine unless optimized. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18* include/ruby/backward/util.h: Good-by Borland-C.kosaki
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18* numeric.c: Good-by Borland-C.kosaki
* include/ruby/backward/rubyio.h: ditto. * include/ruby/backward/st.h: ditto. * include/ruby/backward/util.h: ditto. * include/ruby/backward/rubysig.h: ditto. * include/ruby/backward/classext.h: ditto. * dln.c: ditto. * gc.c: ditto. * win32/resource.rb: ditto. * win32/dir.h: ditto. * ext/tk/tcltklib.c: ditto. * NEWS: announce that Borland-C is no longer supported. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18* ChangeLog: Good-bye OS/2.kosaki
* common.mk: ditto. * configure.in: ditto. * dln_find.c: ditto. * ext/Setup.emx: ditto. * ext/extmk.rb: ditto. * ext/socket/extconf.rb: ditto. * ext/zlib/extconf.rb: ditto. * file.c: ditto. * include/ruby/defines.h: ditto. * io.c: ditto. * lib/mkmf.rb: ditto. * missing/os2.c: ditto. * process.c: ditto. * ruby.c: ditto. * NEWS: announce OS/2 is no longer supported. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18* include/ruby/defines.h (DOSISH): add comments.kosaki
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-07ruby.h: RB_OBJ_FROZEN_RAWnobu
* include/ruby/ruby.h (RB_OBJ_FROZEN_RAW): split from RB_OBJ_FROZEN. valid only for non-special-const objects. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-06ruby.h: inlinesnobu
* include/ruby/ruby.h: turn function macros into inline functions, for debuggers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-06ruby.h: enumsnobu
* include/ruby/ruby.h: turn constant macros into enums, for debuggers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-16ruby.h: RUBY_FL_PROMOTEDnobu
* include/ruby/ruby.h (ruby_fl_type): revive RUBY_FL_PROMOTED for .gdbinit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-13ruby.h: add prefixnobu
* include/ruby/ruby.h: prefix RUBY or RB to global symbols to get rid of name conflicts with other headers. * include/ruby/encoding.h, include/ruby/intern.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-12win32.c: more fcntlnobu
* win32/win32.c (fcntl): implement F_GETFD, F_SETFD, and F_DUPFD_CLOEXEC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-05ruby.h: eval ASSUME argumentnobu
* include/ruby/ruby.h (ASSUME): evaluate the argument just once everywhere. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-04win32.h: fix macro namenobu
* include/ruby/win32.h: fix macro name for VC runtime version, RT_VER is only in Makefile. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-27oniguruma.h: constifynobu
* include/ruby/oniguruma.h (OnigEncodingTypeST): constify property_name_to_ctype arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-24win32.c: symlinknobu
* win32/win32.c (w32_symlink): implement symlink(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-21* include/ruby/ruby.h, cont.c, vm_trace.c: add a new eventko1
fiber_switch. We need more discussion about this feature so that I don't write it on NEWS. [Feature #11348] * test/ruby/test_settracefunc.rb: add tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-18ruby.h: define RClass only in Cnobu
* include/ruby/ruby.h (RClass): define only in C, `__attribute__` between `struct` and the name can't compile with g++. [ruby-core:70297] [Bug #11426] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-18ruby.h: adjust for g++nobu
* include/ruby/ruby.h (RClass): move `__attribute__` after the keyword `struct` for g++. [ruby-core:70297] [Bug #11426] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-13defines.h: tweaks of function alias macrosnobu
* include/ruby/defines.h (RUBY_ALIAS_FUNCTION_TYPE): cast the result to suppress warnings. * include/ruby/defines.h (RUBY_ALIAS_FUNCTION_VOID): minimize if possible. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-11ruby.h: check integer overflownobu
* include/ruby/ruby.h (ALLOCV_N): check integer overflow, as well as ruby_xmalloc2. pointed out by Paul <pawlkt AT gmail.com>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-28internal.h: moved RClassnobu
* internal.h (struct RClass): moved from ruby/ruby.h to hide the internals. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-23string.c: taint flagsnobu
* include/ruby/ruby.h: add raw FL macros, which assume always the argument object is not a special constant. * internal.h (STR_EMBED_P, STR_SHARED_P): valid only for T_STRING. * string.c: deal with taint flags directly across String instances. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-22ruby.h: ASSUMEnobu
* include/ruby/ruby.h (ASSUME): hint for optimization, the expression is assumed to be true always. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-21ruby/missing.h: M_PI fallback definitionnobu
* include/ruby/missing.h (M_PI, M_PI_2): fallback definitions for VC6. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-21ruby/win32.h: include windows.hnobu
* include/ruby/win32.h: include windows.h before winsock2.h, because mswsock.h included by the former uses SOCKET defined after it in the latter. fix a build failure with VC6. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-17encoding.h: ENC_CODERANGE_CLEAN_Pnobu
* include/ruby/encoding.h (ENC_CODERANGE_CLEAN_P): predicate that tells if the coderange is clean, that is 7bit or valid, and no needs to scrub. * re.c (rb_reg_expr_str): use ENC_CODERANGE_CLEAN_P. * string.c (enc_strlen, rb_enc_cr_str_buf_cat, rb_str_scrub): ditto. * string.c (rb_str_enumerate_chars): ditto, and suppress a warning by gcc6. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-02socket: memoize common socket families in fptr->modenormal
This provides a minor speedup by avoiding an extra syscall require 'socket' require 'benchmark' nr = 100000 msg = 'hello world' buf = '' size = msg.bytesize puts(Benchmark.measure do UNIXSocket.pair(:SEQPACKET) do |a, b| nr.times do a.sendmsg_nonblock(msg, 0, exception: false) b.recv(size, 0, buf) end end end) user system total real before: 0.330000 0.340000 0.670000 ( 0.678235) after: 0.290000 0.240000 0.530000 ( 0.534527) * ext/socket/rubysocket.h: flags for common socket families (rsock_getfamily): update signature * include/ruby/io.h: comment socket FMODE flags * ext/socket/init.c (rsock_getfamily): memoize family * ext/socket/basicsocket.c: adjust rsock_getfamily calls * ext/socket/ancdata.c: ditto [ruby-core:69713] [Feature #11298] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-29st.c: use ccan linked-list (try 3)normal
This improves the bm_vm2_bighash benchmark significantly by removing branches during insert, but slows down anything requiring iteration with the more complex loop termination checking. Speedup ratio of 1.10 - 1.20 is typical for the vm2_bighash benchmark. v3 - st_head calculates list_head address in two steps to avoid a bug in old gcc 4.4 (Debian 4.4.7-2) bug which incorrectly warned with: warning: dereferencing pointer ‘({anonymous})’ does break strict-aliasing rules * include/ruby/st.h (struct st_table): hide struct list_head * st.c (struct st_table_entry): adjust struct (head, tail): remove shortcut macros (st_head): new wrapper function (st_init_table_with_size): adjust to new struct and API (st_clear): ditto (add_direct): ditto (unpack_entries): ditto (rehash): ditto (st_copy): ditto (remove_entry): ditto (st_shift): ditto (st_foreach_check): ditto (st_foreach): ditto (get_keys): ditto (get_values): ditto (st_values_check): ditto (st_reverse_foreach_check): ditto (unused) (st_reverse_foreach): ditto (unused) [ruby-core:69726] [Misc #10278] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-26Revert "st.c: use ccan linked-list (try 2)"normal
This reverts commit r51044 Still getting failure notices from ko1's CI machine. ref: g3qkqn git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-26st.c: use ccan linked-list (try 2)normal
This improves the bm_vm2_bighash benchmark significantly by removing branches during insert, but slows down anything requiring iteration with the more complex loop termination checking. Speedup ratio of 1.10 - 1.20 is typical for the vm2_bighash benchmark. * include/ruby/st.h (struct st_table): hide struct list_head * st.c (struct st_table_entry): adjust struct (head, tail): remove shortcut macros (st_head): new wrapper function (st_init_table_with_size): adjust to new struct and API (st_clear): ditto (add_direct): ditto (unpack_entries): ditto (rehash): ditto (st_copy): ditto (remove_entry): ditto (st_shift): ditto (st_foreach_check): ditto (st_foreach): ditto (get_keys): ditto (get_values): ditto (st_values_check): ditto (st_reverse_foreach_check): ditto (unused) (st_reverse_foreach): ditto (unused) [ruby-core:69726] [Misc #10278] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-25Revert r51034 "st.c: use ccan linked-list"normal
Maybe this will stop mysterious CI failures from ko1@sasada-8core: リビジョン 51034 です。 make[1]: ディレクトリ `/mnt/sdb1/ruby/build' に入ります ../trunk/revision.h unchanged make[1]: ディレクトリ `/mnt/sdb1/ruby/build' から出ます make[1]: ディレクトリ `/mnt/sdb1/ruby/build' に入ります config.guess already exists config.sub already exists generating ../trunk/ext/ripper/ripper.c make[2]: ディレクトリ `/mnt/sdb1/ruby/trunk/ext/ripper' に入ります extracting ripper.y from ../../parse.y id.h not found in ["../.."] make[2]: *** [ripper.y] エラー 1 make[2]: ディレクトリ `/mnt/sdb1/ruby/trunk/ext/ripper' から出ます make[1]: *** [../trunk/ext/ripper/ripper.c] エラー 2 make[1]: ディレクトリ `/mnt/sdb1/ruby/build' から出ます make: [up] エラー 2 (無視されました) make: *** [.rbconfig.time] セグメンテーション違反です Command exited with non-zero status 2 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-25st.c: use ccan linked-listnormal
This improves the bm_vm2_bighash benchmark significantly by removing branches during insert, but slows down anything requiring iteration with the more complex loop termination checking. Speedup ratio of 1.10 - 1.20 is typical for the vm2_bighash benchmark. * include/ruby/st.h (struct st_table): hide struct list_head * st.c (struct st_table_entry): adjust struct (head, tail): remove shortcut macros (st_head): new wrapper function (st_init_table_with_size): adjust to new struct and API (st_clear): ditto (add_direct): ditto (unpack_entries): ditto (rehash): ditto (st_copy): ditto (remove_entry): ditto (st_shift): ditto (st_foreach_check): ditto (st_foreach): ditto (get_keys): ditto (get_values): ditto (st_values_check): ditto (st_reverse_foreach_check): ditto (unused) (st_reverse_foreach): ditto (unused) [ruby-core:69726] [Misc #10278] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e