2010/5/18 Dominique Pellé <[email protected]>: > On Tue, May 18, 2010 at 9:46 PM, James Vega <[email protected]> wrote: >> 2010/5/18 Dominique Pellé <[email protected]>: >>> On Tue, May 18, 2010 at 9:06 PM, Bram Moolenaar <[email protected]> wrote: >>>> >>>> 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. > > Something is wrong then. I'm using gcc-4.4.1 (Ubuntu-9.10) > which of course has <stdint.h>. Yet file vim/src/auto/config.h > (generated by configure) redefines uint32_t: > > vim/src/auto/config.h: > .... > /* Define to `unsigned int' or other type that is 32 bit. */ > #define uint32_t unsigned int > ...
Ah, the issue is that Vim's configure script isn't checking for stdint.h or inttypes.h. Attached patch fixes this and should remove the need for the other workarounds Bram added. -- 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
types.diff
Description: Binary data
