Changeset 1442:24423ef2ecc3 in roaraudio


Ignore:
Timestamp:
03/26/09 20:05:07 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

only try to link with mmap() if we have a OS supporting it

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/file.c

    r1379 r1442  
    118118 
    119119ssize_t     roar_file_map        (char * filename, int flags, mode_t mode, size_t len, void ** mem) { 
    120 #ifndef ROAR_TARGET_WIN32 
     120#ifdef ROAR_HAVE_MMAP 
    121121 int fh; 
    122122 int mmap_flags = 0; 
     
    161161 return len; 
    162162#else 
     163#ifdef ROAR_TARGET_WIN32 
    163164 ROAR_ERR("roar_file_map(*): There is no support to fast access files via mmap() within win32, download a real OS..."); 
     165#endif 
    164166 return -1; 
    165167#endif 
     
    167169 
    168170int     roar_file_unmap      (size_t len, void * mem) { 
    169 #ifndef ROAR_TARGET_WIN32 
     171#ifdef ROAR_HAVE_MMAP 
    170172 return munmap(mem, len); 
    171173#else 
     174#ifdef ROAR_TARGET_WIN32 
    172175 ROAR_ERR("roar_file_map(*): There is no support to fast access files via mmap() within win32, download a real OS..."); 
     176#endif 
    173177 return -1; 
    174178#endif 
Note: See TracChangeset for help on using the changeset viewer.