Is Cygwin supposed to know _get_pgmptr?

Jeffrey Walton noloader@gmail.com
Mon Feb 11 17:09:00 GMT 2019


Hi Everyone,

I have some code that looks like so:

#if defined(_WINDOWS)
    char* pgmptr = NULLPTR;
    errno_t err = _get_pgmptr(&pgmptr);
    if (err == 0 && pgmptr != NULLPTR)
        exePath = pgmptr;
#endif

The code gets the full path of the executable. It sidsteps some
problems with finding the full path of an executable. Posix realpath
is a little messier and has some inherent problem with path lengths.

The code fails to compile with Cygwin.

I am wondering if the failure is expected.

Jeff

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list