diff options
author | 2000-01-06 08:26:04 +0000 | |
---|---|---|
committer | 2000-01-06 08:26:04 +0000 | |
commit | 178cb5e6c9aa612178f8e08892aaea612f66bb0b (patch) | |
tree | ec450074595f3f3bcfca2162932b2d488a58572b /lib/libc | |
parent | _THREAD_PRIVATE_* macros changed (diff) | |
download | wireguard-openbsd-178cb5e6c9aa612178f8e08892aaea612f66bb0b.tar.xz wireguard-openbsd-178cb5e6c9aa612178f8e08892aaea612f66bb0b.zip |
use WEAK_* macros
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/stdio/flockfile.c | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/lib/libc/stdio/flockfile.c b/lib/libc/stdio/flockfile.c index d720aee991a..43c564e6b4f 100644 --- a/lib/libc/stdio/flockfile.c +++ b/lib/libc/stdio/flockfile.c @@ -1,13 +1,12 @@ -/* $OpenBSD: flockfile.c,v 1.1 1998/11/20 11:18:48 d Exp $ */ +/* $OpenBSD: flockfile.c,v 1.2 2000/01/06 08:26:04 d Exp $ */ #include <stdio.h> #include "thread_private.h" -#ifndef _THREAD_SAFE - /* * Subroutine versions of the macros in <stdio.h> * Note that these are all no-ops because libc does not do threads. + * Strong implementation of file locking in libc_r/uthread/uthread_file.c */ #undef flockfile @@ -15,35 +14,42 @@ #undef funlockfile #undef _flockfile_debug +WEAK_PROTOTYPE(flockfile); +WEAK_PROTOTYPE(ftrylockfile); +WEAK_PROTOTYPE(funlockfile); +WEAK_PROTOTYPE(_flockfile_debug); + +WEAK_ALIAS(flockfile); +WEAK_ALIAS(ftrylockfile); +WEAK_ALIAS(funlockfile); +WEAK_ALIAS(_flockfile_debug); + void -flockfile(fp) +WEAK_NAME(flockfile)(fp) FILE * fp; { } + int -ftrylockfile(fp) +WEAK_NAME(ftrylockfile)(fp) FILE * fp; { + return 0; } void -funlockfile(fp) +WEAK_NAME(funlockfile)(fp) FILE * fp; { } void -_flockfile_debug(fp, fname, lineno) +WEAK_NAME(_flockfile_debug)(fp, fname, lineno) FILE * fp; const char * fname; int lineno; { } -#else /* _THREAD_SAFE */ - -/* Actual implementation of file locking in libc_r/uthread/uthread_file.c */ - -#endif /* _THREAD_SAFE */ |