Skip to content
Snippets Groups Projects
Commit 9d956223 authored by Simon Marlow's avatar Simon Marlow
Browse files

[project @ 1998-05-27 12:09:43 by simonm]

- remove _BSD_SOURCE for linux case, it broke older linuxen.
- type of scp.cr2 is unsigned long, not caddr_t.
- cast all pointer-like things to (char *) for comparisons.
parent 44ceb702
No related merge requests found
......@@ -38,7 +38,6 @@ much pain.
#if defined(linux_TARGET_OS)
# define NON_POSIX_SOURCE
/* sigh, linux w/ glibc needs _BSD_SOURCE to get caddr_t... (ToDo) */
# define _BSD_SOURCE
#endif
#if defined(osf3_TARGET_OS) || defined(osf1_TARGET_OS)
......@@ -146,15 +145,15 @@ segv_handler(int sig,
extern void StackOverflow(STG_NO_ARGS) STG_NORETURN;
# if defined(linux_TARGET_OS) || defined(linuxaout_TARGET_OS)
caddr_t addr = scp.cr2;
unsigned long addr = scp.cr2;
/* Magic info from Tommy Thorn! */
# endif
# if defined(aix_TARGET_OS)
caddr_t addr = scp->sc_jmpbuf.jmp_context.o_vaddr;
/* Magic guess by andre */
# endif
if (addr >= (caddr_t) stks_space
&& addr < (caddr_t) (stks_space + RTSflags.GcFlags.stksSize))
if ( (char *)addr >= (char *)stks_space
&& (char *)addr < (char *)(stks_space + RTSflags.GcFlags.stksSize))
StackOverflow();
fflush(stdout);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment