@@ -390,7 +390,7 @@ PHP_MINIT_FUNCTION(gd)
390
390
REGISTER_LONG_CONSTANT ("IMG_AFFINE_SHEAR_HORIZONTAL" , GD_AFFINE_SHEAR_HORIZONTAL , CONST_CS | CONST_PERSISTENT );
391
391
REGISTER_LONG_CONSTANT ("IMG_AFFINE_SHEAR_VERTICAL" , GD_AFFINE_SHEAR_VERTICAL , CONST_CS | CONST_PERSISTENT );
392
392
393
- #if defined( HAVE_GD_BUNDLED )
393
+ #ifdef HAVE_GD_BUNDLED
394
394
REGISTER_LONG_CONSTANT ("GD_BUNDLED" , 1 , CONST_CS | CONST_PERSISTENT );
395
395
#else
396
396
REGISTER_LONG_CONSTANT ("GD_BUNDLED" , 0 , CONST_CS | CONST_PERSISTENT );
@@ -467,7 +467,7 @@ PHP_RSHUTDOWN_FUNCTION(gd)
467
467
}
468
468
/* }}} */
469
469
470
- #if defined( HAVE_GD_BUNDLED )
470
+ #ifdef HAVE_GD_BUNDLED
471
471
#define PHP_GD_VERSION_STRING "bundled (2.1.0 compatible)"
472
472
#else
473
473
# define PHP_GD_VERSION_STRING GD_VERSION_STRING
@@ -482,11 +482,11 @@ PHP_MINFO_FUNCTION(gd)
482
482
483
483
/* need to use a PHPAPI function here because it is external module in windows */
484
484
485
- #if defined( HAVE_GD_BUNDLED )
485
+ #ifdef HAVE_GD_BUNDLED
486
486
php_info_print_table_row (2 , "GD Version" , PHP_GD_VERSION_STRING );
487
487
#else
488
488
php_info_print_table_row (2 , "GD headers Version" , PHP_GD_VERSION_STRING );
489
- #if defined( HAVE_GD_LIBVERSION )
489
+ #ifdef HAVE_GD_LIBVERSION
490
490
php_info_print_table_row (2 , "GD library Version" , gdVersionString ());
491
491
#endif
492
492
#endif
@@ -516,22 +516,22 @@ PHP_MINFO_FUNCTION(gd)
516
516
#ifdef HAVE_GD_JPG
517
517
{
518
518
php_info_print_table_row (2 , "JPEG Support" , "enabled" );
519
- #if defined( HAVE_GD_BUNDLED )
519
+ #ifdef HAVE_GD_BUNDLED
520
520
php_info_print_table_row (2 , "libJPEG Version" , gdJpegGetVersionString ());
521
521
#endif
522
522
}
523
523
#endif
524
524
525
525
#ifdef HAVE_GD_PNG
526
526
php_info_print_table_row (2 , "PNG Support" , "enabled" );
527
- #if defined( HAVE_GD_BUNDLED )
527
+ #ifdef HAVE_GD_BUNDLED
528
528
php_info_print_table_row (2 , "libPNG Version" , gdPngGetVersionString ());
529
529
#endif
530
530
#endif
531
531
php_info_print_table_row (2 , "WBMP Support" , "enabled" );
532
- #if defined( HAVE_GD_XPM )
532
+ #ifdef HAVE_GD_XPM
533
533
php_info_print_table_row (2 , "XPM Support" , "enabled" );
534
- #if defined( HAVE_GD_BUNDLED )
534
+ #ifdef HAVE_GD_BUNDLED
535
535
{
536
536
char tmp [12 ];
537
537
snprintf (tmp , sizeof (tmp ), "%d" , XpmLibraryVersion ());
@@ -540,7 +540,7 @@ PHP_MINFO_FUNCTION(gd)
540
540
#endif
541
541
#endif
542
542
php_info_print_table_row (2 , "XBM Support" , "enabled" );
543
- #if defined( USE_GD_JISX0208 )
543
+ #ifdef USE_GD_JISX0208
544
544
php_info_print_table_row (2 , "JIS-mapped Japanese Font Support" , "enabled" );
545
545
#endif
546
546
#ifdef HAVE_GD_WEBP
@@ -588,7 +588,7 @@ PHP_FUNCTION(gd_info)
588
588
add_assoc_bool (return_value , "PNG Support" , 0 );
589
589
#endif
590
590
add_assoc_bool (return_value , "WBMP Support" , 1 );
591
- #if defined( HAVE_GD_XPM )
591
+ #ifdef HAVE_GD_XPM
592
592
add_assoc_bool (return_value , "XPM Support" , 1 );
593
593
#else
594
594
add_assoc_bool (return_value , "XPM Support" , 0 );
@@ -609,7 +609,7 @@ PHP_FUNCTION(gd_info)
609
609
#else
610
610
add_assoc_bool (return_value , "TGA Read Support" , 0 );
611
611
#endif
612
- #if defined( USE_GD_JISX0208 )
612
+ #ifdef USE_GD_JISX0208
613
613
add_assoc_bool (return_value , "JIS-mapped Japanese Font Support" , 1 );
614
614
#else
615
615
add_assoc_bool (return_value , "JIS-mapped Japanese Font Support" , 0 );
@@ -1399,7 +1399,7 @@ PHP_FUNCTION(imagetypes)
1399
1399
ret |= PHP_IMG_PNG ;
1400
1400
#endif
1401
1401
ret |= PHP_IMG_WBMP ;
1402
- #if defined( HAVE_GD_XPM )
1402
+ #ifdef HAVE_GD_XPM
1403
1403
ret |= PHP_IMG_XPM ;
1404
1404
#endif
1405
1405
#ifdef HAVE_GD_WEBP
@@ -1676,7 +1676,7 @@ static void _php_image_create_from(INTERNAL_FUNCTION_PARAMETERS, int image_type,
1676
1676
case PHP_GDIMG_TYPE_GD2PART :
1677
1677
im = (* func_p )(fp , srcx , srcy , width , height );
1678
1678
break ;
1679
- #if defined( HAVE_GD_XPM )
1679
+ #ifdef HAVE_GD_XPM
1680
1680
case PHP_GDIMG_TYPE_XPM :
1681
1681
im = gdImageCreateFromXpm (file );
1682
1682
break ;
@@ -1758,7 +1758,7 @@ PHP_FUNCTION(imagecreatefromxbm)
1758
1758
}
1759
1759
/* }}} */
1760
1760
1761
- #if defined( HAVE_GD_XPM )
1761
+ #ifdef HAVE_GD_XPM
1762
1762
/* {{{ proto resource imagecreatefromxpm(string filename)
1763
1763
Create a new image from XPM file or URL */
1764
1764
PHP_FUNCTION (imagecreatefromxpm )
@@ -1800,7 +1800,7 @@ PHP_FUNCTION(imagecreatefromgd2part)
1800
1800
}
1801
1801
/* }}} */
1802
1802
1803
- #if defined( HAVE_GD_BMP )
1803
+ #ifdef HAVE_GD_BMP
1804
1804
/* {{{ proto resource imagecreatefrombmp(string filename)
1805
1805
Create a new image from BMP file or URL */
1806
1806
PHP_FUNCTION (imagecreatefrombmp )
@@ -1810,7 +1810,7 @@ PHP_FUNCTION(imagecreatefrombmp)
1810
1810
/* }}} */
1811
1811
#endif
1812
1812
1813
- #if defined( HAVE_GD_TGA )
1813
+ #ifdef HAVE_GD_TGA
1814
1814
/* {{{ proto resource imagecreatefromtga(string filename)
1815
1815
Create a new image from TGA file or URL */
1816
1816
PHP_FUNCTION (imagecreatefromtga )
0 commit comments