pkgsrc/lang/elk/patches/patch-ap
seb 76aeaddfc5 Synchronize package version with reality: 3.0.3.
Regen the patches files (one file per patch).

Fix for NetBSD ELF platform: files/stab-elf.c and config/untested/elf-netbsd-cc
(by way of patches/patch-af) adjusted.
Thanks to Nick for the helping hand and to Alistair for the previous work.
This should close PR 13527.

Make X11 support conditional by way if the ELK_USE_X11 variable.

I tried to enable Motif support: only Motif 1.X should work but
even with the lesstif12 package it does not - it does compile though.
So Motif support if commented out but leaved in case someone want to fix
ELK.
2002-01-09 23:04:52 +00:00

32 lines
864 B
Text

$NetBSD: patch-ap,v 1.1 2002/01/09 23:04:57 seb Exp $
--- src/dump-vanilla.c.orig Thu Jun 29 13:55:51 1995
+++ src/dump-vanilla.c
@@ -12,6 +12,10 @@
extern void *sbrk();
+#if defined(__FreeBSD__) || defined(__NetBSD__)
+extern etext;
+#endif
+
#if defined(hp9000s300) || defined(__hp9000s300) || defined(__hp9000s300__)
static int getpagesize () {
return EXEC_PAGESIZE;
@@ -113,13 +117,15 @@
close (afd);
#if defined(__bsdi__)
data_start = N_DATADDR(hdr);
+#elif defined (__FreeBSD__) || defined(__NetBSD__)
+ data_start = (int) &etext;
#else
data_start = hdr.a_text;
+#endif
#if defined(sun) || defined(__sun__)
data_start += pagemask+1;
#endif
data_start = (data_start + SEG_SIZ-1) & ~(SEG_SIZ-1);
-#endif
data_end = (unsigned)sbrk (0);
#if !defined(__bsdi__)
data_end = (data_end + pagemask) & ~pagemask;