Improve C89/C90 compatibility by conditionally including <stdint.h>
@KRASTM がすでに取り組んでいます。
2026年8月14日 から。
評価
この issue はまだ評価されていません。
説明
The current implementation unconditionally includes the standard header file <stdint.h>. While this is valid for C99 and later standards, some toolchains, such as IAR Embedded Workbench configured for C89/C90 compliance, may not provide this header, resulting in compilation errors.
To improve compatibility with older C language standards while preserving existing functionality, the inclusion of <stdint.h> should be conditioned on the detected language standard.
Current Code
#include <stdint.h>
Proposed Fix
#if !defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L)
/* C89/C90 mode: Define standard integer types locally */
#else
/* C99 and later: Use standard stdint.h */
#include <stdint.h>
#endif
Rationale
<stdint.h> is part of the C99 standard and is not guaranteed to be available when compiling in C89/C90 mode. The proposed change allows the code to compile in both C89/C90 and C99+ environments by only including <stdint.h> when the language standard supports it.
Expected Benefit
- Improved compatibility with C89/C90 toolchains, including IAR Embedded Workbench.
- No functional impact on existing C99 and newer builds.
- Better portability across different compiler configurations.
- 主要言語
- C
- スター
- 84
- フォーク
- 24
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
libretro/libretro-common#233 ·
-
area:lint-tooling bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
InauguralSystems/EigenScript#1340 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: chunk_span_bounds and _validated_chunk_spans reject Pydantic models ChunkSpan and AudioFileオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
BasedHardware/omi#19047 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100