#include <stdio.h>
#include <errno.h>
-#include <sys/param.h> /* for PATH_MAX */
static const char mkdir_usage[] =
- "mkdir [OPTION] DIRECTORY...\n\n"
- "Create the DIRECTORY(ies), if they do not already exist\n\n"
+ "mkdir [OPTION] DIRECTORY...\n"
+#ifndef BB_FEATURE_TRIVIAL_HELP
+ "\nCreate the DIRECTORY(ies), if they do not already exist\n\n"
"Options:\n"
"\t-m\tset permission mode (as in chmod), not rwxrwxrwx - umask\n"
- "\t-p\tno error if existing, make parent directories as needed\n";
+ "\t-p\tno error if existing, make parent directories as needed\n"
+#endif
+ ;
static int parentFlag = FALSE;
while (argc > 0) {
int status;
struct stat statBuf;
- char buf[PATH_MAX + 1];
+ char buf[BUFSIZ + 1];
- if (strlen(*argv) > PATH_MAX - 1) {
+ if (strlen(*argv) > BUFSIZ - 1) {
fprintf(stderr, name_too_long, "mkdir");
exit FALSE;
}
argc--;
argv++;
}
- exit TRUE;
+ return( TRUE);
}