Changeset 1471:c9f230fe0f96 in roaraudio


Ignore:
Timestamp:
03/30/09 19:27:35 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

test for a lot new things: chroot(), basic FS calls, basic IO calls, gettimeofday(), setuid/gid(), nice() and _exit()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • configure

    r1469 r1471  
    640640 
    641641 
     642echo -n 'checking for _exit()... ' 
     643 
     644echo '#include <unistd.h>'    > $TF_C 
     645echo 'int main (void) { _exit(0); return 0; }' >> $TF_C 
     646 
     647if $CCTF 2> /dev/null; 
     648then 
     649 echo '#define ROAR_HAVE_U_EXIT' >&3 
     650 echo '#define ROAR_U_EXIT _exit' >&3 
     651 echo yes 
     652else 
     653 echo '#define ROAR_U_EXIT exit' >&3 
     654 echo no 
     655fi 
     656 
     657 
     658echo -n 'checking for nice()... ' 
     659 
     660echo '#include <unistd.h>'    > $TF_C 
     661echo 'int main (void) { nice(0); return 0; }' >> $TF_C 
     662 
     663if $CCTF 2> /dev/null; 
     664then 
     665 echo '#define ROAR_HAVE_NICE' >&3 
     666 echo yes 
     667else 
     668 echo no 
     669fi 
     670 
     671 
     672echo -n 'checking for setgid()... ' 
     673 
     674echo '#include <sys/types.h>' >  $TF_C 
     675echo '#include <unistd.h>'    >> $TF_C 
     676echo 'int main (void) { setgid(0); return 0; }' >> $TF_C 
     677 
     678if $CCTF 2> /dev/null; 
     679then 
     680 echo '#define ROAR_HAVE_SETGID' >&3 
     681 echo yes 
     682else 
     683 echo no 
     684fi 
     685 
     686 
     687echo -n 'checking for setuid()... ' 
     688 
     689echo '#include <sys/types.h>' >  $TF_C 
     690echo '#include <unistd.h>'    >> $TF_C 
     691echo 'int main (void) { setuid(0); return 0; }' >> $TF_C 
     692 
     693if $CCTF 2> /dev/null; 
     694then 
     695 echo '#define ROAR_HAVE_SETUID' >&3 
     696 echo yes 
     697else 
     698 echo no 
     699fi 
     700 
     701 
     702echo -n 'checking for gettimeofday()... ' 
     703 
     704echo '#include <sys/time.h>' >  $TF_C 
     705echo '#include <time.h>'     >> $TF_C 
     706echo 'int main (void) { struct timeval tv; gettimeofday(&tv, NULL); return 0; }' >> $TF_C 
     707 
     708if $CCTF 2> /dev/null; 
     709then 
     710 echo '#define ROAR_HAVE_GETTIMEOFDAY' >&3 
     711 echo yes 
     712else 
     713 echo no 
     714fi 
     715 
     716 
     717echo -n 'checking for basic IO calls... ' 
     718 
     719cat <<EOF > $TF_C 
     720#include <sys/types.h> 
     721#include <sys/stat.h> 
     722#include <fcntl.h> 
     723#include <string.h> 
     724#include <unistd.h> 
     725 
     726int main(void) { 
     727 open(NULL, 0, 0); 
     728 close(0); 
     729 read(0, NULL, 0); 
     730 write(0, NULL, 0); 
     731 lseek(0, 0, 0); 
     732 return 0; 
     733} 
     734EOF 
     735 
     736if $CCTF 2> /dev/null; 
     737then 
     738 echo '#define ROAR_HAVE_IO_POSIX' >&3 
     739 echo posix 
     740else 
     741 echo none 
     742fi 
     743 
     744echo -n 'checking for basic FS calls... ' 
     745 
     746cat <<EOF > $TF_C 
     747#include <string.h> 
     748#include <unistd.h> 
     749 
     750int main(void) { 
     751 chdir(NULL); 
     752 unlink(NULL); 
     753 return 0; 
     754} 
     755EOF 
     756 
     757if $CCTF 2> /dev/null; 
     758then 
     759 echo '#define ROAR_HAVE_FS_POSIX' >&3 
     760 echo posix 
     761else 
     762 echo none 
     763fi 
     764 
     765 
     766echo -n 'checking for chroot()... ' 
     767 
     768echo '#include <unistd.h>' > $TF_C 
     769echo 'int main (void) { chroot((void*)0); return 0; }' >> $TF_C 
     770 
     771if $CCTF 2> /dev/null; 
     772then 
     773 echo '#define ROAR_HAVE_CHROOT' >&3 
     774 echo yes 
     775else 
     776 echo no 
     777fi 
     778 
     779 
    642780echo -n 'checking for mlock()... ' 
    643781 
Note: See TracChangeset for help on using the changeset viewer.