/* Copyright (C) 1993-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>.
As a special exception, if you link the code in this file with
files compiled with a GNU compiler to produce an executable,
that does not cause the resulting executable to be covered by
the GNU Lesser General Public License. This exception does not
however invalidate any other reasons why the executable file
might be covered by the GNU Lesser General Public License.
This exception applies to code released by its copyright holders
in files containing the exception. */
/* NOTE: libio is now exclusively used only by glibc since libstdc++ has its
own implementation. As a result, functions that were implemented for C++
(like *sputn) may no longer have C++ semantics. This is of course only
relevant for internal callers of these functions since these functions are
not intended for external use otherwise.
FIXME: All of the C++ cruft eventually needs to go away. */
#ifndef _LIBIOP_H
#define _LIBIOP_H 1
#include <stddef.h>
#include <errno.h>
#include <libc-lock.h>
#include <math_ldbl_opt.h>
#include <stdio.h>
#include <libio/libio.h>
#include "iolibio.h"
#include <shlib-compat.h>
/* For historical reasons this is the name of the sysdeps header that
adjusts the libio configuration. */
#include <_G_config.h>
#define _IO_seek_set 0
#define _IO_seek_cur 1
#define _IO_seek_end 2
/* THE JUMPTABLE FUNCTIONS.
* The _IO_FILE type is used to implement the FILE type in GNU libc,
* as well as the streambuf class in GNU iostreams for C++.
* These are all the same, just used differently.
* An _IO_FILE (or FILE) object is allows followed by a pointer to
* a jump table (of pointers to functions). The pointer is accessed
* with the _IO_JUMPS macro. The jump table has an eccentric format,
* so as to be compatible with the layout of a C++ virtual function table.
* (as implemented by g++). When a pointer to a streambuf object is