Ignore:
Timestamp:
Jan 9, 2008, 3:40:19 PM (12 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.9, master
Children:
29ab6a0
Parents:
cfcc4e20
Message:

2008-01-09 Joel Sherrill <joel.sherrill@…>

  • libcsupport/src/assert.c: Newlib 1.16.0 adds assert_func(). We need to have it also.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libcsupport/src/__assert.c

    rcfcc4e20 rb36dc03  
    1818#include <rtems.h>
    1919
    20 void __assert(const char *file, int line, const char *failedexpr)
     20void __assert(
     21  const char *file,
     22  int         line,
     23 
     24const char *failedexpr)
    2125{
    22     printk("assertion \"%s\" failed: file \"%s\", line %d\n",
    23                failedexpr, file, line);
    24     rtems_fatal_error_occurred(0);
     26  printk(
     27    "assertion \"%s\" failed: file \"%s\", line %d\n",
     28    failedexpr,
     29    file,
     30    line
     31   );
     32   rtems_fatal_error_occurred(0);
    2533}
     34
     35/*
     36 * Newlib 1.16.0 added this method
     37 */
     38void __assert_func(
     39  const char *file,
     40  int         line,
     41  const char *func,
     42  const char *failedexpr
     43)
     44{
     45  printk("assertion \"%s\" failed: file \"%s\", line %d%s%s\n",
     46    failedexpr,
     47    file,
     48    line,
     49    func ? ", function: " : "", func ? func : ""
     50  );
     51  rtems_fatal_error_occurred(0);
     52}
Note: See TracChangeset for help on using the changeset viewer.