httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@locus.apache.org
Subject cvs commit: apache-2.0/src/modules/dav/main liveprop.c mod_dav.c mod_dav.h providers.c util.c util_lock.c
Date Wed, 11 Oct 2000 17:23:58 GMT
wrowe       00/10/11 10:23:58

  Modified:    src/modules/dav/fs mod_dav_fs.c
               src/modules/dav/main liveprop.c mod_dav.c mod_dav.h
                        providers.c util.c util_lock.c
  Log:
    Here it is, mod_dav should build quite nicely on Win32 (two last mild
    warnings to contend with.)
  
  Revision  Changes    Path
  1.9       +2 -2      apache-2.0/src/modules/dav/fs/mod_dav_fs.c
  
  Index: mod_dav_fs.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/dav/fs/mod_dav_fs.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- mod_dav_fs.c	2000/10/07 01:29:38	1.8
  +++ mod_dav_fs.c	2000/10/11 17:23:52	1.9
  @@ -64,7 +64,7 @@
   
   } dav_fs_server_conf;
   
  -extern module MODULE_VAR_EXPORT dav_fs_module;
  +extern module MODULE_DECLARE_DATA dav_fs_module;
   
   const char *dav_get_lockdb_path(const request_rec *r)
   {
  @@ -130,7 +130,7 @@
       dav_fs_register(NULL /* ### pconf */);
   }
   
  -module MODULE_VAR_EXPORT dav_fs_module =
  +module MODULE_DECLARE_DATA dav_fs_module =
   {
       STANDARD20_MODULE_STUFF,
       NULL,			/* dir config creater */
  
  
  
  1.4       +3 -2      apache-2.0/src/modules/dav/main/liveprop.c
  
  Index: liveprop.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/dav/main/liveprop.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- liveprop.c	2000/08/08 20:03:51	1.3
  +++ liveprop.c	2000/10/11 17:23:53	1.4
  @@ -74,7 +74,8 @@
       return APR_SUCCESS;
   }
   
  -void dav_register_liveprop_namespace(apr_pool_t *p, const char *uri)
  +DAV_DECLARE(void) dav_register_liveprop_namespace(apr_pool_t *p, 
  +                                                  const char *uri)
   {
       int value;
   
  @@ -96,7 +97,7 @@
       apr_hash_set(dav_liveprop_uris, uri, 0, (void *)++dav_liveprop_count);
   }
   
  -int dav_get_liveprop_ns_index(const char *uri)
  +DAV_DECLARE(int) dav_get_liveprop_ns_index(const char *uri)
   {
       return (int)apr_hash_get(dav_liveprop_uris, uri, 0);
   }
  
  
  
  1.25      +16 -14    apache-2.0/src/modules/dav/main/mod_dav.c
  
  Index: mod_dav.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/dav/main/mod_dav.c,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- mod_dav.c	2000/10/10 08:25:44	1.24
  +++ mod_dav.c	2000/10/11 17:23:54	1.25
  @@ -125,7 +125,7 @@
   
   
   /* forward-declare for use in configuration lookup */
  -extern module MODULE_VAR_EXPORT dav_module;
  +extern module DAV_DECLARE_DATA dav_module;
   
   static void dav_init_handler(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp,
                                server_rec *s)
  @@ -1172,8 +1172,8 @@
   }
   
   /* ### move this to dav_util? */
  -void dav_add_response(dav_walker_ctx *ctx, const char *href, int status,
  -		      dav_get_props_result *propstats)
  +DAV_DECLARE(void) dav_add_response(dav_walker_ctx *ctx, const char *href, 
  +                                   int status, dav_get_props_result *propstats)
   {
       dav_response *resp;
   
  @@ -3259,7 +3259,7 @@
       { NULL }
   };
   
  -module MODULE_VAR_EXPORT dav_module =
  +module DAV_DECLARE_DATA dav_module =
   {
       STANDARD20_MODULE_STUFF,
       dav_create_dir_config,	/* dir config creater */
  @@ -3276,13 +3276,15 @@
       AP_HOOK_LINK(find_liveprop)
       AP_HOOK_LINK(insert_all_liveprops)
       )
  -AP_IMPLEMENT_HOOK_VOID(gather_propsets, (apr_array_header_t *uris), (uris))
  -AP_IMPLEMENT_HOOK_RUN_FIRST(int, find_liveprop,
  -                            (request_rec *r,
  -                             const char *ns_uri, const char *name,
  -                             const dav_hooks_liveprop **hooks),
  -                            (r, ns_uri, name, hooks), 0);
  -AP_IMPLEMENT_HOOK_VOID(insert_all_liveprops,
  -                       (request_rec *r, const dav_resource *resource,
  -                        int insvalue, ap_text_header *phdr),
  -                       (r, resource, insvalue, phdr));
  +AP_IMPLEMENT_EXTERNAL_HOOK_VOID(DAV, gather_propsets,
  +                                (apr_array_header_t *uris),
  +                                (uris))
  +AP_IMPLEMENT_EXTERNAL_HOOK_RUN_FIRST(DAV, int, find_liveprop,
  +                                     (request_rec *r, const char *ns_uri,
  +                                      const char *name,
  +                                      const dav_hooks_liveprop **hooks),
  +                                     (r, ns_uri, name, hooks), 0);
  +AP_IMPLEMENT_EXTERNAL_HOOK_VOID(DAV, insert_all_liveprops,
  +                                (request_rec *r, const dav_resource *resource,
  +                                 int insvalue, ap_text_header *phdr),
  +                                (r, resource, insvalue, phdr));
  
  
  
  1.21      +55 -26    apache-2.0/src/modules/dav/main/mod_dav.h
  
  Index: mod_dav.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/dav/main/mod_dav.h,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- mod_dav.h	2000/10/10 11:42:22	1.20
  +++ mod_dav.h	2000/10/11 17:23:54	1.21
  @@ -105,6 +105,26 @@
   
   #define DAV_INFINITY	INT_MAX	/* for the Depth: header */
   
  +/* Create a set of DAV_DECLARE(type), DAV_DECLARE_NONSTD(type) and 
  + * DAV_DECLARE_DATA with appropriate export and import tags for the platform
  + */
  +#if !defined(WIN32)
  +#define DAV_DECLARE(type)            type
  +#define DAV_DECLARE_NONSTD(type)     type
  +#define DAV_DECLARE_DATA
  +#elif defined(DAV_DECLARE_STATIC)
  +#define DAV_DECLARE(type)            type __stdcall
  +#define DAV_DECLARE_NONSTD(type)     type
  +#define DAV_DECLARE_DATA
  +#elif defined(DAV_DECLARE_EXPORT)
  +#define DAV_DECLARE(type)            __declspec(dllexport) type __stdcall
  +#define DAV_DECLARE_NONSTD(type)     __declspec(dllexport) type
  +#define DAV_DECLARE_DATA             __declspec(dllexport)
  +#else
  +#define DAV_DECLARE(type)            __declspec(dllimport) type __stdcall
  +#define DAV_DECLARE_NONSTD(type)     __declspec(dllimport) type
  +#define DAV_DECLARE_DATA             __declspec(dllimport)
  +#endif
   
   /* --------------------------------------------------------------------
   **
  @@ -146,7 +166,8 @@
   ** Create a new error structure. save_errno will be filled with the current
   ** errno value.
   */
  -dav_error *dav_new_error(apr_pool_t *p, int status, int error_id, const char *desc);
  +DAV_DECLARE(dav_error*) dav_new_error(apr_pool_t *p, int status, 
  +                                      int error_id, const char *desc);
   
   /*
   ** Push a new error description onto the stack of errors.
  @@ -161,8 +182,8 @@
   ** <error_id> can specify a new error_id since the topmost description has
   ** changed.
   */
  -dav_error *dav_push_error(apr_pool_t *p, int status, int error_id, const char *desc,
  -			  dav_error *prev);
  +DAV_DECLARE(dav_error*) dav_push_error(apr_pool_t *p, int status, int error_id,
  +                                       const char *desc, dav_error *prev);
   
   
   /* error ID values... */
  @@ -339,23 +360,29 @@
   #define DAV_BUFFER_PAD		64	/* amount of pad when growing */
   
   /* set the cur_len to the given size and ensure space is available */
  -void dav_set_bufsize(apr_pool_t *p, dav_buffer *pbuf, apr_size_t size);
  +DAV_DECLARE(void) dav_set_bufsize(apr_pool_t *p, dav_buffer *pbuf, 
  +                                  apr_size_t size);
   
   /* initialize a buffer and copy the specified (null-term'd) string into it */
  -void dav_buffer_init(apr_pool_t *p, dav_buffer *pbuf, const char *str);
  +DAV_DECLARE(void) dav_buffer_init(apr_pool_t *p, dav_buffer *pbuf, 
  +                                  const char *str);
   
   /* check that the buffer can accomodate <extra_needed> more bytes */
  -void dav_check_bufsize(apr_pool_t *p, dav_buffer *pbuf, apr_size_t extra_needed);
  +DAV_DECLARE(void) dav_check_bufsize(apr_pool_t *p, dav_buffer *pbuf, 
  +                                    apr_size_t extra_needed);
   
   /* append a string to the end of the buffer, adjust length */
  -void dav_buffer_append(apr_pool_t *p, dav_buffer *pbuf, const char *str);
  +DAV_DECLARE(void) dav_buffer_append(apr_pool_t *p, dav_buffer *pbuf, 
  +                                    const char *str);
   
   /* place a string on the end of the buffer, do NOT adjust length */
  -void dav_buffer_place(apr_pool_t *p, dav_buffer *pbuf, const char *str);
  +DAV_DECLARE(void) dav_buffer_place(apr_pool_t *p, dav_buffer *pbuf, 
  +                                   const char *str);
   
   /* place some memory on the end of a buffer; do NOT adjust length */
  -void dav_buffer_place_mem(apr_pool_t *p, dav_buffer *pbuf, const void *mem,
  -                          apr_size_t amt, apr_size_t pad);
  +DAV_DECLARE(void) dav_buffer_place_mem(apr_pool_t *p, dav_buffer *pbuf, 
  +                                       const void *mem, apr_size_t amt, 
  +                                       apr_size_t pad);
   
   
   /* --------------------------------------------------------------------
  @@ -432,14 +459,14 @@
   
   } dav_provider;
   
  -AP_DECLARE_HOOK(void, gather_propsets, (apr_array_header_t *uris))
  -AP_DECLARE_HOOK(int, find_liveprop, (request_rec *r,
  -                                     const char *ns_uri, const char *name,
  -                                     const dav_hooks_liveprop **hooks))
  -AP_DECLARE_HOOK(void, insert_all_liveprops, (request_rec *r,
  -                                             const dav_resource *resource,
  -                                             int insvalue,
  -                                             ap_text_header *phdr))
  +AP_DECLARE_EXTERNAL_HOOK(DAV, void, gather_propsets, 
  +                         (apr_array_header_t *uris))
  +AP_DECLARE_EXTERNAL_HOOK(DAV, int, find_liveprop,
  +                         (request_rec *r, const char *ns_uri, const char *name,
  +                          const dav_hooks_liveprop **hooks))
  +AP_DECLARE_EXTERNAL_HOOK(DAV, void, insert_all_liveprops, 
  +                         (request_rec *r, const dav_resource *resource,
  +                          int insvalue, ap_text_header *phdr))
   
   /* ### make this internal to mod_dav.c ? */
   #define DAV_KEY_RESOURCE        "dav-resource"
  @@ -448,12 +475,13 @@
   const dav_hooks_propdb *dav_get_propdb_hooks(request_rec *r);
   const dav_hooks_vsn *dav_get_vsn_hooks(request_rec *r);
   
  -void dav_register_provider(apr_pool_t *p, const char *name,
  -                           const dav_provider *hooks);
  +DAV_DECLARE(void) dav_register_provider(apr_pool_t *p, const char *name,
  +                                        const dav_provider *hooks);
   const dav_provider * dav_lookup_provider(const char *name);
   
  -void dav_register_liveprop_namespace(apr_pool_t *pool, const char *uri);
  -int dav_get_liveprop_ns_index(const char *uri);
  +DAV_DECLARE(void) dav_register_liveprop_namespace(apr_pool_t *pool, 
  +                                                  const char *uri);
  +DAV_DECLARE(int) dav_get_liveprop_ns_index(const char *uri);
   int dav_get_liveprop_ns_count(void);
   void dav_add_all_liveprop_xmlns(apr_pool_t *p, ap_text_header *phdr);
   
  @@ -865,8 +893,9 @@
   			       int resource_state,
   			       int depth);
   
  -dav_error * dav_lock_query(dav_lockdb *lockdb, const dav_resource *resource,
  -			   dav_lock **locks);
  +DAV_DECLARE(dav_error*) dav_lock_query(dav_lockdb *lockdb, 
  +                                       const dav_resource *resource,
  +                                       dav_lock **locks);
   
   dav_error * dav_validate_request(request_rec *r, dav_resource *resource,
   				 int depth, dav_locktoken *locktoken,
  @@ -1248,8 +1277,8 @@
   
   } dav_walker_ctx;
   
  -void dav_add_response(dav_walker_ctx *ctx, const char *href, int status,
  -		      dav_get_props_result *propstats);
  +DAV_DECLARE(void) dav_add_response(dav_walker_ctx *ctx, const char *href, 
  +                               int status, dav_get_props_result *propstats);
   
   
   /* --------------------------------------------------------------------
  
  
  
  1.3       +2 -2      apache-2.0/src/modules/dav/main/providers.c
  
  Index: providers.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/dav/main/providers.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- providers.c	2000/10/07 01:29:39	1.2
  +++ providers.c	2000/10/11 17:23:54	1.3
  @@ -69,8 +69,8 @@
       return APR_SUCCESS;
   }
   
  -void dav_register_provider(apr_pool_t *p, const char *name,
  -                           const dav_provider *provider)
  +DAV_DECLARE(void) dav_register_provider(apr_pool_t *p, const char *name,
  +                                       const dav_provider *provider)
   {
       /* ### ignore the pool; it is NULL right now */
       p = ap_global_hook_pool;
  
  
  
  1.11      +19 -11    apache-2.0/src/modules/dav/main/util.c
  
  Index: util.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/dav/main/util.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- util.c	2000/10/07 00:50:42	1.10
  +++ util.c	2000/10/11 17:23:54	1.11
  @@ -67,7 +67,8 @@
   
   #include "apr_strings.h"
   
  -dav_error *dav_new_error(apr_pool_t *p, int status, int error_id, const char *desc)
  +DAV_DECLARE(dav_error*) dav_new_error(apr_pool_t *p, int status, 
  +                                      int error_id, const char *desc)
   {
       int save_errno = errno;
       dav_error *err = apr_pcalloc(p, sizeof(*err));
  @@ -82,8 +83,9 @@
       return err;
   }
   
  -dav_error *dav_push_error(apr_pool_t *p, int status, int error_id, const char *desc,
  -			  dav_error *prev)
  +DAV_DECLARE(dav_error*) dav_push_error(apr_pool_t *p, int status, 
  +                                       int error_id, const char *desc, 
  +                                       dav_error *prev)
   {
       dav_error *err = apr_pcalloc(p, sizeof(*err));
   
  @@ -95,7 +97,8 @@
       return err;
   }
   
  -void dav_check_bufsize(apr_pool_t * p, dav_buffer *pbuf, size_t extra_needed)
  +DAV_DECLARE(void) dav_check_bufsize(apr_pool_t * p, dav_buffer *pbuf, 
  +                                    apr_size_t extra_needed)
   {
       /* grow the buffer if necessary */
       if (pbuf->cur_len + extra_needed > pbuf->alloc_len) {
  @@ -108,7 +111,8 @@
       }
   }
   
  -void dav_set_bufsize(apr_pool_t * p, dav_buffer *pbuf, size_t size)
  +DAV_DECLARE(void) dav_set_bufsize(apr_pool_t * p, dav_buffer *pbuf, 
  +                                  apr_size_t size)
   {
       /* NOTE: this does not retain prior contents */
   
  @@ -129,14 +133,16 @@
   
   
   /* initialize a buffer and copy the specified (null-term'd) string into it */
  -void dav_buffer_init(apr_pool_t *p, dav_buffer *pbuf, const char *str)
  +DAV_DECLARE(void) dav_buffer_init(apr_pool_t *p, dav_buffer *pbuf, 
  +                                  const char *str)
   {
       dav_set_bufsize(p, pbuf, strlen(str));
       memcpy(pbuf->buf, str, pbuf->cur_len + 1);
   }
   
   /* append a string to the end of the buffer, adjust length */
  -void dav_buffer_append(apr_pool_t *p, dav_buffer *pbuf, const char *str)
  +DAV_DECLARE(void) dav_buffer_append(apr_pool_t *p, dav_buffer *pbuf, 
  +                                    const char *str)
   {
       size_t len = strlen(str);
   
  @@ -146,7 +152,8 @@
   }
   
   /* place a string on the end of the buffer, do NOT adjust length */
  -void dav_buffer_place(apr_pool_t *p, dav_buffer *pbuf, const char *str)
  +DAV_DECLARE(void) dav_buffer_place(apr_pool_t *p, dav_buffer *pbuf, 
  +                                   const char *str)
   {
       size_t len = strlen(str);
   
  @@ -155,8 +162,9 @@
   }
   
   /* place some memory on the end of a buffer; do NOT adjust length */
  -void dav_buffer_place_mem(apr_pool_t *p, dav_buffer *pbuf, const void *mem,
  -                          size_t amt, size_t pad)
  +DAV_DECLARE(void) dav_buffer_place_mem(apr_pool_t *p, dav_buffer *pbuf, 
  +                                       const void *mem, apr_size_t amt, 
  +                                       apr_size_t pad)
   {
       dav_check_bufsize(p, pbuf, amt + pad);
       memcpy(pbuf->buf + pbuf->cur_len, mem, amt);
  @@ -654,7 +662,7 @@
       int num_matched;
       int num_that_apply;
       int seen_locktoken;
  -    size_t uri_len;
  +    apr_size_t uri_len;
       const char *reason = NULL;
   
       /* DBG1("validate: <%s>", resource->uri); */
  
  
  
  1.8       +3 -2      apache-2.0/src/modules/dav/main/util_lock.c
  
  Index: util_lock.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/dav/main/util_lock.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- util_lock.c	2000/08/08 20:03:52	1.7
  +++ util_lock.c	2000/10/11 17:23:55	1.8
  @@ -388,8 +388,9 @@
   ** dav_lock_query:  Opens the lock database. Returns a linked list of
   **    dav_lock structures for all direct locks on path.
   */
  -dav_error * dav_lock_query(dav_lockdb *lockdb, const dav_resource *resource,
  -			   dav_lock **locks)
  +DAV_DECLARE(dav_error*) dav_lock_query(dav_lockdb *lockdb, 
  +                                       const dav_resource *resource,
  +                                       dav_lock **locks)
   {
       /* If no lock database, return empty result */
       if (lockdb == NULL) {
  
  
  

Mime
View raw message