summaryrefslogtreecommitdiff
path: root/lang/python23/patches/patch-ai
blob: 3a38ba3400b1d375915a768b63495b7285afd6b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
$NetBSD: patch-ai,v 1.3 2003/12/08 21:13:56 recht Exp $

--- Modules/_sre.c.orig	2003-06-26 16:41:08.000000000 +0200
+++ Modules/_sre.c
@@ -71,9 +71,14 @@ static char copyright[] =
    Win64 (MS_WIN64), Linux64 (__LP64__), Monterey (64-bit AIX) (_LP64) */
 /* FIXME: maybe the limit should be 40000 / sizeof(void*) ? */
 #define USE_RECURSION_LIMIT 7500
-#else
 
-#if defined(__GNUC__) && defined(WITH_THREAD) && defined(__FreeBSD__)
+#elif defined(__FreeBSD__)
+/* FreeBSD/amd64 and /sparc64 requires even smaller limit */
+#if defined(__amd64__)
+#define USE_RECURSION_LIMIT 6000
+#elif defined(__sparc64__)
+#define USE_RECURSION_LIMIT 3000
+#elif defined(__GNUC__) && defined(WITH_THREAD)
 /* the pthreads library on FreeBSD has a fixed 1MB stack size for the
  * initial (or "primary") thread, which is insufficient for the default
  * recursion limit.  gcc 3.x at the default optimisation