Changeset 133 in flair-src for trunk/lib/FlairCore/src/Widget_impl.cpp


Ignore:
Timestamp:
02/09/17 11:08:31 (7 years ago)
Author:
Sanahuja Guillaume
Message:

modif sterror

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairCore/src/Widget_impl.cpp

    r15 r133  
    2424#ifdef __XENO__
    2525#include <native/heap.h>
    26 #else
    27 #include <errno.h>
    28 #include <cstring>
    2926#endif
    3027
     
    4542
    4643  if (status != 0) {
    47     printf("libxml2: rt_heap_free error (%s)\n", strerror(-status));
     44                char errorMsg[256];
     45    printf("libxml2: rt_heap_free error (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg)));
    4846  }
    4947}
     
    5452  int status = rt_heap_alloc(&xml_heap, sz, TM_NONBLOCK, &ptr);
    5553  if (status != 0) {
    56     printf("libxml2: rt_heap_alloc error (%s)\n", strerror(-status));
     54                char errorMsg[256];
     55    printf("libxml2: rt_heap_alloc error (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg)));
    5756  }
    5857  // Printf("alloc %x %i\n",ptr,sz);
     
    106105    int status = rt_heap_create(&xml_heap, tmp_name.c_str(), XML_HEAP, H_FIFO);
    107106    if (status != 0) {
    108       self->Err("rt_heap_create error (%s)\n", strerror(-status));
     107                        char errorMsg[256];
     108      self->Err("rt_heap_create error (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg)));
    109109    }
    110110
     
    188188#ifdef __XENO__
    189189    int status;
     190                char errorMsg[256];
    190191    RT_HEAP_INFO info;
    191192    status = rt_heap_inquire(&xml_heap, &info);
    192193    if (status != 0) {
    193       self->Err("rt_heap_inquire error (%s)\n", strerror(-status));
     194      self->Err("rt_heap_inquire error (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg)));
    194195    }
    195196    if (info.usedmem != 0)
     
    198199    status = rt_heap_delete(&xml_heap);
    199200    if (status != 0) {
    200       self->Err("rt_heap_delete error (%s)\n", strerror(-status));
     201      self->Err("rt_heap_delete error (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg)));
    201202    }
    202203#endif
Note: See TracChangeset for help on using the changeset viewer.