summaryrefslogtreecommitdiff
path: root/devel/linuxthreads/files/patch-aa
diff options
context:
space:
mode:
authorTor Egge <tegge@FreeBSD.org>2003-06-09 03:48:31 +0000
committerTor Egge <tegge@FreeBSD.org>2003-06-09 03:48:31 +0000
commitf390ff8ee2cd9f3d83e4bd7a724a54fa90b0b83a (patch)
tree04653183d749220ab7d9c65b9ca3ba277f313bdc /devel/linuxthreads/files/patch-aa
parentMark memgrep as i386 only. (diff)
Add new experimental option, LINUXTHREADS_WRAP_API, that adds wrapper
functions providing most of the native threads API while avoiding name clashes by transparently prefixing all function names that directly provide the linuxthreads API.
Diffstat (limited to 'devel/linuxthreads/files/patch-aa')
-rw-r--r--devel/linuxthreads/files/patch-aa29
1 files changed, 27 insertions, 2 deletions
diff --git a/devel/linuxthreads/files/patch-aa b/devel/linuxthreads/files/patch-aa
index e0a30bfaa397..b411dc08d7cd 100644
--- a/devel/linuxthreads/files/patch-aa
+++ b/devel/linuxthreads/files/patch-aa
@@ -13,15 +13,23 @@ diff -ru ../../work/linuxthreads-2.2.3/Examples/Makefile ./Examples/Makefile
diff -ru ../../work/linuxthreads-2.2.3/Makefile ./Makefile
--- ../../work/linuxthreads-2.2.3/Makefile Wed Apr 25 21:50:59 2001
+++ ./Makefile Thu Jun 7 23:13:52 2001
-@@ -1,128 +1,91 @@
+@@ -1,128 +1,104 @@
-# Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
-# This file is part of the GNU C Library.
+LIB=lthread
++.if defined(LINUXTHREADS_WRAP_API)
++.if defined(USING_GCC3)
++SHLIB_MAJOR= 5
++.else
++SHLIB_MAJOR= 4
++.endif
++.else
+.if defined(USING_GCC3)
+SHLIB_MAJOR= 3
+.else
+SHLIB_MAJOR= 2
+.endif
++.endif
+SHLIB_MINOR= 2
+
+.if defined(INSTALL_LIBLTHREAD_PIC_ARCHIVE)
@@ -61,6 +69,11 @@ diff -ru ../../work/linuxthreads-2.2.3/Makefile ./Makefile
+CFLAGS += -DLINUXTHREADS_DETECT_UNSAFE_EXIT
+.endif
+
++.if defined(LINUXTHREADS_WRAP_API)
++CFLAGS += -DLINUXTHREADS_WRAP_API
++LD=${LINUXTHREADS_WRAP_LD}
++.endif
++
+AINC = -I${LIBSRC_BASE}/libc/${MACHINE_ARCH} -I${.CURDIR}/sysdeps/${MACHINE_ARCH}
+
+# Contents of the library.
@@ -262,14 +275,26 @@ diff -ru ../../work/linuxthreads-2.2.3/attr.c ./attr.c
diff -ru ../../work/linuxthreads-2.2.3/cancel.c ./cancel.c
--- ../../work/linuxthreads-2.2.3/cancel.c Thu Apr 12 23:10:53 2001
+++ ./cancel.c Thu Jun 7 22:59:29 2001
-@@ -20,7 +20,6 @@
+@@ -20,8 +20,10 @@
#include "internals.h"
#include "spinlock.h"
#include "restart.h"
-#include <stackinfo.h>
++#if 1
++#define FRAME_LEFT(frame, other) 0
++#else
#ifdef _STACK_GROWS_DOWN
# define FRAME_LEFT(frame, other) ((char *) frame >= (char *) other)
+ #elif _STACK_GROWS_UP
+@@ -29,6 +31,7 @@
+ #else
+ # error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP"
+ #endif
++#endif
+
+
+ int pthread_setcancelstate(int state, int * oldstate)
@@ -202,9 +201,11 @@
break;
}