]> granicus.if.org Git - php/commitdiff
several signature and data type fixes
authorAnatol Belski <ab@php.net>
Tue, 26 Aug 2014 11:20:21 +0000 (13:20 +0200)
committerAnatol Belski <ab@php.net>
Tue, 26 Aug 2014 11:20:21 +0000 (13:20 +0200)
Zend/zend.h
Zend/zend_alloc.c
Zend/zend_exceptions.c
Zend/zend_exceptions.h
ext/com_dotnet/com_handlers.c
ext/fileinfo/libmagic/file.h
main/main.c
main/streams/userspace.c
win32/sendmail.c

index c667b6c45a88ea4a14e9646ccebbc77b116364ab..42a59b7bd50f45eb5ffc7e159da015aee2d7434e 100644 (file)
@@ -537,7 +537,7 @@ typedef struct _zend_utility_functions {
        size_t (*printf_function)(const char *format, ...) ZEND_ATTRIBUTE_PTR_FORMAT(printf, 1, 2);
        size_t (*write_function)(const char *str, size_t str_length);
        FILE *(*fopen_function)(const char *filename, char **opened_path TSRMLS_DC);
-       void (*message_handler)(long message, const void *data TSRMLS_DC);
+       void (*message_handler)(zend_long message, const void *data TSRMLS_DC);
        void (*block_interruptions)(void);
        void (*unblock_interruptions)(void);
        int (*get_configuration_directive)(const char *name, uint name_length, zval *contents);
index cace802579bb383e7f1b9f6c7e321a86a603dfd3..b3430c4f5d9c9cb4746527187b6c6fbd2ec34a00 100644 (file)
@@ -670,7 +670,7 @@ static inline unsigned int zend_mm_high_bit(size_t _size)
        __asm__("bsrl %1,%0\n\t" : "=r" (n) : "rm"  (_size) : "cc");
        return n;
 #elif defined(__GNUC__) && defined(__x86_64__)
-       unsigned long n;
+       zend_ulong n;
 
         __asm__("bsr %1,%0\n\t" : "=r" (n) : "rm"  (_size) : "cc");
         return (unsigned int)n;
@@ -698,7 +698,7 @@ static inline unsigned int zend_mm_low_bit(size_t _size)
        __asm__("bsfl %1,%0\n\t" : "=r" (n) : "rm"  (_size) : "cc");
        return n;
 #elif defined(__GNUC__) && defined(__x86_64__)
-        unsigned long n;
+        zend_ulong n;
 
         __asm__("bsf %1,%0\n\t" : "=r" (n) : "rm"  (_size) : "cc");
         return (unsigned int)n;
index d8e183edf5a14c9505301b0fadaa6611bfaa1884..c246b18726da4caa6ce1a2cc7ab1dcb4e6eb9f24 100644 (file)
@@ -513,7 +513,7 @@ static void _build_trace_string(zval *frame, zend_ulong index, zend_string **str
 {
        char *s_tmp;
        int len;
-       long line;
+       zend_long line;
        HashTable *ht;
        zval *file, *tmp;
        zend_string *str = *str_ptr;
@@ -800,7 +800,7 @@ ZEND_API zend_class_entry *zend_get_error_exception(TSRMLS_D) /* {{{ */
 }
 /* }}} */
 
-ZEND_API zend_object *zend_throw_exception(zend_class_entry *exception_ce, const char *message, long code TSRMLS_DC) /* {{{ */
+ZEND_API zend_object *zend_throw_exception(zend_class_entry *exception_ce, const char *message, zend_long code TSRMLS_DC) /* {{{ */
 {
        zval ex;
 
@@ -827,7 +827,7 @@ ZEND_API zend_object *zend_throw_exception(zend_class_entry *exception_ce, const
 }
 /* }}} */
 
-ZEND_API zend_object *zend_throw_exception_ex(zend_class_entry *exception_ce, long code TSRMLS_DC, const char *format, ...) /* {{{ */
+ZEND_API zend_object *zend_throw_exception_ex(zend_class_entry *exception_ce, zend_long code TSRMLS_DC, const char *format, ...) /* {{{ */
 {
        va_list arg;
        char *message;
@@ -842,7 +842,7 @@ ZEND_API zend_object *zend_throw_exception_ex(zend_class_entry *exception_ce, lo
 }
 /* }}} */
 
-ZEND_API zend_object *zend_throw_error_exception(zend_class_entry *exception_ce, const char *message, long code, int severity TSRMLS_DC) /* {{{ */
+ZEND_API zend_object *zend_throw_error_exception(zend_class_entry *exception_ce, const char *message, zend_long code, int severity TSRMLS_DC) /* {{{ */
 {
        zval ex;
        zend_object *obj = zend_throw_exception(exception_ce, message, code TSRMLS_CC);
index a7997867517d15b5dd6c1861a3e7649917a2aa1a..0c13b66281d30243acae3ca310c33570c8f85962 100644 (file)
@@ -40,12 +40,12 @@ ZEND_API void zend_register_default_classes(TSRMLS_D);
 
 /* exception_ce   NULL or zend_exception_get_default() or a derived class
  * message        NULL or the message of the exception */
-ZEND_API zend_object *zend_throw_exception(zend_class_entry *exception_ce, const char *message, long code TSRMLS_DC);
-ZEND_API zend_object *zend_throw_exception_ex(zend_class_entry *exception_ce, long code TSRMLS_DC, const char *format, ...);
+ZEND_API zend_object *zend_throw_exception(zend_class_entry *exception_ce, const char *message, zend_long code TSRMLS_DC);
+ZEND_API zend_object *zend_throw_exception_ex(zend_class_entry *exception_ce, zend_long code TSRMLS_DC, const char *format, ...);
 ZEND_API void zend_throw_exception_object(zval *exception TSRMLS_DC);
 ZEND_API void zend_clear_exception(TSRMLS_D);
 
-ZEND_API zend_object *zend_throw_error_exception(zend_class_entry *exception_ce, const char *message, long code, int severity TSRMLS_DC);
+ZEND_API zend_object *zend_throw_error_exception(zend_class_entry *exception_ce, const char *message, zend_long code, int severity TSRMLS_DC);
 
 extern ZEND_API void (*zend_throw_exception_hook)(zval *ex TSRMLS_DC);
 
index b67fb1e713b7666031d939ad97200cf3b417a8a5..3dec63072180093f59461ac493b6bcf5c2c0c343 100644 (file)
@@ -525,7 +525,7 @@ static int com_object_cast(zval *readobj, zval *writeobj, int type TSRMLS_DC)
        return zend_std_cast_object_tostring(readobj, writeobj, type TSRMLS_CC);
 }
 
-static int com_object_count(zval *object, long *count TSRMLS_DC)
+static int com_object_count(zval *object, zend_long *count TSRMLS_DC)
 {
        php_com_dotnet_object *obj;
        LONG ubound = 0, lbound = 0;
index 9a61d2ce49c9177df58caf6e120f3a93e6e15ab0..0a5c19c54c7c2808253c4615a47950433816e20b 100644 (file)
@@ -407,7 +407,6 @@ struct magic_set {
 /* Type for Unicode characters */
 typedef unsigned long unichar;
 
-struct stat;
 #define FILE_T_LOCAL   1
 #define FILE_T_WINDOWS 2
 protected const char *file_fmttime(uint64_t, int, char *);
@@ -415,7 +414,7 @@ protected struct magic_set *file_ms_alloc(int);
 protected void file_ms_free(struct magic_set *);
 protected int file_buffer(struct magic_set *, php_stream *, const char *, const void *,
     size_t);
-protected int file_fsmagic(struct magic_set *, const char *, struct stat *, php_stream *);
+protected int file_fsmagic(struct magic_set *, const char *, zend_stat_t *, php_stream *);
 protected int file_pipe2file(struct magic_set *, int, const void *, size_t);
 protected int file_replace(struct magic_set *, const char *, const char *);
 protected int file_printf(struct magic_set *, const char *, ...);
index 9b5c41079cb9ada7f8e139473557b56f6828cfb0..9338fee8d2491aa31852a21b8afb81c86b0e011b 100644 (file)
@@ -1454,7 +1454,7 @@ static int php_get_configuration_directive_for_zend(const char *name, uint name_
 
 /* {{{ php_message_handler_for_zend
  */
-static void php_message_handler_for_zend(long message, const void *data TSRMLS_DC)
+static void php_message_handler_for_zend(zend_long message, const void *data TSRMLS_DC)
 {
        switch (message) {
                case ZMSG_FAILED_INCLUDE_FOPEN:
index aac7769eb82970f1d3ea16159d580beb03565f83..61c28c4cea3358eb2b19c146f95ee836ca8fff8b 100644 (file)
@@ -751,7 +751,7 @@ static int php_userstreamop_flush(php_stream *stream TSRMLS_DC)
        return call_result;
 }
 
-static int php_userstreamop_seek(php_stream *stream, off_t offset, int whence, off_t *newoffs TSRMLS_DC)
+static int php_userstreamop_seek(php_stream *stream, zend_off_t offset, int whence, zend_off_t *newoffs TSRMLS_DC)
 {
        zval func_name;
        zval retval;
@@ -1454,7 +1454,7 @@ static int php_userstreamop_closedir(php_stream *stream, int close_handle TSRMLS
        return 0;
 }
 
-static int php_userstreamop_rewinddir(php_stream *stream, off_t offset, int whence, off_t *newoffs TSRMLS_DC)
+static int php_userstreamop_rewinddir(php_stream *stream, zend_off_t offset, int whence, zend_off_t *newoffs TSRMLS_DC)
 {
        zval func_name;
        zval retval;
index 3d61d8b6b473f360ea3be1b15a8be26adbebe61e..5fe33331cd0e8265fdb081d793372a1ae099b924 100644 (file)
@@ -360,8 +360,8 @@ PHPAPI char *GetSMErrorText(int index)
        }
 }
 
-PHPAPI zend_string *php_str_to_str(char *haystack, int length, char *needle,
-               int needle_len, char *str, int str_len);
+PHPAPI zend_string *php_str_to_str(char *haystack, size_t length, char *needle,
+               size_t needle_len, char *str, size_t str_len);
        
 
 /*********************************************************************