Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/fast_io_driver/install_path/bsd.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ inline ::fast_io::install_path get_module_install_path()
char buffer1[PATH_MAX + 1];
char buffer2[PATH_MAX + 1];
char *resolved{};
int length = -1;
// int length = -1;

#if defined(__NetBSD__)
int mib[4]{CTL_KERN, KERN_PROC_ARGS, -1, KERN_PROC_PATHNAME};
Expand Down
2 changes: 1 addition & 1 deletion include/fast_io_hosted/filesystem/nt_at.h
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,7 @@ inline ::fast_io::details::basic_ct_string<char_type> nt_readlinkat_impl(void *d
::fast_io::basic_nt_family_file<(zw ? nt_family::zw : nt_family::nt), char> file{
nt_call_determine_kernel_callback(dirhd, path_c_str, path_size, kernel, nt_create_callback<zw>{md})};

throw_nt_error(0xC0000002);
throw_nt_error(0xC0000275u /*STATUS_NOT_A_REPARSE_POINT*/);

return {};
#endif
Expand Down
9 changes: 7 additions & 2 deletions include/fast_io_hosted/process/process/posix.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ namespace fast_io

namespace posix
{
// The statement about argu[] and enopl] being constants is included to make explicit to future writers of language bindings that these objects are completely constant.
// Due toa limitation of the ISOC standard, it is not possible to state that idea in standard C. Specifying two levels of const-qualification for the argol] and enopll
// parameters for the exec functions may seem to be the natural choice, given that these functions do not modify either the array of pointers or the characters to which the
// function points, but this would disallow existing correct code. Instead, only the array of pointers is noted as constant.

#if defined(__DARWIN_C_LEVEL) || defined(__MSDOS__)
extern int libc_fexecve(int fd, char *const *argv, char *const *envp) noexcept __asm__("_fexecve");
extern int libc_execveat(int dirfd, char const *pathname, char *const *argv, char *const *envp, int flags) noexcept __asm__("_execveat");
Expand Down Expand Up @@ -763,7 +768,7 @@ inline void vfork_and_execveat(pid_t &pid, int dirfd, char const *cstr, char con
flags |= AT_SYMLINK_NOFOLLOW;
}

auto ret{::fast_io::posix::libc_execveat(dirfd, cstr, args, envp, flags)};
auto ret{::fast_io::posix::libc_execveat(dirfd, cstr, const_cast<char *const *>(args), const_cast<char *const *>(envp), flags)};
if (ret == -1)
{
t_errno = errno;
Expand All @@ -786,7 +791,7 @@ inline void vfork_and_execveat(pid_t &pid, int dirfd, char const *cstr, char con
flags |= AT_SYMLINK_NOFOLLOW;
}

auto ret{::fast_io::posix::libc_execveat(dirfd, cstr, args, envp, flags)};
auto ret{::fast_io::posix::libc_execveat(dirfd, cstr, const_cast<char *const *>(args), const_cast<char *const *>(envp), flags)};
if (ret == -1)
{
t_errno = errno;
Expand Down