php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52908 Missing data types in function prototype
Submitted: 2010-09-22 22:10 UTC Modified: 2010-09-22 23:29 UTC
From: jon at humaninternals dot com Assigned: pajoye (profile)
Status: Closed Package: Compile Failure
PHP Version: 5.3SVN-2010-09-22 (snap) OS: Windows
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jon at humaninternals dot com
New email:
PHP Version: OS:

 

 [2010-09-22 22:10 UTC] jon at humaninternals dot com
Description:
------------
While trying to compile (using MSVC 2010) an extension against the latest PHP 
snap (php5.3-201009221830) I encountered multiple errors at the 
tsrm_virtual_cwd.h file (as stated below)

The line reads:
CWD_API int php_sys_readlink(link, target, target_len);

It seems this was comitted in http://svn.php.net/viewvc?
view=revision&revision=303256

I might be wrong here but it is my understanding that prototypes must include 
the data types of its arguments as the function itself reads the line should be:

CWD_API int php_sys_readlink(const char *link, char *target, size_t target_len);

This seems to solve the problem.

Expected result:
----------------
Successful Compilation

Actual result:
--------------
\php5.3-201009220630\TSRM\tsrm_virtual_cwd.h(137): error C2065: 'link' : 
undeclared identifier
\php5.3-201009220630\TSRM\tsrm_virtual_cwd.h(137): error C2065: 'target' : 
undeclared identifier
\php5.3-201009220630\TSRM\tsrm_virtual_cwd.h(137): error C2065: 'target_len' : 
undeclared identifier
\php5.3-201009220630\TSRM\tsrm_virtual_cwd.h(137): error C2491: 'php_sys_readlink' 
: definition of dllimport data not allowed
\php5.3-201009220630\TSRM\tsrm_virtual_cwd.h(137): error C2078: too many 
initializers

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-09-22 23:28 UTC] pajoye@php.net
Automatic comment from SVN on behalf of pajoye
Revision: http://svn.php.net/viewvc/?view=revision&revision=303693
Log: - Fix #52908, fix declaration
 [2010-09-22 23:29 UTC] pajoye@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: pajoye
 [2010-09-22 23:29 UTC] pajoye@php.net
Yes, that's correct. I fixed it but forgot to apply to the svn repo. Done now.

Thanks for your report!
 [2010-10-04 12:35 UTC] pajoye@php.net
Automatic comment from SVN on behalf of pajoye
Revision: http://svn.php.net/viewvc/?view=revision&revision=303976
Log: - Fix #52908, fix declaration
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 15 21:01:32 2025 UTC