* configure.in (CPPFLAGS): use -iquote for both /usr/include and
/usr/local/include, so that the order can be overridden later
with -I options.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* common.mk (COMMONOBJS): include $(DTRACE_OBJ) which is necessary
for $(DTRACE_DEPENDENT_OBJS).
* configure.in (RUBY_DTRACE_POSTPROCESS): separate whether dtrace
is needed to genearate probes.o and whether it modifies input
object files.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (RUBY_DTRACE_POSTPROCESS): check if the object file
is really modified by `dtrace -G`, this command is very system
dependent.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Makefile.in (VPATH, NEWLINE_C), common.mk (common-srcs): make
and use newline.c under enc/trans directory, not toplevel. no
longer search enc directory implicitly.
* configure.in, enc/Makefile.in (BUILTIN_ENCS, BUILTIN_TRANSES):
prefix respective directory names to builtin encodings and
transcoder source names.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: get rid of pattern substitution, which is not
supported by ash, and ash on NetBSD parses whole source first
and fails to start. [ruby-dev:48823] [Bug #10750]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/extmk.rb: move the default execluded extensions from
configure.in so that it works on win32 too.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (with-out-ext): exclude never available libraries
by default.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (NET_LUID): include winsock2.h instead of windows.h.
patch by Jon Forums in [ruby-core:67125]. [Bug #10640]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* dir.c (replace_real_basename): get the real name and replace the
base name with it by getattrlist(2) if available.
suggested by Matthew Draper at [ruby-core:67116]. [Bug #10015]
* dir.c (glob_helper): get the real name of the whole path, not
only the last name.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (NET_LUID): include also ifdef.h as a workaround of
a bug in mingw-w64 header. [ruby-core:67103] [Bug #10640]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (jemalloc): fix option argument, should use
`$withval` but not `yes` always. [ruby-core:66994] [Bug #10625]
* configure.in (jemalloc): defer adding the liner option to get
rid of linking contest against jemalloc, so that it works
without runtime dynamic load path.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (rb_cv_binary_elf): get rid of -e option of cat
which is not available on BusyBox, use tr instead.
[ruby-core:64824] [Bug #10210]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Moreover its error "make[1]: *** No rule to make target
`lib/unicode_normalize/tables.rb', needed by `srcs-lib'. Stop." is not
a good error message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (__builtin_setjmp): disable with gcc/clang earlier
than 4.3 on Mac OS X. [ruby-core:65174] [Bug #10272]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (nacl_cv_cpu_nick): fix typo in PNaCl.
(XCFLAGS) Add -isystem flag to pnacl and nacl-newlib
(CXX): added
* nacl/GNUmakefile.in (CXX): Added
(PPROGRAM): Use clang++ instead of clang because libnacl_io
depends on c++ std lib.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (XCFLAGS): Add include path for NaCl libraries.
(XLDFLAGS): ditto.
(NACL_LIB_PATH): new stubstitution
* nacl/nacl-config.rb: support NACL_LIB_PATH
* nacl/package.rb: ditto.
* nacl/pepper_main.c: replace old implementations with nacl_io.
* nacl/GNUmakefile.in: link nacl_io to pepper_ruby
* ruby.c (rb_load_file): remove __attribute__((weak)) because the old
override hack was replaced with nacl_io.
* file.c (rb_file_load_ok): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* common.mk (UNICODE_FILES): revert the rule that Unicode data
files depend on downloader target, and add missing dependency of
lib/unicode_normalize/tables.rb
* common.mk (after-configure): removed as srcdir should be
read-only after update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: try downloader only if BASERUBY is working. use
tarballs to build without BASERUBY.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
for getting precious number of available cpus.
* ext/etc/etc.c (etc_nprocessors): use etc_nprocessors_affinity if
possible.
[Feature #10267] etc-nprocessors-kosaki2.patch
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Note: Some of the fixes are for newlib in general but not NaCl-specific.
* include/ruby/intern.h (rb_fd_select): declare struct timeval, or the
struct gets local to the function in C99.
* file.c (#include): add nacl/stat.h for PNaCl.
(utimes): added a declaration for PNaCl.
(stat_atimespec): stat::st_atimensec is long long but
timespec::tv_nsec is long in PNaCl.
(stat_mtimespec, stat_ctimespec): ditto.
(rb_group_member): disable getgroups unless HAVE_GETGROUPS.
(eaccess): unify the fallback to generic defined(USE_GETEUID).
* io.c: include sys/time.h for struct timeval.
(rb_close_before_exec): nothing we can do if F_GETFD is not
available.
(ioctl): pnacl newlib actually doesn't have ioctl.
* process.c (maxgroups): it is used iff
defined(_SC_NGROUPS_MAX) || defined(NGROUPS_MAX) but not
defined(HAVE_GETGROUPS) || defined(HAVE_SETGROUPS).
(obj2gid): fail unless the object is a Fixnum if getgrnam is not
available.
(disable_child_handler_fork_child): sigaction is not available in
PNaCl newlib.
* configure.in (warnflags, strict_warnflags): avoid -ansi for strlcpy.
(rb_cv_gcc_atomic_builtins): also check
__atomic_or_etch because it is used in ruby_atomic.h.
(rb_cv_gcc_sync_builtins): ditto.
(HAVE_GETGRNAM): added.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (RUBY_NACL and others): Supports PNaCl.
* dln.c: replace the old hacky dynamic loading over HTTP with nacl_io.
* file.c: tenatively use access(2) instead of eaccess.
(rb_file_load_ok): weaken with attribute but not by postprocess.
* io.c (socket.h): now NaCl has socket.h
(flock): disable here instead of nacl/ioctl.h
* nacl/GNUmakefile.in (CC, LD, NM, AR, AS, RANLIB, OBJDUMP, OBJCOPY):
respect path to them if they are absolute.
This helps naclports to build ruby in their source tree.
(PROGRAM_NMF, .SUFFIXES): support .pnexe for PNaCl.
(ruby.o, file.o): move the hack to attributes in ruby.c and file.c
* nacl/ioctl.h: removed. move the hack to io.c.
* nacl/nacl-config.rb: support arm, pnacl and others.
* nacl/pepper_main.c: support build in a naclports tree.
* ruby.c (rb_load_file): weaken with attribute but not by postprocess.
The patch is by sbc@google.com and the Native Client Authors.
It is available at:
* 873ca4910a/ports/ruby/nacl.patch
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (__builtin_choose_expr_constant_p): in gcc 4.8 or
earlier, __builtin_choose_expr() does not consider
__builtin_constant_p(variable) a constant expression.
* include/ruby/ruby.h (RUBY_SAFE_LEVEL_CHECK): fix for older gcc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (RUBY_UNIVERSAL_ARCH): remove arch options from
CXXFLAGS, not only CFLAGS.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c (retry_fork_async_signal_safe): revert r47439 but
disable use of vfork on OS X instead, as it cause hang-up at
test_process.rb:test_deadlock_by_signal_at_forking with parallel
test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c (retry_fork_async_signal_safe): vfork may not work
with pthread always even if fork works with it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c (getresuid): Defined for AIX.
(getresgid): Ditto
AIX don't have getresuid/getresgid but getuidx/getgidx.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: check if prefix is same as the cwd, not only same
path name. also use AC_MSG_ERROR to bail out.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (jemalloc): check with JEMALLOC_MANGLE if not found
without the mangling.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (with_jemalloc): get rid of duplicated linker flags,
as AC_CHECK_LIB adds it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (--with-static-linked-ext): fix for extensions to
be linked statically.
* Makefile.in, common.mk: use ENCSTATIC for enc directory.
* ext/extmk.rb: supply dependencies of statically linked extension
libraries.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Makefile.in, configure.in (Makefile): extract RUBY_RELEASE_DATE from
version.h at each build time.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (rb_cv_scalar_pthread_t): pthread_t is not required
to be a scalar type.
* thread.c (fill_thread_id_string, thread_id_str): dump pthread_t
in hexadecimal form if it is not a scalar type, assume it can be
represented in a pointer form otherwise. based on the patch by
Rei Odaira at [ruby-core:62867]. [ruby-core:62857] [Bug #9884]
* thread_pthread.c (Init_native_thread, thread_start_func_1),
(native_thread_create): set thread_id_str if needed.
* vm_core.h (rb_thread_t): add thread_id_string if needed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (jemalloc): check for the header regardless drop-in
libjemalloc is found, for `malloc_conf` declaration.
* version.c (ruby_show_version): show `malloc_conf` if set.
[Feature #9113]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (with-jemalloc): also check for header, for ABIs
which JEMALLOC_MANGLE is needed, i.e., Mach-O and PE-COFF
platforms. [ruby-core:62939] [Feature #9113]
* include/ruby/missing.h: include alternative malloc header to
replace memory management functions.
* dln.c, io.c, parse.y, st.c: undef malloc family before
re-definition to suppress warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (rb_cv_typeof): no longer needed because of
AC_C_TYPEOF.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
about this variable being used before initialized. I looked at
the code and expanded the macro and turned out it was actually
USED for pointer arithmetic, not dereferenced. So this was
never a serious bug. But is annoying indeed to see warnings
every time. I added `=0` and all went healthy.
* configure.in: Also, I found that the problematic macro expansion
only happens when we lack __typeof__ C extension, which shall
not be the case of my compiler. I added AC_CTYPEOF to kick ass.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (RUBY_FUNC_ATTRIBUTE): show the attribute name in
the message if the macro name is not given. fix up r45608.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (ac_cv_func_{getcontext,setcontext}): do not
disable ucontext.h entirely, but disable use of functions only.
`ucontext_t` is necessary in the signal handler now.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: workaround for Info.plist to get rid of `dsymutil`
crash by wrong files in parent directories.
[ruby-core:62594] [Bug #9840]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (rb_cv_atan2_inf_c99): set `no` if atan2f and
atan2l are not available, and quote the result.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (install-capi): do not install C API documents by
default. [ruby-core:62557]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (RUBY_SETJMP_TYPE): check for setjmp type after
CCDLFLAGS is appended to CFLAGS, since __builtin_setjmp can be
affected. [ruby-core:62469] [Bug #9818]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* math.c (math_atan2): return values like as expected by C99 if
both two arguments are infinity. based on the patch by cremno
phobia <cremno AT mail.ru> in [ruby-core:62310]. [Feature #9799]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
is supported on AIX, HP-UX, and Solaris, by using the value of
struct statvfs.f_basetype.
* configure.in (HAVE_STRUCT_STATVFS_F_BASETYPE): check struct
statvfs.f_basetype which is available on AIX, HP-UX, and Solaris.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
to support OpenBSD.
* file.c (statfs_type): use above macro to switch.
* file.c (statfs_inspect): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: on NetBSD fstatfs is obsoleted.
* file.c: support NetBSD for File::Statfs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (rb_cv_func___builtin_unreachable): try with an
external variable not only by a warning, which might not be
shown due to the optimization. [ruby-core:61647] [Bug #9665]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: check if fsid_t is defined.
* file.c (statfs_fsid): fsid_t may not be defined, assume long in
that case.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (rb_cv_getcwd_malloc): check if getcwd allocates
buffer if NULL is given [ruby-core:62072] [Bug #9752]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: get rid of __builtin_setjmp/__builtin_longjmp on
x64-mingw, which causes SEGV with callcc.
[ruby-core:61887] [Bug #9710]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (ac_cv_func___builtin_setjmp): get rid of a bug in
clang 3.3 and 3.4, which __builtin_setjmp() causes fatal error
in backend, linker error, or segmentation fault.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (ac_cv_func___builtin_setjmp): should not skip
flags restoration in RUBY_WERROR_FLAG by `break`.
[ruby-dev:48086] [Bug #9698]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (ac_cv_func___builtin_setjmp): use the first cast
which works with __builtin_longjmp(). [Bug #9692]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (ac_cv_func___builtin_setjmp): gcc 4.9 disallows a
variable as the second argument of __builtin_longjmp().
[ruby-core:61800] [Bug #9692]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: Fix a build problem with clang and --with-opt-dir.
If ruby is configured with --with-opt-dir=dir when using clang
as compiler, a warning `clang: warning: argument unused during
compilation: '-I dir'` is emitted almost every time clang
compiles a file. Unfortunately, RUBY_CHECK_PRINTF_PREFIX takes
any output from the compiler as fatal error, and the check thus
fails due to the warning. This is an attempt to fix the problem
by adding a flag -Qunused-arguments to CFLAGS locally in the
function to suppress the warning. [ruby-dev:48062] [Bug #9658]
[Fixes GH-571] https://github.com/ruby/ruby/pull/571
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (os_version_style): get default style from
`/usr/bin/ruby` if possible.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (DLDFLAGS): insert a space between option and its
argument for non-GCC compilers. [ruby-core:61429] [Bug #9624]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (DLDFLAGS): check for each options to control
symbol resolution. [ruby-core:61429] [Bug #9624]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* addr2line.c (fill_lines): show the line number in C backtrace if
ruby is built without --enable-shared (PIE) on Linux.
patch is originally by Shinichiro Hamaji
https://twitter.com/shinh/status/441957774264504321
NOTE: ld doesn't insert __executable_start for PIE.
dladdr(3)'s argument must be a function pointer.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (rb_cv_architecture_available): check whether
__ARCHITECTURE__ is available before replacing CFLAGS.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (PACKED_STRUCT_UNALIGNED): fix typo. Intel x86
cpus are called x86 or i386 etc, not x386.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (PACKED_STRUCT_UNALIGNED): use on x64-mingw too.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
struct time_object shrinks from 88 to 46 bytes on my 64-bit system.
* configure.in: use -Wno-packed-bitfield-compat for GCC 4.4+
use __attribute__((packed)) if available
* timev.h: shrink and pack struct vtm
* time.c: pack struct time_object and adjust/introduce helpers
[ruby-core:60794]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: check if pthread_setname_np is available.
* thread_pthread.c: pthread_setname_np is not available on old
Darwins. [ruby-core:60524] [Bug #9492]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: add qouting brackets and append wildcard for the
rest after target_cpu, to properly detect platform for SSE2
instructions. [ruby-core:60576] [Bug #8358]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
BSD version has different prototype.
* util.h: use qsort_r() as ruby_qsort() if it is GNU version.
* util.c: define ruby_qsort() if needed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: ISO9899:1999 is necessary for strtoll() on FreeBSD
10, (and may be possibly other platforms).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: use SSE2 instructions to drop unexpected precisions on
other than mingw. [ruby-core:59472] [Bug #8358]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (RPATHFLAG): use -rpath if -R is not available.
* configure.in (LIBRUBY_RPATHFLAGS): use RPATHFLAG instead of
hardcoded -R option.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: reset LDFLAGS and DLDFLAGS for opt-dir again after
LIBPATHFLAG and RPATHFLAG are set. [ruby-dev:47868] [Bug #9317]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: use SSE2 instructions for drop unexpected
precisions. [ruby-core:54738] [Bug #8358]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: let mingw do something black-magic, and check if
_gmtime64_s() is available actually.
* win32/win32.c (gmtime_s, localtime_s): use _gmtime64_s() and
_localtime64_s() if available, not depending on very confusing
mingw variants macros. based on the patch by phasis68 (Heesob
Park) at [ruby-core:58764]. [ruby-core:58391] [Bug #9119]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: DLDFLAGS is defined in --with-opt-dir handler, so
${DLDFLAGS=} does not work now. use RUBY_APPEND_OPTIONS instead.
[ruby-dev:47855] [Bug #9256]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (RUBY_APPEND_OPTION, RUBY_APPEND_OPTIONS),
(RUBY_PREPEND_OPTION, RUBY_PREPEND_OPTIONS): remove option
lists, which can be multiple lines, from generated comments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (RUBY_DTRACE_POSTPROCESS): $CPPFLAGS is also needed
to compile.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (opt-dir): move so that it can affect in configure
not only after rbconfig.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (RUBY_DTRACE_POSTPROCESS): Fix compatibility with
systemtap on linux. stap requires `dtrace -G` post-processing, but
the dtrace compatibility wrapper is very strict about probes.d
syntax.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (rubylibprefix): replace exec_prefix as well as
bindir and libdir. a patch by kimuraw (Wataru Kimura) at
[ruby-dev:47852]. [Bug #9160]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: check malloc_size() available on BSD.
* gc.c: use malloc_size() with malloc/malloc.h on BSD.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* hash.c (rb_hash_keys): use st_keys() for performance improvement
if st_data_t and VALUE are compatible.
* st.h: define macro ST_DATA_COMPATIBLE_P() to predicate whether
st_data_t and passed type are compatible.
* configure.in: check existence of builtin function to use in
ST_DATA_COMPATIBLE_P().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
__sync family are legacy functions now and it is recommended
that new code use the __atomic functions.
http://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html
* configure.in: check existence of __atomic functions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
malloc_usable_size() is defined by malloc_np.h on FreeBSD.
* configure.in: check malloc.h and malloc_np.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c (vm_xrealloc, vm_xfree): use malloc_usable_size() to obtain old
size if available.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (--with-os-version-style): option to transform target
OS version string.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
compiling.
[ruby-core:58391] [Bug #9119] Reported by Luis Lavena.
Analyzed by Heesob Park.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: check if the given CFLAGS and LDFLAGS are working, and
bail out early if not.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/win32.c (console_emulator_p): check by comparison between
module handle of WriteConsoleW and kernel32.dll.
* configure.in, win32/Makefile.sub, win32/setup.mak: no longer need
psapi.lib.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in, Makefile.in (RUNRUBY_COMMAND): separate from RUNRUBY,
to use options for runruby.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (RUBY_CHECK_SIGNEDNESS): macro to check signedness of a
type.
* configure.in (size_t): must be unsigned.
[ruby-core:57149] [Feature #8890]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (RUNRUBY): append -- only after runruby.rb, not
cross-compiling baseruby, so that $(RUN_OPT) can be command line
options. [ruby-dev:47703] [Bug #8893]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (SOLIBS): LIBRUBY_SO also needs linking with gmp, to
run worker processes in test-all on non-ELF platforms.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
(bary_mul_gmp): New function.
(bary_mul): Use bary_mul_gmp.
(bigsq): Use different threshold with GMP.
* configure.in: Detect GMP.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (clock_gettime): should not overwrite cache variable
with different condtion. otherwise -lrt is not linked and the link
fails, after reconfig.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (clock_gettime): need to check with -lrt prior to check
for the function only. otherwise -lrt is not linked and the link
fails, when ac_cv_func_clock_gettime is cached as yes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This is accepted in the meeting:
https://bugs.ruby-lang.org/projects/ruby/wiki/DevelopersMeeting20130809
This method is accepted as a CRuby feature.
I.e. Other Ruby implementations don't need to implement it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: use the result of AC_CHECK_LIB(rt, clock_gettime) as
clock_gettime.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* file.c (rb_str_normalize_ospath): normalize to Normalization Form C
using CFString.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* include/ruby/ruby.h: use strcasecmp() as st_strcasecmp() if it
exists.
* st.c (st_strcasecmp): define the function only if strcasecmp()
doesn't exist.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
(nlz32): Use __builtin_clz or __builtin_clzl if possible.
(nlz64): Use __builtin_clzl or __builtin_clzll if possible.
(nlz128): Use __builtin_clzll if possible.
* configure.in: Check __builtin_clz, __builtin_clzl and
__builtin_clzll.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
__builtin_bswap64.
* internal.h (swap32): Use the configure result for the condition to
use __builtin_bswap32.
(swap64): Use the configure result for the condition to use
__builtin_bswap64.
* bignum.c (ones): Use the configure result for the condition to use
__builtin_popcountl.
(bary_unpack_internal): Use appropriate types for swap argument.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (RUBY_DTRACE_POSTPROCESS): dtrace version SUN D 1.11
introduces a check in the dtrace compiler to ensure that probes
actually exist. If there are no probes, then the -G step will
fail. As this test is only being used to determine whether -G is
necessary (for instance, on OSX it is not), adding a real probe to
the conftest allows it to succeed on newer versions of dtrace.
Patch by Eric Saxby <sax AT livinginthepast.org> at
[ruby-core:55826]. [Fix GH-351], [Bug #8606].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* include/ruby/defines.h (BDIGIT_DBL): Use uint128_t if it is available.
(BDIGIT): Use uint64_t if uint128_t is available.
(SIZEOF_BDIGITS): Defined for above case.
(BDIGIT_DBL_SIGNED): Ditto.
(PRI_BDIGIT_PREFIX): Ditto.
* include/ruby/ruby.h (PRI_64_PREFIX): Defined.
* bignum.c (rb_big_pow): Don't use BITSPERDIG for the condition which
rb_big_pow returns Float or Bignum.
[ruby-dev:47413] [Feature #8509]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: revert r41106. size_t may not be unsigned
* bignum.c (rb_absint_size_in_word, rb_int_export, rb_int_import): use
NUM2SIZET() and SIZET2NUM() already defined in ruby/ruby.h.
* ext/-test-/bignum/export.c (rb_int_export_m): ditto.
* ext/-test-/bignum/import.c (rb_int_import_m): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
is only used from dir.c and it doesn't need readdir_r().
* configure.in (SIZEOF_STRUCT_DIRENT_TOO_SMALL): remvoed. It is
only used for readdir_r.
* dir.c: removes NAME_MAX_FOR_STRUCT_DIRENT. It is not right way
to detect maximum length of path len. POSIX require to use
fpathconf(). IOW, it might have lead to make a vulnerability
using stack smashing. Moreover, readdir() works enough for our
usage.
* dir.c (READDIR): removes an implementation which uses
readdir_r() and parenthesize in a macro body correctly.
* dir.c (dir_read): removes IF_HAVE_READDIR_R(DEFINE_STRUCT_DIRENT
entry), it is used only for readdir_r().
* dir.c (dir_each): ditto.
* dir.c (glob_helper): ditto.
* dir.c (READDIR): removes entry and dp argument.
* dir.c (dir_read): adjust for the above change.
* dir.c (dir_each): ditto.
* dir.c (glob_helper): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (HAVE_ATTRIBUTE_FUNCTION_ALIAS): define to tell if
alias attribute is available.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (LIBRUBY_RPATHFLAGS): do not append -L option with
runtime library directory if cross compiling, but only -R option.
runtime path makes no sense on the host system. [ruby-dev:47363]
[Bug #8443]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (setjmp-type): check if setjmpex() is really available.
workaround for i686-w64-mingw32 which declares it but lacks its
definition.
* include/ruby/defines.h: include setjmpex.h only if also setjmpex()
is available.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (setjmp-type): use setjmpex() on w64-mingw32 to get rid
of -Wclobbered warnings.
* include/ruby/defines.h: include setjmpex.h here becase setjmp.h is
included from win32.h via intrin.h, winnt.h, and so on.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
C compiler.
The C compiler of Sun Studio C emits "Warning: Option -qversion
passed to ld, if ld is invoked, ignored otherwise" and exit
successfully.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* template/verconf.h.in: generate verconf.h from the template and
rbconfig.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (RUBY_PLATFORM): move to config.h as needed by
version.c.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: save configured load path values into verconf.in.
* common.mk (verconf.h): create from verconf.in with shvar_to_cpp.rb.
* tool/shvar_to_cpp.rb: turn shell variables into C macros.
[Bug #7959]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
emulate getipaddrs(3) on Unix.
* win32/Makefile.sub, configure.in (LIBS): need iphlpapi.lib for above
function.
* include/ruby/win32.h (socketpair): rb_w32_socketpair() doesn't
substitute for any function, so use non-prefixed name.
* ext/socket/extconf.rb (socketpair); follow above change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: adds RUBY_REPLACE_TYPE(off_t) for creating
NUM2OFFT.
* file.c (rb_file_truncate): use correct type. chsize() take
a long.
* include/ruby/ruby.h (NUM2OFFT): use a definition created by
a configure script by default.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ftello64). They are not used from anywhere.
* win32/win32.c (fseeko): removes.
* win32/win32.c (rb_w32_ftello): removes.
* include/ruby/win32.h: removes declarations of rb_w32_ftello and
rb_w32_fseeko.
* win32/Makefile.sub: removes '#define HAVE_FTELLO 1'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
the main C library.
glibc 2.17 moves clock_* from librt to the main C library.
http://sourceware.org/ml/libc-announce/2012/msg00001.html
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: should not strip newline at the beginning for the
default link command.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (RUBY_RM_RECURSIVE): this hack is needed by only
autoconf 2.69 or earlier on darwin.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e