Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
e65349d4
Commit
e65349d4
authored
Jun 15, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Jun 15, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Cast user handles to unsigned long for win64 compatibility.
parent
e1c16ff3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
user.c
server/user.c
+5
-5
No files found.
server/user.c
View file @
e65349d4
...
...
@@ -36,10 +36,10 @@ static int allocated_handles;
static
struct
user_handle
*
handle_to_entry
(
user_handle_t
handle
)
{
unsigned
short
generation
;
int
index
=
(((
unsigned
int
)
handle
&
0xffff
)
-
FIRST_USER_HANDLE
)
>>
1
;
int
index
=
(((
unsigned
long
)
handle
&
0xffff
)
-
FIRST_USER_HANDLE
)
>>
1
;
if
(
index
<
0
||
index
>=
nb_handles
)
return
NULL
;
if
(
!
handles
[
index
].
type
)
return
NULL
;
generation
=
(
unsigned
int
)
handle
>>
16
;
generation
=
(
unsigned
long
)
handle
>>
16
;
if
(
generation
==
handles
[
index
].
generation
||
!
generation
||
generation
==
0xffff
)
return
&
handles
[
index
];
return
NULL
;
...
...
@@ -48,7 +48,7 @@ static struct user_handle *handle_to_entry( user_handle_t handle )
inline
static
user_handle_t
entry_to_handle
(
struct
user_handle
*
ptr
)
{
int
index
=
ptr
-
handles
;
return
(
user_handle_t
)(((
index
<<
1
)
+
FIRST_USER_HANDLE
)
+
(
ptr
->
generation
<<
16
));
return
(
user_handle_t
)(((
(
unsigned
long
)
index
<<
1
)
+
FIRST_USER_HANDLE
)
+
(
ptr
->
generation
<<
16
));
}
inline
static
struct
user_handle
*
alloc_user_entry
(
void
)
...
...
@@ -113,7 +113,7 @@ user_handle_t get_user_full_handle( user_handle_t handle )
{
struct
user_handle
*
entry
;
if
((
unsigned
int
)
handle
>>
16
)
return
handle
;
if
((
unsigned
long
)
handle
>>
16
)
return
handle
;
if
(
!
(
entry
=
handle_to_entry
(
handle
)))
return
handle
;
return
entry_to_handle
(
entry
);
}
...
...
@@ -149,7 +149,7 @@ void *next_user_handle( user_handle_t *handle, enum user_object type )
if
(
!*
handle
)
entry
=
handles
;
else
{
int
index
=
(((
unsigned
int
)
*
handle
&
0xffff
)
-
FIRST_USER_HANDLE
)
>>
1
;
int
index
=
(((
unsigned
long
)
*
handle
&
0xffff
)
-
FIRST_USER_HANDLE
)
>>
1
;
if
(
index
<
0
||
index
>=
nb_handles
)
return
NULL
;
entry
=
handles
+
index
+
1
;
/* start from the next one */
}
...
...
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