X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=AcessNative%2Fld-acess_src%2Fsyscalls.c;h=43dfe26e5f32c03710cb27fc660636ad6ad0358f;hb=e2744a459d1c63435d7348d0bfd0e4b92b0ec9f9;hp=88db8c4422257a82fc77d575572a3347695cb7c9;hpb=bf0187772ecfb475eedf5e0e9b8460b4f1a3f445;p=tpg%2Facess2.git diff --git a/AcessNative/ld-acess_src/syscalls.c b/AcessNative/ld-acess_src/syscalls.c index 88db8c44..43dfe26e 100644 --- a/AcessNative/ld-acess_src/syscalls.c +++ b/AcessNative/ld-acess_src/syscalls.c @@ -14,15 +14,9 @@ #endif #include "request.h" -#if SYSCALL_TRACE -#define DEBUG(str, x...) Debug(str, x) -#else -#define DEBUG(...) do{}while(0) -#endif - #define assert(cnd) do{ \ if( !(cnd) ) { \ - fprintf(stderr, "%s:%i - assert failed - " #cnd, __FILE__, __LINE__);\ + fprintf(stderr, "%s:%i - assert failed - " #cnd"\n", __FILE__, __LINE__);\ exit(-1); \ } \ }while(0) @@ -32,6 +26,7 @@ // === Types === // === IMPORTS === +extern int gbSyscallDebugEnabled; // === GLOBALS === FILE *gaSyscall_LocalFPs[MAX_FPS]; @@ -286,7 +281,9 @@ uint64_t _Syscall(int SyscallID, const char *ArgTypes, ...) free( req ); free( retPtrs ); - DEBUG(": %i 0x%llx", SyscallID, retValue); + if( gbSyscallDebugEnabled ) { + SYSTRACE(": %i 0x%llx", SyscallID, retValue); + } return retValue; }