You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Jeff Trawick <tr...@attglobal.net> on 2004/02/05 19:27:44 UTC

why gen-uri-delims in Python?

It says:

   # USAGE:
   #   $ gen-uri-delims.py > uri/uri_delims.h
   #
   # typically invoked by the "buildconf" script

A distributed uri_delims.h would be broken on a non-ASCII box.  And yet python 
is not to be required in order to build a source distribution.


Re: why gen-uri-delims in Python?

Posted by Greg Stein <gs...@lyra.org>.
On Thu, Feb 05, 2004 at 08:55:22PM -0500, Jeff Trawick wrote:
> Greg Stein wrote:
>...
> > Seems like we need to keep that around, or find another solution. For
> > example, we could generate an ASCII table and an EBCDIC table, and then
> > use ./configure to select the appropriate table.
> 
> shrug...  the old way, or copy from uri_delims.h.{ascii|ebcdic} at configure 
> time; need something that uses a trivial operation that can be easily done in 
> Win32 build or NetWare build or some other odd build

All righty. Are we only talking about ASCII and EBCDIC? There isn't
anything else that will sneak up on us, right?

And aren't Win32 and NetWare always going to use the ASCII form? In which
case, we just hard-wire their build systems to point to the ASCII version.

Once I understand the set of options here, I'll make it happen since I
broke it in the first place :-)

To be honest, I'm thinking that we just hand-write the two tables into
apr_uri.c and use a #define to select the right one. We should already
have a symbol somewhere saying whether we're using EBCDIC. Then we can get
rid of all this delimiter generation stuff. These tables are quite
constant... :-)

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Re: why gen-uri-delims in Python?

Posted by Jeff Trawick <tr...@attglobal.net>.
Greg Stein wrote:

> On Thu, Feb 05, 2004 at 01:27:44PM -0500, Jeff Trawick wrote:
> 
>>It says:
>>
>>   # USAGE:
>>   #   $ gen-uri-delims.py > uri/uri_delims.h
>>   #
>>   # typically invoked by the "buildconf" script
>>
>>A distributed uri_delims.h would be broken on a non-ASCII box.  And yet python 
>>is not to be required in order to build a source distribution.

> Seems like we need to keep that around, or find another solution. For
> example, we could generate an ASCII table and an EBCDIC table, and then
> use ./configure to select the appropriate table.

shrug...  the old way, or copy from uri_delims.h.{ascii|ebcdic} at configure 
time; need something that uses a trivial operation that can be easily done in 
Win32 build or NetWare build or some other odd build


Re: why gen-uri-delims in Python?

Posted by Greg Stein <gs...@lyra.org>.
On Thu, Feb 05, 2004 at 01:27:44PM -0500, Jeff Trawick wrote:
> It says:
> 
>    # USAGE:
>    #   $ gen-uri-delims.py > uri/uri_delims.h
>    #
>    # typically invoked by the "buildconf" script
> 
> A distributed uri_delims.h would be broken on a non-ASCII box.  And yet python 
> is not to be required in order to build a source distribution.

Oof. I had not thought about non-ASCII when I made that change. Even if we
ran Python at config/build time, then I doubt it would work for EBCDIC
(I've got no idea if Python even works on EBCDIC platforms).

Seems like we need to keep that around, or find another solution. For
example, we could generate an ASCII table and an EBCDIC table, and then
use ./configure to select the appropriate table.

Thoughts?

Cheers,
-g

p.s. my original goal was to avoid the complication of gen_uri_delims, but
it is (now) apparent there was more to it than I realized :-)

-- 
Greg Stein, http://www.lyra.org/