apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Gross <mail...@devspace.com>
Subject Some Small Potential Changes
Date Sat, 07 Apr 2001 00:37:36 GMT
Hi

My name is Christian Gross and I would like to submit a couple of
small changes to the APR.  (That is of course if my changes are
correct.)

APR_Pools.c starting line 217

#ifdef ALLOC_STATS
// *** start changes
#ifdef _WIN32
static unsigned __int64 num_free_blocks_calls;
static unsigned __int64 num_blocks_freed;
#else
static unsigned long long num_free_blocks_calls;
static unsigned long long num_blocks_freed;
#endif
// *** end changes

I made the changes because the VC++ 6.0 compiler does not understand
long long, but understands the __int64 data type.

win32\threadpriv.c line 62

APR_DECLARE(apr_status_t) apr_threadkey_private_create(apr_threadkey_t
**key,
                                                    void (*dest)(void
*),
                                                    apr_pool_t *cont)
{
	// start changes *************************************
	(*key) = (apr_threadkey_t *)apr_palloc(cont,
sizeof(apr_threadkey_t));
    (*key)->cntxt = cont;
	// end changes *************************************
    if (((*key)->key = TlsAlloc()) != 0xFFFFFFFF) {
		return APR_SUCCESS;
    }
    return apr_get_os_error();
}

I made the above changes because from having looked at the source code
the pattern is to allocate the pointer in a apr_***_create routine.

I would also like to offer some help in the win32 part of the APR.
For example I noticed that win32 does not have any shared memory
support.  And since our company uses processes and not threads on W2K
we have used another open source package.

Christian Gross






Mime
View raw message