A few more warning fixes (prototype defines) + makes everything static

A few more updates, see the individual commits for the details.

b5de856 is the important one as that one actually generated warnings (see the commit).
The other two is just future proofing.