summaryrefslogtreecommitdiff
path: root/iup/src/mot/iupunix_info.c
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2010-09-09 02:26:30 +0200
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2010-09-09 02:32:26 +0200
commit7505e88db66798b2b8fcdff2d92a7136cd826b5b (patch)
treeb6ced565318f8e8112e35cb0ad53abe4212ef8de /iup/src/mot/iupunix_info.c
parente9a184546b18cf3b796bd560561f312934004c54 (diff)
Upgrading to IUP 3.2 - and cleaning up.
Diffstat (limited to 'iup/src/mot/iupunix_info.c')
-rwxr-xr-xiup/src/mot/iupunix_info.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/iup/src/mot/iupunix_info.c b/iup/src/mot/iupunix_info.c
index f09573c..3bfee08 100755
--- a/iup/src/mot/iupunix_info.c
+++ b/iup/src/mot/iupunix_info.c
@@ -274,7 +274,10 @@ char *iupdrvGetSystemName(void)
char *str = iupStrGetMemory(50);
uname(&un);
- strcpy(str, un.sysname);
+ if (iupStrEqualNoCase(un.sysname, "Darwin"))
+ strcpy(str, "MacOS");
+ else
+ strcpy(str, un.sysname);
return str;
}
@@ -285,9 +288,17 @@ char *iupdrvGetSystemVersion(void)
char *str = iupStrGetMemory(100);
uname(&un);
- strcpy(str, un.release);
- strcat(str, ".");
- strcat(str, un.version);
+ if (iupStrEqualNoCase(un.sysname, "Darwin"))
+ {
+ int release = atoi(un.release);
+ sprintf(str, "%d", release-4);
+ }
+ else
+ {
+ strcpy(str, un.release);
+ strcat(str, ".");
+ strcat(str, un.version);
+ }
return str;
}