| 1 |
vapier |
23 |
/*
|
| 2 |
|
|
* File: localdecls.h
|
| 3 |
|
|
*
|
| 4 |
|
|
* Copyright 1999-2004 Gentoo Foundation
|
| 5 |
|
|
* Distributed under the terms of the GNU General Public License v2
|
| 6 |
|
|
* $Header$
|
| 7 |
|
|
*/
|
| 8 |
|
|
|
| 9 |
|
|
#ifndef __LOCALDECLS_H__
|
| 10 |
|
|
#define __LOCALDECLS_H__
|
| 11 |
|
|
|
| 12 |
|
|
/* take care of broken ld loading */
|
| 13 |
vapier |
63 |
#if defined(__GLIBC__) && !defined(__UCLIBC__)
|
| 14 |
vapier |
23 |
|
| 15 |
|
|
# if __GLIBC__ <= 2 && __GLIBC_MINOR__ <= 2
|
| 16 |
|
|
# define BROKEN_RTLD_NEXT
|
| 17 |
|
|
# define LIBC 5
|
| 18 |
|
|
# endif
|
| 19 |
|
|
|
| 20 |
|
|
# if !defined(BROKEN_RTLD_NEXT)
|
| 21 |
|
|
# if defined(__mips__)
|
| 22 |
|
|
# define BROKEN_RTLD_NEXT
|
| 23 |
|
|
# endif
|
| 24 |
|
|
# endif
|
| 25 |
|
|
|
| 26 |
|
|
#endif
|
| 27 |
|
|
|
| 28 |
|
|
#define GLIBC_MINOR __GLIBC_MINOR__
|
| 29 |
|
|
|
| 30 |
|
|
#ifdef PATH_MAX
|
| 31 |
|
|
# define SB_PATH_MAX PATH_MAX * 2
|
| 32 |
|
|
# if (SB_PATH_MAX >= INT_MAX) || (SB_PATH_MAX < PATH_MAX)
|
| 33 |
|
|
# undef SB_PATH_MAX
|
| 34 |
|
|
# define SB_PATH_MAX PATH_MAX + 25
|
| 35 |
|
|
# if (SB_PATH_MAX >= INT_MAX) || (SB_PATH_MAX < PATH_MAX)
|
| 36 |
|
|
# error SB_PATH_MAX too big!
|
| 37 |
|
|
# endif
|
| 38 |
|
|
# endif
|
| 39 |
|
|
#else
|
| 40 |
|
|
# error PATH_MAX not defined!
|
| 41 |
|
|
#endif
|
| 42 |
|
|
|
| 43 |
azarah |
43 |
#ifndef OUTSIDE_LIBSANDBOX
|
| 44 |
|
|
# define SB_STATIC static
|
| 45 |
|
|
#else
|
| 46 |
|
|
# define SB_STATIC
|
| 47 |
vapier |
23 |
#endif
|
| 48 |
azarah |
43 |
|
| 49 |
azarah |
182 |
#if !HAVE_DLVSYM
|
| 50 |
|
|
# define dlvsym(lib, sym, ver) dlsym(lib, sym)
|
| 51 |
azarah |
43 |
#endif
|
| 52 |
azarah |
182 |
|
| 53 |
|
|
/* from glibc */
|
| 54 |
|
|
# define symbol_version(real, name, version) \
|
| 55 |
|
|
__asm__ (".symver " #real "," #name "@" #version)
|
| 56 |
|
|
# define default_symbol_version(real, name, version) \
|
| 57 |
|
|
__asm__ (".symver " #real "," #name "@@" #version)
|
| 58 |
|
|
|
| 59 |
|
|
#endif
|