1/* Prototypes for compatibility double == long double entry points.
2 Copyright (C) 2006-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19#ifndef __NLDBL_COMPAT_H
20#define __NLDBL_COMPAT_H 1
21
22/* Ensure calls to libm functions from libnldbl_nonshared.a call
23 public names, not libm-internal names. */
24#define NO_MATH_REDIRECT
25
26/* Avoid long double prototypes. */
27#define __NO_LONG_DOUBLE_MATH 1
28#include <argp.h>
29#include <err.h>
30#include <error.h>
31#include <stdarg.h>
32#include <stdlib.h>
33#include <stdint.h>
34#include <stdio.h>
35#include <printf.h>
36#include <wchar.h>
37#include <math.h>
38#include <monetary.h>
39#include <sys/syslog.h>
40
41
42/* Declare the __nldbl_NAME function the wrappers call that's in libc.so. */
43#define NLDBL_DECL(name) extern __typeof (name) __nldbl_##name
44
45NLDBL_DECL (_IO_vfscanf);
46NLDBL_DECL (vfscanf);
47NLDBL_DECL (vfwscanf);
48NLDBL_DECL (obstack_vprintf);
49NLDBL_DECL (vasprintf);
50NLDBL_DECL (dprintf);
51NLDBL_DECL (vdprintf);
52NLDBL_DECL (fprintf);
53NLDBL_DECL (vfprintf);
54NLDBL_DECL (vfwprintf);
55NLDBL_DECL (vsnprintf);
56NLDBL_DECL (vsprintf);
57NLDBL_DECL (vsscanf);
58NLDBL_DECL (vswprintf);
59NLDBL_DECL (vswscanf);
60NLDBL_DECL (__asprintf);
61NLDBL_DECL (asprintf);
62NLDBL_DECL (__printf_fp);
63NLDBL_DECL (printf_size);
64NLDBL_DECL (syslog);
65NLDBL_DECL (vsyslog);
66NLDBL_DECL (qecvt);
67NLDBL_DECL (qfcvt);
68NLDBL_DECL (qgcvt);
69NLDBL_DECL (__isoc99_scanf);
70NLDBL_DECL (__isoc99_fscanf);
71NLDBL_DECL (__isoc99_sscanf);
72NLDBL_DECL (__isoc99_vscanf);
73NLDBL_DECL (__isoc99_vfscanf);
74NLDBL_DECL (__isoc99_vsscanf);
75NLDBL_DECL (__isoc99_wscanf);
76NLDBL_DECL (__isoc99_fwscanf);
77NLDBL_DECL (__isoc99_swscanf);
78NLDBL_DECL (__isoc99_vwscanf);
79NLDBL_DECL (__isoc99_vfwscanf);
80NLDBL_DECL (__isoc99_vswscanf);
81NLDBL_DECL (__isoc23_scanf);
82NLDBL_DECL (__isoc23_fscanf);
83NLDBL_DECL (__isoc23_sscanf);
84NLDBL_DECL (__isoc23_vscanf);
85NLDBL_DECL (__isoc23_vfscanf);
86NLDBL_DECL (__isoc23_vsscanf);
87NLDBL_DECL (__isoc23_wscanf);
88NLDBL_DECL (__isoc23_fwscanf);
89NLDBL_DECL (__isoc23_swscanf);
90NLDBL_DECL (__isoc23_vwscanf);
91NLDBL_DECL (__isoc23_vfwscanf);
92NLDBL_DECL (__isoc23_vswscanf);
93NLDBL_DECL (argp_error);
94NLDBL_DECL (argp_failure);
95NLDBL_DECL (warn);
96NLDBL_DECL (vwarn);
97NLDBL_DECL (warnx);
98NLDBL_DECL (vwarnx);
99NLDBL_DECL (err);
100NLDBL_DECL (verr);
101NLDBL_DECL (errx);
102NLDBL_DECL (verrx);
103NLDBL_DECL (error);
104NLDBL_DECL (error_at_line);
105
106/* These do not exist in the normal interface, but must exist in the
107 __nldbl interface so that they can be called from libnldbl. */
108extern ssize_t __nldbl___vstrfmon (char *, size_t, const char *, va_list)
109 __THROW;
110extern ssize_t __nldbl___vstrfmon_l (char *, size_t, locale_t, const char *,
111 va_list)
112 __THROW;
113
114/* These don't use __typeof because they were not declared by the headers,
115 since we don't compile with _FORTIFY_SOURCE. */
116extern int __nldbl___vfprintf_chk (FILE *__restrict, int,
117 const char *__restrict, __gnuc_va_list);
118extern int __nldbl___vfwprintf_chk (FILE *__restrict, int,
119 const wchar_t *__restrict, __gnuc_va_list);
120extern int __nldbl___vsprintf_chk (char *__restrict, int, size_t,
121 const char *__restrict, __gnuc_va_list)
122 __THROW;
123extern int __nldbl___vsnprintf_chk (char *__restrict, size_t, int, size_t,
124 const char *__restrict, __gnuc_va_list)
125 __THROW;
126extern int __nldbl___vswprintf_chk (wchar_t *__restrict, size_t, int, size_t,
127 const wchar_t *__restrict, __gnuc_va_list)
128 __THROW;
129extern int __nldbl___vasprintf_chk (char **, int, const char *, __gnuc_va_list)
130 __THROW;
131extern int __nldbl___vdprintf_chk (int, int, const char *, __gnuc_va_list);
132extern int __nldbl___obstack_vprintf_chk (struct obstack *, int, const char *,
133 __gnuc_va_list) __THROW;
134extern void __nldbl___vsyslog_chk (int, int, const char *, va_list);
135
136/* The original declarations of these were hidden by the including
137 file. */
138extern double __nldbl_daddl (double, double) __THROW;
139extern double __nldbl_ddivl (double, double) __THROW;
140extern double __nldbl_dmull (double, double) __THROW;
141extern double __nldbl_dsubl (double, double) __THROW;
142
143#endif /* __NLDBL_COMPAT_H */
144

source code of glibc/sysdeps/ieee754/ldbl-opt/nldbl-compat.h