mirror of
https://git.tukaani.org/xz.git
synced 2024-04-04 12:36:23 +02:00
Add support for AmigaOS/AROS to tuklib_physmem().
Thanks to Fredrik Wikstrom.
This commit is contained in:
parent
efa7b0a210
commit
076258cc45
2 changed files with 9 additions and 1 deletions
|
@ -53,7 +53,8 @@ AC_CACHE_CHECK([how to detect the amount of physical memory],
|
||||||
# a non-compilable text instead of #error to generate an error.
|
# a non-compilable text instead of #error to generate an error.
|
||||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||||
#if defined(_WIN32) || defined(__CYGWIN__) || defined(__OS2__) \
|
#if defined(_WIN32) || defined(__CYGWIN__) || defined(__OS2__) \
|
||||||
|| defined(__DJGPP__) || defined(__VMS)
|
|| defined(__DJGPP__) || defined(__VMS) \
|
||||||
|
|| defined(AMIGA) || defined(__AROS__)
|
||||||
int main(void) { return 0; }
|
int main(void) { return 0; }
|
||||||
#else
|
#else
|
||||||
compile error
|
compile error
|
||||||
|
|
|
@ -33,6 +33,10 @@
|
||||||
# include <syidef.h>
|
# include <syidef.h>
|
||||||
# include <ssdef.h>
|
# include <ssdef.h>
|
||||||
|
|
||||||
|
#elif defined(AMIGA) || defined(__AROS__)
|
||||||
|
# define __USE_INLINE__
|
||||||
|
# include <proto/exec.h>
|
||||||
|
|
||||||
// AIX
|
// AIX
|
||||||
#elif defined(TUKLIB_PHYSMEM_AIX)
|
#elif defined(TUKLIB_PHYSMEM_AIX)
|
||||||
# include <sys/systemcfg.h>
|
# include <sys/systemcfg.h>
|
||||||
|
@ -119,6 +123,9 @@ tuklib_physmem(void)
|
||||||
if (LIB$GETSYI(&val, &vms_mem, 0, 0, 0, 0) == SS$_NORMAL)
|
if (LIB$GETSYI(&val, &vms_mem, 0, 0, 0, 0) == SS$_NORMAL)
|
||||||
ret = (uint64_t)vms_mem * 8192;
|
ret = (uint64_t)vms_mem * 8192;
|
||||||
|
|
||||||
|
#elif defined(AMIGA) || defined(__AROS__)
|
||||||
|
ret = AvailMem(MEMF_TOTAL);
|
||||||
|
|
||||||
#elif defined(TUKLIB_PHYSMEM_AIX)
|
#elif defined(TUKLIB_PHYSMEM_AIX)
|
||||||
ret = _system_configuration.physmem;
|
ret = _system_configuration.physmem;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue