Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sam Joan Roque-Worcel
wine
Commits
d0b304b9
Commit
d0b304b9
authored
23 years ago
by
Bang Jun-Young
Committed by
Alexandre Julliard
23 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Make use of solaris_try_mmap() for NetBSD. Rename it to
try_mmap_fixed() since it's no longer Solaris-specific.
parent
eda758eb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
library/port.c
+10
-8
10 additions, 8 deletions
library/port.c
with
10 additions
and
8 deletions
library/port.c
+
10
−
8
View file @
d0b304b9
...
...
@@ -40,7 +40,9 @@
#ifdef HAVE_LIBUTIL_H
# include <libutil.h>
#endif
#ifdef HAVE_STDINT_H
# include <stdint.h>
#endif
/***********************************************************************
* usleep
...
...
@@ -397,9 +399,9 @@ int getrlimit (int resource, struct rlimit *rlim)
#endif
/* HAVE_GETRLIMIT */
#ifdef
__svr4__
#if
def
ined(
__svr4__
) || defined(__NetBSD__)
/***********************************************************************
*
solaris_
try_mmap
* try_mmap
_fixed
*
* The purpose of this routine is to emulate the behaviour of
* the Linux mmap() routine if a non-NULL address is passed,
...
...
@@ -415,8 +417,8 @@ int getrlimit (int resource, struct rlimit *rlim)
* address range is still available, and placing the mapping there
* using MAP_FIXED if so.
*/
static
int
solaris_
try_mmap
(
void
*
addr
,
size_t
len
,
int
prot
,
int
flags
,
int
fildes
,
off_t
off
)
static
int
try_mmap
_fixed
(
void
*
addr
,
size_t
len
,
int
prot
,
int
flags
,
int
fildes
,
off_t
off
)
{
char
*
volatile
result
=
NULL
;
int
pagesize
=
getpagesize
();
...
...
@@ -442,7 +444,7 @@ static int solaris_try_mmap (void *addr, size_t len, int prot, int flags,
if
(
(
pid
=
vfork
())
==
-
1
)
{
perror
(
"
solaris_
try_mmap: vfork"
);
perror
(
"try_mmap
_fixed
: vfork"
);
exit
(
1
);
}
if
(
pid
==
0
)
...
...
@@ -508,8 +510,8 @@ void *wine_anon_mmap( void *start, size_t size, int prot, int flags )
flags
|=
MAP_PRIVATE
;
#endif
#ifdef
__svr4__
if
(
solaris_
try_mmap
(
start
,
size
,
prot
,
flags
,
fdzero
,
0
)
)
#if
def
ined(
__svr4__
) || defined(__NetBSD__)
if
(
try_mmap
_fixed
(
start
,
size
,
prot
,
flags
,
fdzero
,
0
)
)
return
start
;
#endif
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment