There should be an extern int variable named "opterr" that determines whether or not getopt() prints an error message. I think setting it to zero (opposite of what the SVR2 manual says) disables the message.