replace_file_start: Now takes a file handle instead of a file name
[pspp] / src / data / make-file.h
index 3861f35109af866978b5938d0bbc34389e6c059b..2e424fefdf8f4d8716617950c932d6bc2874b861 100644 (file)
@@ -21,6 +21,8 @@
 #include <stdio.h>
 #include <sys/types.h>
 
+struct file_handle;
+
 /* Prepares to atomically replace a (potentially) existing file
    by a new file, by creating a temporary file with the given
    PERMISSIONS bits in the same directory as *FILE_NAME.
@@ -37,7 +39,7 @@
 
    The caller is responsible for closing *FP, but *TMP_NAME is
    owned by the callee. */
-struct replace_file *replace_file_start (const char *file_name,
+struct replace_file *replace_file_start (const struct file_handle *fh,
                                          const char *mode, mode_t permissions,
                                          FILE **fp, char **tmp_name);