aboutsummaryrefslogtreecommitdiff
path: root/include/libssh/priv.h
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2015-04-02 10:56:31 +0200
committerAndreas Schneider <asn@cryptomilk.org>2015-04-02 10:58:36 +0200
commita3357b892060d6d534bc8d742d42dc78e58e07ce (patch)
tree1a28349e59ca679186cf14af55ab08dfbf55f065 /include/libssh/priv.h
parent7ec798d3e73f3dac94a3c240545ebaf4daa189b4 (diff)
downloadlibssh-a3357b892060d6d534bc8d742d42dc78e58e07ce.tar.gz
libssh-a3357b892060d6d534bc8d742d42dc78e58e07ce.tar.xz
libssh-a3357b892060d6d534bc8d742d42dc78e58e07ce.zip
include: We should use __func__ which is C99
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'include/libssh/priv.h')
-rw-r--r--include/libssh/priv.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/include/libssh/priv.h b/include/libssh/priv.h
index 90ae5bb4..697b45bf 100644
--- a/include/libssh/priv.h
+++ b/include/libssh/priv.h
@@ -139,10 +139,8 @@ int gettimeofday(struct timeval *__p, void *__t);
#define MAX_BUF_SIZE 4096
#endif
-#ifndef __FUNCTION__
-#if defined(__SUNPRO_C)
-#define __FUNCTION__ __func__
-#endif
+#ifndef __func__
+#define __func__ __FUNCTION__
#endif
#if defined(HAVE_GCC_THREAD_LOCAL_STORAGE)
@@ -179,7 +177,7 @@ void ssh_log_function(int verbosity,
const char *function,
const char *buffer);
#define SSH_LOG(priority, ...) \
- _ssh_log(priority, __FUNCTION__, __VA_ARGS__)
+ _ssh_log(priority, __func__, __VA_ARGS__)
/* LEGACY */
void ssh_log_common(struct ssh_common_struct *common,
@@ -197,18 +195,18 @@ struct error_struct {
};
#define ssh_set_error(error, code, ...) \
- _ssh_set_error(error, code, __FUNCTION__, __VA_ARGS__)
+ _ssh_set_error(error, code, __func__, __VA_ARGS__)
void _ssh_set_error(void *error,
int code,
const char *function,
const char *descr, ...) PRINTF_ATTRIBUTE(4, 5);
#define ssh_set_error_oom(error) \
- _ssh_set_error_oom(error, __FUNCTION__)
+ _ssh_set_error_oom(error, __func__)
void _ssh_set_error_oom(void *error, const char *function);
#define ssh_set_error_invalid(error) \
- _ssh_set_error_invalid(error, __FUNCTION__)
+ _ssh_set_error_invalid(error, __func__)
void _ssh_set_error_invalid(void *error, const char *function);