Fossil SCM
Detect better missing load average support, for example in Termux.
Commit
50ba8d8d0584ba676b6807b1e5318e6dc023bb09a5f3ec137b347f29bd6040cf
Parent
f141791d80e1aaa…
1 file changed
+2
-1
M
auto.def
+2
-1
| --- auto.def | ||
| +++ auto.def | ||
| @@ -745,11 +745,12 @@ | ||
| 745 | 745 | define FOSSIL_HAVE_GETPASS 1 |
| 746 | 746 | msg-result "Found getpass() with unistd.h" |
| 747 | 747 | } |
| 748 | 748 | |
| 749 | 749 | # Check for getloadavg(), and if it doesn't exist, define FOSSIL_OMIT_LOAD_AVERAGE |
| 750 | -if {![cc-check-functions getloadavg]} { | |
| 750 | +if {![cc-check-functions getloadavg] || | |
| 751 | + ![cctest -link 1 -includes {unistd.h} -code "double a\[3\]; getloadavg(a,3);"]} { | |
| 751 | 752 | define FOSSIL_OMIT_LOAD_AVERAGE 1 |
| 752 | 753 | msg-result "Load average support unavailable" |
| 753 | 754 | } |
| 754 | 755 | |
| 755 | 756 | # Check for getpassphrase() for Solaris 10 where getpass() truncates to 10 chars |
| 756 | 757 |
| --- auto.def | |
| +++ auto.def | |
| @@ -745,11 +745,12 @@ | |
| 745 | define FOSSIL_HAVE_GETPASS 1 |
| 746 | msg-result "Found getpass() with unistd.h" |
| 747 | } |
| 748 | |
| 749 | # Check for getloadavg(), and if it doesn't exist, define FOSSIL_OMIT_LOAD_AVERAGE |
| 750 | if {![cc-check-functions getloadavg]} { |
| 751 | define FOSSIL_OMIT_LOAD_AVERAGE 1 |
| 752 | msg-result "Load average support unavailable" |
| 753 | } |
| 754 | |
| 755 | # Check for getpassphrase() for Solaris 10 where getpass() truncates to 10 chars |
| 756 |
| --- auto.def | |
| +++ auto.def | |
| @@ -745,11 +745,12 @@ | |
| 745 | define FOSSIL_HAVE_GETPASS 1 |
| 746 | msg-result "Found getpass() with unistd.h" |
| 747 | } |
| 748 | |
| 749 | # Check for getloadavg(), and if it doesn't exist, define FOSSIL_OMIT_LOAD_AVERAGE |
| 750 | if {![cc-check-functions getloadavg] || |
| 751 | ![cctest -link 1 -includes {unistd.h} -code "double a\[3\]; getloadavg(a,3);"]} { |
| 752 | define FOSSIL_OMIT_LOAD_AVERAGE 1 |
| 753 | msg-result "Load average support unavailable" |
| 754 | } |
| 755 | |
| 756 | # Check for getpassphrase() for Solaris 10 where getpass() truncates to 10 chars |
| 757 |