2010/5/18 Dominique Pellé <[email protected]>: > On Tue, May 18, 2010 at 9:06 PM, Bram Moolenaar <[email protected]> wrote: >> >> Tony Mechelynck wrote: >> >>> Trying to compile the latest vim 7.3a (74c8bba1d9e8) I get the following >>> error (the empty line after the command-line is an artefact to make it >>> more readable): >>> >>> gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK >>> -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 >>> -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 >>> -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 >>> -I/usr/include/freetype2 -I/usr/include/libpng12 -DORBIT2=1 -pthread >>> -I/usr/include/libgnomeui-2.0 -I/usr/include/libart-2.0 >>> -I/usr/include/gconf/2 -I/usr/include/gnome-keyring-1 >>> -I/usr/include/libgnome-2.0 -I/usr/include/libbonoboui-2.0 >>> -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gtk-2.0 >>> -I/usr/include/gnome-vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include >>> -I/usr/include/orbit-2.0 -I/usr/include/dbus-1.0 >>> -I/usr/lib/dbus-1.0/include -I/usr/include/glib-2.0 >>> -I/usr/lib/glib-2.0/include -I/usr/include/libbonobo-2.0 >>> -I/usr/include/bonobo-activation-2.0 -I/usr/include/libxml2 >>> -I/usr/include/pango-1.0 -I/usr/include/gail-1.0 >>> -I/usr/include/freetype2 -I/usr/include/atk-1.0 >>> -I/usr/lib/gtk-2.0/include -I/usr/include/cairo -I/usr/include/pixman-1 >>> -I/usr/include/libpng12 -O2 -fno-strength-reduce -Wall >>> -D_FORTIFY_SOURCE=1 -D_REENTRANT -D_GNU_SOURCE -DPERL_USE_SAFE_PUTENV >>> -DDEBUGGING -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 >>> -I/usr/lib/perl5/5.10.0/i586-linux-thread-multi/CORE >>> -I/usr/include/python2.6 -pthread -I/usr/include >>> -D_LARGEFILE64_SOURCE=1 -I/usr/lib/ruby/1.8/i586-linux >>> -DRUBY_VERSION=18 -o objects/if_perl.o auto/if_perl.c >>> >>> In file included from /usr/include/netinet/in.h:24, >>> from >>> /usr/lib/perl5/5.10.0/i586-linux-thread-multi/CORE/perl.h:1123, >>> from ./vim.h:2074, >>> from if_perl.xs:16: >>> /usr/include/stdint.h:52: error: duplicate ‘unsigned’ >>> /usr/include/stdint.h:52: error: two or more data types in declaration >>> specifiers >>> make: *** [objects/if_perl.o] Error 1 >>> >>> >>> I did what research I could and found the following: >>> >>> src/if_perl.xs:16|#include "vim.h" >>> >>> src/vim.h:2074|#include <perl.h> >>> >>> .../perl.h:1122|#ifdef I_NETINET_IN >>> .../perl.h:1123|# include <netinet/in.h> >>> .../perl.h:1124|#endif >>> >>> /usr/include/netinet/in.h:24|#include <stdint.h> >>> >>> /usr/include/stdint.h:31|#ifndef __uint32_t_defined >>> /usr/include/stdint.h:32|typedef unsigned int uint32_t; >>> /usr/include/stdint.h:33|# define __uint32_t_defined >>> >>> Looks like the new encryption subsystem should have obeyed :help >>> style-names, as follows: >>> >>> <quote> >>> Typedef'ed names should end in "_T": > >>> typedef int some_T; >>> </quote> >> >> Then we could not use the autoconf check, it always defines uint32_t. >> >> I'll undefine uint32_t in vim.h, like it's done for netbeans. > > > The same kind of error still happens when compiling if_python.c: > > In file included from /usr/local/include/python2.6/pyport.h:7, > from /usr/local/include/python2.6/Python.h:58, > from if_python.c:49: > /usr/include/stdint.h:52: error: duplicate ‘unsigned’ > /usr/include/stdint.h:52: error: two or more data types in declaration > specifiers > > > Shouldn't we include <stdint.h> (introduced in c99) rather than defining > int32_t when stdint.h is available? With something more or less like... > > #ifdef HAVE_STDINT_H > #include <stdint.h> > #else > /* Define to `unsigned int' or other type that is 32 bit. */ > #define uint32_t unsigned int > #endif
That's what the Autoconf macro is supposed to do: If stdint.h or inttypes.h does not define the type uint32_t, define uint32_t to an unsigned integer type that is exactly 32 bits wide, if such a type exists. -- James GPG Key: 1024D/61326D40 2003-09-02 James Vega <[email protected]> -- 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
