Hi John, 2016/7/10 Sun 6:52:04 UTC+9 John Marriott wrote: > On 27-Jun-2016 4:38 AM, Bram Moolenaar wrote: > > Patch 7.4.1963 > > Problem: Running Win32 Vim in mintty does not work. > > Solution: Detect mintty and give a helpful error message. (Ken Takata) > > Files: src/Make_cyg_ming.mak, src/Make_mvc.mak, src/iscygpty.c, > > src/iscygpty.h, src/main.c, Filelist > > > > > > This patches generates this warning from mingw (both 32 and 64 bit): > gcc -c -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 > -DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -pipe -march=n > ative -Wall -O3 -fomit-frame-pointer -freg-struct-return -s iscygpty.c > -o objnative/iscygpty.o -D_WIN32_WINNT=0x0600 -DU > SE_DYNFILEID -DENABLE_STUB_IMPL > <command-line>:0:0: warning: "_WIN32_WINNT" redefined > <command-line>:0:0: note: this is the location of the previous definition > > This is the relevant line in the makefile (line 896): > $(CC) -c $(CFLAGS) iscygpty.c -o $(OUTDIR)/iscygpty.o > -D_WIN32_WINNT=0x0600 -DUSE_DYNFILEID -DENABLE_STUB_IMPL > > CFLAGS defines _WIN32_WINNT to be equal to $(WINVER) (line 381). > Dropping -D_WIN32_WINNT=0x0600 from the line in the makefile removes the > warning for me.
I wanted to override the default value of _WIN32_WINNT (0x0501) with 0x0600 (or higher) when compiling iscygpty.c. So -U_WIN32_WINNT should be inserted instead of dropping -D_WIN32_WINNT=0x0600. Regards, Ken Takata -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
# HG changeset patch # Parent a5da25ca6c52cf326e6dd7fa13892029497c00e0 diff --git a/src/Make_cyg_ming.mak b/src/Make_cyg_ming.mak --- a/src/Make_cyg_ming.mak +++ b/src/Make_cyg_ming.mak @@ -896,7 +896,7 @@ if_perl.c: if_perl.xs typemap $(PERLTYPEMAP) if_perl.xs -output $@ $(OUTDIR)/iscygpty.o: iscygpty.c $(CUI_INCL) - $(CC) -c $(CFLAGS) iscygpty.c -o $(OUTDIR)/iscygpty.o -D_WIN32_WINNT=0x0600 -DUSE_DYNFILEID -DENABLE_STUB_IMPL + $(CC) -c $(CFLAGS) iscygpty.c -o $(OUTDIR)/iscygpty.o -U_WIN32_WINNT -D_WIN32_WINNT=0x0600 -DUSE_DYNFILEID -DENABLE_STUB_IMPL $(OUTDIR)/main.o: main.c $(INCL) $(CUI_INCL) $(CC) -c $(CFLAGS) main.c -o $(OUTDIR)/main.o
