Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the "DNS_BLOCK_ASSERTIONS" (C compiler flag)?

What's the "DNS_BLOCK_ASSERTIONS" (C compiler flag)?

like image 201
eonil Avatar asked May 02 '10 05:05

eonil


People also ask

What is the compiler flag?

Compile-time flags are boolean values provided through the compiler via a macro method. They allow to conditionally include or exclude code based on compile time conditions. There are several default flags provided by the compiler with information about compiler options and the target platform.

What is the use of compilation flag?

When compiling a pattern string into a pattern object, it's possible to modify the standard behavior of the patterns. In order to do that, we have to use the compilation flags.


1 Answers

The NS_BLOCK_ASSERTIONS macro (no "D") suppresses the checks performed by NSAssert. You supply it to the compiler using -DNS_BLOCK_ASSERTIONS (see the comments for an explanation of the "D").

like image 145
Marcelo Cantos Avatar answered Sep 21 '22 00:09

Marcelo Cantos