2 * Unix interface for Win32 syscalls
4 * Copyright (C) 2021 Alexandre Julliard
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
28 #define WIN32_NO_STATUS
31 #include "ntgdi_private.h"
32 #include "ntuser_private.h"
34 #include "wine/unixlib.h"
35 #include "win32syscalls.h"
37 ULONG_PTR zero_bits
= 0;
39 static ULONG_PTR syscalls
[] =
41 #define SYSCALL_ENTRY(id,name,args) (ULONG_PTR)name,
50 static BYTE arguments
[ARRAY_SIZE(syscalls
)] =
52 #define SYSCALL_ENTRY(id,name,args) args,
61 static NTSTATUS
init( void *args
)
64 if (NtCurrentTeb()->WowTebOffset
)
66 SYSTEM_BASIC_INFORMATION info
;
68 NtQuerySystemInformation(SystemEmulationBasicInformation
, &info
, sizeof(info
), NULL
);
69 zero_bits
= (ULONG_PTR
)info
.HighestUserAddress
| 0x7fffffff;
72 KeAddSystemServiceTable( syscalls
, NULL
, ARRAY_SIZE(syscalls
), arguments
, 1 );
73 return STATUS_SUCCESS
;
76 const unixlib_entry_t __wine_unix_call_funcs
[] =