]> git.eshelyaron.com Git - emacs.git/commitdiff
(getpwuid): Declare it as in xrdb.c.
authorRichard M. Stallman <rms@gnu.org>
Sat, 14 Aug 1993 07:21:00 +0000 (07:21 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 14 Aug 1993 07:21:00 +0000 (07:21 +0000)
(init_filelock): Don't use return value of strcpy.

src/filelock.c

index 787fcc3ce66c00c0e3a175580140aabd0aab934c..73f6f4237e68eb65c69c0c817cc1fe38c9c7a2d8 100644 (file)
@@ -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, "/");
     }