Full_Name: Jean-Frederic Clere Version: HEAD OS: BS2000 URL: ftp://ftp.openldap.org/incoming/jfrederic.clere-030530.ebcdic Submission from: (NULL) (217.115.66.150) Find enclosed the patch needed to get slurpd and slapd running on a BS2000. The ITS 2558 and 2559 need to be apply togother with the attached patche.
moved from Incoming to Build
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. I suggest this issue be discussed on the developers' list. Kurt
changed notes changed state Open to Feedback
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 > >
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 >> >>
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 > >> > >> > > >
> -----Original Message----- > From: owner-openldap-bugs@OpenLDAP.org > [mailto:owner-openldap-bugs@OpenLDAP.org]On Behalf Of Kurt Zeilenga > 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. > > I suggest this issue be discussed on the developers' list. Another problem I just noticed; there is a test for <ctype.h> functionality in the check for ANSI C headers that fails on OS/390 because HAVE_EBCDIC is defined, but the compiler is set to use ASCII literals. So configure decides that the ANSI C headers are not available, even though they are. On a slightly related topic, build/shtool uses hardcoded ASCII code values for its "terminal bold sequence" which is not portable. E.g., it uses awk 'BEGIN { printf("%c%c%c%c", 27, 91, 49, 109); }' so these codes are used literally on an EBCDIC host, which is garbage. If it used the actual literals "^[[1m" instead, the same string would work on both ASCII and EBCDIC hosts. This is hardly a tragedy, but I figured it should be mentioned. -- Howard Chu Chief Architect, Symas Corp. Director, Highland Sun http://www.symas.com http://highlandsun.com/hyc Symas: Premier OpenSource Development and Support
discussion needed