Changeset ab936440 in mainline for uspace/lib/cpp/include/cassert


Ignore:
Timestamp:
2019-02-12T20:42:42Z (7 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f31ca47
Parents:
7f7817a9 (diff), 4805495 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Matthieu Riolo <matthieu.riolo@…> (2019-02-12 20:26:18)
git-committer:
Matthieu Riolo <matthieu.riolo@…> (2019-02-12 20:42:42)
Message:

Merge branch 'master' into bdsh_alias

Conflicts:

uspace/app/bdsh/Makefile
uspace/app/bdsh/cmds/modules/modules.h

Ccheck correction and removing header which includes itself

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/cpp/include/cassert

    r7f7817a9 rab936440  
    11/*
    2  * Copyright (c) 2018 Jaroslav Jindrak
     2 * Copyright (c) 2019 Jaroslav Jindrak
    33 * All rights reserved.
    44 *
     
    3030#define LIBCPP_CASSERT
    3131
    32 #include <__bits/common.hpp>
    3332
    34 namespace std::hel
    35 {
    36     extern "C" {
    37         #include <assert.h>
    38     }
     33extern "C" {
     34    #include <assert.h>
    3935}
    4036
    41 namespace std
    42 {
    43     // Note: The only thing imported is assert
    44     //       and that is a macro.
    45 }
     37// TODO: For some reason, this function isn't visible (maybe the
     38//       noreturn attribute?), adding a redeclaration here for the
     39//       time being.
    4640
    47 /**
    48  * We need to fix the assert macro because it uses
    49  * a non-standard function that we have in the
    50  * std::hel namespace.
    51  */
    52 #undef assert
    53 #define assert(expr) \
    54         do { \
    55                 if (!(expr)) \
    56                         std::hel::assert_abort(#expr, __FILE__, __LINE__); \
    57         } while (0)
     41extern void __helenos_assert_abort(const char *, const char *, unsigned int);
     42
     43#define __unimplemented() assert(!"Not implemented!")
    5844
    5945#endif
Note: See TracChangeset for help on using the changeset viewer.