SDL_image: external/jpeg-9d: tweak android jconfig.h to avoid macro redefinitions.

From 75e43ae4374a42fba3beb2ec968b97b25dfc16fc Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Tue, 17 Aug 2021 15:50:00 +0300
Subject: [PATCH] external/jpeg-9d: tweak android jconfig.h to avoid macro
 redefinitions.

Fixes https://github.com/libsdl-org/SDL_image/issues/185

Actually better solution is needed, this is just a workaround for now..
---
 external/jpeg-9d.patch     | 13 ++++---------
 external/jpeg-9d/jconfig.h | 11 +++--------
 2 files changed, 7 insertions(+), 17 deletions(-)

diff --git a/external/jpeg-9d.patch b/external/jpeg-9d.patch
index d1ede5b..f80ce0f 100644
--- a/external/jpeg-9d.patch
+++ b/external/jpeg-9d.patch
@@ -42,11 +42,10 @@ diff -u /dev/null jpeg-9d/Android.mk
 diff -u /dev/null jpeg-9d/jconfig.h
 --- /dev/null
 +++ jpeg-9d/jconfig.h
-@@ -0,0 +1,156 @@
+@@ -0,0 +1,151 @@
 +/* android jconfig.h */
++
 +/*
-+ * jconfig.doc
-+ *
 + * Copyright (C) 1991-1994, Thomas G. Lane.
 + * This file is part of the Independent JPEG Group's software.
 + * For conditions of distribution and use, see the accompanying README file.
@@ -58,9 +57,6 @@ diff -u /dev/null jpeg-9d/jconfig.h
 + * in jconfig.h.  On many machines, jconfig.h can be generated automatically
 + * or copied from one of the "canned" jconfig files that we supply.  But if
 + * you need to generate a jconfig.h file by hand, this file tells you how.
-+ *
-+ * DO NOT EDIT THIS FILE --- IT WON'T ACCOMPLISH ANYTHING.
-+ * EDIT A COPY NAMED JCONFIG.H.
 + */
 +
 +
@@ -98,11 +94,11 @@ diff -u /dev/null jpeg-9d/jconfig.h
 +
 +/* Define this if your system has an ANSI-conforming <stddef.h> file.
 + */
-+#define HAVE_STDDEF_H
++#define HAVE_STDDEF_H 1
 +
 +/* Define this if your system has an ANSI-conforming <stdlib.h> file.
 + */
-+#define HAVE_STDLIB_H
++#define HAVE_STDLIB_H 1
 +
 +/* Define this if your system does not have an ANSI/SysV <string.h>,
 + * but does have a BSD-style <strings.h>.
@@ -153,7 +149,6 @@ diff -u /dev/null jpeg-9d/jconfig.h
 + */
 +#undef RIGHT_SHIFT_IS_UNSIGNED
 +
-+
 +#endif /* JPEG_INTERNALS */
 +
 +
diff --git a/external/jpeg-9d/jconfig.h b/external/jpeg-9d/jconfig.h
index 15a9817..2d3c68e 100644
--- a/external/jpeg-9d/jconfig.h
+++ b/external/jpeg-9d/jconfig.h
@@ -1,7 +1,6 @@
 /* android jconfig.h */
+
 /*
- * jconfig.doc
- *
  * Copyright (C) 1991-1994, Thomas G. Lane.
  * This file is part of the Independent JPEG Group's software.
  * For conditions of distribution and use, see the accompanying README file.
@@ -13,9 +12,6 @@
  * in jconfig.h.  On many machines, jconfig.h can be generated automatically
  * or copied from one of the "canned" jconfig files that we supply.  But if
  * you need to generate a jconfig.h file by hand, this file tells you how.
- *
- * DO NOT EDIT THIS FILE --- IT WON'T ACCOMPLISH ANYTHING.
- * EDIT A COPY NAMED JCONFIG.H.
  */
 
 
@@ -53,11 +49,11 @@
 
 /* Define this if your system has an ANSI-conforming <stddef.h> file.
  */
-#define HAVE_STDDEF_H
+#define HAVE_STDDEF_H 1
 
 /* Define this if your system has an ANSI-conforming <stdlib.h> file.
  */
-#define HAVE_STDLIB_H
+#define HAVE_STDLIB_H 1
 
 /* Define this if your system does not have an ANSI/SysV <string.h>,
  * but does have a BSD-style <strings.h>.
@@ -108,7 +104,6 @@
  */
 #undef RIGHT_SHIFT_IS_UNSIGNED
 
-
 #endif /* JPEG_INTERNALS */