(none) imager-devel
/ help / lists / applications / search /
 

Re: Imager 0.43 and OS X

From: Tony Cook (
12754@xyz.molar.is)
Date: Wed 15 Sep 2004 - 04:34:11 GMT

  • Next message: Tony Cook: "Future of Imager"

    On Tue, Sep 14, 2004 at 10:35:31PM -0400, Barry Hoggard wrote:
    > I'm trying to use Imager on OS X (10.3.5) with my own compiled Perl,
    > and some of the tests are failing:

    tifflib changed to require that all of the function pointers you
    provide to TIFFClientOpen be non-NULL, even when those functions
    weren't being called.

    This has been fixed in CVS, but unfortunately Arnar's CVS server is down.

    You can find a modified tiff.c at:

      http://www.develop-help.com/imager/src/tiff.c

    Below you'll find a patch to tiff.c vs Imager 0.43.

    --- ../../Imager-0.43/tiff.c Fri Dec 20 10:55:19 2002
    +++ tiff.c Thu Apr 22 17:01:07 2004
    @@ -98,6 +98,37 @@
       return (toff_t) ig->seekcb(ig, o, w);
     }
     
    +/*
    +=item comp_mmap(thandle_t, tdata_t*, toff_t*)
    +
    +Dummy mmap stub.
    +
    +This shouldn't ever be called but newer tifflibs want it anyway.
    +
    +=cut
    +*/
    +
    +static
    +int
    +comp_mmap(thandle_t h, tdata_t*p, toff_t*off) {
    + return -1;
    +}
    +
    +/*
    +=item comp_munmap(thandle_t h, tdata_t p, toff_t off)
    +
    +Dummy munmap stub.
    +
    +This shouldn't ever be called but newer tifflibs want it anyway.
    +
    +=cut
    +*/
    +
    +static void
    +comp_munmap(thandle_t h, tdata_t p, toff_t off) {
    + /* do nothing */
    +}
    +
     static i_img *read_one_tiff(TIFF *tif) {
       i_img *im;
       uint32 width, height;
    @@ -346,8 +377,8 @@
                            (TIFFSeekProc) comp_seek,
                            (TIFFCloseProc) ig->closecb,
                            ig->sizecb ? (TIFFSizeProc) ig->sizecb : (TIFFSizeProc) sizeproc,
    - (TIFFMapFileProc) NULL,
    - (TIFFUnmapFileProc) NULL);
    + (TIFFMapFileProc) comp_mmap,
    + (TIFFUnmapFileProc) comp_munmap);
       
       if (!tif) {
         mm_log((1, "i_readtiff_wiol: Unable to open tif file\n"));
    @@ -399,9 +430,9 @@
                            (TIFFReadWriteProc) ig->writecb,
                            (TIFFSeekProc) comp_seek,
                            (TIFFCloseProc) ig->closecb,
    - (TIFFSizeProc) ig->sizecb,
    - (TIFFMapFileProc) NULL,
    - (TIFFUnmapFileProc) NULL);
    + ig->sizecb ? (TIFFSizeProc) ig->sizecb : (TIFFSizeProc) sizeproc,
    + (TIFFMapFileProc) comp_mmap,
    + (TIFFUnmapFileProc) comp_munmap);
       
       if (!tif) {
         mm_log((1, "i_readtiff_wiol: Unable to open tif file\n"));
    @@ -825,9 +856,9 @@
                            (TIFFReadWriteProc) ig->writecb,
                            (TIFFSeekProc) comp_seek,
                            (TIFFCloseProc) ig->closecb,
    - (TIFFSizeProc) ig->sizecb,
    - (TIFFMapFileProc) NULL,
    - (TIFFUnmapFileProc) NULL);
    + ig->sizecb ? (TIFFSizeProc) ig->sizecb : (TIFFSizeProc) sizeproc,
    + (TIFFMapFileProc) comp_mmap,
    + (TIFFUnmapFileProc) comp_munmap);
       
     
     
    @@ -885,9 +916,9 @@
                            (TIFFReadWriteProc) ig->writecb,
                            (TIFFSeekProc) comp_seek,
                            (TIFFCloseProc) ig->closecb,
    - (TIFFSizeProc) ig->sizecb,
    - (TIFFMapFileProc) NULL,
    - (TIFFUnmapFileProc) NULL);
    + ig->sizecb ? (TIFFSizeProc) ig->sizecb : (TIFFSizeProc) sizeproc,
    + (TIFFMapFileProc) comp_mmap,
    + (TIFFUnmapFileProc) comp_munmap);
       
     
     
    @@ -941,9 +972,9 @@
                            (TIFFReadWriteProc) ig->writecb,
                            (TIFFSeekProc) comp_seek,
                            (TIFFCloseProc) ig->closecb,
    - (TIFFSizeProc) ig->sizecb,
    - (TIFFMapFileProc) NULL,
    - (TIFFUnmapFileProc) NULL);
    + ig->sizecb ? (TIFFSizeProc) ig->sizecb : (TIFFSizeProc) sizeproc,
    + (TIFFMapFileProc) comp_mmap,
    + (TIFFUnmapFileProc) comp_munmap);
       
     
     
    @@ -996,9 +1027,9 @@
                            (TIFFReadWriteProc) ig->writecb,
                            (TIFFSeekProc) comp_seek,
                            (TIFFCloseProc) ig->closecb,
    - (TIFFSizeProc) ig->sizecb,
    - (TIFFMapFileProc) NULL,
    - (TIFFUnmapFileProc) NULL);
    + ig->sizecb ? (TIFFSizeProc) ig->sizecb : (TIFFSizeProc) sizeproc,
    + (TIFFMapFileProc) comp_mmap,
    + (TIFFUnmapFileProc) comp_munmap);
       
     
     



  •