pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/graphics/cpia2view Fix GCC 3.4+: __FUNCTION__ works li...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ebd17a876a6b
branches:  trunk
changeset: 511812:ebd17a876a6b
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Sat Apr 22 17:45:05 2006 +0000

description:
Fix GCC 3.4+: __FUNCTION__ works like __func__ (aka variable).
Add DragonFly support.

diffstat:

 graphics/cpia2view/distinfo         |   9 +++-
 graphics/cpia2view/patches/patch-aa |  35 ++++++++---------
 graphics/cpia2view/patches/patch-ab |  29 ++++++++++++++
 graphics/cpia2view/patches/patch-ac |  16 ++++++++
 graphics/cpia2view/patches/patch-ad |  16 ++++++++
 graphics/cpia2view/patches/patch-ae |  30 +++++++++++++++
 graphics/cpia2view/patches/patch-af |  73 +++++++++++++++++++++++++++++++++++++
 7 files changed, 187 insertions(+), 21 deletions(-)

diffs (251 lines):

diff -r c2d9fec3641a -r ebd17a876a6b graphics/cpia2view/distinfo
--- a/graphics/cpia2view/distinfo       Sat Apr 22 17:32:34 2006 +0000
+++ b/graphics/cpia2view/distinfo       Sat Apr 22 17:45:05 2006 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.3 2005/02/24 08:45:04 agc Exp $
+$NetBSD: distinfo,v 1.4 2006/04/22 17:45:05 joerg Exp $
 
 SHA1 (cpia2_driver-1.0.tgz) = 72c70f88fd894118510e761c9c9f5f5a928e7e42
 RMD160 (cpia2_driver-1.0.tgz) = bdec7a2cd68c08d10a734ad66f16433b9622ba84
@@ -6,4 +6,9 @@
 SHA1 (cpia2_driver-1.0-bsd-0.03.patch.gz) = 953a7ae4eafd5e3476b0db617703ff291caab3f2
 RMD160 (cpia2_driver-1.0-bsd-0.03.patch.gz) = 6ad079c4032b15eb39e50a73a476c1b44c44202f
 Size (cpia2_driver-1.0-bsd-0.03.patch.gz) = 17497 bytes
-SHA1 (patch-aa) = 358ca2855020184a341b05fd75de5992eee32056
+SHA1 (patch-aa) = 553f12df2e7837588d9a6c763b7f645f8c46edff
+SHA1 (patch-ab) = c43e26e86af33abf417496acf4681c104a951da0
+SHA1 (patch-ac) = f4645a7c31dbbc9232ecdc71619ba1c4b777b266
+SHA1 (patch-ad) = 4e92276bb154bdb33af581a278c1bb656d139895
+SHA1 (patch-ae) = 4f2f601f02e4d5060ce39d002fad8aaa5cdc5afc
+SHA1 (patch-af) = 11cfd02d70bd35e8485f3d92a3cb3e8b96f480d3
diff -r c2d9fec3641a -r ebd17a876a6b graphics/cpia2view/patches/patch-aa
--- a/graphics/cpia2view/patches/patch-aa       Sat Apr 22 17:32:34 2006 +0000
+++ b/graphics/cpia2view/patches/patch-aa       Sat Apr 22 17:45:05 2006 +0000
@@ -1,8 +1,20 @@
-$NetBSD: patch-aa,v 1.1 2004/03/09 15:55:17 hamajima Exp $
+$NetBSD: patch-aa,v 1.2 2006/04/22 17:45:05 joerg Exp $
 
---- cpia2shot.c.orig   2004-03-09 22:19:13.000000000 +0900
-+++ cpia2shot.c        2004-03-09 22:27:15.000000000 +0900
-@@ -128,9 +128,9 @@
+--- cpia2shot.c.orig   2006-04-22 17:24:42.000000000 +0000
++++ cpia2shot.c
+@@ -36,7 +36,11 @@
+ #include <string.h>
+ #include <err.h>
+ 
++#if defined(__DragonFly__)
++#include <bus/usb/usb.h>
++#else
+ #include <dev/usb/usb.h>
++#endif
+ #ifndef  USB_SET_PACKETCHKSUM
+ #define USB_SET_PACKETCHKSUM  _IOW ('U', 115, int)
+ #endif
+@@ -128,9 +132,9 @@ int main(int argc, char *argv[])
      /* enable checksum to isoc data */
      chksum = 1;
      if ( (ret = ioctl(usbdev.fd, USB_SET_PACKETCHKSUM, (void *)&chksum)) != 0 ) {
@@ -15,18 +27,3 @@
      }
  
      /* set size and start stream */
---- cpia2view.c.orig   2004-03-09 22:19:13.000000000 +0900
-+++ cpia2view.c        2004-03-09 22:27:56.000000000 +0900
-@@ -142,9 +142,9 @@
-     /* enable checksum to isoc data */
-     chksum = 1;
-     if ( (ret = ioctl(usbdev.fd, USB_SET_PACKETCHKSUM, (void *)&chksum)) != 0 ) {
--          perror("USB_SET_PACKETCHKSUM");
--          ret = 1;
--          goto OPENERR;
-+          fprintf(stderr, "You should apply following kernel patch to use this package.\n");
-+          fprintf(stderr, "\thttp://www2.starcat.ne.jp/~takam/bsd/cpia2-netbsd-sys-1.6.2.diff\n";);
-+          exit(1);
-     }
- 
-     /* set size and start stream */
diff -r c2d9fec3641a -r ebd17a876a6b graphics/cpia2view/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/cpia2view/patches/patch-ab       Sat Apr 22 17:45:05 2006 +0000
@@ -0,0 +1,29 @@
+$NetBSD: patch-ab,v 1.1 2006/04/22 17:45:05 joerg Exp $
+
+--- cpia2view.c.orig   2006-04-22 17:24:42.000000000 +0000
++++ cpia2view.c
+@@ -40,7 +40,11 @@
+ #include <string.h>
+ #include <err.h>
+ 
++#if defined(__DragonFly__)
++#include <bus/usb/usb.h>
++#else
+ #include <dev/usb/usb.h>
++#endif
+ #ifndef  USB_SET_PACKETCHKSUM
+ #define USB_SET_PACKETCHKSUM  _IOW ('U', 115, int)
+ #endif
+@@ -142,9 +146,9 @@ int main(int argc, char *argv[])
+     /* enable checksum to isoc data */
+     chksum = 1;
+     if ( (ret = ioctl(usbdev.fd, USB_SET_PACKETCHKSUM, (void *)&chksum)) != 0 ) {
+-          perror("USB_SET_PACKETCHKSUM");
+-          ret = 1;
+-          goto OPENERR;
++          fprintf(stderr, "You should apply following kernel patch to use this package.\n");
++          fprintf(stderr, "\thttp://www2.starcat.ne.jp/~takam/bsd/cpia2-netbsd-sys-1.6.2.diff\n";);
++          exit(1);
+     }
+ 
+     /* set size and start stream */
diff -r c2d9fec3641a -r ebd17a876a6b graphics/cpia2view/patches/patch-ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/cpia2view/patches/patch-ac       Sat Apr 22 17:45:05 2006 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-ac,v 1.1 2006/04/22 17:45:05 joerg Exp $
+
+--- linux_usbif.c.orig 2006-04-22 17:29:12.000000000 +0000
++++ linux_usbif.c
+@@ -28,7 +28,11 @@
+ 
+ #include <ctype.h>
+ #include <sys/ioctl.h>
++#if defined(__DragonFly__)
++#include <bus/usb/usb.h>
++#else
+ #include <dev/usb/usb.h>
++#endif
+ 
+ #include "linux_usbif.h"
+ 
diff -r c2d9fec3641a -r ebd17a876a6b graphics/cpia2view/patches/patch-ad
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/cpia2view/patches/patch-ad       Sat Apr 22 17:45:05 2006 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-ad,v 1.1 2006/04/22 17:45:05 joerg Exp $
+
+--- linux_usbif.h.orig 2006-04-22 17:29:29.000000000 +0000
++++ linux_usbif.h
+@@ -11,7 +11,11 @@
+ #include <string.h>
+ #include <err.h>
+ 
++#if defined(__DragonFly__)
++#include <bus/usb/usb.h>
++#else
+ #include <dev/usb/usb.h>
++#endif
+ 
+ #define USB_DIR_OUT                   UT_WRITE
+ #define USB_DIR_IN                    UT_READ
diff -r c2d9fec3641a -r ebd17a876a6b graphics/cpia2view/patches/patch-ae
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/cpia2view/patches/patch-ae       Sat Apr 22 17:45:05 2006 +0000
@@ -0,0 +1,30 @@
+$NetBSD: patch-ae,v 1.1 2006/04/22 17:45:05 joerg Exp $
+
+--- cpia2_core.c.orig  2006-04-22 17:32:52.000000000 +0000
++++ cpia2_core.c
+@@ -560,6 +560,7 @@ int cpia2_do_command(struct camera_data 
+                 cam->params.vp_params.user_effects = cmd.buffer.block_data[0];
+               break;
+       default:
++              break;
+       }
+       return retval;
+ }
+@@ -619,7 +620,7 @@ int cpia2_send_command(struct camera_dat
+                           block_name[block_index]);
+               break;
+       default:
+-              LOG(__FUNCTION__": invalid request mode\n");
++              LOG("%s: invalid request mode\n", __FUNCTION__);
+               return -EINVAL;
+       }
+ 
+@@ -1009,7 +1010,7 @@ static int set_default_user_mode(struct 
+                       frame_rate = CPIA2_VP_FRAMERATE_30;
+               break;
+       default:
+-              LOG(__FUNCTION__": Invalid sensor flag value 0x%0X\n",
++              LOG("%s: Invalid sensor flag value 0x%0X\n", __FUNCTION__,
+                   cam->params.version.sensor_flags);
+               return -EINVAL;
+       }
diff -r c2d9fec3641a -r ebd17a876a6b graphics/cpia2view/patches/patch-af
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/cpia2view/patches/patch-af       Sat Apr 22 17:45:05 2006 +0000
@@ -0,0 +1,73 @@
+$NetBSD: patch-af,v 1.1 2006/04/22 17:45:05 joerg Exp $
+
+--- cpia2_usb.c.orig   2006-04-22 17:35:19.000000000 +0000
++++ cpia2_usb.c
+@@ -145,7 +145,7 @@ int check_for_app2_segment(unsigned char
+       unsigned char *buf;
+       
+       if (!buffer) {
+-              ERR(__FUNCTION__": got null buffer pointer\n");
++              ERR("%s: got null buffer pointer\n", __FUNCTION__);
+               return -1;
+       }
+ 
+@@ -516,7 +516,7 @@ int cpia2_usb_open(struct camera_data *c
+       int ret;
+ 
+       if (!cam) {
+-              ERR("NULL pointer passed to "__FUNCTION__"\n");
++              ERR("NULL pointer passed to %s\n", __FUNCTION__);
+               return -EINVAL;
+       }
+ 
+@@ -533,7 +533,7 @@ int cpia2_usb_open(struct camera_data *c
+ 
+       ret = cpia2_usb_set_alternate(cam, USBIF_CMDONLY);
+       if (ret < 0) {
+-              ERR(__FUNCTION__": usb_set_interface error (ret = %d)\n",
++              ERR("%s: usb_set_interface error (ret = %d)\n", __FUNCTION__,
+                      ret);
+               /* free_sbufs(cam); *//* BSD patch */
+               return -EBUSY;
+@@ -703,12 +703,12 @@ int cpia2_usb_transfer_cmd(struct camera
+       struct usb_device *udev = cam->dev;
+ 
+       if (!udev) {
+-              ERR(__FUNCTION__": Internal driver error: udev is NULL\n");
++              ERR("%s: Internal driver error: udev is NULL\n", __FUNCTION__);
+               return -EINVAL;
+       }
+ 
+       if (!registers) {
+-              ERR(__FUNCTION__": Internal driver error: register array is NULL\n");
++              ERR("%s: Internal driver error: register array is NULL\n", __FUNCTION__);
+               return -EINVAL;
+       }
+ 
+@@ -949,7 +949,7 @@ void *cpia2_usb_probe(struct usb_device 
+       }
+ 
+       if (ifnum != 0) {       /* Only interface available for CPia2 */
+-              ERR(__FUNCTION__": Invalid interface number %d\n", ifnum);
++              ERR("%s: Invalid interface number %d\n", __FUNCTION__, ifnum);
+               return NULL;
+       }
+       udev->interfacedesc.uid_config_index = USB_CURRENT_CONFIG_INDEX;
+@@ -972,7 +972,7 @@ void *cpia2_usb_probe(struct usb_device 
+       usb_set_configuration(udev, 1);
+       ret = cpia2_usb_set_alternate(cam, USBIF_CMDONLY);
+       if (ret < 0) {
+-              ERR(__FUNCTION__": usb_set_interface error (ret = %d)\n",
++              ERR("%s: usb_set_interface error (ret = %d)\n", __FUNCTION__,
+                      ret);
+               kfree(cam);
+               return NULL;
+@@ -987,7 +987,7 @@ void *cpia2_usb_probe(struct usb_device 
+ #endif        /* BSD patch */ 
+ 
+       if(cpia2_init_camera(cam) != 0) {
+-              ERR(__FUNCTION__": failed to cpia2_init_camera\n");
++              ERR("%s: failed to cpia2_init_camera\n", __FUNCTION__);
+               /* cpia2_unregister_camera(cam); *//* BSD patch */
+               kfree(cam);
+               return NULL;



Home | Main Index | Thread Index | Old Index