aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2008-11-09 08:34:18 +0000
committerMike Frysinger <vapier@gentoo.org>2008-11-09 08:34:18 +0000
commite5cecce3a871436f71a28a524bbc49e87df3c5cd (patch)
tree98e2078fe4d94fa308cb98c60fb9840490b27642
parentlibsandbox: fix typo: wrappers.c, not wrapper.c (diff)
downloadsandbox-e5cecce3a871436f71a28a524bbc49e87df3c5cd.tar.gz
sandbox-e5cecce3a871436f71a28a524bbc49e87df3c5cd.tar.bz2
sandbox-e5cecce3a871436f71a28a524bbc49e87df3c5cd.zip
libsbutil: use __func__ rather than __FUNCTION__
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rw-r--r--libsbutil/include/rcscripts/util/debug.h22
-rw-r--r--libsbutil/include/rcscripts/util/dynbuf.h2
-rw-r--r--libsbutil/src/debug.c2
3 files changed, 13 insertions, 13 deletions
diff --git a/libsbutil/include/rcscripts/util/debug.h b/libsbutil/include/rcscripts/util/debug.h
index ae614ad..522ee25 100644
--- a/libsbutil/include/rcscripts/util/debug.h
+++ b/libsbutil/include/rcscripts/util/debug.h
@@ -64,14 +64,14 @@ debug_message (const char *file, const char *func, int line,
#define DBG_MSG(_format, _arg...) \
do { \
- debug_message (__FILE__, __FUNCTION__, __LINE__, _format, ## _arg); \
+ debug_message (__FILE__, __func__, __LINE__, _format, ## _arg); \
} while (0)
#define FATAL_ERROR() \
do { \
save_errno (); \
fprintf(stderr, "ERROR: file '%s', function '%s', line %i.\n", \
- __FILE__, __FUNCTION__, __LINE__); \
+ __FILE__, __func__, __LINE__); \
restore_errno (); \
if (0 != errno) \
{ \
@@ -124,15 +124,15 @@ inline bool __check_arg_fp (FILE * fp, const char *file, const char *func,
size_t line);
#define check_arg_ptr(_ptr) \
- __check_arg_ptr (_ptr, __FILE__, __FUNCTION__, __LINE__)
+ __check_arg_ptr (_ptr, __FILE__, __func__, __LINE__)
#define check_arg_str(_str) \
- __check_arg_str (_str, __FILE__, __FUNCTION__, __LINE__)
+ __check_arg_str (_str, __FILE__, __func__, __LINE__)
#define check_arg_strv(_str) \
- __check_arg_strv (_str, __FILE__, __FUNCTION__, __LINE__)
+ __check_arg_strv (_str, __FILE__, __func__, __LINE__)
#define check_arg_fd(_fd) \
- __check_arg_fd (_fd, __FILE__, __FUNCTION__, __LINE__)
+ __check_arg_fd (_fd, __FILE__, __func__, __LINE__)
#define check_arg_fp(_fp) \
- __check_arg_fp (_fp, __FILE__, __FUNCTION__, __LINE__)
+ __check_arg_fp (_fp, __FILE__, __func__, __LINE__)
/*
* Various memory allocation functions and macro's.
@@ -147,16 +147,16 @@ inline void *__xrealloc (void *ptr, size_t size, const char *file,
const char *func, size_t line);
#define xcalloc(_nmemb, _size) \
- __xcalloc (_nmemb, _size, __FILE__, __FUNCTION__, __LINE__)
+ __xcalloc (_nmemb, _size, __FILE__, __func__, __LINE__)
#define xmalloc(_size) \
- __xmalloc (_size, __FILE__, __FUNCTION__, __LINE__)
+ __xmalloc (_size, __FILE__, __func__, __LINE__)
#define xrealloc(_ptr, _size) \
- __xrealloc (_ptr, _size, __FILE__, __FUNCTION__, __LINE__)
+ __xrealloc (_ptr, _size, __FILE__, __func__, __LINE__)
inline char *__xstrndup (const char *str, size_t size, const char *file,
const char *func, size_t line);
#define xstrndup(_str, _size) \
- __xstrndup (_str, _size, __FILE__, __FUNCTION__, __LINE__)
+ __xstrndup (_str, _size, __FILE__, __func__, __LINE__)
#endif /* __RC_DEBUG_H__ */
diff --git a/libsbutil/include/rcscripts/util/dynbuf.h b/libsbutil/include/rcscripts/util/dynbuf.h
index 3ed488a..1349014 100644
--- a/libsbutil/include/rcscripts/util/dynbuf.h
+++ b/libsbutil/include/rcscripts/util/dynbuf.h
@@ -61,7 +61,7 @@ inline bool __rc_check_arg_dynbuf (rc_dynbuf_t *dynbuf, const char *file,
const char *func, size_t line);
#define rc_check_arg_dynbuf(_dynbuf) \
- __rc_check_arg_dynbuf (_dynbuf, __FILE__, __FUNCTION__, __LINE__)
+ __rc_check_arg_dynbuf (_dynbuf, __FILE__, __func__, __LINE__)
#endif /* __RC_DYNBUF_H__ */
diff --git a/libsbutil/src/debug.c b/libsbutil/src/debug.c
index 7fae087..5cc02ea 100644
--- a/libsbutil/src/debug.c
+++ b/libsbutil/src/debug.c
@@ -95,7 +95,7 @@ debug_message (const char *file, const char *func, int line,
if (NULL == format_str)
{
fprintf (stderr, "(%s) error: in %s, function %s(), line %i:\n",
- log_domain, __FILE__, __FUNCTION__, __LINE__);
+ log_domain, __FILE__, __func__, __LINE__);
fprintf (stderr, "(%s) Failed to allocate buffer!\n",
log_domain);
abort ();