00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef _LOG4CPP_PORTABILITYIMPL_HH
00010 #define _LOG4CPP_PORTABILITYIMPL_HH
00011
00012 #include <log4cpp/Portability.hh>
00013
00014 #ifdef LOG4CPP_CSTDLIB_NOT_IN_STD
00015 #include <cstdlib>
00016 namespace std {
00017 static inline char *getenv(const char *name) { return ::getenv(name); };
00018 static inline int atoi(const char *nptr) { return ::atoi(nptr); };
00019 static inline unsigned long int
00020 strtoul(const char *nptr, char **endptr, int base) {
00021 return ::strtol(nptr, endptr, base);
00022 };
00023 static inline void abort(void) { ::abort(); };
00024
00025 }
00026 #endif
00027
00028 #ifdef LOG4CPP_CSTRING_NOT_IN_STD
00029 #include <cstring>
00030 namespace std {
00031 static inline void *memmove(void *dest, const void *src, size_t n) {
00032 return ::memmove(dest, src, n);
00033 };
00034 }
00035 #endif
00036
00037 #ifdef LOG4CPP_CTIME_NOT_IN_STD
00038 #include <ctime>
00039 namespace std {
00040 static inline size_t strftime(char *strDest, size_t maxsize, const char *format, const struct tm *timeptr ) {
00041 return ::strftime(strDest,maxsize,format,timeptr);
00042 }
00043 static inline struct tm *localtime( const time_t *timer ) { return ::localtime(timer); }
00044 }
00045 #endif
00046
00047 #ifdef LOG4CPP_CMATH_NOT_IN_STD
00048 #include <cmath>
00049 namespace std {
00050 static inline int abs(int i) { return ::abs(i); }
00051 }
00052 #endif
00053
00054 #endif // _LOG4CPP_PORTABILITYIMPL_HH