|
1 | | -/* HASH CRC-32:0xd9b4b15a */ |
| 1 | +/* HASH CRC-32:0x4540d3f6 */ |
2 | 2 | /* Copyright (c) 2019-2025 Griefer@Work * |
3 | 3 | * * |
4 | 4 | * This software is provided 'as-is', without any express or implied * |
@@ -74,30 +74,30 @@ __SYSDECL_BEGIN |
74 | 74 | __CDECLARE(,int,__NOTHROW_NCX,humanize_number,(char *__buf, __SIZE_TYPE__ __len, __INT64_TYPE__ __bytes, char const *__suffix, int __scale, int __flags),(__buf,__len,__bytes,__suffix,__scale,__flags)) |
75 | 75 | #endif /* !__humanize_number_defined && __CRT_HAVE_humanize_number */ |
76 | 76 | #ifdef __CRT_HAVE_flopen |
77 | | -__LIBC __fd_t __NOTHROW_RPC(__VLIBCCALL flopen)(const char *__path, __oflag_t __flags, ...) __CASMNAME_SAME("flopen"); |
| 77 | +__LIBC __fd_t __NOTHROW_RPC(__VLIBCCALL flopen)(char const *__path, __oflag_t __flags, ...) __CASMNAME_SAME("flopen"); |
78 | 78 | #else /* __CRT_HAVE_flopen */ |
79 | 79 | #include <asm/os/fcntl.h> |
80 | 80 | #include <asm/os/oflags.h> |
81 | 81 | #include <bits/os/stat.h> |
82 | 82 | #if (defined(__AT_FDCWD) && (defined(__CRT_HAVE_flopenat) || (defined(__LOCK_EX) && (defined(__LOCK_NB) || !defined(__O_NONBLOCK)) && (defined(__CRT_HAVE_openat64) || defined(__CRT_HAVE_openat)) && (defined(__CRT_HAVE_flock) || defined(__CRT_HAVE___flock)) && ((defined(__CRT_HAVE_kfstat) && defined(__CRT_KOS_PRIMARY)) || (defined(__CRT_HAVE_kfstat64) && defined(__CRT_KOS_PRIMARY)) || defined(__CRT_HAVE_fstat) || defined(__CRT_HAVE_fstat64) || defined(__CRT_HAVE___fstat64_time64) || defined(__CRT_HAVE__fstat) || defined(__CRT_HAVE__fstat32) || defined(__CRT_HAVE__fstati64) || defined(__CRT_HAVE__fstat32i64) || defined(__CRT_HAVE__fstat64) || defined(__CRT_HAVE__fstat64i32)) && ((defined(__CRT_HAVE_kfstatat) && defined(__CRT_KOS_PRIMARY)) || (defined(__CRT_HAVE_kfstatat64) && defined(__CRT_KOS_PRIMARY)) || defined(__CRT_HAVE_fstatat) || defined(__CRT_HAVE_fstatat64) || defined(__CRT_HAVE___fstatat64_time64)) && (defined(__CRT_HAVE_ftruncate64) || defined(__CRT_HAVE__chsize_s) || defined(__CRT_HAVE_ftruncate) || defined(__CRT_HAVE___ftruncate) || defined(__CRT_HAVE___libc_ftruncate) || defined(__CRT_HAVE__chsize) || defined(__CRT_HAVE_chsize) || !defined(__O_TRUNC))))) || (defined(__LOCK_EX) && (defined(__LOCK_NB) || !defined(__O_NONBLOCK)) && (defined(__CRT_HAVE_openat64) || defined(__CRT_HAVE_openat)) && (defined(__CRT_HAVE_flock) || defined(__CRT_HAVE___flock)) && ((defined(__CRT_HAVE_kfstat) && defined(__CRT_KOS_PRIMARY)) || (defined(__CRT_HAVE_kfstat64) && defined(__CRT_KOS_PRIMARY)) || defined(__CRT_HAVE_fstat) || defined(__CRT_HAVE_fstat64) || defined(__CRT_HAVE___fstat64_time64) || defined(__CRT_HAVE__fstat) || defined(__CRT_HAVE__fstat32) || defined(__CRT_HAVE__fstati64) || defined(__CRT_HAVE__fstat32i64) || defined(__CRT_HAVE__fstat64) || defined(__CRT_HAVE__fstat64i32)) && ((defined(__AT_FDCWD) && ((defined(__CRT_HAVE_kfstatat) && defined(__CRT_KOS_PRIMARY)) || (defined(__CRT_HAVE_kfstatat64) && defined(__CRT_KOS_PRIMARY)) || defined(__CRT_HAVE_fstatat) || defined(__CRT_HAVE_fstatat64) || defined(__CRT_HAVE___fstatat64_time64))) || (defined(__CRT_HAVE_kstat) && defined(__CRT_KOS_PRIMARY)) || (defined(__CRT_HAVE_kstat64) && defined(__CRT_KOS_PRIMARY)) || defined(__CRT_HAVE_stat) || defined(__CRT_HAVE_stat64) || defined(__CRT_HAVE___stat64_time64) || defined(__CRT_HAVE__stat) || defined(__CRT_HAVE__stat32) || defined(__CRT_HAVE__stati64) || defined(__CRT_HAVE__stat32i64) || defined(__CRT_HAVE__stat64) || defined(__CRT_HAVE__stat64i32)) && (defined(__CRT_HAVE_ftruncate64) || defined(__CRT_HAVE__chsize_s) || defined(__CRT_HAVE_ftruncate) || defined(__CRT_HAVE___ftruncate) || defined(__CRT_HAVE___libc_ftruncate) || defined(__CRT_HAVE__chsize) || defined(__CRT_HAVE_chsize) || !defined(__O_TRUNC))) |
83 | 83 | #include <libc/local/bsd.libutil/flopen.h> |
84 | 84 | #if defined(__cplusplus) && __has_builtin(__builtin_va_arg_pack) |
85 | | -__NAMESPACE_LOCAL_USING_OR_IMPL(flopen, __FORCELOCAL __ATTR_ARTIFICIAL __fd_t __NOTHROW_RPC(__VLIBCCALL flopen)(const char *__path, __oflag_t __flags, ...) { return (__NAMESPACE_LOCAL_SYM __LIBC_LOCAL_NAME(flopen))(__path, __flags, __builtin_va_arg_pack()); }) |
| 85 | +__NAMESPACE_LOCAL_USING_OR_IMPL(flopen, __FORCELOCAL __ATTR_ARTIFICIAL __fd_t __NOTHROW_RPC(__VLIBCCALL flopen)(char const *__path, __oflag_t __flags, ...) { return (__NAMESPACE_LOCAL_SYM __LIBC_LOCAL_NAME(flopen))(__path, __flags, __builtin_va_arg_pack()); }) |
86 | 86 | #else /* __cplusplus && __has_builtin(__builtin_va_arg_pack) */ |
87 | 87 | #define flopen(...) (__NAMESPACE_LOCAL_SYM __LIBC_LOCAL_NAME(flopen))(__VA_ARGS__) |
88 | 88 | #endif /* !__cplusplus || !__has_builtin(__builtin_va_arg_pack) */ |
89 | 89 | #endif /* (__AT_FDCWD && (__CRT_HAVE_flopenat || (__LOCK_EX && (__LOCK_NB || !__O_NONBLOCK) && (__CRT_HAVE_openat64 || __CRT_HAVE_openat) && (__CRT_HAVE_flock || __CRT_HAVE___flock) && ((__CRT_HAVE_kfstat && __CRT_KOS_PRIMARY) || (__CRT_HAVE_kfstat64 && __CRT_KOS_PRIMARY) || __CRT_HAVE_fstat || __CRT_HAVE_fstat64 || __CRT_HAVE___fstat64_time64 || __CRT_HAVE__fstat || __CRT_HAVE__fstat32 || __CRT_HAVE__fstati64 || __CRT_HAVE__fstat32i64 || __CRT_HAVE__fstat64 || __CRT_HAVE__fstat64i32) && ((__CRT_HAVE_kfstatat && __CRT_KOS_PRIMARY) || (__CRT_HAVE_kfstatat64 && __CRT_KOS_PRIMARY) || __CRT_HAVE_fstatat || __CRT_HAVE_fstatat64 || __CRT_HAVE___fstatat64_time64) && (__CRT_HAVE_ftruncate64 || __CRT_HAVE__chsize_s || __CRT_HAVE_ftruncate || __CRT_HAVE___ftruncate || __CRT_HAVE___libc_ftruncate || __CRT_HAVE__chsize || __CRT_HAVE_chsize || !__O_TRUNC)))) || (__LOCK_EX && (__LOCK_NB || !__O_NONBLOCK) && (__CRT_HAVE_openat64 || __CRT_HAVE_openat) && (__CRT_HAVE_flock || __CRT_HAVE___flock) && ((__CRT_HAVE_kfstat && __CRT_KOS_PRIMARY) || (__CRT_HAVE_kfstat64 && __CRT_KOS_PRIMARY) || __CRT_HAVE_fstat || __CRT_HAVE_fstat64 || __CRT_HAVE___fstat64_time64 || __CRT_HAVE__fstat || __CRT_HAVE__fstat32 || __CRT_HAVE__fstati64 || __CRT_HAVE__fstat32i64 || __CRT_HAVE__fstat64 || __CRT_HAVE__fstat64i32) && ((__AT_FDCWD && ((__CRT_HAVE_kfstatat && __CRT_KOS_PRIMARY) || (__CRT_HAVE_kfstatat64 && __CRT_KOS_PRIMARY) || __CRT_HAVE_fstatat || __CRT_HAVE_fstatat64 || __CRT_HAVE___fstatat64_time64)) || (__CRT_HAVE_kstat && __CRT_KOS_PRIMARY) || (__CRT_HAVE_kstat64 && __CRT_KOS_PRIMARY) || __CRT_HAVE_stat || __CRT_HAVE_stat64 || __CRT_HAVE___stat64_time64 || __CRT_HAVE__stat || __CRT_HAVE__stat32 || __CRT_HAVE__stati64 || __CRT_HAVE__stat32i64 || __CRT_HAVE__stat64 || __CRT_HAVE__stat64i32) && (__CRT_HAVE_ftruncate64 || __CRT_HAVE__chsize_s || __CRT_HAVE_ftruncate || __CRT_HAVE___ftruncate || __CRT_HAVE___libc_ftruncate || __CRT_HAVE__chsize || __CRT_HAVE_chsize || !__O_TRUNC)) */ |
90 | 90 | #endif /* !__CRT_HAVE_flopen */ |
91 | 91 | #ifdef __CRT_HAVE_flopenat |
92 | | -__LIBC __fd_t __NOTHROW_RPC(__VLIBCCALL flopenat)(__fd_t __dirfd, const char *__path, __oflag_t __flags, ...) __CASMNAME_SAME("flopenat"); |
| 92 | +__LIBC __fd_t __NOTHROW_RPC(__VLIBCCALL flopenat)(__fd_t __dirfd, char const *__path, __oflag_t __flags, ...) __CASMNAME_SAME("flopenat"); |
93 | 93 | #else /* __CRT_HAVE_flopenat */ |
94 | 94 | #include <asm/os/fcntl.h> |
95 | 95 | #include <asm/os/oflags.h> |
96 | 96 | #include <bits/os/stat.h> |
97 | 97 | #if defined(__LOCK_EX) && (defined(__LOCK_NB) || !defined(__O_NONBLOCK)) && (defined(__CRT_HAVE_openat64) || defined(__CRT_HAVE_openat)) && (defined(__CRT_HAVE_flock) || defined(__CRT_HAVE___flock)) && ((defined(__CRT_HAVE_kfstat) && defined(__CRT_KOS_PRIMARY)) || (defined(__CRT_HAVE_kfstat64) && defined(__CRT_KOS_PRIMARY)) || defined(__CRT_HAVE_fstat) || defined(__CRT_HAVE_fstat64) || defined(__CRT_HAVE___fstat64_time64) || defined(__CRT_HAVE__fstat) || defined(__CRT_HAVE__fstat32) || defined(__CRT_HAVE__fstati64) || defined(__CRT_HAVE__fstat32i64) || defined(__CRT_HAVE__fstat64) || defined(__CRT_HAVE__fstat64i32)) && ((defined(__CRT_HAVE_kfstatat) && defined(__CRT_KOS_PRIMARY)) || (defined(__CRT_HAVE_kfstatat64) && defined(__CRT_KOS_PRIMARY)) || defined(__CRT_HAVE_fstatat) || defined(__CRT_HAVE_fstatat64) || defined(__CRT_HAVE___fstatat64_time64)) && (defined(__CRT_HAVE_ftruncate64) || defined(__CRT_HAVE__chsize_s) || defined(__CRT_HAVE_ftruncate) || defined(__CRT_HAVE___ftruncate) || defined(__CRT_HAVE___libc_ftruncate) || defined(__CRT_HAVE__chsize) || defined(__CRT_HAVE_chsize) || !defined(__O_TRUNC)) |
98 | 98 | #include <libc/local/bsd.libutil/flopenat.h> |
99 | 99 | #if defined(__cplusplus) && __has_builtin(__builtin_va_arg_pack) |
100 | | -__NAMESPACE_LOCAL_USING_OR_IMPL(flopenat, __FORCELOCAL __ATTR_ARTIFICIAL __fd_t __NOTHROW_RPC(__VLIBCCALL flopenat)(__fd_t __dirfd, const char *__path, __oflag_t __flags, ...) { return (__NAMESPACE_LOCAL_SYM __LIBC_LOCAL_NAME(flopenat))(__dirfd, __path, __flags, __builtin_va_arg_pack()); }) |
| 100 | +__NAMESPACE_LOCAL_USING_OR_IMPL(flopenat, __FORCELOCAL __ATTR_ARTIFICIAL __fd_t __NOTHROW_RPC(__VLIBCCALL flopenat)(__fd_t __dirfd, char const *__path, __oflag_t __flags, ...) { return (__NAMESPACE_LOCAL_SYM __LIBC_LOCAL_NAME(flopenat))(__dirfd, __path, __flags, __builtin_va_arg_pack()); }) |
101 | 101 | #else /* __cplusplus && __has_builtin(__builtin_va_arg_pack) */ |
102 | 102 | #define flopenat(...) (__NAMESPACE_LOCAL_SYM __LIBC_LOCAL_NAME(flopenat))(__VA_ARGS__) |
103 | 103 | #endif /* !__cplusplus || !__has_builtin(__builtin_va_arg_pack) */ |
|
0 commit comments