Re: A question about an include file.
__P is basically a macro that lets the declaration work with both K&R-style and ANSI C
compilers. I haven't looked at it directly but it's something like
#define __P(x) x
__const is likewise a macro, probably to work with compilers which don't like const.
There are info pages for the C Preprocessor if you're intested in syntax. I doubt
there's any documentation per se for these conventions used by the C library headers.
> Could someone explain what the following line, which is taken from
> /usr/include/errno.h, means :
> extern void perror __P ((__const char* __s));
> As I understand it, it means that perror is defined in an external file and
> returns a void type. But what are the __P, and __const ? And why there are 2
> sets of brackets, and not only 1 ?
> Where does these constructs being documented ?
Jens B. Jorgensen
Unsubscribe? mail -s unsubscribe email@example.com < /dev/null