php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57418 Compile Problem on Windows
Submitted: 2006-12-06 12:39 UTC Modified: 2006-12-11 08:55 UTC
From: dokks at discdude dot net Assigned:
Status: Closed Package: APC (PECL)
PHP Version: Irrelevant OS: Windows
Private report: No CVE-ID: None
 [2006-12-06 12:39 UTC] dokks at discdude dot net
Description:
------------
I had problems with php_apc.dll on pecl4win so I thought I'd try compiling my own.  I had some trouble compiling the code although I managed to do it with a few tweaks.

I later stumbled across the daily compile log and noticed the same errors there so it's not just me ;)

The compiler reports the following error on line 423 of apc_sma.c:

error C2275: 'size_t' : illegal use of this type as an expression

The code on line 423 is: size_t d_size = (size_t)((char *)p - (char *)(sma_shmaddrs[i]));

I think the problem actually has to do with the macro on the line above: LOCK(((header_t*)sma_shmaddrs[i])->sma_lock);

Anyway, I can get the code to compile if I declare the variable before the LOCK statement and assign the value later.  So, this works:

size_t d_size;
LOCK(((header_t*)sma_shmaddrs[i])->sma_lock);
d_size = (size_t)((char *)p - (char *)(sma_shmaddrs[i]));

I have no idea why this works.  There is a similar error on line 461.

Finally, although this is really a different problem I thought I'd bring it up since it is so minor - the project file (apc.dsp) is missing the apc_rfc1867.c file.  It is in the config.w32 file though.



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-12-11 08:55 UTC] dokks at discdude dot net
Problems with compiling apc_sma.c were fixed by fmk on Mon Dec 11 06:59:31 2006 in Revision 1.56.

apc_rfc1867.c was added to MSVC++ project file by gopalv on Thu Dec 7 21:55:40 2006 UTC in Revision 3.3.

Thanks!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 10:01:30 2024 UTC