public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* type mismatch on cpuset.h
@ 2023-03-06  6:57 Marco Atzeri
  2023-03-06  8:55 ` Corinna Vinschen
  0 siblings, 1 reply; 3+ messages in thread
From: Marco Atzeri @ 2023-03-06  6:57 UTC (permalink / raw)
  To: cygwin

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*

I have not checked if the other definitions are correct.

Regard
Marco

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: type mismatch on cpuset.h
  2023-03-06  6:57 type mismatch on cpuset.h Marco Atzeri
@ 2023-03-06  8:55 ` Corinna Vinschen
  2023-03-06  9:14   ` Mark Geisert
  0 siblings, 1 reply; 3+ messages in thread
From: Corinna Vinschen @ 2023-03-06  8:55 UTC (permalink / raw)
  To: Mark Geisert; +Cc: Marco Atzeri, cygwin

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: type mismatch on cpuset.h
  2023-03-06  8:55 ` Corinna Vinschen
@ 2023-03-06  9:14   ` Mark Geisert
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Geisert @ 2023-03-06  9:14 UTC (permalink / raw)
  To: cygwin; +Cc: Marco Atzeri

Hi Corinna, Marco,

I will look into this shortly.  Sorry for the inconvenience.

..mark


On Mon, 6 Mar 2023, Corinna Vinschen wrote:
> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-06  9:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-06  6:57 type mismatch on cpuset.h Marco Atzeri
2023-03-06  8:55 ` Corinna Vinschen
2023-03-06  9:14   ` Mark Geisert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).