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` \
--
Guopeng
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---