* process.c (rb_exec_arg_addopt): Use NUM2MODET() instead
NUM2LONG because clang makes compile error by this narrowing
conversion.
* process.c (rb_run_exec_options_err): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-Werror=implicit-function-declaration compile option. therefore
we need a function declaration explicitly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
test becuase it's required for exit(3). The patch is
created by Tomoyuki Chikanaga. [Bug #4287] [ruby-dev:43060]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
also uses __syscall if available for *BSD on 64bit architecture.
[ruby-core:34062]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
warnings into errors only for bundled extensions.
[ruby-core:33815]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ruby runtime how it expects to use a file handle. This feature
can be improved a performance some situations.
Note: This feature is mainly developed by Run Paint Run Run.
Thank you! [ruby-core:33110] [Ruby 1.9-Feature#4038]
* io.c (do_io_advise): Helper function.
* io.c (io_advise_sym_to_const): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
warning flag. If you are using GCC, this flag is useful to
prevent breaking VC build.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
warnings as errors.
* lib/mkmf.rb (Logging.postpone): yield log file object.
* lib/mkmf.rb (xsystem): add options, :werror only right now.
* lib/mkmf.rb (with_werror): check as if warnings are errors.
* lib/mkmf.rb (convertible_int): make declaration conflict
warnings errors not to pass wrong type. [ruby-dev:42684]
* lib/mkmf.rb (COMMON_MACROS): get rid of conflicts.
* win32/Makefile.sub (WARNFLAGS): make declaration conflict
warnings errors if possible.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
functions in backtrace. [ruby-dev:42625]
a patch from shinichiro.h <shinichiro.hamaji AT gmail.com>
* addr2line.h: ditto.
* common.mk: add addr2line.$(OBJEXT).
* configure.in: check dl_iterate_phdr.
* vm_dump.c (rb_vm_bugreport): use rb_dump_backtrace_with_lines in
addr2line.c when the binary is ELF.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
version.c (ruby_initial_load_paths): exclude directories that
are configured without them from $LOAD_PATH. [ruby-core:33267]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
When devel/libexecinfo is installed on FreeBSD, now ruby
can show C level backtrace information.
http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/libexecinfo/
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
You can still explicitly disable this feature by specifying
--without-valgrind.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
check if generated pc file is valid.
* template/ruby.pc.in (DEFFILE): need for mingw.
* template/ruby.pc.in (LIBRUBY): fix the order.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (rb_cv_dynamic_alloca): check if extra source for
dynamic size alloca.
* missing/x86_64-chkstk.s (___chkstk): necessary for alloca of
amd64-mingw32msvc-gcc on Ubutu.
* thread_win32.c (ruby_alloca_chkstk): check stack overflow
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
environment even if POSIX defines dev_t as unsigned integer.
For example, OpenVMS, 64bit Solaris 9, and NetBSD 6 defines
dev_t as 64bit unsigned integer.
* file.c (rb_stat_dev): use DEVT2NUM.
* file.c (rb_stat_dev_major): dev_t is not long. major(3)'s return
value is int.
* file.c (rb_stat_dev_minor): dev_t is not long. minor(3)'s return
value is int.
* configure.in: check size of dev_t.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
SH4 is CPU for embedded which developed by Renesas Electronics.
Renesas SH4 has FPU. When FPU is used on sh4, -mieee of option is necessary.
This supports sh4(basic), sh4el(sh4 little endian) and sh4eb(sh4 big endian).
These do not have FPU though there are other sh4al, sh4al-dsp and etc.
[Feature #3874] [ruby-core:32548]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29340 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
to rdoc.
(--disable-install-rdoc): a new option for disabling only rdoc.
(--disable-install-capi): a new option for disabling only capi.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
RUBY_INSTALL_NAME with RUBY_SO_NAME. a patch from Jeremy Evans
at [ruby-core:32474].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* {bcc,win}32/setup.mak (-version-): ditto.
* version.h (RUBY_LIB_VERSION): use API version numbers.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This fixes build failure on MSVC. [ruby-core:31481]
* include/ruby/ruby.h, include/ruby/missing.h:
use BROKEN_CLOSE for replacing close(2).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* time.c (rb_gmtime_r): renamed from rb_gmtime.
(rb_localtime_r): renamed from rb_localtime.
(rb_localtime_r2): call rb_localtime_r and validate the result if
there is overflow problem.
(rb_gmtime_r2): call rb_gmtime_r and validate the result if there
is overflow problem.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This reverts commit r27078.
It causes build failure on some environments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
use own vsnprintf to avoid locale problems and platform
difference.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
install. The files of standard libraries are directly installed to
$(PREFIX)/lib/ruby instead of $(PREFIX)/lib/ruby/1.9.1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.c (ruby_init_loadpath_safe): TMP_RUBY_PREFIX should be
exec_prefix, not rubylibprefix. [ruby-core:28718]
* version.c (RUBY_LIB_PREFIX): fallback to RUBY_EXEC_PREFIX.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
pthread_np.h to use pthread_*_np functions.
Mac OS X's pthread_*_np also depend sys/signal.h,
but it is included at signal.h via vm_core.h via thread.c.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
unsetenv is void in older BSDs (FreeBSD 6 and OpenBSD 4.5 at least).
* hash.c (ruby_setenv): don't use the result of unsetenv if unsetenv
doesn't return a value.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* missing.h (struct timezone): define if not defined.
* win32/win32.h (struct timezone): defined in the newer w32api.
[ruby-core:27515]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Note that current FreeBSD needs privilege to call it;
so to use DTrace on FreeBSD, you should run configure as root.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* defs/dtrace.d: new file. defined a dtrace provider "ruby".
* include/ruby/ruby.h (LIKELY): moved from vm.c.
(UNLIKELY): ditto.
(OBJSETUP): probe "object-create".
(RUBY_EVENT_RESCUE): new event.
* vm_exec.c (DEBUG_ENTER_INSN): embeded a probe insn-entry into it.
(DEBUG_END_INSN): insn-return.
* vm.c (LIKELY): moved into ruby.h.
(UNLIKELY): ditto.
(Init_BareVM): embeded a probe "raise" into it.
* variable.c (rb_class2name_without_alloc): new utility function.
* tool/rbinstall.rb (install?(:ext, :arch, :'ext-arch')): installs
dtrace.d if necessary.
* thread_pthread.c (add_signal_thread_list): probe "raise".
(rb_thread_create_timer_thread): ditto.
* thread.c (rb_thread_schedule_rec): probes "thread-enter" and
"thread-leave",
(thread_start_func_2): ditto.
(thread_cleanup_func): probe "thread-term"
* lib/mkmf.rb: supports dtrace postprocessor on making an extension.
* iseq.c (rb_vm_insn_name): new utility function.
(rb_vm_insn_len): ditto.
* insns.def (hook): probes "method-etnry", "method-return", "line",
and "rescue".
* compile.c (iseq_compile_each): adds a trace op for "rescue" probe.
* gc.c (garbage_collect): probes "gc-begin" and "gc-end".
(obj_free): probe "object-free"
(garbage_collect_with_gvl): probe "raise"
(negative_size_allocation_error): ditto.
(rb_memerror): ditto.
* eval.c (rb_rescue2): probe "rescue"
(rb_longjmp): probe "raise"
* ext/probe/probe.c: new extension for application defined probes.
* ext/probe/extconf.rb: ditto.
* configure.in (--with-tracing-model): new option to choose a tracing
mechanism.
(DTRACE): new substitution. name of dtrace(1).
(RUBY_TRACING_MODEL): new substitution.
(DTRACE_OBJ): ditto.
(MINIDTRACE_OBJ): ditto.
(GOLFDTRACE_OBJ): ditto.
(LIBRUBY_DTRACE_OBJ): ditto.
(RUBY_DTRACE_POSTPROCESS): new macro. checks whether the dtrace on
the system needs postprocessing.
(RUBY_DTRACE_BSD_BROKEN): new macro. checks whether the dtrace
supports USDT.
* Makefile.in:
(DTRACE): new variable. name of dtrace(1).
(TRACING_MODEL): new variable. name of the chosen tracing mechanism.
(DTRACE_OBJ): same as the one in configure.in.
(MINIDTRACE_OBJ): ditto.
(GOLFDTRACE_OBJ): ditto.
(LIBRUBY_DTRACE_OBJ): ditto.
(CPPOUTFILE): new substitution. necessary for generating dtrace.d
(trace_none.h): new target for TRACING_MODEL=none
(RUBY_H_INCLUDES): appended a header for tracing.
(distclean-local): also removes preprocessed version of dtrace.d
($(LIBRUBY_A)): needs $(LIBRUBY_DTRACE_OBJ) if dtrace needs
postprocessing.
($(PROGRAM)): ditto.
(golf): ditto.
(miniruby): ditto.
($(arch_hdrdir)/ruby/dtrace.d): new target. preprocessed verson
of defs/dtrace.d. generated if necessary.
($(arch_hdrdir)/ruby/trace_dtrace.h): new target.
definition of probes.
($(LIBRUBY_DTRACE_OBJ)): new target. generated if dtrace needs
postprocessing.
($(DTRACE_OBJ)): ditto.
($(MINIDTRACE_OBJ)): ditto.
($(GOLFDTRACE_OBJ)): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
dln.c:dln_find_1().
* lib/mkmf.rb (def find_executable0): use EXECUTABLE_EXTS, not
only EXEEXT. [ruby-core:26821]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ruby without current libraries.
* common.mk (rdoc): use XRUBY.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c (mark_current_machine_context): get rid of warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (INSTALLDOC): enable if rdoc or doxygen are enabled.
* common.mk (docs): target to make documents.
* Makefile.in, win32/Makefile.sub (install-{all,nodoc}): trigger
by $(INSTALLDOC) from install.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (MKDIR_P): Set 'mkdir -p' to MKDIR_P
when AC_PROG_MKDIR_P doesn't set MKDIR_P.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
from version.h for cross-compiling.
* template/fake.rb.in (RUBY_VERSION, RUBY_DESCRIPTION): use above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24602 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
memory space for Solaris. a patch from Naohisa GOTO
<ngoto at gen-info.osaka-u.ac.jp> in [ruby-dev:39132].
[ruby-dev:39062]
* configure.in (SIZEOF_STRUCT_DIRENT_TOO_SMALL): Solaris dirent
check.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
_AC_COMPUTE_INT_COMPILE with cross compiling, since its arguments
have been changed at autoconf 2.64.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: new checking for dot and doxygen.
* template/Doxyfile.template: merged with Doxyfile.in.
configured some options.
* common.mk (capi): use $(DOXYGEN) instead of "doxygen".
(Doxyfile): removed a duplicate entry in the dependency.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
c.f. [ruby-core:23519].
(--with-ridir): new configure option.
* tool/instruby.rb (:doc, :rdoc): uses $ridir instead of
a fixed path.
* lib/rdoc/ri/paths.rb: follows $ridir.
* Makefile.in: removes RIDATADIR which is no longer used.
* bcc32/Makefile.sub: generates the 'ridir' entry for RbConfig.
removes RIDATADIR which is no longer used.
* win32/Makefile.sub: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
include/ruby/version.h, so need to tell to cpp to see
$(srcdir)/include. [ruby-core:23468]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
program base name. [ruby-dev:38241]
* configure.in (--with-soname): base name of shared library.
[ruby-dev:38290]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
result is need, to get rid of GREP_OPTIONS. [ruby-dev:38336]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c (proc_daemon): double fork to ensure not having ctty.
[ruby-core:23311]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (Makefile): works even if RUBY_INSTALL_NAME
contains macro.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
dir switches, and updated to use AS_HELP_STRING. patches from
Richard Brown, c.f. [ruby-core:23067].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (target): replaces cpu with arch by --with-arch.
* mkconfig.rb (TOPDIR): chops arch in config instead of
RUBY_PLATFORM which varies on universal_binary.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
when load_relative is not used on darwin. [ruby-dev:38182]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* include/ruby/ruby.h (NUM2INT, rb_special_const_p): returns true
and false instead of Qtrue and Qfalse for platforms where VALUE
is bigger than int.
* gc.c (gc_stress_set), ext/openssl/ossl_asn1.c (decode_bool): got
rid of variables named `bool'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
more calculation is needed.
* configure.in (RUBY_DEFINT): falls back to RUBY_CHECK_SIZEOF if
size is not immediate.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
pointer-arith, write-strings and shorten-64-to-32, but suppress
unused-parameter and missing-field-initializers, if possible.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
larger than long.
* file.c (rb_stat_blocks): struct stat.st_blocks may be larger
than long.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
relative to libruby_so.
* ruby.c (ruby_init_loadpath_safe): added the case using dladdr().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
the shell for make. configure likes bash but Makefile specifies
SHELL=/bin/sh.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
not to show RUBY_VERSION_MAJOR and so on.
* version.h (RUBY_LIB_VERSION): makes from RUBY_LIB_VERSION_STYLE.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
on cygwin and mingw because symbols are exported by def file.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
universal binary. replaced --enable-fat-binary option which
didn't work actually.
* configure.in (RUBY_FUNC_ATTRIBUTE): added conditional test.
* configure.in (ac_cv_type_getgroups): decalared because getgroups()
fills rest of the buffer with garbages on Rosetta.
* configure.in (alloca): defines only for powerpc, but always
create empty object to suppress ld warning.
* configure.in (LIBRUBY_DLDFLAGS): set compatibility version with
TEENY.
* configure.in (CFLAGS, LDFLAGS): separates ARCH_FLAG.
* configure.in (arch): renamed to "universal" from "fat".
* Makefile.in (ARCH_FLAG): added.
* include/ruby/defines.h (WORDS_BIGENDIAN): uses
AC_APPLE_UNIVERSAL_BUILD.
* missing/alloca.c (alloca): defines only if C_ALLOCA is defined.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e