Mercurial > gub
view patches/guile-1.9.14-mingw-dirent.patch @ 6459:73d419fb8438
mingw::guile: add dirent patch. Fixes starting up lilypond.
libglib-2.0 and libguile-2.0 both export 'readdir'; however
guile does not install the matching win32-dirent.h, which has
of course a different definition for struct dirent than
guile's win32-dirent.h has.
author | Jan Nieuwenhuizen <janneke@gnu.org> |
---|---|
date | Mon, 31 Jan 2011 16:27:03 +0100 |
parents | |
children |
line wrap: on
line source
--- guile-1.9.14/libguile/win32-dirent.h~ 2010-12-14 19:15:17.000000000 +0100 +++ guile-1.9.14/libguile/win32-dirent.h 2011-01-31 16:05:01.703196058 +0100 @@ -27,6 +27,14 @@ #include <sys/types.h> +#define opendir guile_opendir +#define readdir guile_readdir +#define closedir guile_closedir +#define rewinddir guile_rewinddir +#define seekdir guile_seekdir +#define telldir guile_telldir +#define dirfd guile_dirfd + struct dirstream { int fd; /* File descriptor. */ --- guile-1.9.14/libguile/win32-dirent.c~ 2010-12-14 19:15:17.000000000 +0100 +++ guile-1.9.14/libguile/win32-dirent.c 2011-01-31 16:10:06.336659077 +0100 @@ -20,14 +20,14 @@ # include <config.h> #endif +#include "win32-dirent.h" + #include "libguile/__scm.h" #include <windows.h> #include <stdio.h> #include <string.h> -#include "win32-dirent.h" - DIR * opendir (const char * name) { --- guile-1.9.14/libguile/filesys.c~ 2011-01-30 17:50:22.565848118 +0100 +++ guile-1.9.14/libguile/filesys.c 2011-01-31 16:11:02.599078648 +0100 @@ -35,6 +35,10 @@ #include <stdio.h> #include <errno.h> +#if defined (__MINGW32__) || defined (_MSC_VER) || defined (__BORLANDC__) +# include "win32-dirent.h" +#endif /* __MINGW32__ || _MSC_VER || __BORLANDC__ */ + #include "libguile/_scm.h" #include "libguile/smob.h" #include "libguile/feature.h" @@ -94,7 +98,6 @@ #if defined (__MINGW32__) || defined (_MSC_VER) || defined (__BORLANDC__) -# include "win32-dirent.h" # define NAMLEN(dirent) strlen((dirent)->d_name) /* The following bits are per AC_HEADER_DIRENT doco in the autoconf manual */ #elif HAVE_DIRENT_H