mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-13 17:20:55 +00:00
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:
parent
444442cdca
commit
f98a856568
@ -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>'),
|
||||
|
@ -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... ')
|
||||
|
Loading…
Reference in New Issue
Block a user