-
Notifications
You must be signed in to change notification settings - Fork 7.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
don't rely on libgd unused constants #7490
Conversation
ext/gd/gd.c
Outdated
#define GD_FLIP_VERTICAL 2 | ||
#endif | ||
#ifndef GD_FLIP_BOTH | ||
#define GD_FLIP_BOTH 3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make these PHP_GD_FLIP_HORIZONTAL etc and not use the GD constants at all.
looks good to me with Nikita's suggestion. Thanks Remi!
…On Mon, Sep 13, 2021, 7:34 PM Nikita Popov ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In ext/gd/gd.c
<#7490 (comment)>:
> @@ -88,9 +88,15 @@
#define M_PI 3.14159265358979323846
#endif
-/* workaround typo in system libgd 2.3.0 */
-#if defined(GD_FLIP_HORINZONTAL) && !defined(GD_FLIP_HORIZONTAL)
-#define GD_FLIP_HORIZONTAL GD_FLIP_HORINZONTAL
+/* not used in libgd, so going to be removed */
+#ifndef GD_FLIP_HORIZONTAL
+#define GD_FLIP_HORIZONTAL 1
+#endif
+#ifndef GD_FLIP_VERTICAL
+#define GD_FLIP_VERTICAL 2
+#endif
+#ifndef GD_FLIP_BOTH
+#define GD_FLIP_BOTH 3
Let's make these PHP_GD_FLIP_HORIZONTAL etc and not use the GD constants
at all.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7490 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACE6KANUESJ5NF32YZDKGTUBXVWTANCNFSM5D5WQK2Q>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Thanks Squashed and merged in 8.1+ in b364644 |
Is this fix going to be backported to 7.x? I can't compile PHP 7.4 anymore |
@zack6849, I think that should be fixed upstream, and a new release done, i.e. gd 2.3.4. This commit is just to cater to the future. |
As these are to be removed from libgd (already missing in 2.3.3)
See discussion on libgd/libgd@bdc281e
ping @pierrejoye @cmb69