Skip to content

Commit

Permalink
* configure.in: remove unnecessary AC_CANONICAL_BUILD
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
eban committed May 28, 2001
1 parent e83171c commit 0328254
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 20 deletions.
24 changes: 21 additions & 3 deletions ChangeLog
@@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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>

Expand Down
7 changes: 0 additions & 7 deletions configure.in
Expand Up @@ -27,7 +27,6 @@ fi

AC_CANONICAL_HOST
AC_CANONICAL_TARGET
AC_CANONICAL_BUILD

dnl checks for fat-binary
fat_binary=no
Expand Down Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion cygwin/GNUmakefile.in
Expand Up @@ -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)))
Expand All @@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion defines.h
Expand Up @@ -83,7 +83,7 @@
#undef HAVE_SETITIMER
#endif

#if defined(DJGPP) || defined(__BOW__) || defined __CYGWIN__
#if defined(DJGPP) || defined(__BOW__)
#undef HAVE_SETITIMER
#endif

Expand Down
2 changes: 1 addition & 1 deletion ext/sdbm/_sdbm.c
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions ext/tcltklib/extconf.rb
Expand Up @@ -67,5 +67,6 @@ def find_tk(tklib, stubs)
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
2 changes: 1 addition & 1 deletion ext/tcltklib/stubs.c
Expand Up @@ -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
Expand Down
21 changes: 15 additions & 6 deletions ruby.c
Expand Up @@ -12,7 +12,7 @@
**********************************************************************/

#ifdef _WIN32
#if defined _WIN32 || defined __CYGWIN__
#include <windows.h>
#endif
#include "ruby.h"
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 0328254

Please sign in to comment.