Bitcointalk

BSD detection

中本聪 · 2010 年 8 月 12 日

SN-2288 已核对来源,附原文与上下文。

阅读语言
其他参与者原话dkaparis原帖 ↗

headers.h 里有这样一段代码:

There is this piece of code in headers.h:

#ifdef __WXMAC_OSX__

#ifdef __WXMAC_OSX__

#define __WXMAC__ 1

#define __WXMAC__ 1

#define __WXOSX__ 1

#define __WXOSX__ 1

#define __BSD__ 1

#define __BSD__ 1

#endif

#endif

#endif

#endif

中本聪回应

那段代码本来就是个馊主意,我要删了它。Mac 相关代码应该只用 __WXMAC_OSX__,不要用 __WXMAC__ 或 __WXOSX__,我们也该停用 __BSD__。

That code was a bad idea anyway, I'm deleting it. Any Mac code should only use __WXMAC_OSX__, not __WXMAC__ or __WXOSX__, and we should stop using __BSD__.

引用 · 发言者未注明

#if (defined(__unix__) || defined(unix)) && !defined(USG)

#if (defined(__unix__) || defined(unix)) && !defined(USG)

#include

#include

#endif

#endif

中本聪回应

这能保证 Mac 上 BSD 一定被定义吗?

Will that definitely cause BSD to be defined on Mac?

来源
Bitcointalk 原始链接 ↗ 记录编号 SN-2288

阅读字号

选择适合你的字号,之后阅读会继续使用。