[Date Prev][Date Next] [Chronological] [Thread] [Top]


Well, I've just gotten a successful run of the test suite. To re-cap, the
OS/390 C compiler has an option to generate all char/string literals in
ASCII. The runtime library also has an ASCII-compatibility mode (LIBASCII)
that supports many of the needed functions, so that defining the flags for
these two features takes care of most of the work.

The LIBASCII version of getopt() always segfaulted tho, so I tweaked
to use liblutil/getopt instead. Also, I had to intercept stdio (fgets, fputs,
fprintf etc.) to translate input and output accordingly when reading config
files and writing log files. For now I'm throwing the glue into a new file
liblutil/stdio.c. Most of the changes wind up in liblutil this way.

Along those lines, I note that there is a lutil_progname that is currently
only by the slap tools. I think it would make sense to also use this in
clients/tools. Any objections?

Will be committing updates shortly. At present there's a lot of hand-tweaking
still needed, I'll write up a How-To for the FAQ-o-Matic. Currently I only
gdbm support, and I built the gdbm in ASCII mode as well. I suppose I could
have left it alone, and done ASCII/EBCDIC translation of database filenames
ldbm.c or somesuch. I also needed to build an ASCII version of the regex
the OS/390 library has a LIBASCII version of regcomp but it never matched
successfully so I replaced it with the Henry Spencer library.

So with this build, OpenLDAP 2.1 runs on OS/390 and all internal data is left
ASCII/UTF8. The translation to/from EBCDIC only occurs when reading/writing
files/stdout/stderr. I guess this makes it difficult for other apps to use
client libraries, but I'll cross that bridge later.

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support

> -----Original Message-----
> From: Michael Stroder [mailto:michael@stroeder.com]

> Howard Chu wrote:
> >
> > On the server side I'm considering what it would take to leave
> the internals
> > in UTF8 and just translate DNs specified in the config file. Could use
> > something
> > like BSD's xstr to extract the string constants from the source and
> > ASCII-encode
> > the ones that are ber_print'd as a preprocessing step. Still not
> sure, the
> > debug logs would be ugly.
> Make sure to find out which EBCDIC variant to use (see RFC1345).
> IMHO it's not worth the effort.
> Ciao, Michael.