History log of /haiku/headers/posix/assert.h
Revision Date Author Comments
# ea2870c8 03-Sep-2023 Trung Nguyen <trungnt282910@gmail.com>

headers: Define static_assert for C11

Defines the `static_assert` macro in `assert.h` as required by
the C11 standard.

Change-Id: Ic25dc99537f995404b7b4280b72c6000a293a1df
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6916
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Niels Sascha Reedijk <niels.reedijk@gmail.com>


# 75d1eb3a 16-Aug-2015 Adrien Destugues <pulkomandy@gmail.com>

assert.h: reintroduce headers guard for function declarations.

The POSIX standard requires us to allow assert.h to be included multiple
times with differnt values of NDEBUG. So we can't have a global header
guard on the files. However, we must also make sure that we don't
declare functions multiple times in that case. Re-introduce an header
guard on the part of the file where we declare functions, only.

Fixes lots of warnings when building Netsurf.


# c7ad68f0 16-Apr-2015 Jessica Hamilton <jessica.l.hamilton@gmail.com>

assert.h: add comments explaining the omission of include guards


# 9f170279 16-Apr-2015 Jessica Hamilton <jessica.l.hamilton@gmail.com>

assert.h: remove include guards

* including assert.h multiple times with NDEBUG varying is
perfectly legal, and required by POSIX.


# 173f54f1 19-Jul-2012 Matt Madia <mattmadia@gmail.com>

Updated copyright in headers. No functional change.


# db61366a 21-May-2011 Jérôme Duval <korli@users.berlios.de>

Patch from Dhruwat Bhagat (bug #7537): Fix "'noreturn' function returns" warning on call to assert(0).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41628 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0fae8733 03-Nov-2010 Scott McCreary <scottmc2@gmail.com>

Updated posix headers to remove commas from copyright line, to match the preferred coding guidelines.
Cleaned up some header style violations, making sure there are two blank lines after the header guards.
This fixes the posix header part of #2191.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39288 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b9320128 10-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Patch by Andreas Faerber:
Replaced single-line comments by multi-line comments for ANSI C
compliance.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25433 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b3f4b2ea 29-Jun-2004 Axel Dörfler <axeld@pinc-software.de>

Added a BeOS compatible assert.h.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8240 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 75d1eb3a59ce0ae53733ca8b05536ed75804223f 16-Aug-2015 Adrien Destugues <pulkomandy@gmail.com>

assert.h: reintroduce headers guard for function declarations.

The POSIX standard requires us to allow assert.h to be included multiple
times with differnt values of NDEBUG. So we can't have a global header
guard on the files. However, we must also make sure that we don't
declare functions multiple times in that case. Re-introduce an header
guard on the part of the file where we declare functions, only.

Fixes lots of warnings when building Netsurf.


# c7ad68f08cd916534e98deb652bf44791cc82868 16-Apr-2015 Jessica Hamilton <jessica.l.hamilton@gmail.com>

assert.h: add comments explaining the omission of include guards


# 9f17027980c850c47e9c4f624c4c92d0c335654e 16-Apr-2015 Jessica Hamilton <jessica.l.hamilton@gmail.com>

assert.h: remove include guards

* including assert.h multiple times with NDEBUG varying is
perfectly legal, and required by POSIX.


# 173f54f1473bd6a6511c5fc6dc899c91fb8dd667 19-Jul-2012 Matt Madia <mattmadia@gmail.com>

Updated copyright in headers. No functional change.


# db61366a554eede24827ccd6125badcd0b1edafa 21-May-2011 Jérôme Duval <korli@users.berlios.de>

Patch from Dhruwat Bhagat (bug #7537): Fix "'noreturn' function returns" warning on call to assert(0).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41628 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0fae873352b02792db93f721c1a2ff6b240c8ecc 03-Nov-2010 Scott McCreary <scottmc2@gmail.com>

Updated posix headers to remove commas from copyright line, to match the preferred coding guidelines.
Cleaned up some header style violations, making sure there are two blank lines after the header guards.
This fixes the posix header part of #2191.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39288 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b93201281504cee31f4186f7c6548815940c576e 10-May-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Patch by Andreas Faerber:
Replaced single-line comments by multi-line comments for ANSI C
compliance.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25433 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b3f4b2ea49267dd4c96a7d40be28c2e74e070d2a 29-Jun-2004 Axel Dörfler <axeld@pinc-software.de>

Added a BeOS compatible assert.h.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8240 a95241bf-73f2-0310-859d-f6bbb57e9c96