+#include "quotearg.h"
+#include "__fpending.h"
+
+static int default_exit_status = EXIT_FAILURE;
+static const char *file_name;
+
+/* Set the value to be used for the exit status when close_stdout is called.
+ This is useful when it is not convenient to call close_stdout_status,
+ e.g., when close_stdout is called via atexit. */
+void
+close_stdout_set_status (int status)
+{
+ default_exit_status = status;
+}
+
+/* Set the file name to be reported in the event an error is detected
+ by close_stdout_status. */
+void
+close_stdout_set_file_name (const char *file)
+{
+ file_name = file;
+}