Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
src
Localtime.cpp
Go to the documentation of this file.
1
/*
2
* Copyright 2002, Log4cpp Project. All rights reserved.
3
*
4
* See the COPYING file for the terms of usage and distribution.
5
*/
6
7
#include <
log4cpp/Portability.hh
>
8
#include "
Localtime.hh
"
9
#include <time.h>
10
#include <memory.h>
11
12
namespace
log4cpp
13
{
14
15
#if defined(_MSC_VER) && defined(LOG4CPP_HAVE_LOCALTIME_R)
16
void
localtime
(const ::time_t* time, ::tm* t)
17
{
18
localtime_s(t, time);
19
}
20
#endif
21
22
#if !defined(_MSC_VER) && defined(LOG4CPP_HAVE_LOCALTIME_R)
23
void
localtime
(const ::time_t* time, ::tm* t)
24
{
25
localtime_r(time, t);
26
}
27
#endif
28
29
#if !defined(LOG4CPP_HAVE_LOCALTIME_R)
30
void
localtime
(const ::time_t* time, ::tm* t)
31
{
32
::tm* tmp =
::localtime
(time);
33
memcpy(t, tmp,
sizeof
(::tm));
34
}
35
#endif
36
37
}
log4cpp::localtime
void localtime(const ::time_t *time,::tm *t)
Definition:
Localtime.cpp:30
Portability.hh
Localtime.hh
log4cpp
Definition:
AbortAppender.hh:16
log4cpp
Author(s): Stephen Roderick, Bastiaan Bakker, Cedric Le Goater, Steve Ostlind, Marcel Harkema, Walter Stroebel, Glenn Scott and Tony Cheung
autogenerated on Sun Jun 23 2019 19:10:00