1 /* Provide gconv stub functions for the minimum static binaries.
2 Copyright (C) 1999, 2001, 2003, 2004 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public License as
7 published by the Free Software Foundation; either version 2 of the
8 License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public
16 License along with the GNU C Library; see the file COPYING.LIB. If not,
17 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. */
23 #include <bits/libc-lock.h>
24 #if __GNUC_PREREQ(3, 3)
25 # include <gconv_int.h>
30 __libc_lock_define_initialized (, __gconv_lock
)
32 /* hack for self identification */
33 int __c_stubs_is_compiled_in
;
35 /* Don't drag in the dynamic linker. */
36 void *__libc_stack_end
;
41 #if __GLIBC__ > 2 || __GLIBC_MINOR__ > 1
51 #if __GLIBC__ > 2 || __GLIBC_MINOR__ > 1
52 return __GCONV_NOCONV
;
65 __gconv_compare_alias (const char *name1
, const char *name2
)
67 return strcmp (name1
, name2
);
71 __gconv_btwoc_ascii (struct __gconv_step
*step
, unsigned char c
)
80 #if __GNUC_PREREQ(3, 3)
82 # define strong_alias(impl, name) \
83 __typeof (name) name __attribute__ ((alias (#impl)))
86 strong_alias (__gconv_OK
,
87 __gconv_close_transform
);
88 strong_alias (__gconv_OK
,
91 strong_alias (__gconv_NOCONV
,
93 strong_alias (__gconv_NOCONV
,
94 __gconv_find_transform
);
95 strong_alias (__gconv_NOCONV
,
98 /* These transformations should not fail in normal conditions */
99 strong_alias (__gconv_OK
,
100 __gconv_transform_ascii_internal
);
101 strong_alias (__gconv_OK
,
102 __gconv_transform_utf16_internal
);
103 strong_alias (__gconv_OK
,
104 __gconv_transform_utf8_internal
);
105 strong_alias (__gconv_OK
,
106 __gconv_transform_ucs2_internal
);
108 /* We can assume no conversion for these ones */
109 strong_alias (__gconv_NOCONV
,
110 __gconv_transform_internal_ascii
);
111 strong_alias (__gconv_NOCONV
,
112 __gconv_transform_internal_ucs2
);
113 strong_alias (__gconv_NOCONV
,
114 __gconv_transform_internal_ucs4
);
115 strong_alias (__gconv_NOCONV
,
116 __gconv_transform_internal_utf16
);
117 strong_alias (__gconv_NOCONV
,
118 __gconv_transform_internal_utf8
);
120 strong_alias (__gconv_NOCONV
,
121 __gconv_transliterate
);
123 strong_alias (__gconv_NOOP
,
124 __gconv_release_cache
);
125 strong_alias (__gconv_NOOP
,
126 __gconv_release_step
);