Skip to content

Commit a4d1036

Browse files
committed
Drop strict prototype for GD unconditionally
1 parent a1191d1 commit a4d1036

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

ext/gd/config.m4

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,8 @@ dnl
138138
if test "$PHP_GD" != "no"; then
139139

140140
if test "$PHP_EXTERNAL_GD" = "no"; then
141-
GD_CFLAGS=""
141+
dnl Disable strict prototypes as GD takes advantages of variadic function signatures for function pointers.
142+
GD_CFLAGS="-Wno-strict-prototypes"
142143
extra_sources="libgd/gd.c libgd/gd_gd.c libgd/gd_gd2.c libgd/gd_io.c libgd/gd_io_dp.c \
143144
libgd/gd_io_file.c libgd/gd_ss.c libgd/gd_io_ss.c libgd/gd_webp.c \
144145
libgd/gd_png.c libgd/gd_jpeg.c libgd/gdxpm.c libgd/gdfontt.c libgd/gdfonts.c \
@@ -149,9 +150,6 @@ if test "$PHP_GD" != "no"; then
149150
libgd/gd_transform.c libgd/gd_crop.c libgd/gd_interpolation.c libgd/gd_matrix.c \
150151
libgd/gd_bmp.c libgd/gd_tga.c"
151152

152-
dnl Disable strict prototypes as GD takes advantages of variadic function signatures for function pointers.
153-
AX_CHECK_COMPILE_FLAG([-Wno-strict-prototypes], GC_CFLAGS="$GD_CFLAGS -Wno-strict-prototypes", , [-Werror])
154-
155153
dnl check for fabsf and floorf which are available since C99
156154
AC_CHECK_FUNCS(fabsf floorf)
157155

0 commit comments

Comments
 (0)