This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2007年12月16日 20:22 by hniksic, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| patch | hniksic, 2007年12月16日 20:22 | |||
| Messages (6) | |||
|---|---|---|---|
| msg58675 - (view) | Author: Hrvoje Nikšić (hniksic) * | Date: 2007年12月16日 20:22 | |
The printf("%zd", ...) configure test fails on Linux, although it
supports the %zd format. config.log reveals that the test tests for %zd
with Py_ssize_t, which is (within the test) typedeffed to ssize_t. But
the appropriate system header is not included by the test, and ssize_t
is not defined. This results in Py_ssize_t not being correctly defined,
and the test failing.
According to http://tinyurl.com/3dhbbm/, ssize_t is defined in
<sys/types.h>. Adding #include <sys/types.h> manually to the test fixes
the test for me. A patch like the one attached should fix the problem.
|
|||
| msg58676 - (view) | Author: Christian Heimes (christian.heimes) * (Python committer) | Date: 2007年12月16日 21:41 | |
I fixed the bug in r59533 trunk with a modified patch: #ifdef HAVE_SYS_TYPES_H #include <sys/types.h> #endif Should it be backported to 2.5? It will be merged into 3.0 automatically. |
|||
| msg58677 - (view) | Author: Martin v. Löwis (loewis) * (Python committer) | Date: 2007年12月16日 22:51 | |
I think it should be backported. |
|||
| msg58678 - (view) | Author: Hrvoje Nikšić (hniksic) * | Date: 2007年12月16日 23:04 | |
Thanks for the quick review. I considered guarding the include with #ifdef as well, but I concluded it's not necessary for the following reasons: 1. a large number of existing tests already simply include <sys/types.h> (the makedev test, sizeof(off_t) test, IPv6-related tests, and various socket tests); 2. if sys/types.h doesn't exist, the test will fail, and Python will conclude that %zd is not available. This conclusion is almost certainly correct, as I doubt that a system without sys/types.h has a working %zd format. |
|||
| msg58762 - (view) | Author: Guido van Rossum (gvanrossum) * (Python committer) | Date: 2007年12月18日 20:05 | |
Please backport. |
|||
| msg58772 - (view) | Author: Christian Heimes (christian.heimes) * (Python committer) | Date: 2007年12月18日 21:15 | |
Backported to 2.5 in r59552 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:29 | admin | set | github: 45979 |
| 2007年12月18日 21:15:29 | christian.heimes | set | status: pending -> closed messages: + msg58772 |
| 2007年12月18日 20:05:10 | gvanrossum | set | assignee: christian.heimes messages: + msg58762 nosy: + gvanrossum |
| 2007年12月16日 23:04:06 | hniksic | set | messages: + msg58678 |
| 2007年12月16日 22:51:16 | loewis | set | nosy:
+ loewis messages: + msg58677 |
| 2007年12月16日 21:41:10 | christian.heimes | set | status: open -> pending priority: normal resolution: fixed messages: + msg58676 nosy: + christian.heimes |
| 2007年12月16日 20:22:53 | hniksic | create | |