#if defined _WIN32 || defined __WIN32__
#define WIN32_LEAN_AND_MEAN /* avoid including junk */
-#define UNICODE 1
#include <windows.h>
#define TS_stat _stat
#define Tunlink _wunlink
return -1;
}
-static TCHAR *
+TCHAR *
convert_to_filename_encoding (const char *s, size_t len, const char *current_encoding)
{
const char *enc = current_encoding;
#else
-typedef char TCHAR;
#define TS_stat stat
#define Trename rename
#define Tunlink unlink
#define Topen open
#define Tstat stat
-static TCHAR *
+TCHAR *
convert_to_filename_encoding (const char *s, size_t len UNUSED, const char *current_encoding UNUSED)
{
- /* Non-windows systems don't care about the encoding.
+ /* Non-windows systems don't care about the encoding.
The string is copied here, to be consistent with the w32 case. */
return xstrdup (s);
}
char *tmp_name_verbatim;
const char *file_name_verbatim;
};
-
+
static struct ll_list all_files = LL_INITIALIZER (all_files);
static void free_replace_file (struct replace_file *);
fd = Topen (Tfile_name, O_WRONLY);
if (fd < 0)
{
- saved_errno = errno;
+ saved_errno = errno;
msg (ME, _("Opening %s for writing: %s."),
file_name, strerror (saved_errno));
free (Tfile_name);
*fp = fdopen (fd, mode);
if (*fp == NULL)
{
- saved_errno = errno;
+ saved_errno = errno;
msg (ME, _("Opening stream for %s: %s."),
file_name, strerror (saved_errno));
close (fd);