add patched wine

git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/linamh@1437 6952d904-891a-0410-993b-d76249ca496b
This commit is contained in:
geos_one
2009-08-01 09:01:12 +00:00
parent 52da022e08
commit 1b2a80cabc
9 changed files with 2988 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,68 @@
--- a/dlls/dinput/mouse.c
+++ b/dlls/dinput/mouse.c
@@ -55,7 +55,8 @@ typedef enum
{
WARP_DEFAULT,
WARP_DISABLE,
- WARP_FORCE_ON
+ WARP_FORCE_ON,
+ WARP_FORCE_EDGE
} WARP_MOUSE;
struct SysMouseImpl
@@ -205,6 +206,8 @@ static SysMouseImpl *alloc_device(REFGUID rguid, const void *mvt, IDirectInputIm
newDevice->warp_override = WARP_DISABLE;
else if (!strcasecmp(buffer, "force"))
newDevice->warp_override = WARP_FORCE_ON;
+ else if (!strcasecmp(buffer, "force_edge"))
+ newDevice->warp_override = WARP_FORCE_EDGE;
}
if (appkey) RegCloseKey(appkey);
if (hkey) RegCloseKey(hkey);
@@ -331,8 +334,16 @@ static int dinput_mouse_hook( LPDIRECTINPUTDEVICE8A iface, WPARAM wparam, LPARAM
}
This->need_warp = This->warp_override != WARP_DISABLE &&
- (pt.x || pt.y) &&
- (dwCoop & DISCL_EXCLUSIVE || This->warp_override == WARP_FORCE_ON);
+ (
+ ((pt.x || pt.y) && This->warp_override != WARP_FORCE_EDGE) ||
+ (
+ (
+ hook->pt.x<2 || hook->pt.y<2 ||
+ hook->pt.x>((2 * This->win_centerX)-2) || hook->pt.y>((2 * This->win_centerY)-2)
+ ) && This->warp_override == WARP_FORCE_EDGE
+ )
+ ) &&
+ (dwCoop & DISCL_EXCLUSIVE || This->warp_override >= WARP_FORCE_ON);
break;
}
case WM_MOUSEWHEEL:
@@ -453,7 +464,7 @@ static HRESULT WINAPI SysMouseAImpl_Acquire(LPDIRECTINPUTDEVICE8A iface)
}
/* Need a window to warp mouse in. */
- if (This->warp_override == WARP_FORCE_ON && !This->base.win)
+ if (This->warp_override >= WARP_FORCE_ON && !This->base.win)
This->base.win = GetDesktopWindow();
/* Get the window dimension and find the center */
@@ -462,7 +473,7 @@ static HRESULT WINAPI SysMouseAImpl_Acquire(LPDIRECTINPUTDEVICE8A iface)
This->win_centerY = (rect.bottom - rect.top ) / 2;
/* Warp the mouse to the center of the window */
- if (This->base.dwCoopLevel & DISCL_EXCLUSIVE || This->warp_override == WARP_FORCE_ON)
+ if (This->base.dwCoopLevel & DISCL_EXCLUSIVE || This->warp_override >= WARP_FORCE_ON)
{
This->mapped_center.x = This->win_centerX;
This->mapped_center.y = This->win_centerY;
@@ -496,7 +507,7 @@ static HRESULT WINAPI SysMouseAImpl_Unacquire(LPDIRECTINPUTDEVICE8A iface)
}
/* And put the mouse cursor back where it was at acquire time */
- if (This->base.dwCoopLevel & DISCL_EXCLUSIVE || This->warp_override == WARP_FORCE_ON)
+ if (This->base.dwCoopLevel & DISCL_EXCLUSIVE || This->warp_override >= WARP_FORCE_ON)
{
TRACE(" warping mouse back to (%d , %d)\n", This->org_coords.x, This->org_coords.y);
SetCursorPos(This->org_coords.x, This->org_coords.y);

View File

@@ -0,0 +1,13 @@
diff -x .git -Naur wine-git/dlls/ntdll/heap.c wine-reverted/dlls/ntdll/heap.c
--- wine-git/dlls/ntdll/heap.c 2009-07-20 09:55:24.140677008 -0600
+++ wine-reverted/dlls/ntdll/heap.c 2009-07-20 09:57:23.532678084 -0600
@@ -1567,8 +1567,7 @@
if (!(ret = allocate_large_block( heapPtr, flags, size ))) goto oom;
notify_alloc( ret, size, flags & HEAP_ZERO_MEMORY );
memcpy( ret, pArena + 1, oldActualSize );
- notify_free( pArena + 1 );
- HEAP_MakeInUseBlockFree( subheap, pArena );
+ /* FIXME: free old memory here! */
goto done;
}
if ((pNext < (char *)subheap->base + subheap->size) &&

View File

@@ -0,0 +1,140 @@
diff --git a/dlls/secur32/schannel.c b/dlls/secur32/schannel.c
index cf3c8eb..c981bf2 100644 (file)
--- a/dlls/secur32/schannel.c
+++ b/dlls/secur32/schannel.c
@@ -653,128 +653,17 @@ static SECURITY_STATUS SEC_ENTRY schan_InitializeSecurityContextW(
PSecBufferDesc pInput, ULONG Reserved2, PCtxtHandle phNewContext,
PSecBufferDesc pOutput, ULONG *pfContextAttr, PTimeStamp ptsExpiry)
{
- struct schan_context *ctx;
- struct schan_buffers *out_buffers;
- struct schan_credentials *cred;
- struct schan_transport transport;
- int err;
-
- TRACE("%p %p %s %d %d %d %p %d %p %p %p %p\n", phCredential, phContext,
- debugstr_w(pszTargetName), fContextReq, Reserved1, TargetDataRep, pInput,
- Reserved1, phNewContext, pOutput, pfContextAttr, ptsExpiry);
-
- dump_buffer_desc(pInput);
- dump_buffer_desc(pOutput);
-
- if (!phContext)
+ SECURITY_STATUS ret;
+ if (phCredential)
{
- ULONG_PTR handle;
-
- if (!phCredential) return SEC_E_INVALID_HANDLE;
-
- cred = schan_get_object(phCredential->dwLower, SCHAN_HANDLE_CRED);
- if (!cred) return SEC_E_INVALID_HANDLE;
-
- if (!(cred->credential_use & SECPKG_CRED_OUTBOUND))
- {
- WARN("Invalid credential use %#x\n", cred->credential_use);
- return SEC_E_INVALID_HANDLE;
- }
-
- ctx = HeapAlloc(GetProcessHeap(), 0, sizeof(*ctx));
- if (!ctx) return SEC_E_INSUFFICIENT_MEMORY;
-
- handle = schan_alloc_handle(ctx, SCHAN_HANDLE_CTX);
- if (handle == SCHAN_INVALID_HANDLE)
- {
- HeapFree(GetProcessHeap(), 0, ctx);
- return SEC_E_INTERNAL_ERROR;
- }
-
- err = pgnutls_init(&ctx->session, GNUTLS_CLIENT);
- if (err != GNUTLS_E_SUCCESS)
- {
- pgnutls_perror(err);
- schan_free_handle(handle, SCHAN_HANDLE_CTX);
- HeapFree(GetProcessHeap(), 0, ctx);
- return SEC_E_INTERNAL_ERROR;
- }
-
- /* FIXME: We should be using the information from the credentials here. */
- FIXME("Using hardcoded \"NORMAL\" priority\n");
- err = pgnutls_set_default_priority(ctx->session);
- if (err != GNUTLS_E_SUCCESS)
- {
- pgnutls_perror(err);
- pgnutls_deinit(ctx->session);
- schan_free_handle(handle, SCHAN_HANDLE_CTX);
- HeapFree(GetProcessHeap(), 0, ctx);
- }
-
- err = pgnutls_credentials_set(ctx->session, GNUTLS_CRD_CERTIFICATE, cred->credentials);
- if (err != GNUTLS_E_SUCCESS)
- {
- pgnutls_perror(err);
- pgnutls_deinit(ctx->session);
- schan_free_handle(handle, SCHAN_HANDLE_CTX);
- HeapFree(GetProcessHeap(), 0, ctx);
- }
-
- pgnutls_transport_set_pull_function(ctx->session, schan_pull);
- pgnutls_transport_set_push_function(ctx->session, schan_push);
-
- phNewContext->dwLower = handle;
- phNewContext->dwUpper = 0;
+ FIXME("stub\n");
+ ret = SEC_E_UNSUPPORTED_FUNCTION;
}
else
{
- ctx = schan_get_object(phContext->dwLower, SCHAN_HANDLE_CTX);
- }
-
- ctx->req_ctx_attr = fContextReq;
-
- transport.ctx = ctx;
- init_schan_buffers(&transport.in, pInput, schan_init_sec_ctx_get_next_buffer);
- init_schan_buffers(&transport.out, pOutput, schan_init_sec_ctx_get_next_buffer);
- pgnutls_transport_set_ptr(ctx->session, &transport);
-
- /* Perform the TLS handshake */
- err = pgnutls_handshake(ctx->session);
-
- out_buffers = &transport.out;
- if (out_buffers->current_buffer_idx != -1)
- {
- SecBuffer *buffer = &out_buffers->desc->pBuffers[out_buffers->current_buffer_idx];
- buffer->cbBuffer = out_buffers->offset;
- }
-
- *pfContextAttr = 0;
- if (ctx->req_ctx_attr & ISC_REQ_ALLOCATE_MEMORY)
- *pfContextAttr |= ISC_RET_ALLOCATED_MEMORY;
-
- switch(err)
- {
- case GNUTLS_E_SUCCESS:
- TRACE("Handshake completed\n");
- return SEC_E_OK;
-
- case GNUTLS_E_AGAIN:
- TRACE("Continue...\n");
- return SEC_I_CONTINUE_NEEDED;
-
- case GNUTLS_E_WARNING_ALERT_RECEIVED:
- case GNUTLS_E_FATAL_ALERT_RECEIVED:
- {
- gnutls_alert_description_t alert = pgnutls_alert_get(ctx->session);
- const char *alert_name = pgnutls_alert_get_name(alert);
- WARN("ALERT: %d %s\n", alert, alert_name);
- return SEC_E_INTERNAL_ERROR;
- }
-
- default:
- pgnutls_perror(err);
- return SEC_E_INTERNAL_ERROR;
+ ret = SEC_E_INVALID_HANDLE;
}
+ return ret;
}
/***********************************************************************

View File

@@ -0,0 +1,55 @@
http://bugs.gentoo.org/260726
--- wine-1.1.15/tools/winegcc/winegcc.c
+++ wine-1.1.15/tools/winegcc/winegcc.c
@@ -215,10 +215,13 @@
strarray* files;
};
+#undef FORCE_POINTER_SIZE
#ifdef __i386__
static const enum target_cpu build_cpu = CPU_x86;
+#define FORCE_POINTER_SIZE
#elif defined(__x86_64__)
static const enum target_cpu build_cpu = CPU_x86_64;
+#define FORCE_POINTER_SIZE
#elif defined(__sparc__)
static const enum target_cpu build_cpu = CPU_SPARC;
#elif defined(__ALPHA__)
@@ -968,6 +971,9 @@
opts.linker_args = strarray_alloc();
opts.compiler_args = strarray_alloc();
opts.winebuild_args = strarray_alloc();
+#ifdef FORCE_POINTER_SIZE
+ opts.force_pointer_size = sizeof(size_t);
+#endif
/* determine the processor type */
if (strendswith(argv[0], "winecpp")) opts.processor = proc_cpp;
--- wine-1.1.15/tools/winebuild/main.c
+++ wine-1.1.15/tools/winebuild/main.c
@@ -50,10 +50,13 @@
int link_ext_symbols = 0;
int force_pointer_size = 0;
+#undef FORCE_POINTER_SIZE
#ifdef __i386__
enum target_cpu target_cpu = CPU_x86;
+#define FORCE_POINTER_SIZE
#elif defined(__x86_64__)
enum target_cpu target_cpu = CPU_x86_64;
+#define FORCE_POINTER_SIZE
#elif defined(__sparc__)
enum target_cpu target_cpu = CPU_SPARC;
#elif defined(__ALPHA__)
@@ -574,6 +577,10 @@
signal( SIGTERM, exit_on_signal );
signal( SIGINT, exit_on_signal );
+#ifdef FORCE_POINTER_SIZE
+ force_pointer_size = sizeof(size_t);
+#endif
+
output_file = stdout;
argv = parse_options( argc, argv, spec );