| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> |
| <title>osclconfig_limits_typedefs.h Source File</title> |
| <link href="doxygen.css" rel="stylesheet" type="text/css"> |
| </head><body> |
| <!-- Generated by Doxygen 1.2.18 --> |
| <center> |
| <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="modules.html">Modules</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Data Structures</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Data Fields</a> <a class="qindex" href="globals.html">Globals</a> </center> |
| <hr><h1>osclconfig_limits_typedefs.h</h1><a href="osclconfig__limits__typedefs_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">// -*- c++ -*-</span> |
| 00002 <span class="comment">// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</span> |
| 00003 |
| 00004 <span class="comment">// O S C L C O N F I G_ L I M I T S _ T Y P E D E F S</span> |
| 00005 |
| 00006 <span class="comment">// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</span> |
| 00007 |
| 00008 |
| 00017 <span class="preprocessor">#ifndef OSCLCONFIG_LIMITS_TYPEDEFS_H_INCLUDED</span> |
| 00018 <span class="preprocessor"></span><span class="preprocessor">#define OSCLCONFIG_LIMITS_TYPEDEFS_H_INCLUDED</span> |
| 00019 <span class="preprocessor"></span> |
| 00020 |
| 00021 <span class="preprocessor">#include <limits.h></span> |
| 00022 |
| 00023 <span class="comment">// determine if char is signed or unsigned</span> |
| 00024 <span class="preprocessor">#if ( CHAR_MIN == 0 )</span> |
| <a name="l00025"></a><a class="code" href="osclconfig__limits__typedefs_8h.html#a0">00025</a> <span class="preprocessor"></span><span class="preprocessor">#define OSCL_CHAR_IS_UNSIGNED 1</span> |
| <a name="l00026"></a><a class="code" href="osclconfig__limits__typedefs_8h.html#a1">00026</a> <span class="preprocessor"></span><span class="preprocessor">#define OSCL_CHAR_IS_SIGNED 0</span> |
| 00027 <span class="preprocessor"></span><span class="preprocessor">#elif ( CHAR_MIN == SCHAR_MIN )</span> |
| 00028 <span class="preprocessor"></span><span class="preprocessor">#define OSCL_CHAR_IS_UNSIGNED 0</span> |
| 00029 <span class="preprocessor"></span><span class="preprocessor">#define OSCL_CHAR_IS_SIGNED 1</span> |
| 00030 <span class="preprocessor"></span><span class="preprocessor">#else</span> |
| 00031 <span class="preprocessor"></span><span class="preprocessor">#error "Cannot determine if char is signed or unsigned"</span> |
| 00032 <span class="preprocessor"></span><span class="preprocessor">#endif</span> |
| 00033 <span class="preprocessor"></span> |
| 00034 |
| 00035 <span class="preprocessor">#if ( (CHAR_MAX == 255) || (CHAR_MAX == 127) )</span> |
| 00036 <span class="preprocessor"></span><span class="keyword">typedef</span> <span class="keywordtype">signed</span> <span class="keywordtype">char</span> int8; |
| 00037 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> uint8; |
| 00038 <span class="preprocessor">#else</span> |
| 00039 <span class="preprocessor"></span><span class="preprocessor">#error "Cannot determine an 8-bit interger type"</span> |
| 00040 <span class="preprocessor"></span><span class="preprocessor">#endif</span> |
| 00041 <span class="preprocessor"></span> |
| 00042 |
| 00043 <span class="preprocessor">#if ( SHRT_MAX == 32767 )</span> |
| 00044 <span class="preprocessor"></span><span class="keyword">typedef</span> <span class="keywordtype">short</span> int16; |
| 00045 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> uint16; |
| 00046 |
| 00047 <span class="preprocessor">#elif ( INT_MAX == 32767 )</span> |
| 00048 <span class="preprocessor"></span><span class="keyword">typedef</span> <span class="keywordtype">int</span> int16; |
| 00049 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> uint16; |
| 00050 |
| 00051 <span class="preprocessor">#else</span> |
| 00052 <span class="preprocessor"></span><span class="preprocessor">#error "Cannot determine 16-bit integer type"</span> |
| 00053 <span class="preprocessor"></span><span class="preprocessor">#endif</span> |
| 00054 <span class="preprocessor"></span> |
| 00055 |
| 00056 |
| 00057 <span class="preprocessor">#if ( INT_MAX == 2147483647 )</span> |
| 00058 <span class="preprocessor"></span><span class="keyword">typedef</span> <span class="keywordtype">int</span> int32; |
| 00059 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> uint32; |
| 00060 |
| 00061 <span class="preprocessor">#elif ( LONG_MAX == 2147483647 )</span> |
| 00062 <span class="preprocessor"></span><span class="keyword">typedef</span> <span class="keywordtype">long</span> int32; |
| 00063 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> uint32; |
| 00064 |
| 00065 <span class="preprocessor">#else</span> |
| 00066 <span class="preprocessor"></span><span class="preprocessor">#error "Cannot determine 32-bit integer type"</span> |
| 00067 <span class="preprocessor"></span><span class="preprocessor">#endif</span> |
| 00068 <span class="preprocessor"></span> |
| 00069 |
| 00070 |
| 00071 <span class="preprocessor">#endif</span> |
| </pre></div><hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small> |
| <address style="align: left;"><small>Posting Version: OPENCORE_20090310 </small> |
| </small></address> |
| </body> |
| </html> |