lib: export memcmp for external modules to build with gcc 3.4

When building external modules for a kernel built with gcc-3.4, it
sometimes happens that the module depends on memcmp() which is not
defined. x86 only relies on __builtin_memcmp() which is not always
available on other gccs. Since the mapping of memcmp() to
__builtin_memcmp() is performed using a #define, no memcmp() symbol
is declared. We have to export it in lib/string.c, as in 2.6.

Note that 2.6 also undefines a few other symbols and exports all
symbols. Right now this does not seem absolutely necessary on 2.4,
so let's not touch this for now.
2 files changed