Re: [PATCH 2/2] libada: Check for the presence of _SC_NPROCESSORS_ONLN

2020-11-15 Thread Arnaud Charlet
> gcc/ada/ > * adaint.c (__gnat_number_of_cpus): Check for the presence of > _SC_NPROCESSORS_ONLN before using it. > --- > NB we could probably replace the list of OS #ifdefs with just a check for > _SC_NPROCESSORS_ONLN, making use of it automagically with any new OS that > sup

[PATCH 2/2] libada: Check for the presence of _SC_NPROCESSORS_ONLN

2020-11-15 Thread Maciej W. Rozycki
Check for the presence of _SC_NPROCESSORS_ONLN rather than using it unconditionally with `sysconf', fixing a compilation error: adaint.c: In function '__gnat_number_of_cpus': adaint.c:2398:26: error: '_SC_NPROCESSORS_ONLN' undeclared (first use in this function) 2398 | cores = (int) sysconf (