xref: /openbsd-src/lib/libc/stdio/flockfile.c (revision 91f110e064cd7c194e59e019b83bb7496c1c84d4)
1 /*	$OpenBSD: flockfile.c,v 1.8 2012/09/01 01:08:16 fgsch 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 librthread/rthread_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