Support b64_ntop(), b64_pton() (bsd-compat)
[uclibc-ng.git] / include / libc-symbols.h
blob4dc05c76e8cc05217d80ea9b3d05cac5cd534a59
1 /* Support macros for making weak and strong aliases for symbols,
2 and for using symbol sets and linker warnings with GNU ld.
3 Copyright (C) 1995-1998,2000-2003,2004,2005,2006
4 Free Software Foundation, Inc.
5 This file is part of the GNU C Library.
7 The GNU C Library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later version.
12 The GNU C Library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
17 You should have received a copy of the GNU Lesser General Public
18 License along with the GNU C Library; if not, see
19 <http://www.gnu.org/licenses/>. */
21 #ifndef _LIBC_SYMBOLS_H
22 #define _LIBC_SYMBOLS_H 1
24 /* This is defined for the compilation of all C library code. features.h
25 tests this to avoid inclusion of stubs.h while compiling the library,
26 before stubs.h has been generated. Some library code that is shared
27 with other packages also tests this symbol to see if it is being
28 compiled as part of the C library. We must define this before including
29 config.h, because it makes some definitions conditional on whether libc
30 itself is being compiled, or just some generator program. */
31 #define _LIBC 1
34 /* This file's macros are included implicitly in the compilation of every
35 file in the C library by -imacros.
37 We include uClibc_arch_features.h which is defined by arch devs.
38 It should define for us the following symbols:
40 * HAVE_ASM_SET_DIRECTIVE if we have `.set B, A' instead of `A = B'.
41 * ASM_TYPE_DIRECTIVE_PREFIX with `@' or `#' or whatever for .type,
42 or leave it undefined if there is no .type directive.
43 * HAVE_ELF if using ELF, which supports weak symbols using `.weak'.
44 * HAVE_ASM_WEAK_DIRECTIVE if we have weak symbols using `.weak'.
45 * HAVE_ASM_WEAKEXT_DIRECTIVE if we have weak symbols using `.weakext'.
49 #include <bits/uClibc_arch_features.h>
51 /* Enable declarations of GNU extensions, since we are compiling them. */
52 #define _GNU_SOURCE 1
54 /* Prepare for the case that `__builtin_expect' is not available. */
55 #if defined __GNUC__ && __GNUC__ == 2 && __GNUC_MINOR__ < 96
56 # define __builtin_expect(x, expected_value) (x)
57 #endif
58 #ifndef likely
59 # define likely(x) __builtin_expect((!!(x)),1)
60 #endif
61 #ifndef unlikely
62 # define unlikely(x) __builtin_expect((!!(x)),0)
63 #endif
64 #if defined __GNUC__ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
65 # ifndef __cold
66 # define __cold __attribute__ ((__cold__))
67 # endif
68 # ifndef __hot
69 # define __hot __attribute__ ((__hot__))
70 # endif
71 #else
72 # ifndef __cold
73 # define __cold
74 # endif
75 # ifndef __hot
76 # define __hot
77 # endif
78 #endif
79 #ifndef __LINUX_COMPILER_H
80 # define __LINUX_COMPILER_H
81 #endif
82 #ifndef __cast__
83 # define __cast__(_to)
84 #endif
86 #if defined __GNUC__ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
87 # define attribute_optimize(x) __attribute__ ((optimize(x)))
88 #else
89 # define attribute_optimize(x)
90 #endif
92 #define attribute_unused __attribute__ ((unused))
94 #if defined __GNUC__ || defined __ICC
95 # define attribute_noreturn __attribute__ ((__noreturn__))
96 #else
97 # define attribute_noreturn
98 #endif
100 #define libc_freeres_ptr(decl) \
101 __make_section_unallocated ("__libc_freeres_ptrs, \"aw\", %nobits") \
102 decl __attribute__ ((section ("__libc_freeres_ptrs" __sec_comment)))
103 #define __libc_freeres_fn_section \
104 __attribute__ ((section ("__libc_freeres_fn")))
106 #ifndef NOT_IN_libc
107 # define IS_IN_libc 1
108 #endif
110 /* Indirect stringification. Doing two levels allows
111 * the parameter to be a macro itself.
113 #define __stringify_1(x...) #x
114 #define __stringify(x) __stringify_1(x)
116 #ifdef __UCLIBC_HAVE_ASM_SET_DIRECTIVE__
117 # define HAVE_ASM_SET_DIRECTIVE
118 #else
119 # undef HAVE_ASM_SET_DIRECTIVE
120 #endif
122 #ifdef __UCLIBC_HAVE_ASM_WEAK_DIRECTIVE__
123 # define HAVE_ASM_WEAK_DIRECTIVE
124 #else
125 # undef HAVE_ASM_WEAK_DIRECTIVE
126 #endif
128 #ifdef __UCLIBC_HAVE_ASM_WEAKEXT_DIRECTIVE__
129 # define HAVE_ASM_WEAKEXT_DIRECTIVE
130 #else
131 # undef HAVE_ASM_WEAKEXT_DIRECTIVE
132 #endif
134 #ifdef __UCLIBC_HAVE_ASM_CFI_DIRECTIVES__
135 # define HAVE_ASM_CFI_DIRECTIVES
136 #else
137 # undef HAVE_ASM_CFI_DIRECTIVES
138 #endif
140 #if defined HAVE_ASM_WEAK_DIRECTIVE || defined HAVE_ASM_WEAKEXT_DIRECTIVE
141 # define HAVE_WEAK_SYMBOLS
142 #endif
144 #undef C_SYMBOL_NAME
145 #ifndef C_SYMBOL_NAME
146 # ifndef __UCLIBC_UNDERSCORES__
147 # define C_SYMBOL_NAME(name) name
148 # else
149 # define C_SYMBOL_NAME(name) _##name
150 # endif
151 #endif
153 #ifdef __UCLIBC_ASM_LINE_SEP__
154 # define ASM_LINE_SEP __UCLIBC_ASM_LINE_SEP__
155 #else
156 # define ASM_LINE_SEP ;
157 #endif
159 #ifndef __ASSEMBLER__
160 /* GCC understands weak symbols and aliases; use its interface where
161 possible, instead of embedded assembly language. */
163 /* Define ALIASNAME as a strong alias for NAME. */
164 # define strong_alias(name, aliasname) _strong_alias(name, aliasname)
165 # define _strong_alias(name, aliasname) \
166 extern __typeof (name) aliasname __attribute__ ((alias (#name)));
167 /* Same, but does not check for type match. Use sparingly.
168 Example: strong_alias(stat,stat64) may fail, this one works: */
169 # define strong_alias_untyped(name, aliasname) \
170 _strong_alias_untyped(name, aliasname)
171 # define _strong_alias_untyped(name, aliasname) \
172 extern __typeof (aliasname) aliasname __attribute__ ((alias (#name)));
174 # ifdef HAVE_WEAK_SYMBOLS
176 /* This comes between the return type and function name in
177 a function definition to make that definition weak. */
178 # define weak_function __attribute__ ((weak))
179 # define weak_const_function __attribute__ ((weak, __const__))
181 /* Define ALIASNAME as a weak alias for NAME.
182 If weak aliases are not available, this defines a strong alias. */
183 # define weak_alias(name, aliasname) _weak_alias (name, aliasname)
184 # define _weak_alias(name, aliasname) \
185 extern __typeof (name) aliasname __attribute__ ((weak, alias (#name)));
187 /* Declare SYMBOL as weak undefined symbol (resolved to 0 if not defined). */
188 # define weak_extern(symbol) _weak_extern (weak symbol)
189 # define _weak_extern(expr) _Pragma (#expr)
191 # else
193 # define weak_function /* empty */
194 # define weak_const_function __attribute__ ((__const__))
196 # define weak_alias(name, aliasname) strong_alias(name, aliasname)
197 # define weak_extern(symbol) /* Nothing. */
199 # endif
201 #else /* __ASSEMBLER__ */
203 # ifdef HAVE_ASM_SET_DIRECTIVE
204 # define strong_alias(original, alias) \
205 .globl C_SYMBOL_NAME(alias) ASM_LINE_SEP \
206 .set C_SYMBOL_NAME(alias),C_SYMBOL_NAME(original)
207 # define strong_data_alias(original, alias) strong_alias(original, alias)
208 # else
209 # define strong_alias(original, alias) \
210 .globl C_SYMBOL_NAME(alias) ASM_LINE_SEP \
211 C_SYMBOL_NAME(alias) = C_SYMBOL_NAME(original)
212 # define strong_data_alias(original, alias) strong_alias(original, alias)
213 # endif
215 # ifdef HAVE_WEAK_SYMBOLS
216 # ifdef HAVE_ASM_WEAKEXT_DIRECTIVE
217 # define weak_alias(original, alias) \
218 .weakext C_SYMBOL_NAME(alias),C_SYMBOL_NAME(original)
219 # define weak_extern(symbol) \
220 .weakext C_SYMBOL_NAME(symbol)
222 # else /* ! HAVE_ASM_WEAKEXT_DIRECTIVE */
224 # ifdef HAVE_ASM_SET_DIRECTIVE
225 # define weak_alias(original, alias) \
226 .weak C_SYMBOL_NAME(alias) ASM_LINE_SEP \
227 .set C_SYMBOL_NAME(alias),C_SYMBOL_NAME(original)
228 # else /* ! HAVE_ASM_SET_DIRECTIVE */
229 # define weak_alias(original, alias) \
230 .weak C_SYMBOL_NAME(alias) ASM_LINE_SEP \
231 C_SYMBOL_NAME(alias) = C_SYMBOL_NAME(original)
232 # endif
233 # define weak_extern(symbol) \
234 .weak C_SYMBOL_NAME(symbol)
236 # endif /* ! HAVE_ASM_WEAKEXT_DIRECTIVE */
238 # else /* ! HAVE_WEAK_SYMBOLS */
240 # define weak_alias(original, alias) strong_alias(original, alias)
241 # define weak_extern(symbol) /* Nothing */
242 # endif /* ! HAVE_WEAK_SYMBOLS */
244 #endif /* __ASSEMBLER__ */
247 /* On some platforms we can make internal function calls (i.e., calls of
248 functions not exported) a bit faster by using a different calling
249 convention. */
250 #ifndef internal_function
251 # define internal_function /* empty */
252 #endif
255 /* We want the .gnu.warning.SYMBOL section to be unallocated. */
256 #define __make_section_unallocated(section_string) \
257 __asm__ (".section " section_string "\n\t.previous");
260 /* Tacking on "\n#APP\n\t#" to the section name makes gcc put it's bogus
261 section attributes on what looks like a comment to the assembler. */
262 #ifdef __sparc__ /* HAVE_SECTION_QUOTES */
263 # define __sec_comment "\"\n#APP\n\t#\""
264 #else
265 # define __sec_comment "\n#APP\n\t#"
266 #endif
269 /* When a reference to SYMBOL is encountered, the linker will emit a
270 warning message MSG. */
271 #define link_warning(symbol, msg) \
272 __make_section_unallocated (".gnu.warning." #symbol) \
273 static const char __evoke_link_warning_##symbol[] \
274 __attribute__ ((used, section (".gnu.warning." #symbol __sec_comment))) \
275 = msg;
277 /* Handling on non-exported internal names. We have to do this only
278 for shared code. */
279 #ifdef SHARED
280 # define INTUSE(name) name##_internal
281 # define INTDEF(name) strong_alias (name, name##_internal)
282 # define INTVARDEF(name) _INTVARDEF (name, name##_internal)
283 # if defined HAVE_VISIBILITY_ATTRIBUTE
284 # define _INTVARDEF(name, aliasname) \
285 extern __typeof (name) aliasname __attribute__ ((alias (#name), \
286 visibility ("hidden")));
287 # else
288 # define _INTVARDEF(name, aliasname) \
289 extern __typeof (name) aliasname __attribute__ ((alias (#name)));
290 # endif
291 # define INTDEF2(name, newname) strong_alias (name, newname##_internal)
292 # define INTVARDEF2(name, newname) _INTVARDEF (name, newname##_internal)
293 #else
294 # define INTUSE(name) name
295 # define INTDEF(name)
296 # define INTVARDEF(name)
297 # define INTDEF2(name, newname)
298 # define INTVARDEF2(name, newname)
299 #endif
302 /* The following macros are used for PLT bypassing within libc.so
303 (and if needed other libraries similarly).
305 If calls to foo within libc.so should always go to foo defined in libc.so,
306 then in include/foo.h you add:
308 int foo(int __bar);
309 libc_hidden_proto(foo)
311 line and after the foo function definition:
313 int foo(int __bar) {
314 return __bar;
316 libc_hidden_def(foo)
320 int foo(int __bar) {
321 return __bar;
323 libc_hidden_weak(foo)
325 Similarly for global data: if references to foo within libc.so
326 should always go to foo defined in libc.so, then in include/foo.h:
328 extern int foo;
329 libc_hidden_proto(foo)
331 and after foo's definition:
333 int foo = INITIAL_FOO_VALUE;
334 libc_hidden_data_def(foo)
338 int foo = INITIAL_FOO_VALUE;
339 libc_hidden_data_weak(foo)
341 If foo is normally just an alias (strong or weak) to some other function,
342 you should use the normal strong_alias first, then add libc_hidden_def
343 or libc_hidden_weak:
345 int baz(int __bar) {
346 return __bar;
348 strong_alias(baz, foo)
349 libc_hidden_weak(foo)
351 If the function should be internal to multiple objects, say ld.so and
352 libc.so, the best way is to use:
354 #if !defined NOT_IN_libc || defined IS_IN_rtld
355 hidden_proto(foo)
356 #endif
358 in include/foo.h and the normal macros at all function definitions
359 depending on what DSO they belong to.
361 If versioned_symbol macro is used to define foo,
362 libc_hidden_ver macro should be used, as in:
364 int __real_foo(int __bar) {
365 return __bar;
367 versioned_symbol(libc, __real_foo, foo, GLIBC_2_1);
368 libc_hidden_ver(__real_foo, foo)
371 /* uClibc specific (the above comment was copied from glibc):
373 * when ppc64 will be supported, we need changes to support
374 * strong_data_alias (used by asm hidden_data_def)
376 * no versioning support, hidden[_data]_ver are noop
378 * hidden_def() in asm is _hidden_strong_alias (not strong_alias)
380 * libc_hidden_proto(foo) should be added after declaration
381 * in the header, or after extern foo... in all source files
382 * (this is discouraged).
383 * libc_hidden_def does not hide __GI_foo itself, although the name
384 * suggests it (hiding is done exclusively by libc_hidden_proto).
386 FIXME! - ?
387 * The reasoning to have it after the header w/ foo's prototype is
388 * to get first the __REDIRECT from original header and then create
389 * the __GI_foo alias
391 * Hunt for references which still go through PLT (example for x86):
392 * build shared lib, then disassemble it and search for <xxx@plt>:
393 * $ objdump -drx libuClibc-*.so >disasm.txt
394 * $ grep -F '@plt>:' disasm.txt
396 * In uclibc, malloc/free and related functions should be called
397 * through PLT (making it possible to use alternative malloc),
398 * and possibly some __pthread_xxx functions can be called through PLT
399 * (why?). The rest should not use PLT.
402 #if (defined __GNUC__ && defined __GNUC_MINOR__ \
403 && (( __GNUC__ >= 3 && __GNUC_MINOR__ >= 3) || __GNUC__ >= 4) \
404 ) || defined __ICC
405 # define attribute_hidden __attribute__ ((visibility ("hidden")))
406 # define attribute_protected __attribute__ ((visibility ("protected")))
407 # define __hidden_proto_hiddenattr(attrs...) __attribute__ ((visibility ("hidden"), ##attrs))
408 #else
409 # define attribute_hidden
410 # define attribute_protected
411 # define __hidden_proto_hiddenattr(attrs...)
412 #endif
414 #if /*!defined STATIC &&*/ !defined __BCC__
416 # ifndef __ASSEMBLER__
417 # define hidden_proto(name, attrs...) __hidden_proto(name, __GI_##name, ##attrs)
418 # define __hidden_proto(name, internal, attrs...) \
419 extern __typeof (name) name __asm__ (__hidden_asmname (#internal)) \
420 __hidden_proto_hiddenattr (attrs);
421 # define __hidden_asmname(name) __hidden_asmname1 (__USER_LABEL_PREFIX__, name)
422 # define __hidden_asmname1(prefix, name) __hidden_asmname2(prefix, name)
423 # define __hidden_asmname2(prefix, name) #prefix name
424 # define __hidden_ver1(local, internal, name) \
425 extern __typeof (name) __EI_##name __asm__(__hidden_asmname (#internal)); \
426 extern __typeof (name) __EI_##name __attribute__((alias (__hidden_asmname1 (,#local))))
427 # define hidden_ver(local, name) __hidden_ver1(local, __GI_##name, name);
428 # define hidden_data_ver(local, name) hidden_ver(local, name)
429 # define hidden_def(name) __hidden_ver1(__GI_##name, name, name);
430 # define hidden_data_def(name) hidden_def(name)
431 # define hidden_weak(name) \
432 __hidden_ver1(__GI_##name, name, name) __attribute__((weak));
433 # define hidden_data_weak(name) hidden_weak(name)
435 # else /* __ASSEMBLER__ */
437 # ifdef HAVE_ASM_SET_DIRECTIVE
438 # define _hidden_strong_alias(original, alias) \
439 .globl C_SYMBOL_NAME(alias) ASM_LINE_SEP \
440 .hidden C_SYMBOL_NAME(alias) ASM_LINE_SEP \
441 .set C_SYMBOL_NAME(alias),C_SYMBOL_NAME(original)
442 # else /* dont have .set directive */
443 # define _hidden_strong_alias(original, alias) \
444 .globl C_SYMBOL_NAME(alias) ASM_LINE_SEP \
445 .hidden C_SYMBOL_NAME(alias) ASM_LINE_SEP \
446 C_SYMBOL_NAME(alias) = C_SYMBOL_NAME(original)
447 # endif
449 # define _hidden_weak_alias(original, alias) \
450 .hidden C_SYMBOL_NAME(alias) ASM_LINE_SEP \
451 weak_alias(original, alias)
453 /* For assembly, we need to do the opposite of what we do in C:
454 in assembly gcc __REDIRECT stuff is not in place, so functions
455 are defined by its normal name and we need to create the
456 __GI_* alias to it, in C __REDIRECT causes the function definition
457 to use __GI_* name and we need to add alias to the real name.
458 There is no reason to use hidden_weak over hidden_def in assembly,
459 but we provide it for consistency with the C usage.
460 hidden_proto doesn't make sense for assembly but the equivalent
461 is to call via the HIDDEN_JUMPTARGET macro instead of JUMPTARGET. */
462 # define hidden_def(name) _hidden_strong_alias (name, __GI_##name)
463 # define hidden_weak(name) _hidden_weak_alias (name, __GI_##name)
464 # define hidden_ver(local, name) strong_alias (local, __GI_##name)
465 # define hidden_data_def(name) _hidden_strong_alias (name, __GI_##name)
466 # define hidden_data_weak(name) _hidden_weak_alias (name, __GI_##name)
467 # define hidden_data_ver(local, name) strong_data_alias (local, __GI_##name)
468 # define HIDDEN_JUMPTARGET(name) __GI_##name
469 # endif /* __ASSEMBLER__ */
471 #else /* not SHARED */
473 # ifndef __ASSEMBLER__
474 # define hidden_proto(name, attrs...)
475 # else
476 # define HIDDEN_JUMPTARGET(name) name
477 # endif /* not __ASSEMBLER__ */
478 # define hidden_weak(name)
479 # define hidden_def(name)
480 # define hidden_ver(local, name)
481 # define hidden_data_weak(name)
482 # define hidden_data_def(name)
483 # define hidden_data_ver(local, name)
485 #endif /* SHARED / not SHARED */
488 /* uClibc does not support versioning yet. */
489 #define versioned_symbol(lib, local, symbol, version) /* weak_alias(local, symbol) */
490 #undef hidden_ver
491 #define hidden_ver(local, name) /* strong_alias(local, __GI_##name) */
492 #undef hidden_data_ver
493 #define hidden_data_ver(local, name) /* strong_alias(local,__GI_##name) */
495 #if !defined NOT_IN_libc
496 # define libc_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
497 # define libc_hidden_def(name) hidden_def (name)
498 # define libc_hidden_weak(name) hidden_weak (name)
499 # define libc_hidden_ver(local, name) hidden_ver (local, name)
500 # define libc_hidden_data_def(name) hidden_data_def (name)
501 # define libc_hidden_data_weak(name) hidden_data_weak (name)
502 # define libc_hidden_data_ver(local, name) hidden_data_ver (local, name)
503 #else
504 # define libc_hidden_proto(name, attrs...)
505 # define libc_hidden_def(name)
506 # define libc_hidden_weak(name)
507 # define libc_hidden_ver(local, name)
508 # define libc_hidden_data_def(name)
509 # define libc_hidden_data_weak(name)
510 # define libc_hidden_data_ver(local, name)
511 #endif
513 #if defined NOT_IN_libc && defined IS_IN_rtld
514 # define rtld_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
515 # define rtld_hidden_def(name) hidden_def (name)
516 # define rtld_hidden_weak(name) hidden_weak (name)
517 # define rtld_hidden_ver(local, name) hidden_ver (local, name)
518 # define rtld_hidden_data_def(name) hidden_data_def (name)
519 # define rtld_hidden_data_weak(name) hidden_data_weak (name)
520 # define rtld_hidden_data_ver(local, name) hidden_data_ver (local, name)
521 #else
522 # define rtld_hidden_proto(name, attrs...)
523 # define rtld_hidden_def(name)
524 # define rtld_hidden_weak(name)
525 # define rtld_hidden_ver(local, name)
526 # define rtld_hidden_data_def(name)
527 # define rtld_hidden_data_weak(name)
528 # define rtld_hidden_data_ver(local, name)
529 #endif
531 #if defined NOT_IN_libc && defined IS_IN_libm
532 # define libm_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
533 # define libm_hidden_def(name) hidden_def (name)
534 # define libm_hidden_weak(name) hidden_weak (name)
535 # define libm_hidden_ver(local, name) hidden_ver (local, name)
536 # define libm_hidden_data_def(name) hidden_data_def (name)
537 # define libm_hidden_data_weak(name) hidden_data_weak (name)
538 # define libm_hidden_data_ver(local, name) hidden_data_ver (local, name)
539 #else
540 # define libm_hidden_proto(name, attrs...)
541 # define libm_hidden_def(name)
542 # define libm_hidden_weak(name)
543 # define libm_hidden_ver(local, name)
544 # define libm_hidden_data_def(name)
545 # define libm_hidden_data_weak(name)
546 # define libm_hidden_data_ver(local, name)
547 #endif
549 #if defined NOT_IN_libc && defined IS_IN_librt
550 # define librt_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
551 # define librt_hidden_def(name) hidden_def (name)
552 # define librt_hidden_weak(name) hidden_weak (name)
553 # define librt_hidden_ver(local, name) hidden_ver (local, name)
554 # define librt_hidden_data_def(name) hidden_data_def (name)
555 # define librt_hidden_data_weak(name) hidden_data_weak (name)
556 # define librt_hidden_data_ver(local, name) hidden_data_ver (local, name)
557 #else
558 # define librt_hidden_proto(name, attrs...)
559 # define librt_hidden_def(name)
560 # define librt_hidden_weak(name)
561 # define librt_hidden_ver(local, name)
562 # define librt_hidden_data_def(name)
563 # define librt_hidden_data_weak(name)
564 # define librt_hidden_data_ver(local, name)
565 #endif
567 #if defined NOT_IN_libc && defined IS_IN_libdl
568 # define libdl_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
569 # define libdl_hidden_def(name) hidden_def (name)
570 # define libdl_hidden_weak(name) hidden_weak (name)
571 # define libdl_hidden_ver(local, name) hidden_ver (local, name)
572 # define libdl_hidden_data_def(name) hidden_data_def (name)
573 # define libdl_hidden_data_weak(name) hidden_data_weak (name)
574 # define libdl_hidden_data_ver(local, name) hidden_data_ver (local, name)
575 #else
576 # define libdl_hidden_proto(name, attrs...)
577 # define libdl_hidden_def(name)
578 # define libdl_hidden_weak(name)
579 # define libdl_hidden_ver(local, name)
580 # define libdl_hidden_data_def(name)
581 # define libdl_hidden_data_weak(name)
582 # define libdl_hidden_data_ver(local, name)
583 #endif
585 #if defined NOT_IN_libc && defined IS_IN_libutil
586 # define libutil_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
587 # define libutil_hidden_def(name) hidden_def (name)
588 # define libutil_hidden_weak(name) hidden_weak (name)
589 # define libutil_hidden_ver(local, name) hidden_ver (local, name)
590 # define libutil_hidden_data_def(name) hidden_data_def (name)
591 # define libutil_hidden_data_weak(name) hidden_data_weak (name)
592 # define libutil_hidden_data_ver(local, name) hidden_data_ver (local, name)
593 #else
594 # define libutil_hidden_proto(name, attrs...)
595 # define libutil_hidden_def(name)
596 # define libutil_hidden_weak(name)
597 # define libutil_hidden_ver(local, name)
598 # define libutil_hidden_data_def(name)
599 # define libutil_hidden_data_weak(name)
600 # define libutil_hidden_data_ver(local, name)
601 #endif
603 #if defined NOT_IN_libc && defined IS_IN_libcrypt
604 # define libcrypt_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
605 # define libcrypt_hidden_def(name) hidden_def (name)
606 # define libcrypt_hidden_weak(name) hidden_weak (name)
607 # define libcrypt_hidden_ver(local, name) hidden_ver (local, name)
608 # define libcrypt_hidden_data_def(name) hidden_data_def (name)
609 # define libcrypt_hidden_data_weak(name) hidden_data_weak (name)
610 # define libcrypt_hidden_data_ver(local, name) hidden_data_ver (local, name)
611 #else
612 # define libcrypt_hidden_proto(name, attrs...)
613 # define libcrypt_hidden_def(name)
614 # define libcrypt_hidden_weak(name)
615 # define libcrypt_hidden_ver(local, name)
616 # define libcrypt_hidden_data_def(name)
617 # define libcrypt_hidden_data_weak(name)
618 # define libcrypt_hidden_data_ver(local, name)
619 #endif
621 #if defined NOT_IN_libc && defined IS_IN_libpthread
622 # define libpthread_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
623 # define libpthread_hidden_def(name) hidden_def (name)
624 # define libpthread_hidden_weak(name) hidden_weak (name)
625 # define libpthread_hidden_ver(local, name) hidden_ver (local, name)
626 # define libpthread_hidden_data_def(name) hidden_data_def (name)
627 # define libpthread_hidden_data_weak(name) hidden_data_weak (name)
628 # define libpthread_hidden_data_ver(local, name) hidden_data_ver (local, name)
629 #else
630 # define libpthread_hidden_proto(name, attrs...)
631 # define libpthread_hidden_def(name)
632 # define libpthread_hidden_weak(name)
633 # define libpthread_hidden_ver(local, name)
634 # define libpthread_hidden_data_def(name)
635 # define libpthread_hidden_data_weak(name)
636 # define libpthread_hidden_data_ver(local, name)
637 #endif
639 #endif /* libc-symbols.h */