Ignore:
Timestamp:
Apr 30, 2007, 11:18:15 AM (13 years ago)
Author:
Bruno Cornec
Message:
  • ARCH removed from configure.in as useless
  • addition of get_uname_m (to give the underlying arch)
  • get_architecture now returns correctly the built arch used (including x86_64)
  • IA32 is defined for both i386 and x86_64. An additional vdefine X86_64 is also setup for tha later arch.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.4/mondo/src/common/libmondo-tools.c

    r1372 r1375  
    184184#include <netinet/in.h>
    185185#include <arpa/inet.h>
     186#include <sys/utsname.h>
    186187
    187188/*@unused@*/
     
    358359
    359360
    360 char *get_architecture()
    361 {
     361char *get_architecture(void) {
    362362#ifdef __IA32__
    363     return ("i386");
     363#   ifdef __X86_64__
     364        return ("x86_64");
     365#   else
     366        return ("i386");
     367#   endif
    364368#endif
    365369#ifdef __IA64__
     
    370374
    371375
    372 
    373 double get_kernel_version()
     376char *get_uname_m(void) {
     377
     378    struct utsname utsn;
     379    char *tmp = NULL;
     380
     381    uname(&utsn);
     382    mr_asprintf(&tmp, utsn.machine);
     383    return (tmp);
     384}
     385
     386
     387
     388double get_kernel_version(void)
    374389{
    375390    char *p, tmp[200];
Note: See TracChangeset for help on using the changeset viewer.