aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authortegge <tegge@FreeBSD.org>2001-02-26 22:09:46 +0800
committertegge <tegge@FreeBSD.org>2001-02-26 22:09:46 +0800
commitae95973c0b48fae530168f732a541fc4c33f68e9 (patch)
tree093ffae34c41eddf060c458f938512d1e805d0ae /devel
parent772efaaac0eacb1daaa2adee72fca84a15982f79 (diff)
downloadfreebsd-ports-gnome-ae95973c0b48fae530168f732a541fc4c33f68e9.tar.gz
freebsd-ports-gnome-ae95973c0b48fae530168f732a541fc4c33f68e9.tar.zst
freebsd-ports-gnome-ae95973c0b48fae530168f732a541fc4c33f68e9.zip
Use __error() from liblthread instead of the libc version.
Diffstat (limited to 'devel')
-rw-r--r--devel/linuxthreads/files/freebsd-compat.h1
-rw-r--r--devel/linuxthreads/files/patch-aa68
2 files changed, 48 insertions, 21 deletions
diff --git a/devel/linuxthreads/files/freebsd-compat.h b/devel/linuxthreads/files/freebsd-compat.h
index 17972257aafc..6e1c7b89c747 100644
--- a/devel/linuxthreads/files/freebsd-compat.h
+++ b/devel/linuxthreads/files/freebsd-compat.h
@@ -29,7 +29,6 @@
#define __getpid _getpid
#define __jmp_buf jmp_buf
#define __sigaction _sigaction
-#define _errno errno
#define _h_errno h_errno
#define __ptr_t void *
#define __pid_t pid_t
diff --git a/devel/linuxthreads/files/patch-aa b/devel/linuxthreads/files/patch-aa
index e573f616b9d2..4096f66324f9 100644
--- a/devel/linuxthreads/files/patch-aa
+++ b/devel/linuxthreads/files/patch-aa
@@ -1,6 +1,6 @@
diff -ru ../linuxthreads/Examples/Makefile ./Examples/Makefile
--- ../linuxthreads/Examples/Makefile Wed Mar 11 13:42:23 1998
-+++ ./Examples/Makefile Sun Feb 25 09:34:02 2001
++++ ./Examples/Makefile Mon Feb 26 12:36:31 2001
@@ -1,8 +1,8 @@
CC=gcc
-CFLAGS=-g -O -Wall -I.. -D_REENTRANT
@@ -15,7 +15,7 @@ diff -ru ../linuxthreads/Examples/Makefile ./Examples/Makefile
diff -ru ../linuxthreads/Makefile ./Makefile
--- ../linuxthreads/Makefile Wed Nov 3 01:09:36 1999
-+++ ./Makefile Sun Feb 25 09:34:02 2001
++++ ./Makefile Mon Feb 26 12:36:31 2001
@@ -1,68 +1,74 @@
-# Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
-# This file is part of the GNU C Library.
@@ -160,7 +160,7 @@ diff -ru ../linuxthreads/Makefile ./Makefile
+.include <bsd.lib.mk>
diff -ru ../linuxthreads/attr.c ./attr.c
--- ../linuxthreads/attr.c Tue Oct 27 14:51:54 1998
-+++ ./attr.c Sun Feb 25 09:34:02 2001
++++ ./attr.c Mon Feb 26 12:36:31 2001
@@ -27,7 +27,7 @@
attr->__detachstate = PTHREAD_CREATE_JOINABLE;
@@ -170,9 +170,28 @@ diff -ru ../linuxthreads/attr.c ./attr.c
attr->__inheritsched = PTHREAD_EXPLICIT_SCHED;
attr->__scope = PTHREAD_SCOPE_SYSTEM;
attr->__guardsize = ps;
+diff -ru ../linuxthreads/errno.c ./errno.c
+--- ../linuxthreads/errno.c Wed Aug 26 17:57:28 1998
++++ ./errno.c Mon Feb 26 12:53:17 2001
+@@ -19,13 +19,13 @@
+ #include "pthread.h"
+ #include "internals.h"
+
+-int * __errno_location()
++int * __error()
+ {
+ pthread_descr self = thread_self();
+ return THREAD_GETMEM (self, p_errnop);
+ }
+
+-int * __h_errno_location()
++int * __h_error()
+ {
+ pthread_descr self = thread_self();
+ return THREAD_GETMEM (self, p_h_errnop);
diff -ru ../linuxthreads/internals.h ./internals.h
--- ../linuxthreads/internals.h Fri Jan 21 02:40:19 2000
-+++ ./internals.h Sun Feb 25 09:34:02 2001
++++ ./internals.h Mon Feb 26 12:36:31 2001
@@ -26,8 +26,8 @@
#include <unistd.h>
#include <sys/types.h>
@@ -219,7 +238,7 @@ diff -ru ../linuxthreads/internals.h ./internals.h
diff -ru ../linuxthreads/join.c ./join.c
--- ../linuxthreads/join.c Thu Jan 6 02:45:15 2000
-+++ ./join.c Sun Feb 25 09:34:02 2001
++++ ./join.c Mon Feb 26 12:36:31 2001
@@ -39,6 +39,7 @@
THREAD_SETMEM(self, p_retval, retval);
/* Say that we've terminated */
@@ -238,7 +257,7 @@ diff -ru ../linuxthreads/join.c ./join.c
__pthread_unlock(THREAD_GETMEM(self, p_lock));
diff -ru ../linuxthreads/manager.c ./manager.c
--- ../linuxthreads/manager.c Fri Jan 21 02:40:19 2000
-+++ ./manager.c Sun Feb 25 09:34:02 2001
++++ ./manager.c Mon Feb 26 12:36:31 2001
@@ -52,8 +52,10 @@
(set to 1 by gdb) */
volatile int __pthread_threads_debug;
@@ -389,7 +408,7 @@ diff -ru ../linuxthreads/manager.c ./manager.c
thread, but excluding the thread from which the exit request originated
diff -ru ../linuxthreads/pthread.c ./pthread.c
--- ../linuxthreads/pthread.c Fri Jan 21 02:40:19 2000
-+++ ./pthread.c Sun Feb 25 09:36:18 2001
++++ ./pthread.c Mon Feb 26 13:11:57 2001
@@ -20,6 +20,7 @@
#include <stdlib.h>
#include <string.h>
@@ -464,7 +483,13 @@ diff -ru ../linuxthreads/pthread.c ./pthread.c
int __pthread_exit_code = 0;
/* Pointers that select new or old suspend/resume functions
-@@ -176,13 +188,15 @@
+@@ -171,18 +183,20 @@
+ p_pid);
+
+ /* These variables are used by the setup code. */
+-extern int _errno;
++extern int _errno __asm__("errno");
+ extern int _h_errno;
/* Forward declarations */
@@ -628,7 +653,7 @@ diff -ru ../linuxthreads/pthread.c ./pthread.c
/* Make current thread the main thread in case the calling thread
changes its mind, does not exec(), and creates new threads instead. */
__pthread_reset_main_thread();
-@@ -838,3 +859,10 @@
+@@ -838,3 +859,13 @@
static const int *const __pthread_require_wrappers =
&__pthread_provide_wrappers;
#endif
@@ -638,10 +663,13 @@ diff -ru ../linuxthreads/pthread.c ./pthread.c
+static int (*unusedref)(pthread_mutex_t **mutex, const pthread_mutexattr_t *mattr) __attribute__ ((unused)) = _pthread_mutex_init;
+
+extern void _flockfile(FILE *fp);
-+static int (*unusedref2)(FILE *fp) = _flockfile;
++static void (*unusedref2)(FILE *fp) __attribute__ ((unused)) = _flockfile;
++
++extern int *__error(void);
++static int *(*unusedref3)(void) __attribute__ ((unused)) = __error;
diff -ru ../linuxthreads/ptlongjmp.c ./ptlongjmp.c
--- ../linuxthreads/ptlongjmp.c Tue Oct 27 14:52:00 1998
-+++ ./ptlongjmp.c Sun Feb 25 09:34:02 2001
++++ ./ptlongjmp.c Mon Feb 26 12:36:31 2001
@@ -19,13 +19,14 @@
#include "pthread.h"
#include "internals.h"
@@ -675,7 +703,7 @@ diff -ru ../linuxthreads/ptlongjmp.c ./ptlongjmp.c
}
diff -ru ../linuxthreads/semaphore.h ./semaphore.h
--- ../linuxthreads/semaphore.h Wed Feb 23 08:02:52 2000
-+++ ./semaphore.h Sun Feb 25 09:34:02 2001
++++ ./semaphore.h Mon Feb 26 12:36:31 2001
@@ -15,7 +15,6 @@
#ifndef _SEMAPHORE_H
#define _SEMAPHORE_H 1
@@ -686,7 +714,7 @@ diff -ru ../linuxthreads/semaphore.h ./semaphore.h
#ifndef _PTHREAD_DESCR_DEFINED
diff -ru ../linuxthreads/signals.c ./signals.c
--- ../linuxthreads/signals.c Mon Oct 4 21:50:04 1999
-+++ ./signals.c Sun Feb 25 09:34:02 2001
++++ ./signals.c Mon Feb 26 12:36:31 2001
@@ -20,7 +20,6 @@
#include "internals.h"
#include "spinlock.h"
@@ -755,7 +783,7 @@ diff -ru ../linuxthreads/signals.c ./signals.c
or real-time signal. */
diff -ru ../linuxthreads/spinlock.c ./spinlock.c
--- ../linuxthreads/spinlock.c Thu Jan 6 02:47:19 2000
-+++ ./spinlock.c Sun Feb 25 09:34:02 2001
++++ ./spinlock.c Mon Feb 26 12:36:31 2001
@@ -137,7 +137,6 @@
#if !defined HAS_COMPARE_AND_SWAP || defined TEST_FOR_COMPARE_AND_SWAP
@@ -775,7 +803,7 @@ diff -ru ../linuxthreads/spinlock.c ./spinlock.c
struct timespec tm;
diff -ru ../linuxthreads/spinlock.h ./spinlock.h
--- ../linuxthreads/spinlock.h Thu Jan 6 02:45:15 2000
-+++ ./spinlock.h Sun Feb 25 09:34:02 2001
++++ ./spinlock.h Mon Feb 26 12:36:31 2001
@@ -71,6 +71,8 @@
return 0;
}
@@ -787,7 +815,7 @@ diff -ru ../linuxthreads/spinlock.h ./spinlock.h
/* Operations on pthread_atomic, which is defined in internals.h */
diff -ru ../linuxthreads/sysdeps/pthread/bits/pthreadtypes.h ./sysdeps/pthread/bits/pthreadtypes.h
--- ../linuxthreads/sysdeps/pthread/bits/pthreadtypes.h Fri Jan 21 02:40:19 2000
-+++ ./sysdeps/pthread/bits/pthreadtypes.h Sun Feb 25 09:34:03 2001
++++ ./sysdeps/pthread/bits/pthreadtypes.h Mon Feb 26 12:36:31 2001
@@ -20,7 +20,6 @@
#define _BITS_PTHREADTYPES_H 1
@@ -807,7 +835,7 @@ diff -ru ../linuxthreads/sysdeps/pthread/bits/pthreadtypes.h ./sysdeps/pthread/b
size_t __guardsize;
diff -ru ../linuxthreads/sysdeps/pthread/pthread.h ./sysdeps/pthread/pthread.h
--- ../linuxthreads/sysdeps/pthread/pthread.h Fri Jan 21 02:40:19 2000
-+++ ./sysdeps/pthread/pthread.h Sun Feb 25 09:34:03 2001
++++ ./sysdeps/pthread/pthread.h Mon Feb 26 12:36:31 2001
@@ -15,7 +15,6 @@
#ifndef _PTHREAD_H
#define _PTHREAD_H 1
@@ -827,7 +855,7 @@ diff -ru ../linuxthreads/sysdeps/pthread/pthread.h ./sysdeps/pthread/pthread.h
struct _pthread_cleanup_buffer *__prev; /* Chaining of cleanup functions. */
diff -ru ../linuxthreads/sysdeps/unix/sysv/linux/bits/local_lim.h ./sysdeps/unix/sysv/linux/bits/local_lim.h
--- ../linuxthreads/sysdeps/unix/sysv/linux/bits/local_lim.h Thu Nov 12 19:03:14 1998
-+++ ./sysdeps/unix/sysv/linux/bits/local_lim.h Sun Feb 25 09:34:03 2001
++++ ./sysdeps/unix/sysv/linux/bits/local_lim.h Mon Feb 26 12:36:31 2001
@@ -24,7 +24,7 @@
#endif
@@ -839,7 +867,7 @@ diff -ru ../linuxthreads/sysdeps/unix/sysv/linux/bits/local_lim.h ./sysdeps/unix
#ifdef __undef_NR_OPEN
diff -ru ../linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h ./sysdeps/unix/sysv/linux/bits/sigthread.h
--- ../linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h Sat Sep 12 23:33:14 1998
-+++ ./sysdeps/unix/sysv/linux/bits/sigthread.h Sun Feb 25 09:34:03 2001
++++ ./sysdeps/unix/sysv/linux/bits/sigthread.h Mon Feb 26 12:36:31 2001
@@ -28,8 +28,8 @@
/* Modify the signal mask for the calling thread. The arguments have
@@ -853,7 +881,7 @@ diff -ru ../linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h ./sysdeps/unix
extern int pthread_kill __P ((pthread_t __thread, int __signo));
diff -ru ../linuxthreads/wrapsyscall.c ./wrapsyscall.c
--- ../linuxthreads/wrapsyscall.c Tue Dec 1 20:34:20 1998
-+++ ./wrapsyscall.c Sun Feb 25 09:34:03 2001
++++ ./wrapsyscall.c Mon Feb 26 12:36:31 2001
@@ -29,6 +29,7 @@
#include <sys/resource.h>
#include <sys/wait.h>