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

RE: porting to BS2000 (OSD_POSIX) (ITS#2560)



We already have a test for EBCDIC in libtool, which uses echo and od to
determine the result. Can we use the same test in the autoconf script,
instead of using the compiler to test?

  -- 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: owner-openldap-bugs@OpenLDAP.org
> [mailto:owner-openldap-bugs@OpenLDAP.org]On Behalf Of
> Kurt@OpenLDAP.org
> Sent: Wednesday, August 13, 2003 1:07 PM
> To: openldap-its@OpenLDAP.org
> Subject: Re: porting to BS2000 (OSD_POSIX) (ITS#2560)
>
>
> Using _OSD_POSIX seems counter to the purpose of autoconf
> (to "detect" the feature)...  is there a better way?
>
> Also, I assume HAVE_EBCDIC implies literals are EBCDIC.
> Maybe we need another macro to say that literals are ASCII but
> EBCDIC is used elsewhere.
>
> Guess I need to review exactly how HAVE_EBCDIC is used...
>
> Kurt
>
> At 02:22 AM 8/12/2003, jfrederic.clere@fujitsu-siemens.com wrote:
> >Kurt Zeilenga wrote:
> >> In your patch, you note:
> >>   /* The autoconf does not detect correctly EBCDIC */
> >>
> >> I rather see autoconf fixed to properly detect EBCDIC.  If
> an OpenLDAP specific
> >> fix is needed in the short-term, I rather see this
> contained to configure.in
> >> than acconfig.h.
> >
> >+++
> >dnl
> >dnl
> ====================================================================
> >dnl Check if system uses EBCDIC instead of ASCII
> >AC_DEFUN([OL_CPP_EBCDIC], [# test for EBCDIC
> >AC_CACHE_CHECK([for EBCDIC],ol_cv_cpp_ebcdic,[
> >         AC_TRY_CPP([
> >#if !('M' == 0xd4)
> >#include <__ASCII__/generate_error.h>
> >#endif
> >],
> >         [ol_cv_cpp_ebcdic=yes],
> >         [ol_cv_cpp_ebcdic=no])])
> >if test $ol_cv_cpp_ebcdic = yes ; then
> >         AC_DEFINE(HAVE_EBCDIC,1, [define if system uses
> EBCDIC instead of ASCII])
> >fi
> >])
> >+++
> >
> >That is the place where we detect EBCDIC. (in build/openldap.m4).
> >When I am using "CC=cc -K literal_encoding_ascii; export CC
> ; configure" the
> >(pre)compiler handle the 'M' in ASCII therefore EBCDIC is
> not detected.
> >
> >Adding a #if !defined(_OSD_POSIX) before include
> <__ASCII__/generate_error.h>
> >solves my problem.
> >
> >>
> >> I suggest this issue be discussed on the developers' list.
> >>
> >> Kurt
> >>
> >>
>
>
>