[PATCH 2/5] iconvconfig: Read configuration from gconv-modules.d subdirectory
Siddhesh Poyarekar
siddhesh@sourceware.org
Mon Jun 7 09:17:34 GMT 2021
On 6/7/21 2:36 PM, Andreas Schwab wrote:
> On Jun 07 2021, Siddhesh Poyarekar via Libc-alpha wrote:
>
>> + /* Next, see if there is a gconv-modules.d directory containing configuration
>> + files and if it is non-empty. */
>> + cp[0] = '.';
>> + cp[1] = 'd';
>> + cp[2] = '\0';
>> +
>> + DIR *confdir = opendir (buf);
>> + if (confdir != NULL)
>> + {
>> + struct dirent *ent;
>> + while ((ent = readdir (confdir)) != NULL)
>> + {
>> + if (ent->d_type != DT_REG)
>> + continue;
>
> Should this also handle DT_UNKNOWN?
I suppose I could fall back to lstat to get the file type if dt_type is
not supported by the underlying filesystem.
Siddhesh
More information about the Libc-alpha
mailing list