]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - iconv/gconv_dl.c
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / iconv / gconv_dl.c
index b0ab2ffcbae99e093006a3065986f1467dcdf1e3..0ed71b74985da665e8d1e70e2222d113e7391500 100644 (file)
@@ -1,6 +1,5 @@
 /* Handle loading/unloading of shared object for transformation.
-   Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005
-   Free Software Foundation, Inc.
+   Copyright (C) 1997-2019 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
@@ -24,7 +23,7 @@
 #include <search.h>
 #include <stdlib.h>
 #include <string.h>
-#include <bits/libc-lock.h>
+#include <libc-lock.h>
 #include <sys/param.h>
 
 #include <gconv_int.h>
@@ -65,7 +64,6 @@ known_compare (const void *p1, const void *p2)
 /* Open the gconv database if necessary.  A non-negative return value
    means success.  */
 struct __gconv_loaded_object *
-internal_function
 __gconv_find_shlib (const char *name)
 {
   struct __gconv_loaded_object *found;
@@ -132,10 +130,8 @@ __gconv_find_shlib (const char *name)
 
 #ifdef PTR_MANGLE
                  PTR_MANGLE (found->fct);
-                 if (found->init_fct != NULL)
-                   PTR_MANGLE (found->init_fct);
-                 if (found->end_fct !=  NULL)
-                   PTR_MANGLE (found->end_fct);
+                 PTR_MANGLE (found->init_fct);
+                 PTR_MANGLE (found->end_fct);
 #endif
 
                  /* We have succeeded in loading the shared object.  */
@@ -186,7 +182,6 @@ do_release_shlib (void *nodep, VISIT value, int level)
 
 /* Notify system that a shared object is not longer needed.  */
 void
-internal_function
 __gconv_release_shlib (struct __gconv_loaded_object *handle)
 {
   /* Urgh, this is ugly but we have no other possibility.  */
@@ -220,6 +215,9 @@ libc_freeres_fn (free_mem)
 
 
 #ifdef DEBUG
+
+#include <stdio.h>
+
 static void
 do_print (const void *nodep, VISIT value, int level)
 {
@@ -232,7 +230,7 @@ do_print (const void *nodep, VISIT value, int level)
          obj->name, obj->counter);
 }
 
-static void
+static void __attribute__ ((used))
 print_all (void)
 {
   __twalk (loaded, do_print);