util_win32.c revision 6de8046f8f7e07cd83895a528df25d977e502c76
/* Copyright 1999-2004 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "apr_strings.h"
#include "arch/win32/apr_arch_file_io.h"
#include "arch/win32/apr_arch_misc.h"
#include "httpd.h"
#include "http_log.h"
#include <stdarg.h>
#include <time.h>
#include <stdlib.h>
{
{
/ sizeof(apr_wchar_t))) {
return apr_get_os_error();
}
if (rv != APR_SUCCESS)
return rv;
else if (wbinlen)
return APR_ENAMETOOLONG;
}
#endif /* APR_HAS_UNICODE_FS */
#if APR_HAS_ANSI_FS
{
/* share the same scratch buffer */
return apr_get_os_error();
}
}
#endif
return APR_SUCCESS;
}
const request_rec *r,
const char * const *args,
const char * const *env,
{
}
/* This code is stolen from misc/win32/misc.c and apr_private.h
* This helper code resolves late bound entry points
* missing from one or more releases of the Win32 API...
* but it sure would be nice if we didn't duplicate this code
* from the APR ;-)
*/
static const char* const lateDllName[DLL_defined] = {
"kernel32", "advapi32", "mswsock", "ws2_32" };
{
if (!lateDllHandle[fnLib]) {
if (!lateDllHandle[fnLib])
return NULL;
}
if (ordinal)
else
}
/* To share the semaphores with other processes, we need a NULL ACL
* Code from MS KB Q106387
*/
{
return NULL;
}
apr_set_os_error(0);
|| apr_get_os_error()) {
return NULL;
}
|| apr_get_os_error()) {
return NULL;
}
return sa;
}
void CleanNullACL(void *sa)
{
if (sa) {
}
}
/*
* The Win32 call WaitForMultipleObjects will only allow you to wait for
* a maximum of MAXIMUM_WAIT_OBJECTS (current 64). Since the threading
* model in the multithreaded version of apache wants to use this call,
* we are restricted to a maximum of 64 threads. This is a simplistic
* routine that will increase this size.
*/
{
do {
if (!bFirst)
Sleep(1000);
else
0, 0);
if (dwRet != WAIT_TIMEOUT) {
break;
}
}
return dwRet;
}