Changeset 3781092 in mainline for uspace/lib/posix/assert.h


Ignore:
Timestamp:
2011-09-09T18:22:33Z (14 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
40a2af3
Parents:
980671e7 (diff), 5da7199 (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.
Message:

merge mainline changes

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/assert.h

    r980671e7 r3781092  
    11/*
    2  * Copyright (c) 2011 Martin Decky
     2 * Copyright (c) 2011 Jiri Zarevucky
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup imgmap
     29/** @addtogroup libposix
    3030 * @{
    3131 */
    32 /**
    33  * @file
     32/** @file Program assertion.
    3433 */
    3534
    36 #ifndef IMGMAP_IMGMAP_H_
    37 #define IMGMAP_IMGMAP_H_
     35/* NO include guard on purpose. */
    3836
    39 #include <sys/types.h>
    40 #include <abi/fb/visuals.h>
     37#include "libc/assert.h"
    4138
    42 typedef struct {
    43         size_t size;
    44         sysarg_t width;
    45         sysarg_t height;
    46         visual_t visual;
    47         uint8_t data[];
    48 } imgmap_t;
     39#undef assert
    4940
    50 extern imgmap_t *imgmap_decode_tga(void *, size_t);
    51 
     41#ifndef NDEBUG
     42        #define assert(expr) ((expr) ? (void) 0 : assert_abort(#expr, __FILE__, __LINE__))
     43#else
     44        #define assert(expr) ((void) 0)
    5245#endif
    5346
Note: See TracChangeset for help on using the changeset viewer.