Scons: fix ICONV_CONST test

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_4_X@14689 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Bo Peng 2006-08-15 14:23:50 +00:00
parent 444442cdca
commit f98a856568
2 changed files with 6 additions and 17 deletions

View File

@ -1191,8 +1191,8 @@ int mkstemp(char*);
(conf.CheckIconvConst(),
'ICONV_CONST',
'Define as const if the declaration of iconv() needs const.',
'#define ICONV_CONST',
'#define ICONV_CONST const',
'#define ICONV_CONST',
),
(conf.CheckType('intmax_t', includes='#include <stdint.h>') or \
conf.CheckType('intmax_t', includes='#include <inttypes.h>'),

View File

@ -241,23 +241,12 @@ int main()
def checkIconvConst(conf):
''' check the declaration of iconv '''
check_iconv_const = '''
#include <stdlib.h>
#include <iconv.h>
extern
#ifdef __cplusplus
"C"
#endif
#if defined(__STDC__) || defined(__cplusplus)
#ifndef LIBICONV_DLL_EXPORTED
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
#endif
#else
size_t iconv();
#endif
int main()
{
return 1;
// this declaration will fail when there already exists a non const char**
// version which returns size_t
double iconv(iconv_t cd, char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft);
int main() {
return 0;
}
'''
conf.Message('Check if the declaration of iconv needs const... ')