Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
cmucl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Carl Shapiro
cmucl
Commits
042fdad7
Commit
042fdad7
authored
17 years ago
by
cshapiro
Browse files
Options
Downloads
Patches
Plain Diff
Remove conditionally-compiled code to support old Linux versions.
parent
37100312
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lisp/Linux-os.c
+1
-13
1 addition, 13 deletions
lisp/Linux-os.c
lisp/Linux-os.h
+1
-21
1 addition, 21 deletions
lisp/Linux-os.h
with
2 additions
and
34 deletions
lisp/Linux-os.c
+
1
−
13
View file @
042fdad7
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
* GENCGC support by Douglas Crosher, 1996, 1997.
* GENCGC support by Douglas Crosher, 1996, 1997.
* Alpha support by Julian Dolby, 1999.
* Alpha support by Julian Dolby, 1999.
*
*
* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/Linux-os.c,v 1.2
8
2007/07/13 0
5:03:03
cshapiro Exp $
* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/Linux-os.c,v 1.2
9
2007/07/13 0
8:34:21
cshapiro Exp $
*
*
*/
*/
...
@@ -56,17 +56,13 @@ size_t os_vm_page_size;
...
@@ -56,17 +56,13 @@ size_t os_vm_page_size;
#include
"gencgc.h"
#include
"gencgc.h"
#endif
#endif
#if ((LINUX_VERSION_CODE >= linuxversion(2,1,0)) || (__GNU_LIBRARY__ >= 6))
int
PVE_stub_errno
;
int
PVE_stub_errno
;
#endif
#if ((LINUX_VERSION_CODE >= linuxversion(2,1,0)) || (__GNU_LIBRARY__ >= 6))
void
void
update_errno
(
void
)
update_errno
(
void
)
{
{
PVE_stub_errno
=
errno
;
PVE_stub_errno
=
errno
;
}
}
#endif
void
void
...
@@ -101,11 +97,7 @@ os_init(void)
...
@@ -101,11 +97,7 @@ os_init(void)
#ifdef i386
#ifdef i386
int
*
int
*
#if (LINUX_VERSION_CODE >= linuxversion(2,1,0)) || (__GNU_LIBRARY__ >= 6)
sc_reg
(
struct
sigcontext
*
c
,
int
offset
)
sc_reg
(
struct
sigcontext
*
c
,
int
offset
)
#else
sc_reg
(
struct
sigcontext_struct
*
c
,
int
offset
)
#endif
{
{
switch
(
offset
)
{
switch
(
offset
)
{
case
0
:
case
0
:
...
@@ -288,11 +280,7 @@ void
...
@@ -288,11 +280,7 @@ void
sigsegv_handler
(
HANDLER_ARGS
)
sigsegv_handler
(
HANDLER_ARGS
)
{
{
GET_CONTEXT
GET_CONTEXT
#if (LINUX_VERSION_CODE >= linuxversion(2,1,0)) || (__GNU_LIBRARY__ >= 6)
int
fault_addr
=
((
struct
sigcontext
*
)
(
&
contextstruct
))
->
cr2
;
int
fault_addr
=
((
struct
sigcontext
*
)
(
&
contextstruct
))
->
cr2
;
#else
int
fault_addr
=
((
struct
sigcontext_struct
*
)
(
&
contextstruct
))
->
cr2
;
#endif
int
page_index
=
find_page_index
((
void
*
)
fault_addr
);
int
page_index
=
find_page_index
((
void
*
)
fault_addr
);
#ifdef RED_ZONE_HIT
#ifdef RED_ZONE_HIT
...
...
This diff is collapsed.
Click to expand it.
lisp/Linux-os.h
+
1
−
21
View file @
042fdad7
/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/Linux-os.h,v 1.2
2
2007/07/
09 16:03:51 fgilham
Exp $
/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/Linux-os.h,v 1.2
3
2007/07/
13 08:34:21 cshapiro
Exp $
This code was written as part of the CMU Common Lisp project at
This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University, and has been placed in the public domain.
Carnegie Mellon University, and has been placed in the public domain.
...
@@ -25,9 +25,6 @@
...
@@ -25,9 +25,6 @@
#include
<sys/syscall.h>
#include
<sys/syscall.h>
#include
<asm/unistd.h>
#include
<asm/unistd.h>
#include
<errno.h>
#include
<errno.h>
#include
<linux/version.h>
#define linuxversion(a, b, c) (((a)<<16)+((b)<<8)+(c))
typedef
caddr_t
os_vm_address_t
;
/* like hpux */
typedef
caddr_t
os_vm_address_t
;
/* like hpux */
typedef
size_t
os_vm_size_t
;
/* like hpux */
typedef
size_t
os_vm_size_t
;
/* like hpux */
...
@@ -44,20 +41,12 @@ typedef int os_vm_prot_t; /* like hpux */
...
@@ -44,20 +41,12 @@ typedef int os_vm_prot_t; /* like hpux */
#define OS_VM_DEFAULT_PAGESIZE 8192
/* like hpux */
#define OS_VM_DEFAULT_PAGESIZE 8192
/* like hpux */
#endif
#endif
#if (LINUX_VERSION_CODE >= linuxversion(2,1,0)) || (__GNU_LIBRARY__ >= 6)
int
*
sc_reg
(
struct
sigcontext
*
,
int
);
int
*
sc_reg
(
struct
sigcontext
*
,
int
);
#else
int
*
sc_reg
(
struct
sigcontext_struct
*
,
int
);
#endif
void
os_save_context
(
void
);
void
os_save_context
(
void
);
#define SAVE_CONTEXT os_save_context
#define SAVE_CONTEXT os_save_context
#if (LINUX_VERSION_CODE >= linuxversion(2,1,0)) || (__GNU_LIBRARY__ >= 6)
typedef
struct
sigcontext
sigcontext
;
typedef
struct
sigcontext
sigcontext
;
#else
typedef
struct
sigcontext_struct
sigcontext
;
#endif
/* Don't want the SIGINFO flag on linux as it causes the creation
/* Don't want the SIGINFO flag on linux as it causes the creation
of real-time interrupt frames.
of real-time interrupt frames.
...
@@ -70,13 +59,8 @@ typedef struct sigcontext_struct sigcontext;
...
@@ -70,13 +59,8 @@ typedef struct sigcontext_struct sigcontext;
*/
*/
#if (defined(i386) || defined(__x86_64))
#if (defined(i386) || defined(__x86_64))
#if (LINUX_VERSION_CODE >= linuxversion(2,1,0)) || (__GNU_LIBRARY__ >= 6)
#define HANDLER_ARGS int signal, struct sigcontext contextstruct
#define HANDLER_ARGS int signal, struct sigcontext contextstruct
#define GET_CONTEXT int code=0; struct sigcontext *context=&contextstruct;
#define GET_CONTEXT int code=0; struct sigcontext *context=&contextstruct;
#else
#define HANDLER_ARGS int signal, struct sigcontext_struct contextstruct
#define GET_CONTEXT int code=0; struct sigcontext_struct *context=&contextstruct;
#endif
#include
<fpu_control.h>
#include
<fpu_control.h>
#define setfpucw(cw) {fpu_control_t cw_tmp=cw;_FPU_SETCW(cw_tmp);}
#define setfpucw(cw) {fpu_control_t cw_tmp=cw;_FPU_SETCW(cw_tmp);}
...
@@ -90,11 +74,7 @@ typedef struct sigcontext_struct sigcontext;
...
@@ -90,11 +74,7 @@ typedef struct sigcontext_struct sigcontext;
#define sc_sp esp
#define sc_sp esp
#endif
#endif
#define sc_mask oldmask
#define sc_mask oldmask
#if (LINUX_VERSION_CODE >= linuxversion(2,1,0)) || (__GNU_LIBRARY__ >= 6)
#define sigcontext sigcontext
#define sigcontext sigcontext
#else
#define sigcontext sigcontext_struct
#endif
#define sc_efl eflags
#define sc_efl eflags
#ifdef __x86_64
#ifdef __x86_64
...
...
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