php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #51582 Don't assume UINT64_C it's ever available
Submitted: 2010-04-17 17:06 UTC Modified: 2010-04-26 12:35 UTC
From: reidrac at usebox dot net Assigned: pajoye (profile)
Status: Closed Package: Compile Failure
PHP Version: 5.3.2 OS: OpenBSD 3.8
Private report: No CVE-ID: None
 [2010-04-17 17:06 UTC] reidrac at usebox dot net
Description:
------------
The new crypt_sha512.c fails to build because UINT64_C macro doesn't exist.

Test script:
---------------
Try to compile it in a OpenBSD 3.8 system. It's an oudated system, but I guess this problem can affect other "POSIX" systems.

Expected result:
----------------
Configure should check for UINT64_C macro and provide it if not found.

Actual result:
--------------
..while compiling...
.../php/php-5.3.2/ext/standard/crypt_sha512.c:88: error: (near initialization 
for `K[2]')
.../php/php-5.3.2/ext/standard/crypt_sha512.c:88: warning: integer constant is 
too large for "long" type
.../php/php-5.3.2/ext/standard/crypt_sha512.c:88: error: initializer element is 
not constant
.../php/php-5.3.2/ext/standard/crypt_sha512.c:88: error: (near initialization 
for `K[3]')
.../php/php-5.3.2/ext/standard/crypt_sha512.c:89: warning: integer constant is 
too large for "long" type
.../php/php-5.3.2/ext/standard/crypt_sha512.c:89: error: initializer element is 
not constant
..etc...

and build fails.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-04-17 17:09 UTC] pajoye@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: pajoye
 [2010-04-17 17:09 UTC] pajoye@php.net
If you can provide a patch to fix it for openbsd 3.8, please do. I don't have access to this version and it works with more decent releases.
 [2010-04-17 17:18 UTC] reidrac at usebox dot net
-Status: Feedback +Status: Open
 [2010-04-17 17:18 UTC] reidrac at usebox dot net
I just put the macro definition from a Linux include file in the beginning of 
the crypt_sha512.c file, just for the record:

#define UINT64_C(value) __CONCAT(value, ULL)

If it builds in recent versions I think it's not worth the effort of modifying 
configure just for an outdated version of OpenBSD.

I hope that if someone has a similar problem can find this bug report, so you 
can close the bug.

Thank!
 [2010-04-23 22:55 UTC] felipe@php.net
-Status: Open +Status: Assigned
 [2010-04-26 12:34 UTC] pajoye@php.net
Automatic comment from SVN on behalf of pajoye
Revision: http://svn.php.net/viewvc/?view=revision&revision=298587
Log: - Fix #51582, Don't assume UINT64_C it's ever available
 [2010-04-26 12:34 UTC] pajoye@php.net
Automatic comment from SVN on behalf of pajoye
Revision: http://svn.php.net/viewvc/?view=revision&revision=298588
Log: - Fix #51582, Don't assume UINT64_C it's ever available
 [2010-04-26 12:35 UTC] pajoye@php.net
-Status: Assigned +Status: Closed
 [2010-04-26 12:35 UTC] pajoye@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 10 15:01:28 2024 UTC