Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
272e2587
Commit
272e2587
authored
Aug 02, 1997
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(_trampoline): Rework last change; both getpagesize and mprotect are
in cygwin32. From-SVN: r14636
parent
b080c137
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
13 deletions
+15
-13
gcc/libgcc2.c
+15
-13
No files found.
gcc/libgcc2.c
View file @
272e2587
...
...
@@ -2718,9 +2718,7 @@ __clear_cache (char *beg, char *end)
/* Jump to a trampoline, loading the static chain address. */
#ifdef WINNT
#ifndef __CYGWIN32__
#if defined(WINNT) && ! defined(__CYGWIN32__)
long
getpagesize
()
{
...
...
@@ -2731,28 +2729,32 @@ long getpagesize()
#endif
}
#endif
#ifdef i386
extern
int
VirtualProtect
(
char
*
,
int
,
int
,
int
*
)
__attribute__
((
stdcall
));
#endif
int
mprotect
(
char
*
addr
,
int
len
,
int
prot
)
int
mprotect
(
char
*
addr
,
int
len
,
int
prot
)
{
int
np
,
op
;
if
(
prot
==
7
)
np
=
0x40
;
else
if
(
prot
==
5
)
np
=
0x20
;
else
if
(
prot
==
4
)
np
=
0x10
;
else
if
(
prot
==
3
)
np
=
0x04
;
else
if
(
prot
==
1
)
np
=
0x02
;
else
if
(
prot
==
0
)
np
=
0x01
;
if
(
prot
==
7
)
np
=
0x40
;
else
if
(
prot
==
5
)
np
=
0x20
;
else
if
(
prot
==
4
)
np
=
0x10
;
else
if
(
prot
==
3
)
np
=
0x04
;
else
if
(
prot
==
1
)
np
=
0x02
;
else
if
(
prot
==
0
)
np
=
0x01
;
if
(
VirtualProtect
(
addr
,
len
,
np
,
&
op
))
return
0
;
else
return
-
1
;
}
#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