Resource errors when compiling 1.0.1 on Visual Studio.NET 2003

2004-12-21 Thread David Barrett
I just did a clean install of 1.0.1 and came across some fatal compilation errors using Visual Studio.NET 2003. Specifically, I did the following: 1) Downloaded the three files: - apr-1.0.1.tar.gz - apr-iconv-1.0.1.tar.gz - apr-util-1.0.1.tar.gz 2) Unzipped all three into a folder named

apr_util, XML, and UTF

2004-12-02 Thread David Barrett
A couple questions about the XML parser built into apr_util: 1) Does it support anything other than pure ASCII files? 2) Is there any way to parse UTF-8 files? 3) Does it use the Xerces XML back end? Thanks! -david

RE: Article reviewers needed

2004-11-27 Thread David Barrett
I'd be happy to look it over. I'm no APR expert (though I am an avid user), but I do have technical writing experience. -Original Message- From: Ryan Bloom [mailto:[EMAIL PROTECTED] Sent: Friday, November 26, 2004 6:34 PM To: dev@apr.apache.org Subject: Article reviewers needed

RE: Can a thread write-lock a rwlock that it already has read-locked?

2004-10-18 Thread David Barrett
-Original Message- From: Branko ibej [mailto:[EMAIL PROTECTED] Subject: Re: Can a thread write-lock a rwlock that it already has read- locked? David Barrett wrote: Anyway, that's my goal, and while I'd love any feedback on my approach (especially to point out any gaping logic

RE: Can a thread write-lock a rwlock that it already has read-locked?

2004-10-17 Thread David Barrett
-Original Message- From: Branko ibej [mailto:[EMAIL PROTECTED] Subject: Re: Can a thread write-lock a rwlock that it already has read- locked? I wonder though iif your lock promotion scheme really works. Yes, it's possible to implement it, but I've never seen an implementation

RE: Can a thread write-lock a rwlock that it already has read-locked?

2004-10-16 Thread David Barrett
-Original Message- From: Branko ibej [mailto:[EMAIL PROTECTED] Subject: Re: Can a thread write-lock a rwlock that it already has read- locked? David Barrett wrote: I'm experimenting with the reader/writer locks and have a question: Can a thread write-lock a thread

Can a thread write-lock a rwlock that it already has read-locked?

2004-10-15 Thread David Barrett
I'm experimenting with the reader/writer locks and have a question: Can a thread write-lock a thread on which it already holds the read lock? My tests seem to indicate that this is not allowed, but I want to confirm this is by design and not something I'm just doing wrong. Specifically,

UTF-8 hostnames?

2004-10-15 Thread David Barrett
Does apr_sockaddr_info_get (along with all the functions that take hostnames) accept UTF-8 hostnames?

Re: UTF-8 hostnames?

2004-10-15 Thread David Barrett
Thanks for the detailed answer! On Fri, 15 Oct 2004 12:24 am, Joe Orton wrote: On Thu, Oct 14, 2004 at 08:04:35PM -0600, David Barrett wrote: Does apr_sockaddr_info_get (along with all the functions that take hostnames) accept UTF-8 hostnames? No, not really. To do non-ASCII DNS you need to use

SOCEINPROGRESS returned on non-blocking, zero-timeout socket

2004-10-15 Thread David Barrett
I'm seeing unexpected behavior when I use apr_opt_set( s, APR_SO_NONBLOCK, 1 ) in conjunction with apr_socket_timeout( s, 0 ). Basically, the following code generates no error return values: 1# apr_socket_create( s, APR_INET, SOCK_STREAM, APR_PROTO_TCP, pool ); 2# apr_opt_set( s,

RE: Pools, C++, and Exceptions Best Practices

2004-10-14 Thread David Barrett
-Original Message- From: Sander Striker [mailto:[EMAIL PROTECTED] Subject: Re: Pools, C++, and Exceptions Best Practices You'll be eating through your available memory at a pretty quick rate this way. Each pool preallocates 8k. In your case this means that every object you

Portable Daemon/Service API

2004-10-12 Thread David Barrett
It doesn't appear to but just so I know for sure: Does APR offer any API's for making daemon/service processes portable across Win32 and Unix? Specifically, I'm looking for some code that'll take care of all the details of: - Forking off an unattached process - Routing stdin/out/err to

Pools, C++, and Exceptions Best Practices

2004-10-08 Thread David Barrett
Is anyone in the audience using apr pools in a C++ application? Can you point to any sample code showing how to override 'new' and 'delete' (or manually invoke constructors and destructors) to manage objects within a pool? Right now I have an ugly mix of pools for apr objects and heap for C++

Does apr_pollset_poll( ... ) block on non-blocking sockets?

2004-10-04 Thread David Barrett
Is the function apr_pollset_poll( ) supposed to block, even on non-blocking sockets? I ask because I would like it to, even though it appears to not. The docs say this about the function: Block for activity on the descriptor(s) in a pollset Ideally I would like to *not* block when

RE: Does apr_pollset_poll( ... ) block on non-blocking sockets?

2004-10-04 Thread David Barrett
Oops, I'm a dope -- I forgot APR times are in microseconds, not milliseconds. Nevermind! -Original Message- From: David Barrett [mailto:[EMAIL PROTECTED] Sent: Sunday, October 03, 2004 7:53 PM To: dev@apr.apache.org Subject: Does apr_pollset_poll( ... ) block on non-blocking sockets

Enumerating local IP addresses

2004-10-02 Thread David Barrett
I'm happy to report that thanks to APR, I can now successfully cross-compile my server under Win32 and Unix, and run it on both! I can't thank you all enough for your wonderful library! So now that I'm running, however, I'm encountering some issues. The first is as follows: how do I enumerate

RE: APR Socket Questions

2004-09-30 Thread David Barrett
-Original Message- From: Bennett, Tony - CNF [mailto:[EMAIL PROTECTED] Subject: RE: APR Socket Questions 2) Is apr_poll( ) the equivalent to select( )? How do I convert an apr_socket_t into a apr_pollfd_t in order to add to the pollset? ...

RE: APR Socket Questions

2004-09-30 Thread David Barrett
-Original Message- From: Jeff Trawick [mailto:[EMAIL PROTECTED] Subject: Re: APR Socket Questions On Wed, 29 Sep 2004 17:58:06 -0600, David Barrett [EMAIL PROTECTED] Thanks! Can anyone help me with the non-blocking issues? (apr 1.0) grep through the regression tests

Portable WSAEWOULDBLOCK

2004-09-30 Thread David Barrett
Sockets are coming along, but I can't find a portable way of distinguishing between a failed or empty apr_socket_recv( ) on a non-blocking socket. Here's what I'm currently doing: # rv = apr_socket_recv( s, ... ); # if( rv != APR_SUCCESS ) # { # if( rv == APR_EOF ) { # //

UTF-8 to UTF-16 and back

2004-09-30 Thread David Barrett
Does anyone have some sample code showing the use of apr_xlate_conv_buffer( ) converting between UTF-8 and UTF-16? I've looked through apr-util/test/testxlate.c, but it doesn't seem to cover any multi-byte conversions: # /* 1. Identity transformation: UTF-8 - UTF-8 */ # retcode |=

Compiling APR with _UNICODE flag breaks Win32

2004-09-30 Thread David Barrett
I found that enabling Unicode support in the Win32 APR project breaks many functions that rely on the Win32 API, including (at least) apr_app_initialize( ) and apr_file_copy( ). Specifically, setting the following compile flag: # /D _UNICODE Or enabling Use Unicode Character Set in the General

RE: Compiling APR with _UNICODE flag breaks Win32

2004-09-30 Thread David Barrett
. -david -Original Message- From: William A. Rowe, Jr. [mailto:[EMAIL PROTECTED] Sent: Thursday, September 30, 2004 3:00 PM To: David Barrett Cc: dev@apr.apache.org Subject: Re: Compiling APR with _UNICODE flag breaks Win32 At 01:27 PM 9/30/2004, you wrote: I found that enabling

APR Socket Questions

2004-09-29 Thread David Barrett
Ok, now I'm starting to move over my socket code, and I've come up with the following questions: 1) If I want to set a socket to be non-blocking, is it enough to set: apr_socket_opt_set( s, APR_SO_NONBLOCK, 1 ), or need I also set apr_socket_timeout_set( s, 0 )? This link

RE: Static Linked on Linux and Win32

2004-09-28 Thread David Barrett
[mailto:[EMAIL PROTECTED] Sent: Monday, September 27, 2004 1:08 AM To: David Barrett Cc: dev@apr.apache.org Subject: RE: Static Linked on Linux and Win32 On win32 to link statically you have to add the flag APR_DECLARE_STATIC I send you this sample the apr is installed at c:\Ericom++\apr

Threads Best Practices

2004-09-28 Thread David Barrett
Hi there, I'm really starting to get into APR. I was able to port to APR mutexes without a hitch. However, I'm a bit confused on threads, and I'd appreciate any direction you can offer: 1) What should I do with apr_threadattr_t? Need I create one, or can I pass NULL for that field into

RE: Hello :-)

2004-09-28 Thread David Barrett
-Original Message- From: William A. Rowe, Jr. [mailto:[EMAIL PROTECTED] Subject: Re: Hello :-) At 02:49 PM 9/28/2004, [EMAIL PROTECTED] wrote: Another issue we discovered today is a conflict of APR with STL. Is this a known issue? When STL is added into the project, we get the

Using xlate on Win32

2004-09-28 Thread David Barrett
Threads and mutexes went in cleanly, thanks for all your help! Next up -- i18n. I'd like to convert between UTF-8 and UTF-16 using the apr_xlate_conv_buffer( ) function, but I can't get it to produce useful data. Does anyone see what Im doing wrong? The following code compiles, links, and

RE: Static Linked on Linux and Win32

2004-09-27 Thread David Barrett
Ericom Software -Original Message- From: David Barrett [mailto:[EMAIL PROTECTED] Sent: Sunday, September 26, 2004 9:22 PM To: dev@apr.apache.org Subject: Static Linked on Linux and Win32 Hi, I'm really excited to use APR, but I'm having trouble getting my Hello World application to work

Static Linked on Linux and Win32

2004-09-26 Thread David Barrett
Hi, I'm really excited to use APR, but I'm having trouble getting my Hello World application to work with static linkage, on both Linux and Win32. Basically, I have a single-file application: # // Main.cpp # #include iostream # #include apr.h # #include apr_general.h # # using namespace std; # #

RE: Static Linked on Linux and Win32

2004-09-26 Thread David Barrett
Hooray! I got it to statically compile on Unix using the following Ant file: # project name=iGlanceServer default=compile # target name=compile # exec executable=g++ # arg value=-oiglanced/ # arg