delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/07/21/18:45:08

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-Id: <1121984527.16631.238979554@webmail.messagingengine.com>
From: "Charles Wilson" <cygwin AT cwilson DOT fastmail DOT fm>
To: cygwin AT cygwin DOT com
MIME-Version: 1.0
Subject: Re: ATTN: jpeglib maintainer
Date: Thu, 21 Jul 2005 18:22:07 -0400
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id j6LMj4LB009692

Jörg Schaible wrote:
> ======= %< =======
> $ LANG=C make
> gcc  -g -O2  -DHAVE_CONFIG_H   -c -o jpeginfo.o jpeginfo.c
> jpeginfo.c: In function `main':
> jpeginfo.c:323: error: structure has no member named `progressive_mode'
> jpeginfo.c:333: error: structure has no member named `progressive_mode'
> make: *** [jpeginfo.o] Error 1
> ======= %< =======

Yep, that's because 
  (1) cygwin's libjpeg uses the lossless jpeg patch, which is needed for
  certain medical imagery
  (2) the lossless jpeg patch changes only the "private" interface of
  libjpeg [*]
  (3) jpeginfo is "breaking the rules" and accessing private data (e.g.
  "progressive_mode" is nonpublic even tho it is defined in (pristine)
  jpeglib.h).

Of course, the "rules" aren't really that strict, and progressive_mode
isn't REALLY private...so it's a grey area.

[*] pristine jpeglib.h looks like this:
  /* Remaining fields are known throughout compressor, but generally
   * should not be touched by a surrounding application.
   */
  boolean progressive_mode;     /* TRUE if scan script uses progressive
  mode */


So, what to do?  On cygwin, I think you just need to do something like
this:

#ifdef __CYGWIN__
# define CHECK_PROGRESSIVE(cinfo) (cinfo->process == JPROC_PROGRESSIVE)
#else
# define CHECK_PROGRESSIVE(cinfo) (cinfo->progressive_mode)
#endif

and replace all accesses to progressive_mode with this macro.  Note that
you'll also need to do something similar for the change:
 'width_in_blocks' --> 'width_in_data_units'
 'height_in_blocks' --> 'height_in_data_units'
But search the archives for more information about these two beasties.

There has been some movement in recent months on the jpeglib mailing
list about rolling out a jpeg-6c (and possibly a jpeg-7).  It is an open
question whether that process may eventually fold something like
lossless jpeg into the main codebase in a non-disruptive way.  We'll
just have to wait and see.

--
Chuck
 
--
  Charles Wilson
  cygwin at removespam cwilson dot fastmail dot fm


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019