// 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_INTERNAL_H #define _LIBC_INTERNAL_H /* This should be called when a function isn't yet implemented or some similar * irreconcilable error exists. */ void _libc_fatal(const char* errorstr, const char* function); /* The _libc_fatalf function is like _libc_fatal except prints a formatted * string ("printf style"). */ /*void #ifdef _ZCC __classic_call #endif _libc_fatalf(const char* fmt, ...);*/ #define FATAL(msg) \ _libc_fatal(msg, __func__); #define UNIMPLEMENTED() \ _libc_fatal("Unimplemented libc function", __func__) /* From ifndef at top of file: */ #endif