Bug #52908 [NEW]: Missing data types in function prototype
| From: | jon at humaninternals dot com | Date: | Wed, 22 Sep 2010 20:10:05 +0000 |
| Subject: | Bug #52908 [NEW]: Missing data types in function prototype | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-154572@lists.php.net to get a copy of this message | ||
From:
Operating system: Windows
PHP version: 5.3SVN-2010-09-22 (snap)
Package: Compile Failure
Bug Type: Bug
Bug description:Missing data types in function prototype
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
--
Edit bug report at http://bugs.php.net/bug.php?id=52908&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52908&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52908&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52908&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=52908&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52908&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=52908&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=52908&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=52908&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=52908&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=52908&r=support
Expected behavior: http://bugs.php.net/fix.php?id=52908&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=52908&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=52908&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=52908&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52908&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=52908&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=52908&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=52908&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=52908&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=52908&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=52908&r=mysqlcfg