[haiku-development] GNU awk fails to build

  • From: Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sat, 20 Aug 2016 17:36:25 +0200

Hi,

GNU awk currently fails to build in an interesting way. I'm not sure
who's at fault.

Basically, it does this:

#define param something.with.dots
#include <pthreads.h>

Our pthreads.h uses "param" as a parameter name (for
pthread_attr_setschedparams). It is expanded using awk's define, and the
result isn't valid C.

Possible solutions:
- Rename or remove the parameter name in pthread.h to avoid the problem,
- Have awk include the header before #defining its things.

I'm not sure if patching awk is justified here - what is there to
prevent them from doing this? (C standard? can't think of anything
there?). But I don't think patching Haiku to avoid the problem is the
right thing to do either.

Thoughts?

-- 
Adrien.

Other related posts: