summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstefanf <stefanf@FreeBSD.org>2004-09-22 16:56:49 +0000
committerstefanf <stefanf@FreeBSD.org>2004-09-22 16:56:49 +0000
commit5b6654bdf6f88b415d84b148a3789f52f1ec2685 (patch)
treece233aa140fe0059fed10f53cfdd1be159abf2c8
parent59b52ed829c8199391024052fe9e5647452fcdb7 (diff)
downloadFreeBSD-src-5b6654bdf6f88b415d84b148a3789f52f1ec2685.zip
FreeBSD-src-5b6654bdf6f88b415d84b148a3789f52f1ec2685.tar.gz
Prefer C99's __func__ over GCC's __FUNCTION__.
-rw-r--r--lib/libc/locale/collate.c6
-rw-r--r--lib/libdevinfo/devinfo.c2
-rw-r--r--lib/libncp/ncpl_subr.c8
-rw-r--r--lib/libnetgraph/sock.c2
-rw-r--r--lib/libstand/stand.h4
5 files changed, 11 insertions, 11 deletions
diff --git a/lib/libc/locale/collate.c b/lib/libc/locale/collate.c
index a4eec6b..90c78ef 100644
--- a/lib/libc/locale/collate.c
+++ b/lib/libc/locale/collate.c
@@ -202,14 +202,14 @@ __collate_substitute(s)
delta += delta / 8;
dest_str = malloc(dest_len = delta);
if (dest_str == NULL)
- __collate_err(EX_OSERR, __FUNCTION__);
+ __collate_err(EX_OSERR, __func__);
len = 0;
while (*s) {
nlen = len + strlen(__collate_substitute_table[*s]);
if (dest_len <= nlen) {
dest_str = reallocf(dest_str, dest_len = nlen + delta);
if (dest_str == NULL)
- __collate_err(EX_OSERR, __FUNCTION__);
+ __collate_err(EX_OSERR, __func__);
}
(void)strcpy(dest_str + len, __collate_substitute_table[*s++]);
len = nlen;
@@ -246,7 +246,7 @@ __collate_strdup(s)
u_char *t = strdup(s);
if (t == NULL)
- __collate_err(EX_OSERR, __FUNCTION__);
+ __collate_err(EX_OSERR, __func__);
return (t);
}
diff --git a/lib/libdevinfo/devinfo.c b/lib/libdevinfo/devinfo.c
index 0318629..50bc375 100644
--- a/lib/libdevinfo/devinfo.c
+++ b/lib/libdevinfo/devinfo.c
@@ -84,7 +84,7 @@ static int devinfo_generation = 0;
#if 0
# define debug(fmt, args...) \
- fprintf(stderr, "%s:" fmt "\n", __FUNCTION__ , ##args)
+ fprintf(stderr, "%s:" fmt "\n", __func__ , ##args)
#else
# define debug(fmt, args...)
#endif
diff --git a/lib/libncp/ncpl_subr.c b/lib/libncp/ncpl_subr.c
index 0dd191f..1863143 100644
--- a/lib/libncp/ncpl_subr.c
+++ b/lib/libncp/ncpl_subr.c
@@ -254,19 +254,19 @@ ncp_initlib(void){
if (errno == ENOENT)
fprintf(stderr, "Kernel module ncp is not loaded.\n");
else
- fprintf(stderr, "%s: kernel module is old, please recompile it.\n", __FUNCTION__);
+ fprintf(stderr, "%s: kernel module is old, please recompile it.\n", __func__);
return error;
}
if (NCP_VERSION != kv) {
- fprintf(stderr, "%s: kernel module version(%d) don't match library(%d).\n", __FUNCTION__, kv, NCP_VERSION);
+ fprintf(stderr, "%s: kernel module version(%d) don't match library(%d).\n", __func__, kv, NCP_VERSION);
return EINVAL;
}
if ((error = ncp_nls_setrecode(0)) != 0) {
- fprintf(stderr, "%s: can't initialise recode\n", __FUNCTION__);
+ fprintf(stderr, "%s: can't initialise recode\n", __func__);
return error;
}
if ((error = ncp_nls_setlocale("")) != 0) {
- fprintf(stderr, "%s: can't initialise locale\n", __FUNCTION__);
+ fprintf(stderr, "%s: can't initialise locale\n", __func__);
return error;
}
ncp_initialized++;
diff --git a/lib/libnetgraph/sock.c b/lib/libnetgraph/sock.c
index 070abea..1aeafcc 100644
--- a/lib/libnetgraph/sock.c
+++ b/lib/libnetgraph/sock.c
@@ -196,7 +196,7 @@ NgNameNode(int cs, const char *path, const char *fmt, ...)
if (NgSendMsg(cs, path,
NGM_GENERIC_COOKIE, NGM_NAME, &ngn, sizeof(ngn)) < 0) {
if (_gNgDebugLevel >= 1)
- NGLOGX("%s: failed", __FUNCTION__);
+ NGLOGX("%s: failed", __func__);
return (-1);
}
diff --git a/lib/libstand/stand.h b/lib/libstand/stand.h
index 219b2df..eba6a0c 100644
--- a/lib/libstand/stand.h
+++ b/lib/libstand/stand.h
@@ -68,8 +68,8 @@
#include <sys/dirent.h>
#include <string.h>
-#define CHK(fmt, args...) printf("%s(%d): " fmt "\n", __FUNCTION__, __LINE__ , ##args)
-#define PCHK(fmt, args...) {printf("%s(%d): " fmt "\n", __FUNCTION__, __LINE__ , ##args); getchar();}
+#define CHK(fmt, args...) printf("%s(%d): " fmt "\n", __func__, __LINE__ , ##args)
+#define PCHK(fmt, args...) {printf("%s(%d): " fmt "\n", __func__, __LINE__ , ##args); getchar();}
#ifndef NULL
#define NULL 0
OpenPOWER on IntegriCloud