Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
90cf7b7f
Commit
90cf7b7f
authored
12 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
Pull in pthread_stackseg_np() usage patch for OpenBSD from older
www/mozilla-firefox port.
parent
40b745e9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
3rdp/build/js_src_jsnativestack_cpp.patch
+41
-4
41 additions, 4 deletions
3rdp/build/js_src_jsnativestack_cpp.patch
with
41 additions
and
4 deletions
3rdp/build/js_src_jsnativestack_cpp.patch
+
41
−
4
View file @
90cf7b7f
$OpenBSD: patch-js_src_jsnativestack_cpp,v 1.2 2011/06/28 05:43:57 landry Exp $
https://bugzilla.mozilla.org/show_bug.cgi?id=634609
--- js/src/jsnativestack.cpp.orig Fri May 27 18:12:08 2011
+++ js/src/jsnativestack.cpp Tue May 31 22:18:21 2011
--- js/src/jsnativestack.cpp.orig 2011-03-31 12:08:36.000000000 -0700
+++ js/src/jsnativestack.cpp 2012-10-15 13:03:20.000000000 -0700
@@ -50,7 +50,7 @@
#elif defined(XP_MACOSX) || defined(DARWIN) || defined(XP_UNIX)
# include <pthread.h>
...
...
@@ -11,3 +9,42 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=634609
# include <pthread_np.h>
# endif
@@ -198,7 +198,9 @@
pthread_attr_init(&sattr);
# if defined(PTHREAD_NP_H) || defined(_PTHREAD_NP_H_) || defined(NETBSD)
/* e.g. on FreeBSD 4.8 or newer, neundorf@kde.org */
- pthread_attr_get_np(thread, &sattr);
+# if (!defined(__OpenBSD__))
+ pthread_attr_get_np(thread, &sattr);
+# endif
# else
/*
* FIXME: this function is non-portable;
@@ -209,14 +211,24 @@
void *stackBase = 0;
size_t stackSize = 0;
-# ifdef DEBUG
- int rc =
-# endif
+# if defined(__OpenBSD__)
+ stack_t ss;
+ int rslt;
+
+ rslt = pthread_stackseg_np(pthread_self(), &ss);
+ stackBase = (void*)((size_t)ss.ss_sp - ss.ss_size);
+ stackSize = ss.ss_size;
+# else
+# ifdef DEBUG
+ int rc =
+# endif
pthread_attr_getstack(&sattr, &stackBase, &stackSize);
JS_ASSERT(!rc);
JS_ASSERT(stackBase);
pthread_attr_destroy(&sattr);
+# endif
+
# if JS_STACK_GROWTH_DIRECTION > 0
return stackBase;
# else
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment