Skip to content

Commit cc8ecca

Browse files
committed
Get rid of autoconf warnings
1 parent 438cc7f commit cc8ecca

File tree

11 files changed

+211
-145
lines changed

11 files changed

+211
-145
lines changed

TSRM/acconfig.h

Lines changed: 0 additions & 1 deletion
This file was deleted.

TSRM/build.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ $(makefile_in_files): $(makefile_am_files)
3333
aclocal.m4: configure.in acinclude.m4
3434
aclocal
3535

36-
$(config_h_in): configure.in acconfig.h
36+
$(config_h_in): configure.in
3737
# explicitly remove target since autoheader does not seem to work
3838
# correctly otherwise (timestamps are not updated)
3939
@rm -f $@

TSRM/configure.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ AC_INIT(TSRM.c)
77
AM_INIT_AUTOMAKE(TSRM, 1.0, nodefine)
88
AM_CONFIG_HEADER(tsrm_config.h)
99

10+
AH_TOP([
11+
#undef PTHREADS
12+
])
13+
1014
sinclude(tsrm.m4)
1115

1216
TSRM_BASIC_CHECKS

Zend/acconfig.h

Lines changed: 0 additions & 127 deletions
This file was deleted.

Zend/build.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ $(makefile_in_files): $(makefile_am_files)
3333
aclocal.m4: configure.in acinclude.m4
3434
aclocal
3535

36-
$(config_h_in): configure.in acconfig.h
36+
$(config_h_in): configure.in
3737
# explicitly remove target since autoheader does not seem to work
3838
# correctly otherwise (timestamps are not updated)
3939
@rm -f $@

Zend/configure.in

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,105 @@ AM_PROG_CC_STDC
1111
ZEND_VERSION=$VERSION
1212
AC_ZEND_C_BIGENDIAN
1313

14+
AH_TOP([
15+
#if defined(__GNUC__) && __GNUC__ >= 4
16+
# define ZEND_API __attribute__ ((visibility("default")))
17+
# define ZEND_DLEXPORT __attribute__ ((visibility("default")))
18+
#else
19+
# define ZEND_API
20+
# define ZEND_DLEXPORT
21+
#endif
22+
23+
#define ZEND_DLIMPORT
24+
25+
#undef uint
26+
#undef ulong
27+
28+
/* Define if you want to enable memory limit support */
29+
#define MEMORY_LIMIT 0
30+
])
31+
32+
AH_BOTTOM([
33+
#ifndef ZEND_ACCONFIG_H_NO_C_PROTOS
34+
35+
#ifdef HAVE_STDLIB_H
36+
# include <stdlib.h>
37+
#endif
38+
39+
#ifdef HAVE_SYS_TYPES_H
40+
# include <sys/types.h>
41+
#endif
42+
43+
#ifdef HAVE_SYS_SELECT_H
44+
#include <sys/select.h>
45+
#endif
46+
47+
#ifdef HAVE_IEEEFP_H
48+
# include <ieeefp.h>
49+
#endif
50+
51+
#ifdef HAVE_STRING_H
52+
# include <string.h>
53+
#else
54+
# include <strings.h>
55+
#endif
56+
57+
#if ZEND_BROKEN_SPRINTF
58+
int zend_sprintf(char *buffer, const char *format, ...);
59+
#else
60+
# define zend_sprintf sprintf
61+
#endif
62+
63+
#include <math.h>
64+
65+
/* To enable the is_nan, is_infinite and is_finite PHP functions */
66+
#ifdef NETWARE
67+
#define HAVE_ISNAN 1
68+
#define HAVE_ISINF 1
69+
#define HAVE_ISFINITE 1
70+
#endif
71+
72+
#ifndef zend_isnan
73+
#ifdef HAVE_ISNAN
74+
#define zend_isnan(a) isnan(a)
75+
#elif defined(HAVE_FPCLASS)
76+
#define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN))
77+
#else
78+
#define zend_isnan(a) 0
79+
#endif
80+
#endif
81+
82+
#ifdef HAVE_ISINF
83+
#define zend_isinf(a) isinf(a)
84+
#elif defined(INFINITY)
85+
/* Might not work, but is required by ISO C99 */
86+
#define zend_isinf(a) (((a)==INFINITY)?1:0)
87+
#elif defined(HAVE_FPCLASS)
88+
#define zend_isinf(a) ((fpclass(a) == FP_PINF) || (fpclass(a) == FP_NINF))
89+
#else
90+
#define zend_isinf(a) 0
91+
#endif
92+
93+
#ifdef HAVE_FINITE
94+
#define zend_finite(a) finite(a)
95+
#elif defined(HAVE_ISFINITE) || defined(isfinite)
96+
#define zend_finite(a) isfinite(a)
97+
#elif defined(fpclassify)
98+
#define zend_finite(a) ((fpclassify((a))!=FP_INFINITE&&fpclassify((a))!=FP_NAN)?1:0)
99+
#else
100+
#define zend_finite(a) (zend_isnan(a) ? 0 : zend_isinf(a) ? 0 : 1)
101+
#endif
102+
103+
#endif /* ifndef ZEND_ACCONFIG_H_NO_C_PROTOS */
104+
105+
#ifdef NETWARE
106+
#ifdef USE_WINSOCK
107+
#/*This detection against winsock is of no use*/ undef HAVE_SOCKLEN_T
108+
#/*This detection against winsock is of no use*/ undef HAVE_SYS_SOCKET_H
109+
#endif
110+
#endif
111+
])
112+
14113
dnl We want this one before the checks, so the checks can modify CFLAGS.
15114
test -z "$CFLAGS" && auto_cflags=1
16115

acconfig.h.in

Lines changed: 0 additions & 1 deletion
This file was deleted.

build/build.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ all: $(STAMP) $(ALWAYS)
3232

3333
generated_lists:
3434
@echo makefile_am_files = Zend/Makefile.am TSRM/Makefile.am > $@
35-
@echo config_h_files = Zend/acconfig.h TSRM/acconfig.h >> $@
3635
@echo config_m4_files = Zend/Zend.m4 TSRM/tsrm.m4 TSRM/threads.m4 \
3736
Zend/acinclude.m4 ext/*/config*.m4 sapi/*/config.m4 >> $@
3837

build/build2.mk

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ LT_TARGETS = ltmain.sh config.guess config.sub
2525

2626
config_h_in = main/php_config.h.in
2727

28-
acconfig_h_SOURCES = acconfig.h.in $(config_h_files)
29-
3028
targets = $(TOUCH_FILES) configure $(config_h_in)
3129

3230
PHP_AUTOCONF ?= 'autoconf'
@@ -36,11 +34,7 @@ SUPPRESS_WARNINGS ?= 2>&1 | (egrep -v '(AC_TRY_RUN called without default to all
3634

3735
all: $(targets)
3836

39-
acconfig.h: $(acconfig_h_SOURCES)
40-
@echo rebuilding $@
41-
cat $(acconfig_h_SOURCES) > $@
42-
43-
$(config_h_in): configure acconfig.h
37+
$(config_h_in): configure
4438
# explicitly remove target since autoheader does not seem to work
4539
# correctly otherwise (timestamps are not updated)
4640
@echo rebuilding $@

0 commit comments

Comments
 (0)