can't compile coreutils-9.3 any more after upgrade to cygwin-3.4.8

Corinna Vinschen corinna-cygwin@cygwin.com
Wed Aug 30 09:57:15 GMT 2023


On Aug 30 11:34, Corinna Vinschen via Cygwin-apps wrote:
>  #define CPU_ZERO_S(siz, set) __cpuset_zero_s (siz, set)
> -static __inline void
> -__cpuset_zero_s (size_t siz, cpu_set_t *set)
> -{
> -  (void) memset (set, 0, siz);
> -}
> +void __cpuset_zero_s (size_t, cpu_set_t *);
>  [...]
> +__cpuset_zero_s (size_t siz, cpu_set_t *set)
> +{
> +  (void) memset (set, 0, siz);
> +}
> +
>  } /* extern C */

Also, we can avoid an external __cpuset_zero_s function by just using a
loop, kind of like this:

  #define CPU_ZERO_S(siz, set) __cpuset_zero_s (siz, set)
  static __inline
  __cpuset_zero_s (size_t siz, cpu_set_t *set)
  {
  #if __GNUC_PREREQ (2, 91)
    __builtin_memset (set, 0, siz);
  #else
    siz /= sizeof (__cpu_mask);
    while (siz > 0)
      set->_bits[--siz] = 0;
  #endif
  }


Corinna


More information about the Cygwin-apps mailing list