[libdvdcss-devel] [PATCH] win32: Remove unnecessary PATH_MAX definition
Diego Biurrun
diego at biurrun.de
Tue Nov 4 10:57:58 CET 2014
On Mon, Nov 03, 2014 at 11:39:43AM +0100, Diego Biurrun wrote:
> On Mon, Nov 03, 2014 at 11:23:12AM +0100, Diego Biurrun wrote:
> > On Mon, Nov 03, 2014 at 11:16:39AM +0100, Jean-Baptiste Kempf wrote:
> > > On 03 Nov, Diego Biurrun wrote :
> > > > On Mon, Nov 03, 2014 at 11:11:49AM +0100, Jean-Baptiste Kempf wrote:
> > > > > On 03 Nov, Diego Biurrun wrote :
> > > > > > PATH_MAX is present in all supported Windows platforms nowadays.
> > > > >
> > > > > How is that windows version/platform specific, and not
> > > > > toolchain-related?
> > > >
> > > > Good point; log message amended to:
> > > >
> > > > win32: Remove unnecessary PATH_MAX definition
> > > >
> > > > PATH_MAX is present in all supported Windows toolchains nowadays.
> > >
> > > Well, in my setup, it does not work on a normal mingw.org of debian
> > > stable.
> >
> > mingw32 or mingw64?
>
> I cannot reproduce with package mingw32 at version 4.2.1.dfsg-2ubuntu1
> on my Ubuntu 14.04 system, neither with package gcc-mingw-w64-i686 at
> version 4.8.2-10ubuntu2+12.
I doubt you can reproduce it either the code is the following:
#if defined(_WIN32_IE) && _WIN32_IE >= 0x500
char psz_home[MAX_PATH];
/* Cache our keys in
* C:\Documents and Settings\$USER\Application Data\dvdcss\ */
if (SHGetFolderPathA (NULL, CSIDL_APPDATA | CSIDL_FLAG_CREATE,
NULL, SHGFP_TYPE_CURRENT, psz_home ) == S_OK)
{
snprintf( dvdcss->psz_cachefile, PATH_MAX, "%s\\dvdcss", psz_home );
dvdcss->psz_cachefile[PATH_MAX - 1] = '\0';
psz_cache = dvdcss->psz_cachefile;
}
#else
Pay special attention to the use of both MAX_PATH and PATH_MAX in the same
block of code...
Diego
More information about the libdvdcss-devel
mailing list