зеркало из https://github.com/github/ruby.git
* djgpp/*: sync with the latest.
* ext/extmk.rb, lib/mkmf.rb: flush $stdout. * io.c (READ_DATA_PENDING_COUNT, READ_DATA_PENDING_PTR): undef these macros on DJGPP. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
8a49ac945b
Коммит
c87332937b
|
@ -3,7 +3,7 @@
|
|||
This is what you need to do to compile and install Ruby:
|
||||
|
||||
1. Run configure.bat, which will generate config.h and Makefile
|
||||
and ext/extmk.rb(GNU sed required).
|
||||
(GNU sed required).
|
||||
Message like this is normal:
|
||||
sed.exe: can't read 123456789: No such file or directory (ENOENT)
|
||||
|
||||
|
|
|
@ -71,8 +71,6 @@
|
|||
#define HAVE_HYPOT 1
|
||||
#define HAVE_ACOSH 1
|
||||
#define HAVE_FMOD 1
|
||||
#define HAVE_DRAND48 1
|
||||
#define HAVE_RANDOM 1
|
||||
#define HAVE_WAITPID 1
|
||||
#define HAVE_FSYNC 1
|
||||
#define HAVE_TRUNCATE 1
|
||||
|
@ -96,7 +94,6 @@
|
|||
#define HAVE_COSH 1
|
||||
#define HAVE_SINH 1
|
||||
#define HAVE_TANH 1
|
||||
#define HAVE_INITSTATE 1
|
||||
#define HAVE_STRUCT_TM_TM_ZONE 1
|
||||
#define HAVE_TM_ZONE 1
|
||||
#define HAVE_STRUCT_TM_TM_GMTOFF 1
|
||||
|
@ -106,8 +103,9 @@
|
|||
#define RSHIFT(x,y) ((x)>>(int)y)
|
||||
#define FILE_COUNT _cnt
|
||||
#define FILE_READPTR _ptr
|
||||
#define NEED_IO_FLUSH_BETWEEN_RW 1
|
||||
#define DEFAULT_KCODE KCODE_NONE
|
||||
#define DLEXT ".o"
|
||||
#define DLEXT ".so"
|
||||
#define RUBY_LIB "/lib/ruby/@MAJOR@.@MINOR@"
|
||||
#define RUBY_SITE_LIB "/lib/ruby/site_ruby"
|
||||
#define RUBY_SITE_LIB2 "/lib/ruby/site_ruby/@MAJOR@.@MINOR@"
|
||||
|
|
187
djgpp/config.sed
187
djgpp/config.sed
|
@ -1,73 +1,5 @@
|
|||
/^SHELL/s,/bin/sh,$(COMSPEC),
|
||||
s%@srcdir@%.%g
|
||||
s%@top_srcdir@%..%
|
||||
s%@CFLAGS@%-O2%g
|
||||
s%@CPPFLAGS@%%g
|
||||
s%@CXXFLAGS@%%g
|
||||
s%@LDFLAGS@%%g
|
||||
s%@LIBS@%-lm %g
|
||||
s%@exec_prefix@%${prefix}%g
|
||||
s%@prefix@%/usr/local%g
|
||||
s%@program_transform_name@%s,x,x,%g
|
||||
s%@bindir@%${exec_prefix}/bin%g
|
||||
s%@sbindir@%${exec_prefix}/sbin%g
|
||||
s%@libexecdir@%${exec_prefix}/libexec%g
|
||||
s%@datadir@%${prefix}/share%g
|
||||
s%@sysconfdir@%${prefix}/etc%g
|
||||
s%@sharedstatedir@%${prefix}/com%g
|
||||
s%@localstatedir@%${prefix}/var%g
|
||||
s%@libdir@%${exec_prefix}/lib%g
|
||||
s%@includedir@%${prefix}/include%g
|
||||
s%@oldincludedir@%/usr/include%g
|
||||
s%@infodir@%${prefix}/info%g
|
||||
s%@mandir@%${prefix}/man%g
|
||||
s%@host@%i386-pc-msdosdjgpp%g
|
||||
s%@host_alias@%i386-msdosdjgpp%g
|
||||
s%@host_cpu@%i386%g
|
||||
s%@host_vendor@%pc%g
|
||||
s%@host_os@%msdosdjgpp%g
|
||||
s%@CC@%gcc%g
|
||||
s%@CPP@%gcc -E%g
|
||||
s%@YACC@%bison -y%g
|
||||
s%@RANLIB@%ranlib%g
|
||||
s%@AR@%ar%g
|
||||
s%@INSTALL_PROGRAM@%${INSTALL}%g
|
||||
s%@INSTALL_DATA@%${INSTALL} -m 644%g
|
||||
s%@SET_MAKE@%%g
|
||||
s%@LIBOBJS@% crypt.o flock.o vsnprintf.o%g
|
||||
s%@ALLOCA@%%g
|
||||
s%@DEFAULT_KCODE@%%g
|
||||
s%@EXEEXT@%.exe%g
|
||||
s%@OBJEXT@%o%g
|
||||
s%@XLDFLAGS@%%g
|
||||
s%@DLDFLAGS@%%g
|
||||
s%@STATIC@%%g
|
||||
s%@CCDLFLAGS@%%g
|
||||
s%@LDSHARED@%ld%g
|
||||
s%@DLEXT@%o%g
|
||||
s%@STRIP@%strip%g
|
||||
s%@EXTSTATIC@%%g
|
||||
s%@binsuffix@%.exe%g
|
||||
s%@setup@%Setup.dj%g
|
||||
s%@LIBRUBY@%libruby.a%g
|
||||
s%@LIBRUBY_A@%libruby.a%g
|
||||
s%@LIBRUBYARG@%libruby.a%g
|
||||
s%@LIBRUBY_SO@%%g
|
||||
s%@SOLIBS@%%g
|
||||
s%@arch@%i386-msdosdjgpp%g
|
||||
;s%/bin/rm%rm%
|
||||
s%@DLDLIBS@%-lc%g
|
||||
s%@MAINLIBS@%%g
|
||||
s%@PREP@%%
|
||||
s%@RUBY_INSTALL_NAME@%ruby%g
|
||||
s%@RUBY_SO_NAME@%%g
|
||||
s%@arch@%i386-msdosdjgpp%g
|
||||
s%@sitedir@%${prefix}/lib/ruby/site_ruby%g
|
||||
s%@configure_args@%%g
|
||||
s%@MINIRUBY@%./miniruby%
|
||||
s%@OUTFLAG@%-o %
|
||||
s%@CPPOUTFILE@%-o conftest.i%
|
||||
s%@archlib@%/lib/ruby/i386-msdosdjgpp%
|
||||
;s%|| true%%
|
||||
;/\/dev\/null/ {
|
||||
;s,/dev/null 2>&1, nul,
|
||||
|
@ -76,8 +8,121 @@ s%@archlib@%/lib/ruby/i386-msdosdjgpp%
|
|||
;/^config.status/ {
|
||||
; N;N;N;N;N;d
|
||||
;}
|
||||
#;s%mv -f y\.tab\.c%if exist parse.c del parse.c\
|
||||
# ren y_tab.c%
|
||||
#;s%y\.tab\.c%y_tab.c%
|
||||
:t
|
||||
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
|
||||
s,@srcdir@,.,g;t t
|
||||
s,@top_srcdir@,..,;t t
|
||||
s,@PATH_SEPARATOR@,:,;t t
|
||||
s,@PACKAGE_NAME@,,;t t
|
||||
s,@PACKAGE_TARNAME@,,;t t
|
||||
s,@PACKAGE_VERSION@,,;t t
|
||||
s,@PACKAGE_STRING@,,;t t
|
||||
s,@PACKAGE_BUGREPORT@,,;t t
|
||||
s,@exec_prefix@,${prefix},;t t
|
||||
s,@prefix@,/dev/env/DJDIR,;t t
|
||||
s,@program_transform_name@,s:^::,;t t
|
||||
s,@bindir@,${exec_prefix}/bin,;t t
|
||||
s,@sbindir@,${exec_prefix}/sbin,;t t
|
||||
s,@libexecdir@,${exec_prefix}/libexec,;t t
|
||||
s,@datadir@,${prefix}/share,;t t
|
||||
s,@sysconfdir@,${prefix}/etc,;t t
|
||||
s,@sharedstatedir@,${prefix}/com,;t t
|
||||
s,@localstatedir@,${prefix}/var,;t t
|
||||
s,@libdir@,${exec_prefix}/lib,;t t
|
||||
s,@includedir@,${prefix}/include,;t t
|
||||
s,@oldincludedir@,/usr/include,;t t
|
||||
s,@infodir@,${prefix}/info,;t t
|
||||
s,@mandir@,${prefix}/man,;t t
|
||||
s,@build_alias@,i586-pc-msdosdjgpp,;t t
|
||||
s,@host_alias@,i586-pc-msdosdjgpp,;t t
|
||||
s,@target_alias@,i386-msdosdjgpp,;t t
|
||||
s,@DEFS@,,;t t
|
||||
s,@ECHO_C@,,;t t
|
||||
s,@ECHO_N@,-n,;t t
|
||||
s,@ECHO_T@,,;t t
|
||||
s,@LIBS@,-lm ,;t t
|
||||
s,@MAJOR@,1,;t t
|
||||
s,@MINOR@,7,;t t
|
||||
s,@TEENY@,3,;t t
|
||||
s,@build@,i586-pc-msdosdjgpp,;t t
|
||||
s,@build_cpu@,i586,;t t
|
||||
s,@build_vendor@,pc,;t t
|
||||
s,@build_os@,msdosdjgpp,;t t
|
||||
s,@host@,i586-pc-msdosdjgpp,;t t
|
||||
s,@host_cpu@,i586,;t t
|
||||
s,@host_vendor@,pc,;t t
|
||||
s,@host_os@,msdosdjgpp,;t t
|
||||
s,@target@,i386-pc-msdosdjgpp,;t t
|
||||
s,@target_cpu@,i386,;t t
|
||||
s,@target_vendor@,pc,;t t
|
||||
s,@target_os@,msdosdjgpp,;t t
|
||||
s,@CC@,gcc,;t t
|
||||
s,@ac_ct_CC@,,;t t
|
||||
s,@CFLAGS@,-Os,;t t
|
||||
s,@LDFLAGS@,,;t t
|
||||
s,@CPPFLAGS@,,;t t
|
||||
s,@EXEEXT@,.exe,;t t
|
||||
s,@OBJEXT@,o,;t t
|
||||
s,@CPP@,gcc -E,;t t
|
||||
s,@EGREP@,grep -E,;t t
|
||||
s,@GNU_LD@,yes,;t t
|
||||
s,@CPPOUTFILE@,-o conftest.i,;t t
|
||||
s,@OUTFLAG@,-o ,;t t
|
||||
s,@YACC@,bison -y,;t t
|
||||
s,@RANLIB@,ranlib,;t t
|
||||
s,@ac_ct_RANLIB@,,;t t
|
||||
s,@AR@,ar,;t t
|
||||
s,@ac_ct_AR@,,;t t
|
||||
s,@NM@,,;t t
|
||||
s,@ac_ct_NM@,,;t t
|
||||
s,@WINDRES@,,;t t
|
||||
s,@ac_ct_WINDRES@,,;t t
|
||||
s,@DLLWRAP@,,;t t
|
||||
s,@ac_ct_DLLWRAP@,,;t t
|
||||
s,@LN_S@,ln -s,;t t
|
||||
s,@SET_MAKE@,,;t t
|
||||
s,@LIBOBJS@,crypt.o flock.o vsnprintf.o,;t t
|
||||
s,@ALLOCA@,,;t t
|
||||
s,@XCFLAGS@,,;t t
|
||||
s,@XLDFLAGS@, -L.,;t t
|
||||
s,@DLDFLAGS@,,;t t
|
||||
s,@STATIC@,,;t t
|
||||
s,@CCDLFLAGS@,,;t t
|
||||
s,@LDSHARED@,ld,;t t
|
||||
s,@DLEXT@,so,;t t
|
||||
s,@DLEXT2@,,;t t
|
||||
s,@LIBEXT@,a,;t t
|
||||
s,@LINK_SO@,,;t t
|
||||
s,@LIBPATHFLAG@, -L%s,;t t
|
||||
s,@STRIP@,strip,;t t
|
||||
s,@EXTSTATIC@,,;t t
|
||||
s,@setup@,Setup.dj,;t t
|
||||
s,@MINIRUBY@,./miniruby,;t t
|
||||
s,@PREP@,,;t t
|
||||
s,@ARCHFILE@,,;t t
|
||||
s,@LIBRUBY_LDSHARED@,ld,;t t
|
||||
s,@LIBRUBY_DLDFLAGS@,,;t t
|
||||
s,@RUBY_INSTALL_NAME@,ruby,;t t
|
||||
s,@rubyw_install_name@,,;t t
|
||||
s,@RUBYW_INSTALL_NAME@,,;t t
|
||||
s,@RUBY_SO_NAME@,$(RUBY_INSTALL_NAME),;t t
|
||||
s,@LIBRUBY_A@,lib$(RUBY_INSTALL_NAME).a,;t t
|
||||
s,@LIBRUBY_SO@,lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR).$(TEENY),;t t
|
||||
s,@LIBRUBY_ALIASES@,lib$(RUBY_SO_NAME).so,;t t
|
||||
s,@LIBRUBY@,$(LIBRUBY_A),;t t
|
||||
s,@LIBRUBYARG@,-l$(RUBY_INSTALL_NAME),;t t
|
||||
s,@SOLIBS@,,;t t
|
||||
s,@DLDLIBS@,-lc,;t t
|
||||
s,@ENABLE_SHARED@,no,;t t
|
||||
s,@MAINLIBS@,,;t t
|
||||
s,@COMMON_LIBS@,,;t t
|
||||
s,@COMMON_MACROS@,,;t t
|
||||
s,@COMMON_HEADERS@,,;t t
|
||||
s,@EXPORT_PREFIX@,,;t t
|
||||
s,@MAKEFILES@,Makefile,;t t
|
||||
s,@arch@,i386-msdosdjgpp,;t t
|
||||
s,@sitearch@,i386-msdosdjgpp,;t t
|
||||
s,@sitedir@,${prefix}/lib/ruby/site_ruby,;t t
|
||||
s,@configure_args@,,;t t
|
||||
/^,THIS_IS_DUMMY_PATTERN_/i\
|
||||
ac_given_srcdir=.
|
||||
|
|
|
@ -5,7 +5,6 @@ if exist djgpp\version.sed goto exist
|
|||
:exist
|
||||
set _conv_=-f djgpp\config.sed -f djgpp\version.sed
|
||||
sed %_conv_% < Makefile.in > Makefile
|
||||
sed %_conv_% < ext\extmk.rb.in > ext\extmk.rb
|
||||
sed %_conv_% < djgpp\config.hin > config.h
|
||||
echo LFN check > 12345678
|
||||
sed -n /LFN/d 123456789 > nul
|
||||
|
|
|
@ -207,6 +207,7 @@ if $extlist.size > 0
|
|||
"#{n}=#{v}" if v and !(v = v.strip).empty?
|
||||
}.compact
|
||||
puts conf
|
||||
$stdout.flush
|
||||
ARGV.concat(conf)
|
||||
end
|
||||
rubies = []
|
||||
|
@ -216,6 +217,7 @@ rubies = []
|
|||
|
||||
Dir.chdir ".."
|
||||
puts "making #{rubies.join(', ')}"
|
||||
$stdout.flush
|
||||
ARGV.concat(rubies)
|
||||
host = (defined?(CROSS_COMPILING) ? CROSS_COMPILING : RUBY_PLATFORM)
|
||||
/mswin|bccwin|mingw|djgpp|human|os2|macos/ =~ host or exec(*ARGV)
|
||||
|
|
6
io.c
6
io.c
|
@ -141,12 +141,18 @@ static VALUE lineno;
|
|||
extern int ReadDataPending();
|
||||
# define READ_DATA_PENDING(fp) (!feof(fp))
|
||||
#endif
|
||||
|
||||
#ifndef READ_DATA_PENDING_PTR
|
||||
# ifdef FILE_READPTR
|
||||
# define READ_DATA_PENDING_PTR(fp) ((fp)->FILE_READPTR)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined __DJGPP__
|
||||
# undef READ_DATA_PENDING_COUNT
|
||||
# undef READ_DATA_PENDING_PTR
|
||||
#endif
|
||||
|
||||
#define READ_CHECK(fp) do {\
|
||||
if (!READ_DATA_PENDING(fp)) {\
|
||||
rb_thread_wait_fd(fileno(fp));\
|
||||
|
|
|
@ -129,6 +129,7 @@ module Logging
|
|||
|
||||
def self::open
|
||||
@log ||= File::open(@logfile, 'w')
|
||||
@log.sync = true
|
||||
$stderr.reopen(@log)
|
||||
$stdout.reopen(@log)
|
||||
yield
|
||||
|
@ -139,12 +140,14 @@ module Logging
|
|||
|
||||
def self::message(*s)
|
||||
@log ||= File::open(@logfile, 'w')
|
||||
@log.sync = true
|
||||
@log.printf(*s)
|
||||
end
|
||||
|
||||
def self::logfile file
|
||||
@logfile = file
|
||||
if @log and not @log.closed?
|
||||
@log.flush
|
||||
@log.close
|
||||
@log = nil
|
||||
end
|
||||
|
@ -636,7 +639,7 @@ def create_makefile(target, srcprefix = nil)
|
|||
for lib in $libs.split
|
||||
lib.sub!(/-l(.*)/, %%"lib\\1.#{$LIBEXT}"%)
|
||||
end
|
||||
$defs.push(format("-DEXTLIB='%s'", libs.join(",")))
|
||||
$defs.push(format("-DEXTLIB='%s'", $libs.split.join(",")))
|
||||
end
|
||||
|
||||
if target.include?('/')
|
||||
|
@ -787,6 +790,7 @@ def init_mkmf(config = CONFIG)
|
|||
$OBJEXT = config["OBJEXT"].dup
|
||||
$LIBS = "#{config['LIBS']} #{config['DLDLIBS']}"
|
||||
$LIBRUBYARG = config['LIBRUBYARG']
|
||||
$LIBPATH = []
|
||||
|
||||
$objs = nil
|
||||
$libs = ""
|
||||
|
|
Загрузка…
Ссылка в новой задаче