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 2011年01月12日 18:32 by alanh, last changed 2022年04月11日 14:57 by admin.
| Messages (12) | |||
|---|---|---|---|
| msg126120 - (view) | Author: Alan Hourihane (alanh) | Date: 2011年01月12日 18:32 | |
Python 2.7.1 redefines FSTAT, but the problem is my libc already defines FSTAT in sys/ioctl.h. I've worked around this by prefixing the FSTAT define with PYTHON. It should probably be done with STAT too. --- Modules/posixmodule.c.old 2011年01月12日 01:46:45.000000000 +0000 +++ Modules/posixmodule.c 2011年01月12日 01:47:05.000000000 +0000 @@ -344,11 +344,11 @@ #undef STAT #if defined(MS_WIN64) || defined(MS_WINDOWS) # define STAT win32_stat -# define FSTAT win32_fstat +# define PYTHON_FSTAT win32_fstat # define STRUCT_STAT struct win32_stat #else # define STAT stat -# define FSTAT fstat +# define PYTHON_FSTAT fstat # define STRUCT_STAT struct stat #endif @@ -6641,7 +6641,7 @@ if (!_PyVerify_fd(fd)) return posix_error(); Py_BEGIN_ALLOW_THREADS - res = FSTAT(fd, &st); + res = PYTHON_FSTAT(fd, &st); Py_END_ALLOW_THREADS if (res != 0) { #ifdef MS_WINDOWS |
|||
| msg126489 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2011年01月18日 19:59 | |
How about adding "#undef FSTAT" instead? Would it work for you? |
|||
| msg126490 - (view) | Author: Alan Hourihane (alanh) | Date: 2011年01月18日 20:10 | |
On Tue, 2011年01月18日 at 19:59 +0000, Antoine Pitrou wrote: > Antoine Pitrou <pitrou@free.fr> added the comment: > > How about adding "#undef FSTAT" instead? Would it work for you? Sure. Alan. |
|||
| msg126527 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2011年01月19日 15:27 | |
Ok, fixed in r88111 (3.2), r88112 (3.1) and r88113 (2.7). |
|||
| msg139601 - (view) | Author: Alan Hourihane (alanh) | Date: 2011年07月01日 20:44 | |
Hi Antoine, Unfortunately the #undef is too early and later #includes redefine it. We should move the #undef closer to the code that actually uses them. |
|||
| msg139604 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2011年07月01日 20:56 | |
New changeset 45b27448f95c by Antoine Pitrou in branch '2.7': Really fix issue #10898: posixmodule.c redefines FSTAT http://hg.python.org/cpython/rev/45b27448f95c |
|||
| msg139605 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2011年07月01日 20:57 | |
Ah, sorry. Can you check with the changeset I've just pushed (it's on branch 2.7)? If ok, I'll port it to 3.2/3.x and close again. |
|||
| msg139611 - (view) | Author: Alan Hourihane (alanh) | Date: 2011年07月01日 21:52 | |
No, that patch still doesn't work. |
|||
| msg139612 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2011年07月01日 22:02 | |
Hum, can you propose something? |
|||
| msg139615 - (view) | Author: Alan Hourihane (alanh) | Date: 2011年07月01日 22:25 | |
I've had to split the three #undef's up to just before they're used. |
|||
| msg139638 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2011年07月02日 11:52 | |
> I've had to split the three #undef's up to just before they're used. I would really prefer to move up the offending #include rather than sprinkle those #undef's all over the place. |
|||
| msg139714 - (view) | Author: Alan Hourihane (alanh) | Date: 2011年07月03日 23:10 | |
Well, I'd probably prefer something akin to my first patch then. There's no need to #undef things at all if we just prefix the usage with PYTHON_ |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:11 | admin | set | github: 55107 |
| 2020年11月15日 23:37:24 | iritkatriel | set | versions: + Python 3.8, Python 3.9, Python 3.10, - Python 2.7, Python 3.2, Python 3.3, Python 3.4 |
| 2013年07月07日 16:47:13 | christian.heimes | set | nosy:
+ christian.heimes versions: + Python 3.3, Python 3.4, - Python 3.1 |
| 2011年09月12日 08:25:05 | alanh | set | resolution: accepted -> remind |
| 2011年07月03日 23:10:25 | alanh | set | messages: + msg139714 |
| 2011年07月02日 11:52:28 | pitrou | set | messages: + msg139638 |
| 2011年07月01日 22:25:33 | alanh | set | messages: + msg139615 |
| 2011年07月01日 22:02:10 | pitrou | set | messages: + msg139612 |
| 2011年07月01日 21:52:04 | alanh | set | resolution: fixed -> accepted messages: + msg139611 |
| 2011年07月01日 20:57:41 | pitrou | set | resolution: accepted -> fixed messages: + msg139605 |
| 2011年07月01日 20:56:48 | python-dev | set | nosy:
+ python-dev messages: + msg139604 |
| 2011年07月01日 20:44:08 | alanh | set | status: closed -> open resolution: fixed -> accepted messages: + msg139601 |
| 2011年01月19日 15:27:53 | pitrou | set | status: open -> closed messages: + msg126527 resolution: fixed stage: needs patch -> resolved |
| 2011年01月18日 20:10:16 | alanh | set | messages: + msg126490 |
| 2011年01月18日 19:59:00 | pitrou | set | versions:
+ Python 3.1, Python 2.7, Python 3.2 nosy: + pitrou messages: + msg126489 components: + Extension Modules stage: needs patch |
| 2011年01月12日 18:32:13 | alanh | create | |