Disable Guile's GnuLib broken redefinition of 'close'.

To a GnuLib function that isn't built or installed.
This commit is contained in:
John Ralls 2017-06-15 15:56:38 -07:00
parent 1f31ca620e
commit b9cb2a22d5
4 changed files with 14 additions and 1 deletions

View File

@ -23,15 +23,22 @@
#include "swig-runtime.h"
#include <platform.h>
#if PLATFORM(WINDOWS)
#include <winsock.h>
#include <windows.h>
#endif
#include <glib.h>
#include <glib/gi18n.h>
#include <string.h>
#ifdef __MINGW32__
#define _GL_UNISTD_H //Deflect poisonous define of close in Guile's GnuLib
#endif
#include <libguile.h>
#include <errno.h>
#ifdef HAVE_UNISTD_H
# ifdef close
# undef close
# endif
# include <unistd.h>
#else
# include <io.h>

View File

@ -76,6 +76,7 @@
#include <gtkmacintegration/gtkosxapplication.h>
#endif
#ifdef HAVE_SYS_STAT_H
# define __need_system_sys_stat_h //To block Guile-2.0's evil substitute
# include <sys/types.h>
# include <sys/stat.h> // for stat(2)
#endif

View File

@ -26,6 +26,9 @@
#include "config.h"
#include <platform.h>
#ifdef __MINGW32__
#define _GL_UNISTD_H //Deflect poisonous define of close in Guile's GnuLib
#endif
#include <libguile.h>
#if PLATFORM(WINDOWS)
#include <windows.h>

View File

@ -23,7 +23,9 @@
********************************************************************/
#include "config.h"
#ifdef __MINGW32__
#define _GL_UNISTD_H //Deflect poisonous define in Guile's GnuLib
#endif
#include <glib.h>
#include <glib/gstdio.h>
#include <gtk/gtk.h>