about summary refs log tree commit diff
path: root/iconv/gconv_db.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2022-10-18 17:00:07 +0200
committerFlorian Weimer <fweimer@redhat.com>2022-10-18 17:04:10 +0200
commit58548b9d689fb9bba67bdc5b59c8d2fa47f4f8ec (patch)
tree0aea307f4cf761952fbdf15fd67fc3b09b43707c /iconv/gconv_db.c
parent88f4b6929c26f9240a4b0b7dcc62922f02544a09 (diff)
downloadglibc-58548b9d689fb9bba67bdc5b59c8d2fa47f4f8ec.tar.gz
glibc-58548b9d689fb9bba67bdc5b59c8d2fa47f4f8ec.tar.xz
glibc-58548b9d689fb9bba67bdc5b59c8d2fa47f4f8ec.zip
Use PTR_MANGLE and PTR_DEMANGLE unconditionally in C sources
In the future, this will result in a compilation failure if the
macros are unexpectedly undefined (due to header inclusion ordering
or header inclusion missing altogether).

Assembler sources are more difficult to convert.  In many cases,
they are hand-optimized for the mangling and no-mangling variants,
which is why they are not converted.

sysdeps/s390/s390-32/__longjmp.c and sysdeps/s390/s390-64/__longjmp.c
are special: These are C sources, but most of the implementation is
in assembler, so the PTR_DEMANGLE macro has to be undefined in some
cases, to match the assembler style.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
Diffstat (limited to 'iconv/gconv_db.c')
-rw-r--r--iconv/gconv_db.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/iconv/gconv_db.c b/iconv/gconv_db.c
index 90037fdf58..4943c954a3 100644
--- a/iconv/gconv_db.c
+++ b/iconv/gconv_db.c
@@ -180,9 +180,7 @@ free_derivation (void *p)
 	&& deriv->steps[cnt].__shlib_handle != NULL)
       {
 	__gconv_end_fct end_fct = deriv->steps[cnt].__end_fct;
-#ifdef PTR_DEMANGLE
 	PTR_DEMANGLE (end_fct);
-#endif
 	if (end_fct != NULL)
 	  DL_CALL_FCT (end_fct, (&deriv->steps[cnt]));
       }
@@ -208,9 +206,7 @@ __gconv_release_step (struct __gconv_step *step)
     {
       /* Call the destructor.  */
 	__gconv_end_fct end_fct = step->__end_fct;
-#ifdef PTR_DEMANGLE
 	PTR_DEMANGLE (end_fct);
-#endif
       if (end_fct != NULL)
 	DL_CALL_FCT (end_fct, (step));
 
@@ -303,9 +299,7 @@ gen_steps (struct derivation_step *best, const char *toset,
 
 	      /* Call the init function.  */
 	      __gconv_init_fct init_fct = result[step_cnt].__init_fct;
-# ifdef PTR_DEMANGLE
 	      PTR_DEMANGLE (init_fct);
-# endif
 	      if (init_fct != NULL)
 		{
 		  status = DL_CALL_FCT (init_fct, (&result[step_cnt]));
@@ -316,17 +310,13 @@ gen_steps (struct derivation_step *best, const char *toset,
 		      /* Do not call the end function because the init
 			 function has failed.  */
 		      result[step_cnt].__end_fct = NULL;
-# ifdef PTR_MANGLE
 		      PTR_MANGLE (result[step_cnt].__end_fct);
-# endif
 		      /* Make sure we unload this module.  */
 		      --step_cnt;
 		      break;
 		    }
 		}
-# ifdef PTR_MANGLE
 	      PTR_MANGLE (result[step_cnt].__btowc_fct);
-# endif
 	    }
 	  else
 #endif
@@ -404,15 +394,10 @@ increment_counter (struct __gconv_step *steps, size_t nsteps)
 
 	      /* Call the init function.  */
 	      __gconv_init_fct init_fct = step->__init_fct;
-#ifdef PTR_DEMANGLE
 	      PTR_DEMANGLE (init_fct);
-#endif
 	      if (init_fct != NULL)
 		DL_CALL_FCT (init_fct, (step));
-
-#ifdef PTR_MANGLE
 	      PTR_MANGLE (step->__btowc_fct);
-#endif
 	    }
 	}
     }