diff options
author | Florian Weimer <fweimer@redhat.com> | 2022-10-18 17:00:07 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2022-10-18 17:04:10 +0200 |
commit | 58548b9d689fb9bba67bdc5b59c8d2fa47f4f8ec (patch) | |
tree | 0aea307f4cf761952fbdf15fd67fc3b09b43707c /wcsmbs | |
parent | 88f4b6929c26f9240a4b0b7dcc62922f02544a09 (diff) | |
download | glibc-58548b9d689fb9bba67bdc5b59c8d2fa47f4f8ec.zip glibc-58548b9d689fb9bba67bdc5b59c8d2fa47f4f8ec.tar.gz glibc-58548b9d689fb9bba67bdc5b59c8d2fa47f4f8ec.tar.bz2 |
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 'wcsmbs')
-rw-r--r-- | wcsmbs/btowc.c | 4 | ||||
-rw-r--r-- | wcsmbs/mbrtoc16.c | 2 | ||||
-rw-r--r-- | wcsmbs/mbrtowc.c | 2 | ||||
-rw-r--r-- | wcsmbs/mbsnrtowcs.c | 2 | ||||
-rw-r--r-- | wcsmbs/mbsrtowcs_l.c | 2 | ||||
-rw-r--r-- | wcsmbs/wcrtomb.c | 2 | ||||
-rw-r--r-- | wcsmbs/wcsnrtombs.c | 2 | ||||
-rw-r--r-- | wcsmbs/wcsrtombs.c | 2 | ||||
-rw-r--r-- | wcsmbs/wctob.c | 2 |
9 files changed, 0 insertions, 20 deletions
diff --git a/wcsmbs/btowc.c b/wcsmbs/btowc.c index 7023ec9..da1c287 100644 --- a/wcsmbs/btowc.c +++ b/wcsmbs/btowc.c @@ -45,10 +45,8 @@ __btowc (int c) /* Get the conversion functions. */ fcts = get_gconv_fcts (_NL_CURRENT_DATA (LC_CTYPE)); __gconv_btowc_fct btowc_fct = fcts->towc->__btowc_fct; -#ifdef PTR_DEMANGLE if (fcts->towc->__shlib_handle != NULL) PTR_DEMANGLE (btowc_fct); -#endif if (__builtin_expect (fcts->towc_nsteps == 1, 1) && __builtin_expect (btowc_fct != NULL, 1)) @@ -81,10 +79,8 @@ __btowc (int c) inbuf[0] = c; __gconv_fct fct = fcts->towc->__fct; -#ifdef PTR_DEMANGLE if (fcts->towc->__shlib_handle != NULL) PTR_DEMANGLE (fct); -#endif status = DL_CALL_FCT (fct, (fcts->towc, &data, &inptr, inptr + 1, NULL, &dummy, 0, 1)); diff --git a/wcsmbs/mbrtoc16.c b/wcsmbs/mbrtoc16.c index f8b029b..f45f73e 100644 --- a/wcsmbs/mbrtoc16.c +++ b/wcsmbs/mbrtoc16.c @@ -96,10 +96,8 @@ mbrtoc16 (char16_t *pc16, const char *s, size_t n, mbstate_t *ps) goto ilseq; } __gconv_fct fct = fcts->towc->__fct; -#ifdef PTR_DEMANGLE if (fcts->towc->__shlib_handle != NULL) PTR_DEMANGLE (fct); -#endif status = DL_CALL_FCT (fct, (fcts->towc, &data, &inbuf, endbuf, NULL, &dummy, 0, 1)); diff --git a/wcsmbs/mbrtowc.c b/wcsmbs/mbrtowc.c index 46a1cc3..3d06acb 100644 --- a/wcsmbs/mbrtowc.c +++ b/wcsmbs/mbrtowc.c @@ -78,10 +78,8 @@ __mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) goto ilseq; } __gconv_fct fct = fcts->towc->__fct; -#ifdef PTR_DEMANGLE if (fcts->towc->__shlib_handle != NULL) PTR_DEMANGLE (fct); -#endif status = DL_CALL_FCT (fct, (fcts->towc, &data, &inbuf, endbuf, NULL, &dummy, 0, 1)); diff --git a/wcsmbs/mbsnrtowcs.c b/wcsmbs/mbsnrtowcs.c index 06a1f2d..47f5de4 100644 --- a/wcsmbs/mbsnrtowcs.c +++ b/wcsmbs/mbsnrtowcs.c @@ -64,10 +64,8 @@ __mbsnrtowcs (wchar_t *dst, const char **src, size_t nmc, size_t len, /* Get the structure with the function pointers. */ towc = fcts->towc; __gconv_fct fct = towc->__fct; -#ifdef PTR_DEMANGLE if (towc->__shlib_handle != NULL) PTR_DEMANGLE (fct); -#endif /* We have to handle DST == NULL special. */ if (dst == NULL) diff --git a/wcsmbs/mbsrtowcs_l.c b/wcsmbs/mbsrtowcs_l.c index 526b88e..5fe70cb 100644 --- a/wcsmbs/mbsrtowcs_l.c +++ b/wcsmbs/mbsrtowcs_l.c @@ -58,10 +58,8 @@ __mbsrtowcs_l (wchar_t *dst, const char **src, size_t len, mbstate_t *ps, /* Get the structure with the function pointers. */ towc = fcts->towc; __gconv_fct fct = towc->__fct; -#ifdef PTR_DEMANGLE if (towc->__shlib_handle != NULL) PTR_DEMANGLE (fct); -#endif /* We have to handle DST == NULL special. */ if (dst == NULL) diff --git a/wcsmbs/wcrtomb.c b/wcsmbs/wcrtomb.c index 42690f2..b71ca79 100644 --- a/wcsmbs/wcrtomb.c +++ b/wcsmbs/wcrtomb.c @@ -63,10 +63,8 @@ __wcrtomb_internal (char *s, wchar_t wc, mbstate_t *ps, size_t s_size) /* Get the conversion functions. */ fcts = get_gconv_fcts (_NL_CURRENT_DATA (LC_CTYPE)); __gconv_fct fct = fcts->tomb->__fct; -#ifdef PTR_DEMANGLE if (fcts->tomb->__shlib_handle != NULL) PTR_DEMANGLE (fct); -#endif /* If WC is the NUL character we write into the output buffer the byte sequence necessary for PS to get into the initial state, followed diff --git a/wcsmbs/wcsnrtombs.c b/wcsmbs/wcsnrtombs.c index 6ba180c..12b116a 100644 --- a/wcsmbs/wcsnrtombs.c +++ b/wcsmbs/wcsnrtombs.c @@ -62,10 +62,8 @@ __wcsnrtombs (char *dst, const wchar_t **src, size_t nwc, size_t len, /* Get the structure with the function pointers. */ tomb = fcts->tomb; __gconv_fct fct = tomb->__fct; -#ifdef PTR_DEMANGLE if (tomb->__shlib_handle != NULL) PTR_DEMANGLE (fct); -#endif /* We have to handle DST == NULL special. */ if (dst == NULL) diff --git a/wcsmbs/wcsrtombs.c b/wcsmbs/wcsrtombs.c index 7db2b18..962176c 100644 --- a/wcsmbs/wcsrtombs.c +++ b/wcsmbs/wcsrtombs.c @@ -54,10 +54,8 @@ __wcsrtombs (char *dst, const wchar_t **src, size_t len, mbstate_t *ps) /* Get the structure with the function pointers. */ tomb = fcts->tomb; __gconv_fct fct = tomb->__fct; -#ifdef PTR_DEMANGLE if (tomb->__shlib_handle != NULL) PTR_DEMANGLE (fct); -#endif /* We have to handle DST == NULL special. */ if (dst == NULL) diff --git a/wcsmbs/wctob.c b/wcsmbs/wctob.c index 5dfbd7a..63764d1 100644 --- a/wcsmbs/wctob.c +++ b/wcsmbs/wctob.c @@ -63,10 +63,8 @@ wctob (wint_t c) const unsigned char *argptr = (const unsigned char *) inptr; __gconv_fct fct = fcts->tomb->__fct; -#ifdef PTR_DEMANGLE if (fcts->tomb->__shlib_handle != NULL) PTR_DEMANGLE (fct); -#endif status = DL_CALL_FCT (fct, (fcts->tomb, &data, &argptr, argptr + sizeof (inbuf[0]), NULL, &dummy, 0, 1)); |