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
25e4cfbd
Commit
25e4cfbd
authored
Mar 12, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libport: Get rid of memcpy_unaligned().
The code that uses it is no longer built on non-i386. Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9bf4db13
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
4 additions
and
45 deletions
+4
-45
ne_module.c
dlls/krnl386.exe16/ne_module.c
+1
-1
resource.c
dlls/krnl386.exe16/resource.c
+3
-4
port.h
include/wine/port.h
+0
-10
Makefile.in
libs/port/Makefile.in
+0
-1
memcpy_unaligned.c
libs/port/memcpy_unaligned.c
+0
-29
No files found.
dlls/krnl386.exe16/ne_module.c
View file @
25e4cfbd
...
...
@@ -333,7 +333,7 @@ static void NE_InitResourceHandler( HMODULE16 hModule )
pTypeInfo
=
(
NE_TYPEINFO
*
)((
char
*
)
pModule
+
pModule
->
ne_rsrctab
+
2
);
while
(
pTypeInfo
->
type_id
)
{
memcpy_unaligned
(
&
pTypeInfo
->
resloader
,
&
proc
,
sizeof
(
FARPROC16
)
)
;
pTypeInfo
->
resloader
=
proc
;
pTypeInfo
=
(
NE_TYPEINFO
*
)((
char
*
)(
pTypeInfo
+
1
)
+
pTypeInfo
->
count
*
sizeof
(
NE_NAMEINFO
));
}
}
...
...
dlls/krnl386.exe16/resource.c
View file @
25e4cfbd
...
...
@@ -380,8 +380,8 @@ FARPROC16 WINAPI SetResourceHandler16( HMODULE16 hModule, LPCSTR typeId, FARPROC
{
if
(
!
(
pTypeInfo
=
NE_FindTypeSection
(
pResTab
,
pTypeInfo
,
typeId
)))
break
;
memcpy_unaligned
(
&
prevHandler
,
&
pTypeInfo
->
resloader
,
sizeof
(
FARPROC16
)
)
;
memcpy_unaligned
(
&
pTypeInfo
->
resloader
,
&
resourceHandler
,
sizeof
(
FARPROC16
)
)
;
prevHandler
=
pTypeInfo
->
resloader
;
pTypeInfo
->
resloader
=
resourceHandler
;
pTypeInfo
=
next_typeinfo
(
pTypeInfo
);
}
if
(
!
prevHandler
)
prevHandler
=
get_default_res_handler
();
...
...
@@ -1031,8 +1031,7 @@ HGLOBAL16 WINAPI LoadResource16( HMODULE16 hModule, HRSRC16 hRsrc )
}
else
{
FARPROC16
resloader
;
memcpy_unaligned
(
&
resloader
,
&
pTypeInfo
->
resloader
,
sizeof
(
FARPROC16
)
);
FARPROC16
resloader
=
pTypeInfo
->
resloader
;
if
(
resloader
&&
resloader
!=
get_default_res_handler
())
{
WORD
args
[
3
];
...
...
include/wine/port.h
View file @
25e4cfbd
...
...
@@ -368,15 +368,6 @@ int symlink(const char *from, const char *to);
int
usleep
(
unsigned
int
useconds
);
#endif
/* !defined(HAVE_USLEEP) */
#ifdef __i386__
static
inline
void
*
memcpy_unaligned
(
void
*
dst
,
const
void
*
src
,
size_t
size
)
{
return
memcpy
(
dst
,
src
,
size
);
}
#else
extern
void
*
memcpy_unaligned
(
void
*
dst
,
const
void
*
src
,
size_t
size
);
#endif
/* __i386__ */
extern
int
mkstemps
(
char
*
template
,
int
suffix_len
);
/* Process creation flags */
...
...
@@ -532,7 +523,6 @@ extern __int64 interlocked_cmpxchg64( __int64 *dest, __int64 xchg, __int64 compa
#define interlocked_xchg_ptr __WINE_NOT_PORTABLE(interlocked_xchg_ptr)
#define interlocked_xchg_add __WINE_NOT_PORTABLE(interlocked_xchg_add)
#define lstat __WINE_NOT_PORTABLE(lstat)
#define memcpy_unaligned __WINE_NOT_PORTABLE(memcpy_unaligned)
#undef memmove
#define memmove __WINE_NOT_PORTABLE(memmove)
#define pread __WINE_NOT_PORTABLE(pread)
...
...
libs/port/Makefile.in
View file @
25e4cfbd
...
...
@@ -90,7 +90,6 @@ C_SRCS = \
isnan.c
\
lstat.c
\
mbtowc.c
\
memcpy_unaligned.c
\
memmove.c
\
mkstemps.c
\
normalize.c
\
...
...
libs/port/memcpy_unaligned.c
deleted
100644 → 0
View file @
9bf4db13
/*
* Unaligned memcpy wrapper to defeat gcc optimizations.
*
* Copyright 1996 Alexandre Julliard
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#ifndef __i386__
void
*
memcpy_unaligned
(
void
*
dst
,
const
void
*
src
,
size_t
size
)
{
return
memcpy
(
dst
,
src
,
size
);
}
#endif
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