OSDN Git Service

ldso: use __func__ rather than __FUNCTION__
authorMike Frysinger <vapier@gentoo.org>
Sun, 27 Nov 2011 05:27:43 +0000 (00:27 -0500)
committerMike Frysinger <vapier@gentoo.org>
Sun, 27 Nov 2011 05:30:06 +0000 (00:30 -0500)
The former is part of a standard (C99) while the latter is not.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
ldso/include/ldso.h
ldso/ldso/dl-tls.c
ldso/libdl/libdl.c

index 9fecff9..4c09177 100644 (file)
@@ -102,7 +102,7 @@ extern char *_dl_debug_nofixups;
 extern char *_dl_debug_bindings;
 extern int   _dl_debug_file;
 # define __dl_debug_dprint(fmt, args...) \
-       _dl_dprintf(_dl_debug_file, "%s:%i: " fmt, __FUNCTION__, __LINE__, ## args);
+       _dl_dprintf(_dl_debug_file, "%s:%i: " fmt, __func__, __LINE__, ## args);
 # define _dl_if_debug_dprint(fmt, args...) \
        do { if (_dl_debug) __dl_debug_dprint(fmt, ## args); } while (0)
 #else
index 362efbb..a672e74 100644 (file)
@@ -663,7 +663,7 @@ allocate_and_init (struct link_map *map)
        newp = _dl_memalign (map->l_tls_align, map->l_tls_blocksize);
        if (newp == NULL)
        {
-               _dl_dprintf(2, "%s:%d: Out of memory!!!\n", __FUNCTION__, __LINE__);
+               _dl_dprintf(2, "%s:%d: Out of memory!!!\n", __func__, __LINE__);
                _dl_exit(1);
        }
 
index 324b76a..eb879d2 100644 (file)
@@ -131,7 +131,7 @@ size_t _dl_tls_static_size = 2048;
 # define _dl_if_debug_print(fmt, args...) \
        do { \
        if (_dl_debug) \
-               fprintf(stderr, "%s():%i: " fmt, __FUNCTION__, __LINE__, ## args); \
+               fprintf(stderr, "%s():%i: " fmt, __func__, __LINE__, ## args); \
        } while (0)
 #else
 # define _dl_if_debug_print(fmt, args...)