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
c36d63f4
Commit
c36d63f4
authored
Oct 28, 2002
by
Greg Turner
Committed by
Alexandre Julliard
Oct 28, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix endianness dependency in the (there is only one :) ) marshall
function.
parent
d5294027
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
3 deletions
+24
-3
ndr_marshall.c
dlls/rpcrt4/ndr_marshall.c
+24
-3
No files found.
dlls/rpcrt4/ndr_marshall.c
View file @
c36d63f4
...
...
@@ -42,6 +42,27 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole);
#define BUFFER_PARANOIA 40
#if defined(__i386__)
#define LITTLE_ENDIAN_32_WRITE(pchar, word32) \
(*((UINT32 *)(pchar)) = (word32))
#define LITTLE_ENDIAN_32_READ(pchar) \
(*((UINT32 *)(pchar)))
#else
/* these would work for i386 too, but less efficient */
#define LITTLE_ENDIAN_32_WRITE(pchar, word32) \
(*(pchar) = LOBYTE(LOWORD(word32)), \
*((pchar)+1) = HIBYTE(LOWORD(word32)), \
*((pchar)+2) = LOBYTE(HIWORD(word32)), \
*((pchar)+3) = HIBYTE(HIWORD(word32)), \
(word32))
#define LITTLE_ENDIAN_32_READ(pchar) \
(MAKELONG( \
MAKEWORD(*(pchar), *((pchar)+1)) \
MAKEWORD(*((pchar)+2), *((pchar)+3)))
#endif
/***********************************************************************
* NdrConformantStringMarshall [RPCRT4.@]
*/
...
...
@@ -59,9 +80,9 @@ unsigned char *WINAPI NdrConformantStringMarshall(MIDL_STUB_MESSAGE *pStubMsg, u
/* in DCE terminology this is a Conformant Varying String */
c
=
pStubMsg
->
Buffer
;
memset
(
c
,
0
,
12
);
*
((
UINT32
*
)
c
)
=
len
+
1
;
/* max length: strlen + 1 (for '\0') */
c
+=
8
;
/* offset: 0 */
*
((
UINT32
*
)
c
)
=
len
+
1
;
/* actual length: (same) */
LITTLE_ENDIAN_32_WRITE
(
c
,
len
+
1
);
/* max length: strlen + 1 (for '\0') */
c
+=
8
;
/* offset: 0 */
LITTLE_ENDIAN_32_WRITE
(
c
,
len
+
1
);
/* actual length: (same) */
c
+=
4
;
for
(
i
=
0
;
i
<=
len
;
i
++
)
*
(
c
++
)
=
*
(
pszMessage
++
);
/* copy the string itself into the remaining space */
...
...
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