[New-bugs-announce] [issue11717] conflicting definition of ssize_t in pyconfig.h

Wolfgang Rohdewald report at bugs.python.org
Wed Mar 30 02:11:04 CEST 2011

New submission from Wolfgang Rohdewald <wolfgang at rohdewald.de>:

compiling pykde on windows with msvc2010 on a 32bit Windows 7:

R:\include\msvc\sys/types.h(52) : error C2371: 'ssize_t' : redefinition; different basic types
        c:\python27\include\pyconfig.h(201) : see declaration of 'ssize_t'

I can fix this by defining ssize_t as long in pyconfig.h or 
as int in kdewin/include/msvc/sys/types.h

the original files from windows define SSIZE_T as long so to
me this seems like a bug in pyconfig.h, it should say
typedef _W64 long ssize_t

Python27\include\pyconfig.h says (same in Python32):

#ifdef MS_WIN64
typedef __int64 ssize_t;
typedef _W64 int ssize_t;

while kdewin/include/msvc/sys/types.h says:

typedef SSIZE_T ssize_t;

SSIZE_T is defined in Microsoft SDKs/Windows/v7.0A/Include/BaseTsd.h:


and LONG_PTR from same directory, intsafe.h:
#if (__midl > 501)
typedef [public]          __int3264 LONG_PTR;
#ifdef _WIN64
typedef __int64             LONG_PTR;
typedef _W64 long           LONG_PTR;
#endif // WIN64
#endif // (__midl > 501)

for __midl see

components: Windows
messages: 132558
nosy: wrohdewald
priority: normal
severity: normal
status: open
title: conflicting definition of ssize_t in pyconfig.h
type: compile error
versions: Python 2.7

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list