diff mbox series

iconv: Remove public declaration of __gconv_transliterate

Message ID 87zhnozxux.fsf@oldenburg2.str.redhat.com
State New
Headers show
Series iconv: Remove public declaration of __gconv_transliterate | expand

Commit Message

Florian Weimer May 14, 2019, 6:37 p.m. UTC
Commit ba7b4d294b01870ce3497971e9d07ee261cdc540 ("Complete the
removal of __gconv_translit_find") added a declaration of the
GLIBC_PRIVATE function, __gconv_transliterate, to the installed
header <gconv.h>.  It should have been added to the internal
<gconv_int.h> header.

2019-05-14  Florian Weimer  <fweimer@redhat.com>

	* iconv/gconv.h (__gconv_transliterate): Move declaration …
	* iconv/gconv_int.h (__gconv_transliterate): … here.
	* iconv/loop.c: Include <iconv/gconv_int.h> instead of <gconv.h>.
	* iconv/skeleton.c: Likewise.

Comments

Carlos O'Donell May 14, 2019, 9:08 p.m. UTC | #1
On 5/14/19 2:37 PM, Florian Weimer wrote:
> Commit ba7b4d294b01870ce3497971e9d07ee261cdc540 ("Complete the
> removal of __gconv_translit_find") added a declaration of the
> GLIBC_PRIVATE function, __gconv_transliterate, to the installed
> header <gconv.h>.  It should have been added to the internal
> <gconv_int.h> header.
> 
> 2019-05-14  Florian Weimer  <fweimer@redhat.com>
> 
> 	* iconv/gconv.h (__gconv_transliterate): Move declaration …
> 	* iconv/gconv_int.h (__gconv_transliterate): … here.
> 	* iconv/loop.c: Include <iconv/gconv_int.h> instead of <gconv.h>.
> 	* iconv/skeleton.c: Likewise.
> 

OK for master. Thanks for continuing to clean this up.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>

> diff --git a/iconv/gconv.h b/iconv/gconv.h
> index 12fd775604..5ad26c06ac 100644
> --- a/iconv/gconv.h
> +++ b/iconv/gconv.h
> @@ -142,13 +142,4 @@ typedef struct __gconv_info
>    __extension__ struct __gconv_step_data __data[0];
>  } *__gconv_t;
>  
> -/* Transliteration using the locale's data.  */
> -extern int __gconv_transliterate (struct __gconv_step *step,
> -				  struct __gconv_step_data *step_data,
> -				  const unsigned char *inbufstart,
> -				  const unsigned char **inbufp,
> -				  const unsigned char *inbufend,
> -				  unsigned char **outbufstart,
> -				  size_t *irreversible);

OK.

> -
>  #endif /* gconv.h */
> diff --git a/iconv/gconv_int.h b/iconv/gconv_int.h
> index 4635bee54d..ea41d6feaa 100644
> --- a/iconv/gconv_int.h
> +++ b/iconv/gconv_int.h
> @@ -223,6 +223,14 @@ extern void __gconv_get_builtin_trans (const char *name,
>  				       struct __gconv_step *step)
>       attribute_hidden;
>  
> +/* Transliteration using the locale's data.  */
> +extern int __gconv_transliterate (struct __gconv_step *step,
> +                                  struct __gconv_step_data *step_data,
> +                                  const unsigned char *inbufstart,
> +                                  const unsigned char **inbufp,
> +                                  const unsigned char *inbufend,
> +                                  unsigned char **outbufstart,
> +                                  size_t *irreversible);

OK. Prototype.

>  libc_hidden_proto (__gconv_transliterate)

   ^^^^^^^ The plt bypass part (if required, and already there).

>  
>  /* If NAME is an codeset alias expand it.  */
> diff --git a/iconv/loop.c b/iconv/loop.c
> index 316bbf62b7..fa98c1a521 100644
> --- a/iconv/loop.c
> +++ b/iconv/loop.c
> @@ -49,7 +49,7 @@
>  
>  #include <assert.h>
>  #include <endian.h>
> -#include <gconv.h>
> +#include <iconv/gconv_int.h>

OK. Gives you the PLT bypassing version of the function.

>  #include <stdint.h>
>  #include <string.h>
>  #include <wchar.h>
> diff --git a/iconv/skeleton.c b/iconv/skeleton.c
> index d98a78acc2..cc39fdcc70 100644
> --- a/iconv/skeleton.c
> +++ b/iconv/skeleton.c
> @@ -133,7 +133,7 @@
>   */
>  
>  #include <assert.h>
> -#include <gconv.h>
> +#include <iconv/gconv_int.h>

OK.

>  #include <string.h>
>  #define __need_size_t
>  #define __need_NULL
>
diff mbox series

Patch

diff --git a/iconv/gconv.h b/iconv/gconv.h
index 12fd775604..5ad26c06ac 100644
--- a/iconv/gconv.h
+++ b/iconv/gconv.h
@@ -142,13 +142,4 @@  typedef struct __gconv_info
   __extension__ struct __gconv_step_data __data[0];
 } *__gconv_t;
 
-/* Transliteration using the locale's data.  */
-extern int __gconv_transliterate (struct __gconv_step *step,
-				  struct __gconv_step_data *step_data,
-				  const unsigned char *inbufstart,
-				  const unsigned char **inbufp,
-				  const unsigned char *inbufend,
-				  unsigned char **outbufstart,
-				  size_t *irreversible);
-
 #endif /* gconv.h */
diff --git a/iconv/gconv_int.h b/iconv/gconv_int.h
index 4635bee54d..ea41d6feaa 100644
--- a/iconv/gconv_int.h
+++ b/iconv/gconv_int.h
@@ -223,6 +223,14 @@  extern void __gconv_get_builtin_trans (const char *name,
 				       struct __gconv_step *step)
      attribute_hidden;
 
+/* Transliteration using the locale's data.  */
+extern int __gconv_transliterate (struct __gconv_step *step,
+                                  struct __gconv_step_data *step_data,
+                                  const unsigned char *inbufstart,
+                                  const unsigned char **inbufp,
+                                  const unsigned char *inbufend,
+                                  unsigned char **outbufstart,
+                                  size_t *irreversible);
 libc_hidden_proto (__gconv_transliterate)
 
 /* If NAME is an codeset alias expand it.  */
diff --git a/iconv/loop.c b/iconv/loop.c
index 316bbf62b7..fa98c1a521 100644
--- a/iconv/loop.c
+++ b/iconv/loop.c
@@ -49,7 +49,7 @@ 
 
 #include <assert.h>
 #include <endian.h>
-#include <gconv.h>
+#include <iconv/gconv_int.h>
 #include <stdint.h>
 #include <string.h>
 #include <wchar.h>
diff --git a/iconv/skeleton.c b/iconv/skeleton.c
index d98a78acc2..cc39fdcc70 100644
--- a/iconv/skeleton.c
+++ b/iconv/skeleton.c
@@ -133,7 +133,7 @@ 
  */
 
 #include <assert.h>
-#include <gconv.h>
+#include <iconv/gconv_int.h>
 #include <string.h>
 #define __need_size_t
 #define __need_NULL