Changeset 1397:9b4664b6c3dc in roaraudio


Ignore:
Timestamp:
03/25/09 17:11:27 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

make fsync() and fdatasync() optional

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • configure

    r1394 r1397  
    3838PROC_NET_DECNET="/proc/net/decnet" 
    3939TTY_DEV="none" 
     40 
     41FSYNC=false 
    4042 
    4143DEFAULT_GRP='' 
     
    612614fi 
    613615 
     616echo -n 'checking for fsync()... ' 
     617 
     618echo '#include <unistd.h>' > $TF_C 
     619echo 'int main (void) { fsync(0); return 0; }' >> $TF_C 
     620 
     621if $CCTF 2> /dev/null; 
     622then 
     623 echo '#define ROAR_HAVE_FSYNC' >&3 
     624 FSYNC=true 
     625 echo yes 
     626else 
     627 FSYNC=false 
     628 echo no 
     629fi 
     630 
    614631echo -n 'checking for fdatasync()... ' 
    615632 
     
    623640 echo yes 
    624641else 
    625  echo '#define ROAR_FDATASYNC fsync' >&3 
     642 $FSYNC && echo '#define ROAR_FDATASYNC fsync' >&3 
    626643 echo no 
    627644fi 
  • libroar/vio.c

    r1376 r1397  
    351351 
    352352int     roar_vio_basic_sync    (struct roar_vio_calls * vio) { 
     353#ifdef ROAR_FDATASYNC 
    353354 return ROAR_FDATASYNC(roar_vio_get_fh(vio)); 
     355#else 
     356 return 0; 
     357#endif 
    354358} 
    355359 
Note: See TracChangeset for help on using the changeset viewer.