]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
prefix TRUE,FALSE with APR_
authorDoug MacEachern <dougm@apache.org>
Fri, 28 Apr 2000 06:49:53 +0000 (06:49 +0000)
committerDoug MacEachern <dougm@apache.org>
Fri, 28 Apr 2000 06:49:53 +0000 (06:49 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85074 13f79535-47bb-0310-9956-ffa450edef68

modules/arch/win32/mod_isapi.c
modules/experimental/mod_example.c
modules/mappers/mod_rewrite.h
modules/proxy/proxy_util.c
os/win32/mod_isapi.c
os/win32/util_win32.c
server/mpm/prefork/prefork.c
server/mpm/winnt/mpm_winnt.c
server/mpm/winnt/service.c

index ca5789ecf2d41d80d30fff20d7c56a9e16928040..bb8e152e1323b06c1d3698252812f48f8e0d9953 100644 (file)
@@ -348,15 +348,15 @@ BOOL WINAPI GetServerVariable (HCONN hConn, LPSTR lpszVariableName,
             if (strlen(result) > *lpdwSizeofBuffer) {
                 *lpdwSizeofBuffer = strlen(result);
                 SetLastError(ERROR_INSUFFICIENT_BUFFER);
-                return FALSE;
+                return APR_FALSE;
             }
             strncpy(lpvBuffer, result, *lpdwSizeofBuffer);
-            return TRUE;
+            return APR_TRUE;
     }
 
     /* Didn't find it */
     SetLastError(ERROR_INVALID_INDEX);
-    return FALSE;
+    return APR_FALSE;
 }
 
 BOOL WINAPI WriteClient (HCONN ConnID, LPVOID Buffer, LPDWORD lpwdwBytes,
@@ -370,22 +370,22 @@ BOOL WINAPI WriteClient (HCONN ConnID, LPVOID Buffer, LPDWORD lpwdwBytes,
             ap_log_rerror(APLOG_MARK, APLOG_WARNING, ERROR_INVALID_PARAMETER, r,
                       "ISAPI asynchronous I/O not supported: %s", r->filename);
             SetLastError(ERROR_INVALID_PARAMETER);
-            return FALSE;
+            return APR_FALSE;
     }
 
     if ((writ = ap_rwrite(Buffer, *lpwdwBytes, r)) == EOF) {
             SetLastError(WSAEDISCON); /* TODO: Find the right error code */
-            return FALSE;
+            return APR_FALSE;
     }
 
     *lpwdwBytes = writ;
-    return TRUE;
+    return APR_TRUE;
 }
 
 BOOL WINAPI ReadClient (HCONN ConnID, LPVOID lpvBuffer, LPDWORD lpdwSize)
 {
     /* Doesn't need to do anything; we've read all the data already */
-    return TRUE;
+    return APR_TRUE;
 }
 
 /* XXX: There is an O(n^2) attack possible here. */
@@ -404,7 +404,7 @@ BOOL WINAPI ServerSupportFunction (HCONN hConn, DWORD dwHSERequest,
          */
         ap_table_set (r->headers_out, "Location", lpvBuffer);
         cid->status = cid->r->status = cid->ecb->dwHttpStatusCode = REDIRECT;
-        return TRUE;
+        return APR_TRUE;
 
     case HSE_REQ_SEND_URL:
         /* Read any additional input */
@@ -423,7 +423,7 @@ BOOL WINAPI ServerSupportFunction (HCONN hConn, DWORD dwHSERequest,
         ap_table_unset(r->headers_in, "Content-Length");
 
         ap_internal_redirect((char *)lpvBuffer, r);
-        return TRUE;
+        return APR_TRUE;
 
     case HSE_REQ_SEND_RESPONSE_HEADER:
             r->status_line = lpvBuffer ? lpvBuffer : ap_pstrdup(r->pool, "200 OK");
@@ -439,7 +439,7 @@ BOOL WINAPI ServerSupportFunction (HCONN hConn, DWORD dwHSERequest,
              */
             if (!lpdwDataType) {
                 ap_send_http_header(r);
-                return TRUE;
+                return APR_TRUE;
             }
 
             /* Make a copy - don't disturb the original */
@@ -458,7 +458,7 @@ BOOL WINAPI ServerSupportFunction (HCONN hConn, DWORD dwHSERequest,
                         ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
                                     "ISA sent invalid headers: %s", r->filename);
                         SetLastError(TODO_ERROR);
-                        return FALSE;
+                        return APR_FALSE;
                 }
 
                 /* Get rid of \n and \r */
@@ -480,7 +480,7 @@ BOOL WINAPI ServerSupportFunction (HCONN hConn, DWORD dwHSERequest,
                         SetLastError(TODO_ERROR);
                         ap_log_rerror(APLOG_MARK, APLOG_ERR, SERVER_ERROR, r,
                                           "ISA sent invalid headers", r->filename);
-                        return FALSE;
+                        return APR_FALSE;
                 }
 
                 *value++ = '\0';
@@ -532,7 +532,7 @@ BOOL WINAPI ServerSupportFunction (HCONN hConn, DWORD dwHSERequest,
             /* Any data left should now be sent directly */
             ap_rputs(data, r);
 
-            return TRUE;
+            return APR_TRUE;
 
     case HSE_REQ_MAP_URL_TO_PATH:
             /* Map a URL to a filename */
@@ -550,13 +550,13 @@ BOOL WINAPI ServerSupportFunction (HCONN hConn, DWORD dwHSERequest,
                     ((char *)lpvBuffer)[l + 1] = '\0';
             }
 
-            return TRUE;
+            return APR_TRUE;
 
     case HSE_REQ_DONE_WITH_SESSION:
             /* Do nothing... since we don't support async I/O, they'll
              * return from HttpExtensionProc soon
              */
-            return TRUE;
+            return APR_TRUE;
 
     /* We don't support all this async I/O, Microsoft-specific stuff */
     case HSE_REQ_IO_COMPLETION:
@@ -565,7 +565,7 @@ BOOL WINAPI ServerSupportFunction (HCONN hConn, DWORD dwHSERequest,
                         "ISAPI asynchronous I/O not supported: %s", r->filename);
     default:
             SetLastError(ERROR_INVALID_PARAMETER);
-            return FALSE;
+            return APR_FALSE;
     }
 }
 
index 7d588e73b971bd52e5ff91e5db192a53750eb36d..56e236f1a07709af0526ff51604d68c13c808fcd 100644 (file)
@@ -775,7 +775,7 @@ static void *example_merge_dir_config(ap_pool_t *p, void *parent_conf,
     merged_config->loc = ap_pstrdup(p, nconf->loc);
     /*
      * Others, like the setting of the `congenital' flag, get ORed in.  The
-     * setting of that particular flag, for instance, is TRUE if it was ever
+     * setting of that particular flag, for instance, is APR_TRUE if it was ever
      * true anywhere in the upstream configuration.
      */
     merged_config->congenital = (pconf->congenital | pconf->local);
index a09d51474cb2e0f8f86064e22622e968338134cb..b46e8e683024f8dced6d5d94cfa831bed1ca7378 100644 (file)
 #define CACHE_TLB_ROWS 1024
 #define CACHE_TLB_COLS 4
 
-#ifndef FALSE
-#define FALSE 0
-#define TRUE  !FALSE
+#ifndef APR_FALSE
+#define APR_FALSE 0
+#define APR_TRUE  !APR_FALSE
 #endif
 
 #ifndef NO
-#define NO    FALSE
-#define YES   TRUE
+#define NO    APR_FALSE
+#define YES   APR_TRUE
 #endif
 
 #ifndef RAND_MAX
index 79f346ab96adbb0ef9d8b2b1037b24980def4151..c4be69b49331cb992385a7ac2419558d9519ddc2 100644 (file)
@@ -906,7 +906,7 @@ static const char *
     return host;               /* ought to return the port, too */
 }
 
-/* Return TRUE if addr represents an IP address (or an IP network address) */
+/* Return APR_TRUE if addr represents an IP address (or an IP network address) */
 int ap_proxy_is_ipaddr(struct dirconn_entry *This, ap_pool_t *p)
 {
     const char *addr = This->name;
@@ -1010,7 +1010,7 @@ int ap_proxy_is_ipaddr(struct dirconn_entry *This, ap_pool_t *p)
        return (*addr == '\0'); /* okay iff we've parsed the whole string */
 }
 
-/* Return TRUE if addr represents an IP address (or an IP network address) */
+/* Return APR_TRUE if addr represents an IP address (or an IP network address) */
 static int proxy_match_ipaddr(struct dirconn_entry *This, request_rec *r)
 {
     int i;
@@ -1102,7 +1102,7 @@ static int proxy_match_ipaddr(struct dirconn_entry *This, request_rec *r)
     return 0;
 }
 
-/* Return TRUE if addr represents a domain name */
+/* Return APR_TRUE if addr represents a domain name */
 int ap_proxy_is_domainname(struct dirconn_entry *This, ap_pool_t *p)
 {
     char *addr = This->name;
@@ -1135,7 +1135,7 @@ int ap_proxy_is_domainname(struct dirconn_entry *This, ap_pool_t *p)
     return 1;
 }
 
-/* Return TRUE if host "host" is in domain "domain" */
+/* Return APR_TRUE if host "host" is in domain "domain" */
 static int proxy_match_domainname(struct dirconn_entry *This, request_rec *r)
 {
     const char *host = proxy_get_host_of_request(r);
@@ -1156,7 +1156,7 @@ static int proxy_match_domainname(struct dirconn_entry *This, request_rec *r)
        && strncasecmp(&host[h_len - d_len], This->name, d_len) == 0;
 }
 
-/* Return TRUE if addr represents a host name */
+/* Return APR_TRUE if addr represents a host name */
 int ap_proxy_is_hostname(struct dirconn_entry *This, ap_pool_t *p)
 {
     struct hostent host;
@@ -1191,7 +1191,7 @@ int ap_proxy_is_hostname(struct dirconn_entry *This, ap_pool_t *p)
     return 1;
 }
 
-/* Return TRUE if host "host" is equal to host2 "host2" */
+/* Return APR_TRUE if host "host" is equal to host2 "host2" */
 static int proxy_match_hostname(struct dirconn_entry *This, request_rec *r)
 {
     char *host = This->name;
@@ -1223,14 +1223,14 @@ static int proxy_match_hostname(struct dirconn_entry *This, request_rec *r)
        && strncasecmp(host, host2, h1_len) == 0;
 }
 
-/* Return TRUE if addr is to be matched as a word */
+/* Return APR_TRUE if addr is to be matched as a word */
 int ap_proxy_is_word(struct dirconn_entry *This, ap_pool_t *p)
 {
     This->matcher = proxy_match_word;
     return 1;
 }
 
-/* Return TRUE if string "str2" occurs literally in "str1" */
+/* Return APR_TRUE if string "str2" occurs literally in "str1" */
 static int proxy_match_word(struct dirconn_entry *This, request_rec *r)
 {
     const char *host = proxy_get_host_of_request(r);
index ca5789ecf2d41d80d30fff20d7c56a9e16928040..bb8e152e1323b06c1d3698252812f48f8e0d9953 100644 (file)
@@ -348,15 +348,15 @@ BOOL WINAPI GetServerVariable (HCONN hConn, LPSTR lpszVariableName,
             if (strlen(result) > *lpdwSizeofBuffer) {
                 *lpdwSizeofBuffer = strlen(result);
                 SetLastError(ERROR_INSUFFICIENT_BUFFER);
-                return FALSE;
+                return APR_FALSE;
             }
             strncpy(lpvBuffer, result, *lpdwSizeofBuffer);
-            return TRUE;
+            return APR_TRUE;
     }
 
     /* Didn't find it */
     SetLastError(ERROR_INVALID_INDEX);
-    return FALSE;
+    return APR_FALSE;
 }
 
 BOOL WINAPI WriteClient (HCONN ConnID, LPVOID Buffer, LPDWORD lpwdwBytes,
@@ -370,22 +370,22 @@ BOOL WINAPI WriteClient (HCONN ConnID, LPVOID Buffer, LPDWORD lpwdwBytes,
             ap_log_rerror(APLOG_MARK, APLOG_WARNING, ERROR_INVALID_PARAMETER, r,
                       "ISAPI asynchronous I/O not supported: %s", r->filename);
             SetLastError(ERROR_INVALID_PARAMETER);
-            return FALSE;
+            return APR_FALSE;
     }
 
     if ((writ = ap_rwrite(Buffer, *lpwdwBytes, r)) == EOF) {
             SetLastError(WSAEDISCON); /* TODO: Find the right error code */
-            return FALSE;
+            return APR_FALSE;
     }
 
     *lpwdwBytes = writ;
-    return TRUE;
+    return APR_TRUE;
 }
 
 BOOL WINAPI ReadClient (HCONN ConnID, LPVOID lpvBuffer, LPDWORD lpdwSize)
 {
     /* Doesn't need to do anything; we've read all the data already */
-    return TRUE;
+    return APR_TRUE;
 }
 
 /* XXX: There is an O(n^2) attack possible here. */
@@ -404,7 +404,7 @@ BOOL WINAPI ServerSupportFunction (HCONN hConn, DWORD dwHSERequest,
          */
         ap_table_set (r->headers_out, "Location", lpvBuffer);
         cid->status = cid->r->status = cid->ecb->dwHttpStatusCode = REDIRECT;
-        return TRUE;
+        return APR_TRUE;
 
     case HSE_REQ_SEND_URL:
         /* Read any additional input */
@@ -423,7 +423,7 @@ BOOL WINAPI ServerSupportFunction (HCONN hConn, DWORD dwHSERequest,
         ap_table_unset(r->headers_in, "Content-Length");
 
         ap_internal_redirect((char *)lpvBuffer, r);
-        return TRUE;
+        return APR_TRUE;
 
     case HSE_REQ_SEND_RESPONSE_HEADER:
             r->status_line = lpvBuffer ? lpvBuffer : ap_pstrdup(r->pool, "200 OK");
@@ -439,7 +439,7 @@ BOOL WINAPI ServerSupportFunction (HCONN hConn, DWORD dwHSERequest,
              */
             if (!lpdwDataType) {
                 ap_send_http_header(r);
-                return TRUE;
+                return APR_TRUE;
             }
 
             /* Make a copy - don't disturb the original */
@@ -458,7 +458,7 @@ BOOL WINAPI ServerSupportFunction (HCONN hConn, DWORD dwHSERequest,
                         ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
                                     "ISA sent invalid headers: %s", r->filename);
                         SetLastError(TODO_ERROR);
-                        return FALSE;
+                        return APR_FALSE;
                 }
 
                 /* Get rid of \n and \r */
@@ -480,7 +480,7 @@ BOOL WINAPI ServerSupportFunction (HCONN hConn, DWORD dwHSERequest,
                         SetLastError(TODO_ERROR);
                         ap_log_rerror(APLOG_MARK, APLOG_ERR, SERVER_ERROR, r,
                                           "ISA sent invalid headers", r->filename);
-                        return FALSE;
+                        return APR_FALSE;
                 }
 
                 *value++ = '\0';
@@ -532,7 +532,7 @@ BOOL WINAPI ServerSupportFunction (HCONN hConn, DWORD dwHSERequest,
             /* Any data left should now be sent directly */
             ap_rputs(data, r);
 
-            return TRUE;
+            return APR_TRUE;
 
     case HSE_REQ_MAP_URL_TO_PATH:
             /* Map a URL to a filename */
@@ -550,13 +550,13 @@ BOOL WINAPI ServerSupportFunction (HCONN hConn, DWORD dwHSERequest,
                     ((char *)lpvBuffer)[l + 1] = '\0';
             }
 
-            return TRUE;
+            return APR_TRUE;
 
     case HSE_REQ_DONE_WITH_SESSION:
             /* Do nothing... since we don't support async I/O, they'll
              * return from HttpExtensionProc soon
              */
-            return TRUE;
+            return APR_TRUE;
 
     /* We don't support all this async I/O, Microsoft-specific stuff */
     case HSE_REQ_IO_COMPLETION:
@@ -565,7 +565,7 @@ BOOL WINAPI ServerSupportFunction (HCONN hConn, DWORD dwHSERequest,
                         "ISAPI asynchronous I/O not supported: %s", r->filename);
     default:
             SetLastError(ERROR_INVALID_PARAMETER);
-            return FALSE;
+            return APR_FALSE;
     }
 }
 
index d30fbea0d51827d6932fc6d60760cad29d1e6b42..3fb09a60d044431f46e7b925c3019e682582342f 100644 (file)
@@ -65,7 +65,7 @@
 #include "httpd.h"
 #include "http_log.h"
 
-/* Returns TRUE if the input string is a string
+/* Returns APR_TRUE if the input string is a string
  * of one or more '.' characters.
  */
 static BOOL OnlyDots(char *pString)
@@ -73,13 +73,13 @@ static BOOL OnlyDots(char *pString)
     char *c;
 
     if (*pString == '\0')
-        return FALSE;
+        return APR_FALSE;
 
     for (c = pString;*c;c++)
         if (*c != '.')
-            return FALSE;
+            return APR_FALSE;
 
-    return TRUE;
+    return APR_TRUE;
 }
 
 /* Accepts as input a pathname, and tries to match it to an 
@@ -93,8 +93,8 @@ API_EXPORT(char *) ap_os_systemcase_filename(ap_pool_t *pPool,
     char buf[HUGE_STRING_LEN];
     char *pInputName;
     char *p, *q;
-    BOOL bDone = FALSE;
-    BOOL bFileExists = TRUE;
+    BOOL bDone = APR_FALSE;
+    BOOL bFileExists = APR_TRUE;
     HANDLE hFind;
     WIN32_FIND_DATA wfd;
 
@@ -119,7 +119,7 @@ API_EXPORT(char *) ap_os_systemcase_filename(ap_pool_t *pPool,
 
         /* If all we have is a drive letter, then we are done */
         if (strlen(pInputName) == 2)
-            bDone = TRUE;
+            bDone = APR_TRUE;
     }
     
     q = p;
@@ -156,7 +156,7 @@ API_EXPORT(char *) ap_os_systemcase_filename(ap_pool_t *pPool,
             *p = '\0';
 
         if (strchr(q, '*') || strchr(q, '?'))
-            bFileExists = FALSE;
+            bFileExists = APR_FALSE;
 
         /* If the path exists so far, call FindFirstFile
          * again.  However, if this portion of the path contains
@@ -169,7 +169,7 @@ API_EXPORT(char *) ap_os_systemcase_filename(ap_pool_t *pPool,
             hFind = FindFirstFile(pInputName, &wfd);
             
             if (hFind == INVALID_HANDLE_VALUE) {
-                bFileExists = FALSE;
+                bFileExists = APR_FALSE;
             }
             else {
                 FindClose(hFind);
@@ -190,7 +190,7 @@ API_EXPORT(char *) ap_os_systemcase_filename(ap_pool_t *pPool,
             p = strchr(p, '\\');
         }
         else {
-            bDone = TRUE;
+            bDone = APR_TRUE;
         }
     }
     
index 3c68849ccaed199a644ed8ddf0258401336d724c..8d6692fe06896a9fd50b6dcd24ba5cf942193a0c 100644 (file)
@@ -691,7 +691,7 @@ static void accept_mutex_child_init(ap_pool_t *p)
  */
 static void accept_mutex_init(ap_pool_t *p)
 {
-    int rc = DosCreateMutexSem(NULL, &lock_sem, DC_SEM_SHARED, FALSE);
+    int rc = DosCreateMutexSem(NULL, &lock_sem, DC_SEM_SHARED, APR_FALSE);
 
     if (rc != 0) {
        ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_EMERG, server_conf,
index 71017ae7e10ab4dcf86dd312b49346666165bbc9..8843a312bfcdc6cbc71ffa31f4616d52b437f7a1 100644 (file)
@@ -172,7 +172,7 @@ static PSECURITY_ATTRIBUTES GetNullACL()
         LocalFree( sa );
         return NULL;
     }
-    if (!SetSecurityDescriptorDacl(pSD, TRUE, (PACL) NULL, FALSE)
+    if (!SetSecurityDescriptorDacl(pSD, APR_TRUE, (PACL) NULL, APR_FALSE)
        || GetLastError()) {
         LocalFree( pSD );
         LocalFree( sa );
@@ -180,7 +180,7 @@ static PSECURITY_ATTRIBUTES GetNullACL()
     }
     sa->nLength = sizeof(sa);
     sa->lpSecurityDescriptor = pSD;
-    sa->bInheritHandle = TRUE;
+    sa->bInheritHandle = APR_TRUE;
     return sa;
 }
 
@@ -204,7 +204,7 @@ static DWORD wait_for_many_objects(DWORD nCount, CONST HANDLE *lpHandles,
     time_t tStopTime;
     DWORD dwRet = WAIT_TIMEOUT;
     DWORD dwIndex=0;
-    BOOL bFirst = TRUE;
+    BOOL bFirst = APR_TRUE;
   
     tStopTime = time(NULL) + dwSeconds;
   
@@ -212,7 +212,7 @@ static DWORD wait_for_many_objects(DWORD nCount, CONST HANDLE *lpHandles,
         if (!bFirst)
             Sleep(1000);
         else
-            bFirst = FALSE;
+            bFirst = APR_FALSE;
           
         for (dwIndex = 0; dwIndex * MAXIMUM_WAIT_OBJECTS < nCount; dwIndex++) {
             dwRet = WaitForMultipleObjects( 
@@ -279,7 +279,7 @@ static void signal_parent(int type)
     case 1: signal_name = signal_restart_name; break;
     default: return;
     }
-    e = OpenEvent(EVENT_ALL_ACCESS, FALSE, signal_name);
+    e = OpenEvent(EVENT_ALL_ACCESS, APR_FALSE, signal_name);
     if (!e) {
        /* Um, problem, can't signal the parent, which means we can't
         * signal ourselves to die. Ignore for now...
@@ -819,7 +819,7 @@ static int create_acceptex_context(ap_pool_t *_pconf, ap_listen_rec *lr)
 
     /* initialize the completion context */
     context->lr = lr;
-    context->Overlapped.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL); 
+    context->Overlapped.hEvent = CreateEvent(NULL, APR_TRUE, APR_FALSE, NULL); 
     if (context->Overlapped.hEvent == NULL) {
         ap_log_error(APLOG_MARK,APLOG_ERR, GetLastError(), server_conf,
                      "create_acceptex_context: CreateEvent() failed. Process will exit.");
@@ -1130,7 +1130,7 @@ static void child_main()
     if (one_process) {
         /* Single process mode */
         ap_create_lock(&start_mutex,APR_MUTEX, APR_CROSS_PROCESS,signal_name_prefix,pconf);
-        exit_event = CreateEvent(NULL, TRUE, FALSE, exit_event_name);
+        exit_event = CreateEvent(NULL, APR_TRUE, APR_FALSE, exit_event_name);
 
         setup_listeners(server_conf);
         bind_listeners_to_completion_port();
@@ -1138,7 +1138,7 @@ static void child_main()
     else {
         /* Child process mode */
         ap_child_init_lock(&start_mutex, signal_name_prefix, pconf);
-        exit_event = OpenEvent(EVENT_ALL_ACCESS, FALSE, exit_event_name);
+        exit_event = OpenEvent(EVENT_ALL_ACCESS, APR_FALSE, exit_event_name);
         ap_log_error(APLOG_MARK, APLOG_INFO, APR_SUCCESS, server_conf,
                      "Child %d: exit_event_name = %s", my_pid, exit_event_name);
 
@@ -1146,7 +1146,7 @@ static void child_main()
     }
 
     /* Initialize the child_events */
-    maintenance_event = CreateEvent(NULL, TRUE, FALSE, NULL);
+    maintenance_event = CreateEvent(NULL, APR_TRUE, APR_FALSE, NULL);
     child_events[0] = exit_event;
     child_events[1] = maintenance_event;
 
@@ -1206,7 +1206,7 @@ static void child_main()
      *    number of completion contexts, etc.)
      */
     while (!workers_may_exit) {
-        rv = WaitForMultipleObjects(2, (HANDLE *) child_events, FALSE, INFINITE);
+        rv = WaitForMultipleObjects(2, (HANDLE *) child_events, APR_FALSE, INFINITE);
         cld = rv - WAIT_OBJECT_0;
         if (rv == WAIT_FAILED) {
             /* Something serious is wrong */
@@ -1220,7 +1220,7 @@ static void child_main()
             Sleep(1000);
 
             /* Drain any remaining contexts. May loose a few connections here. */
-            drain_acceptex_complport(AcceptExCompPort, FALSE);
+            drain_acceptex_complport(AcceptExCompPort, APR_FALSE);
         }
         else if (rv == WAIT_TIMEOUT) {
             /* Hey, this cannot happen */
@@ -1365,7 +1365,7 @@ static int create_process(ap_pool_t *p, HANDLE *handles, HANDLE *events, int *pr
     SECURITY_ATTRIBUTES sa = {0};  
 
     sa.nLength = sizeof(sa);
-    sa.bInheritHandle = TRUE;
+    sa.bInheritHandle = APR_TRUE;
     sa.lpSecurityDescriptor = NULL;
 
     /* Build the command line. Should look something like this:
@@ -1409,7 +1409,7 @@ static int create_process(ap_pool_t *p, HANDLE *handles, HANDLE *events, int *pr
     si.hStdInput   = hPipeRead;
 
     if (!CreateProcess(NULL, pCommand, NULL, NULL, 
-                       TRUE,               /* Inherit handles */
+                       APR_TRUE,               /* Inherit handles */
                        CREATE_SUSPENDED,   /* Creation flags */
                        NULL,               /* Environment block */
                        NULL,
@@ -1436,9 +1436,9 @@ static int create_process(ap_pool_t *p, HANDLE *handles, HANDLE *events, int *pr
 
         /* Create the exit_event, apCchild_pid */
         sa.nLength = sizeof(sa);
-        sa.bInheritHandle = TRUE;
+        sa.bInheritHandle = APR_TRUE;
         sa.lpSecurityDescriptor = NULL;        
-        kill_event = CreateEvent(&sa, TRUE, FALSE, ap_psprintf(pconf,"apC%d", pi.dwProcessId));
+        kill_event = CreateEvent(&sa, APR_TRUE, APR_FALSE, ap_psprintf(pconf,"apC%d", pi.dwProcessId));
         if (!kill_event) {
             ap_log_error(APLOG_MARK, APLOG_CRIT, GetLastError(), server_conf,
                          "Parent: Could not create exit event for child process");
@@ -1486,7 +1486,7 @@ static int create_process(ap_pool_t *p, HANDLE *handles, HANDLE *events, int *pr
             /* Now, send the AcceptEx completion port to the child */
             if (!DuplicateHandle(GetCurrentProcess(), AcceptExCompPort, 
                                  pi.hProcess, &hDupedCompPort,  0,
-                                 TRUE, DUPLICATE_SAME_ACCESS)) {
+                                 APR_TRUE, DUPLICATE_SAME_ACCESS)) {
                 ap_log_error(APLOG_MARK, APLOG_CRIT, GetLastError(), server_conf,
                              "Parent: Unable to duplicate AcceptEx completion port. Shutting down.");
                 return -1;
@@ -1540,7 +1540,7 @@ static int master_main(server_rec *s, HANDLE shutdown_event, HANDLE restart_even
     process_handles[current_live_processes+1] = restart_event;
 
     rv = WaitForMultipleObjects(current_live_processes+2, (HANDLE *)process_handles, 
-                                FALSE, INFINITE);
+                                APR_FALSE, INFINITE);
     cld = rv - WAIT_OBJECT_0;
     if (rv == WAIT_FAILED) {
         /* Something serious is wrong */
@@ -1608,7 +1608,7 @@ static int master_main(server_rec *s, HANDLE shutdown_event, HANDLE restart_even
 
         /* Drain the AcceptEx completion port of any outstanding I/O pending for the dead 
          * process. */
-        drain_acceptex_complport(AcceptExCompPort, FALSE);
+        drain_acceptex_complport(AcceptExCompPort, APR_FALSE);
     }
 
 die_now:
@@ -1623,7 +1623,7 @@ die_now:
         }
 
         while (current_live_processes && ((tmstart+60) > time(NULL))) {
-            rv = WaitForMultipleObjects(current_live_processes, (HANDLE *)process_handles, FALSE, 2000);
+            rv = WaitForMultipleObjects(current_live_processes, (HANDLE *)process_handles, APR_FALSE, 2000);
             if (rv == WAIT_TIMEOUT)
                 continue;
             ap_assert(rv != WAIT_FAILED);
@@ -1709,7 +1709,7 @@ static void winnt_post_config(ap_pool_t *pconf, ap_pool_t *plog, ap_pool_t *ptem
             /* Create shutdown event, apPID_shutdown, where PID is the parent 
              * Apache process ID. Shutdown is signaled by 'apache -k shutdown'.
              */
-            shutdown_event = CreateEvent(sa, FALSE, FALSE, signal_shutdown_name);
+            shutdown_event = CreateEvent(sa, FALSE, APR_FALSE, signal_shutdown_name);
             if (!shutdown_event) {
                 ap_log_error(APLOG_MARK, APLOG_EMERG, GetLastError(), server_conf,
                              "Parent: Cannot create shutdown event %s", signal_shutdown_name);
@@ -1720,7 +1720,7 @@ static void winnt_post_config(ap_pool_t *pconf, ap_pool_t *plog, ap_pool_t *ptem
             /* Create restart event, apPID_restart, where PID is the parent 
              * Apache process ID. Restart is signaled by 'apache -k restart'.
              */
-            restart_event = CreateEvent(sa, FALSE, FALSE, signal_restart_name);
+            restart_event = CreateEvent(sa, FALSE, APR_FALSE, signal_restart_name);
             if (!restart_event) {
                 CloseHandle(shutdown_event);
                 ap_log_error(APLOG_MARK, APLOG_EMERG, GetLastError(), server_conf,
index c99b4abe62ed1c9788a0eee66eb65301944a25ef..2cb50c3155c427f0e12647593afaf40ee314ebf2 100644 (file)
@@ -404,9 +404,9 @@ void RemoveService(char *display_name)
 
 BOOL isProcessService() {
     if( !AllocConsole() ) 
-        return FALSE;
+        return APR_FALSE;
     FreeConsole();
-    return TRUE;
+    return APR_TRUE;
 }
 
 /* Determine is service_name is a valid service
@@ -423,13 +423,13 @@ BOOL isValidService(char *display_name) {
     if (!(schSCM = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS))) {
         ap_log_error(APLOG_MARK, APLOG_ERR, GetLastError(), NULL,
                      "OpenSCManager failed");
-       return FALSE;
+       return APR_FALSE;
     }
 
     if ((schSVC = OpenService(schSCM, service_name, SERVICE_ALL_ACCESS))) {
         CloseServiceHandle(schSVC);
         CloseServiceHandle(schSCM);
-        return TRUE;
+        return APR_TRUE;
     }
 
     Err = GetLastError();
@@ -437,14 +437,14 @@ BOOL isValidService(char *display_name) {
         ap_log_error(APLOG_MARK, APLOG_ERR, Err, NULL,
                      "OpenService failed");
 
-    return FALSE;
+    return APR_FALSE;
 }
 
 int send_signal_to_service(char *display_name, char *sig) {
     SC_HANDLE   schService;
     SC_HANDLE   schSCManager;
     char service_name[256];
-    int success = FALSE;
+    int success = APR_FALSE;
 
     enum                        { start,      restart,      stop, unknown } action;
     static char *param[] =      { "start",    "restart",    "shutdown" };
@@ -457,7 +457,7 @@ int send_signal_to_service(char *display_name, char *sig) {
 
     if (action == unknown) {
         printf("signal must be start, restart, or shutdown\n");
-        return FALSE;
+        return APR_FALSE;
     }
 
     /* Remove spaces from display name to create service name */
@@ -525,8 +525,8 @@ int ap_stop_service(SC_HANDLE schService)
     }
     if (QueryServiceStatus(schService, &globdat.ssStatus))
         if (globdat.ssStatus.dwCurrentState == SERVICE_STOPPED)
-            return TRUE;
-    return FALSE;
+            return APR_TRUE;
+    return APR_FALSE;
 }
 
 int ap_start_service(SC_HANDLE schService) {
@@ -541,8 +541,8 @@ int ap_start_service(SC_HANDLE schService) {
     }
     if (QueryServiceStatus(schService, &globdat.ssStatus))
         if (globdat.ssStatus.dwCurrentState == SERVICE_RUNNING)
-            return TRUE;
-    return FALSE;
+            return APR_TRUE;
+    return APR_FALSE;
 }
            
 #endif /* WIN32 */