$OpenBSD: patch-src_racket_sconfig_h,v 1.2 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/sconfig.h.orig	Sat Aug 10 00:38:27 2013
+++ src/racket/sconfig.h	Tue Oct 15 20:40:47 2013
@@ -295,16 +295,11 @@
 #  define SCHEME_PLATFORM_LIBRARY_SUBPATH "i386-openbsd"
 # endif
 
-# include <sys/param.h>
-# if OpenBSD < 201211
-/* This is needed for (pre-5.2) userspace threads: */
-#  define ASSUME_FIXED_STACK_SIZE
-#  define FIXED_STACK_SIZE 1048576
-# endif
-
 # include "uconfig.h"
 # undef HAS_STANDARD_IOB
 # define HAS_BSD_IOB
+# undef UNIX_FIND_STACK_BOUNDS
+# define PTHREAD_STACKSEG_FIND_STACK_BOUNDS
 
 /* Default UNIX_STACK_MAXIMUM is too big for a non-root user. */
 # undef UNIX_STACK_MAXIMUM
@@ -1490,6 +1485,8 @@
      line.
     ASSUME_FIXED_STACK_SIZE assumes that the main stack size is
      always FIXED_STACK_SIZE.
+    PTHREAD_STACKSEG_FIND_STACK_BOUNDS finds stack bounds using
+     pthread_stackseg_np().
     Use only one of these if DO_STACK_CHECK is used, or none otherwise. */
 
  /* FIXED_STACK_SIZE <X> sets the stack size to <X> when the
