Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ext/gd/config.w32
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if (PHP_GD != "no") {
CHECK_LIB("User32.lib", "gd", PHP_GD);
CHECK_LIB("Gdi32.lib", "gd", PHP_GD);

EXTENSION("gd", "gd.c", null, "-Iext/gd/libgd", "php_gd2.dll");
EXTENSION("gd", "gd.c", null, "-Iext/gd/libgd");
ADD_SOURCES("ext/gd/libgd", "gd2copypal.c gd.c \
gdcache.c gdfontg.c gdfontl.c gdfontmb.c gdfonts.c gdfontt.c \
gdft.c gd_gd2.c gd_gd.c gd_gif_in.c gd_gif_out.c gdhelpers.c gd_io.c gd_io_dp.c \
Expand All @@ -43,6 +43,7 @@ if (PHP_GD != "no") {
gd_crop.c gd_interpolation.c gd_matrix.c gd_bmp.c gd_tga.c", "gd");
AC_DEFINE('HAVE_LIBGD', 1, 'GD support');
ADD_FLAG("CFLAGS_GD", " \
/D PHP_GD_EXPORTS=1 \
/D HAVE_GD_DYNAMIC_CTX_EX=1 \
/D HAVE_GD_BUNDLED=1 \
/D HAVE_GD_GD2 \
Expand Down
2 changes: 1 addition & 1 deletion ext/gd/gd.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ static zend_always_inline php_gd_image_object* php_gd_exgdimage_from_zobj_p(zend
* Converts an extension GdImage instance contained within a zval into the gdImagePtr
* for use with library APIs
*/
static zend_always_inline gdImagePtr php_gd_libgdimageptr_from_zval_p(zval* zp)
PHP_GD_API gdImagePtr php_gd_libgdimageptr_from_zval_p(zval* zp)
{
return php_gd_exgdimage_from_zobj_p(Z_OBJ_P(zp))->image;
}
Expand Down
8 changes: 7 additions & 1 deletion ext/gd/php_gd.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@
#define PHP_IMG_TGA 128

#ifdef PHP_WIN32
# define PHP_GD_API __declspec(dllexport)
# ifdef PHP_GD_EXPORTS
# define PHP_GD_API __declspec(dllexport)
# else
# define PHP_GD_API __declspec(dllimport)
# endif
#elif defined(__GNUC__) && __GNUC__ >= 4
# define PHP_GD_API __attribute__ ((visibility("default")))
#else
Expand All @@ -77,6 +81,8 @@ PHP_MINIT_FUNCTION(gd);
PHP_MSHUTDOWN_FUNCTION(gd);
PHP_RSHUTDOWN_FUNCTION(gd);

PHP_GD_API struct gdImageStruct *php_gd_libgdimageptr_from_zval_p(zval* zp);

#else

#define phpext_gd_ptr NULL
Expand Down
2 changes: 1 addition & 1 deletion php.ini-development
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ default_socket_timeout = 60
;extension=ffi
;extension=ftp
;extension=fileinfo
;extension=gd2
;extension=gd
;extension=gettext
;extension=gmp
;extension=intl
Expand Down
2 changes: 1 addition & 1 deletion php.ini-production
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,7 @@ default_socket_timeout = 60
;extension=ffi
;extension=ftp
;extension=fileinfo
;extension=gd2
;extension=gd
;extension=gettext
;extension=gmp
;extension=intl
Expand Down
3 changes: 0 additions & 3 deletions win32/build/confutils.js
Original file line number Diff line number Diff line change
Expand Up @@ -2026,9 +2026,6 @@ function generate_tmp_php_ini()
var directive = (extensions_enabled[i][2] ? 'zend_extension' : 'extension');

var ext_name = extensions_enabled[i][0];
if ("gd" == ext_name) {
ext_name = "gd2";
}

if (!is_on_exclude_list_for_test_ini(ext_list, ext_name)) {
INI.WriteLine(directive + "=php_" + ext_name + ".dll");
Expand Down