Skip to content

Instantly share code, notes, and snippets.

@springmeyer
Created November 12, 2010 18:35
Show Gist options
  • Save springmeyer/674480 to your computer and use it in GitHub Desktop.
Save springmeyer/674480 to your computer and use it in GitHub Desktop.
* Configuration:
*
* By default all macros generate "production code" (i.e non-debug). If
* DEBUG_ASSERT_PRODUCTION_CODE is defined to zero or DEBUG is defined to non-zero
* while this header is included, the macros will generated debug code.
*
* If DEBUG_ASSERT_COMPONENT_NAME_STRING is defined, all debug messages will
* be prefixed with it.
*
* By default, all messages write to stderr. If you would like to write a custom
* error message formater, defined DEBUG_ASSERT_MESSAGE to your function name.
*
* Each individual macro will only be defined if it is not already defined, so
* you can redefine their behavior singly by providing your own definition before
* this file is included.
*
* If you define __ASSERTMACROS__ before this file is included, then nothing in
* this file will take effect.
*
* Prior to Mac OS X 10.6 the macro names used in this file conflicted with some
* user code, including libraries in boost and the proposed C++ standards efforts,
* and there was no way for a client of this header to resolve this conflict. Because
* of this, most of the macros have been changed so that they are prefixed with
* __ and contain at least one capital letter, which should alleviate the current
* and future conflicts. However, to allow current sources to continue to compile,
* compatibility macros are defined at the end with the old names. A tops script
* at the end of this file will convert all of the old macro names used in a directory
* to the new names. Clients are recommended to migrate over to these new macros as
* they update their sources because a future release of Mac OS X will remove the
* old macro definitions ( without the double-underscore prefix ). Clients who
* want to compile without the old macro definitions can define the macro
* __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES to 0 before this file is
* included.
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment