[PATCH v21 02/14] windows: make getopt functions have const properties

Stephen Hemminger stephen at networkplumber.org
Tue Jun 4 04:31:28 CEST 2024


On Mon,  3 Jun 2024 17:44:50 -0700
Stephen Hemminger <stephen at networkplumber.org> wrote:

> Having different prototypes on different platforms can lead
> to lots of unnecessary workarounds.  Looks like the version of
> getopt used from windows was based on an older out of date
> version from FreeBSD.
> 
> This patch changes getopt, getopt_long, etc to have the same const
> attributes as Linux and FreeBSD. The changes are derived from
> the current FreeBSD version of getopt_long.
> 
> Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
> Acked-by: Tyler Retzlaff <roretzla at linux.microsoft.com>
> Acked-by: Dmitry Kozlyuk <dmitry.kozliuk at gmail.com>

Ignore checkpatch complaints about this file.

It is better for the code to not change from the original FreeBSD.


More information about the dev mailing list