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
f5ea9817
Commit
f5ea9817
authored
Nov 26, 1995
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(trampoline): Add getpagesize and mprotect for WINNT.
From-SVN: r10605
parent
67933baf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
gcc/libgcc2.c
+33
-0
No files found.
gcc/libgcc2.c
View file @
f5ea9817
...
@@ -1919,6 +1919,39 @@ __clear_cache (beg, end)
...
@@ -1919,6 +1919,39 @@ __clear_cache (beg, end)
/* Jump to a trampoline, loading the static chain address. */
/* Jump to a trampoline, loading the static chain address. */
#ifdef WINNT
long
getpagesize
()
{
#ifdef _ALPHA_
return
8192
;
#else
return
4096
;
#endif
}
int
mprotect
(
addr
,
len
,
prot
)
char
*
addr
;
int
len
,
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
(
VirtualProtect
(
addr
,
len
,
np
,
&
op
))
return
0
;
else
return
-
1
;
}
#endif
#ifdef TRANSFER_FROM_TRAMPOLINE
#ifdef TRANSFER_FROM_TRAMPOLINE
TRANSFER_FROM_TRAMPOLINE
TRANSFER_FROM_TRAMPOLINE
#endif
#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