#st = os.stat(str(source[0]))
#os.chmod(str(target[0]), stat.S_IMODE(st[stat.ST_MODE]) | stat.S_IWRITE)
-
-#
-# glob filenames
-#
-def globSource(dir, pattern, build_dir = None, exclude = [], include = []):
- ''' glob files, in dir and use build_dir as returned path name '''
- # exclude 'exclude+include' to avoid duplicate items in files
- files = include + filter(lambda x: x not in exclude + include, glob.glob1(dir, pattern))
- if build_dir is None:
- return files
- else:
- return ['%s/%s' % (build_dir, x) for x in files]
-
#
# autoconf tests
#
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... ')