To: vim-dev@vim.org Subject: Patch 6.2.173 (extra) Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.2.173 (extra) Problem: Win32: Ruby interface doesn't work with Ruby 1.8.0 for other compilers than MSVC. Solution: Fix the BC5, Cygwin and Mingw makefiles. (Dan Sharp) Files: src/Make_bc5.mak, src/Make_cyg.mak, src/Make_ming.mak *** ../vim-6.2.172/src/Make_bc5.mak Sun Oct 12 16:42:14 2003 --- src/Make_bc5.mak Sun Jan 4 12:41:29 2004 *************** *** 45,50 **** --- 45,52 ---- # TCL_VER define to version of TCL being used (83) # DYNAMIC_TCL no or yes: use yes to load the TCL DLL dynamically (no) # RUBY define to path to Ruby dir to get Ruby support (not defined) + # NOTE: You may have to remove the defines for uid_t and gid_t + # from the Ruby config.h header file. # RUBY_VER define to version of Ruby being used (16) # NOTE: compilation on WinNT/2K/XP requires # at least version 1.6.5 of Ruby. Earlier versions *************** *** 320,334 **** !ifndef RUBY_VER_LONG RUBY_VER_LONG = 1.6 !endif !ifndef RUBY_PLATFORM RUBY_PLATFORM = i586-mswin32 !endif INTERP_DEFINES = $(INTERP_DEFINES) -DFEAT_RUBY INCLUDE = $(RUBY)\lib\ruby\$(RUBY_VER_LONG)\$(RUBY_PLATFORM);$(INCLUDE) - RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_VER) !if "$(DYNAMIC_RUBY)" == "yes" INTERP_DEFINES = $(INTERP_DEFINES) -DDYNAMIC_RUBY -DDYNAMIC_RUBY_DLL=\"$(RUBY_INSTALL_NAME).dll\" RUBY_LIB_FLAG = /nodefaultlib: !endif !endif --- 322,350 ---- !ifndef RUBY_VER_LONG RUBY_VER_LONG = 1.6 !endif + + !if "$(RUBY_VER)" == "16" !ifndef RUBY_PLATFORM RUBY_PLATFORM = i586-mswin32 !endif + !ifndef RUBY_INSTALL_NAME + RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_VER) + !endif + !else + !ifndef RUBY_PLATFORM + RUBY_PLATFORM = i386-mswin32 + !endif + !ifndef RUBY_INSTALL_NAME + RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_VER) + !endif + !endif + INTERP_DEFINES = $(INTERP_DEFINES) -DFEAT_RUBY INCLUDE = $(RUBY)\lib\ruby\$(RUBY_VER_LONG)\$(RUBY_PLATFORM);$(INCLUDE) !if "$(DYNAMIC_RUBY)" == "yes" INTERP_DEFINES = $(INTERP_DEFINES) -DDYNAMIC_RUBY -DDYNAMIC_RUBY_DLL=\"$(RUBY_INSTALL_NAME).dll\" + INTERP_DEFINES = $(INTERP_DEFINES) -DDYNAMIC_RUBY_VER=$(RUBY_VER) RUBY_LIB_FLAG = /nodefaultlib: !endif !endif *** ../vim-6.2.172/src/Make_cyg.mak Sun Oct 12 16:42:14 2003 --- src/Make_cyg.mak Sun Jan 4 12:37:06 2004 *************** *** 1,11 **** # # Makefile for VIM on Win32, using Cygnus gcc # # This compiles Vim as a Windows application. If you want Vim to run as a # Cygwin application use the Makefile (just like on Unix). # - # Last updated by Dan Sharp. Last Change: 2003 Sep 12 - # # GUI no or yes: set to yes if you want the GUI version (yes) # PERL define to path to Perl dir to get Perl support (not defined) # PERL_VER define to version of Perl being used (56) --- 1,10 ---- # # Makefile for VIM on Win32, using Cygnus gcc + # Last updated by Dan Sharp. Last Change: 2004 Jan 03 # # This compiles Vim as a Windows application. If you want Vim to run as a # Cygwin application use the Makefile (just like on Unix). # # GUI no or yes: set to yes if you want the GUI version (yes) # PERL define to path to Perl dir to get Perl support (not defined) # PERL_VER define to version of Perl being used (56) *************** *** 152,176 **** # DYNAMIC_RUBY=no does not (process exits). ############################## ifdef RUBY ifndef RUBY_VER_LONG RUBY_VER_LONG=1.6 endif - DEFINES += -DFEAT_RUBY - INCLUDES += -I$(RUBY)/lib/ruby/$(RUBY_VER_LONG)/i586-mswin32 - EXTRA_OBJS += $(OUTDIR)/if_ruby.o ifndef DYNAMIC_RUBY DYNAMIC_RUBY = yes endif ! ifndef RUBY_VER ! RUBY_VER=16 endif ifeq (yes, $(DYNAMIC_RUBY)) ! DEFINES += -DDYNAMIC_RUBY -DDYNAMIC_RUBY_DLL=\"mswin32-ruby$(RUBY_VER).dll\" else ! EXTRA_LIBS += $(RUBY)/lib/mswin32-ruby$(RUBY_VER).lib endif endif --- 151,194 ---- # DYNAMIC_RUBY=no does not (process exits). ############################## ifdef RUBY + + ifndef RUBY_VER + RUBY_VER=16 + endif + ifndef RUBY_VER_LONG RUBY_VER_LONG=1.6 endif ifndef DYNAMIC_RUBY DYNAMIC_RUBY = yes endif ! ifeq ($(RUBY_VER), 16) ! ifndef RUBY_PLATFORM ! RUBY_PLATFORM = i586-mswin32 ! endif ! ifndef RUBY_INSTALL_NAME ! RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_VER) ! endif ! else ! ifndef RUBY_PLATFORM ! RUBY_PLATFORM = i386-mswin32 ! endif ! ifndef RUBY_INSTALL_NAME ! RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_VER) ! endif endif + DEFINES += -DFEAT_RUBY + INCLUDES += -I$(RUBY)/lib/ruby/$(RUBY_VER_LONG)/$(RUBY_PLATFORM) + EXTRA_OBJS += $(OUTDIR)/if_ruby.o + ifeq (yes, $(DYNAMIC_RUBY)) ! DEFINES += -DDYNAMIC_RUBY -DDYNAMIC_RUBY_DLL=\"$(RUBY_INSTALL_NAME).dll\" ! DEFINES += -DDYNAMIC_RUBY_VER=$(RUBY_VER) else ! EXTRA_LIBS += $(RUBY)/lib/$(RUBY_INSTALL_NAME).lib endif endif *************** *** 446,452 **** --- 464,472 ---- endif $(OUTDIR)/if_ruby.o: if_ruby.c $(INCL) + ifeq (16, $(RUBY_VER)) $(CC) -c $(CFLAGS) -U_WIN32 if_ruby.c -o $(OUTDIR)/if_ruby.o + endif $(OUTDIR)/netbeans.o: netbeans.c $(INCL) $(NBDEBUG_DEP) $(CC) -c $(CFLAGS) netbeans.c -o $(OUTDIR)/netbeans.o *** ../vim-6.2.172/src/Make_ming.mak Sun Oct 12 16:42:14 2003 --- src/Make_ming.mak Sun Jan 4 12:37:06 2004 *************** *** 177,186 **** --- 177,198 ---- ifndef RUBY_VER_LONG RUBY_VER_LONG = 1.6 endif + + ifeq ($(RUBY_VER), 16) ifndef RUBY_PLATFORM RUBY_PLATFORM = i586-mswin32 endif + ifndef RUBY_INSTALL_NAME RUBY_INSTALL_NAME = mswin32-ruby$(RUBY_VER) + endif + else + ifndef RUBY_PLATFORM + RUBY_PLATFORM = i386-mswin32 + endif + ifndef RUBY_INSTALL_NAME + RUBY_INSTALL_NAME = msvcrt-ruby$(RUBY_VER) + endif + endif RUBYINC =-I $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/$(RUBY_PLATFORM) ifeq (no, $(DYNAMIC_RUBY)) *************** *** 244,249 **** --- 256,262 ---- CFLAGS += -DFEAT_RUBY $(RUBYINC) ifeq (yes, $(DYNAMIC_RUBY)) CFLAGS += -DDYNAMIC_RUBY -DDYNAMIC_RUBY_DLL=\"$(RUBY_INSTALL_NAME).dll\" + CFLAGS += -DDYNAMIC_RUBY_VER=$(RUBY_VER) endif endif *************** *** 507,513 **** --- 520,528 ---- $(CC) $(CFLAGS) -D__IID_DEFINED__ -c -o $(OUTDIR)/if_ole.o if_ole.cpp $(OUTDIR)/if_ruby.o: if_ruby.c $(INCL) + ifeq (16, $(RUBY)) $(CC) $(CFLAGS) -U_WIN32 -c -o $(OUTDIR)/if_ruby.o if_ruby.c + endif if_perl.c: if_perl.xs typemap perl $(PERLLIB)/ExtUtils/xsubpp -prototypes -typemap \ *** ../vim-6.2.172/src/version.c Tue Jan 6 16:27:05 2004 --- src/version.c Tue Jan 6 16:32:04 2004 *************** *** 639,640 **** --- 639,642 ---- { /* Add new patch number below this line */ + /**/ + 173, /**/ -- hundred-and-one symptoms of being an internet addict: 150. You find yourself counting emoticons to get to sleep. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///