sane-backends-1.0.20-open-macro.patch 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. commit 7987b0332e6b660ac7992176daeede40cab98390
  2. Author: Nils Philippsen <nils@redhat.com>
  3. Date: Tue Jun 16 17:02:49 2009 +0200
  4. patch: open-macro
  5. Squashed commit of the following:
  6. commit ab8fe801c4f82017988cb44cb79d82d286aa0de4
  7. Author: Nils Philippsen <nils@redhat.com>
  8. Date: Tue Jun 9 17:57:45 2009 +0200
  9. don't inadvertently use glibc open() macro
  10. diff --git a/backend/mustek_pp.c b/backend/mustek_pp.c
  11. index 8c3f06a..7e9d094 100644
  12. --- a/backend/mustek_pp.c
  13. +++ b/backend/mustek_pp.c
  14. @@ -1152,7 +1152,7 @@ sane_open (SANE_String_Const devicename, SANE_Handle * handle)
  15. }
  16. - if ((status = dev->func->open (dev->port, dev->caps, &fd)) != SANE_STATUS_GOOD) {
  17. + if ((status = (dev->func->open) (dev->port, dev->caps, &fd)) != SANE_STATUS_GOOD) {
  18. DBG (1, "sane_open: could not open device (%s)\n",
  19. sane_strstatus (status));
  20. diff --git a/backend/pixma_common.c b/backend/pixma_common.c
  21. index 2bcb3c1..c5e1e96 100644
  22. --- a/backend/pixma_common.c
  23. +++ b/backend/pixma_common.c
  24. @@ -511,7 +511,7 @@ pixma_open (unsigned devnr, pixma_t ** handle)
  25. strncpy (s->id, pixma_get_device_id (devnr), sizeof (s->id) - 1);
  26. s->ops = s->cfg->ops;
  27. s->scanning = 0;
  28. - error = s->ops->open (s);
  29. + error = (s->ops->open) (s);
  30. if (error < 0)
  31. goto rollback;
  32. error = pixma_deactivate (s->io);
  33. diff --git a/backend/plustek_pp.c b/backend/plustek_pp.c
  34. index 13d1443..629e238 100644
  35. --- a/backend/plustek_pp.c
  36. +++ b/backend/plustek_pp.c
  37. @@ -258,7 +258,7 @@ static int drvopen( Plustek_Device *dev )
  38. DBG( _DBG_INFO, "drvopen()\n" );
  39. - handle = dev->open((const char*)dev->name, (void *)dev );
  40. + handle = (dev->open)((const char*)dev->name, (void *)dev );
  41. tsecs = 0;
  42. diff --git a/sanei/sanei_scsi.c b/sanei/sanei_scsi.c
  43. index 69d5859..a594aba 100644
  44. --- a/sanei/sanei_scsi.c
  45. +++ b/sanei/sanei_scsi.c
  46. @@ -5328,7 +5328,7 @@ sanei_scsi_find_devices (const char *findvendor, const char *findmodel,
  47. (*plugInInterface)->Release (plugInInterface);
  48. IOObjectRelease (scsiDevice);
  49. - ioReturnValue = (*scsiDeviceInterface)->open (scsiDeviceInterface);
  50. + ioReturnValue = ((*scsiDeviceInterface)->open) (scsiDeviceInterface);
  51. if (ioReturnValue != kIOReturnSuccess)
  52. {
  53. DBG (5, "Error opening SCSI interface (0x%08x)\n", ioReturnValue);