Changeset 5479:a6348edc217a in roaraudio
- Timestamp:
- 04/23/12 12:53:37 (12 years ago)
- Branch:
- default
- Phase:
- public
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
ChangeLog
r5478 r5479 14 14 * Corrected usage of -Wextra (pr0). 15 15 * Updated build options for RAT (pr0). 16 * Work around bugs in win32 while using stdvios (pr0). 16 17 17 18 v. 1.0beta0 - Fri Mar 16 2012 19:39 CET -
include/libroar/vio_stdvios.h
r5381 r5479 39 39 #include "libroar.h" 40 40 41 #ifndef ROAR_TARGET_WIN32 41 42 extern struct roar_vio_calls * roar_stdin; 42 43 extern struct roar_vio_calls * roar_stdout; 43 44 extern struct roar_vio_calls * roar_stderr; 45 #else 46 struct roar_vio_calls ** libroar_stdvio_win32workaround(int fh); 47 #define roar_stdin (*libroar_stdvio_win32workaround(0)) 48 #define roar_stdout (*libroar_stdvio_win32workaround(1)) 49 #define roar_stderr (*libroar_stdvio_win32workaround(2)) 50 #endif 44 51 45 52 #endif -
libroar/vio_stdvios.c
r5381 r5479 73 73 struct roar_vio_calls * roar_stderr = &(_libroar_vio_stdvios[2]); 74 74 75 #ifdef ROAR_TARGET_WIN32 76 struct 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 75 90 //ll
Note: See TracChangeset
for help on using the changeset viewer.