[EXTERNAL] Re: Cygwin 3.6: clang cannot use /usr/include/unistd.h, issue with |setproctitle_init()| ...

Lavrentiev, Anton (NIH/NLM/NCBI) [C] lavr@ncbi.nlm.nih.gov
Wed Mar 5 20:27:53 GMT 2025


>  We could change this to a macro instead:
>
> -static inline void setproctitle_init (int, char *[], char *[]) {}
> +#define setproctitle_init(c, a, e)

Changing to the empty marco removes the side effects in the arguments (such as len++, for example),
which may silently break existing code -- so I think it's not a good idea.  If the idea to use the empty
arguments was not to implicitly document them (because the API was slated for removal, IIRC), then
naming them just with "arg1", "arg2" (rather than leaving empty altogether) should help better, IMO.

Anton Lavrentiev
Contractor NIH/NLM/NCBI



More information about the Cygwin mailing list