summaryrefslogtreecommitdiff
path: root/ext/phar/zip.c
diff options
context:
space:
mode:
authorRouven Weßling <rouven@contentful.com>2016-01-29 11:02:46 +0100
committerNikita Popov <nikic@php.net>2016-02-04 11:57:41 +0100
commite93c28053d7d31853f59dc5adf0bfaff52819fb2 (patch)
treebac16becb31d6c8527f46a26be73def3519398a4 /ext/phar/zip.c
parenta61029b15554d1a5da81a6e6d498f02629bf4242 (diff)
downloadphp-git-e93c28053d7d31853f59dc5adf0bfaff52819fb2.tar.gz
Replace usage of php_uint16 with uint16_t
Diffstat (limited to 'ext/phar/zip.c')
-rw-r--r--ext/phar/zip.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/phar/zip.c b/ext/phar/zip.c
index 688ca88a45..4994dd0e04 100644
--- a/ext/phar/zip.c
+++ b/ext/phar/zip.c
@@ -18,8 +18,8 @@
#include "phar_internal.h"
-#define PHAR_GET_16(var) ((php_uint16)((((php_uint16)var[0]) & 0xff) | \
- (((php_uint16)var[1]) & 0xff) << 8))
+#define PHAR_GET_16(var) ((uint16_t)((((uint16_t)var[0]) & 0xff) | \
+ (((uint16_t)var[1]) & 0xff) << 8))
#define PHAR_GET_32(var) ((uint32_t)((((uint32_t)var[0]) & 0xff) | \
(((uint32_t)var[1]) & 0xff) << 8 | \
(((uint32_t)var[2]) & 0xff) << 16 | \
@@ -37,9 +37,9 @@ static inline void phar_write_16(char buffer[2], uint32_t value)
buffer[0] = (unsigned char) (value & 0xff);
}
# define PHAR_SET_32(var, value) phar_write_32(var, (uint32_t) (value));
-# define PHAR_SET_16(var, value) phar_write_16(var, (php_uint16) (value));
+# define PHAR_SET_16(var, value) phar_write_16(var, (uint16_t) (value));
-static int phar_zip_process_extra(php_stream *fp, phar_entry_info *entry, php_uint16 len) /* {{{ */
+static int phar_zip_process_extra(php_stream *fp, phar_entry_info *entry, uint16_t len) /* {{{ */
{
union {
phar_zip_extra_field_header header;
@@ -143,7 +143,7 @@ static time_t phar_zip_d2u_time(char *cdtime, char *cddate) /* {{{ */
static void phar_zip_u2d_time(time_t time, char *dtime, char *ddate) /* {{{ */
{
- php_uint16 ctime, cdate;
+ uint16_t ctime, cdate;
struct tm *tm, tmbuf;
tm = php_localtime_r(&time, &tmbuf);
@@ -168,7 +168,7 @@ int phar_parse_zipfile(php_stream *fp, char *fname, int fname_len, char *alias,
phar_zip_dir_end locator;
char buf[sizeof(locator) + 65536];
zend_long size;
- php_uint16 i;
+ uint16_t i;
phar_archive_data *mydata = NULL;
phar_entry_info entry = {0};
char *p = buf, *ext, *actual_alias = NULL;