libcflat: add more string functions

More string functions will be needed for libfdt, add them and
also strcpy which was missing.

Split string function declarations out to own string.h.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
libcflat: add abort() and assert()

The test framework may have external dependencies. assert() provides
the ability to abort when those dependencies aren't met. However,
assert() should only be used for unlikely conditions. We can provide
more informative messages with printf() for the more likely problems.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
libcflat: clean up libcflat.h

Use libgcc's stddef.h and stdint.h, and then remove the redundant defines
from libcflat.h. These changes have no affect on code including libcflat.h,
but are needed in order to compile an unmodified libfdt for kvm-unit-tests
using an arm cross-compiler.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>