httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@covalent.net
Subject Re: cvs commit: apache-2.0/src/modules/standard mod_auth_digest.c
Date Thu, 01 Jun 2000 14:25:11 GMT

We talked about this a long time ago, but I'll bring it up again because
of this commit.  When APR was first implemented, all platforms ALWAYS
implemented all functions.  If a function wasn't actually implemented, it
returned APR_ENOTIMPL.  People yelled and screamed and said the linker
should die because it will be easier for the programmer.  Now, we are
adding back in those dummy functions in a module, yuck!

Just food for thought.

Ryan

>   don't include apr_shmem.h when APR_HAS_SHARED_MEMORY is false, but instead set up our
own dummies

>   +#if APR_HAS_SHARED_MEMORY
>   +#include "apr_shmem.h"
>   +#else
>   +/* just provide dummies - the code does run-time checks anyway */
>   +typedef   void ap_shmem_t;
>   +typedef   void ap_shm_name_t;
>   +
>   +ap_status_t ap_shm_init(ap_shmem_t **m, ap_size_t reqsize, const char *file, ap_pool_t
*cont) {
>   +    return APR_ENOTIMPL;
>   +}
>   +ap_status_t ap_shm_destroy(ap_shmem_t *m) {
>   +    return APR_ENOTIMPL;
>   +}
>   +void *ap_shm_malloc(ap_shmem_t *c, ap_size_t reqsize) {
>   +    return NULL;
>   +}
>   +void *ap_shm_calloc(ap_shmem_t *shared, ap_size_t size) {
>   +    return NULL;
>   +}
>   +ap_status_t ap_shm_free(ap_shmem_t *shared, void *free) {
>   +    return APR_ENOTIMPL;
>   +}
>   +ap_status_t ap_get_shm_name(ap_shmem_t *c, ap_shm_name_t **name) {
>   +    return APR_ENOTIMPL;
>   +}
>   +ap_status_t ap_set_shm_name(ap_shmem_t *c, ap_shm_name_t *name) {
>   +    return APR_ENOTIMPL;
>   +}
>   +ap_status_t ap_open_shmem(ap_shmem_t *c) {
>   +    return APR_ENOTIMPL;
>   +}
>   +ap_status_t ap_shm_avail(ap_shmem_t *c, ap_size_t *avail) {
>   +    return APR_ENOTIMPL;
>   +}
>   +#endif
>    
>    
>    /* struct to hold the configuration info */
>   
>   
>   
> 


_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Mime
View raw message