You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
793 B

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /**[txh]********************************************************************
  2. Debug logger helper Copyright 1996-1998 by Robert Hoehne
  3. Description:
  4. Used to debug Linux driver.
  5. I (SET) moved it here to avoid repeating it in each module.
  6. The idea is from Robert, I usually use another approach.
  7. ***************************************************************************/
  8. #if defined(TVOSf_Linux) && !defined(LOGLINUXDEBUG_INCLUDED)
  9. #define LOGLINUXDEBUG_INCLUDED
  10. //#define DEBUG
  11. #ifdef DEBUG
  12. extern char *program_invocation_short_name;
  13. #define LOG(s) do {CLY_std(cerr) << program_invocation_short_name << ": " << s << CLY_std(endl); fflush(stderr);} while(0)
  14. #else
  15. #define LOG(s) do {;} while(0)
  16. #endif
  17. #else
  18. #define LOG(s) do {;} while(0)
  19. #endif // LOGLINUXDEBUG_INCLUDED