Changeset 5479:a6348edc217a in roaraudio for libroar/vio_stdvios.c


Ignore:
Timestamp:
04/23/12 12:53:37 (12 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

Work around bugs in win32 while using stdvios (pr0).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/vio_stdvios.c

    r5381 r5479  
    7373struct roar_vio_calls * roar_stderr = &(_libroar_vio_stdvios[2]); 
    7474 
     75#ifdef ROAR_TARGET_WIN32 
     76struct roar_vio_calls ** libroar_stdvio_win32workaround(int fh) { 
     77 switch (fh) { 
     78  case 0: return &roar_stdin;  break; 
     79  case 1: return &roar_stdout; break; 
     80  case 2: return &roar_stderr; break; 
     81  default: 
     82    roar_strap(ROAR_TRAP_GROUP_LIBROAR, "libroar_stdvio_win32workaround.bad-fh"); 
     83    roar_err_set(ROAR_ERROR_BADFH); // just in case somebody uses a debugger. 
     84    return NULL; 
     85   break; 
     86 } 
     87} 
     88#endif 
     89 
    7590//ll 
Note: See TracChangeset for help on using the changeset viewer.