hholzgra                Fri Feb 20 03:22:16 2004 EDT

  Modified files:              
    /php-src/main/streams       php_stream_context.h php_stream_filter_api.h 
                                php_stream_mmap.h php_stream_plain_wrapper.h 
                                php_stream_transport.h 
  Log:
  EXTERN_C wrapping for PHPAPI prototypes
  (Zend and main should now be ok)
  
http://cvs.php.net/diff.php/php-src/main/streams/php_stream_context.h?r1=1.8&r2=1.9&ty=u
Index: php-src/main/streams/php_stream_context.h
diff -u php-src/main/streams/php_stream_context.h:1.8 
php-src/main/streams/php_stream_context.h:1.9
--- php-src/main/streams/php_stream_context.h:1.8       Thu Jan  8 12:33:06 2004
+++ php-src/main/streams/php_stream_context.h   Fri Feb 20 03:22:12 2004
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: php_stream_context.h,v 1.8 2004/01/08 17:33:06 sniper Exp $ */
+/* $Id: php_stream_context.h,v 1.9 2004/02/20 08:22:12 hholzgra Exp $ */
 
 /* Stream context and status notification related definitions */
 
@@ -57,6 +57,7 @@
        int rsrc_id;    /* used for auto-cleanup */
 };
 
+BEGIN_EXTERN_C()
 PHPAPI void php_stream_context_free(php_stream_context *context);
 PHPAPI php_stream_context *php_stream_context_alloc(void);
 PHPAPI int php_stream_context_get_option(php_stream_context *context,
@@ -73,6 +74,7 @@
 
 PHPAPI php_stream_notifier *php_stream_notification_alloc(void);
 PHPAPI void php_stream_notification_free(php_stream_notifier *notifier);
+END_EXTERN_C()
 
 /* not all notification codes are implemented */
 #define PHP_STREAM_NOTIFY_RESOLVE              1
@@ -90,9 +92,11 @@
 #define PHP_STREAM_NOTIFY_SEVERITY_WARN        1
 #define PHP_STREAM_NOTIFY_SEVERITY_ERR 2
 
+BEGIN_EXTERN_C()
 PHPAPI void php_stream_notification_notify(php_stream_context *context, int 
notifycode, int severity,
                char *xmsg, int xcode, size_t bytes_sofar, size_t bytes_max, void * 
ptr TSRMLS_DC);
 PHPAPI php_stream_context *php_stream_context_set(php_stream *stream, 
php_stream_context *context);
+END_EXTERN_C()
 
 #define php_stream_notify_info(context, code, xmsg, xcode)     do { if ((context) && 
(context)->notifier) { \
        php_stream_notification_notify((context), (code), 
PHP_STREAM_NOTIFY_SEVERITY_INFO, \
http://cvs.php.net/diff.php/php-src/main/streams/php_stream_filter_api.h?r1=1.6&r2=1.7&ty=u
Index: php-src/main/streams/php_stream_filter_api.h
diff -u php-src/main/streams/php_stream_filter_api.h:1.6 
php-src/main/streams/php_stream_filter_api.h:1.7
--- php-src/main/streams/php_stream_filter_api.h:1.6    Thu Jan  8 12:33:06 2004
+++ php-src/main/streams/php_stream_filter_api.h        Fri Feb 20 03:22:12 2004
@@ -19,7 +19,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: php_stream_filter_api.h,v 1.6 2004/01/08 17:33:06 sniper Exp $ */
+/* $Id: php_stream_filter_api.h,v 1.7 2004/02/20 08:22:12 hholzgra Exp $ */
 
 /* The filter API works on the principle of "Bucket-Brigades".  This is
  * partially inspired by the Apache 2 method of doing things, although
@@ -66,6 +66,7 @@
 } php_stream_filter_status_t;
 
 /* Buckets API. */
+BEGIN_EXTERN_C()
 PHPAPI php_stream_bucket *php_stream_bucket_new(php_stream *stream, char *buf, size_t 
buflen, int own_buf, int buf_persistent TSRMLS_DC);
 PHPAPI int php_stream_bucket_split(php_stream_bucket *in, php_stream_bucket **left, 
php_stream_bucket **right, size_t length TSRMLS_DC);
 PHPAPI void php_stream_bucket_delref(php_stream_bucket *bucket TSRMLS_DC);
@@ -74,6 +75,7 @@
 PHPAPI void php_stream_bucket_append(php_stream_bucket_brigade *brigade, 
php_stream_bucket *bucket TSRMLS_DC);
 PHPAPI void php_stream_bucket_unlink(php_stream_bucket *bucket TSRMLS_DC);
 PHPAPI php_stream_bucket *php_stream_bucket_make_writeable(php_stream_bucket *bucket 
TSRMLS_DC);
+END_EXTERN_C()
 
 #define PSFS_FLAG_NORMAL               0       /* regular read/write */
 #define PSFS_FLAG_FLUSH_INC            1       /* an incremental flush */
@@ -115,11 +117,13 @@
 };
 
 /* stack filter onto a stream */
+BEGIN_EXTERN_C()
 PHPAPI void php_stream_filter_prepend(php_stream_filter_chain *chain, 
php_stream_filter *filter);
 PHPAPI void php_stream_filter_append(php_stream_filter_chain *chain, 
php_stream_filter *filter);
 PHPAPI php_stream_filter *php_stream_filter_remove(php_stream_filter *filter, int 
call_dtor TSRMLS_DC);
 PHPAPI void php_stream_filter_free(php_stream_filter *filter TSRMLS_DC);
 PHPAPI php_stream_filter *_php_stream_filter_alloc(php_stream_filter_ops *fops, void 
*abstract, int persistent STREAMS_DC TSRMLS_DC);
+END_EXTERN_C()
 #define php_stream_filter_alloc(fops, thisptr, persistent) 
_php_stream_filter_alloc((fops), (thisptr), (persistent) STREAMS_CC TSRMLS_CC)
 #define php_stream_filter_alloc_rel(fops, thisptr, persistent) 
_php_stream_filter_alloc((fops), (thisptr), (persistent) STREAMS_REL_CC TSRMLS_CC)
 
@@ -129,9 +133,11 @@
        php_stream_filter *(*create_filter)(const char *filtername, zval 
*filterparams, int persistent TSRMLS_DC);
 } php_stream_filter_factory;
 
+BEGIN_EXTERN_C()
 PHPAPI int php_stream_filter_register_factory(const char *filterpattern, 
php_stream_filter_factory *factory TSRMLS_DC);
 PHPAPI int php_stream_filter_unregister_factory(const char *filterpattern TSRMLS_DC);
 PHPAPI php_stream_filter *php_stream_filter_create(const char *filtername, zval 
*filterparams, int persistent TSRMLS_DC);
+END_EXTERN_C()
 
 /*
  * Local variables:
http://cvs.php.net/diff.php/php-src/main/streams/php_stream_mmap.h?r1=1.3&r2=1.4&ty=u
Index: php-src/main/streams/php_stream_mmap.h
diff -u php-src/main/streams/php_stream_mmap.h:1.3 
php-src/main/streams/php_stream_mmap.h:1.4
--- php-src/main/streams/php_stream_mmap.h:1.3  Thu Jan  8 12:33:06 2004
+++ php-src/main/streams/php_stream_mmap.h      Fri Feb 20 03:22:12 2004
@@ -16,7 +16,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: php_stream_mmap.h,v 1.3 2004/01/08 17:33:06 sniper Exp $ */
+/* $Id: php_stream_mmap.h,v 1.4 2004/02/20 08:22:12 hholzgra Exp $ */
 
 /* Memory Mapping interface for streams.
  * The intention is to provide a uniform interface over the most common
@@ -64,13 +64,14 @@
  * 0 otherwise */
 #define php_stream_mmap_possible(stream)                       
(!php_stream_is_filtered((stream)) && php_stream_mmap_supported((stream)))
 
+BEGIN_EXTERN_C()
 PHPAPI char *_php_stream_mmap_range(php_stream *stream, size_t offset, size_t length, 
php_stream_mmap_operation_t mode, size_t *mapped_len TSRMLS_DC);
 #define php_stream_mmap_range(stream, offset, length, mode, mapped_len)        
_php_stream_mmap_range((stream), (offset), (length), (mode), (mapped_len) TSRMLS_CC)
 
 /* un-maps the last mapped range */
 PHPAPI int _php_stream_mmap_unmap(php_stream *stream TSRMLS_DC);
 #define php_stream_mmap_unmap(stream)                          
_php_stream_mmap_unmap((stream) TSRMLS_CC)
-
+END_EXTERN_C()
 
 /*
  * Local variables:
http://cvs.php.net/diff.php/php-src/main/streams/php_stream_plain_wrapper.h?r1=1.5&r2=1.6&ty=u
Index: php-src/main/streams/php_stream_plain_wrapper.h
diff -u php-src/main/streams/php_stream_plain_wrapper.h:1.5 
php-src/main/streams/php_stream_plain_wrapper.h:1.6
--- php-src/main/streams/php_stream_plain_wrapper.h:1.5 Thu Jan  8 12:33:06 2004
+++ php-src/main/streams/php_stream_plain_wrapper.h     Fri Feb 20 03:22:12 2004
@@ -16,13 +16,15 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: php_stream_plain_wrapper.h,v 1.5 2004/01/08 17:33:06 sniper Exp $ */
+/* $Id: php_stream_plain_wrapper.h,v 1.6 2004/02/20 08:22:12 hholzgra Exp $ */
 
 /* definitions for the plain files wrapper */
 
 /* operations for a plain file; use the php_stream_fopen_XXX funcs below */
 PHPAPI extern php_stream_ops php_stream_stdio_ops;
 
+BEGIN_EXTERN_C()
+
 /* like fopen, but returns a stream */
 PHPAPI php_stream *_php_stream_fopen(const char *filename, const char *mode, char 
**opened_path, int options STREAMS_DC TSRMLS_DC);
 #define php_stream_fopen(filename, mode, opened)       _php_stream_fopen((filename), 
(mode), (opened), 0 STREAMS_CC TSRMLS_CC)
@@ -51,6 +53,8 @@
 PHPAPI FILE * _php_stream_open_wrapper_as_file(char * path, char * mode, int options, 
char **opened_path STREAMS_DC TSRMLS_DC);
 #define php_stream_open_wrapper_as_file(path, mode, options, opened_path) 
_php_stream_open_wrapper_as_file((path), (mode), (options), (opened_path) STREAMS_CC 
TSRMLS_CC)
 
+END_EXTERN_C()
+
 /*
  * Local variables:
  * tab-width: 4
http://cvs.php.net/diff.php/php-src/main/streams/php_stream_transport.h?r1=1.8&r2=1.9&ty=u
Index: php-src/main/streams/php_stream_transport.h
diff -u php-src/main/streams/php_stream_transport.h:1.8 
php-src/main/streams/php_stream_transport.h:1.9
--- php-src/main/streams/php_stream_transport.h:1.8     Thu Jan  8 12:33:06 2004
+++ php-src/main/streams/php_stream_transport.h Fri Feb 20 03:22:12 2004
@@ -16,7 +16,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: php_stream_transport.h,v 1.8 2004/01/08 17:33:06 sniper Exp $ */
+/* $Id: php_stream_transport.h,v 1.9 2004/02/20 08:22:12 hholzgra Exp $ */
 
 #if HAVE_SYS_SOCKET_H
 # include <sys/socket.h>
@@ -29,6 +29,7 @@
                php_stream_context *context STREAMS_DC TSRMLS_DC);
 typedef php_stream_transport_factory_func *php_stream_transport_factory;
 
+BEGIN_EXTERN_C()
 PHPAPI int php_stream_xport_register(char *protocol, php_stream_transport_factory 
factory TSRMLS_DC);
 PHPAPI int php_stream_xport_unregister(char *protocol TSRMLS_DC);
 
@@ -103,6 +104,7 @@
  * sending it as OOB data */
 PHPAPI int php_stream_xport_sendto(php_stream *stream, const char *buf, size_t buflen,
                long flags, void *addr, socklen_t addrlen TSRMLS_DC);
+END_EXTERN_C()
 
 /* Structure definition for the set_option interface that the above functions wrap */
 
@@ -157,8 +159,10 @@
        STREAM_CRYPTO_METHOD_TLS_SERVER
 } php_stream_xport_crypt_method_t;
 
+BEGIN_EXTERN_C()
 PHPAPI int php_stream_xport_crypto_setup(php_stream *stream, 
php_stream_xport_crypt_method_t crypto_method, php_stream *session_stream TSRMLS_DC);
 PHPAPI int php_stream_xport_crypto_enable(php_stream *stream, int activate TSRMLS_DC);
+END_EXTERN_C()
 
 typedef struct _php_stream_xport_crypto_param {
        enum {
@@ -175,8 +179,10 @@
        } outputs;
 } php_stream_xport_crypto_param;
 
+BEGIN_EXTERN_C()
 PHPAPI HashTable *php_stream_xport_get_hash(void);
 PHPAPI php_stream_transport_factory_func php_stream_generic_socket_factory;
+END_EXTERN_C()
 
 /*
  * Local variables:

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to