Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
X
xz
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Francois Budin
xz
Commits
4fdcccd8
Commit
4fdcccd8
authored
10 years ago
by
Lasse Collin
Browse files
Options
Downloads
Patches
Plain Diff
Add support for AmigaOS/AROS to tuklib_physmem().
Thanks to Fredrik Wikstrom.
parent
f229fa32
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
m4/tuklib_physmem.m4
+2
-1
2 additions, 1 deletion
m4/tuklib_physmem.m4
src/common/tuklib_physmem.c
+7
-0
7 additions, 0 deletions
src/common/tuklib_physmem.c
with
9 additions
and
1 deletion
m4/tuklib_physmem.m4
+
2
−
1
View file @
4fdcccd8
...
...
@@ -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.
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
#if defined(_WIN32) || defined(__CYGWIN__) || defined(__OS2__) \
|| defined(__DJGPP__) || defined(__VMS)
|| defined(__DJGPP__) || defined(__VMS) \
|| defined(AMIGA) || defined(__AROS__)
int main(void) { return 0; }
#else
compile error
...
...
This diff is collapsed.
Click to expand it.
src/common/tuklib_physmem.c
+
7
−
0
View file @
4fdcccd8
...
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment