dtcm: change to use _XLocaltime instead of localtime consitently
This commit is contained in:
@@ -86,6 +86,12 @@
|
|||||||
#include "delete.h"
|
#include "delete.h"
|
||||||
#include "update.h"
|
#include "update.h"
|
||||||
|
|
||||||
|
#define XOS_USE_NO_LOCKING
|
||||||
|
#define X_INCLUDE_TIME_H
|
||||||
|
#if defined(__linux__)
|
||||||
|
#undef SVR4
|
||||||
|
#endif
|
||||||
|
#include <X11/Xos_r.h>
|
||||||
|
|
||||||
extern int debug;
|
extern int debug;
|
||||||
extern char *pgname;
|
extern char *pgname;
|
||||||
@@ -1413,6 +1419,7 @@ _DtCm_rtable_gmtoff_4_svc(void *args, struct svc_req *svcrq)
|
|||||||
#if !defined(CSRG_BASED)
|
#if !defined(CSRG_BASED)
|
||||||
extern long timezone;
|
extern long timezone;
|
||||||
#else
|
#else
|
||||||
|
_Xltimeparams localtime_buf;
|
||||||
time_t ctime;
|
time_t ctime;
|
||||||
struct tm *t;
|
struct tm *t;
|
||||||
#endif
|
#endif
|
||||||
@@ -1422,7 +1429,7 @@ _DtCm_rtable_gmtoff_4_svc(void *args, struct svc_req *svcrq)
|
|||||||
|
|
||||||
#if defined(CSRG_BASED)
|
#if defined(CSRG_BASED)
|
||||||
ctime = time(NULL);
|
ctime = time(NULL);
|
||||||
t = localtime(&ctime);
|
t = _XLocaltime(&ctime, localtime_buf);
|
||||||
gmtoff = - t->tm_gmtoff;
|
gmtoff = - t->tm_gmtoff;
|
||||||
#else
|
#else
|
||||||
gmtoff = timezone;
|
gmtoff = timezone;
|
||||||
|
|||||||
Reference in New Issue
Block a user