58 va_start(argp, f_str);
59 vfprintf(
stderr, f_str, argp);
62 if (strlen(f_str) == 0 || f_str[strlen(f_str)-1] !=
'\n')
81 va_start(argp, f_str);
82 vfprintf(
stderr, f_str, argp);
177 #if defined(WIN32) || defined(__MINGW32__) 178 return strerror(errnum);
181 static __thread
char buf[1024];
183 strerror_r(errnum, buf, 1024);
188 return strerror(errnum);
200 #ifdef HAVE_EXECINFO_H 205 size = backtrace(array, 10);
206 strings = backtrace_symbols(array, size);
208 printf(
"Obtained %d stack frames.\n", size);
209 for (i=0; i<
size; i++) {
210 printf(
"%s\n", strings[i]);
char * gk_strerror(int errnum)
Thread-safe implementation of strerror()
void errexit(char *f_str,...)
static __thread gksighandler_t old_SIGERR_handlers[MAX_JBUFS]
void gk_errexit(int signum, char *f_str,...)
static __thread gksighandler_t old_SIGMEM_handlers[MAX_JBUFS]
__thread jmp_buf gk_jbufs[MAX_JBUFS]
void gk_sigthrow(int signum)
void gk_NonLocalExit_Handler(int signum)
void gk_UnsetSignalHandlers()
static __thread gksighandler_t old_SIGERR_handler
static __thread gksighandler_t old_SIGMEM_handler
static int gk_exit_on_error
__thread int gk_cur_jbufs
void gk_set_exit_on_error(int value)
void gk_SetSignalHandlers()
void(* gksighandler_t)(int)