@@ -36,8 +36,8 @@ inline ::fast_io::install_path get_module_install_path_from_argv0(char const *ar
3636 char path_list_separator[8 ] = " :" ; // could be ":; "
3737 if (argv0[0 ] == path_separator)
3838 {
39- [[maybe_unused]] auto const unused1{::fast_io::noexcept_call (:: realpath, argv0, newpath)};
40- if (auto status{::fast_io::noexcept_call (:: access, newpath, F_OK)}; !status)
39+ [[maybe_unused]] auto const unused1{::fast_io::noexcept_call (realpath, argv0, newpath)};
40+ if (auto status{::fast_io::noexcept_call (access, newpath, F_OK)}; !status)
4141 {
4242 newpath[PATH_MAX - 1 ] = 0 ;
4343 ret.module_name = ::fast_io::u8concat_fast_io (::fast_io::mnp::code_cvt_os_c_str (newpath));
@@ -62,11 +62,11 @@ inline ::fast_io::install_path get_module_install_path_from_argv0(char const *ar
6262 }
6363 else if (__builtin_strchr (argv0, static_cast <int >(path_separator)))
6464 {
65- [[maybe_unused]] auto const unused1{::fast_io::noexcept_call (:: getcwd, newpath2, PATH_MAX)};
66- ::fast_io::noexcept_call (:: strncat, newpath2, path_separator_as_string, PATH_MAX + 256 );
67- ::fast_io::noexcept_call (:: strncat, newpath2, argv0, PATH_MAX + 256 );
68- [[maybe_unused]] auto const unused2{::fast_io::noexcept_call (:: realpath, newpath2, newpath)};
69- if (auto status{::fast_io::noexcept_call (:: access, newpath, F_OK)}; !status)
65+ [[maybe_unused]] auto const unused1{::fast_io::noexcept_call (getcwd, newpath2, PATH_MAX)};
66+ ::fast_io::noexcept_call (strncat, newpath2, path_separator_as_string, PATH_MAX + 256 );
67+ ::fast_io::noexcept_call (strncat, newpath2, argv0, PATH_MAX + 256 );
68+ [[maybe_unused]] auto const unused2{::fast_io::noexcept_call (realpath, newpath2, newpath)};
69+ if (auto status{::fast_io::noexcept_call (access, newpath, F_OK)}; !status)
7070 {
7171 newpath[PATH_MAX - 1 ] = 0 ;
7272 ret.module_name = ::fast_io::u8concat_fast_io (::fast_io::mnp::code_cvt_os_c_str (newpath));
@@ -93,22 +93,22 @@ inline ::fast_io::install_path get_module_install_path_from_argv0(char const *ar
9393 {
9494 char *saveptr{};
9595 char *pathitem{};
96- char const *env_path{::fast_io::noexcept_call (:: getenv, " PATH" )};
96+ char const *env_path{::fast_io::noexcept_call (getenv, " PATH" )};
9797 if (!env_path) [[unlikely]]
9898 {
9999 throw_posix_error (EINVAL);
100100 }
101101 char pathbuf[PATH_MAX + 256 + 1 ]{};
102- ::fast_io::noexcept_call (:: strncpy, pathbuf, env_path, PATH_MAX + 256 );
102+ ::fast_io::noexcept_call (strncpy, pathbuf, env_path, PATH_MAX + 256 );
103103
104- for (pathitem = ::fast_io::noexcept_call (:: strtok_r, pathbuf, path_list_separator, &saveptr); pathitem;
105- pathitem = ::fast_io::noexcept_call (:: strtok_r, nullptr , path_list_separator, &saveptr))
104+ for (pathitem = ::fast_io::noexcept_call (strtok_r, pathbuf, path_list_separator, &saveptr); pathitem;
105+ pathitem = ::fast_io::noexcept_call (strtok_r, nullptr , path_list_separator, &saveptr))
106106 {
107- ::fast_io::noexcept_call (:: strncpy, newpath2, pathitem, PATH_MAX + 256 );
108- ::fast_io::noexcept_call (:: strncat, newpath2, path_separator_as_string, PATH_MAX + 256 );
109- ::fast_io::noexcept_call (:: strncat, newpath2, argv0, PATH_MAX + 256 );
107+ ::fast_io::noexcept_call (strncpy, newpath2, pathitem, PATH_MAX + 256 );
108+ ::fast_io::noexcept_call (strncat, newpath2, path_separator_as_string, PATH_MAX + 256 );
109+ ::fast_io::noexcept_call (strncat, newpath2, argv0, PATH_MAX + 256 );
110110 [[maybe_unused]] auto const unused1{::realpath (newpath2, newpath)};
111- if (!::fast_io::noexcept_call (:: access, newpath, F_OK))
111+ if (!::fast_io::noexcept_call (access, newpath, F_OK))
112112 {
113113 newpath[PATH_MAX - 1 ] = 0 ;
114114 ret.module_name = ::fast_io::u8concat_fast_io (::fast_io::mnp::code_cvt_os_c_str (newpath));
0 commit comments