master
 1/* Copyright (C) 1991-2025 Free Software Foundation, Inc.
 2   This file is part of the GNU C Library.
 3
 4   The GNU C Library is free software; you can redistribute it and/or
 5   modify it under the terms of the GNU Lesser General Public
 6   License as published by the Free Software Foundation; either
 7   version 2.1 of the License, or (at your option) any later version.
 8
 9   The GNU C Library is distributed in the hope that it will be useful,
10   but WITHOUT ANY WARRANTY; without even the implied warranty of
11   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12   Lesser General Public License for more details.
13
14   You should have received a copy of the GNU Lesser General Public
15   License along with the GNU C Library; if not, see
16   <https://www.gnu.org/licenses/>.  */
17
18/*
19 *	ISO C99 Standard: 7.5 Errors	<errno.h>
20 */
21
22#ifndef	_ERRNO_H
23#define	_ERRNO_H 1
24
25#include <features.h>
26
27/* The system-specific definitions of the E* constants, as macros.  */
28#include <bits/errno.h>
29
30/* When included from assembly language, this header only provides the
31   E* constants.  */
32#ifndef __ASSEMBLER__
33
34__BEGIN_DECLS
35
36/* The error code set by various library functions.  */
37extern int *__errno_location (void) __THROW __attribute_const__;
38# define errno (*__errno_location ())
39
40# ifdef __USE_GNU
41
42/* The full and simple forms of the name with which the program was
43   invoked.  These variables are set up automatically at startup based on
44   the value of argv[0].  */
45extern char *program_invocation_name;
46extern char *program_invocation_short_name;
47
48#include <bits/types/error_t.h>
49
50# endif /* __USE_GNU */
51
52__END_DECLS
53
54#endif /* !__ASSEMBLER__ */
55#endif /* errno.h */