diff options
Diffstat (limited to 'ext/phar/tar.c')
-rw-r--r-- | ext/phar/tar.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/ext/phar/tar.c b/ext/phar/tar.c index aeb5c7ef1e..e40739726b 100644 --- a/ext/phar/tar.c +++ b/ext/phar/tar.c @@ -19,9 +19,9 @@ #include "phar_internal.h" -static php_uint32 phar_tar_number(char *buf, int len) /* {{{ */ +static uint32_t phar_tar_number(char *buf, int len) /* {{{ */ { - php_uint32 num = 0; + uint32_t num = 0; int i = 0; while (i < len && buf[i] == ' ') { @@ -62,7 +62,7 @@ static php_uint32 phar_tar_number(char *buf, int len) /* {{{ */ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -static int phar_tar_octal(char *buf, php_uint32 val, int len) /* {{{ */ +static int phar_tar_octal(char *buf, uint32_t val, int len) /* {{{ */ { char *p = buf; int s = len; @@ -84,9 +84,9 @@ static int phar_tar_octal(char *buf, php_uint32 val, int len) /* {{{ */ } /* }}} */ -static php_uint32 phar_tar_checksum(char *buf, int len) /* {{{ */ +static uint32_t phar_tar_checksum(char *buf, int len) /* {{{ */ { - php_uint32 sum = 0; + uint32_t sum = 0; char *end = buf + len; while (buf != end) { @@ -100,8 +100,8 @@ static php_uint32 phar_tar_checksum(char *buf, int len) /* {{{ */ int phar_is_tar(char *buf, char *fname) /* {{{ */ { tar_header *header = (tar_header *) buf; - php_uint32 checksum = phar_tar_number(header->checksum, sizeof(header->checksum)); - php_uint32 ret; + uint32_t checksum = phar_tar_number(header->checksum, sizeof(header->checksum)); + uint32_t ret; char save[sizeof(header->checksum)], *bname; /* assume that the first filename in a tar won't begin with <?php */ @@ -202,13 +202,13 @@ static size_t strnlen(const char *s, size_t maxlen) { } #endif -int phar_parse_tarfile(php_stream* fp, char *fname, int fname_len, char *alias, int alias_len, phar_archive_data** pphar, int is_data, php_uint32 compression, char **error) /* {{{ */ +int phar_parse_tarfile(php_stream* fp, char *fname, int fname_len, char *alias, int alias_len, phar_archive_data** pphar, int is_data, uint32_t compression, char **error) /* {{{ */ { char buf[512], *actual_alias = NULL, *p; phar_entry_info entry = {0}; size_t pos = 0, read, totalsize; tar_header *hdr; - php_uint32 sum1, sum2, size, old; + uint32_t sum1, sum2, size, old; phar_archive_data *myphar, *actual; int last_was_longlink = 0; int linkname_len; @@ -299,7 +299,7 @@ bail: | ((((unsigned char*)(buffer))[1]) << 8) \ | (((unsigned char*)(buffer))[0])) #else -# define PHAR_GET_32(buffer) (php_uint32) *(buffer) +# define PHAR_GET_32(buffer) (uint32_t) *(buffer) #endif myphar->sig_flags = PHAR_GET_32(buf); if (FAILURE == phar_verify_signature(fp, php_stream_tell(fp) - size - 512, myphar->sig_flags, buf + 8, size - 8, fname, &myphar->signature, &myphar->sig_len, error)) { @@ -1230,12 +1230,12 @@ nostub: } #ifdef WORDS_BIGENDIAN # define PHAR_SET_32(var, buffer) \ - *(php_uint32 *)(var) = (((((unsigned char*)&(buffer))[3]) << 24) \ + *(uint32_t *)(var) = (((((unsigned char*)&(buffer))[3]) << 24) \ | ((((unsigned char*)&(buffer))[2]) << 16) \ | ((((unsigned char*)&(buffer))[1]) << 8) \ | (((unsigned char*)&(buffer))[0])) #else -# define PHAR_SET_32(var, buffer) *(php_uint32 *)(var) = (php_uint32) (buffer) +# define PHAR_SET_32(var, buffer) *(uint32_t *)(var) = (uint32_t) (buffer) #endif PHAR_SET_32(sigbuf, phar->sig_flags); PHAR_SET_32(sigbuf + 4, signature_length); |