From e2dd3e3e5cb479f8596325e72f0595a31bf79921 Mon Sep 17 00:00:00 2001 From: DRC Date: Tue, 25 Nov 2014 09:48:15 +0000 Subject: [PATCH] Restore the JPP() and JMETHOD() macros. Even though libjpeg-turbo doesn't use them anymore, other software apparently does: https://bugzilla.redhat.com/show_bug.cgi?id=1164815 https://bugs.kde.org/show_bug.cgi?id=340944 https://bugzilla.mozilla.org/show_bug.cgi?id=1093615 git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1430 632fc199-4ca6-4c93-a231-07263d6284db --- ChangeLog.txt | 8 ++++++++ jmorecfg.h | 10 ++++++++++ jpeglib.h | 10 ++++++++++ 3 files changed, 28 insertions(+) diff --git a/ChangeLog.txt b/ChangeLog.txt index ac6aad3..bdb1708 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -52,6 +52,14 @@ were not actually usable on any platform except OS X and Windows, because those functions were not included in the libturbojpeg mapfile. This has been fixed. +[11] Restored the JPP() and JMETHOD() macros in the libjpeg-turbo header files. +libjpeg-turbo no longer supports compilers that don't support prototype +parameters, so the JPP() and JMETHOD() macros are no longer needed, but some +software packages still use them to define their own prototypes. A pretty +good argument can be made that this is a bad practice on the part of the +software in question, but since this affects more than one package, it's just +easier to fix it here. + 1.3.90 (1.4 beta1) ================== diff --git a/jmorecfg.h b/jmorecfg.h index 36fe971..0ee8f50 100644 --- a/jmorecfg.h +++ b/jmorecfg.h @@ -180,6 +180,16 @@ typedef unsigned int JDIMENSION; #define EXTERN(type) extern type +/* Originally, this macro was used as a way of defining function prototypes + * for both modern compilers as well as older compilers that did not support + * prototype parameters. libjpeg-turbo no longer supports these older + * compilers, but the macro is still included because there is some software + * out there that uses it. + */ + +#define JMETHOD(type,methodname,arglist) type (*methodname) arglist + + /* * On a few systems, type boolean and/or its values FALSE, TRUE may appear * in standard header files. Or you may have conflicts with application- diff --git a/jpeglib.h b/jpeglib.h index 27045a4..b708970 100644 --- a/jpeglib.h +++ b/jpeglib.h @@ -875,6 +875,16 @@ struct jpeg_memory_mgr { typedef boolean (*jpeg_marker_parser_method) (j_decompress_ptr cinfo); +/* Originally, this macro was used as a way of defining function prototypes + * for both modern compilers as well as older compilers that did not support + * prototype parameters. libjpeg-turbo no longer supports these older + * compilers, but the macro is still included because there is some software + * out there that uses it. + */ + +#define JPP(arglist) arglist + + /* Default error-management setup */ EXTERN(struct jpeg_error_mgr *) jpeg_std_error (struct jpeg_error_mgr * err); -- 2.40.0