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

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...


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 Check if system uses EBCDIC instead of ASCII
>AC_CACHE_CHECK([for EBCDIC],ol_cv_cpp_ebcdic,[
>         AC_TRY_CPP([
>#if !('M' == 0xd4)
>#include <__ASCII__/generate_error.h>
>         [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])
>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