xref: /openbsd/lib/libc/stdio/flockfile.c (revision 3d8817e4)
1 /*	$OpenBSD: flockfile.c,v 1.7 2004/09/28 18:12:44 otto Exp $	*/
2 
3 #include <sys/time.h>
4 #include <stdio.h>
5 #include "thread_private.h"
6 
7 /*
8  * Subroutine versions of the macros in <stdio.h>
9  * Note that these are all no-ops because libc does not do threads.
10  * Strong implementation of file locking in libc_r/uthread/uthread_file.c
11  */
12 
13 #undef flockfile
14 #undef ftrylockfile
15 #undef funlockfile
16 
17 WEAK_PROTOTYPE(flockfile);
18 WEAK_PROTOTYPE(ftrylockfile);
19 WEAK_PROTOTYPE(funlockfile);
20 
21 WEAK_ALIAS(flockfile);
22 WEAK_ALIAS(ftrylockfile);
23 WEAK_ALIAS(funlockfile);
24 
25 void
26 WEAK_NAME(flockfile)(FILE * fp)
27 {
28 }
29 
30 
31 int
32 WEAK_NAME(ftrylockfile)(FILE *fp)
33 {
34 
35 	return 0;
36 }
37 
38 void
39 WEAK_NAME(funlockfile)(FILE * fp)
40 {
41 }
42