To: vim-dev@vim.org Subject: Patch 6.1.292 (extra) Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.292 (extra) Problem: Win32: Can't compile with new MingW compiler. Borland 5 makefile doesn't generate pathdef.c. Solution: Remove -wwide-multiply argument. (Rene de Zwart) Various fixes for other problems in Win32 makefiles. (Dan Sharp) Files: src/Make_bc5.mak, src/Make_cyg.mak, src/Make_ming.mak, src/Make_mvc.mak *** ../vim61.291/src/Make_bc5.mak Sun Oct 27 20:49:12 2002 --- src/Make_bc5.mak Sun Jan 19 16:03:07 2003 *************** *** 54,61 **** # ICONV no or yes: set to yes for dynamic iconv support (yes) # OLE no or yes: set to yes to make OLE gvim (no) # OSTYPE DOS16 or WIN32 (WIN32) ! # DEBUG set to "-v" if you wish a DEBUGging build (not defined) ! # CODEGUARD set to "-vG" if you want to use CODEGUARD (not defined) # CPUNR 1 through 6: select -CPU argument to compile with (3) # 3 for 386, 4 for 486, 5 for pentium, 6 for pentium pro. # USEDLL no or yes: set to yes to use the Runtime library DLL (no) --- 54,61 ---- # ICONV no or yes: set to yes for dynamic iconv support (yes) # OLE no or yes: set to yes to make OLE gvim (no) # OSTYPE DOS16 or WIN32 (WIN32) ! # DEBUG no or yes: set to yes if you wish a DEBUGging build (no) ! # CODEGUARD no or yes: set to yes if you want to use CODEGUARD (no) # CPUNR 1 through 6: select -CPU argument to compile with (3) # 3 for 386, 4 for 486, 5 for pentium, 6 for pentium pro. # USEDLL no or yes: set to yes to use the Runtime library DLL (no) *************** *** 113,122 **** !endif # ### DEBUG: Uncomment to make an executable for debugging ! #DEBUG = -v # ### CODEGUARD: Uncomment to use the CODEGUARD stuff (BC 5.0 or later): ! #CODEGUARD = -vG # ### CPUNR: set your target processor (3 to 6) !if ("$(CPUNR)"=="") --- 113,128 ---- !endif # ### DEBUG: Uncomment to make an executable for debugging ! # DEBUG = yes ! !if ("$(DEBUG)"=="yes") ! DEBUG_FLAG = -v ! !endif # ### CODEGUARD: Uncomment to use the CODEGUARD stuff (BC 5.0 or later): ! # CODEGUARD = yes ! !if ("$(CODEGUARD)"=="yes") ! CODEGUARD_FLAG = -vG ! !endif # ### CPUNR: set your target processor (3 to 6) !if ("$(CPUNR)"=="") *************** *** 172,177 **** --- 178,188 ---- ### POSTSCRIPT: uncomment this line if you want PostScript printing #POSTSCRIPT = yes # + # If you have a fixed directory for $VIM or $VIMRUNTIME, other than the normal + # default, use these lines. + #VIMRCLOC = somewhere + #VIMRUNTIMEDIR = somewhere + ### Set the default $(WINVER) to make it work with Bcc 5.5. !ifndef WINVER WINVER = -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 *************** *** 200,206 **** # # Optimizations: change as desired (RECOMMENDATION: Don't change!): # ! !ifdef DEBUG OPT = -Od -N !else !if ($(OPTIMIZE)==SPACE) --- 211,217 ---- # # Optimizations: change as desired (RECOMMENDATION: Don't change!): # ! !if ("$(DEBUG)"=="yes") OPT = -Od -N !else !if ($(OPTIMIZE)==SPACE) *************** *** 211,217 **** !if ("$(FASTCALL)"=="yes") OPT = $(OPT) -pr !endif ! !ifndef CODEGUARD OPT = $(OPT) -vi- !endif !endif --- 222,228 ---- !if ("$(FASTCALL)"=="yes") OPT = $(OPT) -pr !endif ! !if ("$(CODEGUARD)"!="yes") OPT = $(OPT) -vi- !endif !endif *************** *** 223,229 **** # shouldn't have to change: LIB = $(BOR)\lib INCLUDE = $(BOR)\include;.;proto ! DEFINES = -DFEAT_$(FEATURES) -DWIN32 -DPC $(WINVER) # !ifdef PERL INTERP_DEFINES = $(INTERP_DEFINES) -DFEAT_PERL --- 234,240 ---- # shouldn't have to change: LIB = $(BOR)\lib INCLUDE = $(BOR)\include;.;proto ! DEFINES = -DFEAT_$(FEATURES) -DWIN32 -DPC $(WINVER) -DHAVE_PATHDEF # !ifdef PERL INTERP_DEFINES = $(INTERP_DEFINES) -DFEAT_PERL *************** *** 293,299 **** CPUARG = -$(CPUNR) ALIGNARG = -a$(ALIGN) # ! !ifdef DEBUG DEFINES=$(DEFINES) -DDEBUG !endif # --- 304,310 ---- CPUARG = -$(CPUNR) ALIGNARG = -a$(ALIGN) # ! !if ("$(DEBUG)"=="yes") DEFINES=$(DEFINES) -DDEBUG !endif # *************** *** 310,316 **** !if ("$(GUI)"=="yes") DEFINES = $(DEFINES) -DFEAT_GUI_W32 -DFEAT_CLIPBOARD ! !ifdef DEBUG TARGET = gvimd.exe !else TARGET = gvim.exe --- 321,327 ---- !if ("$(GUI)"=="yes") DEFINES = $(DEFINES) -DFEAT_GUI_W32 -DFEAT_CLIPBOARD ! !if ("$(DEBUG)"=="yes") TARGET = gvimd.exe !else TARGET = gvim.exe *************** *** 325,331 **** LINK2 = -aa RESFILE = vim.res !else ! !ifdef DEBUG TARGET = vimd.exe !else # for now, anyway: VIMDLL is only for the GUI version --- 336,342 ---- LINK2 = -aa RESFILE = vim.res !else ! !if ("$(DEBUG)"=="yes") TARGET = vimd.exe !else # for now, anyway: VIMDLL is only for the GUI version *************** *** 349,355 **** DEFINES = $(DEFINES) -D_RTLDLL !endif ! !ifdef DEBUG OBJDIR = $(OSTYPE)\objdbg !else !if ("$(GUI)"=="yes") --- 360,366 ---- DEFINES = $(DEFINES) -D_RTLDLL !endif ! !if ("$(DEBUG)"=="yes") OBJDIR = $(OSTYPE)\objdbg !else !if ("$(GUI)"=="yes") *************** *** 375,381 **** LINK = $(BOR)\BIN\TLink !endif CC = $(BOR)\BIN\Bcc ! LFLAGS = -Tde -c -m -L$(LIB) $(DEBUG) $(LINK2) LFLAGSDLL = CFLAGS = -w- -w-aus -w-par -I$(INCLUDE) -H- -P- $(HEADERS) !else --- 386,392 ---- LINK = $(BOR)\BIN\TLink !endif CC = $(BOR)\BIN\Bcc ! LFLAGS = -Tde -c -m -L$(LIB) $(DEBUG_FLAG) $(LINK2) LFLAGSDLL = CFLAGS = -w- -w-aus -w-par -I$(INCLUDE) -H- -P- $(HEADERS) !else *************** *** 384,395 **** LINK = $(BOR)\BIN\ILink32 !endif CC = $(BOR)\BIN\Bcc32 ! LFLAGS = -OS -r -Tpe -c -m -L$(LIB) $(DEBUG) $(LINK2) ! LFLAGSDLL = -Tpd -c -m -L$(LIB) $(DEBUG) $(LINK2) CFLAGS = -w- -w-aus -w-par -I$(INCLUDE) -P- -d -x- -RT- -k- -Oi $(HEADERS) -f- !endif ! CC1 = -c CC2 = -o CCARG = +$(OBJDIR)\bcc.cfg --- 395,406 ---- LINK = $(BOR)\BIN\ILink32 !endif CC = $(BOR)\BIN\Bcc32 ! LFLAGS = -OS -r -Tpe -c -m -L$(LIB) $(DEBUG_FLAG) $(LINK2) ! LFLAGSDLL = -Tpd -c -m -L$(LIB) $(DEBUG_FLAG) $(LINK2) CFLAGS = -w- -w-aus -w-par -I$(INCLUDE) -P- -d -x- -RT- -k- -Oi $(HEADERS) -f- !endif ! CC1 = -q -c CC2 = -o CCARG = +$(OBJDIR)\bcc.cfg *************** *** 440,445 **** --- 451,457 ---- $(OBJDIR)\normal.obj \ $(OBJDIR)\ops.obj \ $(OBJDIR)\option.obj \ + $(OBJDIR)\pathdef.obj \ $(OBJDIR)\quickfix.obj \ $(OBJDIR)\regexp.obj \ $(OBJDIR)\screen.obj \ *************** *** 479,485 **** !if ("$(VIMDLL)"=="yes") vimdllobj = $(vimobj) ! !ifdef DEBUG DLLTARGET = vim32d.dll !else DLLTARGET = vim32.dll --- 491,497 ---- !if ("$(VIMDLL)"=="yes") vimdllobj = $(vimobj) ! !if ("$(DEBUG)"=="yes") DLLTARGET = vim32d.dll !else DLLTARGET = vim32.dll *************** *** 524,533 **** !if ("$(ICONV)"=="yes") MSG = $(MSG) ICONV !endif ! !ifdef DEBUG MSG = $(MSG) DEBUG !endif ! !ifdef CODEGUARD MSG = $(MSG) CODEGUARD !endif !ifdef PERL --- 536,545 ---- !if ("$(ICONV)"=="yes") MSG = $(MSG) ICONV !endif ! !if ("$(DEBUG)"=="yes") MSG = $(MSG) DEBUG !endif ! !if ("$(CODEGUARD)"=="yes") MSG = $(MSG) CODEGUARD !endif !ifdef PERL *************** *** 572,578 **** all: vim vimrun.exe install.exe xxd uninstal.exe vim: $(OSTYPE) $(OBJDIR) $(OBJDIR)\bcc.cfg $(TARGETS) ! @del $(OBJDIR)\version.obj $(OSTYPE): -@md $(OSTYPE) --- 584,591 ---- all: vim vimrun.exe install.exe xxd uninstal.exe vim: $(OSTYPE) $(OBJDIR) $(OBJDIR)\bcc.cfg $(TARGETS) ! @if exist $(OBJDIR)\version.obj del $(OBJDIR)\version.obj ! @if exist auto\pathdef.c del auto\pathdef.c $(OSTYPE): -@md $(OSTYPE) *************** *** 622,628 **** c0d32.obj + $(vimdllobj) $<,$* ! !ifdef CODEGUARD cg32.lib+ !endif !if ("$(OLE)"=="yes") --- 635,641 ---- c0d32.obj + $(vimdllobj) $<,$* ! !if ("$(CODEGUARD)"=="yes") cg32.lib+ !endif !if ("$(OLE)"=="yes") *************** *** 668,674 **** !endif $<,$* !if ($(OSTYPE)==WIN32) ! !ifdef CODEGUARD cg32.lib+ !endif !if ("$(OLE)"=="yes") --- 681,687 ---- !endif $<,$* !if ($(OSTYPE)==WIN32) ! !if ("$(CODEGUARD)"=="yes") cg32.lib+ !endif !if ("$(OLE)"=="yes") *************** *** 788,794 **** $(OBJDIR)\if_ole.obj: if_ole.cpp $(OBJDIR)\os_w32exe.obj: os_w32exe.c - $(CC) $(CCARG) $(CC1) -I$(INCLUDE) -WE $(CC2)$@ os_w32exe.c $(OBJDIR)\if_perl.obj: if_perl.c perl.lib $(CC) $(CCARG) $(CC1) $(CC2)$@ -pc if_perl.c --- 801,806 ---- *************** *** 810,815 **** --- 822,840 ---- vim.ico vim_error.ico vim_alert.ico vim_info.ico vim_quest.ico $(BRC) $(DEFINES) -fo$(OBJDIR)\vim.res -i $(BOR)\include -w32 -r vim.rc + $(OBJDIR)\pathdef.obj: auto\pathdef.c + + auto\pathdef.c:: + @echo creating auto/pathdef.c + @echo "/* pathdef.c */" > auto\pathdef.c + @echo "#include \"vim.h\" " >> auto\pathdef.c + @echo "char_u *default_vim_dir = (char_u *)\"$(VIMRCLOC:\=\\)\" "; >> auto\pathdef.c + @echo "char_u *default_vimruntime_dir = (char_u *)\"$(VIMRUNTIMEDIR:\=\\)\" "; >> auto\pathdef.c + @echo "char_u *all_cflags = (char_u *)\"$(CC:\=\\\\) $(CFLAGS:\=\\\\) $(DEFINES) $(MBDEFINES) $(INTERP_DEFINES:"=\\") $(OPT) $(EXETYPE) $(CPUARG) $(ALIGNARG) $(DEBUG_FLAG) $(CODEGUARD_FLAG)\" "; >> auto\pathdef.c + @echo "char_u *all_lflags = (char_u *)\"$(LINK:\=\\\\) $(LFLAGS:\=\\\\)\" "; >> auto\pathdef.c + @echo "char_u *compiled_user = (char_u *)\"$(USERNAME)\" "; >> auto\pathdef.c + @echo "char_u *compiled_sys = (char_u *)\"$(USERDOMAIN)\" "; >> auto\pathdef.c + perl.lib: $(PERL)\lib\CORE\perl$(PERL_VER).lib coff2omf $(PERL)\lib\CORE\perl$(PERL_VER).lib $@ *************** *** 828,837 **** !if ("$(DYNAMIC_TCL)" == "yes") tclstub$(TCL_VER)-bor.lib: ! -@IF NOT EXIST $@ ECHO You must download tclstub83-bor.lib separately and\ place it in the src directory in order to compile a dynamic TCL-enabled\ ! (g)vim with the Borland compiler. You can get the tclstub83-bor.lib file\ ! at http://mywebpage.netscape.com/sharppeople/vim/tclstub83-bor.lib !endif # vimrun.exe: --- 853,862 ---- !if ("$(DYNAMIC_TCL)" == "yes") tclstub$(TCL_VER)-bor.lib: ! -@IF NOT EXIST $@ ECHO You must download tclstub$(TCL_VER)-bor.lib separately and\ place it in the src directory in order to compile a dynamic TCL-enabled\ ! (g)vim with the Borland compiler. You can get the tclstub$(TCL_VER)-bor.lib file\ ! at http://mywebpage.netscape.com/sharppeople/vim/tclstub$(TCL_VER)-bor.lib !endif # vimrun.exe: *************** *** 851,859 **** $(MBDEFINES) $(INTERP_DEFINES) $(EXETYPE) ! $(DEBUG) $(OPT) ! $(CODEGUARD) $(CPUARG) $(ALIGNARG) | $@ --- 876,884 ---- $(MBDEFINES) $(INTERP_DEFINES) $(EXETYPE) ! $(DEBUG_FLAG) $(OPT) ! $(CODEGUARD_FLAG) $(CPUARG) $(ALIGNARG) | $@ *** ../vim61.291/src/Make_cyg.mak Mon Nov 11 21:34:16 2002 --- src/Make_cyg.mak Sun Jan 19 16:04:41 2003 *************** *** 4,10 **** # 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: 2002 Nov 2 # # 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) --- 4,10 ---- # 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 Jan 19 # # 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) *************** *** 61,67 **** ### See feature.h for a list of optionals. ### Any other defines can be included here. ! DEFINES = -D__CYGWIN__ -DHAVE_PATHDEF -DFEAT_$(FEATURES) INCLUDES = -mcpu=$(CPUNR) -march=$(ARCH) #>>>>> name of the compiler and linker, name of lib directory --- 61,67 ---- ### See feature.h for a list of optionals. ### Any other defines can be included here. ! DEFINES = -DHAVE_PATHDEF -DFEAT_$(FEATURES) INCLUDES = -mcpu=$(CPUNR) -march=$(ARCH) #>>>>> name of the compiler and linker, name of lib directory *************** *** 165,170 **** --- 165,172 ---- ############################## ifeq (no, $(USEDLL)) INCLUDES += -mno-cygwin + else + DEFINES += -D__CYGWIN__ endif ############################## *************** *** 172,187 **** DEFINES += -DMSWINPS endif - ############################## - # OLE does not work with the current (2.0-1) w32api headers in Cygwin. They - # define DeregisterTypeLib instead of UnRegisterTypeLib in oleauto.h, even though - # the supplied oleaut32.a library implements UnRegisterTypeLib and not - # DeregisterTypeLib. - # - # OLE=yes will work if you patch if_ole.cpp to include the prototype - # WINOLEAUTAPI UnRegisterTypeLib(REFGUID libID, WORD wVerMajor, - # WORD wVerMinor, LCID lcid, SYSKIND syskind); - # ############################## ifeq (yes, $(OLE)) INCLUDES += -DFEAT_OLE --- 174,179 ---- *** ../vim61.291/src/Make_ming.mak Wed Mar 13 21:29:10 2002 --- src/Make_ming.mak Sun Jan 19 16:06:22 2003 *************** *** 2,7 **** --- 2,8 ---- # Info at http://www.mingw.org # Also requires 'GNU make 3.77', which you can get through a link # to 'JanJaap's page from the above page. + # Get missing libraries from http://gnuwin32.sf.net. # # Tested on Win32 NT 4 and Win95. # *************** *** 27,42 **** OPTSIZE=0 # set to 1 to make gvim, 0 for vim GUI=1 ! # set to 1 to make minimal version (few features) ! MIN=0 # set to one of i386, i486, i586, i686 as the *target* processor ! CPU=i686 ! # set to same choices as 'CPU', but will prevent running on 'lower' cpus: ARCH=i386 # set to '1' to cross-compile from unix; 0=native Windows CROSS=0 # set to path to iconv.h and libiconv.a to enable using 'iconv.dll' #ICONV="." # Added by E.F. Amatria 2001 Feb 23 # Uncomment the first line and one of the following three if you want Native Language --- 28,46 ---- OPTSIZE=0 # set to 1 to make gvim, 0 for vim GUI=1 ! # FEATURES=[TINY | SMALL | NORMAL | BIG | HUGE] ! # set to TINY to make minimal version (few features) ! FEATURES=BIG # set to one of i386, i486, i586, i686 as the *target* processor ! CPUNR=i686 ! # set to same choices as 'CPUNR', but will prevent running on 'lower' cpus: ARCH=i386 # set to '1' to cross-compile from unix; 0=native Windows CROSS=0 # set to path to iconv.h and libiconv.a to enable using 'iconv.dll' #ICONV="." + # set to 1 to enable writing a postscript file with :hardcopy + POSTSCRIPT=0 # Added by E.F. Amatria 2001 Feb 23 # Uncomment the first line and one of the following three if you want Native Language *************** *** 165,172 **** #>>>>> end of choices ########################################################################### ! CFLAGS = -Iproto $(DEFINES) -pipe -malign-double -mwide-multiply -w ! CFLAGS += -march=$(ARCH) -mcpu=$(CPU) -Wall ifdef GETTEXT DEFINES +=-DHAVE_GETTEXT -DHAVE_LOCALE_H --- 169,176 ---- #>>>>> end of choices ########################################################################### ! CFLAGS = -Iproto $(DEFINES) -pipe -malign-double -w ! CFLAGS += -march=$(ARCH) -mcpu=$(CPUNR) -Wall -DFEAT_$(FEATURES) ifdef GETTEXT DEFINES +=-DHAVE_GETTEXT -DHAVE_LOCALE_H *************** *** 202,213 **** endif endif ifeq ($(DEBUG),1) CFLAGS += -g -fstack-check else CFLAGS += -s CFLAGS += -fomit-frame-pointer -freg-struct-return ! CFLAGS += -malign-double -mwide-multiply -finline-functions ifeq ($(OPTSIZE),1) CFLAGS += -Os else --- 206,221 ---- endif endif + ifdef POSTSCRIPT + CFLAGS += -DMSWINPS + endif + ifeq ($(DEBUG),1) CFLAGS += -g -fstack-check else CFLAGS += -s CFLAGS += -fomit-frame-pointer -freg-struct-return ! CFLAGS += -malign-double -finline-functions ifeq ($(OPTSIZE),1) CFLAGS += -Os else *** ../vim61.291/src/Make_mvc.mak Tue Jun 18 21:36:39 2002 --- src/Make_mvc.mak Sun Jan 19 16:06:30 2003 *************** *** 50,55 **** --- 50,56 ---- # INTL=[yes or no] (default is yes) # See http://sourceforge.net/projects/gettext/ # PostScript printing: POSTSCRIPT=yes + # Feature Set: FEATURES=[TINY, SMALL, NORMAL, BIG, or HUGE] # # You can combine any of these interfaces # *************** *** 477,482 **** --- 478,491 ---- !if "$(POSTSCRIPT)" == "yes" CFLAGS = $(CFLAGS) -DMSWINPS !endif # POSTSCRIPT + + # + # FEATURES: TINY, SMALL, NORMAL, BIG or HUGE + # + !if "$(FEATURES)"=="" + FEATURES = BIG + !endif + CFLAGS = $(CFLAGS) -DFEAT_$(FEATURES) # # End extra featuare include *** ../vim61.291/src/version.c Sun Jan 19 15:50:11 2003 --- src/version.c Sun Jan 19 16:09:10 2003 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 292, /**/ -- Normal people believe that if it ain't broke, don't fix it. Engineers believe that if it ain't broke, it doesn't have enough features yet. (Scott Adams - The Dilbert principle) /// Bram Moolenaar -- Bram@moolenaar.net -- http://www.Moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///