getopt_long function to parse the command line options, validate them and fill a struct. PR: 21922 Submitted by: Cyrille Lefevre <clefevre@citeweb.net>