/* Utility and Unix shadow routines for GNU Emacs on the Microsoft Windows API.
-Copyright (C) 1994-1995, 2000-2014 Free Software Foundation, Inc.
+Copyright (C) 1994-1995, 2000-2015 Free Software Foundation, Inc.
This file is part of GNU Emacs.
#include <pwd.h>
#include <grp.h>
-/* MinGW64 (_W64) defines these in its _mingw.h. */
+/* MinGW64 defines these in its _mingw.h. */
#ifndef _ANONYMOUS_UNION
# define _ANONYMOUS_UNION
#endif
#define SDDL_REVISION_1 1
#endif /* SDDL_REVISION_1 */
-#if defined(_MSC_VER) || defined(_W64)
+#if defined(_MSC_VER) || defined(MINGW_W64)
/* MSVC and MinGW64 don't provide the definition of
REPARSE_DATA_BUFFER and the associated macros, except on ntifs.h,
which cannot be included because it triggers conflicts with other
typedef HRESULT (WINAPI * ShGetFolderPath_fn)
(IN HWND, IN int, IN HANDLE, IN DWORD, OUT char *);
-Lisp_Object QCloaded_from;
-
void globals_of_w32 (void);
static DWORD get_rid (PSID);
static int is_symlink (const char *);
int ln;
strcpy (filename, dir_pathname);
- ln = strlen (filename) - 1;
- if (!IS_DIRECTORY_SEP (filename[ln]))
- strcat (filename, "\\");
- strcat (filename, "*");
+ ln = strlen (filename);
+ if (!IS_DIRECTORY_SEP (filename[ln - 1]))
+ filename[ln++] = '\\';
+ strcpy (filename + ln, "*");
/* Note: No need to resolve symlinks in FILENAME, because
FindFirst opens the directory that is the target of a
{
/* Make sure root directories end in a slash. */
if (!IS_DIRECTORY_SEP (name[len-1]))
- strcat (name, "\\");
+ strcpy (name + len, "\\");
if (GetDriveType (name) < 2)
{
errno = ENOENT;
p--;
if (p > linkfn)
strncpy (tem, linkfn, p - linkfn);
- tem[p - linkfn] = '\0';
- strcat (tem, filename);
+ strcpy (tem + (p - linkfn), filename);
dir_access = faccessat (AT_FDCWD, tem, D_OK, AT_EACCESS);
}
else