aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorStefan Farfeleder <stefanf@FreeBSD.org>2004-09-22 16:56:49 +0000
committerStefan Farfeleder <stefanf@FreeBSD.org>2004-09-22 16:56:49 +0000
commite60b9f5130555c81ac3e6b39130d5b332a979c02 (patch)
treece233aa140fe0059fed10f53cfdd1be159abf2c8 /lib
parentff9af45a01e0312f2d252d06cdfefa08a2abcb37 (diff)
Prefer C99's __func__ over GCC's __FUNCTION__.
Notes
Notes: svn path=/head/; revision=135576
Diffstat (limited to 'lib')
-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 a4eec6b33c17..90c78efad2e6 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 03186291ddb4..50bc375db68d 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 0dd191faf398..186314386f90 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 070abea9852d..1aeafcc8a1f9 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 219b2df46976..eba6a0ce6ab9 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