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 | 4 | ||||
-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, 10 deletions
diff --git a/src/libw32dll/wine/Makefile.am b/src/libw32dll/wine/Makefile.am index 1756e3262..170f31086 100644 --- a/src/libw32dll/wine/Makefile.am +++ b/src/libw32dll/wine/Makefile.am @@ -5,7 +5,8 @@ include $(top_srcdir)/misc/Makefile.common AM_CFLAGS = $(DEFAULT_OCFLAGS) $(X_CFLAGS) @W32_NO_OPTIMIZE@ \ -fno-omit-frame-pointer -fno-inline-functions -fno-rename-registers AM_CPPFLAGS = -DWIN32_PATH=\"$(w32_path)\" -I$(srcdir)/.. -D__WINE__ \ - -Ddbg_printf=__vprintf -DTRACE=__vprintf + -Ddbg_printf=__vprintf -DTRACE=__vprintf \ + -I$(top_srcdir)/src/xine-utils EXTRA_DIST = stubs.s wrapper.S diff --git a/src/libw32dll/wine/win32.c b/src/libw32dll/wine/win32.c index 01a287c31..14ee178de 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 50ecf018e..7e3548643 100644 --- a/src/post/deinterlace/plugins/Makefile.am +++ b/src/post/deinterlace/plugins/Makefile.am @@ -20,7 +20,7 @@ include $(top_srcdir)/misc/Makefile.common # libpostproc is here so we can use their nice mangle.h AM_CFLAGS = $(VISIBILITY_FLAG) AM_CPPFLAGS = -I$(top_srcdir)/src/post/deinterlace \ - -I$(top_srcdir)/contrib/ffmpeg/libpostproc + -I$(top_srcdir)/src/xine-utils EXTRA_DIST = greedy2frame_template.c greedyh.asm \ tomsmocomp/SearchLoop0A.inc tomsmocomp/SearchLoopBottom.inc \ @@ -48,7 +48,7 @@ endif noinst_LTLIBRARIES = libdeinterlacepluginsO1.la libdeinterlaceplugins.la libdeinterlacepluginsO1_la_SOURCES = kdetv_greedyh.c $(debug_sources) -libdeinterlacepluginsO1_la_CFLAGS = $(O1_CFLAGS) $(AM_CFLAGS) $(AVUTIL_CFLAGS) +libdeinterlacepluginsO1_la_CFLAGS = $(O1_CFLAGS) $(AM_CFLAGS) libdeinterlaceplugins_la_SOURCES = double.c greedy.c linear.c linearblend.c \ vfir.c weave.c scalerbob.c kdetv_tomsmocomp.c \ diff --git a/src/post/deinterlace/plugins/tomsmocomp/tomsmocompmacros.h b/src/post/deinterlace/plugins/tomsmocomp/tomsmocompmacros.h index b000d7bf9..a0136fd44 100644 --- a/src/post/deinterlace/plugins/tomsmocomp/tomsmocompmacros.h +++ b/src/post/deinterlace/plugins/tomsmocomp/tomsmocompmacros.h @@ -2,7 +2,7 @@ #include <math.h> #include <stdlib.h> -#include <avutil.h> +#include "mangle.h" #define USE_FOR_DSCALER diff --git a/src/xine-utils/Makefile.am b/src/xine-utils/Makefile.am index e0ccb7d6d..75cab2131 100644 --- a/src/xine-utils/Makefile.am +++ b/src/xine-utils/Makefile.am @@ -5,7 +5,7 @@ AM_CPPFLAGS = -DXINE_LIBRARY_COMPILE EXTRA_DIST = ppcasm_string.S ppc_asm.tmpl -noinst_HEADERS = ppcasm_string.h xine_check.h +noinst_HEADERS = ppcasm_string.h xine_check.h mangle.h noinst_LTLIBRARIES = libxineutils.la 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 |