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