[prev in list] [next in list] [prev in thread] [next in thread] 

List:       log4cxx-dev
Subject:    svn commit: r416923 - /logging/log4cxx/trunk/
From:       carnold () apache ! org
Date:       2006-06-24 14:50:20
Message-ID: 20060624145023.19E071A983A () eris ! apache ! org
[Download RAW message or body]

Author: carnold
Date: Sat Jun 24 07:50:19 2006
New Revision: 416923

URL: http://svn.apache.org/viewvc?rev=416923&view=rev
Log:
LOGCXX-147: APR patches for WinCE

Added:
    logging/log4cxx/trunk/apr-bug-39848.patch
    logging/log4cxx/trunk/apr-bug-39852.patch   (with props)
    logging/log4cxx/trunk/apr-bug-39853.patch   (with props)
    logging/log4cxx/trunk/apr-bug-39856.patch   (with props)
    logging/log4cxx/trunk/apr-bug-39857.patch   (with props)
    logging/log4cxx/trunk/apr-bug-39858.patch   (with props)
    logging/log4cxx/trunk/apr-bug-39859.patch   (with props)
    logging/log4cxx/trunk/apr-bug-39867.patch   (with props)
    logging/log4cxx/trunk/apr-bug-39868.patch   (with props)
    logging/log4cxx/trunk/apr-bug-39869.patch   (with props)
    logging/log4cxx/trunk/apr-bug-39884.patch   (with props)
    logging/log4cxx/trunk/apr-bug-39886.patch   (with props)
    logging/log4cxx/trunk/apr-bug-39888.patch   (with props)
    logging/log4cxx/trunk/apr-bug-39889.patch   (with props)
    logging/log4cxx/trunk/apr-bug-39892.patch   (with props)
    logging/log4cxx/trunk/apr-bug-39895.patch   (with props)
    logging/log4cxx/trunk/apr-bug-39896.patch   (with props)
Removed:
    logging/log4cxx/trunk/apr-1.2.2.patch
    logging/log4cxx/trunk/apr-util-1.2.2.patch
Modified:
    logging/log4cxx/trunk/build.xml

Added: logging/log4cxx/trunk/apr-bug-39848.patch
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/apr-bug-39848.patch?rev=416923&view=auto
 ==============================================================================
--- logging/log4cxx/trunk/apr-bug-39848.patch (added)
+++ logging/log4cxx/trunk/apr-bug-39848.patch Sat Jun 24 07:50:19 2006
@@ -0,0 +1,60 @@
+Index: test/testrand2.c
+===================================================================
+--- test/testrand2.c	(revision 415827)
++++ test/testrand2.c	(working copy)
+@@ -17,7 +17,6 @@
+ #include "apr_general.h"
+ #include "apr_random.h"
+ #include "apr_thread_proc.h"
+-#include <errno.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include "testutil.h"
+Index: test/testprocmutex.c
+===================================================================
+--- test/testprocmutex.c	(revision 415827)
++++ test/testprocmutex.c	(working copy)
+@@ -21,7 +21,6 @@
+ #include "apr_errno.h"
+ #include "apr_general.h"
+ #include "apr_getopt.h"
+-#include "errno.h"
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include "testutil.h"
+Index: test/testthread.c
+===================================================================
+--- test/testthread.c	(revision 415827)
++++ test/testthread.c	(working copy)
+@@ -17,7 +17,6 @@
+ #include "apr_thread_proc.h"
+ #include "apr_errno.h"
+ #include "apr_general.h"
+-#include "errno.h"
+ #include "apr_time.h"
+ #include "testutil.h"
+ 
+Index: test/testrand.c
+===================================================================
+--- test/testrand.c	(revision 415827)
++++ test/testrand.c	(working copy)
+@@ -15,7 +15,6 @@
+  */
+ 
+ #include "apr_general.h"
+-#include <errno.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include "testutil.h"
+Index: test/testsleep.c
+===================================================================
+--- test/testsleep.c	(revision 415827)
++++ test/testsleep.c	(working copy)
+@@ -19,7 +19,6 @@
+ #include "apr_errno.h"
+ #include "apr_general.h"
+ #include "apr_lib.h"
+-#include <errno.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include "testutil.h"

Added: logging/log4cxx/trunk/apr-bug-39852.patch
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/apr-bug-39852.patch?rev=416923&view=auto
 ==============================================================================
--- logging/log4cxx/trunk/apr-bug-39852.patch (added)
+++ logging/log4cxx/trunk/apr-bug-39852.patch Sat Jun 24 07:50:19 2006
@@ -0,0 +1,32 @@
+Index: misc/win32/charset.c
+===================================================================
+--- misc/win32/charset.c	(revision 408977)
++++ misc/win32/charset.c	(working copy)
+@@ -27,15 +27,25 @@
+ 
+ APR_DECLARE(const char*) apr_os_locale_encoding (apr_pool_t *pool)
+ {
++    int i;
++#if defined(_WIN32_WCE)
++    LCID locale = GetUserDefaultLCID();
++#else
+     LCID locale = GetThreadLocale();
++#endif
+     int len = GetLocaleInfo(locale, LOCALE_IDEFAULTANSICODEPAGE, NULL, 0);
+-    char *cp = apr_palloc(pool, len + 2);
+-    if (0 < GetLocaleInfo(locale, LOCALE_IDEFAULTANSICODEPAGE, cp + 2, len))
++    char *cp = apr_palloc(pool, (len * sizeof(TCHAR)) + 2);
++    if (0 < GetLocaleInfo(locale, LOCALE_IDEFAULTANSICODEPAGE, (TCHAR*) (cp + 2), \
len)) +     {
+         /* Fix up the returned number to make a valid codepage name of
+           the form "CPnnnn". */
+         cp[0] = 'C';
+         cp[1] = 'P';
++#ifdef _UNICODE
++        for(i = 0; i < len; i++) {
++            cp[i + 2] = (char) ((TCHAR*) (cp + 2))[i];
++        }
++#endif
+         return cp;
+     }
+ 

Propchange: logging/log4cxx/trunk/apr-bug-39852.patch
------------------------------------------------------------------------------
    svn:executable = *

Added: logging/log4cxx/trunk/apr-bug-39853.patch
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/apr-bug-39853.patch?rev=416923&view=auto
 ==============================================================================
--- logging/log4cxx/trunk/apr-bug-39853.patch (added)
+++ logging/log4cxx/trunk/apr-bug-39853.patch Sat Jun 24 07:50:19 2006
@@ -0,0 +1,13 @@
+Index: include/arch/win32/apr_private.h
+===================================================================
+--- include/arch/win32/apr_private.h	(revision 408977)
++++ include/arch/win32/apr_private.h	(working copy)
+@@ -137,6 +137,8 @@
+ #if !APR_HAVE_ERRNO_H
+ APR_DECLARE_DATA int errno;
+ #define ENOSPC 1
++#define EINVAL 22
++#define ERANGE 34
+ #endif
+ 
+ #if APR_HAVE_IPV6

Propchange: logging/log4cxx/trunk/apr-bug-39853.patch
------------------------------------------------------------------------------
    svn:executable = *

Added: logging/log4cxx/trunk/apr-bug-39856.patch
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/apr-bug-39856.patch?rev=416923&view=auto
 ==============================================================================
--- logging/log4cxx/trunk/apr-bug-39856.patch (added)
+++ logging/log4cxx/trunk/apr-bug-39856.patch Sat Jun 24 07:50:19 2006
@@ -0,0 +1,22 @@
+Index: time/win32/time.c
+===================================================================
+--- time/win32/time.c	(revision 408977)
++++ time/win32/time.c	(working copy)
+@@ -139,7 +139,7 @@
+ 
+     AprTimeToFileTime(&ft, input);
+ 
+-#if APR_HAS_UNICODE_FS
++#if APR_HAS_UNICODE_FS && !defined(_WIN32_WCE)
+     IF_WIN_OS_IS_UNICODE
+     {
+         TIME_ZONE_INFORMATION *tz;
+@@ -178,7 +178,7 @@
+                          - (-(tz->Bias + tz->StandardBias) / 60);
+     }
+ #endif
+-#if APR_HAS_ANSI_FS
++#if APR_HAS_ANSI_FS || defined(_WIN32_WCE)
+     ELSE_WIN_OS_IS_ANSI
+     {
+         TIME_ZONE_INFORMATION tz;

Propchange: logging/log4cxx/trunk/apr-bug-39856.patch
------------------------------------------------------------------------------
    svn:executable = *

Added: logging/log4cxx/trunk/apr-bug-39857.patch
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/apr-bug-39857.patch?rev=416923&view=auto
 ==============================================================================
--- logging/log4cxx/trunk/apr-bug-39857.patch (added)
+++ logging/log4cxx/trunk/apr-bug-39857.patch Sat Jun 24 07:50:19 2006
@@ -0,0 +1,24 @@
+Index: time/win32/time.c
+===================================================================
+--- time/win32/time.c	(revision 408977)
++++ time/win32/time.c	(working copy)
+@@ -304,7 +304,13 @@
+     Sleep((DWORD)(t / 1000));
+ }
+ 
+-
++#if defined(_WIN32_WCE)
++/* A noop on WinCE, like Unix implementation */
++APR_DECLARE(void) apr_time_clock_hires(apr_pool_t *p)
++{
++    return;
++}
++#else
+ static apr_status_t clock_restore(void *unsetres)
+ {
+     ULONG newRes;
+@@ -324,3 +330,4 @@
+                                   apr_pool_cleanup_null);
+     }
+ }
++#endif

Propchange: logging/log4cxx/trunk/apr-bug-39857.patch
------------------------------------------------------------------------------
    svn:executable = *

Added: logging/log4cxx/trunk/apr-bug-39858.patch
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/apr-bug-39858.patch?rev=416923&view=auto
 ==============================================================================
--- logging/log4cxx/trunk/apr-bug-39858.patch (added)
+++ logging/log4cxx/trunk/apr-bug-39858.patch Sat Jun 24 07:50:19 2006
@@ -0,0 +1,27 @@
+Index: locks/win32/proc_mutex.c
+===================================================================
+--- locks/win32/proc_mutex.c	(revision 408977)
++++ locks/win32/proc_mutex.c	(working copy)
+@@ -98,6 +98,14 @@
+      */
+     mutexkey = res_name_from_filename(fname, 1, pool);
+ 
++#if defined(_WIN32_WCE)
++    hMutex = CreateMutex(NULL, FALSE, mutexkey);
++    if (hMutex && ERROR_ALREADY_EXISTS != GetLastError()) {
++        CloseHandle(hMutex);
++        hMutex = NULL;
++        SetLastError(ERROR_FILE_NOT_FOUND);
++    }
++#else
+ #if APR_HAS_UNICODE_FS
+     IF_WIN_OS_IS_UNICODE
+     {
+@@ -110,6 +118,7 @@
+         hMutex = OpenMutexA(MUTEX_ALL_ACCESS, FALSE, mutexkey);
+     }
+ #endif
++#endif
+ 
+     if (!hMutex) {
+         return apr_get_os_error();

Propchange: logging/log4cxx/trunk/apr-bug-39858.patch
------------------------------------------------------------------------------
    svn:executable = *

Added: logging/log4cxx/trunk/apr-bug-39859.patch
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/apr-bug-39859.patch?rev=416923&view=auto
 ==============================================================================
--- logging/log4cxx/trunk/apr-bug-39859.patch (added)
+++ logging/log4cxx/trunk/apr-bug-39859.patch Sat Jun 24 07:50:19 2006
@@ -0,0 +1,22 @@
+Index: network_io/win32/sockets.c
+===================================================================
+--- network_io/win32/sockets.c	(revision 408977)
++++ network_io/win32/sockets.c	(working copy)
+@@ -112,7 +112,7 @@
+      * purposes, always transform the socket() created as a non-inherited
+      * handle
+      */
+-#if APR_HAS_UNICODE_FS
++#if APR_HAS_UNICODE_FS && !defined(_WIN32_WCE)
+     IF_WIN_OS_IS_UNICODE {
+         /* A different approach.  Many users report errors such as 
+          * (32538)An operation was attempted on something that is not 
+@@ -127,7 +127,7 @@
+                              HANDLE_FLAG_INHERIT, 0);
+     }
+ #endif
+-#if APR_HAS_ANSI_FS
++#if APR_HAS_ANSI_FS || defined(_WIN32_WCE)
+     ELSE_WIN_OS_IS_ANSI {
+         HANDLE hProcess = GetCurrentProcess();
+         HANDLE dup;

Propchange: logging/log4cxx/trunk/apr-bug-39859.patch
------------------------------------------------------------------------------
    svn:executable = *

Added: logging/log4cxx/trunk/apr-bug-39867.patch
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/apr-bug-39867.patch?rev=416923&view=auto
 ==============================================================================
--- logging/log4cxx/trunk/apr-bug-39867.patch (added)
+++ logging/log4cxx/trunk/apr-bug-39867.patch Sat Jun 24 07:50:19 2006
@@ -0,0 +1,64 @@
+Index: misc/win32/env.c
+===================================================================
+--- misc/win32/env.c	(revision 408977)
++++ misc/win32/env.c	(working copy)
+@@ -23,8 +23,7 @@
+ #include "apr_errno.h"
+ #include "apr_pools.h"
+ 
+-
+-#if APR_HAS_UNICODE_FS
++#if APR_HAS_UNICODE_FS && !defined(_WIN32_WCE)
+ static apr_status_t widen_envvar_name (apr_wchar_t *buffer,
+                                        apr_size_t bufflen,
+                                        const char *envvar)
+@@ -46,6 +45,9 @@
+                                       const char *envvar,
+                                       apr_pool_t *pool)
+ {
++#if defined(_WIN32_WCE)
++    return APR_ENOTIMPL;
++#else
+     char *val = NULL;
+     DWORD size;
+ 
+@@ -100,6 +102,7 @@
+ 
+     *value = val;
+     return APR_SUCCESS;
++#endif
+ }
+ 
+ 
+@@ -107,6 +110,9 @@
+                                       const char *value,
+                                       apr_pool_t *pool)
+ {
++#if defined(_WIN32_WCE)
++    return APR_ENOTIMPL;
++#else
+ #if APR_HAS_UNICODE_FS
+     IF_WIN_OS_IS_UNICODE
+     {
+@@ -138,11 +144,15 @@
+ #endif
+ 
+     return APR_SUCCESS;
++#endif
+ }
+ 
+ 
+ APR_DECLARE(apr_status_t) apr_env_delete(const char *envvar, apr_pool_t *pool)
+ {
++#if defined(_WIN32_WCE)
++    return APR_ENOTIMPL;
++#else
+ #if APR_HAS_UNICODE_FS
+     IF_WIN_OS_IS_UNICODE
+     {
+@@ -166,4 +176,5 @@
+ #endif
+ 
+     return APR_SUCCESS;
++#endif
+ }

Propchange: logging/log4cxx/trunk/apr-bug-39867.patch
------------------------------------------------------------------------------
    svn:executable = *

Added: logging/log4cxx/trunk/apr-bug-39868.patch
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/apr-bug-39868.patch?rev=416923&view=auto
 ==============================================================================
--- logging/log4cxx/trunk/apr-bug-39868.patch (added)
+++ logging/log4cxx/trunk/apr-bug-39868.patch Sat Jun 24 07:50:19 2006
@@ -0,0 +1,20 @@
+Index: threadproc/win32/proc.c
+===================================================================
+--- threadproc/win32/proc.c	(revision 408977)
++++ threadproc/win32/proc.c	(working copy)
+@@ -201,6 +201,7 @@
+     return APR_SUCCESS;
+ }
+ 
++#ifndef _WIN32_WCE
+ static apr_status_t attr_cleanup(void *theattr)
+ {
+     apr_procattr_t *attr = (apr_procattr_t *)theattr;    
+@@ -209,6 +210,7 @@
+     attr->user_token = NULL;
+     return APR_SUCCESS;
+ }
++#endif
+ 
+ APR_DECLARE(apr_status_t) apr_procattr_user_set(apr_procattr_t *attr, 
+                                                 const char *username,

Propchange: logging/log4cxx/trunk/apr-bug-39868.patch
------------------------------------------------------------------------------
    svn:executable = *

Added: logging/log4cxx/trunk/apr-bug-39869.patch
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/apr-bug-39869.patch?rev=416923&view=auto
 ==============================================================================
--- logging/log4cxx/trunk/apr-bug-39869.patch (added)
+++ logging/log4cxx/trunk/apr-bug-39869.patch Sat Jun 24 07:50:19 2006
@@ -0,0 +1,22 @@
+Index: threadproc/win32/proc.c
+===================================================================
+--- threadproc/win32/proc.c	(revision 408977)
++++ threadproc/win32/proc.c	(working copy)
+@@ -499,6 +499,9 @@
+     else 
+ #endif
+     {
++#if defined(_WIN32_WCE)
++        {
++#else
+         /* Win32 is _different_ than unix.  While unix will find the given
+          * program since it's already chdir'ed, Win32 cannot since the parent
+          * attempts to open the program with it's own path.
+@@ -556,6 +559,7 @@
+             }
+         }
+         else {
++#endif
+             /* A simple command we are directly invoking.  Do not pass
+              * the first arg to CreateProc() for APR_PROGRAM_PATH
+              * invocation, since it would need to be a literal and

Propchange: logging/log4cxx/trunk/apr-bug-39869.patch
------------------------------------------------------------------------------
    svn:executable = *

Added: logging/log4cxx/trunk/apr-bug-39884.patch
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/apr-bug-39884.patch?rev=416923&view=auto
 ==============================================================================
--- logging/log4cxx/trunk/apr-bug-39884.patch (added)
+++ logging/log4cxx/trunk/apr-bug-39884.patch Sat Jun 24 07:50:19 2006
@@ -0,0 +1,26 @@
+Index: include/arch/win32/apr_private.h
+===================================================================
+--- include/arch/win32/apr_private.h	(revision 408977)
++++ include/arch/win32/apr_private.h	(working copy)
+@@ -145,7 +145,7 @@
+ #endif
+ 
+ /* MSVC 7.0 introduced _strtoi64 */
+-#if _MSC_VER >= 1300 && _INTEGRAL_MAX_BITS >= 64
++#if _MSC_VER >= 1300 && _INTEGRAL_MAX_BITS >= 64 && !defined(_WIN32_WCE)
+ #define APR_INT64_STRFN	      _strtoi64
+ #endif
+ 
+@@ -156,8 +156,12 @@
+ #define APR_OFF_T_STRFN         apr_strtoi64
+ #endif
+ #else
++#if defined(_WIN32_WCE)
++#define APR_OFF_T_STRFN         strtol
++#else
+ #define APR_OFF_T_STRFN         strtoi
+ #endif
++#endif
+ 
+ /* used to check for DWORD overflow in 64bit compiles */
+ #define APR_DWORD_MAX 0xFFFFFFFFUL

Propchange: logging/log4cxx/trunk/apr-bug-39884.patch
------------------------------------------------------------------------------
    svn:executable = *

Added: logging/log4cxx/trunk/apr-bug-39886.patch
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/apr-bug-39886.patch?rev=416923&view=auto
 ==============================================================================
--- logging/log4cxx/trunk/apr-bug-39886.patch (added)
+++ logging/log4cxx/trunk/apr-bug-39886.patch Sat Jun 24 07:50:19 2006
@@ -0,0 +1,48 @@
+Index: include/arch/win32/apr_arch_inherit.h
+===================================================================
+--- include/arch/win32/apr_arch_inherit.h	(revision 408977)
++++ include/arch/win32/apr_arch_inherit.h	(working copy)
+@@ -21,9 +21,36 @@
+ 
+ #define APR_INHERIT (1 << 24)    /* Must not conflict with other bits */
+ 
++#if defined(_WIN32_WCE)
+ #define APR_IMPLEMENT_INHERIT_SET(name, flag, pool, cleanup)        \
+ APR_DECLARE(apr_status_t) apr_##name##_inherit_set(apr_##name##_t *the##name) \
+ {                                                                   \
++        HANDLE temp, hproc = GetCurrentProcess();                   \
++        if (!DuplicateHandle(hproc, the##name->filehand,            \
++                             hproc, &temp, 0, TRUE,                 \
++                             DUPLICATE_SAME_ACCESS))                \
++            return apr_get_os_error();                              \
++        CloseHandle(the##name->filehand);                           \
++        the##name->filehand = temp;                                 \
++    return APR_SUCCESS;                                             \
++}
++
++#define APR_IMPLEMENT_INHERIT_UNSET(name, flag, pool, cleanup)      \
++APR_DECLARE(apr_status_t) apr_##name##_inherit_unset(apr_##name##_t *the##name)\
++{                                                                   \
++        HANDLE temp, hproc = GetCurrentProcess();                   \
++        if (!DuplicateHandle(hproc, the##name->filehand,            \
++                             hproc, &temp, 0, FALSE,                \
++                             DUPLICATE_SAME_ACCESS))                \
++            return apr_get_os_error();                              \
++        CloseHandle(the##name->filehand);                           \
++        the##name->filehand = temp;                                 \
++    return APR_SUCCESS;                                             \
++}
++#else
++#define APR_IMPLEMENT_INHERIT_SET(name, flag, pool, cleanup)        \
++APR_DECLARE(apr_status_t) apr_##name##_inherit_set(apr_##name##_t *the##name) \
++{                                                                   \
+     IF_WIN_OS_IS_UNICODE                                            \
+     {                                                               \
+         if (!SetHandleInformation(the##name->filehand,              \
+@@ -65,5 +92,6 @@
+     }                                                               \
+     return APR_SUCCESS;                                             \
+ }
++#endif
+ 
+ #endif	/* ! INHERIT_H */

Propchange: logging/log4cxx/trunk/apr-bug-39886.patch
------------------------------------------------------------------------------
    svn:executable = *

Added: logging/log4cxx/trunk/apr-bug-39888.patch
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/apr-bug-39888.patch?rev=416923&view=auto
 ==============================================================================
--- logging/log4cxx/trunk/apr-bug-39888.patch (added)
+++ logging/log4cxx/trunk/apr-bug-39888.patch Sat Jun 24 07:50:19 2006
@@ -0,0 +1,93 @@
+Index: include/arch/win32/apr_private.h
+===================================================================
+--- include/arch/win32/apr_private.h	(revision 408977)
++++ include/arch/win32/apr_private.h	(working copy)
+@@ -67,6 +67,12 @@
+ #include <time.h>
+ #endif
+ 
++#if !APR_HAVE_CRTDBG_H
++#define _malloc_dbg(size, block, file, line) malloc(size)
++#define _realloc_dbg(mem, size, block, file, line) realloc(mem, size)
++#endif
++
++
+ /* Use this section to define all of the HAVE_FOO_H
+  * that are required to build properly.
+  */
+Index: include/apr.hw
+===================================================================
+--- include/apr.hw	(revision 408977)
++++ include/apr.hw	(working copy)
+@@ -153,6 +153,7 @@
+ #define APR_HAVE_STDDEF_H       1
+ #define APR_HAVE_PROCESS_H      1
+ #define APR_HAVE_TIME_H         1
++#define APR_HAVE_CRTDBG_H       1
+ #else
+ #define APR_HAVE_ARPA_INET_H    0
+ #define APR_HAVE_CONIO_H        0
+@@ -186,6 +187,7 @@
+ #define APR_HAVE_STDDEF_H       0
+ #define APR_HAVE_PROCESS_H      0
+ #define APR_HAVE_TIME_H         0
++#define APR_HAVE_CRTDBG_H       0
+ #endif
+ 
+ #define APR_USE_FLOCK_SERIALIZE           0 
+Index: misc/win32/apr_app.c
+===================================================================
+--- misc/win32/apr_app.c	(revision 408977)
++++ misc/win32/apr_app.c	(working copy)
+@@ -35,7 +35,9 @@
+ 
+ #include "apr_general.h"
+ #include "ShellAPI.h"
++#if APR_HAVE_CRTDBG_H
+ #include "crtdbg.h"
++#endif
+ #include "wchar.h"
+ #include "apr_arch_file_io.h"
+ #include "assert.h"
+Index: misc/win32/internal.c
+===================================================================
+--- misc/win32/internal.c	(revision 408977)
++++ misc/win32/internal.c	(working copy)
+@@ -18,7 +18,9 @@
+ 
+ #include "apr_arch_misc.h"
+ #include "apr_arch_file_io.h"
++#if APR_HAVE_CRTDBG_H
+ #include <crtdbg.h>
++#endif
+ #include <assert.h>
+ 
+ /* This module is the source of -static- helper functions that are
+Index: misc/win32/misc.c
+===================================================================
+--- misc/win32/misc.c	(revision 408977)
++++ misc/win32/misc.c	(working copy)
+@@ -16,7 +16,9 @@
+ 
+ #include "apr_private.h"
+ #include "apr_arch_misc.h"
++#if APR_HAVE_CRTDBG_H
+ #include "crtdbg.h"
++#endif
+ #include "apr_arch_file_io.h"
+ #include "assert.h"
+ #include "apr_lib.h"
+Index: misc/win32/start.c
+===================================================================
+--- misc/win32/start.c	(revision 408977)
++++ misc/win32/start.c	(working copy)
+@@ -23,7 +23,9 @@
+ #include "apr_arch_misc.h"       /* for WSAHighByte / WSALowByte */
+ #include "wchar.h"
+ #include "apr_arch_file_io.h"
++#if APR_HAVE_CRTDBG_H
+ #include "crtdbg.h"
++#endif
+ #include "assert.h"
+ 
+ /* This symbol is _private_, although it must be exported.

Propchange: logging/log4cxx/trunk/apr-bug-39888.patch
------------------------------------------------------------------------------
    svn:executable = *

Added: logging/log4cxx/trunk/apr-bug-39889.patch
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/apr-bug-39889.patch?rev=416923&view=auto
 ==============================================================================
--- logging/log4cxx/trunk/apr-bug-39889.patch (added)
+++ logging/log4cxx/trunk/apr-bug-39889.patch Sat Jun 24 07:50:19 2006
@@ -0,0 +1,94 @@
+Index: misc/win32/misc.c
+===================================================================
+--- misc/win32/misc.c	(revision 408977)
++++ misc/win32/misc.c	(working copy)
+@@ -20,6 +20,7 @@
+ #include "apr_arch_file_io.h"
+ #include "assert.h"
+ #include "apr_lib.h"
++#include "tchar.h"
+ 
+ APR_DECLARE_DATA apr_oslevel_e apr_os_level = APR_WIN_UNK;
+ 
+@@ -34,13 +35,17 @@
+         if (oslev.dwPlatformId == VER_PLATFORM_WIN32_NT) 
+         {
+             static unsigned int servpack = 0;
+-            char *pservpack;
++            TCHAR *pservpack;
+             if (pservpack = oslev.szCSDVersion) {
+                 while (*pservpack && !apr_isdigit(*pservpack)) {
+                     pservpack++;
+                 }
+                 if (*pservpack)
++#ifdef _UNICODE
++                    servpack = _wtoi(pservpack);
++#else
+                     servpack = atoi(pservpack);
++#endif
+             }
+ 
+             if (oslev.dwMajorVersion < 3) {
+@@ -98,22 +103,22 @@
+         }
+ #ifndef WINNT
+         else if (oslev.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) {
+-            char *prevision;
++            TCHAR *prevision;
+             if (prevision = oslev.szCSDVersion) {
+                 while (*prevision && !apr_isupper(*prevision)) {
+                      prevision++;
+                 }
+             }
+-            else prevision = "";
++            else prevision = _T("");
+ 
+             if (oslev.dwMinorVersion < 10) {
+-                if (*prevision < 'C')
++                if (*prevision < _T('C'))
+                     apr_os_level = APR_WIN_95;
+                 else
+                     apr_os_level = APR_WIN_95_OSR2;
+             }
+             else if (oslev.dwMinorVersion < 90) {
+-                if (*prevision < 'A')
++                if (*prevision < _T('A'))
+                     apr_os_level = APR_WIN_98;
+                 else
+                     apr_os_level = APR_WIN_98_SE;
+@@ -161,14 +166,21 @@
+ FARPROC apr_load_dll_func(apr_dlltoken_e fnLib, char* fnName, int ordinal)
+ {
+     if (!lateDllHandle[fnLib]) { 
+-        lateDllHandle[fnLib] = LoadLibrary(lateDllName[fnLib]);
++        lateDllHandle[fnLib] = LoadLibraryA(lateDllName[fnLib]);
+         if (!lateDllHandle[fnLib])
+             return NULL;
+     }
++#if defined(_WIN32_WCE)
+     if (ordinal)
++        return GetProcAddressA(lateDllHandle[fnLib], (char *) ordinal);
++    else
++        return GetProcAddressA(lateDllHandle[fnLib], fnName);
++#else
++    if (ordinal)
+         return GetProcAddress(lateDllHandle[fnLib], (char *) ordinal);
+     else
+         return GetProcAddress(lateDllHandle[fnLib], fnName);
++#endif
+ }
+ 
+ /* Declared in include/arch/win32/apr_dbg_win32_handles.h
+@@ -196,10 +208,10 @@
+         (TlsSetValue)(tlsid, sbuf);
+         sbuf[1023] = '\0';
+         if (!fh) {
+-            (GetModuleFileName)(NULL, sbuf, 250);
++            (GetModuleFileNameA)(NULL, sbuf, 250);
+             sprintf(strchr(sbuf, '\0'), ".%d",
+                     (GetCurrentProcessId)());
+-            fh = (CreateFile)(sbuf, GENERIC_WRITE, 0, NULL, 
++            fh = (CreateFileA)(sbuf, GENERIC_WRITE, 0, NULL, 
+                             CREATE_ALWAYS, 0, NULL);
+             (InitializeCriticalSection)(&cs);
+         }

Propchange: logging/log4cxx/trunk/apr-bug-39889.patch
------------------------------------------------------------------------------
    svn:executable = *

Added: logging/log4cxx/trunk/apr-bug-39892.patch
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/apr-bug-39892.patch?rev=416923&view=auto
 ==============================================================================
--- logging/log4cxx/trunk/apr-bug-39892.patch (added)
+++ logging/log4cxx/trunk/apr-bug-39892.patch Sat Jun 24 07:50:19 2006
@@ -0,0 +1,31 @@
+Index: misc/win32/start.c
+===================================================================
+--- misc/win32/start.c	(revision 408977)
++++ misc/win32/start.c	(working copy)
+@@ -30,6 +30,7 @@
+  */
+ int APR_DECLARE_DATA apr_app_init_complete = 0;
+ 
++#if !defined(_WIN32_WCE)
+ /* Used by apr_app_initialize to reprocess the environment
+  *
+  * An internal apr function to convert a double-null terminated set
+@@ -87,6 +88,7 @@
+     *retarr = newarr;
+     return args;
+ }
++#endif
+ 
+ /* Reprocess the arguments to main() for a completely apr-ized application
+  */
+@@ -101,7 +103,9 @@
+         return rv;
+     }
+ 
+-#if APR_HAS_UNICODE_FS
++#if defined(_WIN32_WCE)
++    apr_app_init_complete = 1;
++#elif APR_HAS_UNICODE_FS
+     IF_WIN_OS_IS_UNICODE
+     {
+         apr_wchar_t **wstrs;

Propchange: logging/log4cxx/trunk/apr-bug-39892.patch
------------------------------------------------------------------------------
    svn:executable = *

Added: logging/log4cxx/trunk/apr-bug-39895.patch
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/apr-bug-39895.patch?rev=416923&view=auto
 ==============================================================================
--- logging/log4cxx/trunk/apr-bug-39895.patch (added)
+++ logging/log4cxx/trunk/apr-bug-39895.patch Sat Jun 24 07:50:19 2006
@@ -0,0 +1,42 @@
+Index: misc/unix/errorcodes.c
+===================================================================
+--- misc/unix/errorcodes.c	(revision 408977)
++++ misc/unix/errorcodes.c	(working copy)
+@@ -247,15 +247,35 @@
+     apr_size_t len=0, i;
+ 
+ #ifndef NETWARE
+-    len = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM 
++#if !defined(_WIN32_WCE)
++    len = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM 
+                       | FORMAT_MESSAGE_IGNORE_INSERTS,
+                         NULL,
+                         errcode,
+                         MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), /* Default \
language */ +-                        (LPTSTR) buf,
++                        (LPSTR) buf,
+                         (DWORD)bufsize,
+                         NULL);
++#else
++    len = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM 
++                      | FORMAT_MESSAGE_IGNORE_INSERTS,
++                        NULL,
++                        errcode,
++                        LOCALE_INVARIANT,
++                        (LPTSTR) buf,
++                        (DWORD) (bufsize/sizeof(TCHAR)),
++                        NULL);
++    //
++    //  compact to US-ASCII, replace any non US-ASCII with '?'
++    for(i = 0; i <= len; i++) {
++        if (((TCHAR*) buf)[i] < 0x80) {
++            buf[i] = (char) ((TCHAR*) buf)[i];
++        } else {
++            buf[i] = '?';
++        }
++    }
+ #endif
++#endif
+ 
+     if (!len) {
+         for (i = 0; gaErrorList[i].msg; ++i) {

Propchange: logging/log4cxx/trunk/apr-bug-39895.patch
------------------------------------------------------------------------------
    svn:executable = *

Added: logging/log4cxx/trunk/apr-bug-39896.patch
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/apr-bug-39896.patch?rev=416923&view=auto
 ==============================================================================
--- logging/log4cxx/trunk/apr-bug-39896.patch (added)
+++ logging/log4cxx/trunk/apr-bug-39896.patch Sat Jun 24 07:50:19 2006
@@ -0,0 +1,80 @@
+Index: test/abts.c
+===================================================================
+--- test/abts.c	(revision 408977)
++++ test/abts.c	(working copy)
+@@ -30,6 +30,66 @@
+ 
+ const char **testlist = NULL;
+ 
++#if defined(_WIN32_WCE)
++/*  output to OutputDebugString in addition to specified FILE  */
++static void abts_fprintf(FILE* dest, const char* format, ...) {
++    va_list args;
++    int i;
++    int inspec;
++    enum { BUFSIZE = 256 };
++    wchar_t buf[BUFSIZE];
++    wchar_t fmt[BUFSIZE];
++    char ch;
++    inspec = 0;
++    /*  copy format transposing %c to %C and %s to %S  */
++    for(i = 0; i < BUFSIZE; i++) {
++        ch = format[i];
++        fmt[i] = ch;
++        if (ch == '%') {
++            inspec = 1;
++        } else {
++            if (inspec) {
++                inspec = 0;
++                switch(ch) {
++                    case 's':
++                    fmt[i] = L'S';
++                    break;
++
++                    case 'c':
++                    fmt[i] = L'C';
++                    break;
++
++                    case '-':
++                    case '.':
++                    case '+':
++                    inspec = 1;
++                    break;
++
++                    default:
++                    inspec = (ch >= '0' && ch <= '9');
++                    break;
++                }
++            }
++            if (ch == 0) break;
++        }
++    }
++    /* if format starts with a \b, doesn't render well in debugger */
++    if (fmt[0] != L'\b') {
++        va_start(args, format);
++        vswprintf(buf, fmt, args);
++        va_end(args);
++        OutputDebugStringW(buf);
++    }
++    /*  output to specified file too */
++    va_start(args, format);
++    vfprintf(dest, format, args);
++    va_end(args);
++}
++
++#define fprintf abts_fprintf
++#endif
++
++
+ static int find_test_name(const char *testname) {
+     int i;
+     for (i = 0; testlist[i] != NULL; i++) {
+@@ -192,7 +252,7 @@
+     }
+ 
+     if (count == 0) {
+-        printf("All tests passed.\n");
++        fprintf(stdout, "All tests passed.\n");
+         return 0;
+     }
+ 

Propchange: logging/log4cxx/trunk/apr-bug-39896.patch
------------------------------------------------------------------------------
    svn:executable = *

Modified: logging/log4cxx/trunk/build.xml
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/build.xml?rev=416923&r1=416922&r2=416923&view=diff
 ==============================================================================
--- logging/log4cxx/trunk/build.xml (original)
+++ logging/log4cxx/trunk/build.xml Sat Jun 24 07:50:19 2006
@@ -8,9 +8,9 @@
         <libset libs="iconv" if="has-iconv"/>
         <libset libs="pthread" if="is-unix"/>
         <libset libs="expat" if="has-expat"/>
-        <libset libs="advapi32 odbc32 ws2_32 mswsock" if="is-windows"/>
-        <libset libs="stdc++" if="is-gcc"/>
-        <libset libs="cw32mt" if="is-bcc"/>
+        <syslibset libs="advapi32 odbc32 ws2_32 mswsock" if="is-windows"/>
+        <syslibset libs="stdc++" if="is-gcc"/>
+        <syslibset libs="cw32mt" if="is-bcc"/>
 '>]>
 <!--
  Copyright 2004-2005 The Apache Software Foundation.
@@ -61,11 +61,11 @@
 
 
 
-<property name="apr.version" value="1.2.2"/>
+<property name="apr.version" value="1.2.7"/>
 <property name="apr.lib.name" value="apr-1"/>
 <property name="apr.lib.type" value="static"/>
 
-<property name="aprutil.version" value="1.2.2"/>
+<property name="aprutil.version" value="1.2.7"/>
 <property name="aprutil.lib.name" value="aprutil-1"/>
 <property name="aprutil.lib.type" value="static"/>
 
@@ -100,6 +100,7 @@
 Displays available targets
 
 > ant build-projects-vc6
+> ant build-projects-vc8
 
 Builds Microsoft Visual Studio projects.
 -xcode and -cbx for Apple Xcode and Borland CBuilderX for Linux
@@ -475,9 +476,23 @@
         <param name="module" value="apr"/>
         <param name="module.version" value="${apr.version}"/>
     </antcall>
-    <patch patchfile="${base.dir}/apr-${apr.version}.patch"
-           dir="${lib.dir}/apr-${apr.version}"
-           strip="0"/>
+  <patch dir="${lib.dir}/apr-${apr.version}" strip="0" \
patchfile="${base.dir}/apr-bug-39848.patch"/> +  <patch \
dir="${lib.dir}/apr-${apr.version}" strip="0" \
patchfile="${base.dir}/apr-bug-39852.patch"/> +  <patch \
dir="${lib.dir}/apr-${apr.version}" strip="0" \
patchfile="${base.dir}/apr-bug-39853.patch"/> +  <patch \
dir="${lib.dir}/apr-${apr.version}" strip="0" \
patchfile="${base.dir}/apr-bug-39856.patch"/> +  <patch \
dir="${lib.dir}/apr-${apr.version}" strip="0" \
patchfile="${base.dir}/apr-bug-39857.patch"/> +  <patch \
dir="${lib.dir}/apr-${apr.version}" strip="0" \
patchfile="${base.dir}/apr-bug-39858.patch"/> +  <patch \
dir="${lib.dir}/apr-${apr.version}" strip="0" \
patchfile="${base.dir}/apr-bug-39859.patch"/> +  <patch \
dir="${lib.dir}/apr-${apr.version}" strip="0" \
patchfile="${base.dir}/apr-bug-39867.patch"/> +  <patch \
dir="${lib.dir}/apr-${apr.version}" strip="0" \
patchfile="${base.dir}/apr-bug-39868.patch"/> +  <patch \
dir="${lib.dir}/apr-${apr.version}" strip="0" \
patchfile="${base.dir}/apr-bug-39869.patch"/> +  <patch \
dir="${lib.dir}/apr-${apr.version}" strip="0" \
patchfile="${base.dir}/apr-bug-39884.patch"/> +  <patch \
dir="${lib.dir}/apr-${apr.version}" strip="0" \
patchfile="${base.dir}/apr-bug-39886.patch"/> +  <patch \
dir="${lib.dir}/apr-${apr.version}" strip="0" \
patchfile="${base.dir}/apr-bug-39888.patch"/> +  <patch \
dir="${lib.dir}/apr-${apr.version}" strip="0" \
patchfile="${base.dir}/apr-bug-39889.patch"/> +  <patch \
dir="${lib.dir}/apr-${apr.version}" strip="0" \
patchfile="${base.dir}/apr-bug-39892.patch"/> +  <patch \
dir="${lib.dir}/apr-${apr.version}" strip="0" \
patchfile="${base.dir}/apr-bug-39895.patch"/> +  <patch \
dir="${lib.dir}/apr-${apr.version}" strip="0" \
patchfile="${base.dir}/apr-bug-39896.patch"/>  </target>
 
 <target name="build-apr" depends="init" unless="apr-available">
@@ -522,9 +537,6 @@
         <param name="module" value="apr-util"/>
         <param name="module.version" value="${aprutil.version}"/>
     </antcall>
-    <patch patchfile="${base.dir}/apr-util-${aprutil.version}.patch"
-           dir="${lib.dir}/apr-util-${aprutil.version}"
-           strip="0"/>
     <chmod file="${lib.dir}/apr-util-${aprutil.version}/xml/expat/configure"
            perm="u+x"/>
 
@@ -680,7 +692,7 @@
 </target>
 
 
-<target name="build-example">
+<target name="build-example-static" if="is-static">
     <mkdir dir="${log4cxx.lib.dir}/${example.name}_obj"/>
     <cc name="${compiler}"
                 exceptions="true"
@@ -693,23 +705,76 @@
                 projectsOnly="${projectsOnly}">
         <fileset dir="${example.src.dir}" includes="${example.includes}"/>
         <includepath path="${include.dir}"/>
-        <includepath path="${apr.include.dir}"/>
 
         <defineset define="WIN32" if="is-windows"/>
-        <defineset define="LOG4CXX_STATIC" if="is-static"/>
-        <defineset define="APR_DECLARE_STATIC" if="apr-static"/>
-        <defineset define="APU_DECLARE_STATIC" if="aprutil-static"/>
+        <defineset define="LOG4CXX_STATIC"/>
 
         <compilerarg value="${pic-option}" if="pic-option"/>
 
         <libset libs="log4cxx${lib-suffix}" dir="${log4cxx.lib.dir}"/>
         &libsets;
 
-        <project outfile="${project.dir}/${example.name}" type="${project.type}" \
if="project.if"/> +      <project outfile="${project.dir}/${example.name}" \
type="${project.type}" if="project.if"/>  </cc>
 </target>
 
-<target name="run-example">
+  <target name="build-example-shared" unless="is-static">
+    <mkdir dir="${log4cxx.lib.dir}/${example.name}_obj"/>
+    <cc name="${compiler}"
+                exceptions="true"
+                outfile="${log4cxx.lib.dir}/${example.name}"
+                subsystem="console"
+                multithreaded="true"
+                outtype="executable"
+                objdir="${log4cxx.lib.dir}/${example.name}_obj"
+                debug="${debug}"
+                projectsOnly="${projectsOnly}">
+      <fileset dir="${example.src.dir}" includes="${example.includes}"/>
+      <includepath path="${include.dir}"/>
+
+      <defineset define="WIN32" if="is-windows"/>
+
+      <compilerarg value="${pic-option}" if="pic-option"/>
+
+      <libset libs="log4cxx${lib-suffix}" dir="${log4cxx.lib.dir}"/>
+
+      <project outfile="${project.dir}/${example.name}" type="${project.type}" \
if="project.if"/> +    </cc>
+  </target>
+
+  <target name="build-apr-example">
+    <mkdir dir="${log4cxx.lib.dir}/${example.name}_obj"/>
+    <cc name="${compiler}"
+                exceptions="true"
+                outfile="${log4cxx.lib.dir}/${example.name}"
+                subsystem="console"
+                multithreaded="true"
+                outtype="executable"
+                objdir="${log4cxx.lib.dir}/${example.name}_obj"
+                debug="${debug}"
+                projectsOnly="${projectsOnly}">
+      <fileset dir="${example.src.dir}" includes="${example.includes}"/>
+      <includepath path="${include.dir}"/>
+      <includepath path="${apr.include.dir}"/>
+
+      <defineset define="WIN32" if="is-windows"/>
+      <defineset define="LOG4CXX_STATIC" if="is-static"/>
+      <defineset define="APR_DECLARE_STATIC" if="apr-static"/>
+      <defineset define="APU_DECLARE_STATIC" if="aprutil-static"/>
+
+      <compilerarg value="${pic-option}" if="pic-option"/>
+
+      <libset libs="log4cxx${lib-suffix}" dir="${log4cxx.lib.dir}"/>
+      &libsets;
+
+      <project outfile="${project.dir}/${example.name}" type="${project.type}" \
if="project.if"/> +    </cc>
+  </target>
+
+
+  <target name="build-example" depends="build-example-static, \
build-example-shared"/> +  
+  <target name="run-example">
     <!--  remove any stray configuration files  -->
     <delete>
         <fileset dir="${log4cxx.lib.dir}" includes="log4*.properties log4*.xml"/>
@@ -727,7 +792,7 @@
 
 
 <target name="build-delayedloop" depends="build">
-    <antcall target="build-example">
+    <antcall target="build-apr-example">
        <param name="example.src.dir" value="${examples.dir}"/>
        <param name="example.name" value="delayedloop"/>
        <param name="example.includes" value="delayedloop.cpp"/>
@@ -763,7 +828,7 @@
     description="Builds example programs"/>
 
 <target name="build-simplesocketserver" depends="build">
-    <antcall target="build-example">
+    <antcall target="build-apr-example">
        <param name="example.src.dir" value="${base.dir}/simplesocketserver"/>
        <param name="example.name" value="simplesocketserver"/>
        <param name="example.includes" value="simplesocketserver.cpp"/>
@@ -772,7 +837,7 @@
 
 
 <target name="build-performance" depends="build" description="Builds performance \
                test">
-    <antcall target="build-example">
+    <antcall target="build-apr-example">
        <param name="example.src.dir" value="${performance.dir}"/>
        <param name="example.name" value="performance"/>
        <param name="example.includes" value="**/*.cpp"/>
@@ -1140,7 +1205,14 @@
     </antcall>
 </target>
 
-<target name="build-projects-xcode" description="Builds project files for Apple \
Xcode"> +<target name="build-projects-vc8" description="Builds project files for \
Microsoft Visual C++ 2005"> +    <antcall target="build-projects">
+      <param name="project.dir" value="msvc8"/>
+      <param name="project.type" value="msvc8"/>
+    </antcall>
+</target>
+
+  <target name="build-projects-xcode" description="Builds project files for Apple \
Xcode">  <antcall target="build-projects">
         <param name="project.dir" value="xcode"/>
         <param name="project.type" value="xcode"/>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic