]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Complete the removal of __gconv_translit_find
authorFlorian Weimer <fweimer@redhat.com>
Fri, 12 Sep 2014 07:17:32 +0000 (09:17 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Fri, 12 Sep 2014 07:17:32 +0000 (09:17 +0200)
Prior to the 2.20 release, the function was just changed to fail
unconditionally, in commit a1a6a401ab0a3c9f15fb7eaebbdcee24192254e8.
This commit removes the function completely, including gconv bits
which depend on it.

This changes the gconv ABI, which is not a public interface.

20 files changed:
ChangeLog
iconv/Versions
iconv/gconv.h
iconv/gconv_close.c
iconv/gconv_int.h
iconv/gconv_open.c
iconv/gconv_trans.c
iconv/loop.c
iconv/skeleton.c
libio/fileops.c
libio/iofwide.c
wcsmbs/btowc.c
wcsmbs/mbrtoc16.c
wcsmbs/mbrtowc.c
wcsmbs/mbsnrtowcs.c
wcsmbs/mbsrtowcs_l.c
wcsmbs/wcrtomb.c
wcsmbs/wcsnrtombs.c
wcsmbs/wcsrtombs.c
wcsmbs/wctob.c

index 7a3346af66f19bb5955f7bcbd5c3de6d1efda74c..95388d84a279aa000b386d24035316904fb89bcf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,42 @@
+2014-08-12  Florian Weimer  <fweimer@redhat.com>
+
+       * iconv/gconv_open.c (__gconv_open): Remove transliteration module
+       loading.
+       * iconv/Versions (__gconv_transliterate): Export for use from
+       gconv modules.
+       * iconv/gconv.h (__GCONV_TRANSLIT): New flag.
+       (struct __gconv_trans_data, __gconv_trans_fct,
+       __gconv_trans_context_fct, __gconv_trans_query_fct,
+       __gconv_trans_init_fct, __gconv_trans_end_fct): Remove type
+       definitions.
+       (struct __gconv_step_data): Remove __trans member.
+       (__gconv_transliterate): Declaration moved from gconv_int.h.  No
+       longer hidden.  Remove unused trans_data argument.
+       * iconv/gconv_int.h (struct trans_struct): Remove definition.
+       (__gconv_translit_find): Remove declaration.
+       (__gconv_transliterate): Declaration moved to gconv.h.  Add hidden
+       prototype.
+       * iconv/gconv_close.c (__gconv_close): Remove __trans cleanup.
+       * iconv/gconv_trans.c (__gconv_transliterate): Remove unused
+       trans_data argument.  Add hidden definition.
+       (__gconv_translit_find): Remove.
+       * iconv/loop.c (STANDARD_TO_LOOP_ERR_HANDLER): Call
+       __gconv_transliterate directly if __GCONV_TRANSLIT is set.
+       * iconv/skeleton.c: Remove transliteration initialization.
+       * libio/fileops.c (_IO_new_file_fopen): Adjust struct
+       __gconv_step_data initialization.
+       * libio/iofwide.c (__libio_translit_): Remove.
+       (_IO_fwide): Adjust struct __gconv_step_data initialization.
+       * wcsmbs/btowc.c (__btowc): Likewise.
+       * wcsmbs/mbrtoc16.c (mbrtoc16): Likewise.
+       * wcsmbs/mbrtowc.c (__mbrtowc): Likewise.
+       * wcsmbs/mbsnrtowcs.c (__mbsnrtowcs): Likewise.
+       * wcsmbs/mbsrtowcs_l.c (__mbsrtowcs_l): Likewise.
+       * wcsmbs/wcrtomb.c (__wcrtomb): Likewise.
+       * wcsmbs/wcsnrtombs.c (__wcsnrtombs): Likewise.
+       * wcsmbs/wcsrtombs.c (__wcsrtombs): Likewise.
+       * wcsmbs/wctob.c (wctob): Likewise.
+
 2014-09-12  Siddhesh Poyarekar  <siddhesh@redhat.com>
 
        [BZ #16194]
index 5d50cf11e276a2082c319afeb9a1e245ccfefcb8..60ab10a2775885157b8e9ae6f0871c514fc3cb86 100644 (file)
@@ -6,5 +6,8 @@ libc {
   GLIBC_PRIVATE {
     # functions shared with iconv program
     __gconv_get_alias_db; __gconv_get_cache; __gconv_get_modules_db;
+
+    # function used by the gconv modules
+    __gconv_transliterate;
   }
 }
index 108dccbb4651d97137f4db0402c97876effe8f4d..7d59bb06c74e4576b4c1737e66c12878bd888417 100644 (file)
@@ -56,7 +56,8 @@ enum
 {
   __GCONV_IS_LAST = 0x0001,
   __GCONV_IGNORE_ERRORS = 0x0002,
-  __GCONV_SWAP = 0x0004
+  __GCONV_SWAP = 0x0004,
+  __GCONV_TRANSLIT = 0x0008
 };
 
 
@@ -64,7 +65,6 @@ enum
 struct __gconv_step;
 struct __gconv_step_data;
 struct __gconv_loaded_object;
-struct __gconv_trans_data;
 
 
 /* Type of a conversion function.  */
@@ -80,38 +80,6 @@ typedef int (*__gconv_init_fct) (struct __gconv_step *);
 typedef void (*__gconv_end_fct) (struct __gconv_step *);
 
 
-/* Type of a transliteration/transscription function.  */
-typedef int (*__gconv_trans_fct) (struct __gconv_step *,
-                                 struct __gconv_step_data *, void *,
-                                 const unsigned char *,
-                                 const unsigned char **,
-                                 const unsigned char *, unsigned char **,
-                                 size_t *);
-
-/* Function to call to provide transliteration module with context.  */
-typedef int (*__gconv_trans_context_fct) (void *, const unsigned char *,
-                                         const unsigned char *,
-                                         unsigned char *, unsigned char *);
-
-/* Function to query module about supported encoded character sets.  */
-typedef int (*__gconv_trans_query_fct) (const char *, const char ***,
-                                       size_t *);
-
-/* Constructor and destructor for local data for transliteration.  */
-typedef int (*__gconv_trans_init_fct) (void **, const char *);
-typedef void (*__gconv_trans_end_fct) (void *);
-
-struct __gconv_trans_data
-{
-  /* Transliteration/Transscription function.  */
-  __gconv_trans_fct __trans_fct;
-  __gconv_trans_context_fct __trans_context_fct;
-  __gconv_trans_end_fct __trans_end_fct;
-  void *__data;
-  struct __gconv_trans_data *__next;
-};
-
-
 /* Description of a conversion step.  */
 struct __gconv_step
 {
@@ -163,9 +131,6 @@ struct __gconv_step_data
   __mbstate_t *__statep;
   __mbstate_t __state; /* This element must not be used directly by
                           any module; always use STATEP!  */
-
-  /* Transliteration information.  */
-  struct __gconv_trans_data *__trans;
 };
 
 
@@ -177,4 +142,13 @@ typedef struct __gconv_info
   __extension__ struct __gconv_step_data __data __flexarr;
 } *__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 */
index 81f0e0b3198b45091ba372c2587242dcebf1b0ed..f6394af6ca04a67715b22c0fbf96ff597007083a 100644 (file)
@@ -37,20 +37,6 @@ __gconv_close (__gconv_t cd)
   drunp = cd->__data;
   do
     {
-      struct __gconv_trans_data *transp;
-
-      transp = drunp->__trans;
-      while (transp != NULL)
-       {
-         struct __gconv_trans_data *curp = transp;
-         transp = transp->__next;
-
-         if (__glibc_unlikely (curp->__trans_end_fct != NULL))
-           curp->__trans_end_fct (curp->__data);
-
-         free (curp);
-       }
-
       if (!(drunp->__flags & __GCONV_IS_LAST) && drunp->__outbuf != NULL)
        free (drunp->__outbuf);
     }
index ace076b88fc45454ddeccce5112d0cd0d88575b8..13b0e99915e9afd56d7dddf7b01117dfef767c90 100644 (file)
@@ -92,21 +92,6 @@ struct gconv_module
 };
 
 
-/* Internal data structure to represent transliteration module.  */
-struct trans_struct
-{
-  const char *name;
-  struct trans_struct *next;
-
-  const char **csnames;
-  size_t ncsnames;
-  __gconv_trans_fct trans_fct;
-  __gconv_trans_context_fct trans_context_fct;
-  __gconv_trans_init_fct trans_init_fct;
-  __gconv_trans_end_fct trans_end_fct;
-};
-
-
 /* Flags for `gconv_open'.  */
 enum
 {
@@ -258,20 +243,7 @@ extern void __gconv_get_builtin_trans (const char *name,
                                       struct __gconv_step *step)
      internal_function;
 
-/* Try to load transliteration step module.  */
-extern int __gconv_translit_find (struct trans_struct *trans)
-     internal_function;
-
-/* Transliteration using the locale's data.  */
-extern int __gconv_transliterate (struct __gconv_step *step,
-                                 struct __gconv_step_data *step_data,
-                                 void *trans_data,
-                                 const unsigned char *inbufstart,
-                                 const unsigned char **inbufp,
-                                 const unsigned char *inbufend,
-                                 unsigned char **outbufstart,
-                                 size_t *irreversible) attribute_hidden;
-
+libc_hidden_proto (__gconv_transliterate)
 
 /* If NAME is an codeset alias expand it.  */
 extern int __gconv_compare_alias (const char *name1, const char *name2)
index bfbe22bff6ad1675ad91415d98a0cf824524bf9e..615f33dfd2e8de912e54f65f571829e3c82c00e0 100644 (file)
@@ -39,7 +39,7 @@ __gconv_open (const char *toset, const char *fromset, __gconv_t *handle,
   int conv_flags = 0;
   const char *errhand;
   const char *ignore;
-  struct trans_struct *trans = NULL;
+  bool translit = false;
 
   /* Find out whether any error handling method is specified.  */
   errhand = strchr (toset, '/');
@@ -66,72 +66,10 @@ __gconv_open (const char *toset, const char *fromset, __gconv_t *handle,
          while (tok != NULL)
            {
              if (__strcasecmp_l (tok, "TRANSLIT", _nl_C_locobj_ptr) == 0)
-               {
-                 /* It's the builtin transliteration handling.  We only
-                    support it for working on the internal encoding.  */
-                 static const char *const internal_trans_names[1]
-                   = { "INTERNAL" };
-                 struct trans_struct *lastp = NULL;
-                 struct trans_struct *runp;
-
-                 for (runp = trans; runp != NULL; runp = runp->next)
-                   if (runp->trans_fct == __gconv_transliterate)
-                     break;
-                   else
-                     lastp = runp;
-
-                 if (runp == NULL)
-                   {
-                     struct trans_struct *newp;
-
-                     newp = (struct trans_struct *) alloca (sizeof (*newp));
-                     memset (newp, '\0', sizeof (*newp));
-
-                     /* We leave the `name' field zero to signal that
-                        this is an internal transliteration step.  */
-                     newp->csnames = (const char **) internal_trans_names;
-                     newp->ncsnames = 1;
-                     newp->trans_fct = __gconv_transliterate;
-
-                     if (lastp == NULL)
-                       trans = newp;
-                     else
-                       lastp->next = newp;
-                   }
-               }
+               translit = true;
              else if (__strcasecmp_l (tok, "IGNORE", _nl_C_locobj_ptr) == 0)
                /* Set the flag to ignore all errors.  */
                conv_flags |= __GCONV_IGNORE_ERRORS;
-             else
-               {
-                 /* `tok' is possibly a module name.  We'll see later
-                    whether we can find it.  But first see that we do
-                    not already a module of this name.  */
-                 struct trans_struct *lastp = NULL;
-                 struct trans_struct *runp;
-
-                 for (runp = trans; runp != NULL; runp = runp->next)
-                   if (runp->name != NULL
-                       && __strcasecmp_l (tok, runp->name,
-                                          _nl_C_locobj_ptr) == 0)
-                     break;
-                   else
-                     lastp = runp;
-
-                 if (runp == NULL)
-                   {
-                     struct trans_struct *newp;
-
-                     newp = (struct trans_struct *) alloca (sizeof (*newp));
-                     memset (newp, '\0', sizeof (*newp));
-                     newp->name = tok;
-
-                     if (lastp == NULL)
-                       trans = newp;
-                     else
-                       lastp->next = newp;
-                   }
-               }
 
              tok = __strtok_r (NULL, ",", &ptr);
            }
@@ -172,25 +110,6 @@ __gconv_open (const char *toset, const char *fromset, __gconv_t *handle,
   res = __gconv_find_transform (toset, fromset, &steps, &nsteps, flags);
   if (res == __GCONV_OK)
     {
-      /* Find the modules.  */
-      struct trans_struct *lastp = NULL;
-      struct trans_struct *runp;
-
-      for (runp = trans; runp != NULL; runp = runp->next)
-       {
-         if (runp->name == NULL
-             || __builtin_expect (__gconv_translit_find (runp), 0) == 0)
-           lastp = runp;
-         else
-           {
-             /* This means we haven't found the module.  Remove it.  */
-             if (lastp == NULL)
-               trans  = runp->next;
-             else
-               lastp->next  = runp->next;
-           }
-       }
-
       /* Allocate room for handle.  */
       result = (__gconv_t) malloc (sizeof (struct __gconv_info)
                                   + (nsteps
@@ -199,8 +118,6 @@ __gconv_open (const char *toset, const char *fromset, __gconv_t *handle,
        res = __GCONV_NOMEM;
       else
        {
-         size_t n;
-
          /* Remember the list of steps.  */
          result->__steps = steps;
          result->__nsteps = nsteps;
@@ -228,47 +145,12 @@ __gconv_open (const char *toset, const char *fromset, __gconv_t *handle,
              /* We use the `mbstate_t' member in DATA.  */
              result->__data[cnt].__statep = &result->__data[cnt].__state;
 
-             /* Now see whether we can use any of the transliteration
-                modules for this step.  */
-             for (runp = trans; runp != NULL; runp = runp->next)
-               for (n = 0; n < runp->ncsnames; ++n)
-                 if (__strcasecmp_l (steps[cnt].__from_name,
-                                     runp->csnames[n], _nl_C_locobj_ptr) == 0)
-                   {
-                     void *data = NULL;
-
-                     /* Match!  Now try the initializer.  */
-                     if (runp->trans_init_fct == NULL
-                         || (runp->trans_init_fct (&data,
-                                                   steps[cnt].__to_name)
-                             == __GCONV_OK))
-                       {
-                         /* Append at the end of the list.  */
-                         struct __gconv_trans_data *newp;
-                         struct __gconv_trans_data **lastp;
-
-                         newp = (struct __gconv_trans_data *)
-                           malloc (sizeof (struct __gconv_trans_data));
-                         if (newp == NULL)
-                           {
-                             res = __GCONV_NOMEM;
-                             goto bail;
-                           }
-
-                         newp->__trans_fct = runp->trans_fct;
-                         newp->__trans_context_fct = runp->trans_context_fct;
-                         newp->__trans_end_fct = runp->trans_end_fct;
-                         newp->__data = data;
-                         newp->__next = NULL;
-
-                         lastp = &result->__data[cnt].__trans;
-                         while (*lastp != NULL)
-                           lastp = &(*lastp)->__next;
-
-                         *lastp = newp;
-                       }
-                     break;
-                   }
+             /* The builtin transliteration handling only
+                supports the internal encoding.  */
+             if (translit
+                 && __strcasecmp_l (steps[cnt].__from_name,
+                                    "INTERNAL", _nl_C_locobj_ptr) == 0)
+               conv_flags |= __GCONV_TRANSLIT;
 
              /* If this is the last step we must not allocate an
                 output buffer.  */
@@ -309,23 +191,7 @@ __gconv_open (const char *toset, const char *fromset, __gconv_t *handle,
          if (result != NULL)
            {
              while (cnt-- > 0)
-               {
-                 struct __gconv_trans_data *transp;
-
-                 transp = result->__data[cnt].__trans;
-                 while (transp != NULL)
-                   {
-                     struct __gconv_trans_data *curp = transp;
-                     transp = transp->__next;
-
-                     if (__glibc_unlikely (curp->__trans_end_fct != NULL))
-                       curp->__trans_end_fct (curp->__data);
-
-                     free (curp);
-                   }
-
-                 free (result->__data[cnt].__outbuf);
-               }
+               free (result->__data[cnt].__outbuf);
 
              free (result);
              result = NULL;
index e0835fc66684e63964b1376a0c730a70225f63f4..65b5539307a3f1545380700bd9c3944e86425958 100644 (file)
@@ -32,7 +32,6 @@
 int
 __gconv_transliterate (struct __gconv_step *step,
                       struct __gconv_step_data *step_data,
-                      void *trans_data __attribute__ ((unused)),
                       const unsigned char *inbufstart,
                       const unsigned char **inbufp,
                       const unsigned char *inbufend,
@@ -237,13 +236,4 @@ __gconv_transliterate (struct __gconv_step *step,
   /* Haven't found a match.  */
   return __GCONV_ILLEGAL_INPUT;
 }
-
-int
-internal_function
-__gconv_translit_find (struct trans_struct *trans)
-{
-  /* Transliteration module loading has been removed because it never
-     worked as intended and suffered from a security vulnerability.
-     Consequently, this function always fails.  */
-  return 1;
-}
+libc_hidden_def (__gconv_transliterate)
index a480c0cd40ab6715c8f29ac53cadda0aaab66420..f4430ed9681ec581cd96e10408ba1781e3d5f29c 100644 (file)
    points.  */
 #define STANDARD_TO_LOOP_ERR_HANDLER(Incr) \
   {                                                                          \
-    struct __gconv_trans_data *trans;                                        \
-                                                                             \
     result = __GCONV_ILLEGAL_INPUT;                                          \
                                                                              \
     if (irreversible == NULL)                                                \
     UPDATE_PARAMS;                                                           \
                                                                              \
     /* First try the transliteration methods.  */                            \
-    for (trans = step_data->__trans; trans != NULL; trans = trans->__next)    \
-      {                                                                              \
-       result = DL_CALL_FCT (trans->__trans_fct,                             \
-                             (step, step_data, trans->__data, *inptrp,       \
-                              &inptr, inend, &outptr, irreversible));        \
-       if (result != __GCONV_ILLEGAL_INPUT)                                  \
-         break;                                                              \
-      }                                                                              \
+    if ((step_data->__flags & __GCONV_TRANSLIT) != 0)                        \
+      result = __gconv_transliterate                                         \
+       (step, step_data, *inptrp,                                            \
+        &inptr, inend, &outptr, irreversible);                       \
                                                                              \
     REINIT_PARAMS;                                                           \
                                                                              \
index 73dc1860a9586942ab5879d50134d65bb18178bf..acd60e2f88a8f159892e99c0c25cedf41ef71664 100644 (file)
@@ -501,8 +501,9 @@ FUNCTION_NAME (struct __gconv_step *step, struct __gconv_step_data *data,
     }
   else
     {
-      /* We preserve the initial values of the pointer variables.  */
-      const unsigned char *inptr = *inptrp;
+      /* We preserve the initial values of the pointer variables,
+        but only some conversion modules need it.  */
+      const unsigned char *inptr __attribute__ ((__unused__)) = *inptrp;
       unsigned char *outbuf = (__builtin_expect (outbufstart == NULL, 1)
                               ? data->__outbuf : *outbufstart);
       unsigned char *outend = data->__outbufend;
@@ -592,8 +593,6 @@ FUNCTION_NAME (struct __gconv_step *step, struct __gconv_step_data *data,
 
       while (1)
        {
-         struct __gconv_trans_data *trans;
-
          /* Remember the start value for this round.  */
          inptr = *inptrp;
          /* The outbuf buffer is empty.  */
@@ -640,13 +639,6 @@ FUNCTION_NAME (struct __gconv_step *step, struct __gconv_step_data *data,
              return status;
            }
 
-         /* Give the transliteration module the chance to store the
-            original text and the result in case it needs a context.  */
-         for (trans = data->__trans; trans != NULL; trans = trans->__next)
-           if (trans->__trans_context_fct != NULL)
-             DL_CALL_FCT (trans->__trans_context_fct,
-                          (trans->__data, inptr, *inptrp, outstart, outbuf));
-
          /* We finished one use of the loops.  */
          ++data->__invocation_counter;
 
index 204cfeaa35ed0f907ed99aae6aed0d21e3cf4cb1..e0d7b76edaeb93408816ddc5a1c8c7d25f23999a 100644 (file)
@@ -403,21 +403,16 @@ _IO_new_file_fopen (fp, filename, mode, is32not64)
          cc->__cd_in.__cd.__data[0].__flags = __GCONV_IS_LAST;
          cc->__cd_in.__cd.__data[0].__statep = &result->_wide_data->_IO_state;
 
-         /* XXX For now no transliteration.  */
-         cc->__cd_in.__cd.__data[0].__trans = NULL;
-
          cc->__cd_out.__cd.__nsteps = fcts.tomb_nsteps;
          cc->__cd_out.__cd.__steps = fcts.tomb;
 
          cc->__cd_out.__cd.__data[0].__invocation_counter = 0;
          cc->__cd_out.__cd.__data[0].__internal_use = 1;
-         cc->__cd_out.__cd.__data[0].__flags = __GCONV_IS_LAST;
+         cc->__cd_out.__cd.__data[0].__flags
+           = __GCONV_IS_LAST | __GCONV_TRANSLIT;
          cc->__cd_out.__cd.__data[0].__statep =
            &result->_wide_data->_IO_state;
 
-         /* And now the transliteration.  */
-         cc->__cd_out.__cd.__data[0].__trans = &__libio_translit;
-
          /* From now on use the wide character callback functions.  */
          ((struct _IO_FILE_plus *) fp)->vtable = fp->_wide_data->_wide_vtable;
 
index 64187e401b2d09c68972cd28f8cf94f4e8a979fc..ecf5819856f1b6b1980a7bc863305111696881f7 100644 (file)
@@ -81,14 +81,6 @@ const struct _IO_codecvt __libio_codecvt =
 };
 
 
-#ifdef _LIBC
-const struct __gconv_trans_data __libio_translit attribute_hidden =
-{
-  .__trans_fct = __gconv_transliterate
-};
-#endif
-
-
 /* Return orientation of stream.  If mode is nonzero try to change
    the orientation first.  */
 #undef _IO_fwide
@@ -146,20 +138,14 @@ _IO_fwide (fp, mode)
        cc->__cd_in.__cd.__data[0].__flags = __GCONV_IS_LAST;
        cc->__cd_in.__cd.__data[0].__statep = &fp->_wide_data->_IO_state;
 
-       /* XXX For now no transliteration.  */
-       cc->__cd_in.__cd.__data[0].__trans = NULL;
-
        cc->__cd_out.__cd.__nsteps = fcts.tomb_nsteps;
        cc->__cd_out.__cd.__steps = fcts.tomb;
 
        cc->__cd_out.__cd.__data[0].__invocation_counter = 0;
        cc->__cd_out.__cd.__data[0].__internal_use = 1;
-       cc->__cd_out.__cd.__data[0].__flags = __GCONV_IS_LAST;
+       cc->__cd_out.__cd.__data[0].__flags
+         = __GCONV_IS_LAST | __GCONV_TRANSLIT;
        cc->__cd_out.__cd.__data[0].__statep = &fp->_wide_data->_IO_state;
-
-       /* And now the transliteration.  */
-       cc->__cd_out.__cd.__data[0].__trans
-         = (struct __gconv_trans_data  *) &__libio_translit;
       }
 #else
 # ifdef _GLIBCPP_USE_WCHAR_T
index 289736ff92efa11215c7c1983b353674c39c9196..aafb39209f32088c9223dfecf50c890e18aa4ad4 100644 (file)
@@ -75,7 +75,6 @@ __btowc (c)
       data.__internal_use = 1;
       data.__flags = __GCONV_IS_LAST;
       data.__statep = &data.__state;
-      data.__trans = NULL;
 
       /* Make sure we start in the initial state.  */
       memset (&data.__state, '\0', sizeof (mbstate_t));
index 643aaf585cad7a6c2127b9ed7e096d978d972de3..69105bae555f027e8641806fb8a5757f3e851358 100644 (file)
@@ -67,7 +67,6 @@ mbrtoc16 (char16_t *pc16, const char *s, size_t n, mbstate_t *ps)
   data.__internal_use = 1;
   data.__flags = __GCONV_IS_LAST;
   data.__statep = ps;
-  data.__trans = NULL;
 
   /* A first special case is if S is NULL.  This means put PS in the
      initial state.  */
index c57217add5ad4ee54965e7ba2d3f04c05e0ad93f..8070bd8a3d1c0e74f6f84cf274c1bf18e1e62341 100644 (file)
@@ -49,7 +49,6 @@ __mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
   data.__internal_use = 1;
   data.__flags = __GCONV_IS_LAST;
   data.__statep = ps ?: &state;
-  data.__trans = NULL;
 
   /* A first special case is if S is NULL.  This means put PS in the
      initial state.  */
index f91e580e0d52da9c91dfd182ac88a5e4ac74e97c..e611ddee762e5851066ca37c3a8c1e353819a7de 100644 (file)
@@ -58,7 +58,6 @@ __mbsnrtowcs (dst, src, nmc, len, ps)
   data.__internal_use = 1;
   data.__flags = __GCONV_IS_LAST;
   data.__statep = ps ?: &state;
-  data.__trans = NULL;
 
   if (nmc == 0)
     return 0;
index 08ff3c9cede762737098af165b75f094f26005e5..5e10a7efd4cfe3108b4663ca4448608dfc85a0d6 100644 (file)
@@ -56,7 +56,6 @@ __mbsrtowcs_l (dst, src, len, ps, l)
   data.__internal_use = 1;
   data.__flags = __GCONV_IS_LAST;
   data.__statep = ps;
-  data.__trans = NULL;
 
   /* Get the conversion functions.  */
   fcts = get_gconv_fcts (l->__locales[LC_CTYPE]);
index be93877ccc2b0d05bd36e0825ef4b30b2e6b2dcb..67c68d36a02bfcf47fe1b3aec794a6387967fc76 100644 (file)
@@ -49,7 +49,6 @@ __wcrtomb (char *s, wchar_t wc, mbstate_t *ps)
   data.__internal_use = 1;
   data.__flags = __GCONV_IS_LAST;
   data.__statep = ps ?: &state;
-  data.__trans = NULL;
 
   /* A first special case is if S is NULL.  This means put PS in the
      initial state.  */
index 6fe718dd264f0eea6acebb5b65de34406e2b66be..015d08c17019e56a21a0aa016d37b0248e5267d2 100644 (file)
@@ -56,7 +56,6 @@ __wcsnrtombs (dst, src, nwc, len, ps)
   data.__internal_use = 1;
   data.__flags = __GCONV_IS_LAST;
   data.__statep = ps ?: &state;
-  data.__trans = NULL;
 
   if (nwc == 0)
     return 0;
index 24e249c6eb88786ca9c130b589878f1b436b168d..988b468e85a436571680e8a284673cf135573c85 100644 (file)
@@ -52,7 +52,6 @@ __wcsrtombs (dst, src, len, ps)
   data.__internal_use = 1;
   data.__flags = __GCONV_IS_LAST;
   data.__statep = ps ?: &state;
-  data.__trans = NULL;
 
   /* Get the conversion functions.  */
   fcts = get_gconv_fcts (_NL_CURRENT_DATA (LC_CTYPE));
index 24c33cec06e0f767aadcbacd570f3fd5c87e91ea..8e657386851affb1b52c0f60a119d8f9dcc0cb9f 100644 (file)
@@ -53,7 +53,6 @@ wctob (c)
   data.__internal_use = 1;
   data.__flags = __GCONV_IS_LAST;
   data.__statep = &data.__state;
-  data.__trans = NULL;
 
   /* Make sure we start in the initial state.  */
   memset (&data.__state, '\0', sizeof (mbstate_t));