On 3 Jun 2002 at 9:42, Wu Yongwei wrote:
> I just verified that MSVC 7 did not define MAX_PATH in stdlib.h, either.
> It should not be there, really. According to Microsoft conventions, all
> non-standard (C89 here) symbols defined in standard headers begin with an
> underline. I don't think it ever defined in MSVC stdlib.h, though I cannot
> verify MSVC 5 or earlier versions. And I don't suppose anybody should be
> using it from stdlib.h now.
Well, according to the latest Platform SDK (November of last year), MAX_PATH is defined within WinDef.h.
I do not think it was ever defined within stdlib.h, at least not by MS.
So, if you are wanting to find MAX_PATH, you will find it is defined as 260 within WinDef.h (MS Platform
stdlib.h thing might be an artifact of an older release of Mingw, however. Updating to newest release of
Mingw would likely eliminate any questions re: stdlib.h having MAX_PATH defined.
> In your first reference the Microsoft developer might have been confused by
> the underscore issue and made a wrong statement. He did not find his problem
> because he always include windows.h. A reasonable guess?
Wouldn't call that just a "reasonable" guess, but a fact. 98% chance that the particular developer didn't think
beyond Windows.h since MSVC VSx usually defaults to including Windows.h even though the developer (newer
MSVC developers are far more prone to this than the older MSVC developers) may not be aware of that particular
Fact is, if you want MAX_PATH defined, then you must, at the very least include WinDef.h. Windows.h
automatically includes windef.h.