fix: fix clang compile error
- fix the include of stacktrace error. - fix env include issues. - fix wrong include for libcxx enumerate patch.
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
#include "../termcolor.hpp"
|
#include "../termcolor.hpp"
|
||||||
#include "../../patch/stream.hpp"
|
#include "../../patch/stream.hpp"
|
||||||
#include "../../patch/format.hpp"
|
#include "../../patch/format.hpp"
|
||||||
#include "../../patch/libcxx/stacktrace.hpp"
|
#include "../../patch/libcxx/enumerate.hpp"
|
||||||
#include "../../string/op.hpp"
|
#include "../../string/op.hpp"
|
||||||
#include "../../env.hpp"
|
#include "../../env.hpp"
|
||||||
#include <ranges>
|
#include <ranges>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#include "wcwidth.hpp"
|
#include "wcwidth.hpp"
|
||||||
#include "../num/safe_op.hpp"
|
#include "../num/safe_op.hpp"
|
||||||
#include "../patch/stream.hpp"
|
#include "../patch/stream.hpp"
|
||||||
#include "../patch/libcxx/stacktrace.hpp"
|
#include "../patch/libcxx/enumerate.hpp"
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <ranges>
|
#include <ranges>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
#include "env.hpp"
|
#include "env.hpp"
|
||||||
#include "macro/os_detector.hpp"
|
#include "macro/os_detector.hpp"
|
||||||
|
#include "string/reinterpret.hpp"
|
||||||
|
#include "num/safe_op.hpp"
|
||||||
|
#include "num/safe_cast.hpp"
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
@@ -8,8 +11,6 @@
|
|||||||
|
|
||||||
#if defined(YYCC_OS_WINDOWS)
|
#if defined(YYCC_OS_WINDOWS)
|
||||||
#include "encoding/windows.hpp"
|
#include "encoding/windows.hpp"
|
||||||
#include "num/safe_op.hpp"
|
|
||||||
#include "num/safe_cast.hpp"
|
|
||||||
#include "windows/winfct.hpp"
|
#include "windows/winfct.hpp"
|
||||||
#include "windows/import_guard_head.hpp"
|
#include "windows/import_guard_head.hpp"
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
@@ -18,15 +19,12 @@
|
|||||||
#include <shellapi.h> // For getting commandline argument.
|
#include <shellapi.h> // For getting commandline argument.
|
||||||
#include "windows/import_guard_tail.hpp"
|
#include "windows/import_guard_tail.hpp"
|
||||||
#elif defined(YYCC_OS_LINUX)
|
#elif defined(YYCC_OS_LINUX)
|
||||||
#include "string/reinterpret.hpp"
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cerrno>
|
#include <cerrno>
|
||||||
#include <fstream> // For reading commandline argument.
|
#include <fstream> // For reading commandline argument.
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/stat.h> // For reading symlink target.
|
#include <sys/stat.h> // For reading symlink target.
|
||||||
#elif defined(YYCC_OS_MACOS)
|
#elif defined(YYCC_OS_MACOS)
|
||||||
#include "string/reinterpret.hpp"
|
|
||||||
#include "num/safe_cast.hpp"
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cerrno>
|
#include <cerrno>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
@@ -331,7 +329,7 @@ namespace yycc::env {
|
|||||||
#elif defined(YYCC_OS_LINUX)
|
#elif defined(YYCC_OS_LINUX)
|
||||||
// Reference: https://www.man7.org/linux/man-pages/man5/proc_pid_exe.5.html
|
// Reference: https://www.man7.org/linux/man-pages/man5/proc_pid_exe.5.html
|
||||||
auto target = read_symlink_target("/proc/self/exe");
|
auto target = read_symlink_target("/proc/self/exe");
|
||||||
if () return rv = std::move(target.value());
|
if (target.has_value()) return rv = std::move(target.value());
|
||||||
else return std::unexpected(PathError::SysCall);
|
else return std::unexpected(PathError::SysCall);
|
||||||
#elif defined(YYCC_OS_MACOS)
|
#elif defined(YYCC_OS_MACOS)
|
||||||
// TODO: This is AI generated and don't have test and reference.
|
// TODO: This is AI generated and don't have test and reference.
|
||||||
|
|||||||
@@ -1,11 +1,16 @@
|
|||||||
#include "panic.hpp"
|
#include "panic.hpp"
|
||||||
|
#include "macro/stl_detector.hpp"
|
||||||
#include "carton/termcolor.hpp"
|
#include "carton/termcolor.hpp"
|
||||||
#include "patch/stream.hpp"
|
#include "patch/stream.hpp"
|
||||||
#include "patch/libcxx/stacktrace.hpp"
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
#if defined(YYCC_STL_CLANGSTL)
|
||||||
|
#include "patch/libcxx/stacktrace.hpp"
|
||||||
|
#else
|
||||||
#include <stacktrace>
|
#include <stacktrace>
|
||||||
|
#endif
|
||||||
|
|
||||||
#define TERMCOLOR ::yycc::carton::termcolor
|
#define TERMCOLOR ::yycc::carton::termcolor
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user