I know that for every <header.h> in the C standard library, C++ has a <cheader> header file, e.g. <stdio.h> and <cstdio>.
Every <cheader> will include its corresponding <header.h> and undefine a large list of macros which correspond to standard library functions, such as:
/*sample taken from cstdlib*/
// Get rid of those macros defined in <stdlib.h> in lieu of real functions.
#undef abort
#undef abs
#undef atexit
/* ... */
and pass the respective functions into the std namespace:
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
using ::div_t;
using ::ldiv_t;
using ::abort;
using ::abs;
using ::atexit;
/* ... */
}
Looking at stdlib.h there is no trace of these macros, only the normal function prototypes. Doing a recursive search with grep at /usr/include showed me that they are not defined, only undefined at the <cheader> files. What am I missing?
My gcc version is 5.4.0, and I am in Ubuntu 16.04.3 LTS which comes bundled with Windows 10