Navigation Menu

Skip to content

Commit

Permalink
fix bug; support mingw32.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
eban committed May 14, 2000
1 parent d521393 commit 39ceadd
Show file tree
Hide file tree
Showing 8 changed files with 60 additions and 37 deletions.
14 changes: 14 additions & 0 deletions ChangeLog
@@ -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.
Expand Down
6 changes: 3 additions & 3 deletions Makefile.in
Expand Up @@ -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

Expand All @@ -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:
###
Expand Down
35 changes: 19 additions & 16 deletions configure
Expand Up @@ -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
;;
*)
Expand All @@ -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
Expand All @@ -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


Expand Down Expand Up @@ -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
Expand Down
35 changes: 19 additions & 16 deletions configure.in
Expand Up @@ -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
;;
*)
Expand All @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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)
3 changes: 2 additions & 1 deletion cygwin/GNUmakefile.in
Expand Up @@ -3,15 +3,16 @@ include Makefile
ARCH=@arch@

ifneq (,$(findstring mingw, $(ARCH)))
VPATH = @srcdir@/missing:@srcdir@/win32
DLL = rubymg.dll
DLLWRAP_FLAGS =
else
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)
1 change: 1 addition & 0 deletions ext/extmk.rb.in
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions lib/mkmf.rb
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion win32/config.h
Expand Up @@ -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 */
Expand Down

0 comments on commit 39ceadd

Please sign in to comment.