Skip to content

Commit

Permalink
sys/cdefs中使用#include_next
Browse files Browse the repository at this point in the history
  • Loading branch information
埃博拉酱 committed Nov 5, 2024
1 parent 99279a4 commit c63221e
Show file tree
Hide file tree
Showing 2 changed files with 135 additions and 137 deletions.
3 changes: 1 addition & 2 deletions src/Cpp_Standard_Library.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
#pragma once
// 此头文件用于标识本库已被包含,并提示编译器应当编译本库中的源文件。请按需包含具体的功能头文件。

//Arduino不支持#include_next,只能用这种魔法实现包含官方标准库
//Arduino for Linux 对此宏的支持存在问题。如出现相关错误需一律改用#include_next。此宏仅用于处理SAM架构上@include_next<new>失败的问题。
#ifdef ARDUINO_ARCH_AVR
#define _CSL_Official(Header) <Arduino.h/../../arduino/Header>
#define _CSL_OfficialC(Header) <alloca.h/../../include/Header>
#else
#define _CSL_Official(Header) <c++/__GNUC__.__GNUC_MINOR__.__GNUC_PATCHLEVEL__/Header>
#define _CSL_OfficialC(Header) <_ansi.h/../../include/Header>
#define _CSL_OfficialB(Header) <bits/basic_file.h/../../Header>
#endif
#define __GLIBC__ 2
#define __GLIBC_MINOR__ 39
Loading

0 comments on commit c63221e

Please sign in to comment.