* ext/fiddle/extconf.rb: needs --enable-shared when linked to
libruby or fiddle.so. since --with-static-linked-ext does no
longer link extensions to ruby program with --enable-shared, the
only combination needs --enable-static is --disable-shared and
--with-static-linked-ext. [ruby-dev:48901] [Bug #10960]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/fiddle/win32/libffi.mk.tmpl: assemble without directory prefix.
workaround of a bug of VC12 ml, by unak at [ruby-core:67792].
[ruby-core:67789] [Bug #10780]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/fiddle/win32/libffi-3.2.1-mswin.patch (include/ffi.h.in):
old version VCs did not support long long, use __int64 instead.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/fiddle/lib/fiddle/cparser.rb (parse_ctype): limit split word
number as the rest are not used.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
type_alias
* test/fiddle/test_cparser.rb: added type_alias test for parse_ctype
and parse_struct_signature.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
to handle rich signatures including parameter names and function
pointer types. Patch by @theryan [fix GH-590]
* test/fiddle/test_cparser.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/fiddle/extconf.rb: make PIC objects if it will be linked as
a shared object eventually. [ruby-core:67128]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/fiddle/depend: mark PHONY targets, and workaround of
unexpected DEPEND_RULES on mswin.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
mswin, because it's not normal file (cygwin's symlink) and have
system attribute.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/fiddle/extconf.rb: pass CPP only if necessary, should not
make it empty.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/extmk.rb (extmake): replace "./" at beginning in LOCAL_LIBS
with the current directory name for values cached in previous
Makefile.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/fiddle/extconf.rb: when pkg_config failed, module version is
not available.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/fiddle/extconf.rb: try to compile libffi as mingw on mswin
if possible.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/fiddle/extconf.rb: link libffi with libruby for symbols
provided by ruby on some platforms, e.g. alloca.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/fiddle/extconf.rb: configure libffi for the check requires
the headers.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/fiddle/extconf.rb: add the local ffi library and header just
before create_makefile, not to disturb other checks.
also prepend the extension path name to the local library name
for static linked ext.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/fiddle/handle.c (CHECK_DLERROR): suppress warnings for using
the result of an assignment as a condition without parentheses.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/fiddle/depend (build-libffi): get rid of eventually empty
target for nmake.
* ext/fiddle/extconf.rb: omit stuffs for libffi unless bundled
libffi is found and used.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/fiddle/extconf.rb: configure is already in mflags, use
system instead of xsystem which requires a string, and logging
libffi configure output.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/fiddle/extconf.rb: supply 0 to fill RUBY_LIBFFI_MODVERSION
with 3-digit. libffi 3.1 returns just 2-digit.
[ruby-core:62920] [Bug #9897]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/fiddle/function.c (function_call): fix memory leak when an
exception occurs at argument conversion or the function call.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/dl/cptr.c (dlptr_free), ext/dl/handle.c (dlhandle_free),
ext/fiddle/handle.c (fiddle_handle_free),
ext/fiddle/pointer.c (fiddle_ptr_free): fix memory leak.
based on the patch Heesob Park at [ruby-dev:48021] [Bug #9599].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e