pkgsrc/lang/guile/patches/patch-ae
asau 56ad733bed Update to Guile 1.8.8
Changes in 1.8.8 (since 1.8.7)

* Bugs fixed

** Fix possible buffer overruns when parsing numbers
** Fix random number generator on 64-bit platforms

Previously the `scm_c_random' function would crash or return only 32-bit
worth of randomness.  In addition, the new `scm_c_random64' function
explicitly returns 64 bits of randomness.

** Add missing range checks in `vector-move-left!' and `vector-move-right!'

Previously these procedures could write past the end of a vector.

** Avoid clash with system setjmp/longjmp on IA64
** Don't dynamically link an extension that is already registered
** Fix `wrong type arg' exceptions with IPv6 addresses
** Fix typos in `(srfi srfi-19)'
** Have `(srfi srfi-35)' provide named struct vtables
** Fix C documentation extraction ("snarfing") with recent GCC versions
** Fix some Interix build problems
** Fix Tru64 build problems
** Fix GC-related build issues on Solaris 10 x86 with Sun Studio 12
** Several small documentation fixes
2010-12-25 09:03:41 +00:00

84 lines
2.8 KiB
Text

--- libguile/gc_os_dep.c.orig 2009-06-26 20:21:44.000000000 +0000
+++ libguile/gc_os_dep.c
@@ -132,7 +132,7 @@ typedef int GC_bool;
# define NETBSD
# define mach_type_known
# endif
-# if defined(__NetBSD__) && defined(__sparc__)
+# if defined(__NetBSD__) && (defined(__sparc__) || defined(__sparc_v9__))
# define SPARC
# define NETBSD
# define mach_type_known
@@ -304,6 +304,11 @@ typedef int GC_bool;
# define NETBSD
# define mach_type_known
# endif
+# if defined(__NetBSD__) && defined(__x86_64__)
+# define X86_64
+# define NETBSD
+# define mach_type_known
+# endif
# if defined(bsdi) && defined(i386)
# define I386
# define BSDI
@@ -444,12 +449,12 @@ scm_get_stack_base ()
/*
* For each architecture and OS, the following need to be defined:
*
- * CPP_WORD_SZ is a simple integer constant representing the word size.
+ * CPP_WORDSZ is a simple integer constant representing the word size.
* in bits. We assume byte addressibility, where a byte has 8 bits.
- * We also assume CPP_WORD_SZ is either 32 or 64.
+ * We also assume CPP_WORDSZ is either 32 or 64.
* (We care about the length of pointers, not hardware
* bus widths. Thus a 64 bit processor with a C compiler that uses
- * 32 bit pointers should use CPP_WORD_SZ of 32, not 64. Default is 32.)
+ * 32 bit pointers should use CPP_WORDSZ of 32, not 64. Default is 32.)
*
* MACH_TYPE is a string representation of the machine type.
* OS_TYPE is analogous for the OS.
@@ -720,10 +729,18 @@ scm_get_stack_base ()
# define HEAP_START DATAEND
# endif
# define PROC_VDB
-/* HEURISTIC1 reportedly no longer works under 2.7. Thus we */
-/* switched to HEURISTIC2, eventhough it creates some debugging */
-/* issues. */
-# define HEURISTIC2
+/* HEURISTIC1 reportedly no longer works under 2.7. */
+/* HEURISTIC2 probably works, but this appears to be preferable. */
+/* Apparently USRSTACK is defined to be USERLIMIT, but in some */
+/* installations that's undefined. We work around this with a */
+/* gross hack: */
+# include <sys/vmparam.h>
+# ifdef USERLIMIT
+ /* This should work everywhere, but doesn't. */
+# define STACKBOTTOM USRSTACK
+# else
+# define HEURISTIC2
+# endif
# include <unistd.h>
# define GETPAGESIZE() sysconf(_SC_PAGESIZE)
/* getpagesize() appeared to be missing from at least one */
@@ -994,6 +1025,21 @@ scm_get_stack_base ()
# endif
# endif
+# ifdef X86_64
+# define MACH_TYPE "X86_64"
+# define ALIGNMENT 8
+# define ALIGN_DOUBLE
+# define CPP_WORDSZ 64
+# ifdef NETBSD
+# define OS_TYPE "NETBSD"
+# endif
+# if defined(NETBSD)
+# define HEURISTIC2
+ extern char etext;
+# define DATASTART ((ptr_t)(&etext))
+# endif
+# endif
+
# ifdef NS32K
# define MACH_TYPE "NS32K"
# define ALIGNMENT 4