1 /* $OpenBSD: local.h,v 1.14 2009/10/22 01:23:16 guenther Exp $ */
4 * SPDX-License-Identifier: BSD-3-Clause
6 * Copyright (C) 1990, 1993
7 * The Regents of the University of California. All rights reserved.
9 * This code is derived from software contributed to Berkeley by
14 * Information local to this implementation of stdio,
15 * in particular, macros and private variables.
24 __attribute__((visibility("hidden")))
25 int __sflush(LTTNG_UST_LFILE
*);
27 __attribute__((visibility("hidden")))
28 LTTNG_UST_LFILE
*__sfp(void);
30 __attribute__((visibility("hidden")))
31 int __srefill(LTTNG_UST_LFILE
*);
33 __attribute__((visibility("hidden")))
34 int __sread(void *, char *, int);
36 __attribute__((visibility("hidden")))
37 int __swrite(void *, const char *, int);
39 __attribute__((visibility("hidden")))
40 fpos_t __sseek(void *, fpos_t, int);
42 __attribute__((visibility("hidden")))
45 __attribute__((visibility("hidden")))
48 __attribute__((visibility("hidden")))
51 __attribute__((visibility("hidden")))
52 void __smakebuf(LTTNG_UST_LFILE
*);
54 __attribute__((visibility("hidden")))
55 int __swhatbuf(LTTNG_UST_LFILE
*, size_t *, int *);
57 __attribute__((visibility("hidden")))
58 int _fwalk(int (*)(LTTNG_UST_LFILE
*));
60 __attribute__((visibility("hidden")))
61 int __swsetup(LTTNG_UST_LFILE
*);
63 __attribute__((visibility("hidden")))
64 int __sflags(const char *, int *);
66 __attribute__((visibility("hidden")))
67 wint_t __fgetwc_unlock(LTTNG_UST_LFILE
*);
69 __attribute__((visibility("hidden")))
70 extern void __atexit_register_cleanup(void (*)(void));
72 __attribute__((visibility("hidden")))
73 extern int __sdidinit
;
76 * Return true if the given LTTNG_UST_LFILE cannot be written now.
78 #define cantwrite(fp) \
79 ((((fp)->_flags & __SWR) == 0 || (fp)->_bf._base == NULL) && \
83 * Test whether the given stdio file has an active ungetc buffer;
84 * release such a buffer, without restoring ordinary unread data.
86 #define HASUB(fp) (_UB(fp)._base != NULL)
87 #define FREEUB(fp) { \
88 if (_UB(fp)._base != (fp)->_ubuf) \
89 free(_UB(fp)._base); \
90 _UB(fp)._base = NULL; \
94 * test for an fgetln() buffer.
96 #define HASLB(fp) ((fp)->_lb._base != NULL)
97 #define FREELB(fp) { \
98 free((char *)(fp)->_lb._base); \
99 (fp)->_lb._base = NULL; \
This page took 0.038734 seconds and 4 git commands to generate.