Skip to content

Commit afe9538

Browse files
committed
Use _Py_ prefix on new define.
1 parent f1ed4a2 commit afe9538

5 files changed

Lines changed: 11 additions & 11 deletions

File tree

‎Modules/timemodule.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1854,7 +1854,7 @@ time_get_clock_info_impl(PyObject *module, const char *name)
18541854
return NULL;
18551855
}
18561856

1857-
#ifndef HAVE_TIMEZONE_GLOBALS
1857+
#ifndef _Py_HAVE_TIMEZONE_GLOBALS
18581858
static void
18591859
get_zone(char *zone, int n, struct tm *p)
18601860
{
@@ -1875,7 +1875,7 @@ get_gmtoff(time_t t, struct tm *p)
18751875
return timegm(p) - t;
18761876
#endif
18771877
}
1878-
#endif // !HAVE_TIMEZONE_GLOBALS
1878+
#endif // !_Py_HAVE_TIMEZONE_GLOBALS
18791879

18801880
static int
18811881
init_timezone(PyObject *m)
@@ -1904,7 +1904,7 @@ init_timezone(PyObject *m)
19041904
19051905
And I'm lazy and hate C so nyer.
19061906
*/
1907-
#ifdef HAVE_TIMEZONE_GLOBALS
1907+
#ifdef _Py_HAVE_TIMEZONE_GLOBALS
19081908
PyObject *otz0, *otz1;
19091909
#if !defined(MS_WINDOWS) || defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM)
19101910
tzset();
@@ -1944,7 +1944,7 @@ init_timezone(PyObject *m)
19441944
if (PyModule_Add(m, "tzname", Py_BuildValue("(NN)", otz0, otz1)) < 0) {
19451945
return -1;
19461946
}
1947-
#else // !HAVE_TIMEZONE_GLOBALS
1947+
#else // !_Py_HAVE_TIMEZONE_GLOBALS
19481948
static const time_t YEAR = (365 * 24 + 6) * 3600;
19491949
time_t t;
19501950
struct tm p;
@@ -1989,7 +1989,7 @@ init_timezone(PyObject *m)
19891989
if (PyModule_Add(m, "tzname", tzname_obj) < 0) {
19901990
return -1;
19911991
}
1992-
#endif // !HAVE_TIMEZONE_GLOBALS
1992+
#endif // !_Py_HAVE_TIMEZONE_GLOBALS
19931993
#undef ADD_INT
19941994

19951995
if (PyErr_Occurred()) {

‎PC/pyconfig.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
430430
#define HAVE_DIRECT_H 1
431431

432432
/* Define if time.h declares the timezone, daylight and tzname variables. */
433-
#define HAVE_TIMEZONE_GLOBALS 1
433+
#define _Py_HAVE_TIMEZONE_GLOBALS 1
434434

435435
/* Define if you have dirent.h. */
436436
/* #define DIRENT 1 */

‎configure‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎configure.ac‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6557,7 +6557,7 @@ AC_CACHE_CHECK([for time.h that defines timezone, daylight and tzname variables]
65576557
[ac_cv_header_time_tz_globals=no])
65586558
])
65596559
if test $ac_cv_header_time_tz_globals = yes; then
6560-
AC_DEFINE([HAVE_TIMEZONE_GLOBALS], [1],
6560+
AC_DEFINE([_Py_HAVE_TIMEZONE_GLOBALS], [1],
65616561
[Define if time.h declares the timezone, daylight and tzname variables.])
65626562
fi
65636563

‎pyconfig.h.in‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1622,9 +1622,6 @@
16221622
/* Define to 1 if you have the 'times' function. */
16231623
#undef HAVE_TIMES
16241624

1625-
/* Define if time.h declares the timezone, daylight and tzname variables. */
1626-
#undef HAVE_TIMEZONE_GLOBALS
1627-
16281625
/* Define to 1 if you have the 'tmpfile' function. */
16291626
#undef HAVE_TMPFILE
16301627

@@ -2177,6 +2174,9 @@
21772174
/* Define if you have the 'tanpi' function. */
21782175
#undef _Py_HAVE_TANPI
21792176

2177+
/* Define if time.h declares the timezone, daylight and tzname variables. */
2178+
#undef _Py_HAVE_TIMEZONE_GLOBALS
2179+
21802180
/* Thread stack size set by the linker (in bytes). */
21812181
#undef _Py_LINKER_THREAD_STACK_SIZE
21822182

0 commit comments

Comments
 (0)