Changeset 1377 for branches/stable


Ignore:
Timestamp:
Apr 30, 2007, 11:25:39 AM (12 years ago)
Author:
bruno
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.
Location:
branches/stable/mondo
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mondo/configure.in

    r1366 r1377  
    8585case "$host_cpu" in
    8686    i?86*)
    87         ARCH=i386
    8887        CPPFLAGS="$CPPFLAGS -D__IA32__ -Wall"
    8988        ;;
    9089    x86_64*)
    91         ARCH=x86-64
    92         CPPFLAGS="$CPPFLAGS -D__X86_64__ -Wall"
     90        CPPFLAGS="$CPPFLAGS -D__IA32__ -D__X86_64__ -Wall"
    9391        ;;
    9492    ia64*)
    95         ARCH=ia64
    9693        CPPFLAGS="$CPPFLAGS -D__IA64__ -Wall"
    9794        ;;
    9895    *)
    99         echo "*** Sorry, only Intel Architectures (ia32, x86-64, ia64) are supported at this time."
    100         echo "If you Want to help send a mail to bcornec@users.berlios.de"
     96        echo "*** Sorry, only Intel Architectures (ia32, x86_64, ia64) are supported at this time. Want to help?"
    10197        ;;
    10298esac
    103 AC_SUBST(ARCH)
    10499
    105100LIBS="$LIBS $PTHREAD"
  • 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
  • branches/stable/mondo/src/common/libmondo-tools.h

    r1183 r1377  
    4545double get_kernel_version(void);
    4646char *get_architecture(void);
     47char *get_uname_m();
    4748bool does_nonMS_partition_exist(void);
    4849void stop_magicdev_if_necessary(void);
  • branches/stable/mondo/src/mondoarchive/mondoarchive.c

    r1326 r1377  
    6666static void welcome_to_mondoarchive(void)
    6767{
     68    char *tmp = NULL;
     69
    6870    mr_msg(0, "Mondo Archive v%s --- http://www.mondorescue.org", PACKAGE_VERSION);
    69     mr_msg(0, "running on %s architecture", get_architecture());
     71    log_msg(0, "running %s binaries", get_architecture());
     72    tmp = get_uname_m();
     73    log_msg(0, "running on %s architecture", tmp);
     74    mr_free(tmp);
    7075    mr_msg(0, "-----------------------------------------------------------");
    7176    mr_msg(0, "NB: Mondo logs almost everything, so don't panic if you see");
Note: See TracChangeset for help on using the changeset viewer.