[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Issue with AS_TR_CPP, m4_cr_all and EBCDIC codeset
From: |
Steve Goetze |
Subject: |
Issue with AS_TR_CPP, m4_cr_all and EBCDIC codeset |
Date: |
Sat, 27 Mar 2010 18:48:33 -0400 |
I'm trying to port autoconf to z/os, which uses an EBCDIC codeset.
I'm having trouble with autoconf where AC_CHECK_HEADERS_ONCE is
causing a bad string to be emitted to config.h.in.
For example, what should be "HAVE_STRING_H" is appearing as "_____STRING_H".
I've traced the problem down to the AS_TR_CPP macro which contains a
call to m4_translit as follows:
[m4_translit([$1],
[*[]]]m4_dquote(m4_defn([m4_cr_letters])m4_defn([m4_cr_not_symbols2]))[,
[P[]]]m4_dquote(m4_defn([m4_cr_LETTERS])m4_for(,1,255,,[[_]]))[)])
The second argument uses m4_cr_not_symbols2 which is defined with the
m4sugar macro m4_cr_all - the complete character range from 0-255.
When tracing the call to m4_translit, I see that the second argument
(the one that uses m4_cr_not_symbols2) looks something like this:
*[]abcdefghijklmnopqrstuvwxyz...<(+|&.........!HAVE_string.h);^/-...
The ... represent ranges of mostly unprintable characters. In the
middle of the argument, the HAVE_string.h is embedded,
inappropriately. Probably unfortunately in the EBCDIC codeset, the
characters !,$,*,) are adjacent; it appears as if the $* is being
interpolated to "HAVE_string.h".
At this point, I'm stuck - I'd appreciate any suggestions on how to
fix this, or even report it as a bug.
Thanks much,
--Steve Goetze
- Issue with AS_TR_CPP, m4_cr_all and EBCDIC codeset,
Steve Goetze <=