原始文献 / 论坛帖 / Re: BSD detection
Re: BSD detection
Bitcointalk · 2010-08-12 00:02:06 UTC
引用自:dkaparis,2010 年 8 月 11 日 11:00:16 PM(https://bitcointalk.org/index.php?topic=790.msg8807#msg8807)
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 上 define 出 BSD 吗?
英文原文
Quote from: dkaparis on August 11, 2010, 11:00:16 PM(https://bitcointalk.org/index.php?topic=790.msg8807#msg8807)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?
