|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-09-18 12:11 UTC] Fedora at FamilleCollet dot com
[2006-09-18 12:21 UTC] rjs at pdflib dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 02:00:02 2025 UTC |
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.