[vlc-devel] [PATCH v2 11/18] configure: Test if pathconf exists

Dennis Hamester dhamester at jusst.de
Tue Mar 14 11:23:41 CET 2017


On 13.03.2017 20:20, Rémi Denis-Courmont wrote:
> Le maanantaina 13. maaliskuuta 2017, 12.36.57 EET Dennis Hamester a écrit :
>> diff --git a/src/posix/filesystem.c b/src/posix/filesystem.c
>> index f4d0e2691f..f3e09f8fd9 100644
>> --- a/src/posix/filesystem.c
>> +++ b/src/posix/filesystem.c
>> @@ -187,7 +187,13 @@ int vlc_rename (const char *oldpath, const char
>> *newpath)
>>
>>  char *vlc_getcwd (void)
>>  {
>> -    long path_max = pathconf (".", _PC_PATH_MAX);
>> +    long path_max;
>> +#ifdef HAVE_PATHCONF
>> +    path_max = pathconf (".", _PC_PATH_MAX);
>> +#else
>> +    path_max = -1;
>> +#endif
>> +
>>      size_t size = (path_max == -1 || path_max > 4096) ? 4096 : path_max;
>>
>>      for (;; size *= 2)
> 
> pathconf() is not optional in POSIX / src/posix. No thanks.
> 

I've changed this fall back to new compat/pathconf.c instead.

-- 
Dennis Hamester
Software Development
-----------------------------------
jusst technologies GmbH

tel: +49 (0)40 1800 86 75
fax: +49 (0)40 1800 86 76
mail: dhamester at jusst.de

Ohlstedter Straße 12
22397 Hamburg
Deutschland

www.jusst.de

Vertretungsberechtigte Geschäftsführer: Julian Scheel, Wolfgang Scheel
Registergericht: Amtsgericht Hamburg
Registernummer: HRB 94300
USt-ID-Nr.: DE 243309917

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 862 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20170314/ba8d6ba9/attachment.sig>


More information about the vlc-devel mailing list