summaryrefslogtreecommitdiff
path: root/lib/libpthread/uthread/uthread_file.c
diff options
context:
space:
mode:
authorMarco S Hyman <marc@cvs.openbsd.org>2002-11-07 03:51:22 +0000
committerMarco S Hyman <marc@cvs.openbsd.org>2002-11-07 03:51:22 +0000
commit7fca135058293137732acb571680d5a85f7e7790 (patch)
tree69db19a6488dcc7fa58ec08668586828d1276461 /lib/libpthread/uthread/uthread_file.c
parent213264c1bc5c250790d78dd190c2d5511ba7d163 (diff)
Add needed table of strong functions that override weak functions
in libc so static linking works with -lpthreads. There is a (linker?) problem that still shows up with static -pthread, though. Solution to problem from freebsd.
Diffstat (limited to 'lib/libpthread/uthread/uthread_file.c')
-rw-r--r--lib/libpthread/uthread/uthread_file.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/lib/libpthread/uthread/uthread_file.c b/lib/libpthread/uthread/uthread_file.c
index cf84ffdb88b..73f8cda30f5 100644
--- a/lib/libpthread/uthread/uthread_file.c
+++ b/lib/libpthread/uthread/uthread_file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uthread_file.c,v 1.8 2001/09/04 22:17:45 fgsch Exp $ */
+/* $OpenBSD: uthread_file.c,v 1.9 2002/11/07 03:51:21 marc Exp $ */
/*
* Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>.
* All rights reserved.
@@ -46,13 +46,6 @@
#include "pthread_private.h"
/*
- * Weak symbols for externally visible functions in this file:
- */
-#pragma weak flockfile=_flockfile
-#pragma weak ftrylockfile=_ftrylockfile
-#pragma weak funlockfile=_funlockfile
-
-/*
* The FILE lock structure. The FILE *fp is locked if the owner is
* not NULL. If not locked, the file lock structure can be
* reassigned to a different file by setting fp.
@@ -244,14 +237,14 @@ _flockfile_debug(FILE * fp, char *fname, int lineno)
}
void
-_flockfile(FILE * fp)
+flockfile(FILE * fp)
{
_flockfile_debug(fp, "?", 1);
return;
}
int
-_ftrylockfile(FILE * fp)
+ftrylockfile(FILE * fp)
{
int ret = -1;
int idx = file_idx(fp);
@@ -303,7 +296,7 @@ _ftrylockfile(FILE * fp)
}
void
-_funlockfile(FILE * fp)
+funlockfile(FILE * fp)
{
int idx = file_idx(fp);
struct file_lock *p;