httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <>
Subject Re: cvs commit: apache-1.3/src/ap ap_strtol.c Makefile.tmpl
Date Tue, 18 Jun 2002 02:56:19 GMT
David McCreedy wrote:
> The ap_strtol function in ap_strtol.c assumes that A-Z / a-z are contiguous
> ranges (and I'm glad to say it documents this assumption).
> While this is true for ASCII it is NOT true for EBCDIC machines: TPF,
> OS390, and BS2000.
> In EBCDIC, A-I / a-i are contiguous, J-R / j-r are contiguous, and S-Z /
> s-z are contiguous.
> I know this is true for TPF and strongly believe it is also true for OS390
> and BS2000.
> This means that the new ap_strtol function should work OK for EBCDIC as
> long as the base isn't greater than 19.
> The internal calls to ap_strtol (that is, those under the current dev src
> directory) seem to be for base 16 or less, so this probably isn't a
> critical bug.
> But it would be nice if ap_strtol fully worked for EBCDIC too, which could
> be done using more granular letter ranges either for all platforms or just
> if #ifdef CHARSET_EBCDIC  is defined.

Yes, agreed. This was a known issue. The #ifdef CHARSET_EBCDIC solution
would be prefered, of course, but since we were just using it for
base16 and below, I thought it was safe. I was, in fact, tempted
to have it bail out if base was >16 rather than >32.
   Jim Jagielski   [|]   [|]
      "A society that will trade a little liberty for a little order
             will lose both and deserve neither" - T.Jefferson

View raw message