plug-ins: Fix some problematic Windows functions
The macro should be enough but on these source files it does not work.
This commit is contained in:
parent
dae02feed3
commit
f14f9516e2
2 changed files with 8 additions and 2 deletions
|
|
@ -81,7 +81,6 @@
|
|||
#ifdef _WIN32
|
||||
#include <io.h>
|
||||
#define close _close
|
||||
#define fileno _fileno
|
||||
#endif
|
||||
|
||||
#include <glib/gstdio.h>
|
||||
|
|
@ -1097,7 +1096,11 @@ zip_load (GFile *infile,
|
|||
|
||||
if (archive_read_next_header (a, &entry) == ARCHIVE_OK)
|
||||
{
|
||||
#ifndef _WIN32
|
||||
r = archive_read_data_into_fd (a, fileno (out));
|
||||
#else
|
||||
r = archive_read_data_into_fd (a, _fileno (out));
|
||||
#endif
|
||||
|
||||
if (r != ARCHIVE_OK)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@
|
|||
#endif
|
||||
#ifdef _WIN32
|
||||
#include <io.h>
|
||||
#define unlink _unlink
|
||||
#endif
|
||||
#include <time.h>
|
||||
|
||||
|
|
@ -152,7 +151,11 @@ pointer foreign_filedelete(scheme *sc, pointer args)
|
|||
|
||||
filename = sc->vptr->string_value(first_arg);
|
||||
filename = g_filename_from_utf8 (filename, -1, NULL, NULL, NULL);
|
||||
#ifndef _WIN32
|
||||
retcode = unlink(filename);
|
||||
#else
|
||||
retcode = _unlink(filename);
|
||||
#endif
|
||||
if (retcode == 0)
|
||||
ret = sc->T;
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in a new issue