Add support for -c to sha256sum to fix port build failures

From: Stefan Esser <>
Date: Fri, 18 Jun 2021 09:43:02 UTC
The sha256 programs have recently been extended to provide
GNU compatible features if invoked as sha256sum.

This does now lead to port build issues, since there are ports that
assume that the -c option is implemented and that treat an error exit
of sha256sum -c as an indication of corrupted source files.

I have created

as a quick attempt to provide a GNU compatible sha256sum -c feature
and I'd appreciate a review this change.

An alternative to adding this feature would be changes to all ports
that now fail due to the assumption that sha256sum does provide that

I could have used linked list macros, but given the simple structure
I did not think the extra dependency was required here, and it does
not really simplify the program, IMHO.

Regards, STefan