#include <sys/types.h>
#include <sys/stat.h>
-#include "config.h"
+#include <config.h>
#ifdef VMS
#include "vms-pwd.h"
#endif /* USG */
#include "lisp.h"
-#include "paths.h"
+#include <paths.h>
#include "buffer.h"
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
for (p = XSTRING (fn)->data; new = *p++; )
{
- new += crc.byte[7];
- crc.byte[7] = crc.byte[6];
+ new += crc.byte[6];
crc.byte[6] = crc.byte[5] + new;
crc.byte[5] = crc.byte[4];
crc.byte[4] = crc.byte[3];
/* If HAVE_LONG_FILE_NAMES is not defined, the lock file name is the hex
representation of a 14-bytes CRC generated from the file name
and put in the Emacs lock directory (not very nice, but it works).
- (ie., /ka/king/junk.tex -> /!/ec92d3ed24a8f0). */
+ (ie., /ka/king/junk.tex -> /!/12a82c62f1c6da). */
void
lock_file (fn)
/* 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, "/");
}