mirror of https://gitlab.com/ita1024/waf.git
Issue 1192
This commit is contained in:
parent
e67b593eee
commit
0f6ee2a0cf
|
@ -24,7 +24,7 @@ cfg_ver = {
|
|||
}
|
||||
|
||||
SNIP_FUNCTION = '''
|
||||
int main() {
|
||||
int main(int argc, char **argv) {
|
||||
void *p;
|
||||
p=(void*)(%s);
|
||||
return 0;
|
||||
|
@ -33,21 +33,22 @@ SNIP_FUNCTION = '''
|
|||
"""Code template for checking for functions"""
|
||||
|
||||
SNIP_TYPE = '''
|
||||
int main() {
|
||||
int main(int argc, char **argv) {
|
||||
if ((%(type_name)s *) 0) return 0;
|
||||
if (sizeof (%(type_name)s)) return 0;
|
||||
return 1;
|
||||
}
|
||||
'''
|
||||
"""Code template for checking for types"""
|
||||
|
||||
SNIP_EMPTY_PROGRAM = '''
|
||||
int main() {
|
||||
int main(int argc, char **argv) {
|
||||
return 0;
|
||||
}
|
||||
'''
|
||||
|
||||
SNIP_FIELD = '''
|
||||
int main() {
|
||||
int main(int argc, char **argv) {
|
||||
char *off;
|
||||
off = (char*) &((%(type_name)s*)0)->%(field_name)s;
|
||||
return (size_t) off < sizeof(%(type_name)s);
|
||||
|
|
|
@ -27,7 +27,7 @@ MAIN_CODE = '''
|
|||
#define testEXPORT
|
||||
#endif
|
||||
testEXPORT int lib_func(void);
|
||||
int main(void) {return !(lib_func() == 9);}
|
||||
int main(int argc, char **argv) {return !(lib_func() == 9);}
|
||||
'''
|
||||
|
||||
@feature('link_lib_test')
|
||||
|
@ -123,7 +123,7 @@ def check_inline(self, **kw):
|
|||
|
||||
########################################################################################
|
||||
|
||||
LARGE_FRAGMENT = '#include <unistd.h>\nint main() { return !(sizeof(off_t) >= 8); }\n'
|
||||
LARGE_FRAGMENT = '#include <unistd.h>\nint main(int argc, char **argv) { return !(sizeof(off_t) >= 8); }\n'
|
||||
|
||||
@conf
|
||||
def check_large_file(self, **kw):
|
||||
|
|
|
@ -33,7 +33,7 @@ extern "C" {
|
|||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
int main()
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
Py_Initialize();
|
||||
Py_Finalize();
|
||||
|
|
Loading…
Reference in New Issue