Dominique Pelle wrote:
> > Le Fri, 22 May 2009 19:42:43 -0700 (PDT), Yongwei Wu a écrit dans le
> > message
> > <c3a50ae4-1f2e-4986-9669-b02639f6b...@r31g2000prh.googlegroups.com> :
> >
> >> Why the NULLs at the end? It breaks my MSVC build with:
> >>
> >> if_tcl.c(1690) : error C2078: too many initializers
> >
> > And using GCC 3.2 on Linux, I get warnings:
> >
> > ====================== compiling if_tcl.c =========
> > gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -I/usr/include/gtk-1.2
> > -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include
> > -g -O2 -fno-strength-reduce -I/usr/X11R6/include -D_REENTRANT
> > -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
> > -I/usr/include/gdbm -I/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE
> > -I/usr/include/python2.2 -pthread -I/usr/include -o objects/if_tcl.o
> > if_tcl.c
> > if_tcl.c:1687: warning: excess elements in struct initializer
> > if_tcl.c:1687: warning: (near initialization for `channel_type')
> > if_tcl.c:1688: warning: excess elements in struct initializer
> > if_tcl.c:1688: warning: (near initialization for `channel_type')
> > if_tcl.c:1690: warning: excess elements in struct initializer
> > if_tcl.c:1690: warning: (near initialization for `channel_type')
> > ====================================================
> >
> > ======= gcc version ===============
> > [...@localhost pt]$ gcc -v
> > Reading specs from /usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.2/specs
> > Configured with: ../configure --prefix=/usr --libdir=/usr/lib
> > --with-slibdir=/lib --mandir=/usr/share/man --infodir=/usr/share/info
> > --enable-shared --enable-threads=posix --disable-checking
> > --enable-long-long --enable-__cxa_atexit
> > --enable-languages=c,c++,ada,f77,objc,java
> > --host=i586-mandrake-linux-gnu --with-system-zlib
> > Thread model: posix
> > gcc version 3.2 (Mandrake Linux 9.0 3.2-1mdk)
> > =====================================
>
> ...snip...
>
> I don't have any warning when building with Tcl (using gcc -4.3.2).
> But looking at /usr/include/tcl8.4/tcl.h, I see that the last few fields
> of the struct Tcl_ChannelType don't necessarily exist everywhere
> in very version of Tcl:
>
> $ cat /usr/include/tcl8.4/tcl.h
> ...snip...
> /*
> * struct Tcl_ChannelType:
> *
> * One such structure exists for each type (kind) of channel.
> * It collects together in one place all the functions that are
> * part of the specific channel type.
> *
> * It is recommend that the Tcl_Channel* functions are used to access
> * elements of this structure, instead of direct accessing.
> */
> typedef struct Tcl_ChannelType {
> ...snip...
>
> /*
> * Only valid in TCL_CHANNEL_VERSION_2 channels or later
> */
> Tcl_DriverFlushProc *flushProc; /* Procedure to call to flush a
> * channel. May be NULL. */
> Tcl_DriverHandlerProc *handlerProc; /* Procedure to call to handle a
> * channel event. This will be passed
> * up the stacked channel chain. */
> /*
> * Only valid in TCL_CHANNEL_VERSION_3 channels or later
> */
> Tcl_DriverWideSeekProc *wideSeekProc;
> /* Procedure to call to seek
> * on the channel which can
> * handle 64-bit offsets. May be
> * NULL, and must be NULL if
> * seekProc is NULL. */
>
> /*
> * Only valid in TCL_CHANNEL_VERSION_4 channels or later
> * TIP #218, Channel Thread Actions
> */
> Tcl_DriverThreadActionProc *threadActionProc;
> /* Procedure to call to notify
> * the driver of thread specific
> * activity for a channel.
> * May be NULL. */
> } Tcl_ChannelType;
> ...snip...
>
>
> So the attached patch should fix the compilation warnings.
> Also fixed some comments which incorrectly referred to Perl
> in if_tcl.c.
Thanks. You appear to have tcl 8.4. I have 8.5 and have one more
element. I'll make a patch.
--
Looking at Perl through Lisp glasses, Perl looks atrocious.
/// 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
-~----------~----~----~----~------~----~------~--~---