pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/print/cups-drivers-Magicolor5440DL Fix build against C...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/9b2fa9d1e5d8
branches:  trunk
changeset: 364618:9b2fa9d1e5d8
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Sat Jul 01 22:13:26 2017 +0000

description:
Fix build against CUPS 2.0. While here, fix format string (ab)use.

diffstat:

 print/cups-drivers-Magicolor5440DL/distinfo                         |   4 +-
 print/cups-drivers-Magicolor5440DL/patches/patch-src_bmp.c          |  44 ++++++++++
 print/cups-drivers-Magicolor5440DL/patches/patch-src_rastertokmlf.c |  14 +++
 3 files changed, 61 insertions(+), 1 deletions(-)

diffs (80 lines):

diff -r 8178385cdc93 -r 9b2fa9d1e5d8 print/cups-drivers-Magicolor5440DL/distinfo
--- a/print/cups-drivers-Magicolor5440DL/distinfo       Sat Jul 01 22:12:53 2017 +0000
+++ b/print/cups-drivers-Magicolor5440DL/distinfo       Sat Jul 01 22:13:26 2017 +0000
@@ -1,7 +1,9 @@
-$NetBSD: distinfo,v 1.7 2015/11/04 01:01:32 agc Exp $
+$NetBSD: distinfo,v 1.8 2017/07/01 22:13:26 joerg Exp $
 
 SHA1 (5440DL_lin64bit_1_2_1.zip) = 130092a9345ec32a2681bacafaeadcc85563f1fa
 RMD160 (5440DL_lin64bit_1_2_1.zip) = a0a5a51eef1a7798d0f8b8d07873bd60ac2cba9b
 SHA512 (5440DL_lin64bit_1_2_1.zip) = 2686c06a18f4f23488a7de9820cc18e4e902805adebe5959b2f6a26e973082468aa6993421efcdbf690651d319b86147e382e15271a2895a3210c240a932f846
 Size (5440DL_lin64bit_1_2_1.zip) = 767491 bytes
 SHA1 (patch-aa) = dc05cf3551ea421ac0b807752e86de27f1fe229e
+SHA1 (patch-src_bmp.c) = 15fe81ab79ba9bcd1ecfcf413122a8e4ad217818
+SHA1 (patch-src_rastertokmlf.c) = c3f3c3e795b91300b0d5e80b3113b8a7541727a6
diff -r 8178385cdc93 -r 9b2fa9d1e5d8 print/cups-drivers-Magicolor5440DL/patches/patch-src_bmp.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/print/cups-drivers-Magicolor5440DL/patches/patch-src_bmp.c        Sat Jul 01 22:13:26 2017 +0000
@@ -0,0 +1,44 @@
+$NetBSD: patch-src_bmp.c,v 1.1 2017/07/01 22:13:26 joerg Exp $
+
+Fix *print use.
+
+--- src/bmp.c.orig     2017-07-01 21:10:21.915538844 +0000
++++ src/bmp.c
+@@ -140,7 +140,7 @@ int write_bmp_header(cups_page_header_t 
+ 
+ int getHalftoneByResolution (PIMAGEHEADER pImage)
+ {
+-      BYTE szFile[ 256 ];
++      char szFile[ 256 ];
+    FILE *fh;
+       size_t numread;
+       PBITMAPFILEHEADER pbmpfh;
+@@ -155,7 +155,7 @@ int getHalftoneByResolution (PIMAGEHEADE
+ 
+       for(plane=startplane; plane <4; plane++) //cmyk 0 1 2 3
+       {
+-              sprintf(szFile, 
++              snprintf(szFile, sizeof(szFile),
+                       "%s/Halftones/km_ht_%d%d.bmp",
+                       KM_DATADIR, pImage->xResolution/1200, plane); 
+               
+@@ -171,7 +171,7 @@ int getHalftoneByResolution (PIMAGEHEADE
+               numread = fread(pbmpfh,1,sizeof(BITMAPFILEHEADER),fh);
+               if(numread != sizeof(BITMAPFILEHEADER))
+               {
+-                      fprintf(stderr, "ERROR: numread=%d, size=%d\n",numread,sizeof(BITMAPFILEHEADER));
++                      fprintf(stderr, "ERROR: numread=%zu, size=%zu\n",numread,sizeof(BITMAPFILEHEADER));
+                       return CUPS_FALSE;
+               }
+               BMP_ASSIGN_DWORD(pbmpfh->bfSize,pbmpfh->bfSize);
+@@ -197,8 +197,8 @@ int getHalftoneByResolution (PIMAGEHEADE
+ 
+               if(pHTtmp == NULL)
+               {
+-                      fprintf(stderr, "ERROR: pbih->width=%d,height=%d\n)",pbih->biWidth,pbih->biHeight);
+-                      fprintf(stderr, "ERROR: size=%d,NULL pHTtmp\n",sizeof(HTHEADER));
++                      fprintf(stderr, "ERROR: pbih->width=%lu,height=%lu\n)",(unsigned long)pbih->biWidth,(unsigned long)pbih->biHeight);
++                      fprintf(stderr, "ERROR: size=%zu,NULL pHTtmp\n",sizeof(HTHEADER));
+                       return CUPS_FALSE;
+               }
+               pHTtmp->wID = plane;// * (objtype+1);
diff -r 8178385cdc93 -r 9b2fa9d1e5d8 print/cups-drivers-Magicolor5440DL/patches/patch-src_rastertokmlf.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/print/cups-drivers-Magicolor5440DL/patches/patch-src_rastertokmlf.c       Sat Jul 01 22:13:26 2017 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-src_rastertokmlf.c,v 1.1 2017/07/01 22:13:26 joerg Exp $
+
+Fix build with CUPS 2.0.
+
+--- src/rastertokmlf.c.orig    2017-07-01 21:05:32.072615512 +0000
++++ src/rastertokmlf.c
+@@ -53,6 +53,7 @@
+  */
+ 
+ #include <cups/cups.h>
++#include <cups/ppd.h>
+ //#include <cups/string.h>
+ #include <cups/language.h>
+ #include <cups/raster.h>



Home | Main Index | Thread Index | Old Index