[issue3257] "#define socklen_t int" in pyconfig.h
fgoujeon
report at bugs.python.org
Wed Jul 2 16:42:44 CEST 2008
New submission from fgoujeon <flog2 at wanadoo.fr>:
Hello all,
I'm using MinGW 4.2.1 and was unable to compile my code when including
pyconfig.h.
The culpables are these lines (from line 428):
/* Define to `int' if <sys/types.h> doesn't define. */
#if 1 //_MSC_VER + 0 >= 1300
/* VC.NET typedefs socklen_t in ws2tcpip.h. */
#else
#define socklen_t int
#endif
MinGW (at least the version I use) typedefs socklen_t too, in ws2tcpip.h
(at line 272):
typedef int socklen_t;
When the #define takes effect, code becomes:
typedef socklen_t socklen_t;
...which leads to a compile error (really hard to understand):
C:/MinGW/include/ws2tcpip.h:272: error: multiple types in one declaration
I hope these details will be useful for you. I'm available for another
questions.
Thanks!
----------
components: Library (Lib)
messages: 69097
nosy: fgoujeon
severity: normal
status: open
title: "#define socklen_t int" in pyconfig.h
type: compile error
versions: Python 2.5
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3257>
_______________________________________
More information about the Python-bugs-list
mailing list