Author: al
Date: 2009-12-30 21:41:00 +0100 (Wed, 30 Dec 2009)
New Revision: 2911

Modified:
   trunk/plugins/load-dcraw/dcraw.cc
   trunk/plugins/load-dcraw/dcraw_api.cc
   trunk/plugins/load-dcraw/mmap-hack.c
Log:
Made sure that mmap-hack is only used when WITH_MMAP_HACK is defined.

Modified: trunk/plugins/load-dcraw/dcraw.cc
===================================================================
--- trunk/plugins/load-dcraw/dcraw.cc   2009-12-30 20:38:42 UTC (rev 2910)
+++ trunk/plugins/load-dcraw/dcraw.cc   2009-12-30 20:41:00 UTC (rev 2911)
@@ -50,7 +50,9 @@
 #include <stdlib.h>
 #include <string.h>
 #include <time.h>
+#ifdef WITH_MMAP_HACK
 #include "mmap-hack.h"
+#endif
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h> /*For off_t */
 #endif
@@ -5025,7 +5027,6 @@
   int sony_curve[] = { 0,0,0,0,0,4095 };
 #ifndef WITH_MMAP_HACK
   unsigned *buf;
-  FILE *sfp;
 #endif /* WITH_MMAP_HACK */
   unsigned sony_offset=0, sony_length=0, sony_key=0;
   struct jhead jh;

Modified: trunk/plugins/load-dcraw/dcraw_api.cc
===================================================================
--- trunk/plugins/load-dcraw/dcraw_api.cc       2009-12-30 20:38:42 UTC (rev 
2910)
+++ trunk/plugins/load-dcraw/dcraw_api.cc       2009-12-30 20:41:00 UTC (rev 
2911)
@@ -30,7 +30,9 @@
 #include <sys/types.h>
 #include "dcraw_api.h"
 #include "dcraw.h"
+#ifdef WITH_MMAP_HACK
 #include "mmap-hack.h"
+#endif
 #define FORCC for (c=0; c < colors; c++)
 #define FC(filters,row,col) \
     (filters >> ((((row) << 1 & 14) + ((col) & 1)) << 1) & 3)

Modified: trunk/plugins/load-dcraw/mmap-hack.c
===================================================================
--- trunk/plugins/load-dcraw/mmap-hack.c        2009-12-30 20:38:42 UTC (rev 
2910)
+++ trunk/plugins/load-dcraw/mmap-hack.c        2009-12-30 20:41:00 UTC (rev 
2911)
@@ -16,7 +16,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, 
USA.
  */
-
+#ifdef WITH_MMAP_HACK
 #include <stdio.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -114,3 +114,4 @@
        stream->offset+= scanned;
        return(scanned);
 }
+#endif


_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit

Reply via email to