开发者

what are the platform-name macros called? (e.g., __SVR4)

The pycups-1.9.48 library doesn't build on Mac OS 10.6 unless I remove this ifdef:

#ifdef __SVR4
/*
 * A rudimentary emulation of getline() for systems that dont support it
 * natively.  Since this is 开发者_开发知识库used for PPD file reading, it assumes (possibly
 * falsely) that BUFSIZ is big enough.
 */
ssize_t
getline(char **line, size_t *linelen, FILE *fp)
{
...

I'm guessing __SVR4 gets defined somewhere in the SVR4 compilation environment so that the preprocessor knows it should include this homebrew getline implementation. What is this mechanism called? Googling for __SVR4 actually gets a lot of hits into source code and people discussing source code.

And, more generally, is there an equivalent symbol for Snow Leopard so I can make this code compile without either learning autoconf or editing it by hand?


See http://predef.sourceforge.net/index.php

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜