comparison src/filelock.c @ 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 2ed300d36643
children 9d56bce1534a
comparison
equal deleted inserted replaced
4617:807ba8bcc309 4618:e4a5c21eb300
40 extern int errno; 40 extern int errno;
41 41
42 extern char *egetenv (); 42 extern char *egetenv ();
43 extern char *strcpy (); 43 extern char *strcpy ();
44 44
45 #ifndef __386bsd__ 45 #if defined (__bsdi__) || defined (DECLARE_GETPWUID_WITH_UID_T)
46 extern struct passwd *getpwuid (uid_t);
47 #else
46 extern struct passwd *getpwuid (); 48 extern struct passwd *getpwuid ();
47 #endif 49 #endif
48 50
49 #ifdef CLASH_DETECTION 51 #ifdef CLASH_DETECTION
50 52
435 lock_path = PATH_LOCK; 437 lock_path = PATH_LOCK;
436 438
437 /* Make sure it ends with a slash. */ 439 /* Make sure it ends with a slash. */
438 if (lock_path[strlen (lock_path) - 1] != '/') 440 if (lock_path[strlen (lock_path) - 1] != '/')
439 { 441 {
440 lock_path = strcpy ((char *) xmalloc (strlen (lock_path) + 2), 442 char *new_path = (char *) xmalloc (strlen (lock_path) + 2);
441 lock_path); 443 strcpy (new_path, lock_path);
444 lock_path = new_path;
442 strcat (lock_path, "/"); 445 strcat (lock_path, "/");
443 } 446 }
444 447
445 superlock_path = (char *) xmalloc ((strlen (lock_path) 448 superlock_path = (char *) xmalloc ((strlen (lock_path)
446 + sizeof (SUPERLOCK_NAME))); 449 + sizeof (SUPERLOCK_NAME)));