When we include <dirent.h>
and <limits.h>
to a c file, dirent
structs' d_name
variable shows We must not include limits.h!
in the variable description in the ide. When I look at the file /usr/include/x86_64-linux-gnu/bits/dirent.h it contains the following code piece.
...
struct dirent
{
#ifndef __USE_FILE_OFFSET64
__ino_t d_ino;
__off_t d_off;
#else
__ino64_t d_ino;
__off64_t d_off;
#endif
unsigned short int d_reclen;
unsigned char d_type;
char d_name[256]; /* We must not include limits.h! */
};
...
My question is why we must not include limits.h
. I've searched online, but I couldn't find any satisfying answer.