The problem would remain the same and make all of that work moot. getopt is standard Unix, there must be a BSD or MIT licensed version of that code somewhere.