summaryrefslogtreecommitdiff
path: root/misc/win32/start.c
diff options
context:
space:
mode:
authorwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2000-05-12 15:32:37 +0000
committerwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2000-05-12 15:32:37 +0000
commitabfc36597001c4f586373496a83e1d1b8095d2b3 (patch)
treefc0772c45724f4039e04f3c161e1cb2dec051ece /misc/win32/start.c
parentc1dbb8d3d23b3a8a084ccb4bdfab4ebe5d54e87b (diff)
downloadlibapr-abfc36597001c4f586373496a83e1d1b8095d2b3.tar.gz
Create a true misc.c for ap_get_oslevel and ap_load_dll_func,
and clean up the naming of the entire LoadLateDll declaration. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60040 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'misc/win32/start.c')
-rw-r--r--misc/win32/start.c80
1 files changed, 0 insertions, 80 deletions
diff --git a/misc/win32/start.c b/misc/win32/start.c
index a780edf04..fa35f8f26 100644
--- a/misc/win32/start.c
+++ b/misc/win32/start.c
@@ -96,64 +96,6 @@ ap_status_t ap_destroy_context(ap_pool_t *cont)
return APR_SUCCESS;
}
-ap_status_t ap_get_oslevel(ap_pool_t *cont, ap_oslevel_e *level)
-{
- static OSVERSIONINFO oslev;
- static unsigned int servpack = 0;
- static BOOL first = TRUE;
- char *pservpack;
-
- if (first) {
- first = FALSE;
- oslev.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
- GetVersionEx(&oslev);
- if (oslev.dwPlatformId == VER_PLATFORM_WIN32_NT) {
- for (pservpack = oslev.szCSDVersion;
- *pservpack && !isdigit(*pservpack); pservpack++)
- ;
- if (*pservpack)
- servpack = atoi(pservpack);
- }
- }
- if (oslev.dwPlatformId == VER_PLATFORM_WIN32_NT) {
- if (oslev.dwMajorVersion == 5) {
- (*level) = APR_WIN_2000;
- }
- else if (oslev.dwMajorVersion == 4) {
- if (servpack >= 6) {
- (*level) = APR_WIN_NT_4_SP6;
- }
- else if (servpack >= 4) {
- (*level) = APR_WIN_NT_4_SP4;
- }
- else if (servpack >= 3) {
- (*level) = APR_WIN_NT_4_SP3;
- }
- else if (servpack >= 2) {
- (*level) = APR_WIN_NT_4_SP2;
- }
- else {
- (*level) = APR_WIN_NT_4;
- }
- }
- else {
- (*level) = APR_WIN_NT;
- }
- return APR_SUCCESS;
- }
- else if (oslev.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) {
- if (oslev.dwMinorVersion == 0) {
- (*level) = APR_WIN_95;
- return APR_SUCCESS;
- }
- else if (oslev.dwMinorVersion > 0) {
- (*level) = APR_WIN_98;
- return APR_SUCCESS;
- }
- }
- return APR_EEXIST;
-}
-
ap_status_t ap_set_userdata(void *data, char *key,
ap_status_t (*cleanup) (void *),
ap_pool_t *cont)
@@ -208,28 +150,6 @@ ap_status_t ap_get_userdata(void **data, char *key, ap_pool_t *cont)
return APR_ENOPOOL;
}
-/* This is the helper code to resolve late bound entry points
- * missing from one or more releases of the Win32 API
- */
-
-static const char* const lateDllName[DLL_defined] = {
- "kernel32", "advapi32", "mswsock", "ws2_32" };
-static HMODULE lateDllHandle[DLL_defined] = {
- NULL, NULL, NULL, NULL };
-
-FARPROC LoadLateDllFunc(ap_dlltoken_e fnLib, char* fnName, int ordinal)
-{
- if (!lateDllHandle[fnLib]) {
- lateDllHandle[fnLib] = LoadLibrary(lateDllName[fnLib]);
- if (!lateDllHandle[fnLib])
- return NULL;
- }
- if (ordinal)
- return GetProcAddress(lateDllHandle[fnLib], (char *) ordinal);
- else
- return GetProcAddress(lateDllHandle[fnLib], fnName);
-}
-
/* This puts one thread in a Listen for signals mode */
ap_status_t ap_initialize(void)
{