Skip to content

Commit 173174d

Browse files
committed
Fix [-Wundef] warning in PHAR extension
1 parent 4ce6491 commit 173174d

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

ext/phar/phar_object.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1274,7 +1274,7 @@ PHP_METHOD(Phar, getSupportedSignatures)
12741274
add_next_index_stringl(return_value, "SHA-1", 5);
12751275
add_next_index_stringl(return_value, "SHA-256", 7);
12761276
add_next_index_stringl(return_value, "SHA-512", 7);
1277-
#if PHAR_HAVE_OPENSSL
1277+
#ifdef PHAR_HAVE_OPENSSL
12781278
add_next_index_stringl(return_value, "OpenSSL", 7);
12791279
#else
12801280
if (zend_hash_str_exists(&module_registry, "openssl", sizeof("openssl")-1)) {

ext/phar/stream.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ php_url* phar_parse_url(php_stream_wrapper *wrapper, const char *filename, const
9090
resource->path = zend_string_init(entry, entry_len, 0);
9191
efree(entry);
9292

93-
#if MBO_0
93+
#ifdef MBO_0
9494
if (resource) {
9595
fprintf(stderr, "Alias: %s\n", alias);
9696
fprintf(stderr, "Scheme: %s\n", ZSTR_VAL(resource->scheme));
@@ -299,7 +299,7 @@ static php_stream * phar_wrapper_open_url(php_stream_wrapper *wrapper, const cha
299299
}
300300
}
301301
php_url_free(resource);
302-
#if MBO_0
302+
#ifdef MBO_0
303303
fprintf(stderr, "Pharname: %s\n", idata->phar->filename);
304304
fprintf(stderr, "Filename: %s\n", internal_file);
305305
fprintf(stderr, "Entry: %s\n", idata->internal_file->filename);

ext/phar/tar.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ static int phar_tar_process_metadata(phar_entry_info *entry, php_stream *fp) /*
203203
}
204204
/* }}} */
205205

206-
#if !HAVE_STRNLEN
206+
#ifndef HAVE_STRNLEN
207207
static size_t strnlen(const char *s, size_t maxlen) {
208208
char *r = (char *)memchr(s, '\0', maxlen);
209209
return r ? r-s : maxlen;

0 commit comments

Comments
 (0)