[#1207] warning in ruby extension eats memory — Eugene Scripnik <Eugene.Scripnik@...>
This message was posted to ruby-talk, but I didn't get responce from
>>>>> "E" == Eugene Scripnik <Eugene.Scripnik@itgrp.net> writes:
ts wrote:
>>>>> "E" == Eugene Scripnik <Eugene.Scripnik@itgrp.net> writes:
ts wrote:
>>>>> "E" == Eugene Scripnik <Eugene.Scripnik@itgrp.net> writes:
ts wrote:
>>>>> "E" == Eugene Scripnik <Eugene.Scripnik@itgrp.net> writes:
ts wrote:
>>>>> "E" == Eugene Scripnik <Eugene.Scripnik@itgrp.net> writes:
Hi,
[#1229] stack problem — Mathieu Bouchard <matju@...>
On Sat, Jul 12, 2003 at 01:59:53PM +0900, Mathieu Bouchard wrote:
On Tue, Jul 15, 2003 at 01:26:43AM +0900, Mathieu Bouchard wrote:
Hi,
[#1237] FTP.new with block — Gavin Sinclair <gsinclair@...>
Hi,
>>>>> "G" == Gavin Sinclair <gsinclair@soyabean.com.au> writes:
Hi,
Mathieu Bouchard wrote:
On Sun, Jul 20, 2003 at 03:06:13AM +0900, Dave Thomas wrote:
>>>>> "R" == Richard Zidlicky <rz@linux-m68k.org> writes:
On Sun, Jul 20, 2003 at 06:51:03PM +0900, ts wrote:
>>>>> "R" == Richard Zidlicky <rz@linux-m68k.org> writes:
On Mon, Jul 21, 2003 at 09:59:19PM +0900, ts wrote:
[#1249] File.write(path, data)? — Gavin Sinclair <gsinclair@...>
I am glad to see File.read(path) in Ruby 1.8. But what about
[#1256] testunit, exit status and at_exit — Dave Thomas <dave@...>
I'd really like TestUnit to be able to return an exit status when I run
-----BEGIN PGP SIGNED MESSAGE-----
Sean E. Russell [mailto:ser@germane-software.com] wrote:
Hi,
[#1257] Add have_defined() and rework have_struct_member() — Michal Rokos <m.rokos@...>
Hello,
[#1297] Fix for Bug 1058 — Markus Walser <walser@...>
Hi,
Hi,
On Friday 25 July 2003 10:58, Yukihiro Matsumoto wrote:
Hi,
On Friday 25 July 2003 11:46, Yukihiro Matsumoto wrote:
I tried to figure out what's wrong. So far I havn't a solution:
Hello,
> Check the value of klass by
Hi,
[#1309] exceptions and such — Mathieu Bouchard <matju@...>
[#1310] adding NodeDump and ii — nobu.nokada@...
Hi,
>>>>> "n" == nobu nokada <nobu.nokada@softhome.net> writes:
[RFC] Add have_defined() and rework have_struct_member()
Hello,
I'm trying to bring OpenSSL < 0.9.6 to OSSL2 module and while doing this
I needed to test whether some constats and functions are defined in
some.h.
I didn't find the way to do this in current mkmf.rb, so I defined
function have_defined() to solve this.
The second thing I was facing was testing whether some struct has
member. The current function have_struct_member() defined
-DHAVE_ST_MEMBER, but for 2 struct and same member you cannot
distinguish which one is defined and which isn't. So I changed it to
-DHAVE_ST_STRUCT_MEMBER.
Please concider whether is it OK to merge this.
Michal
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Michal Rokos Czech Technical University, Prague
e-mail: m.rokos@sh.cvut.cz icq: 36118339 jabber: majkl@jabber.cz
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Attachments (1)
Index: lib/mkmf.rb
===================================================================
RCS file: /src/ruby/lib/mkmf.rb,v
retrieving revision 1.137
diff -u -p -r1.137 mkmf.rb
--- lib/mkmf.rb 18 Jul 2003 09:44:28 -0000 1.137
+++ lib/mkmf.rb 21 Jul 2003 06:25:34 -0000
@@ -434,7 +434,26 @@ def have_struct_member(type, member, hea
int main() { return 0; }
int s = (char *)&((#{type}*)0)->#{member} - (char *)0;
SRC
- $defs.push(format("-DHAVE_ST_%s", member.upcase))
+ $defs.push(format("-DHAVE_ST_%s", member.upcase)) # compatibility - deprecated
+ $defs.push(format("-DHAVE_ST_%s_%s", type.upcase, member.upcase))
+ true
+ else
+ false
+ end
+ end
+end
+
+def have_defined(macro, header=nil)
+ checking_for "#{macro}" do
+ if try_compile(<<"SRC")
+#{COMMON_HEADERS}
+#{cpp_include(header)}
+#if !defined(#{macro})
+# error #{macro} not defined
+#endif
+int main() { return 0; }
+SRC
+ $defs.push(format("-DHAVE_%s", macro.upcase))
true
else
false