xref: /openbsd-src/lib/libc/stdio/flockfile.c (revision b725ae7711052a2233e31a66fefb8a752c388d7a)
1 /*	$OpenBSD: flockfile.c,v 1.5 2001/09/04 22:17:45 fgsch Exp $	*/
2 
3 #include <stdio.h>
4 #include "thread_private.h"
5 
6 /*
7  * Subroutine versions of the macros in <stdio.h>
8  * Note that these are all no-ops because libc does not do threads.
9  * Strong implementation of file locking in libc_r/uthread/uthread_file.c
10  */
11 
12 #undef flockfile
13 #undef ftrylockfile
14 #undef funlockfile
15 #undef _flockfile_debug
16 
17 WEAK_PROTOTYPE(flockfile);
18 WEAK_PROTOTYPE(ftrylockfile);
19 WEAK_PROTOTYPE(funlockfile);
20 WEAK_PROTOTYPE(_flockfile_debug);
21 
22 WEAK_ALIAS(flockfile);
23 WEAK_ALIAS(ftrylockfile);
24 WEAK_ALIAS(funlockfile);
25 WEAK_ALIAS(_flockfile_debug);
26 
27 void
28 WEAK_NAME(flockfile)(fp)
29 	FILE * fp;
30 {
31 }
32 
33 
34 int
35 WEAK_NAME(ftrylockfile)(fp)
36 	FILE * fp;
37 {
38 
39 	return 0;
40 }
41 
42 void
43 WEAK_NAME(funlockfile)(fp)
44 	FILE * fp;
45 {
46 }
47 
48 void
49 WEAK_NAME(_flockfile_debug)(fp, fname, lineno)
50 	FILE * fp;
51 	char * fname;
52 	int lineno;
53 {
54 }
55 
56