Rename configure.in -> configure.ac. Based on PR #976.
[mono.git] / mono / io-layer / io.c
index 37166faa53b0deba06b91278dbeff8a29d20f7c5..9e2fb959697245a7cab2e78ef642f118e752bc8e 100755 (executable)
@@ -705,7 +705,7 @@ static gboolean file_setendoffile(gpointer handle)
        }
        
 #ifdef FTRUNCATE_DOESNT_EXTEND
-       /* I haven't bothered to write the configure.in stuff for this
+       /* I haven't bothered to write the configure.ac stuff for this
         * because I don't know if any platform needs it.  I'm leaving
         * this code just in case though
         */
@@ -2082,7 +2082,7 @@ ReplaceFile (const gunichar2 *replacedFileName, const gunichar2 *replacementFile
                      const gunichar2 *backupFileName, guint32 replaceFlags, 
                      gpointer exclude, gpointer reserved)
 {
-       int result, errno_copy, backup_fd = -1,replaced_fd = -1;
+       int result, backup_fd = -1,replaced_fd = -1;
        gchar *utf8_replacedFileName, *utf8_replacementFileName = NULL, *utf8_backupFileName = NULL;
        struct stat stBackup;
        gboolean ret = FALSE;
@@ -2100,13 +2100,11 @@ ReplaceFile (const gunichar2 *replacedFileName, const gunichar2 *replacementFile
                // Open the backup file for read so we can restore the file if an error occurs.
                backup_fd = _wapi_open (utf8_backupFileName, O_RDONLY, 0);
                result = _wapi_rename (utf8_replacedFileName, utf8_backupFileName);
-               errno_copy = errno;
                if (result == -1)
                        goto replace_cleanup;
        }
 
        result = _wapi_rename (utf8_replacementFileName, utf8_replacedFileName);
-       errno_copy = errno;
        if (result == -1) {
                _wapi_set_last_path_error_from_errno (NULL, utf8_replacementFileName);
                _wapi_rename (utf8_backupFileName, utf8_replacedFileName);
@@ -2181,8 +2179,6 @@ gpointer GetStdHandle(WapiStdHandle stdhandle)
 
        handle = GINT_TO_POINTER (fd);
 
-       pthread_cleanup_push ((void(*)(void *))mono_mutex_unlock_in_cleanup,
-                             (void *)&stdhandle_mutex);
        thr_ret = mono_mutex_lock (&stdhandle_mutex);
        g_assert (thr_ret == 0);
 
@@ -2204,7 +2200,6 @@ gpointer GetStdHandle(WapiStdHandle stdhandle)
   done:
        thr_ret = mono_mutex_unlock (&stdhandle_mutex);
        g_assert (thr_ret == 0);
-       pthread_cleanup_pop (0);
        
        return(handle);
 }
@@ -2797,8 +2792,6 @@ gboolean FindNextFile (gpointer handle, WapiFindData *find_data)
                return(FALSE);
        }
 
-       pthread_cleanup_push ((void(*)(void *))_wapi_handle_unlock_handle,
-                             handle);
        thr_ret = _wapi_handle_lock_handle (handle);
        g_assert (thr_ret == 0);
        
@@ -2908,7 +2901,6 @@ retry:
 cleanup:
        thr_ret = _wapi_handle_unlock_handle (handle);
        g_assert (thr_ret == 0);
-       pthread_cleanup_pop (0);
        
        return(ret);
 }
@@ -2941,8 +2933,6 @@ gboolean FindClose (gpointer handle)
                return(FALSE);
        }
 
-       pthread_cleanup_push ((void(*)(void *))_wapi_handle_unlock_handle,
-                             handle);
        thr_ret = _wapi_handle_lock_handle (handle);
        g_assert (thr_ret == 0);
        
@@ -2951,7 +2941,6 @@ gboolean FindClose (gpointer handle)
 
        thr_ret = _wapi_handle_unlock_handle (handle);
        g_assert (thr_ret == 0);
-       pthread_cleanup_pop (0);
        
        _wapi_handle_unref (handle);
        
@@ -3794,7 +3783,9 @@ add_drive_string (guint32 len, gunichar2 *buf, LinuxMountInfoParseState *state)
                        ignore_entry = TRUE;
                else
                        ignore_entry = FALSE;
-       } else
+       } else if (state->fstype_index == 3 && memcmp ("nfs", state->fstype, state->fstype_index) == 0)
+               ignore_entry = FALSE;
+       else
                ignore_entry = TRUE;
 
        if (!ignore_entry) {