When building 21.5.9 on AIX 4.3.3 using either the IBM VisualAge C/C++
Compiler (VAC) or the older IBMCXX Compiler, the process stops at the
compilation of src/keymap.c with the following error:
"keymap.c", line 4015.1: 1506-191 (E) The character # is not a valid C
source character.
"keymap.c", line 4015.8: 1506-276 (S) Syntax error: possible missing
')'?
"keymap.c", line 4015.2: 1506-045 (S) Undeclared identifier ifdef.
"keymap.c", line 4017.2: 1506-201 (S) #else can only appear within a
#if, #elif, #ifdef or #ifndef block.
"keymap.c", line 4018.75: 1506-275 (S) Unexpected text ')' encountered.
"keymap.c", line 4019.2: 1506-202 (S) #endif can only appear at the end
of a #if, #elif, #ifdef or #ifndef block.
Obviously, the IBM compilers can't handle the "#ifdef" statement within
the memcpy function call at line 4015 ff. in src/keymap.c:
memcpy ((void *)new, (const void *)c->keys_so_far,
#ifdef USE_KKCC
c->keys_so_far_total_size * sizeof (Lisp_Key_Data));
#else /* not USE_KKCC */
c->keys_so_far_total_size * sizeof (struct key_data));
#endif /* not USE_KKCC */
Compiling with gcc works fine, but I'd like to use one of the IBM
compilers as they provide better optimization for the RS/6000
architecture and produce smaller binaries. If anyone has already built
successfully with one of these compilers on AIX, I'd be glad to hear
which flags/options are required to get along with the code fragment
above.
Otherwise I'd kindly ask to move the "memcpy" line into the
"#ifdef" and
"#else" branches. Although it may look less elegant, it will make XEmacs
compile on the RS/6000 architecture with the standard AIX compiler (not
everybody has gcc available on AIX).
Please let me know what you're thinking. Thanks!
Regards,
Markus
--
Markus Alt
IBM Lab Boeblingen, Germany
altmark(a)de.ibm.com