New submission from Alexander Belopolsky:

After running ./configure on Linux or MacOS X, check the generated pyconfig.h 
header:

$ grep TZNAME pyconfig.h
/* #undef HAVE_DECL_TZNAME */
/* #undef HAVE_TZNAME */

However, tzname exists and is declared in time.h on Linux and MacOS X as can be 
seen by compiling and running the following simple program:

$ cat tzname.c
#include <time.h>
#include <stdio.h>

int main() {
    tzset();
    printf("%s/%s\n", tzname[0], tzname[1]);
}
$ clang tzname.c -o tzname
$ ./tzname
EST/EDT

Note that tzname is mandated by the recent editions of POSIX 
<http://pubs.opengroup.org/onlinepubs/009695399/functions/tzset.html>, so I am 
not sure whether we need to check for it in configure.

----------
messages: 276098
nosy: belopolsky
priority: normal
severity: normal
status: open
title: Python configure fails to detect tzname on platforms that have it.
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28108>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to