libavcodec/libpostproc ---> libpostproc
[libav.git] / libpostproc / mangle.h
CommitLineData
bba9b16c
MN
1/* mangle.h - This file has some CPP macros to deal with different symbol
2 * mangling across binary formats.
3 * (c)2002 by Felix Buenemann <atmosfear at users.sourceforge.net>
4 * File licensed under the GPL, see http://www.fsf.org/ for more info.
5 */
6
7#ifndef __MANGLE_H
8#define __MANGLE_H
9
10/* Feel free to add more to the list, eg. a.out IMO */
a2c3bf82 11/* Use rip-relative addressing if compiling PIC code on x86-64. */
8437bd7b 12#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__OS2__) || \
bba9b16c 13 (defined(__OpenBSD__) && !defined(__ELF__))
a2c3bf82
DH
14#if defined(ARCH_X86_64) && defined(PIC)
15#define MANGLE(a) "_" #a"(%%rip)"
16#else
bba9b16c 17#define MANGLE(a) "_" #a
a2c3bf82
DH
18#endif
19#else
20#if defined(ARCH_X86_64) && defined(PIC)
21#define MANGLE(a) #a"(%%rip)"
5f112e1f
SH
22#elif defined(CONFIG_DARWIN)
23#define MANGLE(a) "_" #a
bba9b16c
MN
24#else
25#define MANGLE(a) #a
26#endif
a2c3bf82 27#endif
bba9b16c
MN
28
29#endif /* !__MANGLE_H */
30