summaryrefslogtreecommitdiff
path: root/os
diff options
context:
space:
mode:
authorJim Jagielski <jim@apache.org>2005-11-10 15:11:44 +0000
committerJim Jagielski <jim@apache.org>2005-11-10 15:11:44 +0000
commit5061d9fa920cb1821a51495fc42833c54e5bd714 (patch)
tree212a163a8ebdf03be40d91175bc632e5331a70c4 /os
parent5d2fae4818e5eca5c32f439da1dbaed1bb2dad1b (diff)
downloadhttpd-5061d9fa920cb1821a51495fc42833c54e5bd714.tar.gz
No functional Change: Removing trailing whitespace. This also
means that "blank" lines consisting of just spaces or tabs are now really blank lines git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@332306 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'os')
-rw-r--r--os/beos/beosd.c8
-rw-r--r--os/beos/os.c2
-rw-r--r--os/bs2000/ebcdic.c2
-rw-r--r--os/tpf/ebcdic.c2
-rw-r--r--os/tpf/os.c4
-rw-r--r--os/unix/unixd.c14
-rw-r--r--os/win32/ap_regkey.c104
-rw-r--r--os/win32/util_win32.c36
8 files changed, 86 insertions, 86 deletions
diff --git a/os/beos/beosd.c b/os/beos/beosd.c
index 901c9a66de..ea8d503e7e 100644
--- a/os/beos/beosd.c
+++ b/os/beos/beosd.c
@@ -49,14 +49,14 @@ int beosd_setup_child(void)
}
-AP_DECLARE(const char *) beosd_set_user(cmd_parms *cmd,
+AP_DECLARE(const char *) beosd_set_user(cmd_parms *cmd,
void *dummy, const char *arg)
{
/* no-op */
return NULL;
}
-AP_DECLARE(const char *) beosd_set_group(cmd_parms *cmd,
+AP_DECLARE(const char *) beosd_set_group(cmd_parms *cmd,
void *dummy, const char *arg)
{
/* no-op */
@@ -78,7 +78,7 @@ AP_DECLARE(apr_status_t) beosd_accept(void **accepted, ap_listen_rec *lr,
int sockdes;
status = apr_socket_accept(&csd, lr->sd, ptrans);
- if (status == APR_SUCCESS) {
+ if (status == APR_SUCCESS) {
*accepted = csd;
apr_os_sock_get(&sockdes, csd);
if (sockdes >= FD_SETSIZE) {
@@ -89,7 +89,7 @@ AP_DECLARE(apr_status_t) beosd_accept(void **accepted, ap_listen_rec *lr,
sockdes, FD_SETSIZE);
apr_socket_close(csd);
return APR_EINTR;
- }
+ }
return status;
}
diff --git a/os/beos/os.c b/os/beos/os.c
index 57ef38657c..c7a3c9f14b 100644
--- a/os/beos/os.c
+++ b/os/beos/os.c
@@ -23,7 +23,7 @@
#include "os.h"
#include "httpd.h"
#include "apr_thread_proc.h"
-#include "ap_mpm.h" /* needed for definition of
+#include "ap_mpm.h" /* needed for definition of
* ap_os_create_privileged_process */
AP_DECLARE(apr_status_t) ap_os_create_privileged_process(
diff --git a/os/bs2000/ebcdic.c b/os/bs2000/ebcdic.c
index 74074e303e..dd6e4127be 100644
--- a/os/bs2000/ebcdic.c
+++ b/os/bs2000/ebcdic.c
@@ -88,7 +88,7 @@ const unsigned char os_toascii_strictly[256] = {
* are stored as EBCDIC, only the semantics of \012 is completely
* different from LF (look it up in the apr_table_t above). \015 happens to be
* mapped to \015 anyway, so there's no special case for it.
- *
+ *
* In THIS table, EBCDIC-\012 is mapped to ASCII-\012.
* This apr_table_t is therefore used wherever an EBCDIC to ASCII conversion is
* needed in the server.
diff --git a/os/tpf/ebcdic.c b/os/tpf/ebcdic.c
index e71928eeda..95a81d9c30 100644
--- a/os/tpf/ebcdic.c
+++ b/os/tpf/ebcdic.c
@@ -176,4 +176,4 @@ ascii2ebcdic(void *dest, const void *srce, size_t count)
}
}
#endif /*APR_CHARSET_EBCDIC*/
-
+
diff --git a/os/tpf/os.c b/os/tpf/os.c
index 9b9bacc1c7..f1ef95db28 100644
--- a/os/tpf/os.c
+++ b/os/tpf/os.c
@@ -34,10 +34,10 @@ int pipe(int fildes[2])
return(-1);
}
#endif
-
+
/* fork and exec functions are not defined on
TPF due to the implementation of tpf_fork() */
-
+
pid_t fork(void)
{
errno = ENOSYS;
diff --git a/os/unix/unixd.c b/os/unix/unixd.c
index b1e178dad4..215f0ffc12 100644
--- a/os/unix/unixd.c
+++ b/os/unix/unixd.c
@@ -142,7 +142,7 @@ AP_DECLARE(int) unixd_setup_child(void)
(long) unixd_config.user_id);
return -1;
}
-#if defined(HAVE_PRCTL) && defined(PR_SET_DUMPABLE)
+#if defined(HAVE_PRCTL) && defined(PR_SET_DUMPABLE)
/* this applies to Linux 2.4+ */
#ifdef AP_MPM_WANT_SET_COREDUMPDIR
if (ap_coredumpdir_configured) {
@@ -159,7 +159,7 @@ AP_DECLARE(int) unixd_setup_child(void)
}
-AP_DECLARE(const char *) unixd_set_user(cmd_parms *cmd, void *dummy,
+AP_DECLARE(const char *) unixd_set_user(cmd_parms *cmd, void *dummy,
const char *arg)
{
const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
@@ -186,7 +186,7 @@ AP_DECLARE(const char *) unixd_set_user(cmd_parms *cmd, void *dummy,
return NULL;
}
-AP_DECLARE(const char *) unixd_set_group(cmd_parms *cmd, void *dummy,
+AP_DECLARE(const char *) unixd_set_group(cmd_parms *cmd, void *dummy,
const char *arg)
{
const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
@@ -209,7 +209,7 @@ AP_DECLARE(void) unixd_pre_config(apr_pool_t *ptemp)
/* Check for suexec */
unixd_config.suexec_enabled = 0;
- if ((apr_stat(&wrapper, SUEXEC_BIN,
+ if ((apr_stat(&wrapper, SUEXEC_BIN,
APR_FINFO_NORM, ptemp)) != APR_SUCCESS) {
return;
}
@@ -220,7 +220,7 @@ AP_DECLARE(void) unixd_pre_config(apr_pool_t *ptemp)
}
-AP_DECLARE(void) unixd_set_rlimit(cmd_parms *cmd, struct rlimit **plimit,
+AP_DECLARE(void) unixd_set_rlimit(cmd_parms *cmd, struct rlimit **plimit,
const char *arg, const char * arg2, int type)
{
#if (defined(RLIMIT_CPU) || defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_NPROC) || defined(RLIMIT_AS)) && APR_HAVE_STRUCT_RLIMIT && APR_HAVE_GETRLIMIT
@@ -407,7 +407,7 @@ AP_DECLARE(apr_status_t) unixd_set_proc_mutex_perms(apr_proc_mutex_t *pmutex)
#endif
union semun ick;
struct semid_ds buf;
-
+
apr_os_proc_mutex_get(&ospmutex, pmutex);
buf.sem_perm.uid = unixd_config.user_id;
buf.sem_perm.gid = unixd_config.group_id;
@@ -464,7 +464,7 @@ AP_DECLARE(apr_status_t) unixd_accept(void **accepted, ap_listen_rec *lr,
*accepted = NULL;
status = apr_socket_accept(&csd, lr->sd, ptrans);
- if (status == APR_SUCCESS) {
+ if (status == APR_SUCCESS) {
*accepted = csd;
#ifdef _OSD_POSIX
apr_os_sock_get(&sockdes, csd);
diff --git a/os/win32/ap_regkey.c b/os/win32/ap_regkey.c
index 4f3a5061e2..93d1198683 100644
--- a/os/win32/ap_regkey.c
+++ b/os/win32/ap_regkey.c
@@ -29,7 +29,7 @@ struct ap_regkey_t {
AP_DECLARE(const ap_regkey_t *) ap_regkey_const(int i)
{
- static struct ap_regkey_t ap_regkey_consts[7] =
+ static struct ap_regkey_t ap_regkey_consts[7] =
{
{NULL, HKEY_CLASSES_ROOT},
{NULL, HKEY_CURRENT_CONFIG},
@@ -55,10 +55,10 @@ apr_status_t regkey_cleanup(void *key)
}
-AP_DECLARE(apr_status_t) ap_regkey_open(ap_regkey_t **newkey,
+AP_DECLARE(apr_status_t) ap_regkey_open(ap_regkey_t **newkey,
const ap_regkey_t *parentkey,
const char *keyname,
- apr_int32_t flags,
+ apr_int32_t flags,
apr_pool_t *pool)
{
DWORD access = KEY_QUERY_VALUE;
@@ -69,10 +69,10 @@ AP_DECLARE(apr_status_t) ap_regkey_open(ap_regkey_t **newkey,
if (flags & APR_READ)
access |= KEY_READ;
if (flags & APR_WRITE)
- access |= KEY_WRITE;
+ access |= KEY_WRITE;
#if APR_HAS_UNICODE_FS
- IF_WIN_OS_IS_UNICODE
+ IF_WIN_OS_IS_UNICODE
{
apr_size_t keylen = strlen(keyname) + 1;
apr_size_t wkeylen = 256;
@@ -84,7 +84,7 @@ AP_DECLARE(apr_status_t) ap_regkey_open(ap_regkey_t **newkey,
return APR_ENAMETOOLONG;
if (flags & APR_CREATE)
- rc = RegCreateKeyExW(parentkey->hkey, wkeyname, 0, NULL, 0,
+ rc = RegCreateKeyExW(parentkey->hkey, wkeyname, 0, NULL, 0,
access, NULL, &hkey, &exists);
else
rc = RegOpenKeyExW(parentkey->hkey, wkeyname, 0, access, &hkey);
@@ -94,7 +94,7 @@ AP_DECLARE(apr_status_t) ap_regkey_open(ap_regkey_t **newkey,
ELSE_WIN_OS_IS_ANSI
{
if (flags & APR_CREATE)
- rc = RegCreateKeyEx(parentkey->hkey, keyname, 0, NULL, 0,
+ rc = RegCreateKeyEx(parentkey->hkey, keyname, 0, NULL, 0,
access, NULL, &hkey, &exists);
else
rc = RegOpenKeyEx(parentkey->hkey, keyname, 0, access, &hkey);
@@ -111,7 +111,7 @@ AP_DECLARE(apr_status_t) ap_regkey_open(ap_regkey_t **newkey,
*newkey = apr_palloc(pool, sizeof(**newkey));
(*newkey)->pool = pool;
(*newkey)->hkey = hkey;
- apr_pool_cleanup_register((*newkey)->pool, (void *)(*newkey),
+ apr_pool_cleanup_register((*newkey)->pool, (void *)(*newkey),
regkey_cleanup, apr_pool_cleanup_null);
return APR_SUCCESS;
}
@@ -127,14 +127,14 @@ AP_DECLARE(apr_status_t) ap_regkey_close(ap_regkey_t *regkey)
}
-AP_DECLARE(apr_status_t) ap_regkey_remove(const ap_regkey_t *parent,
+AP_DECLARE(apr_status_t) ap_regkey_remove(const ap_regkey_t *parent,
const char *keyname,
apr_pool_t *pool)
{
LONG rc;
#if APR_HAS_UNICODE_FS
- IF_WIN_OS_IS_UNICODE
+ IF_WIN_OS_IS_UNICODE
{
apr_size_t keylen = strlen(keyname) + 1;
apr_size_t wkeylen = 256;
@@ -176,9 +176,9 @@ AP_DECLARE(apr_status_t) ap_regkey_remove(const ap_regkey_t *parent,
}
-AP_DECLARE(apr_status_t) ap_regkey_value_get(char **result,
- ap_regkey_t *key,
- const char *valuename,
+AP_DECLARE(apr_status_t) ap_regkey_value_get(char **result,
+ ap_regkey_t *key,
+ const char *valuename,
apr_pool_t *pool)
{
/* Retrieve a registry string value, and explode any envvars
@@ -187,9 +187,9 @@ AP_DECLARE(apr_status_t) ap_regkey_value_get(char **result,
LONG rc;
DWORD type;
apr_size_t size = 0;
-
+
#if APR_HAS_UNICODE_FS
- IF_WIN_OS_IS_UNICODE
+ IF_WIN_OS_IS_UNICODE
{
apr_size_t valuelen = strlen(valuename) + 1;
apr_size_t wvallen = 256;
@@ -212,7 +212,7 @@ AP_DECLARE(apr_status_t) ap_regkey_value_get(char **result,
wvalue = apr_palloc(pool, size);
/* Read value based on size query above */
- rc = RegQueryValueExW(key->hkey, wvalname, 0, &type,
+ rc = RegQueryValueExW(key->hkey, wvalname, 0, &type,
(LPBYTE)wvalue, (DWORD *)&size);
if (rc != ERROR_SUCCESS) {
return APR_FROM_OS_ERROR(rc);
@@ -280,10 +280,10 @@ AP_DECLARE(apr_status_t) ap_regkey_value_get(char **result,
}
-AP_DECLARE(apr_status_t) ap_regkey_value_set(ap_regkey_t *key,
- const char *valuename,
- const char *value,
- apr_int32_t flags,
+AP_DECLARE(apr_status_t) ap_regkey_value_set(ap_regkey_t *key,
+ const char *valuename,
+ const char *value,
+ apr_int32_t flags,
apr_pool_t *pool)
{
/* Retrieve a registry string value, and explode any envvars
@@ -292,9 +292,9 @@ AP_DECLARE(apr_status_t) ap_regkey_value_set(ap_regkey_t *key,
LONG rc;
apr_size_t size = strlen(value) + 1;
DWORD type = (flags & AP_REGKEY_EXPAND) ? REG_EXPAND_SZ : REG_SZ;
-
+
#if APR_HAS_UNICODE_FS
- IF_WIN_OS_IS_UNICODE
+ IF_WIN_OS_IS_UNICODE
{
apr_size_t alloclen;
apr_size_t valuelen = strlen(valuename) + 1;
@@ -307,7 +307,7 @@ AP_DECLARE(apr_status_t) ap_regkey_value_set(ap_regkey_t *key,
return rv;
else if (valuelen)
return APR_ENAMETOOLONG;
-
+
wvallen = alloclen = size;
wvalue = apr_palloc(pool, alloclen * 2);
rv = apr_conv_utf8_to_ucs2(value, &size, wvalue, &wvallen);
@@ -320,7 +320,7 @@ AP_DECLARE(apr_status_t) ap_regkey_value_set(ap_regkey_t *key,
* converted to bytes; the trailing L'\0' continues to be counted.
*/
size = (alloclen - wvallen) * 2;
- rc = RegSetValueExW(key->hkey, wvalname, 0, type,
+ rc = RegSetValueExW(key->hkey, wvalname, 0, type,
(LPBYTE)wvalue, (DWORD)size);
if (rc != ERROR_SUCCESS)
return APR_FROM_OS_ERROR(rc);
@@ -338,20 +338,20 @@ AP_DECLARE(apr_status_t) ap_regkey_value_set(ap_regkey_t *key,
}
-AP_DECLARE(apr_status_t) ap_regkey_value_raw_get(void **result,
+AP_DECLARE(apr_status_t) ap_regkey_value_raw_get(void **result,
apr_size_t *resultsize,
apr_int32_t *resulttype,
- ap_regkey_t *key,
- const char *valuename,
+ ap_regkey_t *key,
+ const char *valuename,
apr_pool_t *pool)
{
/* Retrieve a registry string value, and explode any envvars
* that the system has configured (e.g. %SystemRoot%/someapp.exe)
*/
LONG rc;
-
+
#if APR_HAS_UNICODE_FS
- IF_WIN_OS_IS_UNICODE
+ IF_WIN_OS_IS_UNICODE
{
apr_size_t valuelen = strlen(valuename) + 1;
apr_size_t wvallen = 256;
@@ -363,7 +363,7 @@ AP_DECLARE(apr_status_t) ap_regkey_value_raw_get(void **result,
else if (valuelen)
return APR_ENAMETOOLONG;
/* Read to NULL buffer to determine value size */
- rc = RegQueryValueExW(key->hkey, wvalname, 0, resulttype,
+ rc = RegQueryValueExW(key->hkey, wvalname, 0, resulttype,
NULL, (LPDWORD)resultsize);
if (rc != ERROR_SUCCESS) {
return APR_FROM_OS_ERROR(rc);
@@ -371,7 +371,7 @@ AP_DECLARE(apr_status_t) ap_regkey_value_raw_get(void **result,
/* Read value based on size query above */
*result = apr_palloc(pool, *resultsize);
- rc = RegQueryValueExW(key->hkey, wvalname, 0, resulttype,
+ rc = RegQueryValueExW(key->hkey, wvalname, 0, resulttype,
(LPBYTE)*result, (LPDWORD)resultsize);
}
#endif /* APR_HAS_UNICODE_FS */
@@ -379,14 +379,14 @@ AP_DECLARE(apr_status_t) ap_regkey_value_raw_get(void **result,
ELSE_WIN_OS_IS_ANSI
{
/* Read to NULL buffer to determine value size */
- rc = RegQueryValueEx(key->hkey, valuename, 0, resulttype,
+ rc = RegQueryValueEx(key->hkey, valuename, 0, resulttype,
NULL, (LPDWORD)resultsize);
if (rc != ERROR_SUCCESS)
return APR_FROM_OS_ERROR(rc);
/* Read value based on size query above */
*result = apr_palloc(pool, *resultsize);
- rc = RegQueryValueEx(key->hkey, valuename, 0, resulttype,
+ rc = RegQueryValueEx(key->hkey, valuename, 0, resulttype,
(LPBYTE)*result, (LPDWORD)resultsize);
if (rc != ERROR_SUCCESS)
return APR_FROM_OS_ERROR(rc);
@@ -400,17 +400,17 @@ AP_DECLARE(apr_status_t) ap_regkey_value_raw_get(void **result,
}
-AP_DECLARE(apr_status_t) ap_regkey_value_raw_set(ap_regkey_t *key,
- const char *valuename,
- const void *value,
+AP_DECLARE(apr_status_t) ap_regkey_value_raw_set(ap_regkey_t *key,
+ const char *valuename,
+ const void *value,
apr_size_t valuesize,
apr_int32_t valuetype,
apr_pool_t *pool)
{
LONG rc;
-
+
#if APR_HAS_UNICODE_FS
- IF_WIN_OS_IS_UNICODE
+ IF_WIN_OS_IS_UNICODE
{
apr_size_t valuelen = strlen(valuename) + 1;
apr_size_t wvallen = 256;
@@ -422,14 +422,14 @@ AP_DECLARE(apr_status_t) ap_regkey_value_raw_set(ap_regkey_t *key,
else if (valuelen)
return APR_ENAMETOOLONG;
- rc = RegSetValueExW(key->hkey, wvalname, 0, valuetype,
+ rc = RegSetValueExW(key->hkey, wvalname, 0, valuetype,
(LPBYTE)value, (DWORD)valuesize);
}
#endif /* APR_HAS_UNICODE_FS */
#if APR_HAS_ANSI_FS
ELSE_WIN_OS_IS_ANSI
{
- rc = RegSetValueEx(key->hkey, valuename, 0, valuetype,
+ rc = RegSetValueEx(key->hkey, valuename, 0, valuetype,
(LPBYTE)value, (DWORD)valuesize);
}
#endif
@@ -440,9 +440,9 @@ AP_DECLARE(apr_status_t) ap_regkey_value_raw_set(ap_regkey_t *key,
}
-AP_DECLARE(apr_status_t) ap_regkey_value_array_get(apr_array_header_t **result,
+AP_DECLARE(apr_status_t) ap_regkey_value_array_get(apr_array_header_t **result,
ap_regkey_t *key,
- const char *valuename,
+ const char *valuename,
apr_pool_t *pool)
{
/* Retrieve a registry string value, and explode any envvars
@@ -464,7 +464,7 @@ AP_DECLARE(apr_status_t) ap_regkey_value_array_get(apr_array_header_t **result,
}
#if APR_HAS_UNICODE_FS
- IF_WIN_OS_IS_UNICODE
+ IF_WIN_OS_IS_UNICODE
{
apr_size_t alloclen;
apr_size_t valuelen = strlen(valuename) + 1;
@@ -490,7 +490,7 @@ AP_DECLARE(apr_status_t) ap_regkey_value_array_get(apr_array_header_t **result,
#if APR_HAS_ANSI_FS
ELSE_WIN_OS_IS_ANSI
{
- /* Small possiblity the array is either unterminated
+ /* Small possiblity the array is either unterminated
* or single NULL terminated. Avert.
*/
buf = (char *)value;
@@ -524,9 +524,9 @@ AP_DECLARE(apr_status_t) ap_regkey_value_array_get(apr_array_header_t **result,
}
-AP_DECLARE(apr_status_t) ap_regkey_value_array_set(ap_regkey_t *key,
- const char *valuename,
- int nelts,
+AP_DECLARE(apr_status_t) ap_regkey_value_array_set(ap_regkey_t *key,
+ const char *valuename,
+ int nelts,
const char * const * elts,
apr_pool_t *pool)
{
@@ -536,9 +536,9 @@ AP_DECLARE(apr_status_t) ap_regkey_value_array_set(ap_regkey_t *key,
int i;
const void *value;
apr_size_t bufsize;
-
+
#if APR_HAS_UNICODE_FS
- IF_WIN_OS_IS_UNICODE
+ IF_WIN_OS_IS_UNICODE
{
apr_status_t rv;
apr_wchar_t *buf;
@@ -604,19 +604,19 @@ AP_DECLARE(apr_status_t) ap_regkey_value_array_set(ap_regkey_t *key,
value = buf;
}
#endif
- return ap_regkey_value_raw_set(key, valuename, value,
+ return ap_regkey_value_raw_set(key, valuename, value,
bufsize, REG_MULTI_SZ, pool);
}
-AP_DECLARE(apr_status_t) ap_regkey_value_remove(const ap_regkey_t *key,
+AP_DECLARE(apr_status_t) ap_regkey_value_remove(const ap_regkey_t *key,
const char *valuename,
apr_pool_t *pool)
{
LONG rc;
#if APR_HAS_UNICODE_FS
- IF_WIN_OS_IS_UNICODE
+ IF_WIN_OS_IS_UNICODE
{
apr_size_t valuelen = strlen(valuename) + 1;
apr_size_t wvallen = 256;
diff --git a/os/win32/util_win32.c b/os/win32/util_win32.c
index 537a88286d..fe07b3ce4e 100644
--- a/os/win32/util_win32.c
+++ b/os/win32/util_win32.c
@@ -31,12 +31,12 @@ AP_DECLARE(apr_status_t) ap_os_proc_filepath(char **binpath, apr_pool_t *p)
apr_wchar_t wbinpath[APR_PATH_MAX];
#if APR_HAS_UNICODE_FS
- IF_WIN_OS_IS_UNICODE
+ IF_WIN_OS_IS_UNICODE
{
apr_size_t binlen;
apr_size_t wbinlen;
apr_status_t rv;
- if (!GetModuleFileNameW(NULL, wbinpath, sizeof(wbinpath)
+ if (!GetModuleFileNameW(NULL, wbinpath, sizeof(wbinpath)
/ sizeof(apr_wchar_t))) {
return apr_get_os_error();
}
@@ -77,7 +77,7 @@ AP_DECLARE(apr_status_t) ap_os_create_privileged_process(
/* This code is stolen from misc/win32/misc.c and apr_private.h
- * This helper code resolves late bound entry points
+ * 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 ;-)
@@ -90,7 +90,7 @@ static HMODULE lateDllHandle[DLL_defined] = {
FARPROC ap_load_dll_func(ap_dlltoken_e fnLib, char* fnName, int ordinal)
{
- if (!lateDllHandle[fnLib]) {
+ if (!lateDllHandle[fnLib]) {
lateDllHandle[fnLib] = LoadLibrary(lateDllName[fnLib]);
if (!lateDllHandle[fnLib])
return NULL;
@@ -138,7 +138,7 @@ PSECURITY_ATTRIBUTES GetNullACL()
}
-void CleanNullACL(void *sa)
+void CleanNullACL(void *sa)
{
if (sa) {
LocalFree(((PSECURITY_ATTRIBUTES)sa)->lpSecurityDescriptor);
@@ -148,39 +148,39 @@ void CleanNullACL(void *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
+ * 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.
*/
-DWORD wait_for_many_objects(DWORD nCount, CONST HANDLE *lpHandles,
+DWORD wait_for_many_objects(DWORD nCount, CONST HANDLE *lpHandles,
DWORD dwSeconds)
{
time_t tStopTime;
DWORD dwRet = WAIT_TIMEOUT;
DWORD dwIndex=0;
BOOL bFirst = TRUE;
-
+
tStopTime = time(NULL) + dwSeconds;
-
+
do {
if (!bFirst)
Sleep(1000);
else
bFirst = FALSE;
-
+
for (dwIndex = 0; dwIndex * MAXIMUM_WAIT_OBJECTS < nCount; dwIndex++) {
- dwRet = WaitForMultipleObjects(
+ dwRet = WaitForMultipleObjects(
min(MAXIMUM_WAIT_OBJECTS, nCount - (dwIndex * MAXIMUM_WAIT_OBJECTS)),
- lpHandles + (dwIndex * MAXIMUM_WAIT_OBJECTS),
+ lpHandles + (dwIndex * MAXIMUM_WAIT_OBJECTS),
0, 0);
-
- if (dwRet != WAIT_TIMEOUT) {
+
+ if (dwRet != WAIT_TIMEOUT) {
break;
}
}
} while((time(NULL) < tStopTime) && (dwRet == WAIT_TIMEOUT));
-
+
return dwRet;
}