Permalink
Browse files

fix bug; support mingw32.

git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information...
1 parent d521393 commit 39ceaddfc9dbd85d51e4947867a91d23227a51e0 @eban eban committed May 14, 2000
Showing with 60 additions and 37 deletions.
  1. +14 −0 ChangeLog
  2. +3 −3 Makefile.in
  3. +19 −16 configure
  4. +19 −16 configure.in
  5. +2 −1 cygwin/GNUmakefile.in
  6. +1 −0 ext/extmk.rb.in
  7. +1 −0 lib/mkmf.rb
  8. +1 −1 win32/config.h
View
@@ -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
@@ -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:
###
View
@@ -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
@@ -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)
@@ -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)
View
@@ -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
@@ -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
@@ -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 */

0 comments on commit 39ceadd

Please sign in to comment.