MINGW-packages/mingw-w64-libgphoto2/0003-missing-min-max.patch
Miloš Komarčević bd98cf9433
libghpoto2: update to 2.5.32 (#24793)
* libghpoto2: update to 2.5.32

---------

Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
2025-07-11 20:06:36 +02:00

16 lines
636 B
Diff

--- libgphoto2-2.5.32/camlibs/quicktake1x0/quicktake1x0.h.orig 2025-02-28 16:28:12.000000000 +0100
+++ libgphoto2-2.5.32/camlibs/quicktake1x0/quicktake1x0.h 2025-07-11 18:14:36.273226800 +0200
@@ -75,6 +75,12 @@
unsigned char getbithuff (int nbits, unsigned char **raw, unsigned short *huff);
#define ABS(x) (((int)(x) ^ ((int)(x) >> 31)) - ((int)(x) >> 31))
+#ifndef MAX
+# define MAX(a, b) ((a) > (b) ? (a) : (b))
+#endif
+#ifndef MIN
+# define MIN(a, b) ((a) < (b) ? (a) : (b))
+#endif
#define LIM(x,min,max) MAX(min,MIN(x,max))
#define RAW(ptr, row,col) (ptr)[(row)*width+(col)]
#define getbits(n, raw) getbithuff(n, raw, 0)