Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > a65517607ef053b8c8e6c720e8c36e77 > files > 245

libsmbios-devel-2.2.26-3.fc14.i686.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>libsmbios_c library: /builddir/build/BUILD/libsmbios-2.2.26/src/include/smbios/config/posix_features.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<h1>/builddir/build/BUILD/libsmbios-2.2.26/src/include/smbios/config/posix_features.hpp</h1>  </div>
</div>
<div class="contents">
<a href="posix__features_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">//  (C) Copyright John Maddock 2001 - 2003. </span>
<a name="l00002"></a>00002 <span class="comment">//  Use, modification and distribution are subject to the </span>
<a name="l00003"></a>00003 <span class="comment">//  Boost Software License, Version 1.0. (See accompanying file </span>
<a name="l00004"></a>00004 <span class="comment">//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)</span>
<a name="l00005"></a>00005 
<a name="l00006"></a>00006 
<a name="l00007"></a>00007 <span class="comment">//  See http://www.boost.org for most recent version.</span>
<a name="l00008"></a>00008 
<a name="l00009"></a>00009 <span class="comment">// All POSIX feature tests go in this file,</span>
<a name="l00010"></a>00010 <span class="comment">// Note that we test _POSIX_C_SOURCE and _XOPEN_SOURCE as well</span>
<a name="l00011"></a>00011 <span class="comment">// _POSIX_VERSION and _XOPEN_VERSION: on some systems POSIX API&#39;s</span>
<a name="l00012"></a>00012 <span class="comment">// may be present but none-functional unless _POSIX_C_SOURCE and</span>
<a name="l00013"></a>00013 <span class="comment">// _XOPEN_SOURCE have been defined to the right value (it&#39;s up</span>
<a name="l00014"></a>00014 <span class="comment">// to the user to do this *before* including any header, although</span>
<a name="l00015"></a>00015 <span class="comment">// in most cases the compiler will do this for you).</span>
<a name="l00016"></a>00016 
<a name="l00017"></a>00017 <span class="preprocessor">#  if defined(LIBSMBIOS_HAS_UNISTD_H)</span>
<a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#     include &lt;unistd.h&gt;</span>
<a name="l00019"></a>00019 
<a name="l00020"></a>00020       <span class="comment">// XOpen has &lt;nl_types.h&gt;, but is this the correct version check?</span>
<a name="l00021"></a>00021 <span class="preprocessor">#     if defined(_XOPEN_VERSION) &amp;&amp; (_XOPEN_VERSION &gt;= 3)</span>
<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#        define LIBSMBIOS_HAS_NL_TYPES_H</span>
<a name="l00023"></a>00023 <span class="preprocessor"></span><span class="preprocessor">#     endif</span>
<a name="l00024"></a>00024 <span class="preprocessor"></span>
<a name="l00025"></a>00025       <span class="comment">// POSIX version 6 requires &lt;stdint.h&gt;</span>
<a name="l00026"></a>00026 <span class="preprocessor">#     if defined(_POSIX_VERSION) &amp;&amp; (_POSIX_VERSION &gt;= 200100)</span>
<a name="l00027"></a>00027 <span class="preprocessor"></span><span class="preprocessor">#        define LIBSMBIOS_HAS_STDINT_H</span>
<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#     endif</span>
<a name="l00029"></a>00029 <span class="preprocessor"></span>
<a name="l00030"></a>00030       <span class="comment">// POSIX version 2 requires &lt;dirent.h&gt;</span>
<a name="l00031"></a>00031 <span class="preprocessor">#     if defined(_POSIX_VERSION) &amp;&amp; (_POSIX_VERSION &gt;= 199009L)</span>
<a name="l00032"></a>00032 <span class="preprocessor"></span><span class="preprocessor">#        define LIBSMBIOS_HAS_DIRENT_H</span>
<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#     endif</span>
<a name="l00034"></a>00034 <span class="preprocessor"></span>
<a name="l00035"></a>00035       <span class="comment">// POSIX version 3 requires &lt;signal.h&gt; to have sigaction:</span>
<a name="l00036"></a>00036 <span class="preprocessor">#     if defined(_POSIX_VERSION) &amp;&amp; (_POSIX_VERSION &gt;= 199506L)</span>
<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#        define LIBSMBIOS_HAS_SIGACTION</span>
<a name="l00038"></a>00038 <span class="preprocessor"></span><span class="preprocessor">#     endif</span>
<a name="l00039"></a>00039 <span class="preprocessor"></span>      <span class="comment">// POSIX defines _POSIX_THREADS &gt; 0 for pthread support,</span>
<a name="l00040"></a>00040       <span class="comment">// however some platforms define _POSIX_THREADS without</span>
<a name="l00041"></a>00041       <span class="comment">// a value, hence the (_POSIX_THREADS+0 &gt;= 0) check.</span>
<a name="l00042"></a>00042       <span class="comment">// Strictly speaking this may catch platforms with a</span>
<a name="l00043"></a>00043       <span class="comment">// non-functioning stub &lt;pthreads.h&gt;, but such occurrences should</span>
<a name="l00044"></a>00044       <span class="comment">// occur very rarely if at all.</span>
<a name="l00045"></a>00045 <span class="preprocessor">#     if defined(_POSIX_THREADS) &amp;&amp; (_POSIX_THREADS+0 &gt;= 0) &amp;&amp; !defined(LIBSMBIOS_HAS_WINTHREADS) &amp;&amp; !defined(LIBSMBIOS_HAS_MPTASKS)</span>
<a name="l00046"></a>00046 <span class="preprocessor"></span><span class="preprocessor">#        define LIBSMBIOS_HAS_PTHREADS</span>
<a name="l00047"></a>00047 <span class="preprocessor"></span><span class="preprocessor">#     endif</span>
<a name="l00048"></a>00048 <span class="preprocessor"></span>
<a name="l00049"></a>00049       <span class="comment">// LIBSMBIOS_HAS_NANOSLEEP:</span>
<a name="l00050"></a>00050       <span class="comment">// This is predicated on _POSIX_TIMERS or _XOPEN_REALTIME:</span>
<a name="l00051"></a>00051 <span class="preprocessor">#     if (defined(_POSIX_TIMERS) &amp;&amp; (_POSIX_TIMERS+0 &gt;= 0)) \</span>
<a name="l00052"></a>00052 <span class="preprocessor">             || (defined(_XOPEN_REALTIME) &amp;&amp; (_XOPEN_REALTIME+0 &gt;= 0))</span>
<a name="l00053"></a>00053 <span class="preprocessor"></span><span class="preprocessor">#        define LIBSMBIOS_HAS_NANOSLEEP</span>
<a name="l00054"></a>00054 <span class="preprocessor"></span><span class="preprocessor">#     endif</span>
<a name="l00055"></a>00055 <span class="preprocessor"></span>
<a name="l00056"></a>00056       <span class="comment">// LIBSMBIOS_HAS_CLOCK_GETTIME:</span>
<a name="l00057"></a>00057       <span class="comment">// This is predicated on _POSIX_TIMERS (also on _XOPEN_REALTIME</span>
<a name="l00058"></a>00058       <span class="comment">// but at least one platform - linux - defines that flag without</span>
<a name="l00059"></a>00059       <span class="comment">// defining clock_gettime):</span>
<a name="l00060"></a>00060 <span class="preprocessor">#     if (defined(_POSIX_TIMERS) &amp;&amp; (_POSIX_TIMERS+0 &gt;= 0))</span>
<a name="l00061"></a>00061 <span class="preprocessor"></span><span class="preprocessor">#        define LIBSMBIOS_HAS_CLOCK_GETTIME</span>
<a name="l00062"></a>00062 <span class="preprocessor"></span><span class="preprocessor">#     endif</span>
<a name="l00063"></a>00063 <span class="preprocessor"></span>
<a name="l00064"></a>00064       <span class="comment">// LIBSMBIOS_HAS_SCHED_YIELD:</span>
<a name="l00065"></a>00065       <span class="comment">// This is predicated on _POSIX_PRIORITY_SCHEDULING or</span>
<a name="l00066"></a>00066       <span class="comment">// on _POSIX_THREAD_PRIORITY_SCHEDULING or on _XOPEN_REALTIME.</span>
<a name="l00067"></a>00067 <span class="preprocessor">#     if defined(_POSIX_PRIORITY_SCHEDULING) &amp;&amp; (_POSIX_PRIORITY_SCHEDULING+0 &gt; 0)\</span>
<a name="l00068"></a>00068 <span class="preprocessor">            || (defined(_POSIX_THREAD_PRIORITY_SCHEDULING) &amp;&amp; (_POSIX_THREAD_PRIORITY_SCHEDULING+0 &gt; 0))\</span>
<a name="l00069"></a>00069 <span class="preprocessor">            || (defined(_XOPEN_REALTIME) &amp;&amp; (_XOPEN_REALTIME+0 &gt;= 0))</span>
<a name="l00070"></a>00070 <span class="preprocessor"></span><span class="preprocessor">#        define LIBSMBIOS_HAS_SCHED_YIELD</span>
<a name="l00071"></a>00071 <span class="preprocessor"></span><span class="preprocessor">#     endif</span>
<a name="l00072"></a>00072 <span class="preprocessor"></span>
<a name="l00073"></a>00073       <span class="comment">// LIBSMBIOS_HAS_GETTIMEOFDAY:</span>
<a name="l00074"></a>00074       <span class="comment">// LIBSMBIOS_HAS_PTHREAD_MUTEXATTR_SETTYPE:</span>
<a name="l00075"></a>00075       <span class="comment">// These are predicated on _XOPEN_VERSION, and appears to be first released</span>
<a name="l00076"></a>00076       <span class="comment">// in issue 4, version 2 (_XOPEN_VERSION &gt; 500).</span>
<a name="l00077"></a>00077 <span class="preprocessor">#     if defined(_XOPEN_VERSION) &amp;&amp; (_XOPEN_VERSION+0 &gt;= 500)</span>
<a name="l00078"></a>00078 <span class="preprocessor"></span><span class="preprocessor">#        define LIBSMBIOS_HAS_GETTIMEOFDAY</span>
<a name="l00079"></a>00079 <span class="preprocessor"></span><span class="preprocessor">#        if defined(_XOPEN_SOURCE) &amp;&amp; (_XOPEN_SOURCE &gt;= 500)</span>
<a name="l00080"></a>00080 <span class="preprocessor"></span><span class="preprocessor">#           define LIBSMBIOS_HAS_PTHREAD_MUTEXATTR_SETTYPE</span>
<a name="l00081"></a>00081 <span class="preprocessor"></span><span class="preprocessor">#        endif</span>
<a name="l00082"></a>00082 <span class="preprocessor"></span><span class="preprocessor">#     endif</span>
<a name="l00083"></a>00083 <span class="preprocessor"></span>
<a name="l00084"></a>00084 <span class="preprocessor">#  endif</span>
<a name="l00085"></a>00085 <span class="preprocessor"></span>
<a name="l00086"></a>00086 
<a name="l00087"></a>00087 
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Tue Oct 5 2010 for libsmbios_c library by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>