1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

fix bug; support mingw32.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
eban 2000-05-14 09:36:29 +00:00
parent 7366756079
commit 693599714a
8 changed files with 60 additions and 37 deletions

View file

@ -1,3 +1,17 @@
Sun May 14 18:05:59 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
* Makefile.in: missing/nt.c -> win32/win32.c
* configure.in: bug fix; static linking on mingw32
* cygwin/GNUmakefile.in: remove VPATH.
* ext/extmk.rb.in: Makefile set binmode with mingw32 on cygwin32.
* lib/mkmf.rb: ditto.
* win32/config.h: undef HAVE_SYS_FILE_H.
Sun May 14 02:02:48 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
* lib/irb/ruby-lex.rb: '/' should be escaped in charcter class.

View file

@ -212,9 +212,6 @@ strtol.@OBJEXT@: @srcdir@/missing/strtol.c
strtoul.@OBJEXT@: @srcdir@/missing/strtoul.c
$(CC) $(CFLAGS) $(CPPFLAGS) -c @srcdir@/missing/strtoul.c
nt.@OBJEXT@: @srcdir@/missing/nt.c
$(CC) $(CFLAGS) $(CPPFLAGS) -c @srcdir@/missing/nt.c
x68.@OBJEXT@: @srcdir@/missing/x68.c
$(CC) $(CFLAGS) $(CPPFLAGS) -c @srcdir@/missing/x68.c
@ -224,6 +221,9 @@ os2.@OBJEXT@: @srcdir@/missing/os2.c
dl_os2.@OBJEXT@: @srcdir@/missing/dl_os2.c
$(CC) $(CFLAGS) $(CPPFLAGS) -c @srcdir@/missing/dl_os2.c
win32.@OBJEXT@: @srcdir@/win32/win32.c
$(CC) $(CFLAGS) $(CPPFLAGS) -c @srcdir@/win32/win32.c
# Prevent GNU make v3 from overflowing arg limit on SysV.
.NOEXPORT:
###

35
configure vendored
View file

@ -4958,14 +4958,10 @@ if test "$enable_shared" = 'yes'; then
FIRSTMAKEFILE=GNUmakefile:cygwin/GNUmakefile.in
case "$target_os" in
cygwin*)
LIBOBJS="$LIBOBJS strftime.o"
CCDLFLAGS=-DUSEIMPORTLIB
;;
CCDLFLAGS=-DUSEIMPORTLIB ;;
mingw*)
LIBOBJS="$LIBOBJS win32.o"
CFLAGS="-DNT -D__MSVCRT__ $CFLAGS"
CCDLFLAGS=-DIMPORT
;;
SOLIBS='-lwsock32 -lmsvcrt' ;;
esac
;;
*)
@ -4974,16 +4970,16 @@ if test "$enable_shared" = 'yes'; then
fi
case "$target_os" in
nextstep*)
nextstep*)
CFLAGS="$CFLAGS -pipe"
;;
openstep*)
;;
openstep*)
CFLAGS="$CFLAGS -pipe"
;;
rhasody*)
;;
rhasody*)
CFLAGS="$CFLAGS -pipe -no-precomp"
;;
osf*)
;;
osf*)
if test "$without_gcc" = "no" ; then
CFLAGS="$CFLAGS -ansi"
else
@ -5001,8 +4997,15 @@ case "$target_os" in
CFLAGS="$CFLAGS -std"
fi
;;
*)
;;
cygwin*)
LIBOBJS="$LIBOBJS strftime.o"
;;
mingw*)
LIBOBJS="$LIBOBJS win32.o"
CFLAGS="-DNT -D__MSVCRT__ $CFLAGS"
;;
*)
;;
esac
@ -5100,7 +5103,7 @@ EOF
fi
echo "creating config.h"
cat confdefs.h > config.h
tr -d '\015' < confdefs.h > config.h
trap '' 1 2 15
cat > confcache <<\EOF

View file

@ -792,14 +792,10 @@ if test "$enable_shared" = 'yes'; then
FIRSTMAKEFILE=GNUmakefile:cygwin/GNUmakefile.in
case "$target_os" in
cygwin*)
LIBOBJS="$LIBOBJS strftime.o"
CCDLFLAGS=-DUSEIMPORTLIB
;;
CCDLFLAGS=-DUSEIMPORTLIB ;;
mingw*)
LIBOBJS="$LIBOBJS win32.o"
CFLAGS="-DNT -D__MSVCRT__ $CFLAGS"
CCDLFLAGS=-DIMPORT
;;
SOLIBS='-lwsock32 -lmsvcrt' ;;
esac
;;
*)
@ -808,16 +804,16 @@ if test "$enable_shared" = 'yes'; then
fi
case "$target_os" in
nextstep*)
nextstep*)
CFLAGS="$CFLAGS -pipe"
;;
openstep*)
;;
openstep*)
CFLAGS="$CFLAGS -pipe"
;;
rhasody*)
;;
rhasody*)
CFLAGS="$CFLAGS -pipe -no-precomp"
;;
osf*)
;;
osf*)
if test "$without_gcc" = "no" ; then
CFLAGS="$CFLAGS -ansi"
else
@ -835,8 +831,15 @@ case "$target_os" in
CFLAGS="$CFLAGS -std"
fi
;;
*)
;;
cygwin*)
LIBOBJS="$LIBOBJS strftime.o"
;;
mingw*)
LIBOBJS="$LIBOBJS win32.o"
CFLAGS="-DNT -D__MSVCRT__ $CFLAGS"
;;
*)
;;
esac
AC_SUBST(LIBRUBY_LDSHARED)
@ -903,6 +906,6 @@ if test "$search_path" != ""; then
fi
echo "creating config.h"
cat confdefs.h > config.h
tr -d '\015' < confdefs.h > config.h
AC_OUTPUT($FIRSTMAKEFILE Makefile ext/extmk.rb)

View file

@ -3,7 +3,6 @@ include Makefile
ARCH=@arch@
ifneq (,$(findstring mingw, $(ARCH)))
VPATH = @srcdir@/missing:@srcdir@/win32
DLL = rubymg.dll
DLLWRAP_FLAGS =
else
@ -11,7 +10,9 @@ DLL = rubycw.dll
DLLWRAP_FLAGS = -Wl,-e,__cygwin_noncygwin_dll_entry@12
endif
ifeq (,$(strip $(LIBRUBY_ALIASES)))
miniruby$(EXEEXT): $(DLL)
endif
$(DLL): $(OBJS) dmyext.o
$(LDSHARED) $(DLDFLAGS) -o $(DLL) --output-lib=$(LIBRUBY_SO) --dllname=$(DLL) --add-stdcall-alias $(OBJS) dmyext.o $(LIBS)

View file

@ -348,6 +348,7 @@ def create_makefile(target)
$srcdir = $top_srcdir + "/ext/" + $mdir
mfile = open("Makefile", "w")
mfile.binmode if /mingw/ =~ RUBY_PLATFORM
mfile.printf "\
SHELL = /bin/sh

View file

@ -356,6 +356,7 @@ def create_makefile(target)
$objs = $objs.join(" ")
mfile = open("Makefile", "w")
mfile.binmode if /mingw/ =~ RUBY_PLATFORM
mfile.print <<EOMF
SHELL = /bin/sh

View file

@ -5,7 +5,7 @@
/* #define HAVE_UNISTD_H 1 */
#define HAVE_STDLIB_H 1
#define HAVE_LIMITS_H 1
#define HAVE_SYS_FILE_H 1
/* #define HAVE_SYS_FILE_H 1 */
#define HAVE_FCNTL_H 1
/* #define HAVE_PWD_H 1 */
/* #define HAVE_SYS_TIME_H 1 */