]> git.ipfire.org Git - thirdparty/glibc.git/blame - stdlib/errno.h
Update copyright dates with scripts/update-copyrights
[thirdparty/glibc.git] / stdlib / errno.h
CommitLineData
2b778ceb 1/* Copyright (C) 1991-2021 Free Software Foundation, Inc.
739d440d
UD
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
59ba27a6 15 License along with the GNU C Library; if not, see
5a82c748 16 <https://www.gnu.org/licenses/>. */
739d440d
UD
17
18/*
19 * ISO C99 Standard: 7.5 Errors <errno.h>
20 */
21
22#ifndef _ERRNO_H
fd860eaa 23#define _ERRNO_H 1
739d440d 24
fd860eaa 25#include <features.h>
739d440d 26
fd860eaa 27/* The system-specific definitions of the E* constants, as macros. */
739d440d 28#include <bits/errno.h>
739d440d 29
fd860eaa
ZW
30/* When included from assembly language, this header only provides the
31 E* constants. */
32#ifndef __ASSEMBLER__
739d440d 33
fd860eaa 34__BEGIN_DECLS
739d440d 35
fd860eaa
ZW
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
739d440d
UD
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
8458956a 44 the value of argv[0]. */
fd860eaa
ZW
45extern char *program_invocation_name;
46extern char *program_invocation_short_name;
739d440d 47
974393ea 48#include <bits/types/error_t.h>
739d440d 49
fd860eaa 50# endif /* __USE_GNU */
739d440d 51
fd860eaa
ZW
52__END_DECLS
53
54#endif /* !__ASSEMBLER__ */
55#endif /* errno.h */