usa
5574d874fb
* include/ruby/{defines,missing}.h (rb_infinity, rb_nan): move from
...
defines.h to missing.h. (couldn't use RUBY_EXTERN there.)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-06 06:11:37 +00:00
usa
f0bd1c2174
* include/ruby/defines.h (rb_inifinity, rb_nan): export for Windows.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31935 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-06 05:09:58 +00:00
usa
799fafc03b
* include/ruby/missing.h, numeric.c (round): moved prototype of round()
...
from numeric.c to missing.h. (note: round() is C99 feature, so ruby
provides it if not exists in C runtime.)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-03 11:58:11 +00:00
nahi
7d20942bf6
* include/ruby/defines.h (CASEFOLD_FILESYSTEM): Revert r30508. Forgot to
...
include this file in the commit r31692. __APPLE__ is not
CASEFOLD_FILESYSTEM again, from this time.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-23 01:04:07 +00:00
mrkn
4eb3654178
* bignum.c (dump_bignum, bigmul1_balance, big_split, biglsh_bang,
...
bigrsh_bang, big_split3, bigmul1_toom3, bigmul0): implement Toom3 (Toom-Cook)
multiplication.
* include/ruby/defines.h: add format prefixes for BDIGIT and BDIGIT_DBL.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-22 15:37:00 +00:00
nobu
52f5f410e4
* internal.h: add for internal use only.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-18 13:41:54 +00:00
kosaki
d734c9dea2
* include/ruby/intern.h: resurrect old rb_fd_copy().
...
* thread.c (rb_fd_copy): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-15 14:57:35 +00:00
kosaki
2b7996e839
* include/ruby/intern.h: remove rb_fd_copy() to rb_fd_dup() and
...
rb_w32_fdcopy() to rb_w32_fd_dup().
* win32/win32.c: ditto.
* thread.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-15 14:51:09 +00:00
nobu
3a47cf3395
* remove trailing spaces.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-15 11:55:52 +00:00
kosaki
3ad44e0aa1
introduce missing/setproctitle.c
...
* include/ruby/missing.h: add setproctitle() declaration.
* missing/setproctitle.c: added.
* configure.in: add check for missing/setproctitle.c.
* ruby.c (ruby_process_options): add to call compat_init_setproctitle().
* ruby.c (set_arg0): remove all platform specific code. it's
moved to missing/setproctitle.c.
* ruby.c (origarg): remove len field. It's no longer used.
* ruby.c (get_arglen): removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-14 10:49:47 +00:00
kosaki
9468e945c8
* thread.c (rb_fd_init): remove volatile qualifier.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-07 13:40:56 +00:00
kosaki
156ccab796
* thread.c (rb_fd_init_copy): new internal api. It provide efficient
...
copy constructor semantics.
* thread.c (do_select): use rb_fd_init_copy().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-07 13:36:08 +00:00
kosaki
249fe0e742
* thread.c (rb_wait_for_single_fd): new. poll(2) based backend for rb_wait_for_single_fd().
...
Now only Linux uses it.
The patch was written by Eric Wong. [Ruby 1.9 - Feature #4531 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-04 01:07:03 +00:00
kosaki
9be37ca7d5
* thread.c (rb_wait_for_single_fd): new.
...
* thread.c (select_single): select(2) based backend for rb_wait_for_single_fd().
* io.c (make_writeconv): use rb_wait_for_single_fd() instaed of
rb_thread_fd_select().
* io.c (rb_io_wait_readable): ditto.
* thread.c (rb_thread_wait_fd_rw): ditto.
* io.c (wait_readable): removed.
* thread.c (init_set_fd): new helper function.
* include/ruby/io.h (RB_WAITFD_IN, RB_WAITFD_PRI, RB_WAITFD_OUT):
new constant for rb_single_wait_fd().
The patch was written by Eric Wong. [Ruby 1.9 - Feature #4531 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-04 00:59:57 +00:00
nobu
88559ce46e
* include/ruby/intern.h (rb_w32_fdcopy): add prototype. fixes
...
#4640
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-02 18:57:06 +00:00
kosaki
04202dc83d
* win32/win32.c (rb_w32_fdcopy): New. This can copy even though
...
fdset size exceed FD_SETSIZE.
* include/ruby/intern.h (rb_fd_copy): use rb_w32_fdcopy()
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-30 14:11:34 +00:00
kosaki
225fa965bc
* thread.c (rb_fd_copy): Change function argument. Now
...
rb_fd_copy() has fully copy semantics.
* include/ruby/intern.h: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-30 11:18:14 +00:00
kosaki
2d2544c8e6
* include/ruby/intern.h (rb_thread_select): mark as deprecated.
...
* ext/io/wait/wait.c (wait_readable): use rb_thread_fd_select
instead of rb_thread_select.
* ext/socket/init.c (wait_connectable0): ditto.
* ext/readline/readline.c (readline_event): ditto.
* io.c (rb_io_wait_readable, wait_readable, rb_io_wait_writable,
wait_writable): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-30 11:15:15 +00:00
kosaki
58e414b85e
* include/ruby/win32.h: remove redundunt declaration of
...
rb_w32_time_subtract().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-29 15:43:55 +00:00
nobu
5f131b648d
* thread_win32.c, include/ruby/win32.h: add prototypes.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-29 12:12:52 +00:00
kosaki
b4c5fad4b1
* thread_win32.c (native_cond_timedwait): New. r31373 caused
...
win32 build failure.
* thread_win32.c (__cond_timedwait, abs_timespec_to_timeout_ms):
New helper functions.
* win32/win32.c (rb_w32_time_subtract): rename from subtract and
remove static.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-29 04:18:29 +00:00
nobu
8fabd0c551
* include/ruby/win32.h (frexp, modf): fix suppressing warnings on
...
mingw.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-26 16:14:26 +00:00
nobu
8761467727
* io.c (validate_enc_binmode, rb_io_extract_modeenc): set newline
...
decorator according to open mode.
* transcode.c (rb_econv_prepare_options): new function, to prepare
econv options with newline flags.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-26 15:55:21 +00:00
nobu
3b937bbdc4
* include/ruby/encoding.h (ECONV_NEWLINE_DECORATOR_MASK): add.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-26 15:54:14 +00:00
nobu
fcfc113b04
* include/ruby/win32.h (ftruncate, truncate, ftello, fseeko): non-64
...
versions on mingw are useless because they use int32_t. fixes #4564
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-26 15:50:09 +00:00
naruse
60aa9c809b
* include/ruby/intern.h: pcc can't use __builtin_constant_p.
...
* vm_exec.c: change condition.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-23 17:34:58 +00:00
nobu
d986500059
* include/ruby/win32.h (frexp, modf): wrongly declared as pure in
...
mingw math.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-14 12:21:09 +00:00
nobu
f777225e09
* include/ruby/win32.h (ftruncate, truncate): mingw64 misses
...
prototypes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-14 12:21:04 +00:00
akr
77a12692ee
* include/ruby/st.h: parenthesize macro arguments.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-12 11:54:28 +00:00
usa
c3b81f63e7
* include/ruby/win32.h: VC doesn't have ftruncate() and others, but
...
ruby needs HAVE_ macros to use our emulation functions.
(fix the problem of 31262)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-12 01:39:39 +00:00
luislavena
c2bfeaa244
Evaluate truncate, ftruncate and ftello existence
...
This corrects mingw-w64 compilation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-11 16:38:10 +00:00
akr
4db93c3f41
* include/ruby/ruby.h: parenthesize macro arguments.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-10 13:24:26 +00:00
akr
eb7d68819f
* include/ruby/util.h: parenthesize macro arguments.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-09 09:02:03 +00:00
akr
e6ef26ae4b
* include/ruby/io.h: parenthesize macro arguments.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-07 11:04:18 +00:00
akr
d55cf83561
* include/ruby/intern.h: parenthesize macro arguments.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-06 12:08:46 +00:00
akr
a63105a45f
* include/ruby/encoding.h: parenthesize macro arguments.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-05 11:34:15 +00:00
nobu
9b66922d7f
* numeric.c (flo_round): fix inaccurate results.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-22 23:07:36 +00:00
arton
11e4052295
* hash.c (ruby_setenv): check env process block size with OS ver.
...
* win32/win32.c: export rb_w32_osver for above patch.
* include/ruby/win32.h: declare rb_w32_osver for Win32 Libs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-19 16:33:59 +00:00
nobu
247fdeedf8
* include/ruby/ruby.h (rb_funcall_passing_block): add prototype.
...
a patch by James M. Lawrence at [ruby-core:35501]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-17 15:54:22 +00:00
matz
eb807d42ec
* gc.c (rb_gc_set_params): allow GC parameter configuration by
...
environment variables. based on a patch from funny-falcon at
https://gist.github.com/856296 , but honors safe level.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-07 08:39:39 +00:00
nagachika
eaf08203dd
* include/ruby/intern.h: fix a typo of prototype declaration.
...
rb_mutex_try_lock -> rb_mutex_trylock [ruby-dev:43213]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31028 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-05 13:59:21 +00:00
arton
e59654c24b
* include/ruby/win32.h: define WIN32 if neither _WIN64 nor WIN32 defined. it forces to use push/pop for pack(4) pragma.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-28 15:15:32 +00:00
nobu
58b325366d
* thread.c (rb_thread_io_blocking_region): new function to run
...
blocking region with GIL released, for fd.
* thread.c (rb_thread_fd_close): implement. [ruby-core:35203]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-12 05:44:23 +00:00
naruse
a3b4b499a5
* include/ruby/missing.h: don't use HAVE_STDDEF_H because it never
...
defined by configure though configure.bat defines it.
* include/ruby/ruby.h: move include stddef.h to defines.h
* include/ruby/defines.h: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-03 07:37:22 +00:00
naruse
c008ca5ae6
* include/ruby/encoding.h (rb_enc_step_back): cast 4th argument 'n'
...
as int because Ruby usually treats length value as long but
onigenc_step_back's 4th argument is int.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-03 00:38:55 +00:00
kosaki
6909ea443f
* include/ruby/st.h (st_table): Added comment why we need __extension__.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-01 15:32:08 +00:00
tarui
fb672259d9
* include/ruby/win32.h, win32/win32.c: add rb_w32_inet_ntop.
...
inet_ntop's minimum supported client is Vista.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-31 17:31:18 +00:00
nobu
f989f7c7ea
* string.c (rb_str_ellipsize): new function to ellipsize a string.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-30 04:01:58 +00:00
nobu
4dcc883d06
* include/ruby/encoding.h (rb_enc_step_back): new function to step
...
back n characters.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-30 03:56:16 +00:00
kosaki
eea774d029
* include/ruby/ruby.h: Added NUM2MODET() and MODET2NUM() default definition.
...
Because r30686 introduced win32 build failure.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-29 16:06:00 +00:00