Further porting for Linux on PowerPC, ARM and S/390

On these platforms `char` is unsigned, leading to all kinds of problems, e.g. when pushing `EOF` through a char, returning -1 as a char, etc. This PR fixes those issues which cause `gt -test` unit tests to fail, but there might be other problems lurking under the surface.