Revert r335693, r335694, r335695 by eadler.They cause mail(1) to crash in certain scenarios.PR: 230196Reported by: Pete French <petefrench@ingresso.co.uk>
MFC r302776, r302799:mail(1): Bring some fixes from other BSDs.- Use varargs properly- Use pid_t- Better handling of error conditions on forked jobs.- Some prototype and warning cleanups.Fix missing forked job changes from r302776 in wait_child().
MFC r270256:Always check the limits of array index variables before using them.Obtained from: DragonFlyBSD