This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: __P
- To: Geoff Marshall <geoff at steelydev dot com>
- Subject: Re: __P
- From: Andreas Jaeger <aj at suse dot de>
- Date: 13 Jun 2000 08:58:44 +0200
- Cc: <gcc at gcc dot gnu dot org>
- References: <B56ACDA1.398%geoff@steelydev.com>
>>>>> Geoff Marshall writes:
> Am trying to compile some threads on Red Had Linux and see that all the
> routines in pthreads.h are prefixed with __P for example:
> extern int pthread_create __P ((pthread_t *__thread,
> __const pthread_attr_t *__attr,
> void *(*__start_routine) (void *),
> void *__arg));
> Questions:
> What does __P mean?
It helps with compilers that don't understand prototypes:
Check <sys/cdefs.h>:
/* GCC can always grok prototypes. For C++ programs we add throw()
to help it optimize the function calls. But this works only with
gcc 2.8.x and egcs. */
# if defined __cplusplus && (__GNUC__ >= 3 || __GNUC_MINOR__ >= 8)
# define __THROW throw ()
# else
# define __THROW
# endif
# define __P(args) args __THROW
/* This macro will be used for functions which might take C++ callback
functions. */
# define __PMT(args) args
# define __DOTS , ...
[...]
Andreas
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de