php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57246 Doesn't build
Submitted: 2006-09-18 12:08 UTC Modified: 2006-09-18 12:21 UTC
From: Fedora at FamilleCollet dot com Assigned:
Status: Closed Package: pdflib (PECL)
PHP Version: 5.2.0 RC4 OS: Fedora Core 5
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: Fedora at FamilleCollet dot com
New email:
PHP Version: OS:

 

 [2006-09-18 12:08 UTC] Fedora at FamilleCollet dot com
Description:
------------
When building the extension against php 5.2.0RC5-dev :

/home/rpmbuild/BUILD/php-pecl-pdflib-2.0.5/pdflib-2.0.5/pdf.c:335:55: error: macro "ZEND_ME_MAPPING" requires 4 arguments, but only 3 given
... repeat number of time....




Reproduce code:
---------------
This patch solve the problem.
PHP 5.2.0 and pdf extension run fine

--- pdf.c.orig	2006-09-18 17:28:17.000000000 +0200
+++ pdf.c	2006-09-18 17:32:21.000000000 +0200
@@ -91,6 +91,12 @@
 # include "Zend/zend_exceptions.h"
 #endif /* PHP_MAJOR_VERSION >= 5 */
 
+#if PHP_MAJOR_VERSION > 5 || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 2)
+#define THEMAPPING(a,b,c) PHP_ME_MAPPING(a,b,c,0)
+#else
+#define THEMAPPING(a,b,c) PHP_ME_MAPPING(a,b,c)
+#endif
+
 #if PDFLIB_WITH_GD_SUPPORT
 #if HAVE_LIBGD13
 # include "ext/gd/php_gd.h"
@@ -332,169 +338,169 @@
 
 function_entry pdflib_funcs[] = {
 #if PDFLIB_MAJORVERSION >= 6
-	PHP_ME_MAPPING(activate_item, pdf_activate_item, NULL)
+	THEMAPPING(activate_item, pdf_activate_item, NULL)
 #endif /* PDFlib >= 6.0.0 */
-/* 	PHP_ME_MAPPING(add_bookmark, pdf_add_bookmark, NULL) deprecated */
-/* 	PHP_ME_MAPPING(add_launchlink, pdf_add_launchlink, NULL) deprecated */
-/* 	PHP_ME_MAPPING(add_locallink, pdf_add_locallink, NULL) deprecated */
-	PHP_ME_MAPPING(add_nameddest, pdf_add_nameddest, NULL)
-/* 	PHP_ME_MAPPING(add_note, pdf_add_note, NULL) deprecated */
-/* 	PHP_ME_MAPPING(add_pdflink, pdf_add_pdflink, NULL) deprecated */
-	PHP_ME_MAPPING(add_thumbnail, pdf_add_thumbnail, NULL)
-/* 	PHP_ME_MAPPING(add_weblink, pdf_add_weblink, NULL) deprecated */
-	PHP_ME_MAPPING(arc, pdf_arc, NULL)
-	PHP_ME_MAPPING(arcn, pdf_arcn, NULL)
-/* 	PHP_ME_MAPPING(attach_file, pdf_attach_file, NULL) deprecated */
-#if PDFLIB_MAJORVERSION >= 6
-	PHP_ME_MAPPING(begin_document, pdf_begin_document, NULL)
-#endif /* PDFlib >= 6.0.0 */
-	PHP_ME_MAPPING(begin_font, pdf_begin_font, NULL)
-	PHP_ME_MAPPING(begin_glyph, pdf_begin_glyph, NULL)
-#if PDFLIB_MAJORVERSION >= 6
-	PHP_ME_MAPPING(begin_item, pdf_begin_item, NULL)
-	PHP_ME_MAPPING(begin_layer, pdf_begin_layer, NULL)
-#endif /* PDFlib >= 6.0.0 */
-/* 	PHP_ME_MAPPING(begin_page, pdf_begin_page, NULL) deprecated */
-#if PDFLIB_MAJORVERSION >= 6
-	PHP_ME_MAPPING(begin_page_ext, pdf_begin_page_ext, NULL)
-#endif /* PDFlib >= 6.0.0 */
-	PHP_ME_MAPPING(begin_pattern, pdf_begin_pattern, NULL)
-	PHP_ME_MAPPING(begin_template, pdf_begin_template, NULL)
-	PHP_ME_MAPPING(circle, pdf_circle, NULL)
-	PHP_ME_MAPPING(clip, pdf_clip, NULL)
-/* 	PHP_ME_MAPPING(close, pdf_close, NULL) deprecated */
-	PHP_ME_MAPPING(close_image, pdf_close_image, NULL)
-	PHP_ME_MAPPING(close_pdi, pdf_close_pdi, NULL)
-	PHP_ME_MAPPING(close_pdi_page, pdf_close_pdi_page, NULL)
-	PHP_ME_MAPPING(closepath, pdf_closepath, NULL)
-	PHP_ME_MAPPING(closepath_fill_stroke, pdf_closepath_fill_stroke, NULL)
-	PHP_ME_MAPPING(closepath_stroke, pdf_closepath_stroke, NULL)
-	PHP_ME_MAPPING(concat, pdf_concat, NULL)
-	PHP_ME_MAPPING(continue_text, pdf_continue_text, NULL)
-#if PDFLIB_MAJORVERSION >= 6
-	PHP_ME_MAPPING(create_action, pdf_create_action, NULL)
-	PHP_ME_MAPPING(create_annotation, pdf_create_annotation, NULL)
-	PHP_ME_MAPPING(create_bookmark, pdf_create_bookmark, NULL)
-	PHP_ME_MAPPING(create_field, pdf_create_field, NULL)
-	PHP_ME_MAPPING(create_fieldgroup, pdf_create_fieldgroup, NULL)
-#endif /* PDFlib >= 6.0.0 */
-	PHP_ME_MAPPING(create_gstate, pdf_create_gstate, NULL)
-	PHP_ME_MAPPING(create_pvf, pdf_create_pvf, NULL)
-#if PDFLIB_MAJORVERSION >= 6
-	PHP_ME_MAPPING(create_textflow, pdf_create_textflow, NULL)
-#endif /* PDFlib >= 6.0.0 */
-	PHP_ME_MAPPING(curveto, pdf_curveto, NULL)
-#if PDFLIB_MAJORVERSION >= 6
-	PHP_ME_MAPPING(define_layer, pdf_define_layer, NULL)
-#endif /* PDFlib >= 6.0.0 */
-	PHP_ME_MAPPING(delete, pdf_delete, NULL)
-	PHP_ME_MAPPING(delete_pvf, pdf_delete_pvf, NULL)
-#if PDFLIB_MAJORVERSION >= 6
-	PHP_ME_MAPPING(delete_textflow, pdf_delete_textflow, NULL)
-#endif /* PDFlib >= 6.0.0 */
-	PHP_ME_MAPPING(encoding_set_char, pdf_encoding_set_char, NULL)
-#if PDFLIB_MAJORVERSION >= 6
-	PHP_ME_MAPPING(end_document, pdf_end_document, NULL)
-#endif /* PDFlib >= 6.0.0 */
-	PHP_ME_MAPPING(end_font, pdf_end_font, NULL)
-	PHP_ME_MAPPING(end_glyph, pdf_end_glyph, NULL)
-#if PDFLIB_MAJORVERSION >= 6
-	PHP_ME_MAPPING(end_item, pdf_end_item, NULL)
-	PHP_ME_MAPPING(end_layer, pdf_end_layer, NULL)
-#endif /* PDFlib >= 6.0.0 */


Expected result:
----------------
Hope that helps.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-09-18 12:11 UTC] Fedora at FamilleCollet dot com
I must apologize for the flood...

Here is the patch : http://remi.collet.free.fr/files/pdflib-php520.patch
 [2006-09-18 12:21 UTC] rjs at pdflib dot com
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.

Thanks for the patch.

The problems is fixed in CVS already. As soon as PHP 5.2 is out a new PECL package for PDFlib will be created.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Thu Oct 29 06:01:25 2020 UTC