Граф коммитов

1121 Коммитов

Автор SHA1 Сообщение Дата
nobu 3636f8c0f5 configure.in: check CFLAGS and LDFLAGS
* 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
2013-10-22 03:11:20 +00:00
nobu d66c5768ca win32.c: check by module handles
* 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
2013-10-17 08:11:21 +00:00
nobu 380e40af96 configure.in: fix for non-GNU-make
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-17 05:40:57 +00:00
nobu 23932b91a9 configure.in: fix FIRSTMAKEFILE config
* configure.in (FIRSTMAKEFILE): AC_CONFIG_FILES needs the file
  arguments separating by a colon literally.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-17 02:56:22 +00:00
nobu 3bb86ae462 cont.c: split conditions
* cont.c (FIBER_USE_NATIVE): split long conditions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-07 13:45:31 +00:00
nobu 9e3eb50212 configure.in: add mingw FIBER_USE_NATIVE
* configure.in (FIBER_USE_NATIVE): add mingw condition.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-07 13:19:02 +00:00
nobu 4549879579 configure.in: move FIBER_USE_NATIVE conditions
* configure.in, win32/Makefile.sub (FIBER_USE_NATIVE): move conditions
  from cont.c

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-07 12:03:58 +00:00
nobu 886e3bb1df win32.c: disable console colorizing
* win32/win32.c (console_emulator_p, constat_handle): disable built-in
  console colorizing when console-emulator-like DLL is injected.
  [Feature #8201]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-03 09:20:51 +00:00
nobu 3eef1b54ef configure.in: RUNRUBY_COMMAND
* 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
2013-09-30 07:07:06 +00:00
nobu e6a317bf6c configure.in: size_t must be unsigned
* 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
2013-09-12 13:40:06 +00:00
nobu 5397a25634 configure.in: fix cross-compiling installation failure
* 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
2013-09-11 08:30:48 +00:00
akr f43d9e22f6 * configure.in: Define ac_cv_func_clock_getres to yes for mingw*.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-06 13:49:55 +00:00
mrkn 301cb9ca99 * configure.in (with_gmp): set with_gmp no if it is empty.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-05 03:50:07 +00:00
nobu fdf04ce67e configure.in: libruby needs gmp
* 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
2013-09-04 02:11:38 +00:00
akr 23da5a785e * process.c (rb_clock_getres): New method.
(timetick2dblnum_reciprocal): New function.

* configure.in: Check clock_getres.

[ruby-core:56780] [Feature #8809] accepted at
DevelopersMeeting20130831Japan
https://bugs.ruby-lang.org/projects/ruby/wiki/DevelopersMeeting20130831Japan



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-31 13:21:48 +00:00
akr 83a0709174 * bignum.c: Use GMP to accelerate big Bignum multiplication.
(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
2013-08-31 12:17:18 +00:00
nobu e6ece12201 configure.in: check for sys/pstat.h
* configure.in (sys/pstat.h): fix missing header check for
  missing/setproctitle.c on HP-UX.  [ruby-core:56644] [Bug #8792]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-28 02:25:04 +00:00
nobu 5784aaf15d configure.in: clock_t
* configure.in (clock_t): needs time.h.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-23 13:07:59 +00:00
akr 3873e09cad * process.c (unsigned_clock_t): Defined.
(rb_clock_gettime): Consider clock_t overflow for
  ISO_C_CLOCK_BASED_CLOCK_PROCESS_CPUTIME_ID.

* configure.in: Check the size of clock_t.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-22 11:19:49 +00:00
akr 2df40d4d18 * configure.in: Define ac_cv_func_clock_gettime to yes for mingw*.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-19 16:20:40 +00:00
nobu a3b4296369 configure.in: clock_gettime
* 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
2013-08-19 04:03:22 +00:00
akr 5da36600a1 * configure.in: Revert r42604. It causes linking librt on systems
with newer glibc uselessly.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-18 05:26:47 +00:00
nobu e7ad242663 configure.in: clock_gettime
* 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
2013-08-18 03:41:56 +00:00
akr 93bb48995c * process.c (rb_clock_gettime): New method.
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
2013-08-11 02:59:30 +00:00
akr 55b6fff737 * configure.in: Revert r42458.
It removes the HAVE_CLOCK_GETTIME from config.h.
  http://www.rubyist.net/~akr/chkbuild/debian/ruby-trunk/log/20130809T044800Z.diff.html.gz



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-10 16:59:58 +00:00
nobu 6e563a4ecc configure.in: CoreFoundation framework option
* configure.in (XLDFLAGS, LIBRUBYARG_STATIC): CoreFoundation framework
  option is now needed always, regardless enable-shared.
  [ruby-core:56467] [Bug #8759]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-09 13:51:13 +00:00
nobu f67c1b0a12 configure.in: clock_gettime
* 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
2013-08-09 04:42:44 +00:00
nobu c04f402f0f file.c: normalize Form C
* 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
2013-08-09 03:06:53 +00:00
glass 867876ab9b * string.c (rb_str_rindex): performance improvement by using
memrchr(3).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-31 08:47:13 +00:00
akr 028d67b924 Fix a typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-19 03:06:12 +00:00
glass 13a1fd6d82 * configure.in: revert r42008. strcasecmp() uses the current locale.
* include/ruby/ruby.h: ditto.

* st.c (st_strcasecmp): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-16 12:49:01 +00:00
glass a0d9bd4445 * configure.in: check strcasecmp().
* 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
2013-07-16 12:13:19 +00:00
akr 150b265502 * bignum.c (nlz16): Use __builtin_clz if possible.
(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
2013-07-15 01:49:32 +00:00
akr 508669b6da * bignum.c (power_cache_get_power): Use bitsize insteadof ceil_log2.
(ones): Removed.
  (next_pow2): Removed.
  (floor_log2): Removed.
  (ceil_log2): Removed.

* configure.in (__builtin_popcountl): Don't check.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-15 00:46:00 +00:00
akr 240f3056aa * configure.in: Check __builtin_popcountl, __builtin_bswap32 and
__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
2013-07-14 14:28:33 +00:00
nobu 2114ad42da configure.in: check exit statuses
* configure.in (RUBY_DTRACE_POSTPROCESS): check exit statuses of
  commands.  [Bug #8606]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-07 02:01:27 +00:00
nobu 2b5f033cb5 configure.in: correctly tests dtrace -G in version 1.11
* 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
2013-07-07 02:01:07 +00:00
akr 1a6a65f16b * configure.in: Check __int128.
* 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
2013-06-18 09:46:01 +00:00
nobu 632ed84cf1 * configure.in: download missing config files.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-14 05:10:17 +00:00
nobu f28ec8da8c no alternate value expansion
* configure.in (opt-dir), tool/ifchange: get rid of "alternate value"
  expansion for legacy sh.  [ruby-dev:47420] [Bug #8524]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-13 12:30:24 +00:00
nobu 5713c59531 win32.c: NET_LUID
* configure.in: check for NET_LUID.  header macro varies across
  complier versions.
* win32/win32.c: use configured macro.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-08 05:17:04 +00:00
nobu 147775ac2b use NUM2SIZET and SIZET2NUM
* 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
2013-06-07 02:41:45 +00:00
akr 9fea8758e9 * configure.in: Invoke RUBY_REPLACE_TYPE for size_t.
Don't invoke RUBY_CHECK_PRINTF_PREFIX for size_t to avoid conflict
  with RUBY_REPLACE_TYPE.

* internal.h (rb_absint_size): Declared.
  (rb_absint_size_in_word): Ditto.
  (rb_int_export): Ditto.

* bignum.c (rb_absint_size): New function.
  (rb_absint_size_in_word): Ditto.
  (int_export_fill_dd): Ditto.
  (int_export_take_lowbits): Ditto.
  (rb_int_export): Ditto.

* pack.c (pack_pack): Use rb_int_export for BER compressed integer.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-06 11:57:35 +00:00
kosaki 523bd6737e * configure.in: removes AC_CHECK_FUNCS(readdir_r). readdir_r()
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
2013-06-02 22:38:11 +00:00
nobu 58bec3e2cb configure.in: HAVE_ATTRIBUTE_FUNCTION_ALIAS
* 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
2013-05-31 07:36:19 +00:00
nobu d3298468d0 configure.in: no runtime path to -L
* 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
2013-05-24 02:04:27 +00:00
nobu 9c0ff0c1c8 configure.in: setjmpex
* 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
2013-05-18 16:40:10 +00:00
nobu 344db69c45 configure.in: setjmpex
* 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
2013-05-18 14:57:59 +00:00
akr fbe45fdfa2 * configure.in: Consider error messages to find out version option of
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
2013-05-17 09:10:16 +00:00
nobu 49d37e6edc verconf.h: fix for default prefix
* configure.in, template/verconf.h.in (RUBY_EXEC_PREFIX): fix for
  default prefix.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-16 07:15:48 +00:00