Minimal support for uname -p

* This is used by cmake to know which CPU to build for.
This commit is contained in:
Adrien Destugues
2013-09-25 18:39:00 +02:00
parent 2b66a08acb
commit e813a15846
+21
View File
@@ -50,6 +50,10 @@
# include <mach-o/arch.h>
#endif
#ifdef __HAIKU__
# include <OS.h>
#endif
#include "system.h"
#include "error.h"
#include "quote.h"
@@ -339,6 +343,23 @@ main (int argc, char **argv)
# endif
}
#endif
#ifdef __HAIKU__
{
system_info sysinfo;
get_system_info(&sysinfo);
switch (sysinfo.platform_type) {
case B_AT_CLONE_PLATFORM:
element = "x86";
break;
case B_64_BIT_PC_PLATFORM:
element = "x86_64";
break;
}
}
#endif
if (! (toprint == UINT_MAX && element == unknown))
print_element (element);
}