I have been going through some header files and see that there are many function prototype like this:
returntype some_name __P(arguments);
This kind of prototype uses a macro
__P to allow inclusion and compilation on very old systems that do not support C90 prototypes (aka ansi prototypes).
On most systems, the argument to the
__P macro expands to the argument list, as illustrated below:
#ifdef __USING_STONE_AGE_COMPILER__ #define __P(args) () #else #define __P(args) args int some_name __P((int argc, char *argv));
On obsolete systems, the above declaration expands to
int some_name(); whereas it expands to the full prototype otherwise:
int some_name(int argc, char *argv);
Just ignore the
__P macro and use
some_name(arguments); syntax to call the function. Also note that the macro name
__P is not significant, the author of the package could have used any name for this purpose.