Skip to content

Commit 460e0d4

Browse files
committed
ext/bcmath: Include specific headers instead of config.h
1 parent 83804a7 commit 460e0d4

File tree

7 files changed

+9
-7
lines changed

7 files changed

+9
-7
lines changed

ext/bcmath/libbcmath/src/add.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131

3232
#include "bcmath.h"
3333
#include "private.h"
34+
#include <string.h>
3435

3536

3637
/* Here is the full add routine that takes care of negative numbers.

ext/bcmath/libbcmath/src/bcmath.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,9 @@ typedef struct bc_struct {
5454
#endif
5555

5656
#include <stdbool.h>
57+
#include "zend_string.h"
5758
#include "php.h" /* Needed for safe_pemalloc() in init.c */
58-
#include "../../php_bcmath.h"
59+
#include "../../php_bcmath.h" /* Needed for BCG() macro */
5960

6061
/* The base used in storing the numbers in n_value above.
6162
Currently this MUST be 10. */

ext/bcmath/libbcmath/src/div.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@
2929
3030
*************************************************************************/
3131

32-
#include "config.h" /* For safe_emalloc() */
3332
#include "bcmath.h"
3433
#include "private.h"
3534
#include <stdbool.h>
35+
#include "zend_alloc.h"
3636

3737

3838
/* Some utility routines for the divide: First a one digit multiply.

ext/bcmath/libbcmath/src/init.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
3030
*************************************************************************/
3131

32-
#include "config.h"
33-
#include <stdbool.h>
3432
#include "bcmath.h"
33+
#include <stdbool.h>
34+
#include "zend_alloc.h"
3535

3636
/* new_num allocates a number and sets fields to known values. */
3737
bc_num _bc_new_num_ex(int length, int scale, bool persistent)

ext/bcmath/libbcmath/src/num2str.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
3030
*************************************************************************/
3131

32-
#include "config.h" /* For zend_string */
3332
#include "bcmath.h"
33+
#include "zend_string.h"
3434

3535
/* Convert a numbers to a string. Base 10 only.*/
3636
zend_string *bc_num2str_ex(bc_num num, int scale)

ext/bcmath/libbcmath/src/output.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
3030
*************************************************************************/
3131

32-
#include "config.h" /* For emalloc */
3332
#include "bcmath.h"
3433
#include <stdbool.h>
34+
#include "zend_alloc.h"
3535

3636

3737
/* The following routines provide output for bcd numbers package

ext/bcmath/libbcmath/src/recmul.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
#include "bcmath.h"
3333
#include <assert.h>
3434
#include <stdbool.h>
35-
#include "config.h" /* For emalloc() */
3635
#include "private.h" /* For _bc_rm_leading_zeros() */
36+
#include "zend_alloc.h"
3737

3838
/* Recursive vs non-recursive multiply crossover ranges. */
3939
#if defined(MULDIGITS)

0 commit comments

Comments
 (0)