00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef _LOG4TANGO_PORTABILITYIMPL_H
00029 #define _LOG4TANGO_PORTABILITYIMPL_H
00030
00031 #include <log4tango/Portability.hh>
00032
00033 #ifdef LOG4TANGO_CSTDLIB_NOT_IN_STD
00034 #include <cstdlib>
00035 namespace std {
00036 static inline char *getenv(const char *name) { return ::getenv(name); };
00037 static inline int atoi(const char *nptr) { return ::atoi(nptr); };
00038 static inline unsigned long int
00039 strtoul(const char *nptr, char **endptr, int base) {
00040 return ::strtol(nptr, endptr, base);
00041 };
00042 }
00043 #endif
00044
00045 #ifdef LOG4TANGO_CSTRING_NOT_IN_STD
00046 #include <cstring>
00047 namespace std {
00048 static inline void *memmove(void *dest, const void *src, size_t n) {
00049 return ::memmove(dest, src, n);
00050 };
00051 }
00052 #endif
00053
00054 #ifdef LOG4TANGO_CTIME_NOT_IN_STD
00055 #include <ctime>
00056 namespace std {
00057 static inline size_t strftime(char *strDest, size_t maxsize, const char *format, const struct tm *timeptr ) {
00058 return ::strftime(strDest,maxsize,format,timeptr);
00059 }
00060 static inline struct tm *localtime( const time_t *timer ) { return ::localtime(timer); }
00061 }
00062 #endif
00063
00064 #ifdef LOG4TANGO_CMATH_NOT_IN_STD
00065 #include <cmath>
00066 namespace std {
00067 static inline int abs(int i) { return ::abs(i); }
00068 }
00069 #endif
00070
00071 #endif // _LOG4TANGO_PORTABILITYIMPL_H