diff --git a/commands/backup/backup.c b/commands/backup/backup.c index 5d0127a5c..3c0783dbf 100644 --- a/commands/backup/backup.c +++ b/commands/backup/backup.c @@ -43,7 +43,7 @@ #include #include -#define NAME_SIZE _DIRENT_NAME_LEN +#define NAME_SIZE NAME_MAX #undef NARROW /* Width of verbose output */ #define COPY_SIZE 4096 diff --git a/commands/compress/compress.c b/commands/compress/compress.c index 8bab386bf..d2d73b731 100644 --- a/commands/compress/compress.c +++ b/commands/compress/compress.c @@ -575,7 +575,7 @@ char **argv; cp++; else cp = ofname; - if (strlen(cp) >= _DIRENT_NAME_LEN-3) + if (strlen(cp) >= NAME_MAX-3) { fprintf(stderr,"%s: filename too long to tack on .Z\n",cp); continue; diff --git a/include/minix/dirent.h b/include/minix/dirent.h index 03b222efe..44ff02ffb 100644 --- a/include/minix/dirent.h +++ b/include/minix/dirent.h @@ -46,8 +46,6 @@ typedef struct { */ } DIR; -#define _DIRENT_NAME_LEN 61 - struct dirent { /* Largest entry (8 slots) */ ino_t d_ino; /* I-node number */ off_t d_off; /* Offset in directory */ diff --git a/nbsd_include/sys/dirent.h b/nbsd_include/sys/dirent.h index 49db5d70f..4fd459a3e 100644 --- a/nbsd_include/sys/dirent.h +++ b/nbsd_include/sys/dirent.h @@ -21,11 +21,6 @@ struct dirent { /* Largest entry (8 slots) */ #define d_fileno d_ino #endif -#define _DIRENT_NAME_LEN 61 /* Backward compatibility with Minix. */ -#if defined(_NETBSD_SOURCE) -#define MAXNAMLEN _DIRENT_NAME_LEN -#endif - /* * The _DIRENT_ALIGN macro returns the alignment of struct dirent. It