|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #65599 Fix compiling for VC11 x64
Submitted: 2013-08-31 16:08 UTC Modified: 2013-09-05 23:44 UTC
From: phpdev at ehrhardt dot nl Assigned: aharvey (profile)
Status: Closed Package: radius (PECL)
PHP Version: 5.5.3 OS: Windows (x64)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: phpdev at ehrhardt dot nl
New email:
PHP Version: OS:


 [2013-08-31 16:08 UTC] phpdev at ehrhardt dot nl
php_radius.dll compiles fine for PHP 5.5 VC11 x86. However, under VC11 x64 it fails with

error C2371: 'SSIZE_T': redefinition; different basic types

You can fix this by surrounding 'typedef long ssize_t;' with a ifndef, like this

#ifndef ssize_t
typedef long ssize_t;

I did not test if it works, but you can find compiled x64 versions here (as soon as I have updated all my builds):

Jan Ehrhardt

Test script:

Expected result:
A VC11 x64 php_radius.dll

Actual result:
Compiling fails


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2013-09-05 21:05 UTC]
-Status: Open +Status: Assigned -Assigned To: +Assigned To: aharvey
 [2013-09-05 21:05 UTC]
I'm leery of this because it's going to fail if ssize_t is a mere typedef and not 
#define'd, and I don't think there's any spec that says it has to be visible to 
the preprocessor.

Let me see if I can figure out enough of config.w32 to come up with a more robust 
 [2013-09-05 23:31 UTC] phpdev at ehrhardt dot nl
I also looked a little bit further. As far as I can see ssize_t is always defined when compiling PHP for windows. See line 137 of

As soon as you configure PHP, this line gets copied to main/config.w32.h and will be included. shows there have been more people struggling with this.

You could probably leave the line out or use
#define ssize_t SSIZE_T

I compiled php_radius.dll under X64 and X86 with this line without any problems.
 [2013-09-05 23:44 UTC]
-Status: Assigned +Status: Closed
 [2013-09-05 23:44 UTC]
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at

 For Windows:
Thank you for the report, and for helping us make PHP better.

Yeah, I was looking at this concurrently and came to the same conclusion — that 
#define has been in PHP since 4.3, so I think we're good to just drop the typedef 
completely at this point.

Thanks for looking into this further!
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Wed Mar 29 20:03:46 2023 UTC