#2603 Problems with compatibility routines on HP/UX with aCC

obsolete: 8.4.5

When compiling tcl 8.4.5 on HP/UX B.11.11 U 9000/800
1139019648 using HP ANSI C++ B3910B A.03.33

files compat/strstr.c and compat/memcmp.c do not compile.

Configure script was run with options:
CC=aCC CFLAGS=-Ae ./configure

(-Ae option is required to make this compiler accept
plain C)

strstr.c is failed because NULL is undeclared. It can be
easily fixed including <stdlib.h>.

With memcmp.c situation is more difficult. It is
that compiler doesn't like to increment void* pointers,
but casting them into char * resulted in very strange error

Error 167: "./../compat/memcmp.c", line 51 # Arithmetic
or pointer type
expected for operator '++'; type found was
'unsigned char *'.
for ( ; n-- ; ((unsigned char *)s1)++,
((unsigned char *)s2)++) {

I've solved problem by adding two temporary variables
of type
unsigned char *.

After that tcl compiles and seems to work.


  • Don Porter

    Don Porter - 2004-02-25

    Logged In: YES

    aCC is a C++ compiler, right?

    Is there a corresponding C compiler
    you might try instead?

  • Jeffrey Hobbs

    Jeffrey Hobbs - 2007-02-09
    • status: open --> pending-out-of-date
  • SourceForge Robot

    Logged In: YES
    Originator: NO

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

  • SourceForge Robot

    • status: pending-out-of-date --> closed-out-of-date