__P macro
> I have been reading the OpenBSD source code and have been running > across some structures||Macros i'm not understanding. Where would i > look for more explanition about the __P Macros. This is historical code... Old pre-ANSI compilers didn't support prototypes for functions. __P(X) was defined as emptiness on these platforms, therefore, function prototypes always looked like 'int function()' . On ANSI compilers, __P(X) is defined as X, so function prototypes were properly defined as 'int function(int a, double b)' . The __P macro was traditionnaly used to provide portability on both type of compilers. Best regards, -Frank.
posted on 2012-02-28 15:18 Richard.FreeBSD 阅读(223) 评论(0) 编辑 收藏 举报