Skip to content

回复:BSD 检测 ​

原始发布页

打开来源页面
查看 1 个交叉存档

引用 dkaparis 发表于 2010 年 8 月 11 日 下午 11:00:16

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

#ifdef \_\_WXMAC\_OSX\_\_
#define \_\_WXMAC\_\_ 1
#define \_\_WXOSX\_\_ 1
#define \_\_BSD\_\_ 1
#endif
#endif

反正那段代码本来就是个坏主意,我要把它删掉。任何 Mac 代码都应该只使用 __WXMAC_OSX__,而不是 __WXMAC__ 或 __WXOSX__,我们也应该停止使用 __BSD__。

引用

#if (defined(\_\_unix\_\_) || defined(unix)) && !defined(USG)
#include <sys/param.h>
#endif

这肯定会导致在 Mac 上定义 BSD 吗?

英文原文 ​

展开英文原文

Quote from: dkaparis on August 11, 2010, 11:00:16 PM

There is this piece of code in headers.h:

#ifdef __WXMAC_OSX__ #define __WXMAC__ 1 #define __WXOSX__ 1 #define __BSD__ 1 #endif #endif

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__.

Quote

#if (defined(__unix__) || defined(unix)) && !defined(USG) #include <sys/param.h> #endif

Will that definitely cause BSD to be defined on Mac?

为历史保存,为中文读者整理。每篇档案均附来源与英文原文。