Jean-Marc Lasgouttes wrote:
>
> >>>>> "Dirk" == Dirk Klugmann <[EMAIL PROTECTED]> writes:
>
> Dirk> I had to include the line:
>
> Dirk> #include <X11/Xfuncs.h>
>
> Dirk> into the file "spellchecker.C". This is the header file where
> Dirk> our gcc-2.95.2 distribution on AIX/RS6000 defines "bzero".
>
> You mean that bzero is not defined in any other header file? This
> seems highly unlikely...
Wrong, this rather likely. It is a classical BSD (bcopy) vs. SYSV
(memset) portability issue, because real SYSV systems do not have
bcopy and friends at all (I don't know any details about AIX, so I
can't comment in this specific case).
FYI: From linux's bcopy man-page:
CONFORMING TO
4.3BSD. This function is deprecated -- use memset in new
programs.
The bcopy in X11/Xfuncs.h is just a hack X11 applies to work around
this issue. Portable programs have to apply similar portability
checks if they are supposed to be compileable on old SYSV or BSD
systems. As mem* functions are available on most contemporary OSes I
would recommend to use mem* family functions (ISO-standard) only and
to map b* functions etc. to mem* functions on OSes which don't
provide them.
Ralf
--
Ralf Corsepius
Forschungsinstitut fuer Anwendungsorientierte Wissensverarbeitung
(FAW)
Helmholtzstr. 16, 89081 Ulm, Germany Tel: +49/731/501-8690
mailto:[EMAIL PROTECTED] FAX: +49/731/501-999
http://www.faw.uni-ulm.de