[Mesa-dev] [PATCH] r300g: add program name check for BSD
Jonathan Gray
jsg at jsg.id.au
Wed Jun 26 05:37:47 PDT 2013
On Wed, Jun 26, 2013 at 07:21:59AM -0500, Patrick Baggett wrote:
> On Wed, Jun 26, 2013 at 2:11 AM, Jonathan Gray <jsg at jsg.id.au> wrote:
>
> > program_invocation_short_name is glibc specific. Provide an
> > alternative using getprogname(), which can be found on *BSD and OS X.
> >
> > Signed-off-by: Jonathan Gray <jsg at jsg.id.au>
> > ---
> > src/gallium/drivers/r300/r300_chipset.c | 10 +++++++++-
> > 1 file changed, 9 insertions(+), 1 deletion(-)
> >
> > diff --git src/gallium/drivers/r300/r300_chipset.c
> > src/gallium/drivers/r300/r300_chipset.c
> > index 11061ed..7f51ccb 100644
> > --- src/gallium/drivers/r300/r300_chipset.c
> > +++ src/gallium/drivers/r300/r300_chipset.c
> > @@ -30,6 +30,14 @@
> > #include <stdio.h>
> > #include <errno.h>
> >
> > +#undef GET_PROGRAM_NAME
> > +#ifdef __GLIBC__
> > +# define GET_PROGRAM_NAME() program_invocation_short_name
> >
>
> I think you are missing parentheses on the end of
> program_invocation_short_name
It is a variable not a function, see
http://www.gnu.org/software/libc/manual/html_node/Error-Messages.html
More information about the mesa-dev
mailing list