Browse Source

several signature and data type fixes

pull/783/head
Anatol Belski 11 years ago
parent
commit
b63ab83256
  1. 2
      Zend/zend.h
  2. 4
      Zend/zend_alloc.c
  3. 8
      Zend/zend_exceptions.c
  4. 6
      Zend/zend_exceptions.h
  5. 2
      ext/com_dotnet/com_handlers.c
  6. 3
      ext/fileinfo/libmagic/file.h
  7. 2
      main/main.c
  8. 4
      main/streams/userspace.c
  9. 4
      win32/sendmail.c

2
Zend/zend.h

@ -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);

4
Zend/zend_alloc.c

@ -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;

8
Zend/zend_exceptions.c

@ -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);

6
Zend/zend_exceptions.h

@ -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);

2
ext/com_dotnet/com_handlers.c

@ -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;

3
ext/fileinfo/libmagic/file.h

@ -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 *, ...);

2
main/main.c

@ -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:

4
main/streams/userspace.c

@ -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;

4
win32/sendmail.c

@ -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);
/*********************************************************************

Loading…
Cancel
Save