type mismatch on cpuset.h

Corinna Vinschen corinna-cygwin@cygwin.com
Mon Mar 6 08:55:52 GMT 2023


Hi Mark,

On Mar  6 07:57, Marco Atzeri via Cygwin wrote:
> Hi,
> 
> building latest gdal I noticed a type mismatch, that forced me to build
> with "-fpermissive"
> 
> on /usr/include/sys/cpuset.h
> 
>  #define CPU_ALLOC(num)      __builtin_malloc (CPU_ALLOC_SIZE(num))
> 
> 
> but on
> https://linux.die.net/man/3/cpu_alloc
> 
>  cpu_set_t *CPU_ALLOC(int num_cpus)
> 
> 
> so void* versus cpu_set_t*

Marco is correct.  cpuset.h was your pet project a while back.  Would
you like to pick it up?  Maybe we should convert all the macros into
type-safe inline functions, or macros calling type-safe (inline)
functions, as on Linux as well as on BSD?


Thanks,
Corinna


More information about the Cygwin mailing list