diff options
author | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-05-28 16:07:34 +0000 |
---|---|---|
committer | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-05-28 16:07:34 +0000 |
commit | f2a1269383c19a2d6d9fd475681b34e5e81e65e3 (patch) | |
tree | d3963caf54dcf32f36f92465c3c17049e65326a2 | |
parent | 6024ca4f7239b1900b570f2d8c2842c48eaf3ad7 (diff) | |
download | ruby-f2a1269383c19a2d6d9fd475681b34e5e81e65e3.tar.gz |
* configure.in: remove unnecessary AC_CANONICAL_BUILD
* defins.h: #define HAVE_SETITIMER on Cygwin(bug fixed).
* ruby.c: use relative path from LIBRUBY_SO.
* ruby.c: don't use -mwin32 option on Cygwin.
* cygwin/GNUmakefile.in: ditto.
* ext/sdbm/_sdbm: ditto.
* ext/tcltklib/extconf.rb: ditto.
* ext/tcltklib/stubs.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 18 | ||||
-rw-r--r-- | configure.in | 7 | ||||
-rw-r--r-- | cygwin/GNUmakefile.in | 4 | ||||
-rw-r--r-- | defines.h | 2 | ||||
-rw-r--r-- | ext/sdbm/_sdbm.c | 2 | ||||
-rw-r--r-- | ext/tcltklib/extconf.rb | 1 | ||||
-rw-r--r-- | ext/tcltklib/stubs.c | 2 | ||||
-rw-r--r-- | ruby.c | 21 |
8 files changed, 40 insertions, 17 deletions
@@ -1,3 +1,21 @@ +Mon May 28 23:20:43 2001 WATANABE Hirofumi <eban@ruby-lang.org> + + * configure.in: remove unnecessary AC_CANONICAL_BUILD + + * defins.h: #define HAVE_SETITIMER on Cygwin(bug fixed). + + * ruby.c: use relative path from LIBRUBY_SO. + + * ruby.c: don't use -mwin32 option on Cygwin. + + * cygwin/GNUmakefile.in: ditto. + + * ext/sdbm/_sdbm: ditto. + + * ext/tcltklib/extconf.rb: ditto. + + * ext/tcltklib/stubs.c: ditto. + Mon May 28 22:12:01 2001 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp> * ext/extconf.rb.in: make the priority of the make rule of .c diff --git a/configure.in b/configure.in index 65a560be28..8a0e288dcd 100644 --- a/configure.in +++ b/configure.in @@ -27,7 +27,6 @@ fi AC_CANONICAL_HOST AC_CANONICAL_TARGET -AC_CANONICAL_BUILD dnl checks for fat-binary fat_binary=no @@ -96,14 +95,8 @@ cygwin*|mingw*) AC_CHECK_TOOL(AS, as) AC_CHECK_TOOL(DLLTOOL, dlltool) AC_CHECK_TOOL(WINDRES, windres) - echo 'main(){}' > conftest.c - if $CC -mwin32 -c conftest.c 2> /dev/null; then - MWIN32=-mwin32 - CFLAGS="$CFLAGS $MWIN32" - fi ;; esac -AC_SUBST(MWIN32) AC_PROG_LN_S AC_PROG_MAKE_SET diff --git a/cygwin/GNUmakefile.in b/cygwin/GNUmakefile.in index 0e89d15dec..4fc628f4da 100644 --- a/cygwin/GNUmakefile.in +++ b/cygwin/GNUmakefile.in @@ -5,6 +5,8 @@ ENABLE_SHARED=@ENABLE_SHARED@ ifneq (,$(findstring no, $(ENABLE_SHARED))) EXTOBJS = $(RUBY_INSTALL_NAME).exp LIBRUBYARG = $(LIBRUBY_A) +else + CPPFLAGS += -DLIBRUBY_SO=\"$(LIBRUBY_SO)\" endif ifneq (,$(findstring ruby, $(RUBY_INSTALL_NAME))) @@ -21,7 +23,7 @@ $(LIBRUBY_SO): $(RUBYDEF) $(LIBRUBY_SO).res.@OBJEXT@ $(LIBRUBY): $(LIBRUBY_SO) %.res.@OBJEXT@: %.rc - @WINDRES@ --preprocessor '$(CC) -E -xc-header -DRC_INVOKE @MWIN32@' --include-dir . --include-dir $(<D) --include-dir $(srcdir)/win32 $< $@ + @WINDRES@ --include-dir . --include-dir $(<D) --include-dir $(srcdir)/win32 $< $@ $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(LIBRUBY_SO).rc: rbconfig.rb @@MINIRUBY@ $(srcdir)/win32/resource.rb \ @@ -73,7 +73,7 @@ #undef HAVE_SETITIMER #endif -#if defined(DJGPP) || defined(__BOW__) || defined __CYGWIN__ +#if defined(DJGPP) || defined(__BOW__) #undef HAVE_SETITIMER #endif diff --git a/ext/sdbm/_sdbm.c b/ext/sdbm/_sdbm.c index 92c96f26d0..d8bfae80b2 100644 --- a/ext/sdbm/_sdbm.c +++ b/ext/sdbm/_sdbm.c @@ -103,7 +103,7 @@ static int duppair proto((char *, datum)); /* * externals */ -#if !defined(sun) && !defined(MSDOS) && !defined(_WIN32) +#if !defined sun && !defined MSDOS && !defined _WIN32 && !defined __CYGWIN__ extern int errno; #endif diff --git a/ext/tcltklib/extconf.rb b/ext/tcltklib/extconf.rb index c9082e0a7f..f732c165dc 100644 --- a/ext/tcltklib/extconf.rb +++ b/ext/tcltklib/extconf.rb @@ -67,5 +67,6 @@ if have_header("tcl.h") && have_header("tk.h") && find_tcl(tcllib, stubs) && find_tk(tklib, stubs) $CPPFLAGS += ' -DUSE_TCL_STUBS -DUSE_TK_STUBS' if stubs + $CPPFLAGS += ' -D_WIN32' if /cygwin/ =~ RUBY_PLATFORM create_makefile("tcltklib") end diff --git a/ext/tcltklib/stubs.c b/ext/tcltklib/stubs.c index 537ca74d37..faf5b4bb4b 100644 --- a/ext/tcltklib/stubs.c +++ b/ext/tcltklib/stubs.c @@ -3,7 +3,7 @@ #include <tk.h> #include "ruby.h" -#if defined _WIN32 +#if defined _WIN32 || defined __CYGWIN__ # include <windows.h> typedef HINSTANCE DL_HANDLE; # define DL_OPEN LoadLibrary @@ -12,7 +12,7 @@ **********************************************************************/ -#ifdef _WIN32 +#if defined _WIN32 || defined __CYGWIN__ #include <windows.h> #endif #include "ruby.h" @@ -106,7 +106,7 @@ extern VALUE rb_load_path; #define STATIC_FILE_LENGTH 255 -#if defined(_WIN32) || defined(DJGPP) +#if defined _WIN32 || defined __CYGWIN__ || defined __DJGPP__ static char * rubylib_mangle(s, l) char *s; @@ -172,7 +172,7 @@ ruby_incpush(path) const char sep = PATH_SEP_CHAR; if (path == 0) return; -#if defined(__CYGWIN32__) +#if defined(__CYGWIN__) { char rubylib[FILENAME_MAX]; conv_to_posix_path(path, rubylib, FILENAME_MAX); @@ -202,15 +202,24 @@ ruby_incpush(path) } } +#if defined _WIN32 || defined __CYGWIN__ || defined __DJGPP__ || defined __EMX__ +#define LOAD_RELATIVE 1 +#endif + void ruby_init_loadpath() { -#if defined(_WIN32) || defined(DJGPP) || defined(__EMX__) +#if defined LOAD_RELATIVE char libpath[FILENAME_MAX+1]; char *p; int rest; -#if defined(_WIN32) - GetModuleFileName(NULL, libpath, sizeof libpath); +#if defined _WIN32 || defined __CYGWIN__ +# if defined LIBRUBY_SO + HMODULE libruby = GetModuleHandle(LIBRUBY_SO); +# else + HMODULE libruby = NULL; +# endif + GetModuleFileName(libruby, libpath, sizeof libpath); #elif defined(DJGPP) extern char *__dos_argv0; strncpy(libpath, __dos_argv0, FILENAME_MAX); |