mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* bcc32/Makefile.sub (COMMON_LIBS): add libraries included in
import32.lib. * lib/mkmf.rb (create_makefile): restrict prefixing with srcdir to rule lines, add search path to implicit rules, and set Borland make special macros for search path. * win32/win32.c, win32/win32.h (read): aboid a BCC runtime bug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6400a671b8
commit
80f4330973
5 changed files with 40 additions and 5 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,7 +1,16 @@
|
|||
Thu Feb 10 12:06:31 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
Thu Feb 10 12:07:10 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* win32/win32.c (init_stdhandle): assign standard file handles.
|
||||
|
||||
* bcc32/Makefile.sub (COMMON_LIBS): add libraries included in
|
||||
import32.lib.
|
||||
|
||||
* lib/mkmf.rb (create_makefile): restrict prefixing with srcdir to
|
||||
rule lines, add search path to implicit rules, and set Borland make
|
||||
special macros for search path.
|
||||
|
||||
* win32/win32.c, win32/win32.h (read): aboid a BCC runtime bug.
|
||||
|
||||
Wed Feb 9 16:33:05 2005 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* ext/socket/socket.c (wait_connectable): fixed wrong condition.
|
||||
|
|
|
@ -369,7 +369,7 @@ s,@LINK_SO@,$$(LDSHARED) $$(DLDFLAGS) $$(LIBPATH) $$(OBJS), $$(@:/=\), nul, $$(L
|
|||
s,@COMPILE_C@,$$(CC) $$(CFLAGS) $$(CPPFLAGS) -c $$(<:/=\),;t t
|
||||
s,@COMPILE_CXX@,$$(CXX) $$(CXXFLAGS) $$(CPPFLAGS) -P -c $$(<:/=\),;t t
|
||||
s,@COMPILE_RULES@,{$$(srcdir)}.%s{}.%s: .%s.%s:,;t t
|
||||
s,@COMMON_LIBS@,m,;t t
|
||||
s,@COMMON_LIBS@,m advapi32 avicap32 avifil32 cap comctl32 comdlg32 dlcapi gdi32 glu32 imagehlp imm32 inetmib1 kernel32 loadperf lsapi32 lz32 mapi32 mgmtapi mpr msacm32 msvfw32 nddeapi netapi32 ole32 oleaut32 oledlg olepro32 opengl32 pdh pkpd32 rasapi32 rasdlg rassapi rpcrt4 setupapi shell32 shfolder snmpapi sporder tapi32 url user32 vdmdbg version win32spl winmm wintrust wsock32,;t t
|
||||
s,@COMMON_MACROS@,WIN32_LEAN_AND_MEAN;t t
|
||||
s,@COMMON_HEADERS@,winsock2.h windows.h,;t t
|
||||
s,@TRY_LINK@,$$(CC) -oconftest $$(INCFLAGS) -I$$(hdrdir) $$(CPPFLAGS) $$(CFLAGS) $$(LIBPATH) $$(LDFLAGS) $$(src) $$(LOCAL_LIBS) $$(LIBS),;t t
|
||||
|
|
12
lib/mkmf.rb
12
lib/mkmf.rb
|
@ -1033,6 +1033,7 @@ site-install-rb: install-rb
|
|||
|
||||
return unless target
|
||||
|
||||
mfile.puts SRC_EXT.collect {|ext| ".path.#{ext} = $(VPATH)"} if $nmake == ?b
|
||||
mfile.print ".SUFFIXES: .#{SRC_EXT.join(' .')} .#{$OBJEXT}\n"
|
||||
mfile.print "\n"
|
||||
|
||||
|
@ -1068,13 +1069,22 @@ site-install-rb: install-rb
|
|||
end
|
||||
|
||||
depend = File.join(srcdir, "depend")
|
||||
cont = rule = false
|
||||
if File.exist?(depend)
|
||||
open(depend, "r") do |dfile|
|
||||
mfile.printf "###\n"
|
||||
while line = dfile.gets()
|
||||
line.gsub!(/\.o\b/, ".#{$OBJEXT}")
|
||||
line.gsub!(/(\s)([^\s\/]+\.[ch])/, '\1{$(srcdir)}\2') if $nmake
|
||||
line.gsub!(/\$\(hdrdir\)\/config.h/, $config_h) if $config_h
|
||||
if $nmake
|
||||
rule = /^[$\w][^#]*:/ =~ line unless cont
|
||||
cont = /(?:^|[^\\])(?:\\\\)*\\$/ =~ line
|
||||
if rule
|
||||
line.gsub!(%r"(?<=\s)(?!\.)(?=[^\s\/]+\.(?:#{(SRC_EXT + ['h']).join('|')})(?\s|\z))"o, '{.;$(VPATH)}')
|
||||
else
|
||||
line.sub!(/^(\.\w+)(\.\w+)(?=\s*:)/, '{.;$(VPATH)}\1{}\2')
|
||||
end
|
||||
end
|
||||
mfile.print line
|
||||
end
|
||||
end
|
||||
|
|
|
@ -3244,6 +3244,23 @@ catch_interrupt(void)
|
|||
CHECK_INTS;
|
||||
}
|
||||
|
||||
#if defined __BORLANDC__ || defined _WIN32_WCE
|
||||
#undef read
|
||||
int
|
||||
read(int fd, void *buf, size_t size)
|
||||
{
|
||||
int trap_immediate = rb_trap_immediate;
|
||||
int ret = _read(fd, buf, size);
|
||||
if ((ret < 0) && (errno == EPIPE)) {
|
||||
errno = 0;
|
||||
ret = 0;
|
||||
}
|
||||
rb_trap_immediate = trap_immediate;
|
||||
catch_interrupt();
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
#undef fgetc
|
||||
int
|
||||
rb_w32_getc(FILE* stream)
|
||||
|
|
|
@ -105,7 +105,6 @@ extern "C++" {
|
|||
#define eof() _eof()
|
||||
#define filelength(h) _filelength(h)
|
||||
#define mktemp(t) _mktemp(t)
|
||||
#define read(h, b, l) _read(h, b, l)
|
||||
#define tell(h) _tell(h)
|
||||
#define unlink(p) _unlink(p)
|
||||
#define write(h, b, l) _write(h, b, l)
|
||||
|
@ -205,7 +204,7 @@ extern int rb_w32_rmdir(const char *);
|
|||
#ifdef __BORLANDC__
|
||||
extern int rb_w32_fstat(int, struct stat *);
|
||||
extern FILE *rb_w32_fopen(const char *, const char *);
|
||||
extern FILE *rb_w32_fdopen(int, char *);
|
||||
extern FILE *rb_w32_fdopen(int, const char *);
|
||||
extern FILE *rb_w32_fsopen(const char *, const char *, int);
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue