mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
common.h: use __func__ instead of __FUNCTION__
For increased portability. The former is in C99, the latter is from gcc.
This commit is contained in:
parent
1989a0f46a
commit
e06c3e99d8
1 changed files with 5 additions and 1 deletions
|
|
@ -32,12 +32,16 @@
|
|||
#include <ctype.h>
|
||||
#include <assert.h>
|
||||
|
||||
#if !defined(__func__) && defined(__FUNCTION__)
|
||||
#define __func__ __FUNCTION__
|
||||
#endif
|
||||
|
||||
// dbus proxy path used by firejail and firemon
|
||||
#define XDG_DBUS_PROXY_PATH "/usr/bin/xdg-dbus-proxy"
|
||||
|
||||
#define errExit(msg) do { \
|
||||
char msgout[500]; \
|
||||
snprintf(msgout, 500, "Error %s: %s:%d %s", msg, __FILE__, __LINE__, __FUNCTION__); \
|
||||
snprintf(msgout, 500, "Error %s: %s:%d %s", msg, __FILE__, __LINE__, __func__); \
|
||||
perror(msgout); \
|
||||
exit(1); \
|
||||
} while (0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue