Ignore:
Timestamp:
Apr 30, 2007, 11:25:39 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/stable/mondo/src/common/libmondo-tools.c

    r1373 r1377  
    2323#include <netinet/in.h>
    2424#include <arpa/inet.h>
     25#include <sys/utsname.h>
    2526
    2627/*@unused@*/
     
    192193
    193194
    194 char *get_architecture(void)
    195 {
     195char *get_architecture(void) {
    196196#ifdef __IA32__
    197     return ("i386");
     197#   ifdef __X86_64__
     198        return ("x86_64");
     199#   else
     200        return ("i386");
     201#   endif
    198202#endif
    199203#ifdef __X86_64__
     
    205209    return ("unknown");
    206210}
     211
     212
     213char *get_uname_m(void) {
     214
     215    struct utsname utsn;
     216    char *tmp = NULL;
     217
     218    uname(&utsn);
     219    mr_asprintf(&tmp, utsn.machine);
     220    return (tmp);
     221}
     222
    207223
    208224
Note: See TracChangeset for help on using the changeset viewer.