Return-Path: Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 4319 invoked by uid 500); 5 Jun 2001 21:10:17 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 4254 invoked from network); 5 Jun 2001 21:10:16 -0000 Message-ID: <3482305AF0F6CF469ED45C0D48FAFCF7091FF464@cnet48.cnet.com> From: Ian Holsman To: Ian Holsman , "'dev@apr.apache.org'" Subject: RE: Win32 Builds Failing : SMS? Date: Tue, 5 Jun 2001 14:04:54 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/mixed; boundary="----_=_NextPart_000_01C0EE03.2B921380" X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_000_01C0EE03.2B921380 Content-Type: text/plain; charset="iso-8859-1" Ok... I got it compiling and it brings up a test page now in Win32 (with the following patch applied) I put the APR_MEM_PSTRDUP into apr_private.h, and fixed up the .dsp's to include a memory subfolder. ..Ian > -----Original Message----- > From: Ian Holsman [mailto:IanH@cnet.com] > Sent: Tuesday, June 05, 2001 11:43 AM > To: 'dev@apr.apache.org' > Subject: Win32 Builds Failing : SMS? > > > hi. > no idea when this stopped working on win32 > > the macro APR_MEM_PSTRDUP (in acconfig.h) also needs to be > defined in win32 somewhere.. > but I'm not sure where this should go (maybe apr_private.h ???) > > -- > Ian Holsman > Performance Measurement & Analysis > 415-364-8608 > > ------_=_NextPart_000_01C0EE03.2B921380 Content-Type: application/octet-stream; name="sms2.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="sms2.patch" Index: apr.dsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/cvspublic/apr/apr.dsp,v retrieving revision 1.71 diff -u -r1.71 apr.dsp --- apr.dsp 2001/05/23 14:15:31 1.71 +++ apr.dsp 2001/06/05 21:05:21 @@ -65,7 +65,7 @@ # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MDd /W3 /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D = "_WINDOWS" /FD /c -# ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I "./include" /I = "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /D = "_DEBUG" /D "APR_DECLARE_STATIC" /D "WIN32" /D "_WINDOWS" /Fd"LibD\apr" = /FD /c +# ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I "./include" /I = "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /D = "_DEBUG" /D "APR_DECLARE_STATIC" /D "WIN32" /D "_WINDOWS" /FR = /Fd"LibD\apr" /FD /c # ADD BASE RSC /l 0x409 # ADD RSC /l 0x409 BSC32=3Dbscmake.exe @@ -401,6 +401,22 @@ # Begin Source File =20 SOURCE=3D.\user\win32\userinfo.c +# End Source File +# End Group +# Begin Group "memory" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=3D.\memory\unix\apr_sms.c +# End Source File +# Begin Source File + +SOURCE=3D.\memory\unix\apr_sms_std.c +# End Source File +# Begin Source File + +SOURCE=3D.\memory\unix\apr_sms_tracking.c # End Source File # End Group # End Group Index: libapr.dsp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/cvspublic/apr/libapr.dsp,v retrieving revision 1.30 diff -u -r1.30 libapr.dsp --- libapr.dsp 2001/05/23 14:15:29 1.30 +++ libapr.dsp 2001/06/05 21:05:21 @@ -409,6 +409,22 @@ SOURCE=3D.\user\win32\userinfo.c # End Source File # End Group +# Begin Group "memory" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=3D.\memory\unix\apr_sms.c +# End Source File +# Begin Source File + +SOURCE=3D.\memory\unix\apr_sms_std.c +# End Source File +# Begin Source File + +SOURCE=3D.\memory\unix\apr_sms_tracking.c +# End Source File +# End Group # End Group # Begin Group "Generated Header Files" =20 Index: include/apr.hw =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/cvspublic/apr/include/apr.hw,v retrieving revision 1.66 diff -u -r1.66 apr.hw --- include/apr.hw 2001/05/17 12:19:56 1.66 +++ include/apr.hw 2001/06/05 21:05:35 @@ -235,6 +235,8 @@ typedef int gid_t; =20 =20 +typedef struct apr_lock_t apr_lock_t; +typedef struct apr_sms_t apr_sms_t; /* Mechanisms to properly type numeric literals */ =20 #define APR_INT64_C(val) (val##i64) Index: include/arch/win32/apr_private.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/cvspublic/apr/include/arch/win32/apr_private.h,v retrieving revision 1.23 diff -u -r1.23 apr_private.h --- include/arch/win32/apr_private.h 2001/05/10 18:11:12 1.23 +++ include/arch/win32/apr_private.h 2001/06/05 21:05:39 @@ -149,6 +149,47 @@ =20 unsigned __stdcall SignalHandling(void *); int thread_ready(void); +/* Macros to deal with using either a pool or an sms + * to do memory stuff... + */ +#define APR_CLEANUP_REGISTER(struct, data, func, scope) \ + if (struct->pool) { \ + apr_pool_cleanup_register(struct->pool, data, func, scope); \ + } else { \ + apr_sms_cleanup_register(struct->mem_sys, APR_CHILD_CLEANUP, \ + data, func); \ + } + +#define APR_CLEANUP_REMOVE(struct, data, func) \ + if (struct->pool) { \ + apr_pool_cleanup_kill(struct->pool, data, func); \ + } else { \ + apr_sms_cleanup_unregister(struct->mem_sys, APR_CHILD_CLEANUP, = \ + data, func); \ + } + +#define APR_MEM_PSTRDUP(struct, ptr, str) \ + if (struct->pool) { \ + ptr =3D apr_pstrdup(struct->pool, str); \ + } else { \ + size_t len =3D strlen(str) + 1; \ + ptr =3D (char*) apr_sms_calloc(struct->mem_sys, len); \ + memcpy(ptr, str, len); \ + } + +#define APR_MEM_MALLOC(ptr, struct, type) \ + if (struct->pool) { \ + ptr =3D (type *)apr_palloc(struct->pool, sizeof(type)); \ + } else { \ + ptr =3D (type *)apr_sms_malloc(struct->mem_sys, sizeof(type)); = \ + } + +#define APR_MEM_CALLOC(ptr, struct, type) \ + if (struct->pool) { \ + ptr =3D (type *)apr_pcalloc(struct->pool, sizeof(type)); \ + } else { \ + ptr =3D (type *)apr_sms_calloc(struct->mem_sys, sizeof(type)); = \ + } =20 #endif /*APR_PRIVATE_H*/ #endif /*WIN32*/ Index: include/arch/win32/locks.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/cvspublic/apr/include/arch/win32/locks.h,v retrieving revision 1.10 diff -u -r1.10 locks.h --- include/arch/win32/locks.h 2001/06/05 13:22:23 1.10 +++ include/arch/win32/locks.h 2001/06/05 21:05:39 @@ -68,7 +68,7 @@ char *fname; }; =20 -apr_status_t apr_lock_sms_create(apr_lock_t **lock, apr_locktype_e = type, +APR_DECLARE(apr_status_t) apr_lock_sms_create(apr_lock_t **lock, = apr_locktype_e type, apr_lockscope_e scope, const char = *fname, apr_sms_t *mem_sys); =20 Index: locks/win32/locks.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/cvspublic/apr/locks/win32/locks.c,v retrieving revision 1.40 diff -u -r1.40 locks.c --- locks/win32/locks.c 2001/06/05 13:22:50 1.40 +++ locks/win32/locks.c 2001/06/05 21:05:43 @@ -51,7 +51,8 @@ * information on the Apache Software Foundation, please see * . */ - +#include "apr.h" +#include "apr_private.h" #include "apr_general.h" #include "apr_strings.h" #include "win32/locks.h" ------_=_NextPart_000_01C0EE03.2B921380--