diff options
Diffstat (limited to 'contrib/cpio')
-rw-r--r-- | contrib/cpio/main.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/contrib/cpio/main.c b/contrib/cpio/main.c index 76125f0..bba4d32 100644 --- a/contrib/cpio/main.c +++ b/contrib/cpio/main.c @@ -23,6 +23,12 @@ #include <getopt.h> #include <sys/types.h> #include <sys/stat.h> +#ifdef HAVE_SYS_PARAM_H +#include <sys/param.h> +#endif +#if (defined(BSD) && (BSD >= 199306)) +#include <locale.h> +#endif #include "filetypes.h" #include "system.h" #include "cpiohdr.h" @@ -498,7 +504,10 @@ main (argc, argv) char *argv[]; { program_name = argv[0]; - umask (0); + +#if (defined(BSD) && (BSD >= 199306)) + (void) setlocale (LC_ALL, ""); +#endif #ifdef __TURBOC__ _fmode = O_BINARY; /* Put stdin and stdout in binary mode. */ @@ -509,6 +518,7 @@ main (argc, argv) #endif process_args (argc, argv); + umask (0); initialize_buffers (); |