[bug #63185] configure fails to detect getloadavg declaration on sun and aix.

2022-10-26 Thread Dmitry Goncharov
Follow-up Comment #7, bug #63185 (project make):

i guess, it is possible that sys/loadavg.h exists, but still doesn't declare
getloadavg.

It is also possible that configure sets HAVE_DECL_GETLOADAVG to 0 and also
defines HAVE_SYS_LOADAVG_H and in this case there is a declaraion in
sys/loadavg.h and also in job.c. Which should be benign as long as the
declarations match.

This alone

#if HAVE_DECL_GETLOADAVG == 0
int getloadavg (double loadavg[], int nelem);
#endif

gets the job done.

Btw, why do you include sys/time.h?


___

Reply to this item at:

  

___
Message sent via Savannah
https://savannah.gnu.org/




[bug #62174] fix test functions/shell on aix.

2022-10-26 Thread Paul D. Smith
Follow-up Comment #4, bug #62174 (project make):

Hm.  the code tries to reset the locale to "C" before it detects any of this
stuff.  I guess maybe the method it uses (calling POSIX::setlocale()) isn't
sufficient?

OK I'll address this.

I think the idea was that we didn't want to change the locale for the
top-level Perl, so that any messages generated by it would be in the correct
locale.  We only wanted to set the locale inside the tests.  That's why we try
to set the locale to "C", then set it back again after we are done.

Maybe that's not worthwhile.


___

Reply to this item at:

  

___
Message sent via Savannah
https://savannah.gnu.org/




[bug #63185] configure fails to detect getloadavg declaration on sun and aix.

2022-10-26 Thread Paul D. Smith
Follow-up Comment #6, bug #63185 (project make):

You're right, I forgot that it's always wrong to use ifdef/ifndef with
HAVE_DECL values in autoconf.

But, I don't understand why you've added the !defined(HAVE_SYS_LOADAVG_H) to
the check.  If the function is not declared we need to declare it, it doesn't
matter whether we have sys/loadavg.h or not.

I don't know of any system like this, but it could be that sys/loadavg.h
exists but still doesn't declare getloadavg().  And if it does declare
getloadavg(), then HAVE_DECL_GETLOADAVG will be 1 anyway not 0 and we don't
need to check it.

Am I missing something?  I don't want to get this wrong again.


___

Reply to this item at:

  

___
Message sent via Savannah
https://savannah.gnu.org/