diff options
-rw-r--r-- | src/libw32dll/wine/Makefile.am | 3 | ||||
-rw-r--r-- | src/libw32dll/wine/win32.c | 8 | ||||
-rw-r--r-- | src/post/deinterlace/plugins/Makefile.am | 2 | ||||
-rw-r--r-- | src/post/deinterlace/plugins/tomsmocomp/tomsmocompmacros.h | 2 | ||||
-rw-r--r-- | src/xine-utils/Makefile.am | 2 | ||||
-rw-r--r-- | src/xine-utils/mangle.h | 50 |
6 files changed, 59 insertions, 8 deletions
diff --git a/src/libw32dll/wine/Makefile.am b/src/libw32dll/wine/Makefile.am index 63da4068e..70341a502 100644 --- a/src/libw32dll/wine/Makefile.am +++ b/src/libw32dll/wine/Makefile.am @@ -9,7 +9,8 @@ noinst_LTLIBRARIES = $(wine_lib) AM_CFLAGS = $(X_CFLAGS) @W32_NO_OPTIMIZE@ \ -Wmissing-prototypes -Wimplicit-function-declaration \ -DWIN32_PATH=\"@w32_path@\" -I$(srcdir)/.. -D__WINE__ \ - -Ddbg_printf=__vprintf -DTRACE=__vprintf + -Ddbg_printf=__vprintf -DTRACE=__vprintf \ + -I$(top_srcdir)/src/xine-utils # CFLAGS is here to filter out -fomit-frame-pointer, # -finline-functions and -frename-registers because they cause bad diff --git a/src/libw32dll/wine/win32.c b/src/libw32dll/wine/win32.c index 3b0941391..9b627a10a 100644 --- a/src/libw32dll/wine/win32.c +++ b/src/libw32dll/wine/win32.c @@ -5058,11 +5058,9 @@ struct libs libraries[]={ LL(ddraw) #endif }; -#if defined(__CYGWIN__) || defined(__OS2__) || defined (__OpenBSD__) -#define MANGLE(a) "_" #a -#else -#define MANGLE(a) #a -#endif + +#include "mangle.h" + static void ext_stubs(void) { // expects: diff --git a/src/post/deinterlace/plugins/Makefile.am b/src/post/deinterlace/plugins/Makefile.am index 1ff139d29..5f0997eb8 100644 --- a/src/post/deinterlace/plugins/Makefile.am +++ b/src/post/deinterlace/plugins/Makefile.am @@ -30,7 +30,7 @@ EXTRA_DIST = greedy2frame_template.c greedyh.asm \ # libpostproc is here so we can use their nice mangle.h AM_CFLAGS = -I$(top_srcdir)/src/post/deinterlace \ - -I$(top_srcdir)/src/libffmpeg/libavcodec/libpostproc + -I$(top_srcdir)/src/xine-utils # Avoid "can't find register" failures with -O0, -O2, -O3 (gcc 4.0) libdeinterlaceplugins_la-kdetv_greedyh.o libdeinterlaceplugins_la-kdetv_greedyh.lo: CFLAGS=$(shell echo @CFLAGS@ | sed -e 's/$$/ -O1/') diff --git a/src/post/deinterlace/plugins/tomsmocomp/tomsmocompmacros.h b/src/post/deinterlace/plugins/tomsmocomp/tomsmocompmacros.h index a3b92a51c..a0136fd44 100644 --- a/src/post/deinterlace/plugins/tomsmocomp/tomsmocompmacros.h +++ b/src/post/deinterlace/plugins/tomsmocomp/tomsmocompmacros.h @@ -2,6 +2,8 @@ #include <math.h> #include <stdlib.h> +#include "mangle.h" + #define USE_FOR_DSCALER #define MyMemCopy xine_fast_memcpy diff --git a/src/xine-utils/Makefile.am b/src/xine-utils/Makefile.am index 95de06b9e..a23ebe579 100644 --- a/src/xine-utils/Makefile.am +++ b/src/xine-utils/Makefile.am @@ -46,5 +46,5 @@ xineinclude_HEADERS = \ ring_buffer.h -noinst_HEADERS = ppcasm_string.h xine_check.h +noinst_HEADERS = ppcasm_string.h xine_check.h mangle.h diff --git a/src/xine-utils/mangle.h b/src/xine-utils/mangle.h new file mode 100644 index 000000000..7627ca2fc --- /dev/null +++ b/src/xine-utils/mangle.h @@ -0,0 +1,50 @@ +/* + * copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at> + * copyright (c) 2008 the xine-project + * + * This file is part of FFmpeg. + * + * xine is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * xine is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA + */ + +/** + * @file + * + * @brief MANGLE definition from FFmpeg project, until the code is ported + * not to require this (considered an hack by the FFmpeg project. + */ + +#ifndef _XINE_MANGLE_H +#define _XINE_MANGLE_H + +// Use rip-relative addressing if compiling PIC code on x86-64. +#if defined(__MINGW32__) || defined(__CYGWIN__) || defined(__DJGPP__) || \ + defined(__OS2__) || (defined (__OpenBSD__) && !defined(__ELF__)) +# if defined(__x86_64__) && defined(__PIC__) +# define MANGLE(a) "_" #a"(%%rip)" +# else +# define MANGLE(a) "_" #a +# endif +#else +# if defined(__x86_64__) && defined(__PIC__) +# define MANGLE(a) #a"(%%rip)" +# elif defined(__APPLE__) +# define MANGLE(a) "_" #a +# else +# define MANGLE(a) #a +# endif +#endif + +#endif |