diff options
| author | Trutz Behn | 2015-03-14 20:06:48 +0100 |
|---|---|---|
| committer | sin | 2015-03-14 20:37:27 +0000 |
| commit | 22e7e51007f3a28ded43f6cb8f0ff59a7a691175 (patch) | |
| tree | 3d2ca7e61136adc3f77b817e117699918e0c223a /include/wchar.h | |
| parent | c2c9d0c6c8a1d74f748aa2ad9442957a37091062 (diff) | |
Use __typeof__ to in part avoid replicating function types
Diffstat (limited to 'include/wchar.h')
| -rw-r--r-- | include/wchar.h | 48 |
1 files changed, 16 insertions, 32 deletions
diff --git a/include/wchar.h b/include/wchar.h index 6742dca..aba1bd8 100644 --- a/include/wchar.h +++ b/include/wchar.h | |||
| @@ -27,8 +27,7 @@ extern "C" { | |||
| 27 | #undef wmemmove | 27 | #undef wmemmove |
| 28 | #undef wmemset | 28 | #undef wmemset |
| 29 | 29 | ||
| 30 | extern wchar_t *__fgetws_orig(wchar_t *, int, FILE *) | 30 | __typeof__(fgetws) __fgetws_orig __asm__(__USER_LABEL_PREFIX__ "fgetws"); |
| 31 | __asm__(__USER_LABEL_PREFIX__ "fgetws"); | ||
| 32 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) | 31 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) |
| 33 | wchar_t *fgetws(wchar_t *s, int n, FILE *fp) | 32 | wchar_t *fgetws(wchar_t *s, int n, FILE *fp) |
| 34 | { | 33 | { |
| @@ -39,8 +38,7 @@ wchar_t *fgetws(wchar_t *s, int n, FILE *fp) | |||
| 39 | return __fgetws_orig(s, n, fp); | 38 | return __fgetws_orig(s, n, fp); |
| 40 | } | 39 | } |
| 41 | 40 | ||
| 42 | extern size_t __mbsnrtowcs_orig(wchar_t *, const char **, size_t, size_t, mbstate_t *) | 41 | __typeof__(mbsnrtowcs) __mbsnrtowcs_orig __asm__(__USER_LABEL_PREFIX__ "mbsnrtowcs"); |
| 43 | __asm__(__USER_LABEL_PREFIX__ "mbsnrtowcs"); | ||
| 44 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) | 42 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) |
| 45 | size_t mbsnrtowcs(wchar_t *d, const char **s, size_t n, size_t wn, mbstate_t *st) | 43 | size_t mbsnrtowcs(wchar_t *d, const char **s, size_t n, size_t wn, mbstate_t *st) |
| 46 | { | 44 | { |
| @@ -60,8 +58,7 @@ size_t mbsnrtowcs(wchar_t *d, const char **s, size_t n, size_t wn, mbstate_t *st | |||
| 60 | return r; | 58 | return r; |
| 61 | } | 59 | } |
| 62 | 60 | ||
| 63 | extern size_t __mbsrtowcs_orig(wchar_t *, const char **, size_t, mbstate_t *) | 61 | __typeof__(mbsrtowcs) __mbsrtowcs_orig __asm__(__USER_LABEL_PREFIX__ "mbsrtowcs"); |
| 64 | __asm__(__USER_LABEL_PREFIX__ "mbsrtowcs"); | ||
| 65 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) | 62 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) |
| 66 | size_t mbsrtowcs(wchar_t *d, const char **s, size_t wn, mbstate_t *st) | 63 | size_t mbsrtowcs(wchar_t *d, const char **s, size_t wn, mbstate_t *st) |
| 67 | { | 64 | { |
| @@ -75,8 +72,7 @@ size_t mbsrtowcs(wchar_t *d, const char **s, size_t wn, mbstate_t *st) | |||
| 75 | return r; | 72 | return r; |
| 76 | } | 73 | } |
| 77 | 74 | ||
| 78 | extern size_t __mbstowcs_orig(wchar_t *, const char *, size_t) | 75 | __typeof__(mbstowcs) __mbstowcs_orig __asm__(__USER_LABEL_PREFIX__ "mbstowcs"); |
| 79 | __asm__(__USER_LABEL_PREFIX__ "mbstowcs"); | ||
| 80 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) | 76 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) |
| 81 | size_t mbstowcs(wchar_t *ws, const char *s, size_t wn) | 77 | size_t mbstowcs(wchar_t *ws, const char *s, size_t wn) |
| 82 | { | 78 | { |
| @@ -87,8 +83,7 @@ size_t mbstowcs(wchar_t *ws, const char *s, size_t wn) | |||
| 87 | return __mbstowcs_orig(ws, s, wn); | 83 | return __mbstowcs_orig(ws, s, wn); |
| 88 | } | 84 | } |
| 89 | 85 | ||
| 90 | extern size_t __wcrtomb_orig(char *, wchar_t, mbstate_t *) | 86 | __typeof__(wcrtomb) __wcrtomb_orig __asm__(__USER_LABEL_PREFIX__ "wcrtomb"); |
| 91 | __asm__(__USER_LABEL_PREFIX__ "wcrtomb"); | ||
| 92 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) | 87 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) |
| 93 | size_t wcrtomb(char *s, wchar_t wc, mbstate_t *st) | 88 | size_t wcrtomb(char *s, wchar_t wc, mbstate_t *st) |
| 94 | { | 89 | { |
| @@ -99,8 +94,7 @@ size_t wcrtomb(char *s, wchar_t wc, mbstate_t *st) | |||
| 99 | return __wcrtomb_orig(s, wc, st); | 94 | return __wcrtomb_orig(s, wc, st); |
| 100 | } | 95 | } |
| 101 | 96 | ||
| 102 | extern wchar_t *__wcscat_orig(wchar_t *, const wchar_t *) | 97 | __typeof__(wcscat) __wcscat_orig __asm__(__USER_LABEL_PREFIX__ "wcscat"); |
| 103 | __asm__(__USER_LABEL_PREFIX__ "wcscat"); | ||
| 104 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) | 98 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) |
| 105 | wchar_t *wcscat(wchar_t *d, const wchar_t *s) | 99 | wchar_t *wcscat(wchar_t *d, const wchar_t *s) |
| 106 | { | 100 | { |
| @@ -111,8 +105,7 @@ wchar_t *wcscat(wchar_t *d, const wchar_t *s) | |||
| 111 | return __wcscat_orig(d, s); | 105 | return __wcscat_orig(d, s); |
| 112 | } | 106 | } |
| 113 | 107 | ||
| 114 | extern wchar_t *__wcscpy_orig(wchar_t *, const wchar_t *) | 108 | __typeof__(wcscpy) __wcscpy_orig __asm__(__USER_LABEL_PREFIX__ "wcscpy"); |
| 115 | __asm__(__USER_LABEL_PREFIX__ "wcscpy"); | ||
| 116 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) | 109 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) |
| 117 | wchar_t *wcscpy(wchar_t *d, const wchar_t *s) | 110 | wchar_t *wcscpy(wchar_t *d, const wchar_t *s) |
| 118 | { | 111 | { |
| @@ -123,8 +116,7 @@ wchar_t *wcscpy(wchar_t *d, const wchar_t *s) | |||
| 123 | return __wcscpy_orig(d, s); | 116 | return __wcscpy_orig(d, s); |
| 124 | } | 117 | } |
| 125 | 118 | ||
| 126 | extern wchar_t *__wcsncat_orig(wchar_t *, const wchar_t *, size_t) | 119 | __typeof__(wcsncat) __wcsncat_orig __asm__(__USER_LABEL_PREFIX__ "wcsncat"); |
| 127 | __asm__(__USER_LABEL_PREFIX__ "wcsncat"); | ||
| 128 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) | 120 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) |
| 129 | wchar_t *wcsncat(wchar_t *d, const wchar_t *s, size_t n) | 121 | wchar_t *wcsncat(wchar_t *d, const wchar_t *s, size_t n) |
| 130 | { | 122 | { |
| @@ -142,8 +134,7 @@ wchar_t *wcsncat(wchar_t *d, const wchar_t *s, size_t n) | |||
| 142 | return __wcsncat_orig(d, s, n); | 134 | return __wcsncat_orig(d, s, n); |
| 143 | } | 135 | } |
| 144 | 136 | ||
| 145 | extern wchar_t *__wcsncpy_orig(wchar_t *, const wchar_t *, size_t) | 137 | __typeof__(wcsncpy) __wcsncpy_orig __asm__(__USER_LABEL_PREFIX__ "wcsncpy"); |
| 146 | __asm__(__USER_LABEL_PREFIX__ "wcsncpy"); | ||
| 147 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) | 138 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) |
| 148 | wchar_t *wcsncpy(wchar_t *d, const wchar_t *s, size_t n) | 139 | wchar_t *wcsncpy(wchar_t *d, const wchar_t *s, size_t n) |
| 149 | { | 140 | { |
| @@ -154,8 +145,7 @@ wchar_t *wcsncpy(wchar_t *d, const wchar_t *s, size_t n) | |||
| 154 | return __wcsncpy_orig(d, s, n); | 145 | return __wcsncpy_orig(d, s, n); |
| 155 | } | 146 | } |
| 156 | 147 | ||
| 157 | extern size_t __wcsnrtombs_orig(char *, const wchar_t **, size_t, size_t, mbstate_t *) | 148 | __typeof__(wcsnrtombs) __wcsnrtombs_orig __asm__(__USER_LABEL_PREFIX__ "wcsnrtombs"); |
| 158 | __asm__(__USER_LABEL_PREFIX__ "wcsnrtombs"); | ||
| 159 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) | 149 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) |
| 160 | size_t wcsnrtombs(char *d, const wchar_t **s, size_t wn, size_t n, mbstate_t *st) | 150 | size_t wcsnrtombs(char *d, const wchar_t **s, size_t wn, size_t n, mbstate_t *st) |
| 161 | { | 151 | { |
| @@ -175,8 +165,7 @@ size_t wcsnrtombs(char *d, const wchar_t **s, size_t wn, size_t n, mbstate_t *st | |||
| 175 | return r; | 165 | return r; |
| 176 | } | 166 | } |
| 177 | 167 | ||
| 178 | extern size_t __wcsrtombs_orig(char *, const wchar_t **, size_t, mbstate_t *) | 168 | __typeof__(wcsrtombs) __wcsrtombs_orig __asm__(__USER_LABEL_PREFIX__ "wcsrtombs"); |
| 179 | __asm__(__USER_LABEL_PREFIX__ "wcsrtombs"); | ||
| 180 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) | 169 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) |
| 181 | size_t wcsrtombs(char *d, const wchar_t **s, size_t n, mbstate_t *st) | 170 | size_t wcsrtombs(char *d, const wchar_t **s, size_t n, mbstate_t *st) |
| 182 | { | 171 | { |
| @@ -189,8 +178,7 @@ size_t wcsrtombs(char *d, const wchar_t **s, size_t n, mbstate_t *st) | |||
| 189 | return r; | 178 | return r; |
| 190 | } | 179 | } |
| 191 | 180 | ||
| 192 | extern size_t __wcstombs_orig(char *, const wchar_t *, size_t) | 181 | __typeof__(wcstombs) __wcstombs_orig __asm__(__USER_LABEL_PREFIX__ "wcstombs"); |
| 193 | __asm__(__USER_LABEL_PREFIX__ "wcstombs"); | ||
| 194 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) | 182 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) |
| 195 | size_t wcstombs(char *s, const wchar_t *ws, size_t n) | 183 | size_t wcstombs(char *s, const wchar_t *ws, size_t n) |
| 196 | { | 184 | { |
| @@ -201,8 +189,7 @@ size_t wcstombs(char *s, const wchar_t *ws, size_t n) | |||
| 201 | return __wcstombs_orig(s, ws, n); | 189 | return __wcstombs_orig(s, ws, n); |
| 202 | } | 190 | } |
| 203 | 191 | ||
| 204 | extern int __wctomb_orig(char *, wchar_t) | 192 | __typeof__(wctomb) __wctomb_orig __asm__(__USER_LABEL_PREFIX__ "wctomb"); |
| 205 | __asm__(__USER_LABEL_PREFIX__ "wctomb"); | ||
| 206 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) | 193 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) |
| 207 | int wctomb(char *s, wchar_t wc) | 194 | int wctomb(char *s, wchar_t wc) |
| 208 | { | 195 | { |
| @@ -213,8 +200,7 @@ int wctomb(char *s, wchar_t wc) | |||
| 213 | return __wctomb_orig(s, wc); | 200 | return __wctomb_orig(s, wc); |
| 214 | } | 201 | } |
| 215 | 202 | ||
| 216 | extern wchar_t *__wmemcpy_orig(wchar_t *, const wchar_t *, size_t) | 203 | __typeof__(wmemcpy) __wmemcpy_orig __asm__(__USER_LABEL_PREFIX__ "wmemcpy"); |
| 217 | __asm__(__USER_LABEL_PREFIX__ "wmemcpy"); | ||
| 218 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) | 204 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) |
| 219 | wchar_t *wmemcpy(wchar_t *d, const wchar_t *s, size_t n) | 205 | wchar_t *wmemcpy(wchar_t *d, const wchar_t *s, size_t n) |
| 220 | { | 206 | { |
| @@ -225,8 +211,7 @@ wchar_t *wmemcpy(wchar_t *d, const wchar_t *s, size_t n) | |||
| 225 | return __wmemcpy_orig(d, s, n); | 211 | return __wmemcpy_orig(d, s, n); |
| 226 | } | 212 | } |
| 227 | 213 | ||
| 228 | extern wchar_t *__wmemmove_orig(wchar_t *, const wchar_t *, size_t) | 214 | __typeof__(wmemmove) __wmemmove_orig __asm__(__USER_LABEL_PREFIX__ "wmemmove"); |
| 229 | __asm__(__USER_LABEL_PREFIX__ "wmemmove"); | ||
| 230 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) | 215 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) |
| 231 | wchar_t *wmemmove(wchar_t *d, const wchar_t *s, size_t n) | 216 | wchar_t *wmemmove(wchar_t *d, const wchar_t *s, size_t n) |
| 232 | { | 217 | { |
| @@ -237,8 +222,7 @@ wchar_t *wmemmove(wchar_t *d, const wchar_t *s, size_t n) | |||
| 237 | return __wmemmove_orig(d, s, n); | 222 | return __wmemmove_orig(d, s, n); |
| 238 | } | 223 | } |
| 239 | 224 | ||
| 240 | extern wchar_t *__wmemset_orig(wchar_t *, wchar_t, size_t) | 225 | __typeof__(wmemset) __wmemset_orig __asm__(__USER_LABEL_PREFIX__ "wmemset"); |
| 241 | __asm__(__USER_LABEL_PREFIX__ "wmemset"); | ||
| 242 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) | 226 | extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) |
| 243 | wchar_t *wmemset(wchar_t *s, wchar_t c, size_t n) | 227 | wchar_t *wmemset(wchar_t *s, wchar_t c, size_t n) |
| 244 | { | 228 | { |
