*/
#ifndef lint
-static char sccsid[] = "@(#)pw_copy.c 8.4 (Berkeley) 4/2/94";
+static const char sccsid[] = "@(#)pw_copy.c 8.4 (Berkeley) 4/2/94";
#endif /* not lint */
/*
#include <pwd.h>
#include <stdio.h>
#include <string.h>
+#include <unistd.h>
#include <pw_util.h>
#include "pw_copy.h"
snprintf(uidstr, sizeof(uidstr), "%d", pw->pw_uid);
snprintf(gidstr, sizeof(gidstr), "%d", pw->pw_gid);
- snprintf(chgstr, sizeof(chgstr), "%lu", pw->pw_change);
- snprintf(expstr, sizeof(expstr), "%lu", pw->pw_expire);
+ snprintf(chgstr, sizeof(chgstr), "%ld", pw->pw_change);
+ snprintf(expstr, sizeof(expstr), "%ld", pw->pw_expire);
if (!(from = fdopen(ffd, "r")))
pw_error(_PATH_MASTERPASSWD, 1, 1);
goto err;
continue;
}
- (void)fprintf(to, "%s:%s:%s:%s:%s:%ld:%ld:%s:%s:%s\n",
+ (void)fprintf(to, "%s:%s:%s:%s:%s:%s:%s:%s:%s:%s\n",
pw->pw_name, pw->pw_passwd,
pw->pw_fields & _PWF_UID ? uidstr : "",
pw->pw_fields & _PWF_GID ? gidstr : "",
pw_error(NULL, 0, 1);
} else
#endif /* YP */
- (void)fprintf(to, "%s:%s:%s:%s:%s:%ld:%ld:%s:%s:%s\n",
+ (void)fprintf(to, "%s:%s:%s:%s:%s:%s:%s:%s:%s:%s\n",
pw->pw_name, pw->pw_passwd,
pw->pw_fields & _PWF_UID ? uidstr : "",
pw->pw_fields & _PWF_GID ? gidstr : "",