PortabilityImpl.hh

Go to the documentation of this file.
00001 /*
00002  * PortabilityImpl.hh
00003  *
00004  * Copyright 2002, Log4cpp Project. All rights reserved.
00005  *
00006  * See the COPYING file for the terms of usage and distribution.
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 }
00024 #endif
00025     
00026 #ifdef LOG4CPP_CSTRING_NOT_IN_STD
00027 #include <cstring>
00028 namespace std {
00029     static inline void *memmove(void *dest, const void *src, size_t n) {
00030         return ::memmove(dest, src, n);
00031     };
00032 }
00033 #endif
00034 
00035 #ifdef LOG4CPP_CTIME_NOT_IN_STD
00036 #include <ctime>
00037 namespace std {
00038     static inline size_t strftime(char *strDest, size_t maxsize, const char *format, const struct tm *timeptr ) {
00039         return ::strftime(strDest,maxsize,format,timeptr);
00040     }
00041     static inline struct tm *localtime( const time_t *timer ) { return ::localtime(timer); }
00042 }
00043 #endif
00044 
00045 #ifdef LOG4CPP_CMATH_NOT_IN_STD
00046 #include <cmath>
00047 namespace std {
00048     static inline int abs(int i) { return ::abs(i); }
00049 }
00050 #endif
00051 
00052 #endif // _LOG4CPP_PORTABILITYIMPL_HH

Generated on Tue Jan 31 06:35:50 2006 for log4cpp by  doxygen 1.4.6