Diff for /embedaddon/php/main/streams/cast.c between versions 1.1.1.1 and 1.1.1.3

version 1.1.1.1, 2012/02/21 23:48:05 version 1.1.1.3, 2013/07/22 01:32:11
Line 2 Line 2
    +----------------------------------------------------------------------+     +----------------------------------------------------------------------+
    | PHP Version 5                                                        |     | PHP Version 5                                                        |
    +----------------------------------------------------------------------+     +----------------------------------------------------------------------+
   | Copyright (c) 1997-2012 The PHP Group                                |   | Copyright (c) 1997-2013 The PHP Group                                |
    +----------------------------------------------------------------------+     +----------------------------------------------------------------------+
    | This source file is subject to version 3.01 of the PHP license,      |     | This source file is subject to version 3.01 of the PHP license,      |
    | that is bundled with this package in the file LICENSE, and is        |     | that is bundled with this package in the file LICENSE, and is        |
Line 31 Line 31
   
 /* Under BSD, emulate fopencookie using funopen */  /* Under BSD, emulate fopencookie using funopen */
 #if defined(HAVE_FUNOPEN) && !defined(HAVE_FOPENCOOKIE)  #if defined(HAVE_FUNOPEN) && !defined(HAVE_FOPENCOOKIE)
   
   /* NetBSD 6.0+ uses off_t instead of fpos_t in funopen */
   # if defined(__NetBSD__) && (__NetBSD_Version__ > 600000000)
   #  define PHP_FPOS_T off_t
   # else
   #  define PHP_FPOS_T fpos_t
   # endif
   
 typedef struct {  typedef struct {
         int (*reader)(void *, char *, int);          int (*reader)(void *, char *, int);
         int (*writer)(void *, const char *, int);          int (*writer)(void *, const char *, int);
        fpos_t (*seeker)(void *, fpos_t, int);        PHP_FPOS_T (*seeker)(void *, PHP_FPOS_T, int);
         int (*closer)(void *);          int (*closer)(void *);
 } COOKIE_IO_FUNCTIONS_T;  } COOKIE_IO_FUNCTIONS_T;
   
Line 68  static int stream_cookie_writer(void *cookie, const ch Line 76  static int stream_cookie_writer(void *cookie, const ch
         return php_stream_write((php_stream *)cookie, (char *)buffer, size);          return php_stream_write((php_stream *)cookie, (char *)buffer, size);
 }  }
   
static fpos_t stream_cookie_seeker(void *cookie, off_t position, int whence)static PHP_FPOS_T stream_cookie_seeker(void *cookie, off_t position, int whence)
 {  {
         TSRMLS_FETCH();          TSRMLS_FETCH();
   
        return (fpos_t)php_stream_seek((php_stream *)cookie, position, whence);        return (PHP_FPOS_T)php_stream_seek((php_stream *)cookie, position, whence);
 }  }
   
 static int stream_cookie_closer(void *cookie)  static int stream_cookie_closer(void *cookie)
Line 271  PHPAPI int _php_stream_cast(php_stream *stream, int ca Line 279  PHPAPI int _php_stream_cast(php_stream *stream, int ca
   
                         newstream = php_stream_fopen_tmpfile();                          newstream = php_stream_fopen_tmpfile();
                         if (newstream) {                          if (newstream) {
                                size_t retcopy = php_stream_copy_to_stream_ex(stream, newstream, PHP_STREAM_COPY_ALL, NULL);                                int retcopy = php_stream_copy_to_stream_ex(stream, newstream, PHP_STREAM_COPY_ALL, NULL);
   
                                 if (retcopy != SUCCESS) {                                  if (retcopy != SUCCESS) {
                                         php_stream_close(newstream);                                          php_stream_close(newstream);

Removed from v.1.1.1.1  
changed lines
  Added in v.1.1.1.3


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>