* autogen/update_autogen: Pass -f to autoreconf.
[bpt/emacs.git] / src / w32.c
index d4f6854..5643b3f 100644 (file)
--- a/src/w32.c
+++ b/src/w32.c
@@ -147,9 +147,6 @@ typedef HRESULT (WINAPI * ShGetFolderPath_fn)
 void globals_of_w32 (void);
 static DWORD get_rid (PSID);
 
-/* Defined in process.c for its own purpose.  */
-extern Lisp_Object Qlocal;
-
 \f
 /* Initialization states.
 
@@ -2379,8 +2376,8 @@ readdir (DIR *dirp)
   if (wnet_enum_handle != INVALID_HANDLE_VALUE)
     {
       if (!read_unc_volume (wnet_enum_handle,
-                             dir_find_data.cFileName,
-                             MAX_PATH))
+                            dir_find_data.cFileName,
+                            MAX_PATH))
        return NULL;
     }
   /* If we aren't dir_finding, do a find-first, otherwise do a find-next. */
@@ -2490,7 +2487,7 @@ read_unc_volume (HANDLE henum, char *readbuf, int size)
 
   count = 1;
   buffer = alloca (bufsize);
-  result = WNetEnumResource (wnet_enum_handle, &count, buffer, &bufsize);
+  result = WNetEnumResource (henum, &count, buffer, &bufsize);
   if (result != NO_ERROR)
     return NULL;
 
@@ -3253,8 +3250,6 @@ int
 stat (const char * path, struct stat * buf)
 {
   char *name, *r;
-  char drive_root[4];
-  UINT devtype;
   WIN32_FIND_DATA wfd;
   HANDLE fh;
   unsigned __int64 fake_inode;
@@ -3614,6 +3609,25 @@ utime (const char *name, struct utimbuf *times)
 }
 
 \f
+/* Symlink-related functions that always fail.  Used in fileio.c to
+   avoid #ifdef's.  */
+int
+symlink (char const *dummy1, char const *dummy2)
+{
+  errno = ENOSYS;
+  return -1;
+}
+
+ssize_t
+readlink (const char *name, char *dummy1, size_t dummy2)
+{
+  /* `access' is much faster than `stat' on MS-Windows.  */
+  if (sys_access (name, 0) == 0)
+    errno = EINVAL;
+  return -1;
+}
+
+\f
 /* Support for browsing other processes and their attributes.  See
    process.c for the Lisp bindings.  */
 
@@ -4027,7 +4041,6 @@ system_process_attributes (Lisp_Object pid)
   TOKEN_PRIMARY_GROUP group_token;
   unsigned euid;
   unsigned egid;
-  DWORD sess;
   PROCESS_MEMORY_COUNTERS mem;
   PROCESS_MEMORY_COUNTERS_EX mem_ex;
   DWORD minrss, maxrss;
@@ -5392,7 +5405,6 @@ sys_read (int fd, char * buffer, unsigned int count)
            {
              HANDLE hnd = fd_info[fd].hnd;
              OVERLAPPED *ovl = &fd_info[fd].cp->ovl_read;
-             DWORD err = 0;
              int rc = 0;
              COMMTIMEOUTS ct;
 
@@ -5647,8 +5659,6 @@ sys_write (int fd, const void * buffer, unsigned int count)
 static void
 check_windows_init_file (void)
 {
-  extern int noninteractive, inhibit_window_system;
-
   /* A common indication that Emacs is not installed properly is when
      it cannot find the Windows installation file.  If this file does
      not exist in the expected place, tell the user.  */