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

1431 Коммитов

Автор SHA1 Сообщение Дата
nobu a995195d78 configure.in: enum_over_int
* configure.in (enum_over_int): check if enum over int is allowed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-13 02:01:22 +00:00
nobu 161cee3c48 configure.in: BOOTSTRAPRUBY version
* configure.in (BOOTSTRAPRUBY): avoid too old versions.  current
  fileutils.rb does not work with 1.8 or older, because of the
  return values of Module#singleton_methods and so on.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-07 15:35:26 +00:00
nobu 91cdbaf44b revert r51752
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-03 16:30:20 +00:00
nobu dc482e1428 configure.in: BASERUBY needs fake.rb
* configure.in (BOOTSTRAPRUBY): BASERUBY needs fake.rb to load
  rbconfig.rb.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-03 15:38:13 +00:00
nobu d4a642defc configure.in: use BASERUBY
* configure.in (BOOTSTRAPRUBY): use BASERUBY if available.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-03 14:27:31 +00:00
nobu 597da7b2d0 win32.c: fake lchown
* win32/win32.c (lchown, rb_w32_ulchown): fake lchown.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-26 05:21:41 +00:00
nobu 2e5c105ff2 win32.c: symlink
* 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-24 21:34:45 +00:00
nobu 9d10f9ee8f configure.in: RUBY_TYPE_ATTRIBUTE
* configure.in (RUBY_TYPE_ATTRIBUTE): attribute declaration for
  types.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-27 23:48:40 +00:00
nobu d85096ad45 compressed mantypes
* configure.in (--with-mantype): add compressed mantypes.

* tool/rbinstall.rb (man): compress man pages if specified.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-10 12:49:55 +00:00
nobu 93446fedd3 io.c: reopen OS encoding path
* io.c (rb_io_reopen): freopen(3) with OS encoding path.
  [ruby-core:69780] [Bug #11320]
* win32/file.c (rb_freopen): wrapper of wchar version freopen(3).
  use _wfreopen_s() if available.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-30 08:28:28 +00:00
ngoto d47a2b5712 * configure.in: not to use vfork on Solaris to avoid deadlock
occurred in vfork(2) with multi-threading and dynamic linker
  on Solaris. [Bug #11265] [ruby-dev:49089]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-25 10:42:37 +00:00
naruse 370bd884bc * configure.in: define SET_THREAD_NAME if it has pthread_set_name_np
for FreeBSD, and don't define it if both pthread_setname_np
  and pthread_set_name_np don't exist.

* thread_pthread.c (SET_THREAD_NAME): don't define if they don't exist.

* thread_pthread.c (native_set_thread_name): run if SET_THREAD_NAME
  is defined.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-11 06:56:57 +00:00
akr 2f9b7898f6 * configure.in: Don't check __int128.
* ext/rbconfig/sizeof/extconf.rb: Check __int128.

* ext/rbconfig/sizeof/depend: sizes.c depends on
  ext/rbconfig/sizeof/extconf.rb.

* template/sizes.c.tmpl: Detect check_sizeof.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-03 12:00:50 +00:00
naruse d1a3f716e9 * configure.in (RUBY_DTRACE_POSTPROCESS): cmp -b is GNU extension.
darwin uses GNU cmp, and FreeBSD and Solaris are not.
  Note that accidentally equals to expected result.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-21 11:39:15 +00:00
nobu 408885c891 configure.in: DEPRECATED_BY
* configure.in (DEPRECATED_BY): deprecate warning with preferable
  alternative.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-20 04:16:46 +00:00
nobu 814b83918e configure.in: attribute arguments
* configure.in (RUBY_FUNC_ATTRIBUTE): allow attribute arguments in
  the macro.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-20 04:15:40 +00:00
nobu 50732b7b6e configure.in: pop macro
* configure.in (RUBY_FUNC_ATTRIBUTE): pop definition of macro
  `attrib_code`.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-20 04:13:05 +00:00
nobu 75319221a2 dln.c: fix EXTERNAL_PREFIX
* configure.in (EXPORT_PREFIX): revert r50410.

* dln.c (EXTERNAL_PREFIX): define by predefined macros.
  configured EXPORT_PREFIX is different thing.

* win32/Makefile.sub: r50414-50415.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-01 07:27:03 +00:00
nobu 70abda7e44 dln.c: use EXPORT_PREFIX
* configure.in (EXPORT_PREFIX): define exported symbol prefix
  string in config.h.

* dln.c (FUNCNAME_PREFIX): use configured EXPORT_PREFIX, not
  hardcoded condition.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-01 04:29:20 +00:00
nobu 9e459f7aa9 dir.c: getattrlist on OSX 10.5
* dir.c (need_normalization): use getattrlist() if fgetattrlist()
  is unavailable, on OSX 10.5.  [ruby-core:68829] [Bug #11054]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-10 14:57:47 +00:00
nobu 51bcbca236 rbconfig.rb: use program version
* common.mk, tool/mkconfig.rb: check the running ruby version in
  rbconfig.rb with the program version, as RUBY_VERSION has never
  been affected by --with-ruby-version option.
  [ruby-core:68639] [Bug #11002]
* configure.in (LIBRUBY_DLDFLAGS): compatibility_version must be
  valid version numbers, not an arbitrary string.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-02 07:27:12 +00:00
naruse c8e2ccec86 Revert r50122 "* configure.in: ac_cv_func_vfork=no on sparc-solaris."
fork(2) is also deprecated...

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-30 09:27:15 +00:00
naruse dcf8ddfb01 * configure.in: ac_cv_func_vfork=no on sparc-solaris.
sparc-solaris deprecates vfork though i386-solaris doesn't.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-30 07:36:54 +00:00
nobu c57932f782 win32.c: readlink
* win32/win32.c (wreadlink, rb_w32_ureadlink): implement readlink().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-23 08:36:04 +00:00
nobu f5b96e594c win32.c: w32_lstati64
* win32/win32.c (winnt_stat): stat with following symbolic links.
* win32/win32.c (winnt_lstat): rename old winnt_stat, which does
  not follow symbolic links.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-23 05:40:48 +00:00
nobu 663eefcb6f Makefile.in: CONFIGURE
* Makefile.in (CONFIGURE): make configure script name selectable.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-19 02:04:31 +00:00
nobu 5a62fdee4d vm_dump.c: check procstat_getvmmap
* configure.in: check also procstat_getvmmap, which is not
  available on FreeBSD 9.  [ruby-core:68468] [Bug #10954]
* vm_dump.c (procstat_vm): use kinfo_getvmmap instead if
  procstat_getvmmap is not available.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-11 04:28:51 +00:00
nobu e9f3a59e85 configure.in: BOOTSTRAPRUBY
* configure.in (BOOTSTRAPRUBY): baseruby if cross compiling or
  miniruby, anyway runnable ruby command.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-07 02:06:06 +00:00
ngoto 2e522aec8f * configure.in: set PRELOADENV in Solaris to avoid "wrong ELF class" error.
[Bug #10926] [ruby-dev:48888]
* configure.in: set LIBPATHENV for 32-bit compile in Solaris in addition
  to 64-bit.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-02 16:06:08 +00:00
nobu 575d4a3069 configure.in: _setjmp only if _longjmp is found
* configure.in: do not check _setjmp unless _longjmp is available,
  so that configure results will not be changed by cache.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-02 06:36:12 +00:00
nobu ad0e8beb8c configure.in: remove extra unsigned
* configure.in (RUBY_REPLACE_TYPE): restore unsigned type from
  cached variable only if the target type is not available.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-02 05:44:59 +00:00
nobu f2c8ac3f1a configure.in: restore unsignedness
* configure.in (RUBY_REPLACE_TYPE): restore unsigned type from
  cached variable.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-02 02:43:10 +00:00
nobu ee4cb17b98 configure.in: restore convertible type
* configure.in (RUBY_REPLACE_TYPE): restore convertible type from
  cached variable, so that configured results will be stable.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-01 11:21:18 +00:00
nobu ea2d631a76 configure.in: check broken memmem before earlier
* configure.in (rb_cv_broken_memmem): check before adding the
  result HAVE_MEMMEM macro to confdefs.h, so that configured
  results will be stable.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-01 09:10:36 +00:00
nobu 68c062b1f0 configure.in: PRELOADENV
* configure.in (PRELOADENV): platform specific environment to
  pre-load the given shared libraries.

* tool/runruby.rb: use config['PRELOADENV'] instead of hardcoded
  LD_PRELOAD.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-26 08:01:54 +00:00
nobu fefdad109a configure.in: check USDT headers
* configure.in (RUBY_DTRACE_AVAILABLE): try compile to see if
  headers are available too.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-26 00:48:10 +00:00
nobu 556515bf69 Makefile.in: make static IDs symbols local
* Makefile.in (LIBRUBY_SO): make symbols for static IDs which
  begin with ruby_static_id_ local too.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-23 07:05:23 +00:00
nobu 1917960510 configure.in: refine __builtin_choose_expr check
* configure.in (__builtin_choose_expr): check more precisely the
  results.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-16 05:14:48 +00:00
nobu 0605e80c9d configure.in: no redundant library path
* configure.in (LDFLAGS): exclude /usr/lib from appendant library
  path list, which should be redundant.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-12 02:04:17 +00:00
nobu 9f94dfebad configure.in: trailing spaces
* configure.in (CFLAGS, LDFLAGS): do not append trailing spaces.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-12 02:02:57 +00:00
nobu 5e868b2bca configure.in: add -L options
* configure.in (LDFLAGS): add -L options for library directories
  corresponding to default include directories, as gcc does not
  prepend duplicate directories.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-11 06:50:24 +00:00
nobu 8c5f818639 configure.in: iquote /usr/local/include
* 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
2015-02-10 22:24:24 +00:00
nobu 6f2a41e995 configure.in: use /usr/include
* configure.in (CPPFLAGS): override /usr/local/include by
  /usr/include, unless explicitly /usr/local is given.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-10 08:30:02 +00:00
nobu 57e60d1f10 Makefile.in: do not rebuild unnecessarily
* Makefile.in (probes.stamp): rebuild dtrace dependent objects
  only when `dtrace -G` modifies its input files.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-04 02:12:45 +00:00
nobu 1b11ba706d common.mk: link DTRACE_OBJ
* 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
2015-01-30 11:45:29 +00:00
nobu ec723e30bc configure.in: check dtace -G
* 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
2015-01-26 08:14:17 +00:00
nobu 79cab4f31e configure.in: -Wno-maybe-uninitialized
* configure.in (warnflags): add -Wno-maybe-uninitialized for gcc
  5, to suppress false warnings in thread.c:do_select().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-26 07:20:34 +00:00
nobu fbbf3afc11 builtin encodings and transcoder locations
* 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
2015-01-18 03:56:52 +00:00
nobu 748372be97 configure.in: no pattern substitution
* 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
2015-01-17 14:42:30 +00:00
nobu ae752cc546 extmk.rb: default without-ext
* 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
2015-01-11 04:44:09 +00:00
nobu 787af09e4e configure.in: Remove superfluous semicolon
* configure.in (RUBY_SETJMP_TYPE): Remove superfluous semicolon
  which causes a syntax error with autoconf 2.63.
  [ruby-core:67429] [Bug #10716]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-09 01:57:11 +00:00
nobu 42c2cc7c57 configure.in: default excluded libraries
* 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
2014-12-28 14:17:42 +00:00
nobu e13315da2f configure.in: include winsock2.h
* 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
2014-12-25 08:27:09 +00:00
nobu 0ebfc6f216 dir.c: replace_real_basename
* 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
2014-12-25 06:36:18 +00:00
nobu 44e0cd19df configure.in: workaround of mingw-w64
* 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
2014-12-25 04:59:20 +00:00
nobu 65cc2e8374 configure.in: fix jemalloc option
* 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
2014-12-20 23:35:33 +00:00
nobu 9701d08d1f configure.in: fix fox BusyBox
* 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
2014-12-18 08:45:28 +00:00
nobu 7dc4bbc140 configure.in: rb_cv_mcontext_t_ptr
* configure.in (rb_cv_mcontext_t_ptr): abstract whether mcontext_t
  is a pointer type.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-13 08:59:54 +00:00
nobu deba55eb1a configure.in: fix --with-ruby-version [ci skip]
* configure.in (RUBY_LIB_VERSION): Fix --with-ruby-version
  configuration option.  get rid of quoting in config.status.
* template/verconf.h.tmpl: quote RUBY_LIB_VERSION here.
  [ruby-core:66724] [Bug #10572]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-05 21:14:25 +00:00
nobu 38f3708fc1 configure.in: add --with-setup option
* configure.in (--with-setup): add option to select ext/Setup file.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-27 20:10:26 +00:00
nobu 28ad79fac3 dmyenc.c: separate
* dmyenc.c (Init_enc): separate from dmyext.c for statically
  linked extension excluding encoding libraries.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-27 20:02:32 +00:00
nobu 1cede1dab2 reaply r48278
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-06 10:53:04 +00:00
naruse 8d00496911 Revert r48278 "common.mk: update unicode data only if BASERUBY is available"
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
2014-11-06 05:46:43 +00:00
nobu ef8139db13 common.mk: update unicode data only if BASERUBY is available
* common.mk (lib/unicode_normalize/tables.rb): do nothing unless
  BASERUBY is available.  MINIRUBY cannot load extension libraries,
  so cannot update Unicode data.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-05 05:11:33 +00:00
nobu 6c6d4da21b configure.in: fix for old Apple compilers
* 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
2014-10-29 02:48:25 +00:00
naruse c98b8d622b * configure.in: remove apple-gcc4.2 from CC candidates.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-28 05:52:07 +00:00
yugui f65e5121e2 Fix PNaCl configure/link errors.
* 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
2014-10-22 12:19:21 +00:00
yugui 165221441c Enable nacl_io in pepper-ruby.
* 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
2014-10-21 15:23:21 +00:00
nobu 42ca978656 common.mk: UNICODE_FILES
* 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
2014-10-21 13:48:16 +00:00
nobu 4ae67d876a common.mk: after-configure
* common.mk (after-configure): update Unicode files after
  configure run.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-21 05:17:32 +00:00
nobu b394356579 * configure.in: download unicode files beofre build.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-21 01:04:37 +00:00
nobu 80de9591c9 configure.in: downloader needs BASERUBY
* 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
2014-10-20 03:42:38 +00:00
akr 7d9e04de49 * ext/etc/etc.c (etc_nprocessors_affinity): use sched_getaffinity
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
2014-10-15 09:41:25 +00:00
yugui 57bc5eaf2f Fixes build failures on Portable Native Client.
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
2014-10-11 13:33:14 +00:00
nobu 81ce0e3853 configure.in: fix typo
* configure.in: remove extra right-bracket.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-11 03:57:46 +00:00
yugui 377ad103a1 Support build for Portable Native Client outside of naclports tree.
* configure.in (RUBY_NACL): automatically locate pnacl-clang.
  (RUBY_PLATFORM): pnacl instead of le32-nacl.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-11 03:35:18 +00:00
yugui 69ac654c90 Merges a patch form naclports.
* 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
2014-10-11 02:11:53 +00:00
nobu 97d3b04c9b ruby/ruby.h: fix for older gcc
* 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
2014-10-10 14:20:20 +00:00
nobu c88c049ed1 mkmf.rb: translate to assembler
* lib/mkmf.rb (create_makefile): add rules to translate to
  assembler sources.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-08 01:38:32 +00:00
nobu aabdfeaca3 configure.in: remove arch options from CXXFLAGS
* 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
2014-10-07 02:28:13 +00:00
nobu 9b6a8da0eb configure.in: off_t for struct stat.st_size
* configure.in (struct stat.st_size): prefer off_t over int, long,
  and so on.  inspired by
  http://www.opensource.apple.com/source/ruby/ruby-104/patches/config.h.ed

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-07 01:48:18 +00:00
nobu 14ae8f6373 configure.in: fix quoting brackets
* configure.in (RUBY_UNIVERSAL_ARCH): fix missing quoting
  brackets.  incorporated from
  http://www.opensource.apple.com/source/ruby/ruby-104/patches/configure.diff

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-07 01:37:41 +00:00
odaira 01a7a62d2b configure.in: Fix typo. [Bug #9914]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-06 09:45:25 +00:00
nobu 1c01280d17 downloader.rb
* configure.in: use tool/downloader.rb directly.

* tool/get-config_files: no longer used.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-28 11:27:22 +00:00
nobu a179d0d242 configure.in: use ac_cv_func_vfork
* configure.in (ac_cv_func_vfork): ac_cv_func_vfork_works is
  overridden always.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-07 02:04:16 +00:00
nobu ed0a7d4627 process.c: disable vfork on OS X
* 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
2014-09-07 01:57:44 +00:00
nobu e81a0d8f36 process.c: vfork may not work with pthread
* 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
2014-09-07 01:10:43 +00:00
akr 82d85fe441 * configure.in: Check sys/id.h, getuidx and getgidx for AIX.
* 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
2014-09-05 03:43:28 +00:00
akr d03315d84a * configure.in (dirfd): Check function.
* dir.c (dir_fileno): New method.
  [ruby-dev:48265] [Feature #9880]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-04 15:54:04 +00:00
akr f20d51b0ad * process.c (has_privilege): New function.
(retry_fork_async_signal_safe): Don't use vfork() for privileged
  process.

* configure.in (getresuid): Check function.
  (getresgid): Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-04 14:56:03 +00:00
akr 93a7bf4b17 * configure.in: Use AC_FUNC_FORK.
* io.c: Use HAVE_WORKING_FORK instead of HAVE_FORK.

* process.c: Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-02 22:51:03 +00:00
nobu 86c72d1a9c configure.in: quote defun names
* configure.in (RUBY_TRY_CFLAGS, RUBY_TRY_LDFLAGS),
  (RUBY_CHECK_BUILTIN_SETJMP, RUBY_SETJMP_TYPE),
  (RUBY_STACK_GROW_DIRECTION): quote defun names, for some
  versions of autoconf possibly.  [ruby-core:64473] [Bug #10156]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-20 08:27:05 +00:00
nobu 89901cc760 configure.in: [Bug #8409]
* 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
2014-08-12 08:29:56 +00:00
hsbt 3486904f4e * configure.in: ignored working directory same as prefix value.
[ruby-core:54999] [Bug #8409]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-12 05:25:47 +00:00
nobu b6d23e450b configure.in: fix jemalloc check
* 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
2014-08-11 01:40:23 +00:00
nobu c7bc925b9b configure.in: remove spaces followed by tabs
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-11 01:40:20 +00:00
nobu f5e2b68a7d configure.in: remove SSE options
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-10 04:48:12 +00:00
nobu ac574fe862 configure.in: duplicated linker flags
* 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
2014-08-10 03:31:37 +00:00
nobu 6528ad0971 defines.h: PACKED_STRUCT_UNALIGNED
* include/ruby/defines.h (PACKED_STRUCT_UNALIGNED): move from
  configure.in for universal binary.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-23 14:50:02 +00:00
nobu 3f21aa5d38 configure.in: missing comma
* configure.in (posix_fadvise): fix missing comma separating
  blocks.  [ruby-core:62968] [Bug #9914]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-23 14:50:00 +00:00
nobu ce4cfec88a configure.in: with-destdir
* configure.in: add --with-destdir option which sets default
  destination directory to install.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-18 01:47:01 +00:00
nobu 5e14a4c4b3 configure.in: exit with failure
* configure.in (rb_cv_broken_backtrace): exit with failure
  normally, no needs to abort.  [ruby-core:63678] [Bug #10008]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-13 01:56:27 +00:00
nobu c2b0992156 configure.in: fix static-linked-ext
* 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
2014-07-03 03:40:24 +00:00
nobu 08580181ac configure.in: extract date at build time
* 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
2014-06-16 20:23:23 +00:00
nobu dfd8c5d402 thread.c: fix for non-scalar pthread_t
* 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
2014-06-11 08:38:09 +00:00
nobu 8a2dc6f1dd configure.in: disable posix_fadvise
* configure.in (posix_fadvise): disable use of posix_fadvise
  itself on 32-bit AIX.  [ruby-core:62968] [Bug #9914]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-08 15:04:29 +00:00
nobu a4d7e42888 version.c: show malloc_conf
* 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
2014-06-05 05:36:28 +00:00
nobu 6ab08d2e8d configure.in, missing.h: jemalloc mangling
* 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
2014-06-05 05:16:46 +00:00
normal 22d8480e99 configure.in: add --with-jemalloc option
* configure.in: add --with-jemalloc option
  [ruby-core:62912]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-04 19:34:03 +00:00
nobu 4532872340 configure.in: remove rb_cv_typeof
* 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
2014-05-31 14:48:11 +00:00
shyouhei e00ac16763 * thread.c (rb_thread_atfork_internal): My compiler complains
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
2014-05-31 12:24:28 +00:00
nobu c65ef1539b configure.in: fix messages
* 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
2014-05-29 00:58:21 +00:00
nobu fc0920e36d configure.in: do not disable ucontext.h
* 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
2014-05-25 11:31:52 +00:00
naruse 6b4f9210b0 * file.c (stat_birthtime): add birthtime support [Feature #9647]
* file.c (rb_stat_birthtime): add File::Stat.birthtime

* file.c (rb_file_s_birthtime): add File.birthtime

* file.c (rb_file_birthtime): add File#birthtime

* configure.in: check struct stat.st_birthtimespec.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-22 11:49:22 +00:00
naruse a999657e7e sys/param.h is used by linux
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-22 11:17:34 +00:00
naruse 210f863906 revert File::Statfs [Feature #9772]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-22 10:39:48 +00:00
nobu 003710957b configure.in: Info.plist workaround
* 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
2014-05-21 02:42:33 +00:00
nobu 5d6ed9081e configure.in: rb_cv_atan2_inf_c99
* 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
2014-05-18 08:31:34 +00:00
akr 63fee73500 * configure.in: Check nextafter() availability.
* include/ruby/missing.h (nextafter): New optional declaration.

* missing/nextafter.c: New file.

* numeric.c: Float#next_float and Float#prev_float implemented.

   [ruby-core:62562] [Feature #9834]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-18 00:37:10 +00:00
nobu 59cb82c52c configure.in: disable install-capi by default
* 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
2014-05-17 07:48:25 +00:00
shirosaki a7ebfe4b71 configure.in: enable SSE2 on mingw
* configure.in: enable SSE2 on mingw. target='i386-pc-mingw32'.
  [ruby-core:62095] [Bug #8358]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-15 12:31:36 +00:00
nobu f0fc13aaea configure.in: check atan2
* configure.in (rb_cv_atan2_inf_c99): check whether runtime atan2
  handles Inf as C99.  ruby-core:62536] [Bug #9831]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-12 14:57:17 +00:00
akr b063dd016c * configure.in: Invoke AC_REPLACE_FUNCS for each function.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-12 11:33:39 +00:00
nobu c6e9e4110e configure.in: check typeof
* configure.in (rb_cv_typeof): check typeof extension for ccan
  headers.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-11 00:33:45 +00:00
nobu 9ee25c70df configure.in: check for setjmp type with CCDLFLAGS
* 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
2014-05-09 05:27:07 +00:00
naruse 97cd982a3e * configure.in: OpenBSD needs to include sys/param.h before include
sys/mount.h. [ruby-dev:48167]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-08 01:57:05 +00:00
nobu 7a6ebecf9e math.c: C99-like atan2
* 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
2014-05-04 01:23:01 +00:00
ngoto 09f51c56d8 * file.c (HAVE_STRUCT_STATVFS_F_BASETYPE): File::Statfs#fstypename
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
2014-05-02 15:24:04 +00:00
naruse 19fac4432f * configure.in (HAVE_STRUCT_STATFS_F_TYPE): check struct statfs.f_type
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
2014-04-28 12:46:23 +00:00
naruse 559d689ca6 * configure.in: check struct statvfs and struct statvfs.f_fstypename.
* 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
2014-04-28 09:08:15 +00:00
nobu e4cde46942 configure.in: refine __builtin_unreachable check
* 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
2014-04-25 05:56:01 +00:00
naruse b4682ea330 * configure.in: NetBSD's ksh, used by configure, needs escapes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-25 04:13:56 +00:00
naruse b87df1bf24 * configure.in: correct pthread_setname_np's prototype on NetBSD.
[Bug #9586]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-25 04:06:45 +00:00
nobu c5fef27312 file.c: unpack in binary
* file.c (statfs_fsid): convert with rb_integer_unpack.

* configure.in: fsid_t is no longer used.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-23 04:31:09 +00:00
usa 6f477bcc0e * configure.in, win32/Makefile.sub: fsid_t is defined in include/ruby/win32.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-23 02:47:07 +00:00
nobu 0f69c1845a file.c: fsid_t may not be defined
* 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
2014-04-23 02:32:17 +00:00
usa 86dc863bd8 * win32/win32.c, include/ruby/win32.h (ustatfs): implementation of
statfs(2) clone. [EXPERIMENTAL]

* file.c (rb_io_statfs): use above function.

* configure.in, win32/Makefile.sub (struct statfs): available.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-22 15:45:00 +00:00
usa 900ede4053 * file.c (rb_io_stafs): use statfs(2) if fstatfs(2) is unavailable.
* configure.in (fstatfs): check it.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-22 14:57:18 +00:00
naruse 035a4e7d72 * file.c: newly added a class File::Statfs. (experimental)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-22 10:35:57 +00:00
nobu f8d6453704 configure.in: rb_cv_getcwd_malloc
* 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
2014-04-17 23:50:20 +00:00
nobu 3d69324be3 configure.in: FUNC_MINIMIZED
* configure.in (RUBY_FUNC_ATTRIBUTE): escape double quotes in
  attribute.

* configure.in (FUNC_MINIMIZED): attribute to minimize function
  body.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-17 02:41:39 +00:00
nobu 1edaa6d244 configure.in: no __builtin_setjmp on x64-mingw
* 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
2014-04-09 04:07:14 +00:00
nobu 9dd0113023 configure.in: get rid of clang fatal error
* 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
2014-04-04 02:37:27 +00:00
nobu 5c20b01270 configure.in: restore flags
* 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
2014-04-03 22:13:48 +00:00
nobu 80b36a7b1e configure.in: indent
* configure.in (ac_cv_func___builtin_setjmp): adjust indent.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-03 22:13:46 +00:00
nobu 08d40c92a0 configure.in: use the first candidate
* 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
2014-04-02 13:00:31 +00:00
nobu a0237409fa configure.in: fix for clang 5.1 __builtin_longjmp
* configure.in (ac_cv_func___builtin_setjmp): __builtin_longjmp() in
  clang 5.1 uses `void**`, not `jmp_buf`.  [Bug #9692]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-02 12:50:07 +00:00
nobu 4ad0071dc8 configure.in: do not use a variable for longjmp
* 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
2014-04-02 08:43:18 +00:00
kanemoto 738c303461 add --disable-pie option to configure
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-26 00:13:36 +00:00
knu cc4271c955 Fix a build problem with clang and --with-opt-dir.
* 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
2014-03-21 12:59:08 +00:00