Guopeng Wen wrote:
> > > On 8/11/07, Bram Moolenaar <[EMAIL PROTECTED]> wrote: > > > > > > > > Chris Sutcliffe wrote: > > > > > > > > > > Thanks for taking the effort to verify what works. > > > > > > > > > > No problem at all, I like to contribute where I can! > > > > > > > > > > > I'm a bit confused though. In the last part of the patch > > > > > > __IID_DEFINED__ if it wasn't defined yet. Why the extra > > > > > > complicated #if > > > > > > to define it above this? Was it defined before but to something > > > > > > else? > > > > > > > > > > __IID_DEFINED__ was originally passed by the MinGW makefile because > > > > > the w32api didn't explicitly define it, despite the fact that w32api > > > > > did have a definition for IID (used in the OLE stuff). As a result, > > > > > the compile would error out because of the duplicate IID definition. > > > > > With the latest w32api (3.10), __IID_DEFINED__ is now properly defined > > > > > along with IID itself. As a result, when the Makefile ran, it caused > > > > > a duplicate definition of __IID_DEFINED__. > > > > > > > > > > Basically what I've done is that in iid_ole.c (where IID is defined, > > > > > but guarded by __IID_DEFINED__), I've added an extra check to > > > > > essentially accomplish what the Makefile was previously doing with the > > > > > -D__IID_DEFINED__ option for previous versions of the w32api. > > > > > > > > Ah, I missed that after the #ifdef __IID_DEFINED__ the structure was > > > > declared. I'll include the patch now, thanks. > > > > > > > > > > I found the same problem with Make_cyg.mak on the latest cygwin when > > > I try to build windows binary. Here's related cygwin package versions: > > > gcc 3.4.4-3 > > > gcc-mingw 20040810-1 > > > gcc-mingw-core 20050522-1 > > > w32api 3.10-1 > > > > > > And my build command: > > > cd vim/src && \ > > > make ARCH=i686 GUI=yes OLE=yes USEDLL=no \ > > > WINVER=0x0500 -f Make_cyg.mak > > > > > > It seems the same w32api problem has already hit cygwin release. > > > Here's the fix following 7.1.065: > > > > > > *** ../vim-7.1.123/src/Make_cyg.mak Sun Apr 30 23:28:40 2006 > > > --- ./src/Make_cyg.mak Fri Sep 28 13:25:30 2007 > > > *************** > > > *** 502,509 **** > > > $(OUTDIR)/if_cscope.o: if_cscope.c $(INCL) if_cscope.h > > > $(CC) -c $(CFLAGS) if_cscope.c -o $(OUTDIR)/if_cscope.o > > > > > > $(OUTDIR)/if_ole.o: if_ole.cpp $(INCL) > > > ! $(CC) -c $(CFLAGS) -D__IID_DEFINED__ if_ole.cpp -o > > > $(OUTDIR)/if_ole.o > > > > > > if_perl.c: if_perl.xs typemap > > > $(PERL)/bin/perl `cygpath -d $(PERL)/lib/ExtUtils/xsubpp` \ > > > --- 502,510 ---- > > > $(OUTDIR)/if_cscope.o: if_cscope.c $(INCL) if_cscope.h > > > $(CC) -c $(CFLAGS) if_cscope.c -o $(OUTDIR)/if_cscope.o > > > > > > + # Remove -D__IID_DEFINED__ for newer versions of the w32api > > > $(OUTDIR)/if_ole.o: if_ole.cpp $(INCL) > > > ! $(CC) -c $(CFLAGS) if_ole.cpp -o $(OUTDIR)/if_ole.o > > > > > > if_perl.c: if_perl.xs typemap > > > $(PERL)/bin/perl `cygpath -d $(PERL)/lib/ExtUtils/xsubpp` \ > > > > > > > I don't use Cygwin, but I guess for this to work both with old and new > > versions of the API we also need a change in iid_ole.c. Similar to the > > change for MingW. > > Hi, Bram, > > I believe the MingW patch has already solved the backward > compatibility problem. I checked macro definition when I built VIM > with Make_cyg.mak under cygwin, __MINGW32__ is defined, it looks > like MingW is used when build under cygwin. I don't know the detail > though. If that's true, backward compatibility should have already > been solved. > > In order to be sure, I managed to find an old cygwin installation > with w32api-3.2-1, this version is announced on 2005-1-2, according > to the announcement e-mail here: > http://sourceware.org/ml/cygwin-announce/2005-01/msg00003.html > > It should be old enough :) I can build VIM successfully with the > above patch. I also tried w32api-3.7-1, no problem found. > > I remember the build problem begins about a month ago (about the > same time when build problem with ActivePerl 5.8.8 happened). After > I check my cygwin update log, I think the failure should happen > after upgrade to w32api-3.10-1. w32api release announcement also > confirmed my guess: > http://sourceware.org/ml/cygwin-announce/2007-08/msg00002.html > > One of the change is: > [mingw-Bugs-1751565] > * include/basetyps.h (IID); Guard with __IID_DEFINED__. > > Hope that helps. Thanks for checking this. I care about backwards compatibility. -- NEIL INNES PLAYED: THE FIRST SELF-DESTRUCTIVE MONK, ROBIN'S LEAST FAVORITE MINSTREL, THE PAGE CRUSHED BY A RABBIT, THE OWNER OF A DUCK "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ download, build and distribute -- http://www.A-A-P.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
