$OpenBSD: patch-src_racket_src_schpriv_h,v 1.1 2013/10/16 19:22:37 juanfra Exp $

Upstream's commit message:
"OpenBSD provides pthread_stackseg_np(), which directly reports
the stack-bounds information that Racket needs, so we can use
that instead of the approach used on other Unix variants. The
approach used for other Unix variants seems not to work for OpenBSD
because the stack location at the point that main() is called
is already significantly far from the stack base (on the order
of 100k on a 32-bit system in my test using OpenBSD 5.2)."

Test: racket -e '(load "deep.rktl")'

https://github.com/plt/racket/pull/316
https://github.com/plt/racket/commit/3a9ad7746b6f53f68dbdc55493baf7528b524422

--- src/racket/src/schpriv.h.orig	Sat Aug 10 00:38:27 2013
+++ src/racket/src/schpriv.h	Tue Oct 15 20:14:39 2013
@@ -1697,7 +1697,7 @@ typedef struct Scheme_Overflow {
 #if defined(UNIX_FIND_STACK_BOUNDS) || defined(WINDOWS_FIND_STACK_BOUNDS) \
     || defined(MACOS_FIND_STACK_BOUNDS) || defined(ASSUME_FIXED_STACK_SIZE) \
     || defined(BEOS_FIND_STACK_BOUNDS) || defined(OSKIT_FIXED_STACK_BOUNDS) \
-    || defined(PALM_FIND_STACK_BOUNDS)
+    || defined(PALM_FIND_STACK_BOUNDS) || defined(PTHREAD_STACKSEG_FIND_STACK_BOUNDS)
 # define USE_STACK_BOUNDARY_VAR
 THREAD_LOCAL_DECL(extern uintptr_t scheme_stack_boundary);
 /* Same as scheme_stack_boundary, but set to an extreme value when feul auto-expires,
