diff options
| author | Vincent Richard <[email protected]> | 2013-02-05 13:21:21 +0000 |
|---|---|---|
| committer | Vincent Richard <[email protected]> | 2013-02-05 13:21:21 +0000 |
| commit | c2474f2b2b581ddfd207095b4ee433757e2abfbf (patch) | |
| tree | ff7350316f0da2ba53ab50bd356187763aa8eda3 /src/platforms/posix/posixHandler.cpp | |
| parent | Updated book. Added build target for HTML using HeVeA. (diff) | |
| download | vmime-c2474f2b2b581ddfd207095b4ee433757e2abfbf.tar.gz vmime-c2474f2b2b581ddfd207095b4ee433757e2abfbf.zip | |
Check for localtime_r and gmtime_r at build instead of testing _REENTRANT. Use localtime_s and gmtime_s on Windows, if available.
Diffstat (limited to 'src/platforms/posix/posixHandler.cpp')
| -rw-r--r-- | src/platforms/posix/posixHandler.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/platforms/posix/posixHandler.cpp b/src/platforms/posix/posixHandler.cpp index d90b316c..6536b5ef 100644 --- a/src/platforms/posix/posixHandler.cpp +++ b/src/platforms/posix/posixHandler.cpp @@ -132,7 +132,7 @@ const vmime::datetime posixHandler::getCurrentLocalTime() const const time_t t(::time(NULL)); // Get the local time -#ifdef _REENTRANT +#if VMIME_HAVE_LOCALTIME_R tm local; ::localtime_r(&t, &local); #else @@ -140,7 +140,7 @@ const vmime::datetime posixHandler::getCurrentLocalTime() const #endif // Get the UTC time -#ifdef _REENTRANT +#if VMIME_HAVE_GMTIME_R tm gmt; ::gmtime_r(&t, &gmt); #else |
