aboutsummaryrefslogtreecommitdiff
path: root/src/pies.h
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2016-01-03 15:20:09 +0200
committerSergey Poznyakoff <gray@gnu.org>2016-01-03 15:20:09 +0200
commit85f2fd8d2772506911e95c3e4a0cb2538594b274 (patch)
treed486caebbec25a05024fcd9bfbf99efa6832c2a2 /src/pies.h
parent6db017a32e379bb2eb7878771dea969f77c3168c (diff)
downloadpies-85f2fd8d2772506911e95c3e4a0cb2538594b274.tar.gz
pies-85f2fd8d2772506911e95c3e4a0cb2538594b274.tar.bz2
Minor changes
* configure.ac: Version 1.2.92 * src/ctl.c (ctlio_finalize_reply): Don't close connection on errors. * src/pies.h (PIES_PRINTFLIKE): New macro. (logmsg, logmsg_printf): Mark as printflike.
Diffstat (limited to 'src/pies.h')
-rw-r--r--src/pies.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/pies.h b/src/pies.h
index 4bc57bd..34f1250 100644
--- a/src/pies.h
+++ b/src/pies.h
@@ -419,20 +419,28 @@ extern int diag_output;
419 419
420void diag_setup (int flags); 420void diag_setup (int flags);
421 421
422void logmsg (int prio, const char *fmt, ...); 422#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
423void logmsg_printf (int prio, const char *fmt, ...); 423# define __attribute__(x)
424#endif
425
426#ifndef PIES_PRINTFLIKE
427# define PIES_PRINTFLIKE(fmt,narg) __attribute__ ((__format__ (__printf__, fmt, narg)))
428#endif
429
430void logmsg (int prio, const char *fmt, ...) PIES_PRINTFLIKE(2,3);
431void logmsg_printf (int prio, const char *fmt, ...) PIES_PRINTFLIKE(2,3);
424void logmsg_vprintf (int prio, const char *fmt, va_list ap); 432void logmsg_vprintf (int prio, const char *fmt, va_list ap);
425 433
426extern unsigned debug_level; 434extern unsigned debug_level;
427extern int source_info_option; 435extern int source_info_option;
428void debug_msg (const char *fmt, ...); 436void debug_msg (const char *fmt, ...) PIES_PRINTFLIKE(1,2);
429 437
430#define debug(lev, args) \ 438#define debug(lev, args) \
431 do \ 439 do \
432 if (debug_level >= lev) \ 440 if (debug_level >= lev) \
433 { \ 441 { \
434 if (source_info_option) \ 442 if (source_info_option) \
435 logmsg_printf (LOG_DEBUG, "%s:%lu:%s: ", \ 443 logmsg_printf (LOG_DEBUG, "%s:%d:%s: ", \
436 __FILE__, __LINE__, __FUNCTION__); \ 444 __FILE__, __LINE__, __FUNCTION__); \
437 debug_msg args; \ 445 debug_msg args; \
438 } \ 446 } \

Return to:

Send suggestions and report system problems to the System administrator.