File: PortabilityImpl_8hh-source.html

package info (click to toggle)
log4cpp-doc 0.3.5-rc3-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 5,664 kB
  • ctags: 925
  • sloc: makefile: 34
file content (68 lines) | stat: -rw-r--r-- 5,820 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<!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>log4cpp: PortabilityImpl.hh Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.2 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
<div class="nav">
<a class="el" href="dir_000000.html">src</a></div>
<h1>PortabilityImpl.hh</h1><a href="PortabilityImpl_8hh.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span>
00002 <span class="comment"> * PortabilityImpl.hh</span>
00003 <span class="comment"> *</span>
00004 <span class="comment"> * Copyright 2002, Log4cpp Project. All rights reserved.</span>
00005 <span class="comment"> *</span>
00006 <span class="comment"> * See the COPYING file for the terms of usage and distribution.</span>
00007 <span class="comment"> */</span>
00008 
00009 <span class="preprocessor">#ifndef _LOG4CPP_PORTABILITYIMPL_HH</span>
00010 <span class="preprocessor"></span><span class="preprocessor">#define _LOG4CPP_PORTABILITYIMPL_HH</span>
00011 <span class="preprocessor"></span>
00012 <span class="preprocessor">#include &lt;<a class="code" href="Portability_8hh.html">log4cpp/Portability.hh</a>&gt;</span>
00013 
00014 <span class="preprocessor">#ifdef LOG4CPP_CSTDLIB_NOT_IN_STD</span>
00015 <span class="preprocessor"></span><span class="preprocessor">#include &lt;cstdlib&gt;</span>
00016 <span class="keyword">namespace </span>std {
00017     <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">char</span> *getenv(<span class="keyword">const</span> <span class="keywordtype">char</span> *name) { return ::getenv(name); };
00018     <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">int</span> atoi(<span class="keyword">const</span> <span class="keywordtype">char</span> *nptr) { return ::atoi(nptr); };
00019     <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span>
00020         strtoul(<span class="keyword">const</span> <span class="keywordtype">char</span> *nptr, <span class="keywordtype">char</span> **endptr, <span class="keywordtype">int</span> base) { 
00021         return ::strtol(nptr, endptr, base); 
00022     };
00023     <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> abort(<span class="keywordtype">void</span>) { ::abort(); };
00024 
00025 }
00026 <span class="preprocessor">#endif</span>
00027 <span class="preprocessor"></span>    
00028 <span class="preprocessor">#ifdef LOG4CPP_CSTRING_NOT_IN_STD</span>
00029 <span class="preprocessor"></span><span class="preprocessor">#include &lt;cstring&gt;</span>
00030 <span class="keyword">namespace </span>std {
00031     <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> *memmove(<span class="keywordtype">void</span> *dest, <span class="keyword">const</span> <span class="keywordtype">void</span> *src, size_t n) {
00032         return ::memmove(dest, src, n);
00033     };
00034 }
00035 <span class="preprocessor">#endif</span>
00036 <span class="preprocessor"></span>
00037 <span class="preprocessor">#ifdef LOG4CPP_CTIME_NOT_IN_STD</span>
00038 <span class="preprocessor"></span><span class="preprocessor">#include &lt;ctime&gt;</span>
00039 <span class="keyword">namespace </span>std {
00040     <span class="keyword">static</span> <span class="keyword">inline</span> size_t strftime(<span class="keywordtype">char</span> *strDest, size_t maxsize, <span class="keyword">const</span> <span class="keywordtype">char</span> *format, <span class="keyword">const</span> <span class="keyword">struct</span> tm *timeptr ) {
00041         return ::strftime(strDest,maxsize,format,timeptr);
00042     }
00043     <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keyword">struct </span>tm *localtime( <span class="keyword">const</span> time_t *timer ) { return ::localtime(timer); }
00044 }
00045 <span class="preprocessor">#endif</span>
00046 <span class="preprocessor"></span>
00047 <span class="preprocessor">#ifdef LOG4CPP_CMATH_NOT_IN_STD</span>
00048 <span class="preprocessor"></span><span class="preprocessor">#include &lt;cmath&gt;</span>
00049 <span class="keyword">namespace </span>std {
00050     <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">int</span> abs(<span class="keywordtype">int</span> i) { return ::abs(i); }
00051 }
00052 <span class="preprocessor">#endif</span>
00053 <span class="preprocessor"></span>
00054 <span class="preprocessor">#endif // _LOG4CPP_PORTABILITYIMPL_HH</span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri Jul 29 14:07:33 2005 for log4cpp by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.2 </small></address>
</body>
</html>