What's the portable way of checking whether a long type data is in range of int?
<p>For example: </p>

<pre><code>long xx = ..;  //is xx in range of an int type?
</code></pre>

<p>I came up w/ with this question in my mind, so it's not really an interview question, as some of you may ask.</p>

<p>Basically I want to write the code to check it w/o using <code>&lt;climits&gt;</code>, e.g., <code>INT_MIN</code>, <code>INT_MAX</code>. What's the portable, most effective way to do it, if not impossible?</p>

<p>By portable, I mean it shouldn't be implementation defined or platform dependent, e.g., a byte is not always 8 bits.</p>
