Remove LTTNG_HIDDEN macro
[lttng-ust.git] / snprintf / local.h
CommitLineData
bf0d695d
PMF
1/* $OpenBSD: local.h,v 1.14 2009/10/22 01:23:16 guenther Exp $ */
2
c0c0989a
MJ
3/*
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 * Copyright (C) 1990, 1993
bf0d695d
PMF
7 * The Regents of the University of California. All rights reserved.
8 *
9 * This code is derived from software contributed to Berkeley by
10 * Chris Torek.
bf0d695d
PMF
11 */
12
13/*
14 * Information local to this implementation of stdio,
15 * in particular, macros and private variables.
16 */
17
2786d9d5
FD
18#include <stdio.h>
19#include <wchar.h>
bf0d695d
PMF
20#include "various.h"
21#include "wcio.h"
22#include "fileext.h"
23
ddabe860 24__attribute__((visibility("hidden")))
002e1fde 25int __sflush(LTTNG_UST_LFILE *);
ddabe860
MJ
26
27__attribute__((visibility("hidden")))
002e1fde 28LTTNG_UST_LFILE *__sfp(void);
ddabe860
MJ
29
30__attribute__((visibility("hidden")))
002e1fde 31int __srefill(LTTNG_UST_LFILE *);
ddabe860
MJ
32
33__attribute__((visibility("hidden")))
bf0d695d 34int __sread(void *, char *, int);
ddabe860
MJ
35
36__attribute__((visibility("hidden")))
bf0d695d 37int __swrite(void *, const char *, int);
ddabe860
MJ
38
39__attribute__((visibility("hidden")))
bf0d695d 40fpos_t __sseek(void *, fpos_t, int);
ddabe860
MJ
41
42__attribute__((visibility("hidden")))
bf0d695d 43int __sclose(void *);
ddabe860
MJ
44
45__attribute__((visibility("hidden")))
bf0d695d 46void __sinit(void);
ddabe860
MJ
47
48__attribute__((visibility("hidden")))
bf0d695d 49void _cleanup(void);
ddabe860
MJ
50
51__attribute__((visibility("hidden")))
002e1fde 52void __smakebuf(LTTNG_UST_LFILE *);
ddabe860
MJ
53
54__attribute__((visibility("hidden")))
002e1fde 55int __swhatbuf(LTTNG_UST_LFILE *, size_t *, int *);
ddabe860
MJ
56
57__attribute__((visibility("hidden")))
002e1fde 58int _fwalk(int (*)(LTTNG_UST_LFILE *));
ddabe860
MJ
59
60__attribute__((visibility("hidden")))
002e1fde 61int __swsetup(LTTNG_UST_LFILE *);
ddabe860
MJ
62
63__attribute__((visibility("hidden")))
bf0d695d 64int __sflags(const char *, int *);
ddabe860
MJ
65
66__attribute__((visibility("hidden")))
002e1fde 67wint_t __fgetwc_unlock(LTTNG_UST_LFILE *);
bf0d695d 68
ddabe860 69__attribute__((visibility("hidden")))
bf0d695d 70extern void __atexit_register_cleanup(void (*)(void));
ddabe860
MJ
71
72__attribute__((visibility("hidden")))
bf0d695d
PMF
73extern int __sdidinit;
74
75/*
002e1fde 76 * Return true if the given LTTNG_UST_LFILE cannot be written now.
bf0d695d
PMF
77 */
78#define cantwrite(fp) \
79 ((((fp)->_flags & __SWR) == 0 || (fp)->_bf._base == NULL) && \
80 __swsetup(fp))
81
82/*
83 * Test whether the given stdio file has an active ungetc buffer;
84 * release such a buffer, without restoring ordinary unread data.
85 */
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; \
91}
92
93/*
94 * test for an fgetln() buffer.
95 */
96#define HASLB(fp) ((fp)->_lb._base != NULL)
97#define FREELB(fp) { \
98 free((char *)(fp)->_lb._base); \
99 (fp)->_lb._base = NULL; \
100}
This page took 0.035364 seconds and 4 git commands to generate.