Fossil SCM

Detect better missing load average support, for example in Termux.

danield 2024-09-04 11:15 trunk
Commit 50ba8d8d0584ba676b6807b1e5318e6dc023bb09a5f3ec137b347f29bd6040cf
1 file changed +2 -1
+2 -1
--- auto.def
+++ auto.def
@@ -745,11 +745,12 @@
745745
define FOSSIL_HAVE_GETPASS 1
746746
msg-result "Found getpass() with unistd.h"
747747
}
748748
749749
# 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);"]} {
751752
define FOSSIL_OMIT_LOAD_AVERAGE 1
752753
msg-result "Load average support unavailable"
753754
}
754755
755756
# Check for getpassphrase() for Solaris 10 where getpass() truncates to 10 chars
756757
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button