Provide new option "--debug" instead of using insecure environment variable DEBUG.

This commit is contained in:
Andrew Wood
2023-07-28 23:14:14 +01:00
parent 08a8c2ea70
commit b9f96d9508
4 changed files with 194 additions and 143 deletions
+6 -1
View File
@@ -170,7 +170,7 @@ extern void pv_state_free(pvstate_t);
#ifdef ENABLE_DEBUGGING
# if __STDC_VERSION__ < 199901L
# if __STDC_VERSION__ < 199901L && !defined(__func__)
# if __GNUC__ >= 2
# define __func__ __FUNCTION__
# else
@@ -182,6 +182,11 @@ extern void pv_state_free(pvstate_t);
# define debug(x,...) do { } while (0)
#endif
/*
* Set the debugging destination file, if debugging is enabled.
*/
void debugging_output_destination(const char *);
/*
* Output debugging information, if debugging is enabled.
*/