Global variables in system programs

Eitan Adler lists at eitanadler.com
Thu Oct 17 14:09:52 UTC 2013


On Thu, Oct 17, 2013 at 9:38 AM, Sebastian Huber
<sebastian.huber at embedded-brains.de> wrote:
> Hello,
>
> there is another problem: getopt().  This function uses global variables on
> its own.  Newlib provides a getopt_r() variant, but this seems to be not
> available on FreeBSD.

It shouldn't be hard to port this to FreeBSD (it just requires that
the global variables be passed in as pointers-to-values).

Please do so!

-- 
Eitan Adler


More information about the freebsd-hackers mailing list