diff options
Diffstat (limited to 'mkdir.c')
-rw-r--r-- | mkdir.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -28,7 +28,6 @@ | |||
28 | 28 | ||
29 | #include <stdio.h> | 29 | #include <stdio.h> |
30 | #include <errno.h> | 30 | #include <errno.h> |
31 | #include <sys/param.h> /* for PATH_MAX */ | ||
32 | 31 | ||
33 | static const char mkdir_usage[] = | 32 | static const char mkdir_usage[] = |
34 | "mkdir [OPTION] DIRECTORY...\n\n" | 33 | "mkdir [OPTION] DIRECTORY...\n\n" |
@@ -86,9 +85,9 @@ extern int mkdir_main(int argc, char **argv) | |||
86 | while (argc > 0) { | 85 | while (argc > 0) { |
87 | int status; | 86 | int status; |
88 | struct stat statBuf; | 87 | struct stat statBuf; |
89 | char buf[PATH_MAX + 1]; | 88 | char buf[BUFSIZ + 1]; |
90 | 89 | ||
91 | if (strlen(*argv) > PATH_MAX - 1) { | 90 | if (strlen(*argv) > BUFSIZ - 1) { |
92 | fprintf(stderr, name_too_long, "mkdir"); | 91 | fprintf(stderr, name_too_long, "mkdir"); |
93 | exit FALSE; | 92 | exit FALSE; |
94 | } | 93 | } |