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
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 00:01:28 2024 UTC