diff options
author | Richard M. Stallman <rms@gnu.org> | 1993-08-14 07:21:00 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1993-08-14 07:21:00 +0000 |
commit | 4601350064e3ff852f1b7a179feeab066df59768 (patch) | |
tree | f194b4bd1b40481fe3b6b20dd0f6dabfb0882743 /src/filelock.c | |
parent | 11378c410a4f99ac0ddf76704e5f862f35aeb135 (diff) | |
download | emacs-4601350064e3ff852f1b7a179feeab066df59768.tar.gz |
(getpwuid): Declare it as in xrdb.c.
(init_filelock): Don't use return value of strcpy.
Diffstat (limited to 'src/filelock.c')
-rw-r--r-- | src/filelock.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/filelock.c b/src/filelock.c index 787fcc3ce66..73f6f4237e6 100644 --- a/src/filelock.c +++ b/src/filelock.c @@ -42,7 +42,9 @@ extern int errno; 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 @@ init_filelock () /* 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, "/"); } |