summaryrefslogtreecommitdiffstats
path: root/PC/pyconfig.h
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2018-09-21 02:52:18 (GMT)
committerGitHub <noreply@github.com>2018-09-21 02:52:18 (GMT)
commitc510c6b8b60f211793e0b84c317ea6974e8a6153 (patch)
tree5a29313bc3b07fed7fb5c26d64734b9ae4052867 /PC/pyconfig.h
parenta4ae828ee416a66d8c7bf5ee71d653c2cc6a26dd (diff)
downloadcpython-c510c6b8b60f211793e0b84c317ea6974e8a6153.zip
cpython-c510c6b8b60f211793e0b84c317ea6974e8a6153.tar.gz
cpython-c510c6b8b60f211793e0b84c317ea6974e8a6153.tar.bz2
Simplify PyInit_timezone. (GH-9467)
Reduce the knotty preprocessor conditional logic, dedent unnecessarily nested code, and handle errors properly. The first edition of this change (afde1c1a05cc8a1e8adf6403c451f6708509a605) failed (bpo-34715) because FreeBSD doesn't define the timezone globals. That's why we're now checking for HAVE_DECL_TZNAME.
Diffstat (limited to 'PC/pyconfig.h')
-rw-r--r--PC/pyconfig.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/PC/pyconfig.h b/PC/pyconfig.h
index 388a3c6..b5e3452 100644
--- a/PC/pyconfig.h
+++ b/PC/pyconfig.h
@@ -396,6 +396,10 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
/* Define to 1 if you have the <direct.h> header file. */
#define HAVE_DIRECT_H 1
+/* Define to 1 if you have the declaration of `tzname', and to 0 if you don't.
+ */
+#define HAVE_DECL_TZNAME 1
+
/* Define if you have dirent.h. */
/* #define DIRENT 1 */