From cvs-return-3006-apmail-apr-cvs-archive=apr.apache.org@apr.apache.org Mon Feb 18 05:39:09 2002 Return-Path: Delivered-To: apmail-apr-cvs-archive@apr.apache.org Received: (qmail 7968 invoked by uid 500); 18 Feb 2002 05:39:09 -0000 Mailing-List: contact cvs-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: dev@apr.apache.org Delivered-To: mailing list cvs@apr.apache.org Received: (qmail 7957 invoked from network); 18 Feb 2002 05:39:09 -0000 Date: 18 Feb 2002 05:39:08 -0000 Message-ID: <20020218053908.57396.qmail@icarus.apache.org> From: wrowe@apache.org To: apr-cvs@apache.org Subject: cvs commit: apr/misc/unix start.c X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N wrowe 02/02/17 21:39:08 Modified: misc/unix start.c Log: Changed apr_app_main to apr_app_initialize, but better yet - dropped all the illegible multiple-path fooness. See misc/win32/start.c for the same with lots of extra decoration. Revision Changes Path 1.62 +4 -40 apr/misc/unix/start.c Index: start.c =================================================================== RCS file: /home/cvs/apr/misc/unix/start.c,v retrieving revision 1.61 retrieving revision 1.62 diff -u -r1.61 -r1.62 --- start.c 1 Feb 2002 17:27:38 -0000 1.61 +++ start.c 18 Feb 2002 05:39:07 -0000 1.62 @@ -57,25 +57,20 @@ #include "apr_pools.h" #include "apr_signal.h" -#include "misc.h" /* for WSAHighByte / WSALowByte */ #include "locks.h" /* for apr_unix_setup_lock() */ #include "proc_mutex.h" /* for apr_proc_mutex_unix_setup_lock() */ #include "internal_time.h" -#ifndef WIN32 -APR_DECLARE(apr_status_t) apr_app_main(int *argc, char ***argv, char ***env) +APR_DECLARE(apr_status_t) apr_app_initialize(int *argc, char ***argv, char ***env) { /* An absolute noop. At present, only Win32 requires this stub, but it's * required in order to move command arguments passed through the service * control manager into the process, and it's required to fix the char* - * data passed in from local/wide codepage into utf-8, our internal fmt. - * - * Win32 declares it's implementation in misc/win32/apr_app.c + * data passed in from win32 unicode into utf-8, win32's apr internal fmt. */ - return APR_SUCCESS; + return apr_initialize(); } -#endif static int initialized = 0; @@ -83,20 +78,12 @@ { apr_pool_t *pool; apr_status_t status; -#if defined WIN32 - int iVersionRequested; - WSADATA wsaData; - int err; -#endif -#if defined WIN32 - apr_oslevel_e osver; -#endif if (initialized++) { return APR_SUCCESS; } -#if !defined(BEOS) && !defined(OS2) && !defined(WIN32) +#if !defined(BEOS) && !defined(OS2) apr_unix_setup_lock(); apr_proc_mutex_unix_setup_lock(); apr_unix_setup_time(); @@ -111,26 +98,6 @@ apr_pool_tag(pool, "apr_initilialize"); -#ifdef WIN32 - /* Initialize apr_os_level global */ - if (apr_get_oslevel(pool, &osver) != APR_SUCCESS) { - return APR_EEXIST; - } -#endif - -#if defined(WIN32) - iVersionRequested = MAKEWORD(WSAHighByte, WSALowByte); - err = WSAStartup((WORD) iVersionRequested, &wsaData); - if (err) { - return err; - } - if (LOBYTE(wsaData.wVersion) != WSAHighByte || - HIBYTE(wsaData.wVersion) != WSALowByte) { - WSACleanup(); - return APR_EEXIST; - } -#endif - apr_signal_init(pool); return APR_SUCCESS; @@ -144,9 +111,6 @@ } apr_pool_terminate(); -#if defined(WIN32) - WSACleanup(); -#endif } APR_DECLARE(void) apr_terminate2(void)