aboutsummaryrefslogtreecommitdiff
path: root/src/common/tuklib_physmem.c
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2014-10-09 19:41:51 +0300
committerLasse Collin <lasse.collin@tukaani.org>2014-12-17 21:15:02 +0200
commit4fdcccd85e140acd99a1ef4684cd3a1957380376 (patch)
tree299fc73f74e4ff4797cb98f896a450d03abe005e /src/common/tuklib_physmem.c
parentxzgrep: Avoid passing both -q and -l to grep. (diff)
downloadxz-4fdcccd85e140acd99a1ef4684cd3a1957380376.tar.xz
Add support for AmigaOS/AROS to tuklib_physmem().
Thanks to Fredrik Wikstrom.
Diffstat (limited to '')
-rw-r--r--src/common/tuklib_physmem.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/common/tuklib_physmem.c b/src/common/tuklib_physmem.c
index 623b6e70..3cc7d12a 100644
--- a/src/common/tuklib_physmem.c
+++ b/src/common/tuklib_physmem.c
@@ -33,6 +33,10 @@
# include <syidef.h>
# include <ssdef.h>
+#elif defined(AMIGA) || defined(__AROS__)
+# define __USE_INLINE__
+# include <proto/exec.h>
+
// AIX
#elif defined(TUKLIB_PHYSMEM_AIX)
# include <sys/systemcfg.h>
@@ -119,6 +123,9 @@ tuklib_physmem(void)
if (LIB$GETSYI(&val, &vms_mem, 0, 0, 0, 0) == SS$_NORMAL)
ret = (uint64_t)vms_mem * 8192;
+#elif defined(AMIGA) || defined(__AROS__)
+ ret = AvailMem(MEMF_TOTAL);
+
#elif defined(TUKLIB_PHYSMEM_AIX)
ret = _system_configuration.physmem;