Reserve less file space if possible in a directory entry

On POSIX systems, we can use the maximum file length instead of maximum
path length. This saves space and time for clearing the memory.
This commit is contained in:
Niels Dossche 2023-07-02 14:34:59 +02:00
parent 1fbbd2b250
commit 00c1e7bf0f

View file

@ -107,7 +107,11 @@ typedef struct _php_stream_statbuf {
} php_stream_statbuf;
typedef struct _php_stream_dirent {
#ifdef NAME_MAX
char d_name[NAME_MAX + 1];
#else
char d_name[MAXPATHLEN];
#endif
} php_stream_dirent;
/* operations on streams that are file-handles */