sllibc/include/errno.h

31 lines
909 B
C
Raw Normal View History

2025-06-04 01:22:53 +10:00
// Copyright (c) 2025, Zak Fenton
// Zak Fenton's libc is licensed under the Mulan PSL v2. You can use this
// software according to the terms and conditions of the Mulan PSL v2.
// You may obtain a copy of Mulan PSL v2 at:
// http://license.coscl.org.cn/MulanPSL2
// THIS SOFTWARE IS PROVIDED ON AN “AS IS” BASIS, WITHOUT warranties of
// any kind, either express or implied, including but not limited to
// non-infringement, merchantability or fit for a particular purpose.
// See the Mulan PSL v2 for more details.
#ifndef _LIBC_ERRNO_H
#define _LIBC_ERRNO_H
//extern int errno;
/* On modern Linux platforms the errno is simulated. This is presumably so that each
* thread can have it's own errno without the ABI becoming a huge mess.
*/
#ifdef __MAC
int errno;
#else
int* __errno_location();
#define errno __errno_location()[0]
#endif
#define ENOENT 2
/* From ifndef at top of file: */
#endif