Skip to content

Commit 79d9d63

Browse files
committed
Sync build system #if/ifdef/defined
These are either undefined or defined to value 1: - HAVE_CRYPT - HAVE_CRYPT_H - HAVE_UNISTD_H Follow up of phpGH-5526 (-Wundef)
1 parent 37f683a commit 79d9d63

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

ext/standard/config.m4

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -68,19 +68,19 @@ if test "$PHP_EXTERNAL_LIBCRYPT" != "no"; then
6868

6969
AC_CACHE_CHECK(for standard DES crypt, ac_cv_crypt_des,[
7070
AC_RUN_IFELSE([AC_LANG_SOURCE([[
71-
#if HAVE_UNISTD_H
71+
#ifdef HAVE_UNISTD_H
7272
#include <unistd.h>
7373
#endif
7474
75-
#if HAVE_CRYPT_H
75+
#ifdef HAVE_CRYPT_H
7676
#include <crypt.h>
7777
#endif
7878
7979
#include <stdlib.h>
8080
#include <string.h>
8181
8282
int main(void) {
83-
#if HAVE_CRYPT
83+
#ifdef HAVE_CRYPT
8484
char *encrypted = crypt("rasmuslerdorf","rl");
8585
return !encrypted || strcmp(encrypted,"rl.3StKT.4T8M");
8686
#else
@@ -96,19 +96,19 @@ int main(void) {
9696

9797
AC_CACHE_CHECK(for extended DES crypt, ac_cv_crypt_ext_des,[
9898
AC_RUN_IFELSE([AC_LANG_SOURCE([[
99-
#if HAVE_UNISTD_H
99+
#ifdef HAVE_UNISTD_H
100100
#include <unistd.h>
101101
#endif
102102
103-
#if HAVE_CRYPT_H
103+
#ifdef HAVE_CRYPT_H
104104
#include <crypt.h>
105105
#endif
106106
107107
#include <stdlib.h>
108108
#include <string.h>
109109
110110
int main(void) {
111-
#if HAVE_CRYPT
111+
#ifdef HAVE_CRYPT
112112
char *encrypted = crypt("rasmuslerdorf","_J9..rasm");
113113
return !encrypted || strcmp(encrypted,"_J9..rasmBYk8r9AiWNc");
114114
#else
@@ -124,19 +124,19 @@ int main(void) {
124124

125125
AC_CACHE_CHECK(for MD5 crypt, ac_cv_crypt_md5,[
126126
AC_RUN_IFELSE([AC_LANG_SOURCE([[
127-
#if HAVE_UNISTD_H
127+
#ifdef HAVE_UNISTD_H
128128
#include <unistd.h>
129129
#endif
130130
131-
#if HAVE_CRYPT_H
131+
#ifdef HAVE_CRYPT_H
132132
#include <crypt.h>
133133
#endif
134134
135135
#include <stdlib.h>
136136
#include <string.h>
137137
138138
int main(void) {
139-
#if HAVE_CRYPT
139+
#ifdef HAVE_CRYPT
140140
char salt[15], answer[40];
141141
char *encrypted;
142142
@@ -162,19 +162,19 @@ int main(void) {
162162

163163
AC_CACHE_CHECK(for Blowfish crypt, ac_cv_crypt_blowfish,[
164164
AC_RUN_IFELSE([AC_LANG_SOURCE([[
165-
#if HAVE_UNISTD_H
165+
#ifdef HAVE_UNISTD_H
166166
#include <unistd.h>
167167
#endif
168168
169-
#if HAVE_CRYPT_H
169+
#ifdef HAVE_CRYPT_H
170170
#include <crypt.h>
171171
#endif
172172
173173
#include <stdlib.h>
174174
#include <string.h>
175175
176176
int main(void) {
177-
#if HAVE_CRYPT
177+
#ifdef HAVE_CRYPT
178178
char salt[30], answer[70];
179179
char *encrypted;
180180
@@ -197,19 +197,19 @@ int main(void) {
197197

198198
AC_CACHE_CHECK(for SHA512 crypt, ac_cv_crypt_sha512,[
199199
AC_RUN_IFELSE([AC_LANG_SOURCE([[
200-
#if HAVE_UNISTD_H
200+
#ifdef HAVE_UNISTD_H
201201
#include <unistd.h>
202202
#endif
203203
204-
#if HAVE_CRYPT_H
204+
#ifdef HAVE_CRYPT_H
205205
#include <crypt.h>
206206
#endif
207207
208208
#include <stdlib.h>
209209
#include <string.h>
210210
211211
int main(void) {
212-
#if HAVE_CRYPT
212+
#ifdef HAVE_CRYPT
213213
char salt[21], answer[21+86];
214214
char *encrypted;
215215
@@ -231,19 +231,19 @@ int main(void) {
231231

232232
AC_CACHE_CHECK(for SHA256 crypt, ac_cv_crypt_sha256,[
233233
AC_RUN_IFELSE([AC_LANG_SOURCE([[
234-
#if HAVE_UNISTD_H
234+
#ifdef HAVE_UNISTD_H
235235
#include <unistd.h>
236236
#endif
237237
238-
#if HAVE_CRYPT_H
238+
#ifdef HAVE_CRYPT_H
239239
#include <crypt.h>
240240
#endif
241241
242242
#include <stdlib.h>
243243
#include <string.h>
244244
245245
int main(void) {
246-
#if HAVE_CRYPT
246+
#ifdef HAVE_CRYPT
247247
char salt[21], answer[21+43];
248248
char *encrypted;
249249

0 commit comments

Comments
 (0)