Web lists-archives.com

Is Cygwin supposed to know _get_pgmptr?

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;

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.


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