ruby-changes:6853
From: nobu <ko1@a...>
Date: Tue, 5 Aug 2008 16:42:22 +0900 (JST)
Subject: [ruby-changes:6853] Ruby:r18369 (trunk): * include/ruby/win32.h, bcc32/Makefile.sub (config.h): bcc 5.8 has
nobu 2008-08-05 16:39:21 +0900 (Tue, 05 Aug 2008) New Revision: 18369 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=18369 Log: * include/ruby/win32.h, bcc32/Makefile.sub (config.h): bcc 5.8 has stdint.h. Modified files: trunk/ChangeLog trunk/bcc32/Makefile.sub trunk/bcc32/mkexports.rb trunk/bcc32/setup.mak trunk/include/ruby/win32.h trunk/regint.h Index: include/ruby/win32.h =================================================================== --- include/ruby/win32.h (revision 18368) +++ include/ruby/win32.h (revision 18369) @@ -70,7 +70,7 @@ #endif #include <io.h> #include <malloc.h> -#ifdef __MINGW32__ +#if defined __MINGW32__ || __BORLANDC__ >= 0x0580 # include <stdint.h> #else # if !defined(_INTPTR_T_DEFINED) Index: ChangeLog =================================================================== --- ChangeLog (revision 18368) +++ ChangeLog (revision 18369) @@ -1,3 +1,8 @@ +Tue Aug 5 16:38:59 2008 Nobuyoshi Nakada <nobu@r...> + + * include/ruby/win32.h, bcc32/Makefile.sub (config.h): bcc 5.8 has + stdint.h. + Tue Aug 5 16:13:05 2008 Shugo Maeda <shugo@r...> * lib/net/imap.rb (disconnect): do not refer SSL::SSLSocket for Index: regint.h =================================================================== --- regint.h (revision 18368) +++ regint.h (revision 18369) @@ -217,15 +217,9 @@ #include <ctype.h> #ifdef HAVE_SYS_TYPES_H -#ifndef __BORLANDC__ #include <sys/types.h> #endif -#endif -#ifdef __BORLANDC__ -#include <malloc.h> -#endif - #ifdef ONIG_DEBUG # include <stdio.h> #endif Index: bcc32/Makefile.sub =================================================================== --- bcc32/Makefile.sub (revision 18368) +++ bcc32/Makefile.sub (revision 18369) @@ -287,25 +287,27 @@ \#define rb_pid_t int \#define HAVE_STRUCT_STAT_ST_RDEV 1 \#define HAVE_ST_RDEV 1 +!if $(BORLANDC) < 0x0580 \#define int8_t signed char +\#define uint8_t unsigned char +\#define int16_t short +\#define uint16_t unsigned short +\#define int32_t int +\#define uint32_t unsigned int +\#define int64_t __int64 +\#define uint64_t unsigned __int64 +\#define ssize_t int +!endif \#define HAVE_UINT8_T 1 -\#define uint8_t unsigned char \#define HAVE_INT16_T 1 -\#define int16_t short \#define HAVE_UINT16_T 1 -\#define uint16_t unsigned short \#define HAVE_INT32_T 1 -\#define int32_t int \#define HAVE_UINT32_T 1 -\#define uint32_t unsigned int \#define HAVE_INT64_T HAVE_LONG_LONG -\#define int64_t __int64 \#define HAVE_UINT64_T HAVE_LONG_LONG -\#define uint64_t unsigned __int64 \#define HAVE_INTPTR_T 1 \#define HAVE_UINTPTR_T 1 \#define HAVE_SSIZE_T 1 -\#define ssize_t int \#define GETGROUPS_T int \#define RETSIGTYPE void \#define HAVE_ALLOCA 1 @@ -345,7 +347,7 @@ \#define RSHIFT(x,y) ((x)>>(int)y) \#define FILE_COUNT level \#define FILE_READPTR curp -\#define RUBY_SETJMP(env) _setjmp(env) +\#define RUBY_SETJMP(env) setjmp(env) \#define RUBY_LONGJMP(env,val) longjmp(env,val) \#define RUBY_JMP_BUF jmp_buf \#define inline __inline Index: bcc32/setup.mak =================================================================== --- bcc32/setup.mak (revision 18368) +++ bcc32/setup.mak (revision 18369) @@ -50,7 +50,9 @@ !if !defined(BASERUBY) @for %I in (ruby.exe) do @echo BASERUBY = "%~$$PATH:I" >> $(MAKEFILE) !endif - @$(APPEND) $(BANG)endif + @type >> $(MAKEFILE) &&| +$(BANG)endif +| !if exist(confargs.mk) @type confargs.mk >> $(MAKEFILE) @del confargs.mk Index: bcc32/mkexports.rb =================================================================== --- bcc32/mkexports.rb (revision 18368) +++ bcc32/mkexports.rb (revision 18369) @@ -4,19 +4,21 @@ require 'win32/mkexports' class Exports::Bcc < Exports - Forwards = /^rb_w32_(\w+)/ - def forwarding(internal, export) internal[/\A_?/]+export end + def each_line(objs, &block) + objs.each do |obj| + opt = /\.(?:so|dll)\z/i =~ obj ? "-ee" : "-oiPUBDEF -oiPUBD32" + IO.foreach("|tdump -q #{opt} #{obj.tr('/', '\\')} < nul", &block) + end + end + def each_export(objs) - objs.each do |obj| - opt = /\.(?:so|dll)\z/i =~ obj ? "-ee" : "-oiPUBDEF -oiPUBD32" - IO.foreach("|tdump -q #{opt} #{obj.tr('/', '\\')} < nul") do |l| + objdump(objs) do |l| next unless /(?:PUBDEF|PUBD32|EXPORT)/ =~ l - yield $1 if /'(.*?)'/ =~ l - end + yield $1 if /'(.*?)'/ =~ l end yield "_strcasecmp", "_stricmp" yield "_strncasecmp", "_strnicmp" -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/