# ifndef GC_OPENBSD_THREADS
# include <sys/param.h>
# include <uvm/uvm_extern.h>
-# define STACKBOTTOM ((ptr_t)USRSTACK)
+ /* USRSTACK is defined in <machine/vmparam.h> but that is */
+ /* protected by _KERNEL in <uvm/uvm_param.h> file. */
+# ifdef USRSTACK
+# define STACKBOTTOM ((ptr_t)USRSTACK)
+# endif
# endif
extern int __data_start[];
# define DATASTART ((ptr_t)__data_start)
# ifndef GC_OPENBSD_THREADS
# include <sys/param.h>
# include <uvm/uvm_extern.h>
-# define STACKBOTTOM ((ptr_t)USRSTACK)
+# ifdef USRSTACK
+# define STACKBOTTOM ((ptr_t)USRSTACK)
+# endif
# endif
extern int __data_start[];
# define DATASTART ((ptr_t)__data_start)
# ifndef GC_OPENBSD_THREADS
# include <sys/param.h>
# include <uvm/uvm_extern.h>
-# define STACKBOTTOM ((ptr_t)USRSTACK)
+# ifdef USRSTACK
+# define STACKBOTTOM ((ptr_t)USRSTACK)
+# endif
# endif
extern int __data_start[];
# define DATASTART ((ptr_t)__data_start)
# endif /* _ELF_ */
# endif
# ifdef OPENBSD
-# define OS_TYPE "OPENBSD"
-# define ALIGNMENT 4
+# define OS_TYPE "OPENBSD"
+# define ALIGNMENT 4
# ifndef GC_OPENBSD_THREADS
-# include <sys/param.h>
-# include <uvm/uvm_extern.h>
-# define STACKBOTTOM ((ptr_t)USRSTACK)
-# endif
- extern int _fdata[];
-# define DATASTART ((ptr_t)_fdata)
- extern int _end[];
-# define DATAEND ((ptr_t)(&_end))
-# define DYNAMIC_LOADING
+# include <sys/param.h>
+# include <uvm/uvm_extern.h>
+# ifdef USRSTACK
+# define STACKBOTTOM ((ptr_t)USRSTACK)
+# endif
+# endif
+ extern int _fdata[];
+# define DATASTART ((ptr_t)_fdata)
+ extern int _end[];
+# define DATAEND ((ptr_t)(&_end))
+# define DYNAMIC_LOADING
# endif
# ifdef FREEBSD
# define OS_TYPE "FREEBSD"
# ifndef GC_OPENBSD_THREADS
# include <sys/param.h>
# include <uvm/uvm_extern.h>
-# define STACKBOTTOM ((ptr_t)USRSTACK)
+# ifdef USRSTACK
+# define STACKBOTTOM ((ptr_t)USRSTACK)
+# endif
# endif
extern int __data_start[];
# define DATASTART ((ptr_t)__data_start)
# ifndef GC_OPENBSD_THREADS
# include <sys/param.h>
# include <uvm/uvm_extern.h>
-# define STACKBOTTOM ((ptr_t)USRSTACK)
+# ifdef USRSTACK
+# define STACKBOTTOM ((ptr_t)USRSTACK)
+# endif
# endif
extern int __data_start[];
# define DATASTART ((ptr_t)__data_start)
# ifndef GC_OPENBSD_THREADS
# include <sys/param.h>
# include <uvm/uvm_extern.h>
-# define STACKBOTTOM ((ptr_t)USRSTACK)
+# ifdef USRSTACK
+# define STACKBOTTOM ((ptr_t)USRSTACK)
+# endif
# endif
extern int __data_start[];
# define DATASTART ((ptr_t)__data_start)
# ifndef GC_OPENBSD_THREADS
# include <sys/param.h>
# include <uvm/uvm_extern.h>
-# define STACKBOTTOM ((ptr_t)USRSTACK)
+# ifdef USRSTACK
+# define STACKBOTTOM ((ptr_t)USRSTACK)
+# endif
# endif
extern int __data_start[];
# define DATASTART ((ptr_t)__data_start)
# ifndef GC_OPENBSD_THREADS
# include <sys/param.h>
# include <uvm/uvm_extern.h>
-# define STACKBOTTOM ((ptr_t)USRSTACK)
+# ifdef USRSTACK
+# define STACKBOTTOM ((ptr_t)USRSTACK)
+# endif
# endif
extern int __data_start[];
extern int _end[];