title: how to find the source of some macros
body: <p>There are many places for defining a macro.When the macro is defined in our own project by us,the are easy to find the definition position for them.
  But when i try to learn some famous open source project,i am frequently pestered by the question:where to find the source of the macros,if i can not get it's definition,i won't understand some of them (e.g. some of them can be guessed by their name).
  for example,some statement from apache:</p>
  
  <pre><code>#if defined(__osf__) &amp;&amp; defined(__alpha),
  
  #elif defined(__NSIG)
  </code></pre>
  
  <p>as for my knowledge,i know there are some possible originating place for a macro:  </p>
  
  <ol>
  <li>from this project itself,in some source file(this is the easiest,because we can find it by some tool)  </li>
  <li>from some header file of some 3rd  lib ,we can grep it</li>
  <li>from c/c++ standard header file(where are they in linux?)  </li>
  <li>from the os (where are they in linux?)  </li>
  <li>automatically generated by the configure tool(it is bitter,i have no idea)  </li>
  <li>from the compiler tool like gcc/g++,or in the makefile we can define some macro  </li>
  </ol>
  
  <p>I have some question to consult:</p>
  
  <ol>
  <li>how to differentiate them between os defined and gcc/g++ defined and configure tool generated macros？ do they have some characteristic respectively?</li>
  <li>how to find the source of  those defined by os or by standard C or compiler? e.g.,using <code>grep</code> or <code>find</code> utilities</li>
  <li>what does it mean if one macro such as <code>__strange___</code> can not be find by combing the whole machine (<code>cd /;grep __strange___ -r</code>)?</li>
  </ol>
  
  <p>Thanks for telling the principle and the method to distinguish them and ,to find the source of them!</p>