diff options
Diffstat (limited to 'src/libw32dll/wine')
-rw-r--r-- | src/libw32dll/wine/Makefile.am | 59 | ||||
-rw-r--r-- | src/libw32dll/wine/debugtools.h | 2 | ||||
-rw-r--r-- | src/libw32dll/wine/ext.h | 2 | ||||
-rw-r--r-- | src/libw32dll/wine/registry.c | 40 | ||||
-rw-r--r-- | src/libw32dll/wine/win32.c | 6 | ||||
-rw-r--r-- | src/libw32dll/wine/windef.h | 7 |
6 files changed, 44 insertions, 72 deletions
diff --git a/src/libw32dll/wine/Makefile.am b/src/libw32dll/wine/Makefile.am index 70341a502..170f31086 100644 --- a/src/libw32dll/wine/Makefile.am +++ b/src/libw32dll/wine/Makefile.am @@ -1,41 +1,14 @@ include $(top_srcdir)/misc/Makefile.common -LIBTOOL = $(SHELL) $(top_builddir)/libtool - -EXTRA_DIST = stubs.s wrapper.S - -noinst_LTLIBRARIES = $(wine_lib) - -AM_CFLAGS = $(X_CFLAGS) @W32_NO_OPTIMIZE@ \ - -Wmissing-prototypes -Wimplicit-function-declaration \ - -DWIN32_PATH=\"@w32_path@\" -I$(srcdir)/.. -D__WINE__ \ +# disable -fomit-frame-pointer, -finline-functions, and -frename-registers +# because they cause bad behavior of wine +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 \ - -I$(top_srcdir)/src/xine-utils - -# CFLAGS is here to filter out -fomit-frame-pointer, -# -finline-functions and -frename-registers because they cause bad -# behavior of wine -CFLAGS = `echo @CFLAGS@ | sed -e 's/-fomit-frame-pointer//g;s/-finline-functions//g;s/-frename-registers//g'` + -I$(top_srcdir)/src/xine-utils -if HAVE_W32DLL -wine_lib = libwine.la -endif - -libwine_la_SOURCES = \ - afl.c \ - driver.c \ - elfdll.c \ - ext.c \ - ldt_keeper.c \ - module.c \ - pe_image.c \ - pe_resource.c \ - resource.c \ - registry.c \ - vfl.c \ - win32.c \ - stubs.s \ - wrapper.S +EXTRA_DIST = stubs.s wrapper.S noinst_HEADERS = \ avifmt.h \ @@ -75,3 +48,21 @@ noinst_HEADERS = \ winuser.h \ wrapper.h +noinst_LTLIBRARIES = libwine.la + +libwine_la_SOURCES = \ + afl.c \ + driver.c \ + elfdll.c \ + ext.c \ + ldt_keeper.c \ + module.c \ + pe_image.c \ + pe_resource.c \ + resource.c \ + registry.c \ + vfl.c \ + win32.c \ + stubs.s \ + wrapper.S +libwine_la_CPPFLAGS = $(AM_CPPFLAGS) $(XDG_BASEDIR_CPPFLAGS) diff --git a/src/libw32dll/wine/debugtools.h b/src/libw32dll/wine/debugtools.h index 3b342e10c..c6fac518d 100644 --- a/src/libw32dll/wine/debugtools.h +++ b/src/libw32dll/wine/debugtools.h @@ -8,7 +8,7 @@ #include "config.h" #include "windef.h" -#include "compat.h" +#include <xine/compat.h> struct _GUID; diff --git a/src/libw32dll/wine/ext.h b/src/libw32dll/wine/ext.h index f0f505c4d..ad22edc5e 100644 --- a/src/libw32dll/wine/ext.h +++ b/src/libw32dll/wine/ext.h @@ -2,7 +2,7 @@ #define loader_ext_h #include "windef.h" -#include "attributes.h" +#include <xine/attributes.h> extern LPVOID FILE_dommap( int unix_handle, LPVOID start, DWORD size_high, DWORD size_low, diff --git a/src/libw32dll/wine/registry.c b/src/libw32dll/wine/registry.c index 0ccf3de9b..20c21888d 100644 --- a/src/libw32dll/wine/registry.c +++ b/src/libw32dll/wine/registry.c @@ -18,7 +18,8 @@ #include "debugtools.h" #ifdef XINE_MAJOR -#include "xineutils.h" +#include <xine/xineutils.h> +#include <basedir.h> #endif //#undef TRACE @@ -302,43 +303,22 @@ static struct reg_value* insert_reg_value(int handle, const char* name, int type static void init_registry(void) { + xdgHandle tmph = xdgAllocHandle(); + const char *const xdg_cache_home = xdgCacheHome(tmph); + TRACE("Initializing registry\n"); // can't be free-ed - it's static and probably thread // unsafe structure which is stored in glibc -#ifdef MPLAYER - regpathname = get_path("registry"); - localregpathname = regpathname; -#else -#ifdef XINE_MAJOR - asprintf(&localregpathname, "%s/.xine/win32registry", xine_get_homedir()); -#else - // regpathname is an external pointer - // - // registry.c is holding it's own internal pointer - // localregpathname - which is being allocate/deallocated - - if (localregpathname == 0) - { - const char* pthn = regpathname; - if (!regpathname) - { - // avifile - for now reading data from user's home - struct passwd* pwent; - pwent = getpwuid(geteuid()); - pthn = pwent->pw_dir; - } - - localregpathname = (char*)malloc(strlen(pthn)+20); - strcpy(localregpathname, pthn); - strcat(localregpathname, "/.registry"); - } -#endif -#endif + localregpathname = malloc(strlen(xdg_cache_home) + sizeof("/"PACKAGE"/win32registry")); + strcpy(localregpathname, xdg_cache_home); + strcat(localregpathname, "/"PACKAGE"/win32registry"); open_registry(); insert_handle(HKEY_LOCAL_MACHINE, "HKLM"); insert_handle(HKEY_CURRENT_USER, "HKCU"); + + xdgFreeHandle(tmph); } #if 0 diff --git a/src/libw32dll/wine/win32.c b/src/libw32dll/wine/win32.c index d9744ae35..274c78de3 100644 --- a/src/libw32dll/wine/win32.c +++ b/src/libw32dll/wine/win32.c @@ -12,7 +12,7 @@ for DLL to know too much about its environment. ************************************************************/ #include "config.h" -#include "attributes.h" +#include <xine/attributes.h> #define QTX @@ -3036,9 +3036,9 @@ static int WINAPI expGetSystemPaletteEntries(int hdc, int iStartIndex, int nEntr static int WINAPI expGetTimeZoneInformation(LPTIME_ZONE_INFORMATION lpTimeZoneInformation) { - const short name[]={'C', 'e', 'n', 't', 'r', 'a', 'l', ' ', 'S', 't', 'a', + static const short name[]={'C', 'e', 'n', 't', 'r', 'a', 'l', ' ', 'S', 't', 'a', 'n', 'd', 'a', 'r', 'd', ' ', 'T', 'i', 'm', 'e', 0}; - const short pname[]={'C', 'e', 'n', 't', 'r', 'a', 'l', ' ', 'D', 'a', 'y', + static const short pname[]={'C', 'e', 'n', 't', 'r', 'a', 'l', ' ', 'D', 'a', 'y', 'l', 'i', 'g', 'h', 't', ' ', 'T', 'i', 'm', 'e', 0}; dbgprintf("GetTimeZoneInformation(%p) => TIME_ZONE_ID_STANDARD\n", lpTimeZoneInformation); memset(lpTimeZoneInformation, 0, sizeof(TIME_ZONE_INFORMATION)); diff --git a/src/libw32dll/wine/windef.h b/src/libw32dll/wine/windef.h index e7f691a02..b86f2f740 100644 --- a/src/libw32dll/wine/windef.h +++ b/src/libw32dll/wine/windef.h @@ -7,8 +7,9 @@ #ifndef __WINE_WINDEF_H #define __WINE_WINDEF_H +#include "config.h" + #ifdef __WINE__ -# include "config.h" # undef UNICODE #endif @@ -493,14 +494,14 @@ typedef LRESULT CALLBACK (*WNDPROC16)(HWND16,UINT16,WPARAM16,LPARAM); /* Macro for structure packing. */ +#define WINE_PACKED XINE_PACKED + #if defined(__GNUC__) || defined(__ICC) #ifndef _EGCS_ -#define WINE_PACKED __attribute__((packed)) #define WINE_UNUSED __attribute__((unused)) #define WINE_NORETURN __attribute__((noreturn)) #endif #else -#define WINE_PACKED /* nothing */ #define WINE_UNUSED /* nothing */ #define WINE_NORETURN /* nothing */ #endif |