Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
6044307c
Commit
6044307c
authored
May 17, 2002
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A few fixes for mingw cross-compilation.
parent
0aa28b5b
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
76 additions
and
82 deletions
+76
-82
Makedll.rules.in
dlls/Makedll.rules.in
+1
-1
filedlg95.c
dlls/commdlg/filedlg95.c
+2
-2
stress.c
dlls/kernel/stress.c
+1
-7
wnet.c
dlls/mpr/wnet.c
+2
-24
network.c
dlls/user/network.c
+0
-1
x11drv_main.c
dlls/x11drv/x11drv_main.c
+3
-3
winbase.h
include/winbase.h
+10
-31
port.c
library/port.c
+2
-0
environ.c
memory/environ.c
+10
-11
heap.c
memory/heap.c
+42
-0
sysdeps.c
scheduler/sysdeps.c
+0
-1
device.c
win32/device.c
+3
-1
No files found.
dlls/Makedll.rules.in
View file @
6044307c
...
...
@@ -16,7 +16,7 @@ MAINSPEC = $(MODULE:%.dll=%).spec
SPEC_DEF = $(MAINSPEC).def
ALL_OBJS = $(MAINSPEC).o $(SPEC_SRCS:.spec=.spec.o) $(OBJS) $(MODULE).dbg.o
ALL_LIBS = $(LIBWINE) $(EXTRALIBS) $(LIBS)
TESTIMPORTS = $(MODULE) $(DELAYIMPORTS) $(IMPORTS)
TESTIMPORTS = $(MODULE
:%.dll=%
) $(DELAYIMPORTS) $(IMPORTS)
all: $(MODULE)$(DLLEXT)
...
...
dlls/commdlg/filedlg95.c
View file @
6044307c
...
...
@@ -1815,7 +1815,7 @@ static HRESULT FILEDLG95_FILETYPE_Init(HWND hwnd)
if
(
lpstrFilter
)
{
DWORD
len
;
_strlwr
(
lpstrFilter
);
/* lowercase */
CharLowerA
(
lpstrFilter
);
/* lowercase */
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
lpstrFilter
,
-
1
,
NULL
,
0
);
fodInfos
->
ShellInfos
.
lpstrCurrentFilter
=
MemAlloc
(
len
*
sizeof
(
WCHAR
)
);
MultiByteToWideChar
(
CP_ACP
,
0
,
lpstrFilter
,
-
1
,
...
...
@@ -1856,7 +1856,7 @@ static BOOL FILEDLG95_FILETYPE_OnCommand(HWND hwnd, WORD wNotifyCode)
if
((
int
)
lpstrFilter
!=
CB_ERR
)
{
DWORD
len
;
_strlwr
(
lpstrFilter
);
/* lowercase */
CharLowerA
(
lpstrFilter
);
/* lowercase */
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
lpstrFilter
,
-
1
,
NULL
,
0
);
fodInfos
->
ShellInfos
.
lpstrCurrentFilter
=
MemAlloc
(
len
*
sizeof
(
WCHAR
)
);
MultiByteToWideChar
(
CP_ACP
,
0
,
lpstrFilter
,
-
1
,
...
...
dlls/kernel/stress.c
View file @
6044307c
...
...
@@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <limits.h>
#include "windef.h"
#include "wine/windef16.h"
#include "wine/debug.h"
...
...
@@ -107,12 +106,7 @@ void WINAPI FreeAllUserMem(void)
INT16
WINAPI
GetFreeFileHandles
(
void
)
{
TRACE
(
"GetFreeFileHandles
\n
"
);
#ifndef OPEN_MAX
return
_POSIX_OPEN_MAX
;
#else
return
OPEN_MAX
;
#endif
return
256
;
/* can't have more than 256 16-bit handles */
}
/***********************************************************************
...
...
dlls/mpr/wnet.c
View file @
6044307c
...
...
@@ -21,7 +21,6 @@
#include <ctype.h>
#include <string.h>
#include <sys/types.h>
#include <pwd.h>
#include <unistd.h>
#include "winbase.h"
...
...
@@ -468,29 +467,8 @@ DWORD WINAPI WNetGetUniversalNameW ( LPCWSTR lpLocalPath, DWORD dwInfoLevel,
*/
DWORD
WINAPI
WNetGetUserA
(
LPCSTR
lpName
,
LPSTR
lpUserID
,
LPDWORD
lpBufferSize
)
{
struct
passwd
*
pwd
=
getpwuid
(
getuid
());
FIXME
(
"(%s, %p, %p): mostly stub
\n
"
,
debugstr_a
(
lpName
),
lpUserID
,
lpBufferSize
);
if
(
pwd
)
{
if
(
strlen
(
pwd
->
pw_name
)
+
1
>
*
lpBufferSize
)
{
*
lpBufferSize
=
strlen
(
pwd
->
pw_name
)
+
1
;
SetLastError
(
ERROR_MORE_DATA
);
return
ERROR_MORE_DATA
;
}
strcpy
(
lpUserID
,
pwd
->
pw_name
);
*
lpBufferSize
=
strlen
(
pwd
->
pw_name
)
+
1
;
return
WN_SUCCESS
;
}
/* FIXME: wrong return value */
SetLastError
(
ERROR_NO_NETWORK
);
return
ERROR_NO_NETWORK
;
if
(
GetUserNameA
(
lpUserID
,
lpBufferSize
))
return
WN_SUCCESS
;
return
GetLastError
();
}
/*****************************************************************
...
...
dlls/user/network.c
View file @
6044307c
...
...
@@ -21,7 +21,6 @@
#include <ctype.h>
#include <string.h>
#include <sys/types.h>
#include <pwd.h>
#include <unistd.h>
#include "winbase.h"
...
...
dlls/x11drv/x11drv_main.c
View file @
6044307c
...
...
@@ -138,7 +138,7 @@ static int error_handler( Display *display, XErrorEvent *error_evt )
*/
static
void
lock_tsx11
(
void
)
{
Rtl
EnterCriticalSection
(
&
X11DRV_CritSection
);
EnterCriticalSection
(
&
X11DRV_CritSection
);
}
/***********************************************************************
...
...
@@ -146,7 +146,7 @@ static void lock_tsx11(void)
*/
static
void
unlock_tsx11
(
void
)
{
Rtl
LeaveCriticalSection
(
&
X11DRV_CritSection
);
LeaveCriticalSection
(
&
X11DRV_CritSection
);
}
/***********************************************************************
...
...
@@ -431,7 +431,7 @@ static void process_detach(void)
/* restore TSX11 locking */
wine_tsx11_lock
=
old_tsx11_lock
;
wine_tsx11_unlock
=
old_tsx11_unlock
;
Rtl
DeleteCriticalSection
(
&
X11DRV_CritSection
);
DeleteCriticalSection
(
&
X11DRV_CritSection
);
}
...
...
include/winbase.h
View file @
6044307c
...
...
@@ -1016,45 +1016,24 @@ BOOL WINAPI GetVersionExW(OSVERSIONINFOW*);
/*int WinMain(HINSTANCE, HINSTANCE prev, char *cmd, int show);*/
/* FIXME: need to use defines because we don't have proper imports everywhere yet */
#ifndef have_proper_imports
LONG
WINAPI
RtlEnterCriticalSection
(
CRITICAL_SECTION
*
crit
);
LONG
WINAPI
RtlLeaveCriticalSection
(
CRITICAL_SECTION
*
crit
);
LONG
WINAPI
RtlDeleteCriticalSection
(
CRITICAL_SECTION
*
crit
);
BOOL
WINAPI
RtlTryEnterCriticalSection
(
CRITICAL_SECTION
*
crit
);
PVOID
WINAPI
RtlAllocateHeap
(
HANDLE
,
ULONG
,
ULONG
);
BOOLEAN
WINAPI
RtlFreeHeap
(
HANDLE
,
ULONG
,
PVOID
);
PVOID
WINAPI
RtlReAllocateHeap
(
HANDLE
,
ULONG
,
PVOID
,
ULONG
);
ULONG
WINAPI
RtlSizeHeap
(
HANDLE
,
ULONG
,
PVOID
);
#define HeapAlloc(heap,flags,size) RtlAllocateHeap(heap,flags,size)
#define HeapFree(heap,flags,ptr) RtlFreeHeap(heap,flags,ptr)
#define HeapReAlloc(heap,flags,ptr,size) RtlReAllocateHeap(heap,flags,ptr,size)
#define HeapSize(heap,flags,ptr) RtlSizeHeap(heap,flags,ptr)
#define EnterCriticalSection(crit) RtlEnterCriticalSection(crit)
#define LeaveCriticalSection(crit) RtlLeaveCriticalSection(crit)
#define DeleteCriticalSection(crit) RtlDeleteCriticalSection(crit)
#define TryEnterCriticalSection(crit) RtlTryEnterCriticalSection(crit)
#else
LPVOID
WINAPI
HeapAlloc
(
HANDLE
,
DWORD
,
DWORD
);
BOOL
WINAPI
HeapFree
(
HANDLE
,
DWORD
,
LPVOID
);
LPVOID
WINAPI
HeapReAlloc
(
HANDLE
,
DWORD
,
LPVOID
,
DWORD
);
DWORD
WINAPI
HeapSize
(
HANDLE
,
DWORD
,
LPVOID
);
void
WINAPI
InitializeCriticalSection
(
CRITICAL_SECTION
*
lpCrit
);
BOOL
WINAPI
InitializeCriticalSectionAndSpinCount
(
CRITICAL_SECTION
*
,
DWORD
);
void
WINAPI
DeleteCriticalSection
(
CRITICAL_SECTION
*
lpCrit
);
void
WINAPI
EnterCriticalSection
(
CRITICAL_SECTION
*
lpCrit
);
BOOL
WINAPI
TryEnterCriticalSection
(
CRITICAL_SECTION
*
lpCrit
);
void
WINAPI
LeaveCriticalSection
(
CRITICAL_SECTION
*
lpCrit
);
#endif
void
WINAPI
InitializeCriticalSection
(
CRITICAL_SECTION
*
lpCrit
);
BOOL
WINAPI
InitializeCriticalSectionAndSpinCount
(
CRITICAL_SECTION
*
,
DWORD
);
void
WINAPI
MakeCriticalSectionGlobal
(
CRITICAL_SECTION
*
lpCrit
);
BOOL
WINAPI
GetProcessWorkingSetSize
(
HANDLE
,
LPDWORD
,
LPDWORD
);
DWORD
WINAPI
QueueUserAPC
(
PAPCFUNC
,
HANDLE
,
ULONG_PTR
);
void
WINAPI
RaiseException
(
DWORD
,
DWORD
,
DWORD
,
const
LPDWORD
);
BOOL
WINAPI
SetProcessWorkingSetSize
(
HANDLE
,
DWORD
,
DWORD
);
BOOL
WINAPI
TerminateProcess
(
HANDLE
,
DWORD
);
BOOL
WINAPI
TerminateThread
(
HANDLE
,
DWORD
);
BOOL
WINAPI
GetExitCodeThread
(
HANDLE
,
LPDWORD
);
void
WINAPI
MakeCriticalSectionGlobal
(
CRITICAL_SECTION
*
lpCrit
);
BOOL
WINAPI
GetProcessWorkingSetSize
(
HANDLE
,
LPDWORD
,
LPDWORD
);
DWORD
WINAPI
QueueUserAPC
(
PAPCFUNC
,
HANDLE
,
ULONG_PTR
);
void
WINAPI
RaiseException
(
DWORD
,
DWORD
,
DWORD
,
const
LPDWORD
);
BOOL
WINAPI
SetProcessWorkingSetSize
(
HANDLE
,
DWORD
,
DWORD
);
BOOL
WINAPI
TerminateProcess
(
HANDLE
,
DWORD
);
BOOL
WINAPI
TerminateThread
(
HANDLE
,
DWORD
);
BOOL
WINAPI
GetExitCodeThread
(
HANDLE
,
LPDWORD
);
/* GetBinaryType return values.
*/
...
...
library/port.c
View file @
6044307c
...
...
@@ -135,6 +135,8 @@ size_t getpagesize(void)
{
# ifdef __svr4__
return
sysconf
(
_SC_PAGESIZE
);
# elif defined(__i386__)
return
4096
;
# else
# error Cannot get the page size on this platform
# endif
...
...
memory/environ.c
View file @
6044307c
...
...
@@ -37,7 +37,7 @@
/* Win32 process environment database */
typedef
struct
_ENVDB
{
LPSTR
env
iron
;
/* 00 Process environment strings */
LPSTR
env
;
/* 00 Process environment strings */
DWORD
unknown1
;
/* 04 Unknown */
LPSTR
cmd_line
;
/* 08 Command line */
LPSTR
cur_dir
;
/* 0c Current directory */
...
...
@@ -165,7 +165,7 @@ static BOOL build_environment(void)
/* Now allocate the environment */
if
(
!
(
p
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
)))
return
FALSE
;
current_envdb
.
env
iron
=
p
;
current_envdb
.
env
=
p
;
env_sel
=
SELECTOR_AllocBlock
(
p
,
0x10000
,
WINE_LDT_FLAGS_DATA
);
/* And fill it with the Unix environment */
...
...
@@ -487,7 +487,7 @@ LPWSTR WINAPI GetCommandLineW(void)
*/
LPSTR
WINAPI
GetEnvironmentStringsA
(
void
)
{
return
current_envdb
.
env
iron
;
return
current_envdb
.
env
;
}
...
...
@@ -500,10 +500,10 @@ LPWSTR WINAPI GetEnvironmentStringsW(void)
LPWSTR
ret
;
RtlAcquirePebLock
();
size
=
HeapSize
(
GetProcessHeap
(),
0
,
current_envdb
.
env
iron
);
size
=
HeapSize
(
GetProcessHeap
(),
0
,
current_envdb
.
env
);
if
((
ret
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
*
sizeof
(
WCHAR
)
))
!=
NULL
)
{
LPSTR
pA
=
current_envdb
.
env
iron
;
LPSTR
pA
=
current_envdb
.
env
;
LPWSTR
pW
=
ret
;
while
(
size
--
)
*
pW
++
=
(
WCHAR
)(
BYTE
)
*
pA
++
;
}
...
...
@@ -517,7 +517,7 @@ LPWSTR WINAPI GetEnvironmentStringsW(void)
*/
BOOL
WINAPI
FreeEnvironmentStringsA
(
LPSTR
ptr
)
{
if
(
ptr
!=
current_envdb
.
env
iron
)
if
(
ptr
!=
current_envdb
.
env
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
...
...
@@ -549,7 +549,7 @@ DWORD WINAPI GetEnvironmentVariableA( LPCSTR name, LPSTR value, DWORD size )
return
0
;
}
RtlAcquirePebLock
();
if
((
p
=
ENV_FindVariable
(
current_envdb
.
env
iron
,
name
,
strlen
(
name
)
)))
if
((
p
=
ENV_FindVariable
(
current_envdb
.
env
,
name
,
strlen
(
name
)
)))
{
ret
=
strlen
(
p
);
if
(
size
<=
ret
)
...
...
@@ -597,7 +597,7 @@ BOOL WINAPI SetEnvironmentVariableA( LPCSTR name, LPCSTR value )
BOOL
ret
=
FALSE
;
RtlAcquirePebLock
();
env
=
p
=
current_envdb
.
env
iron
;
env
=
p
=
current_envdb
.
env
;
/* Find a place to insert the string */
...
...
@@ -634,7 +634,7 @@ BOOL WINAPI SetEnvironmentVariableA( LPCSTR name, LPCSTR value )
strcat
(
p
,
"="
);
strcat
(
p
,
value
);
}
current_envdb
.
env
iron
=
new_env
;
current_envdb
.
env
=
new_env
;
ret
=
TRUE
;
done:
...
...
@@ -684,8 +684,7 @@ DWORD WINAPI ExpandEnvironmentStringsA( LPCSTR src, LPSTR dst, DWORD count )
if
((
p
=
strchr
(
src
+
1
,
'%'
)))
{
len
=
p
-
src
-
1
;
/* Length of the variable name */
if
((
var
=
ENV_FindVariable
(
current_envdb
.
environ
,
src
+
1
,
len
)))
if
((
var
=
ENV_FindVariable
(
current_envdb
.
env
,
src
+
1
,
len
)))
{
src
+=
len
+
2
;
/* Skip the variable name */
len
=
strlen
(
var
);
...
...
memory/heap.c
View file @
6044307c
...
...
@@ -779,3 +779,45 @@ BOOL16 WINAPI Local32Next16( LOCAL32ENTRY *pLocal32Entry )
return
FALSE
;
}
/* FIXME: these functions are needed for dlls that aren't properly separated yet */
LPVOID
WINAPI
HeapAlloc
(
HANDLE
heap
,
DWORD
flags
,
DWORD
size
)
{
return
RtlAllocateHeap
(
heap
,
flags
,
size
);
}
BOOL
WINAPI
HeapFree
(
HANDLE
heap
,
DWORD
flags
,
LPVOID
ptr
)
{
return
RtlFreeHeap
(
heap
,
flags
,
ptr
);
}
LPVOID
WINAPI
HeapReAlloc
(
HANDLE
heap
,
DWORD
flags
,
LPVOID
ptr
,
DWORD
size
)
{
return
RtlReAllocateHeap
(
heap
,
flags
,
ptr
,
size
);
}
DWORD
WINAPI
HeapSize
(
HANDLE
heap
,
DWORD
flags
,
LPVOID
ptr
)
{
return
RtlSizeHeap
(
heap
,
flags
,
ptr
);
}
void
WINAPI
EnterCriticalSection
(
CRITICAL_SECTION
*
crit
)
{
RtlEnterCriticalSection
(
crit
);
}
BOOL
WINAPI
TryEnterCriticalSection
(
CRITICAL_SECTION
*
crit
)
{
return
RtlTryEnterCriticalSection
(
crit
);
}
void
WINAPI
DeleteCriticalSection
(
CRITICAL_SECTION
*
crit
)
{
RtlDeleteCriticalSection
(
crit
);
}
void
WINAPI
LeaveCriticalSection
(
CRITICAL_SECTION
*
crit
)
{
RtlLeaveCriticalSection
(
crit
);
}
scheduler/sysdeps.c
View file @
6044307c
...
...
@@ -25,7 +25,6 @@
#include <stdio.h>
#include <unistd.h>
#include <sys/time.h>
#include <sys/resource.h>
#ifdef HAVE_SYS_SYSCALL_H
# include <sys/syscall.h>
#endif
...
...
win32/device.c
View file @
6044307c
...
...
@@ -44,7 +44,9 @@
#include "wine/debug.h"
/* int 13 stuff */
#include <sys/ioctl.h>
#ifdef HAVE_SYS_IOCTL_H
# include <sys/ioctl.h>
#endif
#include <fcntl.h>
#ifdef linux
# include <linux/fd.h>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment