Building apache2handler with APR 1.7.5 fails if compiler doesn't support __has_attribute
还没有人认领这个 Issue。
- 主要语言
- C
- 星标
- 40.4k
- 派生
- 8.2k
- 平均合并
- 2 天 13 小时
- 30 天内合并 PR
- 96
描述
Description
Not quite sure where to report this yet, so I'm starting here.
A commit exhibiting the problem has made it into latest APR 1.7.5. The assumption that __has_attribute would be predefined is valid in theory, but not in practise. E.g. ap_config.h defines __has_attribute to 0 in case it is not defined. php-src does the same at least in TSRM.h, zend_portability.h and zend_cpuinfo.h. In my opinion, this is bad practise and should be fixed; see e.g. xxhash.h for a proper solution. Of course, the existing definitions might be relied upon by downstream consumers of our headers, so changing this would be an API break.
Anyhow, coming back to the issue at hand, I wonder whether apache2handler is even supposed to include ap_config.h explicitly. If not, we can neither blame httpd nor APR, since latest httpd can apparently be successfully built against latest APR with a compiler not supporting __has_attribute.
PHP Version
any
Operating System
any
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先跟踪 apache2handler 的构建及其对 ap_config.h 的包含,然后将相关的 __has_attribute 处理与 APR 1.7.5 以及 TSRM.h、zend_portability.h 和 zend_cpuinfo.h 中的定义进行比较。使用缺少 __has_attribute 的编译器重现该失败,并确定问题是由包含行为还是兼容性行为导致的;完成的标准是受影响的构建能够成功,同时不破坏所述的头文件兼容性。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- apache, c
- 领域
- backend
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 35/100