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

* 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/trunk@1472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
eban 2001-05-28 16:07:34 +00:00
parent e83171c4c4
commit 032825472b
8 changed files with 43 additions and 20 deletions

View file

@ -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
@ -366,7 +384,7 @@ Fri Apr 27 09:27:10 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
Thu Apr 26 22:36:11 2001 WATANABE Hirofumi <eban@ruby-lang.org>
* configure.in: don't use tzname on cygwin 1.3.1+.
* configure.in: don't use tzname on Cygwin 1.3.1+.
* configure.in: add -mieee/-ieee to CFLAGS on OSF1/Alpha
to disable "DIVISION BY ZERO" exception.
@ -1433,7 +1451,7 @@ Fri Feb 2 16:14:51 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
Wed Jan 31 22:27:29 2001 WATANABE Hirofumi <eban@ruby-lang.org>
* configure.in: gcc-2.95.2-7(cygwin) support.
* configure.in: gcc-2.95.2-7(Cygwin) support.
add -mwin32 if available.
* cygwin/GNUmakefile: ditto.
@ -2453,7 +2471,7 @@ Wed Oct 11 11:13:03 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
Tue Oct 10 16:11:54 2000 WATANABE Hirofumi <eban@ruby-lang.org>
* dln.c (dln_load): remove unused code for cygwin.
* dln.c (dln_load): remove unused code for Cygwin.
Tue Oct 10 09:49:23 2000 Yukihiro Matsumoto <matz@ruby-lang.org>

View file

@ -27,7 +27,6 @@ fi
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
AC_CANONICAL_BUILD
dnl checks for fat-binary
fat_binary=no
@ -107,14 +106,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

View file

@ -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 \

View file

@ -83,7 +83,7 @@
#undef HAVE_SETITIMER
#endif
#if defined(DJGPP) || defined(__BOW__) || defined __CYGWIN__
#if defined(DJGPP) || defined(__BOW__)
#undef HAVE_SETITIMER
#endif

View file

@ -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

View file

@ -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

View file

@ -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

21
ruby.c
View file

@ -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;
@ -173,7 +173,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);
@ -203,15 +203,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);