Mercurial > emacs
changeset 4618:e4a5c21eb300
(getpwuid): Declare it as in xrdb.c.
(init_filelock): Don't use return value of strcpy.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 14 Aug 1993 07:21:00 +0000 |
parents | 807ba8bcc309 |
children | fdb92f0aa8c7 |
files | src/filelock.c |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/filelock.c Sat Aug 14 07:20:08 1993 +0000 +++ b/src/filelock.c Sat Aug 14 07:21:00 1993 +0000 @@ -42,7 +42,9 @@ extern char *egetenv (); extern char *strcpy (); -#ifndef __386bsd__ +#if defined (__bsdi__) || defined (DECLARE_GETPWUID_WITH_UID_T) +extern struct passwd *getpwuid (uid_t); +#else extern struct passwd *getpwuid (); #endif @@ -437,8 +439,9 @@ /* Make sure it ends with a slash. */ if (lock_path[strlen (lock_path) - 1] != '/') { - lock_path = strcpy ((char *) xmalloc (strlen (lock_path) + 2), - lock_path); + char *new_path = (char *) xmalloc (strlen (lock_path) + 2); + strcpy (new_path, lock_path); + lock_path = new_path; strcat (lock_path, "/"); }