bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: <iconv.h> creates incorrect iconv() prototype


From: Andy Wingo
Subject: Re: <iconv.h> creates incorrect iconv() prototype
Date: Sun, 10 Mar 2013 19:14:42 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

Hi Paul,

Thanks for looking at this.

On Sun 10 Mar 2013 07:42, Paul Eggert <address@hidden> writes:

> The iconv build procedure prefers to use 'char **',
> but it uses 'const char **' if it detects that it's
> on a platform where the 'const' is needed.  Evidently
> that part of the detection isn't working.  Can you
> look at config.log and see what went wrong on your platform?
> Look for the string "for iconv declaration".  Thanks.

I think the configure check is working as intended, given your
description.  However why is it trying to provide the prototype provided
by the platform, instead of the prototype from POSIX?

Appending the relevant part of config.log, for clarity.

Cheers,

Andy

configure:12262: checking for working iconv
configure:12394: result: guessing yes
configure:12409: checking how to link with libiconv
configure:12411: result: -liconv
configure:12422: checking for iconv declaration
configure:12451: i686-w64-mingw32-gcc -c -g -O2  conftest.c >&5
conftest.c:80:8: error: conflicting types for 'iconv'
In file included from conftest.c:74:0:
/usr/i686-w64-mingw32/sys-root/mingw/include/iconv.h:10:8: note: previous 
declaration of 'iconv' was here
configure:12451: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU Guile"
| #define PACKAGE_TARNAME "guile"
| #define PACKAGE_VERSION "2.0.7.179-94c5"
| #define PACKAGE_STRING "GNU Guile 2.0.7.179-94c5"
| #define PACKAGE_BUGREPORT "address@hidden"
| #define PACKAGE_URL "http://www.gnu.org/software/guile/";
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _DARWIN_C_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| #define _FILE_OFFSET_BITS 64
| #define _DARWIN_USE_64_BIT_INODE 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_DIRENT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_ICONV_H 1
| #define HAVE_MATH_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_WCHAR_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_SYS_FILE_H 1
| #define HAVE_WCTYPE_H 1
| #define HAVE_WS2TCPIP_H 1
| #define HAVE_STRUCT_SOCKADDR_STORAGE 1
| #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
| #define HAVE_WINSOCK2_H 1
| #define HAVE_ALLOCA 1
| #define HAVE_BTOWC 1
| #define HAVE_GETCWD 1
| #define HAVE_ALARM 1
| #define HAVE_GETLOGIN 1
| #define HAVE_MBSINIT 1
| #define HAVE_MBRTOWC 1
| #define HAVE_MPROTECT 1
| #define HAVE_ISBLANK 1
| #define HAVE_ISWCTYPE 1
| #define HAVE_WCSCOLL 1
| #define HAVE_SNPRINTF 1
| #define HAVE_TZSET 1
| #define HAVE_WCRTOMB 1
| #define HAVE_ISWCNTRL 1
| #define HAVE_WCHAR_T 1
| #define HAVE_RAW_DECL_SETLOCALE 1
| #define HAVE_ENVIRON_DECL 1
| #define HAVE_WORKING_O_NOATIME 0
| #define HAVE_WORKING_O_NOFOLLOW 0
| #define _GL_WINDOWS_64_BIT_ST_SIZE 1
| #define nlink_t int
| #define HAVE_RAW_DECL_FSTAT 1
| #define HAVE_RAW_DECL_STAT 1
| #define restrict __restrict
| #define HAVE_WINSOCK2_H 1
| #define HAVE_DECL_INET_NTOP 0
| #define HAVE_IPV4 1
| #define HAVE_IPV6 1
| #define HAVE_ICONV 1
| /* end confdefs.h.  */
| 
| #include <stdlib.h>
| #include <iconv.h>
| extern
| #ifdef __cplusplus
| "C"
| #endif
| #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
| size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, 
size_t *outbytesleft);
| #else
| size_t iconv();
| #endif
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:12462: result:
         extern size_t iconv (iconv_t cd, const char * *inbuf, size_t 
*inbytesleft, char * *outbuf, size_t *outbytesleft);

-- 
http://wingolog.org/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]