diff options
Diffstat (limited to 'src/libw32dll')
-rw-r--r-- | src/libw32dll/Makefile.am | 1 | ||||
-rw-r--r-- | src/libw32dll/qt_decoder.c | 8 | ||||
-rw-r--r-- | src/libw32dll/w32codec.c | 12 | ||||
-rw-r--r-- | src/libw32dll/wine/Makefile.am | 3 | ||||
-rw-r--r-- | src/libw32dll/wine/driver.c | 2 | ||||
-rw-r--r-- | src/libw32dll/wine/elfdll.c | 2 | ||||
-rw-r--r-- | src/libw32dll/wine/pe_image.c | 2 | ||||
-rw-r--r-- | src/libw32dll/wine/pe_resource.c | 2 | ||||
-rw-r--r-- | src/libw32dll/wine/registry.c | 3 | ||||
-rw-r--r-- | src/libw32dll/wine/resource.c | 2 | ||||
-rw-r--r-- | src/libw32dll/wine/vfl.c | 2 | ||||
-rw-r--r-- | src/libw32dll/wine/win32.c | 19 |
12 files changed, 30 insertions, 28 deletions
diff --git a/src/libw32dll/Makefile.am b/src/libw32dll/Makefile.am index e7f655888..5036851a3 100644 --- a/src/libw32dll/Makefile.am +++ b/src/libw32dll/Makefile.am @@ -1,3 +1,4 @@ +include $(top_builddir)/misc/Makefile.plugins include $(top_srcdir)/misc/Makefile.common AM_CFLAGS = -I$(srcdir)/wine -DWIN32_PATH=\"@w32_path@\" $(VISIBILITY_FLAG) diff --git a/src/libw32dll/qt_decoder.c b/src/libw32dll/qt_decoder.c index 3053b2b68..99e2ba9d4 100644 --- a/src/libw32dll/qt_decoder.c +++ b/src/libw32dll/qt_decoder.c @@ -553,7 +553,7 @@ static audio_decoder_t *qta_open_plugin (audio_decoder_class_t *class_gen, qta_decoder_t *this ; - this = (qta_decoder_t *) xine_xmalloc (sizeof (qta_decoder_t)); + this = (qta_decoder_t *) calloc(1, sizeof(qta_decoder_t)); this->audio_decoder.decode_data = qta_decode_data; this->audio_decoder.reset = qta_reset; @@ -592,7 +592,7 @@ static void *qta_init_class (xine_t *xine, void *data) { pthread_once (&once_control, init_routine); - this = (qta_class_t *) xine_xmalloc (sizeof (qta_class_t)); + this = (qta_class_t *) calloc(1, sizeof(qta_class_t)); this->decoder_class.open_plugin = qta_open_plugin; this->decoder_class.get_identifier = qta_get_identifier; @@ -1063,7 +1063,7 @@ static video_decoder_t *qtv_open_plugin (video_decoder_class_t *class_gen, qtv_class_t *cls = (qtv_class_t *) class_gen; qtv_decoder_t *this ; - this = (qtv_decoder_t *) xine_xmalloc (sizeof (qtv_decoder_t)); + this = (qtv_decoder_t *) calloc(1, sizeof(qtv_decoder_t)); this->video_decoder.decode_data = qtv_decode_data; this->video_decoder.flush = qtv_flush; @@ -1116,7 +1116,7 @@ static void *qtv_init_class (xine_t *xine, void *data) { pthread_once (&once_control, init_routine); - this = (qtv_class_t *) xine_xmalloc (sizeof (qtv_class_t)); + this = (qtv_class_t *) calloc(1, sizeof(qtv_class_t)); this->decoder_class.open_plugin = qtv_open_plugin; this->decoder_class.get_identifier = qtv_get_identifier; diff --git a/src/libw32dll/w32codec.c b/src/libw32dll/w32codec.c index 88790ebc7..e61ebcb82 100644 --- a/src/libw32dll/w32codec.c +++ b/src/libw32dll/w32codec.c @@ -21,6 +21,10 @@ * DirectShow support by Miguel Freitas (Nov/2001) * DMO support (Dez/2002) */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <stdlib.h> #include <stdio.h> @@ -1550,7 +1554,7 @@ static video_decoder_t *open_video_decoder_plugin (video_decoder_class_t *class_ w32v_decoder_t *this ; - this = (w32v_decoder_t *) xine_xmalloc (sizeof (w32v_decoder_t)); + this = (w32v_decoder_t *) calloc(1, sizeof(w32v_decoder_t)); this->video_decoder.decode_data = w32v_decode_data; this->video_decoder.flush = w32v_flush; @@ -1593,7 +1597,7 @@ static void *init_video_decoder_class (xine_t *xine, void *data) { cfg = xine->config; if ((win32_def_path = get_win32_codecs_path(cfg)) == NULL) return NULL; - this = (w32v_class_t *) xine_xmalloc (sizeof (w32v_class_t)); + this = (w32v_class_t *) calloc(1, sizeof(w32v_class_t)); this->decoder_class.open_plugin = open_video_decoder_plugin; this->decoder_class.get_identifier = get_video_identifier; @@ -1614,7 +1618,7 @@ static audio_decoder_t *open_audio_decoder_plugin (audio_decoder_class_t *class_ w32a_decoder_t *this ; - this = (w32a_decoder_t *) xine_xmalloc (sizeof (w32a_decoder_t)); + this = (w32a_decoder_t *) calloc(1, sizeof(w32a_decoder_t)); this->audio_decoder.decode_data = w32a_decode_data; this->audio_decoder.reset = w32a_reset; @@ -1655,7 +1659,7 @@ static void *init_audio_decoder_class (xine_t *xine, void *data) { cfg = xine->config; if ((win32_def_path = get_win32_codecs_path(cfg)) == NULL) return NULL; - this = (w32a_class_t *) xine_xmalloc (sizeof (w32a_class_t)); + this = (w32a_class_t *) calloc(1, sizeof(w32a_class_t)); this->decoder_class.open_plugin = open_audio_decoder_plugin; this->decoder_class.get_identifier = get_identifier; 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/driver.c b/src/libw32dll/wine/driver.c index ef8761628..296fcd25a 100644 --- a/src/libw32dll/wine/driver.c +++ b/src/libw32dll/wine/driver.c @@ -1,4 +1,4 @@ -#include <config.h> +#include "config.h" #include <stdio.h> #ifdef HAVE_MALLOC_H #include <malloc.h> diff --git a/src/libw32dll/wine/elfdll.c b/src/libw32dll/wine/elfdll.c index 7853ffe71..e81467b5a 100644 --- a/src/libw32dll/wine/elfdll.c +++ b/src/libw32dll/wine/elfdll.c @@ -3,7 +3,7 @@ * * Copyright 1999 Bertho A. Stultiens */ -#include <config.h> +#include "config.h" #ifdef HAVE_LIBDL diff --git a/src/libw32dll/wine/pe_image.c b/src/libw32dll/wine/pe_image.c index c99bbaed0..1366cc396 100644 --- a/src/libw32dll/wine/pe_image.c +++ b/src/libw32dll/wine/pe_image.c @@ -900,7 +900,7 @@ void PE_UnloadLibrary(WINE_MODREF *wm) */ static void extend_stack_for_dll_alloca(void) { -#ifndef __FreeBSD__ +#if !defined(__FreeBSD__) && !defined(__OpenBSD__) void* mem=alloca(0x20000); *(int*)mem=0x1234; #endif diff --git a/src/libw32dll/wine/pe_resource.c b/src/libw32dll/wine/pe_resource.c index 6acfef2f0..16dc85389 100644 --- a/src/libw32dll/wine/pe_resource.c +++ b/src/libw32dll/wine/pe_resource.c @@ -9,7 +9,7 @@ * Copyright 1995 Alexandre Julliard * Copyright 1997 Marcus Meissner */ -#include <config.h> +#include "config.h" #include <stdlib.h> #include <sys/types.h> diff --git a/src/libw32dll/wine/registry.c b/src/libw32dll/wine/registry.c index 0f91499b3..0ccf3de9b 100644 --- a/src/libw32dll/wine/registry.c +++ b/src/libw32dll/wine/registry.c @@ -311,8 +311,7 @@ static void init_registry(void) localregpathname = regpathname; #else #ifdef XINE_MAJOR - localregpathname = (char *)malloc(strlen(xine_get_homedir()) + 21); - sprintf(localregpathname, "%s/.xine/win32registry", xine_get_homedir()); + asprintf(&localregpathname, "%s/.xine/win32registry", xine_get_homedir()); #else // regpathname is an external pointer // diff --git a/src/libw32dll/wine/resource.c b/src/libw32dll/wine/resource.c index 9d4fa80bb..a38c1dd1e 100644 --- a/src/libw32dll/wine/resource.c +++ b/src/libw32dll/wine/resource.c @@ -4,7 +4,7 @@ * Copyright 1993 Robert J. Amstadt * Copyright 1995 Alexandre Julliard */ -#include <config.h> +#include "config.h" #include <assert.h> #include <stdio.h> diff --git a/src/libw32dll/wine/vfl.c b/src/libw32dll/wine/vfl.c index e8eb7969f..f509995de 100644 --- a/src/libw32dll/wine/vfl.c +++ b/src/libw32dll/wine/vfl.c @@ -1,7 +1,7 @@ /* * Copyright 1998 Marcus Meissner */ -#include <config.h> +#include "config.h" #include <stdio.h> #include <stdlib.h> diff --git a/src/libw32dll/wine/win32.c b/src/libw32dll/wine/win32.c index 3b0941391..d9744ae35 100644 --- a/src/libw32dll/wine/win32.c +++ b/src/libw32dll/wine/win32.c @@ -1430,7 +1430,7 @@ static void WINAPI expDeleteCriticalSection(CRITICAL_SECTION *c) } static int WINAPI expGetCurrentThreadId() { - dbgprintf("GetCurrentThreadId() => %ld\n", pthread_self()); + dbgprintf("GetCurrentThreadId() => %ld\n", (long int)pthread_self()); return (int)pthread_self(); } static int WINAPI expGetCurrentProcess() @@ -2134,7 +2134,6 @@ static const char* WINAPI expGetCommandLineA() dbgprintf("GetCommandLineA() => \"c:\\aviplay.exe\"\n"); return "c:\\aviplay.exe"; } -static short envs[]={'p', 'a', 't', 'h', ' ', 'c', ':', '\\', 0, 0}; static LPWSTR WINAPI expGetEnvironmentStringsW() { dbgprintf("GetEnvironmentStringsW() => 0\n"); @@ -3491,9 +3490,9 @@ static HANDLE WINAPI expCreateFileA(LPCSTR cs1,DWORD i1,DWORD i2, if(strstr(cs1, ".qtx")) { int result; - char* tmp=(char*)malloc(strlen(win32_def_path)+250); char* x=strrchr(cs1,'\\'); - sprintf(tmp,"%s/%s",win32_def_path,x?(x+1):cs1); + char* tmp; + asprintf(&tmp,"%s/%s",win32_def_path,x?(x+1):cs1); // printf("### Open: %s -> %s\n",cs1,tmp); result=open(tmp, O_RDONLY); free(tmp); @@ -3998,7 +3997,7 @@ static int XINE_FORMAT_PRINTF(2, 3) expsprintf(char* str, const char* format, .. va_end(args); return r; } -static int XINE_FORMAT_PRINTF(2, 3) expsscanf(const char* str, const char* format, ...) +static int XINE_FORMAT_SCANF(2, 3) expsscanf(const char* str, const char* format, ...) { va_list args; int r; @@ -4162,7 +4161,7 @@ static void* expmemset(void* dest, int c, size_t n) static time_t exptime(time_t* t) { time_t result = time(t); - dbgprintf("time(%p) => %ld\n", t, result); + dbgprintf("time(%p) => %ld\n", t, (long int)result); return result; } @@ -5058,11 +5057,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: |