Commit 475b7d22 authored by Alexandre Julliard's avatar Alexandre Julliard

kernel32: Make krnl386.exe into a stand-alone 16-bit module.

parent 89df78e2
......@@ -58,7 +58,6 @@ dlls/kernel32/nls/winerr_nld.mc.rc
dlls/kernel32/nls/winerr_nor.mc.rc
dlls/kernel32/nls/winerr_plk.mc.rc
dlls/kernel32/nls/winerr_ptg.mc.rc
dlls/krnl386.exe16
dlls/libd3dx9.def
dlls/libwinspool.def
dlls/libxinput.def
......
......@@ -15122,6 +15122,14 @@ dlls/keyboard.drv16/Makefile: dlls/keyboard.drv16/Makefile.in dlls/Makedll.rules
ac_config_files="$ac_config_files dlls/keyboard.drv16/Makefile"
ALL_MAKEFILES="$ALL_MAKEFILES \\
dlls/krnl386.exe16/Makefile"
test "x$enable_win16" != xno && ALL_DLL_DIRS="$ALL_DLL_DIRS \\
krnl386.exe16"
ALL_MAKEFILE_DEPENDS="$ALL_MAKEFILE_DEPENDS
dlls/krnl386.exe16/Makefile: dlls/krnl386.exe16/Makefile.in dlls/Makedll.rules"
ac_config_files="$ac_config_files dlls/krnl386.exe16/Makefile"
ALL_MAKEFILES="$ALL_MAKEFILES \\
dlls/loadperf/Makefile"
test "x$enable_loadperf" != xno && ALL_DLL_DIRS="$ALL_DLL_DIRS \\
loadperf"
......@@ -18924,6 +18932,7 @@ do
"dlls/kernel32/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/kernel32/Makefile" ;;
"dlls/kernel32/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/kernel32/tests/Makefile" ;;
"dlls/keyboard.drv16/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/keyboard.drv16/Makefile" ;;
"dlls/krnl386.exe16/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/krnl386.exe16/Makefile" ;;
"dlls/loadperf/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/loadperf/Makefile" ;;
"dlls/localspl/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/localspl/Makefile" ;;
"dlls/localspl/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/localspl/tests/Makefile" ;;
......
......@@ -2305,6 +2305,7 @@ WINE_CONFIG_MAKEFILE([dlls/jscript/tests/Makefile],[dlls/Maketest.rules],[dlls],
WINE_CONFIG_MAKEFILE([dlls/kernel32/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
WINE_CONFIG_MAKEFILE([dlls/kernel32/tests/Makefile],[dlls/Maketest.rules],[dlls],[ALL_TEST_DIRS],[enable_tests])
WINE_CONFIG_MAKEFILE([dlls/keyboard.drv16/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS],[enable_win16])
WINE_CONFIG_MAKEFILE([dlls/krnl386.exe16/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS],[enable_win16])
WINE_CONFIG_MAKEFILE([dlls/loadperf/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
WINE_CONFIG_MAKEFILE([dlls/localspl/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
WINE_CONFIG_MAKEFILE([dlls/localspl/tests/Makefile],[dlls/Maketest.rules],[dlls],[ALL_TEST_DIRS],[enable_tests])
......
......@@ -18,7 +18,6 @@ DOCSUBDIRS = $(DLLSUBDIRS)
# 16-bit dlls
WIN16_FILES = \
krnl386.exe16 \
wprocs.dll16
@MAKE_RULES@
......@@ -29,9 +28,6 @@ all: $(BUILDSUBDIRS) @WIN16_FILES@
# Placeholders for 16-bit libraries
krnl386.exe16:
echo "kernel32.dll" >$@
wprocs.dll16:
echo "winedos.dll" >$@
......
......@@ -9,8 +9,6 @@ IMPORTS = ntdll
EXTRALIBS = @COREFOUNDATIONLIB@ @LIBPOLL@
EXTRADLLFLAGS = -Wb,-F,KERNEL32.dll -Wl,--image-base,0x7b800000
SPEC_SRCS16 = krnl386.exe.spec
C_SRCS = \
actctx.c \
atom.c \
......@@ -20,64 +18,38 @@ C_SRCS = \
console.c \
cpu.c \
debugger.c \
dosmem.c \
editline.c \
environ.c \
except.c \
fiber.c \
file.c \
file16.c \
format_msg.c \
global16.c \
heap.c \
instr.c \
kernel_main.c \
lcformat.c \
local16.c \
locale.c \
lzexpand.c \
module.c \
ne_module.c \
ne_segment.c \
oldconfig.c \
path.c \
powermgnt.c \
process.c \
profile.c \
relay16.c \
resource.c \
resource16.c \
selector.c \
snoop16.c \
string.c \
sync.c \
syslevel.c \
tape.c \
task.c \
thread.c \
thunk.c \
time.c \
toolhelp.c \
utthunk.c \
version.c \
virtual.c \
volume.c \
vxd.c \
wowthunk.c
C_SRCS16 = \
atom16.c \
error16.c \
kernel16.c \
registry16.c
volume.c
RC_SRCS = \
locale_rc.rc \
version.rc
RC_SRCS16 = \
version16.rc
MC_SRCS = \
nls/winerr_deu.mc \
nls/winerr_enu.mc \
......@@ -90,20 +62,8 @@ MC_SRCS = \
nls/winerr_plk.mc \
nls/winerr_ptg.mc
EXTRA_OBJS = relay16asm.o
EXTRASUBDIRS = nls
@MAKE_DLL_RULES@
relay16asm.o: $(WINEBUILD)
$(WINEBUILD) $(WINEBUILDFLAGS) -o $@ --relay16
# Special rules for 16-bit resource and spec files
krnl386.exe.spec.o: krnl386.exe.spec version16.res
$(WINEBUILD) $(WINEBUILDFLAGS) --dll -o $@ --dll-name kernel --main-module $(MODULE) --res version16.res --export $(SRCDIR)/krnl386.exe.spec
version16.res: version16.rc
$(LDPATH) $(RC16) $(RC16FLAGS) -fo$@ $(SRCDIR)/version16.rc
@DEPENDENCIES@ # everything below this line is overwritten by make depend
......@@ -40,7 +40,6 @@
#include "winternl.h"
#include "winioctl.h"
#include "wincon.h"
#include "wine/winbase16.h"
#include "kernel_private.h"
#include "wine/exception.h"
......@@ -1363,7 +1362,13 @@ HANDLE WINAPI CreateFileW( LPCWSTR filename, DWORD access, DWORD sharing,
options, NULL, 0 );
if (status)
{
if (vxd_name && vxd_name[0] && (ret = VXD_Open( vxd_name, access, sa ))) goto done;
if (vxd_name && vxd_name[0])
{
static HANDLE (*vxd_open)(LPCWSTR,DWORD,SECURITY_ATTRIBUTES*);
if (!vxd_open) vxd_open = (void *)GetProcAddress( GetModuleHandleA("krnl386.exe16"),
"__wine_vxd_open" );
if (vxd_open && (ret = vxd_open( vxd_name, access, sa ))) goto done;
}
WARN("Unable to create file %s (status %x)\n", debugstr_w(filename), status);
ret = INVALID_HANDLE_VALUE;
......@@ -2345,7 +2350,13 @@ BOOL WINAPI DeviceIoControl(HANDLE hDevice, DWORD dwIoControlCode,
if (HIWORD( dwIoControlCode ) == 0 && (GetVersion() & 0x80000000))
{
DeviceIoProc proc = VXD_get_proc( hDevice );
typedef BOOL (WINAPI *DeviceIoProc)(DWORD, LPVOID, DWORD, LPVOID, DWORD, LPDWORD, LPOVERLAPPED);
static DeviceIoProc (*vxd_get_proc)(HANDLE);
DeviceIoProc proc = NULL;
if (!vxd_get_proc) vxd_get_proc = (void *)GetProcAddress( GetModuleHandleA("krnl386.exe16"),
"__wine_vxd_get_proc" );
if (vxd_get_proc) proc = vxd_get_proc( hDevice );
if (proc) return proc( dwIoControlCode, lpvInBuffer, cbInBuffer,
lpvOutBuffer, cbOutBuffer, lpcbBytesReturned, lpOverlapped );
}
......
......@@ -33,10 +33,8 @@
#include "winternl.h"
#include "wownt32.h"
#include "wine/winbase16.h"
#include "wine/library.h"
#include "kernel_private.h"
#include "kernel16_private.h"
#include "console_private.h"
#include "wine/debug.h"
......@@ -47,32 +45,6 @@ extern int CDECL __wine_set_signal_handler(unsigned, int (*)(unsigned));
static ULONGLONG server_start_time;
/***********************************************************************
* KERNEL thread initialisation routine
*/
static void thread_attach(void)
{
/* allocate the 16-bit stack (FIXME: should be done lazily) */
HGLOBAL16 hstack = WOWGlobalAlloc16( GMEM_FIXED, 0x10000 );
kernel_get_thread_data()->stack_sel = GlobalHandleToSel16( hstack );
NtCurrentTeb()->WOW32Reserved = (void *)MAKESEGPTR( kernel_get_thread_data()->stack_sel,
0x10000 - sizeof(STACK16FRAME) );
memset( (char *)GlobalLock16(hstack) + 0x10000 - sizeof(STACK16FRAME), 0, sizeof(STACK16FRAME) );
}
/***********************************************************************
* KERNEL thread finalisation routine
*/
static void thread_detach(void)
{
/* free the 16-bit stack */
WOWGlobalFree16( kernel_get_thread_data()->stack_sel );
NtCurrentTeb()->WOW32Reserved = 0;
if (NtCurrentTeb()->Tib.SubSystemTib) TASK_ExitTask();
}
/***********************************************************************
* set_entry_point
*/
static void set_entry_point( HMODULE module, const char *name, DWORD rva )
......@@ -156,8 +128,6 @@ static BOOL process_attach( HMODULE module )
{
/* create the shared heap for broken win95 native dlls */
HeapCreate( HEAP_SHARED, 0, 0 );
/* setup emulation of protected instructions from 32-bit code */
RtlAddVectoredExceptionHandler( TRUE, INSTR_vectored_handler );
}
#endif
......@@ -176,10 +146,7 @@ static BOOL process_attach( HMODULE module )
* TBD when not using wineserver handles for console handles
*/
/* Create 16-bit task */
LoadLibrary16( "krnl386.exe" );
thread_attach();
TASK_CreateMainTask();
LoadLibraryA( "krnl386.exe16" );
return TRUE;
}
......@@ -191,13 +158,8 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
switch(reason)
{
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls( hinst );
return process_attach( hinst );
case DLL_THREAD_ATTACH:
thread_attach();
break;
case DLL_THREAD_DETACH:
thread_detach();
break;
case DLL_PROCESS_DETACH:
WritePrivateProfileSectionW( NULL, NULL, NULL );
break;
......
......@@ -85,11 +85,6 @@ extern void MODULE_get_binary_info( HANDLE hfile, struct binary_info *info );
extern BOOL NLS_IsUnicodeOnlyLcid(LCID);
/* vxd.c */
typedef BOOL (WINAPI *DeviceIoProc)(DWORD, LPVOID, DWORD, LPVOID, DWORD, LPDWORD, LPOVERLAPPED);
extern DeviceIoProc VXD_get_proc( HANDLE handle );
extern HANDLE VXD_Open( LPCWSTR filename, DWORD access, LPSECURITY_ATTRIBUTES sa );
/* environ.c */
extern void ENV_CopyStartupInformation(void);
......
......@@ -1065,3 +1065,28 @@ FARPROC WINAPI DelayLoadFailureHook( LPCSTR name, LPCSTR function )
RaiseException( EXCEPTION_WINE_STUB, EH_NONCONTINUABLE, 2, args );
return NULL;
}
#ifdef __i386__
/***********************************************************************
* __wine_dll_register_16 (KERNEL32.@)
*
* No longer used.
*/
void __wine_dll_register_16( const IMAGE_DOS_HEADER *header, const char *file_name )
{
ERR( "loading old style 16-bit dll %s no longer supported\n", file_name );
}
/***********************************************************************
* __wine_dll_unregister_16 (KERNEL32.@)
*
* No longer used.
*/
void __wine_dll_unregister_16( const IMAGE_DOS_HEADER *header )
{
}
#endif
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = krnl386.exe16
IMPORTS = kernel32 ntdll
EXTRADLLFLAGS = -Wb,--subsystem,win16,--dll-name,kernel
EXTRARCFLAGS = -O res16
C_SRCS = \
atom.c \
dosmem.c \
error.c \
file.c \
global.c \
instr.c \
kernel.c \
local.c \
ne_module.c \
ne_segment.c \
registry.c \
relay.c \
resource.c \
selector.c \
snoop.c \
syslevel.c \
task.c \
thunk.c \
utthunk.c \
vxd.c \
wowthunk.c
RC_SRCS = version.rc
EXTRA_OBJS = relay16asm.o
@MAKE_DLL_RULES@
relay16asm.o: $(WINEBUILD)
$(WINEBUILD) $(WINEBUILDFLAGS) -o $@ --relay16
@DEPENDENCIES@ # everything below this line is overwritten by make depend
......@@ -23,8 +23,6 @@
#include "config.h"
#include "wine/port.h"
#ifdef __i386__
#include <stdarg.h>
#include "windef.h"
......@@ -922,5 +920,3 @@ FARPROC16 WINAPI GetSetKernelDOSProc16( FARPROC16 DosProc )
FIXME("(DosProc=%p): stub\n", DosProc);
return NULL;
}
#endif /* __i386__ */
......@@ -36,6 +36,53 @@ extern DWORD WINAPI GetProcessFlags( DWORD processid );
static DWORD process_dword;
/***********************************************************************
* KERNEL thread initialisation routine
*/
static void thread_attach(void)
{
/* allocate the 16-bit stack (FIXME: should be done lazily) */
HGLOBAL16 hstack = WOWGlobalAlloc16( GMEM_FIXED, 0x10000 );
kernel_get_thread_data()->stack_sel = GlobalHandleToSel16( hstack );
NtCurrentTeb()->WOW32Reserved = (void *)MAKESEGPTR( kernel_get_thread_data()->stack_sel,
0x10000 - sizeof(STACK16FRAME) );
memset( (char *)GlobalLock16(hstack) + 0x10000 - sizeof(STACK16FRAME), 0, sizeof(STACK16FRAME) );
}
/***********************************************************************
* KERNEL thread finalisation routine
*/
static void thread_detach(void)
{
/* free the 16-bit stack */
WOWGlobalFree16( kernel_get_thread_data()->stack_sel );
NtCurrentTeb()->WOW32Reserved = 0;
if (NtCurrentTeb()->Tib.SubSystemTib) TASK_ExitTask();
}
/**************************************************************************
* DllMain
*/
BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
{
switch(reason)
{
case DLL_PROCESS_ATTACH:
LoadLibrary16( "krnl386.exe" );
/* fall through */
case DLL_THREAD_ATTACH:
thread_attach();
break;
case DLL_THREAD_DETACH:
thread_detach();
break;
}
return TRUE;
}
/**************************************************************************
* DllEntryPoint (KERNEL.669)
*/
......@@ -48,6 +95,9 @@ BOOL WINAPI KERNEL_DllEntryPoint( DWORD reasion, HINSTANCE16 inst, WORD ds,
if (done) return TRUE;
done = 1;
/* setup emulation of protected instructions from 32-bit code */
if (GetVersion() & 0x80000000) RtlAddVectoredExceptionHandler( TRUE, INSTR_vectored_handler );
/* Initialize 16-bit thunking entry points */
if (!WOWTHUNK_Init()) return FALSE;
......@@ -68,6 +118,7 @@ BOOL WINAPI KERNEL_DllEntryPoint( DWORD reasion, HINSTANCE16 inst, WORD ds,
/* Initialize KERNEL.THHOOK */
TASK_InstallTHHook(MapSL((SEGPTR)GetProcAddress16( inst, (LPCSTR)332 )));
TASK_CreateMainTask();
/* Initialize the real-mode selector entry points */
#define SET_ENTRY_POINT( num, addr ) \
......
......@@ -290,7 +290,6 @@ static inline struct kernel_thread_data *kernel_get_thread_data(void)
return (struct kernel_thread_data *)NtCurrentTeb()->SystemReserved1;
}
#ifdef __i386__
#define DEFINE_REGS_ENTRYPOINT( name, args ) \
__ASM_GLOBAL_FUNC( name, \
".byte 0x68\n\t" /* pushl $__regs_func */ \
......@@ -298,6 +297,5 @@ static inline struct kernel_thread_data *kernel_get_thread_data(void)
".byte 0x6a," #args "\n\t" /* pushl $args */ \
"call " __ASM_NAME("__wine_call_from_32_regs") "\n\t" \
"ret $(4*" #args ")" ) /* fake ret to make copy protections happy */
#endif
#endif /* __WINE_KERNEL16_PRIVATE_H */
......@@ -527,3 +527,207 @@
# Win95 krnl386.exe also exports ordinals 802-864,
# however, those seem to be only callback stubs that are
# never called directly by other modules ...
################################################################
# 32-bit version of the various 16-bit functions exported by kernel32
#
@ stdcall -arch=win32 -register VxDCall0(long) VxDCall
@ stdcall -arch=win32 -register VxDCall1(long) VxDCall
@ stdcall -arch=win32 -register VxDCall2(long) VxDCall
@ stdcall -arch=win32 -register VxDCall3(long) VxDCall
@ stdcall -arch=win32 -register VxDCall4(long) VxDCall
@ stdcall -arch=win32 -register VxDCall5(long) VxDCall
@ stdcall -arch=win32 -register VxDCall6(long) VxDCall
@ stdcall -arch=win32 -register VxDCall7(long) VxDCall
@ stdcall -arch=win32 -register VxDCall8(long) VxDCall
@ stdcall -arch=win32 k32CharToOemA(str ptr)
@ stdcall -arch=win32 k32CharToOemBuffA(str ptr long)
@ stdcall -arch=win32 k32OemToCharA(ptr ptr)
@ stdcall -arch=win32 k32OemToCharBuffA(ptr ptr long)
@ stdcall -arch=win32 k32LoadStringA(long long ptr long)
@ varargs -arch=win32 k32wsprintfA(str str)
@ stdcall -arch=win32 k32wvsprintfA(ptr str ptr)
@ stdcall -arch=win32 -register CommonUnimpStub()
@ stdcall -arch=win32 GetProcessDword16(long long)
@ stdcall -arch=win32 DosFileHandleToWin32Handle(long)
@ stdcall -arch=win32 Win32HandleToDosFileHandle(long)
@ stdcall -arch=win32 DisposeLZ32Handle(long)
@ stdcall -arch=win32 GlobalAlloc16(long long)
@ stdcall -arch=win32 GlobalLock16(long)
@ stdcall -arch=win32 GlobalUnlock16(long)
@ stdcall -arch=win32 GlobalFix16(long)
@ stdcall -arch=win32 GlobalUnfix16(long)
@ stdcall -arch=win32 GlobalWire16(long)
@ stdcall -arch=win32 GlobalUnWire16(long)
@ stdcall -arch=win32 GlobalFree16(long)
@ stdcall -arch=win32 GlobalSize16(long)
@ stdcall -arch=win32 HouseCleanLogicallyDeadHandles()
@ stdcall -arch=win32 GetWin16DOSEnv()
@ stdcall -arch=win32 LoadLibrary16(str)
@ stdcall -arch=win32 FreeLibrary16(long)
@ stdcall -arch=win32 GetProcAddress16(long str) WIN32_GetProcAddress16
@ stdcall -arch=win32 -register AllocMappedBuffer()
@ stdcall -arch=win32 -register FreeMappedBuffer()
@ stdcall -arch=win32 -register OT_32ThkLSF()
@ stdcall -arch=win32 ThunkInitLSF(long str long str str)
@ stdcall -arch=win32 -register LogApiThkLSF(str)
@ stdcall -arch=win32 ThunkInitLS(long str long str str)
@ stdcall -arch=win32 -register LogApiThkSL(str)
@ stdcall -arch=win32 -register Common32ThkLS()
@ stdcall -arch=win32 ThunkInitSL(long str long str str)
@ stdcall -arch=win32 -register LogCBThkSL(str)
@ stdcall -arch=win32 ReleaseThunkLock(ptr)
@ stdcall -arch=win32 RestoreThunkLock(long)
@ stdcall -arch=win32 -register W32S_BackTo32()
@ stdcall -arch=win32 GetThunkBuff()
@ stdcall -arch=win32 GetThunkStuff(str str)
@ stdcall -arch=win32 K32WOWCallback16(long long)
@ stdcall -arch=win32 K32WOWCallback16Ex(ptr long long ptr ptr)
@ stdcall -arch=win32 K32WOWGetVDMPointer(long long long)
@ stdcall -arch=win32 K32WOWHandle32(long long)
@ stdcall -arch=win32 K32WOWHandle16(long long)
@ stdcall -arch=win32 K32WOWGlobalAlloc16(long long)
@ stdcall -arch=win32 K32WOWGlobalLock16(long)
@ stdcall -arch=win32 K32WOWGlobalUnlock16(long)
@ stdcall -arch=win32 K32WOWGlobalFree16(long)
@ stdcall -arch=win32 K32WOWGlobalAllocLock16(long long ptr)
@ stdcall -arch=win32 K32WOWGlobalUnlockFree16(long)
@ stdcall -arch=win32 K32WOWGlobalLockSize16(long ptr)
@ stdcall -arch=win32 K32WOWYield16()
@ stdcall -arch=win32 K32WOWDirectedYield16(long)
@ stdcall -arch=win32 K32WOWGetVDMPointerFix(long long long)
@ stdcall -arch=win32 K32WOWGetVDMPointerUnfix(long)
@ stdcall -arch=win32 K32WOWGetDescriptor(long long)
@ stdcall -arch=win32 _KERNEL32_86(ptr)
@ stdcall -arch=win32 SSOnBigStack()
@ varargs -arch=win32 SSCall(long long ptr)
@ stdcall -arch=win32 -register FT_PrologPrime()
@ stdcall -arch=win32 -register QT_ThunkPrime()
@ stdcall -arch=win32 PK16FNF(ptr)
@ stdcall -arch=win32 GetPK16SysVar()
@ stdcall -arch=win32 GetpWin16Lock(ptr)
@ stdcall -arch=win32 _CheckNotSysLevel(ptr)
@ stdcall -arch=win32 _ConfirmSysLevel(ptr)
@ stdcall -arch=win32 _ConfirmWin16Lock()
@ stdcall -arch=win32 _EnterSysLevel(ptr)
@ stdcall -arch=win32 _LeaveSysLevel(ptr)
@ stdcall -arch=win32 _KERNEL32_99(long)
@ stdcall -arch=win32 _KERNEL32_100(long long long)
@ stdcall -arch=win32 AllocSLCallback(ptr ptr)
@ stdcall -arch=win32 -norelay FT_Exit0()
@ stdcall -arch=win32 -norelay FT_Exit12()
@ stdcall -arch=win32 -norelay FT_Exit16()
@ stdcall -arch=win32 -norelay FT_Exit20()
@ stdcall -arch=win32 -norelay FT_Exit24()
@ stdcall -arch=win32 -norelay FT_Exit28()
@ stdcall -arch=win32 -norelay FT_Exit32()
@ stdcall -arch=win32 -norelay FT_Exit36()
@ stdcall -arch=win32 -norelay FT_Exit40()
@ stdcall -arch=win32 -norelay FT_Exit44()
@ stdcall -arch=win32 -norelay FT_Exit48()
@ stdcall -arch=win32 -norelay FT_Exit4()
@ stdcall -arch=win32 -norelay FT_Exit52()
@ stdcall -arch=win32 -norelay FT_Exit56()
@ stdcall -arch=win32 -norelay FT_Exit8()
@ stdcall -arch=win32 -register FT_Prolog()
@ stdcall -arch=win32 -register FT_Thunk()
@ stdcall -arch=win32 FreeSLCallback(long)
@ stdcall -arch=win32 Get16DLLAddress(long str)
@ stdcall -arch=win32 -register K32Thk1632Epilog()
@ stdcall -arch=win32 -register K32Thk1632Prolog()
@ stdcall -arch=win32 -norelay MapHInstLS()
@ stdcall -arch=win32 -norelay MapHInstLS_PN()
@ stdcall -arch=win32 -norelay MapHInstSL()
@ stdcall -arch=win32 -norelay MapHInstSL_PN()
@ stdcall -arch=win32 MapHModuleLS(long)
@ stdcall -arch=win32 MapHModuleSL(long)
@ stdcall -arch=win32 MapLS(ptr)
@ stdcall -arch=win32 MapSL(long)
@ stdcall -arch=win32 MapSLFix(long)
@ stdcall -arch=win32 PrivateFreeLibrary(long)
@ stdcall -arch=win32 PrivateLoadLibrary(str)
@ stdcall -arch=win32 -register QT_Thunk()
@ stdcall -arch=win32 -norelay SMapLS()
@ stdcall -arch=win32 -norelay SMapLS_IP_EBP_12()
@ stdcall -arch=win32 -norelay SMapLS_IP_EBP_16()
@ stdcall -arch=win32 -norelay SMapLS_IP_EBP_20()
@ stdcall -arch=win32 -norelay SMapLS_IP_EBP_24()
@ stdcall -arch=win32 -norelay SMapLS_IP_EBP_28()
@ stdcall -arch=win32 -norelay SMapLS_IP_EBP_32()
@ stdcall -arch=win32 -norelay SMapLS_IP_EBP_36()
@ stdcall -arch=win32 -norelay SMapLS_IP_EBP_40()
@ stdcall -arch=win32 -norelay SMapLS_IP_EBP_8()
@ stdcall -arch=win32 -norelay SUnMapLS()
@ stdcall -arch=win32 -norelay SUnMapLS_IP_EBP_12()
@ stdcall -arch=win32 -norelay SUnMapLS_IP_EBP_16()
@ stdcall -arch=win32 -norelay SUnMapLS_IP_EBP_20()
@ stdcall -arch=win32 -norelay SUnMapLS_IP_EBP_24()
@ stdcall -arch=win32 -norelay SUnMapLS_IP_EBP_28()
@ stdcall -arch=win32 -norelay SUnMapLS_IP_EBP_32()
@ stdcall -arch=win32 -norelay SUnMapLS_IP_EBP_36()
@ stdcall -arch=win32 -norelay SUnMapLS_IP_EBP_40()
@ stdcall -arch=win32 -norelay SUnMapLS_IP_EBP_8()
@ stdcall -arch=win32 ThunkConnect32(ptr str str str ptr ptr)
@ stdcall -arch=win32 UTRegister(long str str str ptr ptr ptr)
@ stdcall -arch=win32 UTUnRegister(long)
@ stdcall -arch=win32 UnMapLS(long)
@ stdcall -arch=win32 -norelay UnMapSLFixArray(long long)
@ stdcall -arch=win32 _lclose16(long)
################################################################
# 16-bit symbols not available from kernel32 but used by other 16-bit dlls
#
@ stdcall -arch=win32 AllocCStoDSAlias16(long)
@ stdcall -arch=win32 AllocSelectorArray16(long)
@ stdcall -arch=win32 ConvertDialog32To16(ptr long ptr)
@ stdcall -arch=win32 FarGetOwner16(long)
@ stdcall -arch=win32 FarSetOwner16(long long)
@ stdcall -arch=win32 FindResource16(long str str)
@ stdcall -arch=win32 FreeResource16(long)
@ stdcall -arch=win32 FreeSelector16(long)
@ stdcall -arch=win32 GetCurrentPDB16()
@ stdcall -arch=win32 GetCurrentTask()
@ stdcall -arch=win32 GetDOSEnvironment16()
@ stdcall -arch=win32 GetExePtr(long)
@ stdcall -arch=win32 GetExpWinVer16(long)
@ stdcall -arch=win32 GetModuleHandle16(str)
@ stdcall -arch=win32 GetSelectorLimit16(long)
@ stdcall -arch=win32 GlobalDOSAlloc16(long)
@ stdcall -arch=win32 GlobalDOSFree16(long)
@ stdcall -arch=win32 GlobalFlags16(long)
@ stdcall -arch=win32 GlobalReAlloc16(long long long)
@ stdcall -arch=win32 InitTask16(ptr)
@ stdcall -arch=win32 IsBadReadPtr16(long long)
@ stdcall -arch=win32 IsTask16(long)
@ stdcall -arch=win32 LoadModule16(str long)
@ stdcall -arch=win32 LoadResource16(long long)
@ stdcall -arch=win32 LocalAlloc16(long long)
@ stdcall -arch=win32 LocalInit16(long long long)
@ stdcall -arch=win32 LocalLock16(long)
@ stdcall -arch=win32 LocalUnlock16(long)
@ stdcall -arch=win32 LocalReAlloc16(long long long)
@ stdcall -arch=win32 LocalFree16(long)
@ stdcall -arch=win32 LocalSize16(long)
@ stdcall -arch=win32 LocalCompact16(long)
@ stdcall -arch=win32 LocalCountFree16()
@ stdcall -arch=win32 LocalHeapSize16()
@ stdcall -arch=win32 LockResource16(long)
@ stdcall -arch=win32 SelectorAccessRights16(long long long)
@ stdcall -arch=win32 SetSelectorBase(long long)
@ stdcall -arch=win32 SetSelectorLimit16(long long)
@ stdcall -arch=win32 SizeofResource16(long long)
@ stdcall -arch=win32 WinExec16(str long)
################################################################
# Wine internal extensions
#
# All functions must be prefixed with '__wine_' (for internal functions)
# or 'wine_' (for user-visible functions) to avoid namespace conflicts.
# 16-bit relays
@ cdecl -arch=win32 -private __wine_emulate_instruction(ptr ptr)
# VxDs
@ cdecl -arch=win32 -private __wine_vxd_open(wstr long ptr)
@ cdecl -arch=win32 -private __wine_vxd_get_proc(long)
......@@ -90,7 +90,6 @@ static HMODULE16 NE_GetModuleByFilename( LPCSTR name );
/* patch all the flat cs references of the code segment if necessary */
static inline void patch_code_segment( NE_MODULE *pModule )
{
#ifdef __i386__
int i;
CALLFROM16 *call;
SEGTABLEENTRY *pSeg = NE_SEG_TABLE( pModule );
......@@ -112,7 +111,6 @@ static inline void patch_code_segment( NE_MODULE *pModule )
if (TRACE_ON(relay)) /* patch relay functions to all point to relay_call_from_16 */
for (i = 0; call[i].pushl == 0x68; i++) call[i].relay = relay_call_from_16;
#endif
}
......@@ -2168,8 +2166,6 @@ void WINAPI MapHInstSL16( CONTEXT86 *context )
context->Eax = (DWORD)MapHModuleSL( context->Eax );
}
#ifdef __i386__
/***************************************************************************
* MapHInstLS (KERNEL32.@)
*/
......@@ -2205,5 +2201,3 @@ __ASM_STDCALL_FUNC( MapHInstSL_PN, 0,
"pushl %eax\n\t"
"call " __ASM_NAME("MapHModuleSL") __ASM_STDCALL(4) "\n"
"1:\tret" )
#endif /* __i386__ */
......@@ -89,11 +89,9 @@ WORD WINAPI FreeSelector16( WORD sel )
wine_ldt_get_entry( sel, &entry );
if (wine_ldt_is_empty( &entry )) return sel; /* error */
#ifdef __i386__
/* Check if we are freeing current %fs selector */
if (!((wine_get_fs() ^ sel) & ~3))
WARN("Freeing %%fs selector (%04x), not good.\n", wine_get_fs() );
#endif /* __i386__ */
wine_ldt_free_entries( sel, 1 );
return 0;
}
......@@ -523,7 +521,6 @@ LPVOID WINAPI MapSLFix( SEGPTR sptr )
return MapSL(sptr);
}
#ifdef __i386__
/***********************************************************************
* UnMapSLFixArray (KERNEL32.@)
......@@ -618,5 +615,3 @@ DEFINE_SUnMapLS(28)
DEFINE_SUnMapLS(32)
DEFINE_SUnMapLS(36)
DEFINE_SUnMapLS(40)
#endif /* __i386__ */
......@@ -36,8 +36,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(snoop);
#ifdef __i386__
#include "pshpack1.h"
static void WINAPI SNOOP16_Entry(FARPROC proc, LPBYTE args, CONTEXT86 *context);
......@@ -343,13 +341,3 @@ static void WINAPI SNOOP16_Return(FARPROC proc, LPBYTE args, CONTEXT86 *context)
HIWORD(ret->origreturn),LOWORD(ret->origreturn));
ret->origreturn = NULL; /* mark as empty */
}
#else /* !__i386__ */
void SNOOP16_RegisterDLL(HMODULE16 hModule,LPCSTR name) {
if (!TRACE_ON(snoop)) return;
FIXME("snooping works only on i386 for now.\n");
}
FARPROC16 SNOOP16_GetProcAddress16(HMODULE16 hmod,DWORD ordinal,FARPROC16 origfun) {
return origfun;
}
#endif /* !__i386__ */
......@@ -108,9 +108,7 @@ VOID WINAPI _EnterSysLevel(SYSLEVEL *lock)
TRACE("(%p, level %d): thread %x count after %d\n",
lock, lock->level, GetCurrentThreadId(), thread_data->sys_count[lock->level] );
#ifdef __i386__
if (lock == &Win16Mutex) CallTo16_TebSelector = wine_get_fs();
#endif
}
/************************************************************************
......
......@@ -31,8 +31,6 @@
# include <unistd.h>
#endif
#ifdef __i386__
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
......@@ -2538,5 +2536,3 @@ DWORD WINAPIV WOW16Call(WORD x, WORD y, WORD z, VA_LIST16 args)
DPRINTF(") calling address was 0x%08x\n",calladdr);
return 0;
}
#endif /* __i386__ */
......@@ -18,8 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifdef __i386__
#include <stdarg.h>
#include "wine/winbase16.h"
......@@ -325,5 +323,3 @@ WORD WINAPI UTInit16( DWORD x1, DWORD x2, DWORD x3, DWORD x4 )
FIXME("(%08x, %08x, %08x, %08x): stub\n", x1, x2, x3, x4 );
return 0;
}
#endif /* __i386__ */
......@@ -134,7 +134,7 @@ static HANDLE open_vxd_handle( LPCWSTR name )
}
/* retrieve the DeviceIoControl function for a Vxd given a file handle */
DeviceIoProc VXD_get_proc( HANDLE handle )
DeviceIoProc __wine_vxd_get_proc( HANDLE handle )
{
DeviceIoProc ret = NULL;
int status, i;
......@@ -171,7 +171,7 @@ done:
/* load a VxD and return a file handle to it */
HANDLE VXD_Open( LPCWSTR filenameW, DWORD access, SECURITY_ATTRIBUTES *sa )
HANDLE __wine_vxd_open( LPCWSTR filenameW, DWORD access, SECURITY_ATTRIBUTES *sa )
{
static const WCHAR dotVxDW[] = {'.','v','x','d',0};
int i;
......@@ -179,12 +179,6 @@ HANDLE VXD_Open( LPCWSTR filenameW, DWORD access, SECURITY_ATTRIBUTES *sa )
HMODULE module;
WCHAR *p, name[16];
if (!(GetVersion() & 0x80000000)) /* there are no VxDs on NT */
{
SetLastError( ERROR_FILE_NOT_FOUND );
return 0;
}
/* normalize the filename */
if (strlenW( filenameW ) >= sizeof(name)/sizeof(WCHAR) - 4 ||
......
......@@ -37,9 +37,6 @@
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(thunk);
#ifdef __i386__
WINE_DECLARE_DEBUG_CHANNEL(relay);
WINE_DECLARE_DEBUG_CHANNEL(snoop);
......@@ -301,16 +298,6 @@ static DWORD vm86_handler( EXCEPTION_RECORD *record, EXCEPTION_REGISTRATION_RECO
}
#else /* __i386__ */
BOOL WOWTHUNK_Init(void)
{
return TRUE;
}
#endif /* __i386__ */
/*
* 32-bit WOW routines (in WOW32, but actually forwarded to KERNEL32)
*/
......@@ -535,7 +522,6 @@ WORD WINAPI K32WOWHandle16( HANDLE handle, WOW_HANDLE_TYPE type )
BOOL WINAPI K32WOWCallback16Ex( DWORD vpfn16, DWORD dwFlags,
DWORD cbArgs, LPVOID pArgs, LPDWORD pdwRetCode )
{
#ifdef __i386__
/*
* Arguments must be prepared in the correct order by the caller
* (both for PASCAL and CDECL calling convention), so we simply
......@@ -674,9 +660,6 @@ BOOL WINAPI K32WOWCallback16Ex( DWORD vpfn16, DWORD dwFlags,
SYSLEVEL_CheckNotLevel( 2 );
}
}
#else
assert(0); /* cannot call to 16-bit on non-Intel architectures */
#endif /* __i386__ */
return TRUE; /* success */
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment