wrowe 2002/07/09 15:50:41
Modified: include/arch/win32 misc.h
misc/win32 misc.c start.c
Log:
apr_oslevel_get() is an internal function. Correct it to no longer pass
the pool* arg (which it never used), and call it before we begin with the
apr_allocator cruft which would force a mutex (since WinNT v.s. 9x hadn't
been determined), rather than a critical section on the global pool.
Revision Changes Path
1.45 +1 -1 apr/include/arch/win32/misc.h
Index: misc.h
===================================================================
RCS file: /home/cvs/apr/include/arch/win32/misc.h,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- misc.h 24 Jun 2002 02:13:44 -0000 1.44
+++ misc.h 9 Jul 2002 22:50:40 -0000 1.45
@@ -143,7 +143,7 @@
extern APR_DECLARE_DATA apr_oslevel_e apr_os_level;
-apr_status_t apr_get_oslevel(struct apr_pool_t *, apr_oslevel_e *);
+apr_status_t apr_get_oslevel(apr_oslevel_e *);
/* The APR_HAS_ANSI_FS symbol is PRIVATE, and internal to APR.
* APR only supports char data for filenames. Like most applications,
1.16 +1 -1 apr/misc/win32/misc.c
Index: misc.c
===================================================================
RCS file: /home/cvs/apr/misc/win32/misc.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- misc.c 24 Jun 2002 02:13:44 -0000 1.15
+++ misc.c 9 Jul 2002 22:50:41 -0000 1.16
@@ -61,7 +61,7 @@
APR_DECLARE_DATA apr_oslevel_e apr_os_level = APR_WIN_UNK;
-apr_status_t apr_get_oslevel(apr_pool_t *cont, apr_oslevel_e *level)
+apr_status_t apr_get_oslevel(apr_oslevel_e *level)
{
if (apr_os_level == APR_WIN_UNK)
{
1.37 +6 -6 apr/misc/win32/start.c
Index: start.c
===================================================================
RCS file: /home/cvs/apr/misc/win32/start.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- start.c 13 Apr 2002 19:27:24 -0000 1.36
+++ start.c 9 Jul 2002 22:50:41 -0000 1.37
@@ -199,6 +199,11 @@
return APR_SUCCESS;
}
+ /* Initialize apr_os_level global */
+ if (apr_get_oslevel(NULL, &osver) != APR_SUCCESS) {
+ return APR_EEXIST;
+ }
+
if ((status = apr_pool_initialize()) != APR_SUCCESS)
return status;
@@ -206,13 +211,8 @@
return APR_ENOPOOL;
}
- apr_pool_tag(pool, "apr_initilialize");
+ apr_pool_tag(pool, "apr_initialize");
- /* Initialize apr_os_level global */
- if (apr_get_oslevel(pool, &osver) != APR_SUCCESS) {
- return APR_EEXIST;
- }
-
iVersionRequested = MAKEWORD(WSAHighByte, WSALowByte);
err = WSAStartup((WORD) iVersionRequested, &wsaData);
if (err) {