Sophie

Sophie

distrib > Mandriva > 10.2 > i586 > media > contrib > by-pkgid > 4f37b923758ceff94a2c0ccca62b4b43 > files > 93

libapr1-devel-1.1.1-1mdk.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Apache Portable Runtime: apr_portable.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.9.1 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
<div class="nav">
<a class="el" href="dir_000000.html">home</a>&nbsp;/&nbsp;<a class="el" href="dir_000001.html">oden</a>&nbsp;/&nbsp;<a class="el" href="dir_000002.html">RPM</a>&nbsp;/&nbsp;<a class="el" href="dir_000003.html">BUILD</a>&nbsp;/&nbsp;<a class="el" href="dir_000004.html">apr-1.1.1</a>&nbsp;/&nbsp;<a class="el" href="dir_000005.html">include</a></div>
<h1>apr_portable.h</h1><a href="apr__portable_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment">00001 <span class="comment">/* Copyright 2000-2004 The Apache Software Foundation</span>
00002 <span class="comment"> *</span>
00003 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</span>
00004 <span class="comment"> * you may not use this file except in compliance with the License.</span>
00005 <span class="comment"> * You may obtain a copy of the License at</span>
00006 <span class="comment"> *</span>
00007 <span class="comment"> *     http://www.apache.org/licenses/LICENSE-2.0</span>
00008 <span class="comment"> *</span>
00009 <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span>
00010 <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span>
00011 <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span>
00012 <span class="comment"> * See the License for the specific language governing permissions and</span>
00013 <span class="comment"> * limitations under the License.</span>
00014 <span class="comment"> */</span>
00015 
00016 <span class="comment">/* This header file is where you should put ANY platform specific information.</span>
00017 <span class="comment"> * This should be the only header file that programs need to include that </span>
00018 <span class="comment"> * actually has platform dependant code which refers to the .</span>
00019 <span class="comment"> */</span>
00020 <span class="preprocessor">#ifndef APR_PORTABLE_H</span>
00021 <span class="preprocessor"></span><span class="preprocessor">#define APR_PORTABLE_H</span>
00022 <span class="preprocessor"></span><span class="comment">/**</span>
00023 <span class="comment"> * @file apr_portable.h</span>
00024 <span class="comment"> * @brief APR Portability Routines</span>
00025 <span class="comment"> */</span>
00026 
00027 <span class="preprocessor">#include "<a class="code" href="apr_8h.html">apr.h</a>"</span>
00028 <span class="preprocessor">#include "<a class="code" href="apr__pools_8h.html">apr_pools.h</a>"</span>
00029 <span class="preprocessor">#include "<a class="code" href="apr__thread__proc_8h.html">apr_thread_proc.h</a>"</span>
00030 <span class="preprocessor">#include "<a class="code" href="apr__file__io_8h.html">apr_file_io.h</a>"</span>
00031 <span class="preprocessor">#include "<a class="code" href="apr__network__io_8h.html">apr_network_io.h</a>"</span>
00032 <span class="preprocessor">#include "<a class="code" href="apr__errno_8h.html">apr_errno.h</a>"</span>
00033 <span class="preprocessor">#include "<a class="code" href="apr__global__mutex_8h.html">apr_global_mutex.h</a>"</span>
00034 <span class="preprocessor">#include "<a class="code" href="apr__proc__mutex_8h.html">apr_proc_mutex.h</a>"</span>
00035 <span class="preprocessor">#include "<a class="code" href="apr__time_8h.html">apr_time.h</a>"</span>
00036 <span class="preprocessor">#include "<a class="code" href="apr__dso_8h.html">apr_dso.h</a>"</span>
00037 <span class="preprocessor">#include "<a class="code" href="apr__shm_8h.html">apr_shm.h</a>"</span>
00038 
00039 <span class="preprocessor">#if APR_HAVE_DIRENT_H</span>
00040 <span class="preprocessor"></span><span class="preprocessor">#include &lt;dirent.h&gt;</span>
00041 <span class="preprocessor">#endif</span>
00042 <span class="preprocessor"></span><span class="preprocessor">#if APR_HAVE_FCNTL_H</span>
00043 <span class="preprocessor"></span><span class="preprocessor">#include &lt;fcntl.h&gt;</span>
00044 <span class="preprocessor">#endif</span>
00045 <span class="preprocessor"></span><span class="preprocessor">#if APR_HAVE_PTHREAD_H</span>
00046 <span class="preprocessor"></span><span class="preprocessor">#include &lt;pthread.h&gt;</span>
00047 <span class="preprocessor">#endif</span>
00048 <span class="preprocessor"></span>
00049 <span class="preprocessor">#ifdef __cplusplus</span>
00050 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> {
00051 <span class="preprocessor">#endif </span><span class="comment">/* __cplusplus */</span>
00052 <span class="comment"></span>
00053 <span class="comment">/**</span>
00054 <span class="comment"> * @defgroup apr_portabile Portability Routines</span>
00055 <span class="comment"> * @ingroup APR </span>
00056 <span class="comment"> * @{</span>
00057 <span class="comment"> */</span>
00058 
00059 <span class="preprocessor">#ifdef WIN32</span>
00060 <span class="preprocessor"></span><span class="comment">/* The primitives for Windows types */</span>
00061 <span class="keyword">typedef</span> HANDLE                apr_os_file_t;
00062 <span class="keyword">typedef</span> HANDLE                apr_os_dir_t;
00063 <span class="keyword">typedef</span> SOCKET                apr_os_sock_t;
00064 <span class="keyword">typedef</span> HANDLE                <a class="code" href="structapr__os__proc__mutex__t.html">apr_os_proc_mutex_t</a>;
00065 <span class="keyword">typedef</span> HANDLE                apr_os_thread_t;
00066 <span class="keyword">typedef</span> HANDLE                apr_os_proc_t;
00067 <span class="keyword">typedef</span> DWORD                 apr_os_threadkey_t; 
00068 <span class="keyword">typedef</span> FILETIME              apr_os_imp_time_t;
00069 <span class="keyword">typedef</span> SYSTEMTIME            apr_os_exp_time_t;
00070 <span class="keyword">typedef</span> HANDLE                apr_os_dso_handle_t;
00071 <span class="keyword">typedef</span> HANDLE                apr_os_shm_t;
00072 
00073 <span class="preprocessor">#elif defined(OS2)</span>
00074 <span class="preprocessor"></span><span class="keyword">typedef</span> HFILE                 apr_os_file_t;
00075 <span class="keyword">typedef</span> HDIR                  apr_os_dir_t;
00076 <span class="keyword">typedef</span> <span class="keywordtype">int</span>                   apr_os_sock_t;
00077 <span class="keyword">typedef</span> HMTX                  apr_os_proc_mutex_t;
00078 <span class="keyword">typedef</span> TID                   apr_os_thread_t;
00079 <span class="keyword">typedef</span> PID                   apr_os_proc_t;
00080 <span class="keyword">typedef</span> PULONG                apr_os_threadkey_t; 
00081 <span class="keyword">typedef</span> <span class="keyword">struct </span>timeval        <a class="code" href="group__apr__portabile.html#ga7">apr_os_imp_time_t</a>;
00082 <span class="keyword">typedef</span> <span class="keyword">struct </span>tm             <a class="code" href="group__apr__portabile.html#ga8">apr_os_exp_time_t</a>;
00083 <span class="keyword">typedef</span> HMODULE               apr_os_dso_handle_t;
00084 <span class="keyword">typedef</span> <span class="keywordtype">void</span>*                 apr_os_shm_t;
00085 
00086 <span class="preprocessor">#elif defined(__BEOS__)</span>
00087 <span class="preprocessor"></span><span class="preprocessor">#include &lt;kernel/OS.h&gt;</span>
00088 <span class="preprocessor">#include &lt;kernel/image.h&gt;</span>
00089 
00090 <span class="keyword">struct </span><a class="code" href="group__apr__portabile.html#ga3">apr_os_proc_mutex_t</a> {
00091         sem_id sem;
00092         int32  ben;
00093 };
00094 
00095 <span class="keyword">typedef</span> <span class="keywordtype">int</span>                   apr_os_file_t;
00096 <span class="keyword">typedef</span> DIR                   apr_os_dir_t;
00097 <span class="keyword">typedef</span> <span class="keywordtype">int</span>                   apr_os_sock_t;
00098 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="group__apr__portabile.html#ga3">apr_os_proc_mutex_t</a>  <a class="code" href="group__apr__portabile.html#ga3">apr_os_proc_mutex_t</a>;
00099 <span class="keyword">typedef</span> thread_id             apr_os_thread_t;
00100 <span class="keyword">typedef</span> thread_id             apr_os_proc_t;
00101 <span class="keyword">typedef</span> <span class="keywordtype">int</span>                   apr_os_threadkey_t;
00102 <span class="keyword">typedef</span> <span class="keyword">struct </span>timeval        <a class="code" href="group__apr__portabile.html#ga7">apr_os_imp_time_t</a>;
00103 <span class="keyword">typedef</span> <span class="keyword">struct </span>tm             <a class="code" href="group__apr__portabile.html#ga8">apr_os_exp_time_t</a>;
00104 <span class="keyword">typedef</span> image_id              apr_os_dso_handle_t;
00105 <span class="keyword">typedef</span> <span class="keywordtype">void</span>*                 apr_os_shm_t;
00106 
00107 <span class="preprocessor">#elif defined(NETWARE)</span>
00108 <span class="preprocessor"></span><span class="keyword">typedef</span> <span class="keywordtype">int</span>                   apr_os_file_t;
00109 <span class="keyword">typedef</span> DIR                   apr_os_dir_t;
00110 <span class="keyword">typedef</span> <span class="keywordtype">int</span>                   apr_os_sock_t;
00111 <span class="keyword">typedef</span> NXMutex_t             apr_os_proc_mutex_t;
00112 <span class="keyword">typedef</span> NXThreadId_t          apr_os_thread_t;
00113 <span class="keyword">typedef</span> <span class="keywordtype">long</span>                  apr_os_proc_t;
00114 <span class="keyword">typedef</span> NXKey_t               apr_os_threadkey_t; 
00115 <span class="keyword">typedef</span> <span class="keyword">struct </span>timeval        <a class="code" href="group__apr__portabile.html#ga7">apr_os_imp_time_t</a>;
00116 <span class="keyword">typedef</span> <span class="keyword">struct </span>tm             <a class="code" href="group__apr__portabile.html#ga8">apr_os_exp_time_t</a>;
00117 <span class="keyword">typedef</span> <span class="keywordtype">void</span> *                apr_os_dso_handle_t;
00118 <span class="keyword">typedef</span> <span class="keywordtype">void</span>*                 apr_os_shm_t;
00119 
00120 <span class="preprocessor">#else</span>
00121 <span class="preprocessor"></span><span class="comment">/* Any other OS should go above this one.  This is the lowest common</span>
00122 <span class="comment"> * denominator typedefs for  all UNIX-like systems.  :)</span>
00123 <span class="comment"> */</span>
00124 <span class="comment"></span>
00125 <span class="comment">/** Basic OS process mutex structure. */</span>
<a name="l00126"></a><a class="code" href="structapr__os__proc__mutex__t.html">00126</a> <span class="keyword">struct </span><a class="code" href="group__apr__portabile.html#ga3">apr_os_proc_mutex_t</a> {
00127 <span class="preprocessor">#if APR_HAS_SYSVSEM_SERIALIZE || APR_HAS_FCNTL_SERIALIZE || APR_HAS_FLOCK_SERIALIZE</span>
00128 <span class="preprocessor"></span><span class="comment">    /** Value used for SYS V Semaphore, FCNTL and FLOCK serialization */</span>
<a name="l00129"></a><a class="code" href="structapr__os__proc__mutex__t.html#o0">00129</a>     <span class="keywordtype">int</span> crossproc;
00130 <span class="preprocessor">#endif</span>
00131 <span class="preprocessor"></span><span class="preprocessor">#if APR_HAS_PROC_PTHREAD_SERIALIZE</span>
00132 <span class="preprocessor"></span><span class="comment">    /** Value used for PTHREAD serialization */</span>
<a name="l00133"></a><a class="code" href="structapr__os__proc__mutex__t.html#o1">00133</a>     pthread_mutex_t *pthread_interproc;
00134 <span class="preprocessor">#endif</span>
00135 <span class="preprocessor"></span><span class="preprocessor">#if APR_HAS_THREADS</span>
00136 <span class="preprocessor"></span>    <span class="comment">/* If no threads, no need for thread locks */</span>
00137 <span class="preprocessor">#if APR_USE_PTHREAD_SERIALIZE</span>
00138 <span class="preprocessor"></span><span class="comment">    /** This value is currently unused within APR and Apache */</span> 
<a name="l00139"></a><a class="code" href="structapr__os__proc__mutex__t.html#o2">00139</a>     pthread_mutex_t *intraproc;
00140 <span class="preprocessor">#endif</span>
00141 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
00142 <span class="preprocessor"></span>};
00143 
<a name="l00144"></a><a class="code" href="group__apr__portabile.html#ga0">00144</a> <span class="keyword">typedef</span> <span class="keywordtype">int</span>                   apr_os_file_t;        <span class="comment">/**&lt; native file */</span>
<a name="l00145"></a><a class="code" href="group__apr__portabile.html#ga1">00145</a> <span class="keyword">typedef</span> DIR                   apr_os_dir_t;         <span class="comment">/**&lt; native dir */</span>
<a name="l00146"></a><a class="code" href="group__apr__portabile.html#ga2">00146</a> <span class="keyword">typedef</span> <span class="keywordtype">int</span>                   apr_os_sock_t;        <span class="comment">/**&lt; native dir */</span>
<a name="l00147"></a><a class="code" href="group__apr__portabile.html#ga3">00147</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="group__apr__portabile.html#ga3">apr_os_proc_mutex_t</a>  <a class="code" href="group__apr__portabile.html#ga3">apr_os_proc_mutex_t</a>; <span class="comment">/**&lt; native proces</span>
00148 <span class="comment">                                                          *   mutex</span>
00149 <span class="comment">                                                          */</span>
00150 <span class="preprocessor">#if APR_HAS_THREADS &amp;&amp; APR_HAVE_PTHREAD_H </span>
<a name="l00151"></a><a class="code" href="group__apr__portabile.html#ga4">00151</a> <span class="preprocessor"></span><span class="keyword">typedef</span> pthread_t             apr_os_thread_t;      <span class="comment">/**&lt; native thread */</span>
<a name="l00152"></a><a class="code" href="group__apr__portabile.html#ga5">00152</a> <span class="keyword">typedef</span> pthread_key_t         apr_os_threadkey_t;   <span class="comment">/**&lt; native thread address</span>
00153 <span class="comment">                                                     *   space */</span>
00154 <span class="preprocessor">#endif</span>
<a name="l00155"></a><a class="code" href="group__apr__portabile.html#ga6">00155</a> <span class="preprocessor"></span><span class="keyword">typedef</span> pid_t                 apr_os_proc_t;        <span class="comment">/**&lt; native pid */</span>
<a name="l00156"></a><a class="code" href="group__apr__portabile.html#ga7">00156</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>timeval        <a class="code" href="group__apr__portabile.html#ga7">apr_os_imp_time_t</a>;    <span class="comment">/**&lt; native timeval */</span>
<a name="l00157"></a><a class="code" href="group__apr__portabile.html#ga8">00157</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>tm             <a class="code" href="group__apr__portabile.html#ga8">apr_os_exp_time_t</a>;    <span class="comment">/**&lt; native tm */</span><span class="comment"></span>
00158 <span class="comment">/** @var apr_os_dso_handle_t</span>
00159 <span class="comment"> * native dso types</span>
00160 <span class="comment"> */</span>
00161 <span class="preprocessor">#if defined(HPUX) || defined(HPUX10) || defined(HPUX11)</span>
00162 <span class="preprocessor"></span><span class="preprocessor">#include &lt;dl.h&gt;</span>
00163 <span class="keyword">typedef</span> shl_t                 apr_os_dso_handle_t;
00164 <span class="preprocessor">#elif defined(DARWIN)</span>
00165 <span class="preprocessor"></span><span class="preprocessor">#include &lt;mach-o/dyld.h&gt;</span>
00166 <span class="keyword">typedef</span> NSModule              apr_os_dso_handle_t;
00167 <span class="preprocessor">#else</span>
<a name="l00168"></a><a class="code" href="group__apr__portabile.html#ga9">00168</a> <span class="preprocessor"></span><span class="keyword">typedef</span> <span class="keywordtype">void</span> *                apr_os_dso_handle_t;
00169 <span class="preprocessor">#endif</span>
<a name="l00170"></a><a class="code" href="group__apr__portabile.html#ga10">00170</a> <span class="preprocessor"></span><span class="keyword">typedef</span> <span class="keywordtype">void</span>*                 apr_os_shm_t;         <span class="comment">/**&lt; native SHM */</span>
00171 
00172 <span class="preprocessor">#endif</span>
00173 <span class="preprocessor"></span><span class="comment"></span>
00174 <span class="comment">/**</span>
00175 <span class="comment"> * @typedef apr_os_sock_info_t</span>
00176 <span class="comment"> * @brief alias for local OS socket</span>
00177 <span class="comment"> */</span><span class="comment"></span>
00178 <span class="comment">/**</span>
00179 <span class="comment"> * everything APR needs to know about an active socket to construct</span>
00180 <span class="comment"> * an APR socket from it; currently, this is platform-independent</span>
00181 <span class="comment"> */</span>
<a name="l00182"></a><a class="code" href="structapr__os__sock__info__t.html">00182</a> <span class="keyword">struct </span><a class="code" href="structapr__os__sock__info__t.html">apr_os_sock_info_t</a> {
<a name="l00183"></a><a class="code" href="structapr__os__sock__info__t.html#o0">00183</a>     <a class="code" href="group__apr__portabile.html#ga2">apr_os_sock_t</a> *os_sock; <span class="comment">/**&lt; always required */</span>
<a name="l00184"></a><a class="code" href="structapr__os__sock__info__t.html#o1">00184</a>     <span class="keyword">struct </span>sockaddr *local; <span class="comment">/**&lt; NULL if not yet bound */</span>
<a name="l00185"></a><a class="code" href="structapr__os__sock__info__t.html#o2">00185</a>     <span class="keyword">struct </span>sockaddr *remote; <span class="comment">/**&lt; NULL if not connected */</span>
<a name="l00186"></a><a class="code" href="structapr__os__sock__info__t.html#o3">00186</a>     <span class="keywordtype">int</span> family;             <span class="comment">/**&lt; always required (APR_INET, APR_INET6, etc.) */</span>
<a name="l00187"></a><a class="code" href="structapr__os__sock__info__t.html#o4">00187</a>     <span class="keywordtype">int</span> type;               <span class="comment">/**&lt; always required (SOCK_STREAM, SOCK_DGRAM, etc.) */</span>
<a name="l00188"></a><a class="code" href="structapr__os__sock__info__t.html#o5">00188</a>     <span class="keywordtype">int</span> protocol;           <span class="comment">/**&lt; 0 or actual protocol (APR_PROTO_SCTP, APR_PROTO_TCP, etc.) */</span>
00189 };
00190 
<a name="l00191"></a><a class="code" href="group__apr__portabile.html#ga11">00191</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structapr__os__sock__info__t.html">apr_os_sock_info_t</a> <a class="code" href="group__apr__portabile.html#ga11">apr_os_sock_info_t</a>;
00192 
00193 <span class="preprocessor">#if APR_PROC_MUTEX_IS_GLOBAL || defined(DOXYGEN)</span>
00194 <span class="preprocessor"></span><span class="comment">/** Opaque global mutex type */</span>
<a name="l00195"></a><a class="code" href="group__apr__portabile.html#ga31">00195</a> <span class="preprocessor">#define apr_os_global_mutex_t apr_os_proc_mutex_t</span>
00196 <span class="preprocessor"></span><span class="comment">/** @return apr_os_global_mutex */</span>
<a name="l00197"></a><a class="code" href="group__apr__portabile.html#ga32">00197</a> <span class="preprocessor">#define apr_os_global_mutex_get apr_os_proc_mutex_get</span>
00198 <span class="preprocessor"></span><span class="preprocessor">#else</span>
00199 <span class="preprocessor"></span><span class="comment">    /** Thread and process mutex for those platforms where process mutexes</span>
00200 <span class="comment">     *  are not held in threads.</span>
00201 <span class="comment">     */</span>
00202     <span class="keyword">struct </span><a class="code" href="group__apr__portabile.html#ga31">apr_os_global_mutex_t</a> {
00203         <a class="code" href="group__apr__pools.html#ga0">apr_pool_t</a> *pool;
00204         <a class="code" href="group__apr__proc__mutex.html#ga0">apr_proc_mutex_t</a> *proc_mutex;
00205 <span class="preprocessor">#if APR_HAS_THREADS</span>
00206 <span class="preprocessor"></span>        <a class="code" href="group__apr__thread__mutex.html#ga0">apr_thread_mutex_t</a> *thread_mutex;
00207 <span class="preprocessor">#endif </span><span class="comment">/* APR_HAS_THREADS */</span>
00208     };
00209     <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="group__apr__portabile.html#ga31">apr_os_global_mutex_t</a> <a class="code" href="group__apr__portabile.html#ga31">apr_os_global_mutex_t</a>;
00210 
00211 <a class="code" href="group__apr__platform.html#ga123">APR_DECLARE</a>(apr_status_t) apr_os_global_mutex_get(apr_os_global_mutex_t *ospmutex, 
00212                                                 apr_global_mutex_t *pmutex);
00213 #endif
00214 
00215 <span class="comment"></span>
00216 <span class="comment">/**</span>
00217 <span class="comment"> * convert the file from apr type to os specific type.</span>
00218 <span class="comment"> * @param thefile The os specific file we are converting to</span>
00219 <span class="comment"> * @param file The apr file to convert.</span>
00220 <span class="comment"> * @remark On Unix, it is only possible to get a file descriptor from </span>
00221 <span class="comment"> *         an apr file type.</span>
00222 <span class="comment"> */</span>
00223 APR_DECLARE(apr_status_t) apr_os_file_get(apr_os_file_t *thefile,
00224                                           apr_file_t *file);
00225 <span class="comment"></span>
00226 <span class="comment">/**</span>
00227 <span class="comment"> * convert the dir from apr type to os specific type.</span>
00228 <span class="comment"> * @param thedir The os specific dir we are converting to</span>
00229 <span class="comment"> * @param dir The apr dir to convert.</span>
00230 <span class="comment"> */</span>   
00231 APR_DECLARE(apr_status_t) apr_os_dir_get(apr_os_dir_t **thedir, 
00232                                          apr_dir_t *dir);
00233 <span class="comment"></span>
00234 <span class="comment">/**</span>
00235 <span class="comment"> * Convert the socket from an apr type to an OS specific socket</span>
00236 <span class="comment"> * @param thesock The socket to convert.</span>
00237 <span class="comment"> * @param sock The os specifc equivelant of the apr socket..</span>
00238 <span class="comment"> */</span>
00239 APR_DECLARE(apr_status_t) apr_os_sock_get(apr_os_sock_t *thesock,
00240                                           apr_socket_t *sock);
00241 <span class="comment"></span>
00242 <span class="comment">/**</span>
00243 <span class="comment"> * Convert the proc mutex from os specific type to apr type</span>
00244 <span class="comment"> * @param ospmutex The os specific proc mutex we are converting to.</span>
00245 <span class="comment"> * @param pmutex The apr proc mutex to convert.</span>
00246 <span class="comment"> */</span>
00247 APR_DECLARE(apr_status_t) apr_os_proc_mutex_get(apr_os_proc_mutex_t *ospmutex, 
00248                                                 apr_proc_mutex_t *pmutex);
00249 <span class="comment"></span>
00250 <span class="comment">/**</span>
00251 <span class="comment"> * Get the exploded time in the platforms native format.</span>
00252 <span class="comment"> * @param ostime the native time format</span>
00253 <span class="comment"> * @param aprtime the time to convert</span>
00254 <span class="comment"> */</span>
00255 APR_DECLARE(apr_status_t) apr_os_exp_time_get(apr_os_exp_time_t **ostime,
00256                                  <a class="code" href="structapr__time__exp__t.html">apr_time_exp_t</a> *aprtime);
00257 <span class="comment"></span>
00258 <span class="comment">/**</span>
00259 <span class="comment"> * Get the imploded time in the platforms native format.</span>
00260 <span class="comment"> * @param ostime  the native time format</span>
00261 <span class="comment"> * @param aprtime the time to convert</span>
00262 <span class="comment"> */</span>
00263 APR_DECLARE(apr_status_t) apr_os_imp_time_get(apr_os_imp_time_t **ostime, 
00264                                               apr_time_t *aprtime);
00265 <span class="comment"></span>
00266 <span class="comment">/**</span>
00267 <span class="comment"> * convert the shm from apr type to os specific type.</span>
00268 <span class="comment"> * @param osshm The os specific shm representation</span>
00269 <span class="comment"> * @param shm The apr shm to convert.</span>
00270 <span class="comment"> */</span>   
00271 APR_DECLARE(apr_status_t) apr_os_shm_get(apr_os_shm_t *osshm,
00272                                          apr_shm_t *shm);
00273 
00274 #if APR_HAS_THREADS || defined(DOXYGEN)<span class="comment"></span>
00275 <span class="comment">/** </span>
00276 <span class="comment"> * @defgroup apr_os_thread Thread portability Routines</span>
00277 <span class="comment"> * @{ </span>
00278 <span class="comment"> */</span><span class="comment"></span>
00279 <span class="comment">/**</span>
00280 <span class="comment"> * convert the thread to os specific type from apr type.</span>
00281 <span class="comment"> * @param thethd The apr thread to convert</span>
00282 <span class="comment"> * @param thd The os specific thread we are converting to</span>
00283 <span class="comment"> */</span>
00284 APR_DECLARE(apr_status_t) apr_os_thread_get(apr_os_thread_t **thethd, 
00285                                             apr_thread_t *thd);
00286 <span class="comment"></span>
00287 <span class="comment">/**</span>
00288 <span class="comment"> * convert the thread private memory key to os specific type from an apr type.</span>
00289 <span class="comment"> * @param thekey The apr handle we are converting from.</span>
00290 <span class="comment"> * @param key The os specific handle we are converting to.</span>
00291 <span class="comment"> */</span>
00292 APR_DECLARE(apr_status_t) apr_os_threadkey_get(apr_os_threadkey_t *thekey,
00293                                                apr_threadkey_t *key);
00294 <span class="comment"></span>
00295 <span class="comment">/**</span>
00296 <span class="comment"> * convert the thread from os specific type to apr type.</span>
00297 <span class="comment"> * @param thd The apr thread we are converting to.</span>
00298 <span class="comment"> * @param thethd The os specific thread to convert</span>
00299 <span class="comment"> * @param cont The pool to use if it is needed.</span>
00300 <span class="comment"> */</span>
00301 APR_DECLARE(apr_status_t) apr_os_thread_put(apr_thread_t **thd,
00302                                             apr_os_thread_t *thethd,
00303                                             apr_pool_t *cont);
00304 <span class="comment"></span>
00305 <span class="comment">/**</span>
00306 <span class="comment"> * convert the thread private memory key from os specific type to apr type.</span>
00307 <span class="comment"> * @param key The apr handle we are converting to.</span>
00308 <span class="comment"> * @param thekey The os specific handle to convert</span>
00309 <span class="comment"> * @param cont The pool to use if it is needed.</span>
00310 <span class="comment"> */</span>
00311 APR_DECLARE(apr_status_t) apr_os_threadkey_put(apr_threadkey_t **key,
00312                                                apr_os_threadkey_t *thekey,
00313                                                apr_pool_t *cont);<span class="comment"></span>
00314 <span class="comment">/**</span>
00315 <span class="comment"> * Get the thread ID</span>
00316 <span class="comment"> */</span>
00317 APR_DECLARE(apr_os_thread_t) apr_os_thread_current(<span class="keywordtype">void</span>);
00318 <span class="comment"></span>
00319 <span class="comment">/**</span>
00320 <span class="comment"> * Compare two thread id's</span>
00321 <span class="comment"> * @param tid1 1st Thread ID to compare</span>
00322 <span class="comment"> * @param tid2 2nd Thread ID to compare</span>
00323 <span class="comment"> */</span> 
00324 APR_DECLARE(<span class="keywordtype">int</span>) apr_os_thread_equal(apr_os_thread_t tid1, 
00325                                      apr_os_thread_t tid2);
00326 <span class="comment"></span>
00327 <span class="comment">/** @} */</span>
00328 #endif <span class="comment">/* APR_HAS_THREADS */</span>
00329 <span class="comment"></span>
00330 <span class="comment">/**</span>
00331 <span class="comment"> * convert the file from os specific type to apr type.</span>
00332 <span class="comment"> * @param file The apr file we are converting to.</span>
00333 <span class="comment"> * @param thefile The os specific file to convert</span>
00334 <span class="comment"> * @param flags The flags that were used to open this file.</span>
00335 <span class="comment"> * @param cont The pool to use if it is needed.</span>
00336 <span class="comment"> * @remark On Unix, it is only possible to put a file descriptor into</span>
00337 <span class="comment"> *         an apr file type.</span>
00338 <span class="comment"> */</span>
00339 APR_DECLARE(apr_status_t) apr_os_file_put(apr_file_t **file,
00340                                           apr_os_file_t *thefile,
00341                                           apr_int32_t flags, apr_pool_t *cont); 
00342 <span class="comment"></span>
00343 <span class="comment">/**</span>
00344 <span class="comment"> * convert the file from os specific type to apr type.</span>
00345 <span class="comment"> * @param file The apr file we are converting to.</span>
00346 <span class="comment"> * @param thefile The os specific pipe to convert</span>
00347 <span class="comment"> * @param cont The pool to use if it is needed.</span>
00348 <span class="comment"> * @remark On Unix, it is only possible to put a file descriptor into</span>
00349 <span class="comment"> *         an apr file type.</span>
00350 <span class="comment"> */</span>
00351 APR_DECLARE(apr_status_t) apr_os_pipe_put(apr_file_t **file,
00352                                           apr_os_file_t *thefile,
00353                                           apr_pool_t *cont);
00354 <span class="comment"></span>
00355 <span class="comment">/**</span>
00356 <span class="comment"> * convert the file from os specific type to apr type.</span>
00357 <span class="comment"> * @param file The apr file we are converting to.</span>
00358 <span class="comment"> * @param thefile The os specific pipe to convert</span>
00359 <span class="comment"> * @param register_cleanup A cleanup will be registered on the apr_file_t</span>
00360 <span class="comment"> *   to issue apr_file_close().</span>
00361 <span class="comment"> * @param cont The pool to use if it is needed.</span>
00362 <span class="comment"> * @remark On Unix, it is only possible to put a file descriptor into</span>
00363 <span class="comment"> *         an apr file type.</span>
00364 <span class="comment"> */</span>
00365 APR_DECLARE(apr_status_t) apr_os_pipe_put_ex(apr_file_t **file,
00366                                              apr_os_file_t *thefile,
00367                                              <span class="keywordtype">int</span> register_cleanup,
00368                                              apr_pool_t *cont);
00369 <span class="comment"></span>
00370 <span class="comment">/**</span>
00371 <span class="comment"> * convert the dir from os specific type to apr type.</span>
00372 <span class="comment"> * @param dir The apr dir we are converting to.</span>
00373 <span class="comment"> * @param thedir The os specific dir to convert</span>
00374 <span class="comment"> * @param cont The pool to use when creating to apr directory.</span>
00375 <span class="comment"> */</span>
00376 APR_DECLARE(apr_status_t) apr_os_dir_put(apr_dir_t **dir,
00377                                          apr_os_dir_t *thedir,
00378                                          apr_pool_t *cont); 
00379 <span class="comment"></span>
00380 <span class="comment">/**</span>
00381 <span class="comment"> * Convert a socket from the os specific type to the apr type</span>
00382 <span class="comment"> * @param sock The pool to use.</span>
00383 <span class="comment"> * @param thesock The socket to convert to.</span>
00384 <span class="comment"> * @param cont The socket we are converting to an apr type.</span>
00385 <span class="comment"> * @remark If it is a true socket, it is best to call apr_os_sock_make()</span>
00386 <span class="comment"> *         and provide APR with more information about the socket.</span>
00387 <span class="comment"> */</span>
00388 APR_DECLARE(apr_status_t) apr_os_sock_put(apr_socket_t **sock, 
00389                                           apr_os_sock_t *thesock, 
00390                                           apr_pool_t *cont);
00391 <span class="comment"></span>
00392 <span class="comment">/**</span>
00393 <span class="comment"> * Create a socket from an existing descriptor and local and remote</span>
00394 <span class="comment"> * socket addresses.</span>
00395 <span class="comment"> * @param apr_sock The new socket that has been set up</span>
00396 <span class="comment"> * @param os_sock_info The os representation of the socket handle and</span>
00397 <span class="comment"> *        other characteristics of the socket</span>
00398 <span class="comment"> * @param cont The pool to use</span>
00399 <span class="comment"> * @remark If you only know the descriptor/handle or if it isn't really</span>
00400 <span class="comment"> *         a true socket, use apr_os_sock_put() instead.</span>
00401 <span class="comment"> */</span>
00402 APR_DECLARE(apr_status_t) apr_os_sock_make(apr_socket_t **apr_sock,
00403                                            apr_os_sock_info_t *os_sock_info,
00404                                            apr_pool_t *cont);
00405 <span class="comment"></span>
00406 <span class="comment">/**</span>
00407 <span class="comment"> * Convert the proc mutex from os specific type to apr type</span>
00408 <span class="comment"> * @param pmutex The apr proc mutex we are converting to.</span>
00409 <span class="comment"> * @param ospmutex The os specific proc mutex to convert.</span>
00410 <span class="comment"> * @param cont The pool to use if it is needed.</span>
00411 <span class="comment"> */</span>
00412 APR_DECLARE(apr_status_t) apr_os_proc_mutex_put(apr_proc_mutex_t **pmutex,
00413                                                 apr_os_proc_mutex_t *ospmutex,
00414                                                 apr_pool_t *cont); 
00415 <span class="comment"></span>
00416 <span class="comment">/**</span>
00417 <span class="comment"> * Put the imploded time in the APR format.</span>
00418 <span class="comment"> * @param aprtime the APR time format</span>
00419 <span class="comment"> * @param ostime the time to convert</span>
00420 <span class="comment"> * @param cont the pool to use if necessary</span>
00421 <span class="comment"> */</span>
00422 APR_DECLARE(apr_status_t) apr_os_imp_time_put(apr_time_t *aprtime,
00423                                               apr_os_imp_time_t **ostime,
00424                                               apr_pool_t *cont); 
00425 <span class="comment"></span>
00426 <span class="comment">/**</span>
00427 <span class="comment"> * Put the exploded time in the APR format.</span>
00428 <span class="comment"> * @param aprtime the APR time format</span>
00429 <span class="comment"> * @param ostime the time to convert</span>
00430 <span class="comment"> * @param cont the pool to use if necessary</span>
00431 <span class="comment"> */</span>
00432 APR_DECLARE(apr_status_t) apr_os_exp_time_put(<a class="code" href="structapr__time__exp__t.html">apr_time_exp_t</a> *aprtime,
00433                                               apr_os_exp_time_t **ostime,
00434                                               apr_pool_t *cont); 
00435 <span class="comment"></span>
00436 <span class="comment">/**</span>
00437 <span class="comment"> * convert the shared memory from os specific type to apr type.</span>
00438 <span class="comment"> * @param shm The apr shm representation of osshm</span>
00439 <span class="comment"> * @param osshm The os specific shm identity</span>
00440 <span class="comment"> * @param cont The pool to use if it is needed.</span>
00441 <span class="comment"> * @remark On fork()ed architectures, this is typically nothing more than</span>
00442 <span class="comment"> * the memory block mapped.  On non-fork architectures, this is typically</span>
00443 <span class="comment"> * some internal handle to pass the mapping from process to process.</span>
00444 <span class="comment"> */</span>
00445 APR_DECLARE(apr_status_t) apr_os_shm_put(apr_shm_t **shm,
00446                                          apr_os_shm_t *osshm,
00447                                          apr_pool_t *cont); 
00448 
00449 
00450 #if APR_HAS_DSO || defined(DOXYGEN)<span class="comment"></span>
00451 <span class="comment">/** </span>
00452 <span class="comment"> * @defgroup apr_os_dso DSO (Dynamic Loading) Portabiliity Routines</span>
00453 <span class="comment"> * @{</span>
00454 <span class="comment"> */</span><span class="comment"></span>
00455 <span class="comment">/**</span>
00456 <span class="comment"> * convert the dso handle from os specific to apr</span>
00457 <span class="comment"> * @param dso The apr handle we are converting to</span>
00458 <span class="comment"> * @param thedso the os specific handle to convert</span>
00459 <span class="comment"> * @param pool the pool to use if it is needed</span>
00460 <span class="comment"> */</span>
00461 APR_DECLARE(apr_status_t) apr_os_dso_handle_put(apr_dso_handle_t **dso,
00462                                                 apr_os_dso_handle_t thedso,
00463                                                 apr_pool_t *pool);
00464 <span class="comment"></span>
00465 <span class="comment">/**</span>
00466 <span class="comment"> * convert the apr dso handle into an os specific one</span>
00467 <span class="comment"> * @param aprdso The apr dso handle to convert</span>
00468 <span class="comment"> * @param dso The os specific dso to return</span>
00469 <span class="comment"> */</span>
00470 APR_DECLARE(apr_status_t) apr_os_dso_handle_get(apr_os_dso_handle_t *dso,
00471                                                 apr_dso_handle_t *aprdso);
00472 
00473 #if APR_HAS_OS_UUID<span class="comment"></span>
00474 <span class="comment">/**</span>
00475 <span class="comment"> * Private: apr-util's apr_uuid module when supported by the platform</span>
00476 <span class="comment"> */</span>
00477 APR_DECLARE(apr_status_t) apr_os_uuid_get(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *uuid_data);
00478 #endif
00479 <span class="comment"></span>
00480 <span class="comment">/** @} */</span>
00481 #endif <span class="comment">/* APR_HAS_DSO */</span>
00482 
00483 <span class="comment"></span>
00484 <span class="comment">/**</span>
00485 <span class="comment"> * Get the name of the system default characer set.</span>
00486 <span class="comment"> * @param pool the pool to allocate the name from, if needed</span>
00487 <span class="comment"> */</span>
00488 APR_DECLARE(const <span class="keywordtype">char</span>*) apr_os_default_encoding(apr_pool_t *pool);
00489 
00490 <span class="comment"></span>
00491 <span class="comment">/**</span>
00492 <span class="comment"> * Get the name of the current locale character set.</span>
00493 <span class="comment"> * @param pool the pool to allocate the name from, if needed</span>
00494 <span class="comment"> * @remark Defers to apr_os_default_encoding if the current locale's</span>
00495 <span class="comment"> * data can't be retreved on this system.</span>
00496 <span class="comment"> */</span>
00497 APR_DECLARE(const <span class="keywordtype">char</span>*) apr_os_locale_encoding(apr_pool_t *pool);
00498 <span class="comment"></span>
00499 <span class="comment">/** @} */</span>
00500 
00501 #ifdef __cplusplus
00502 }
00503 #endif
00504 
00505 #endif  <span class="comment">/* ! APR_PORTABLE_H */</span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sun Mar 20 19:52:26 2005 for Apache Portable Runtime by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.3.9.1 </small></address>
</body>
</html>