From 2a6b8316fce86aa05c00bf44a29a28d2e9aec99c Mon Sep 17 00:00:00 2001 From: DRC Date: Tue, 25 Nov 2014 10:07:43 +0000 Subject: [PATCH] Some software also needs the FAR macro. Ugh. Also wordsmithing. git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1432 632fc199-4ca6-4c93-a231-07263d6284db --- ChangeLog.txt | 11 +++++++---- jmorecfg.h | 14 +++++++++++--- jpeglib.h | 6 +++--- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index bdb1708..40ae481 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -52,10 +52,13 @@ 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 +[11] Restored the JPP(), JMETHOD(), and FAR macros in the libjpeg-turbo header +files. The JPP() and JMETHOD() macros were originally implemented in libjpeg +as a way of supporting non-ANSI compilers that lacked support for prototype +parameters. libjpeg-turbo has never supported such compilers, but some +software packages still use the macros to define their own prototypes. +Similarly, libjpeg-turbo has never supported MS-DOS and other platforms that +have far symbols, but some software packages still use the FAR macro. 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. diff --git a/jmorecfg.h b/jmorecfg.h index 0ee8f50..108e7de 100644 --- a/jmorecfg.h +++ b/jmorecfg.h @@ -182,14 +182,22 @@ typedef unsigned int JDIMENSION; /* 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. + * prototype parameters. libjpeg-turbo has never supported these older, + * non-ANSI 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 +/* libjpeg-turbo no longer supports platforms that have far symbols (MS-DOS), + * but again, some software relies on this macro. + */ + +#undef FAR +#define FAR + + /* * 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 b708970..9615c5d 100644 --- a/jpeglib.h +++ b/jpeglib.h @@ -877,9 +877,9 @@ 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. + * prototype parameters. libjpeg-turbo has never supported these older, + * non-ANSI compilers, but the macro is still included because there is some + * software out there that uses it. */ #define JPP(arglist) arglist -- 2.40.0