]> diplodocus.org Git - nmh/blobdiff - uip/slocal.c
Part 1 of merging sbr/norm_charmap.c into sbr/check_charset.c.
[nmh] / uip / slocal.c
index 34c615a768197e17b27b6847e0bcf83387cf0b7d..cfbba804b759d77887042fb6cee75ae98d50cd0e 100644 (file)
@@ -27,6 +27,8 @@
 #include <h/tws.h>
 #include <h/mts.h>
 #include <h/utils.h>
+#include "../sbr/lock_file.h"
+#include "../sbr/m_mktemp.h"
 
 #include <pwd.h>
 #include <sys/ioctl.h>
@@ -708,7 +710,7 @@ parse (int fd)
     int i, state;
     int fd1;
     char *cp, *dp, *lp;
-    char name[NAMESZ], field[BUFSIZ];
+    char name[NAMESZ], field[NMH_BUFSIZ];
     struct pair *p, *q;
     FILE  *in;
     m_getfld_state_t gstate = 0;
@@ -1093,9 +1095,9 @@ usr_pipe (int fd_arg, char *cmd, char *pgm, char **vec, int suppress)
            setpgid ((pid_t) 0, getpid ());     /* put in own process group */
 
            *environ = NULL;
-           m_putenv ("USER", pw->pw_name);
-           m_putenv ("HOME", pw->pw_dir);
-           m_putenv ("SHELL", pw->pw_shell);
+           setenv("USER", pw->pw_name, 1);
+           setenv("HOME", pw->pw_dir, 1);
+           setenv("SHELL", pw->pw_shell, 1);
 
            execvp (pgm, vec);
            _exit (-1);
@@ -1407,7 +1409,7 @@ static int
 suppress_duplicates (int fd, char *file)
 {
     int        fd1, lockfd, state, result;
-    char *cp, buf[BUFSIZ], name[NAMESZ];
+    char *cp, buf[NMH_BUFSIZ], name[NAMESZ];
     datum key, value;
     DBM *db;
     FILE *in;