Skip to content
Snippets Groups Projects
Commit c23a0ac8 authored by Diego Biurrun's avatar Diego Biurrun
Browse files

cosmetics: Write some trivial C test programs in a more compact form.

Originally committed as revision 12641 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent fbef871d
No related branches found
No related tags found
No related merge requests found
...@@ -427,9 +427,7 @@ check_asm(){ ...@@ -427,9 +427,7 @@ check_asm(){
asm="$2" asm="$2"
shift 2 shift 2
check_cc "$@" <<EOF && enable $name || disable $name check_cc "$@" <<EOF && enable $name || disable $name
int foo(void){ int foo(void){ asm volatile($asm); }
asm volatile($asm);
}
EOF EOF
} }
...@@ -454,9 +452,7 @@ EOF ...@@ -454,9 +452,7 @@ EOF
check_ldflags(){ check_ldflags(){
log check_ldflags "$@" log check_ldflags "$@"
check_ld "$@" <<EOF && add_ldflags "$@" check_ld "$@" <<EOF && add_ldflags "$@"
int main(void){ int main(void){ return 0; }
return 0;
}
EOF EOF
} }
...@@ -479,9 +475,7 @@ check_func(){ ...@@ -479,9 +475,7 @@ check_func(){
disable $func disable $func
check_ld "$@" <<EOF && enable $func check_ld "$@" <<EOF && enable $func
extern int $func(); extern int $func();
int main(void){ int main(void){ $func(); }
$func();
}
EOF EOF
} }
...@@ -1464,9 +1458,7 @@ rm $TMPE ...@@ -1464,9 +1458,7 @@ rm $TMPE
# compiler sanity check # compiler sanity check
check_exec <<EOF check_exec <<EOF
int main(void){ int main(void){ return 0; }
return 0;
}
EOF EOF
if test "$?" != 0; then if test "$?" != 0; then
echo "$cc is unable to create an executable file." echo "$cc is unable to create an executable file."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment