Changeset 1765:6521fb56702e in roaraudio


Ignore:
Timestamp:
05/19/09 12:21:44 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

some dirty win32 hacks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/file.c

    r1660 r1765  
    217217  return -1; 
    218218 
     219#ifdef ROAR_TARGET_WIN32 
     220 if ( (in = open(file, O_RDONLY|O_BINARY, 0644)) == -1 ) { 
     221#else 
    219222 if ( (in = open(file, O_RDONLY, 0644)) == -1 ) { 
     223#endif 
    220224  return -1; 
    221225 } 
     
    283287 
    284288 if ( !seek ) 
    285   write(out, buf, len); 
     289  ROAR_NETWORK_WRITE(out, buf, len); 
    286290 
    287291 if ( !passfh ) { 
     292#ifndef ROAR_TARGET_WIN32 
    288293  r = roar_file_send_raw(out, in); 
    289294 
    290295  close(out); 
     296#else 
     297 while ((len = read(in, buf, BUFSIZE)) > 0) 
     298  if ( send(out, buf, len, 0) != len ) 
     299   break; 
     300 
     301 closesocket(out); 
     302#endif 
    291303 
    292304  if ( exec ) { 
Note: See TracChangeset for help on using the changeset viewer.