roken: do not globally define 'timezone' and 'tzname'

ec866e635e
("Windows 10 SDK build fixes") introduced CPP macros

  timezone -> _timezone
  tzname   -> _tzname

but these names are common and the macros rewrite too much.

The name mapping is only required when building strftime.c
with Visual Studio 2017 and later.  Move the definitions
into strftime.c.

Change-Id: Ic813bff842124595fd3d86761cee6dcea4ae44e4
This commit is contained in:
Jeffrey Altman
2022-01-14 13:08:51 -05:00
committed by Jeffrey Altman
parent 66d6998e3e
commit 6426e7550f
2 changed files with 5 additions and 4 deletions

View File

@@ -356,10 +356,6 @@ ROKEN_CPP_START
#define fsync _commit
#define timezone _timezone
#define tzname _tzname
#define _PIPE_BUFFER_SZ 8192
#define pipe(fds) _pipe((fds), _PIPE_BUFFER_SZ, O_BINARY);

View File

@@ -36,6 +36,11 @@
#include "strpftime-test.h"
#endif
#if defined(_WIN32)
# define timezone _timezone
# define tzname _tzname
#endif
static const char *abb_weekdays[] = {
"Sun",
"Mon",