diff -ru pari-2.3.5.orig\src\gp\highlvl.c pari-2.3.5\src\gp\highlvl.c
--- pari-2.3.5.orig\src\gp\highlvl.c Thu Feb 04 11:55:42 2010
+++ pari-2.3.5\src\gp\highlvl.c Wed Mar 03 12:28:18 2010
@@ -18,6 +18,13 @@
/* SOME GP FUNCTION THAT MAY BE USEFUL OUTSIDE OF IT */
/* */
/*******************************************************************/
+
+/* we need to include windows.h quite early to avoid some macro name collisions */
+#ifdef _WIN32
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+#endif
+
#include "pari.h"
#include "paripriv.h"
#include "../graph/rect.h"
--- ./src/language/es.c-pre 2002-06-23 05:49:48.000000000 -0700
+++ ./src/language/es.c 2014-06-01 10:48:39.046597000 -0700
@@ -2223,6 +2223,10 @@ os_read(long fd, char ch[], long s)
#endif
}
+#ifdef HAS_OPENDIR
+# include <dirent.h>
+#endif
+
long
os_open(char *s, int mode)
{
@@ -2259,9 +2263,6 @@ os_getenv(char *s)
static char *last_filename = NULL;
static char **dir_list = NULL;
-#ifdef HAS_OPENDIR
-# include <dirent.h>
-#endif
/* slow, but more portable than stat + S_I[FS]DIR */
int
pari_is_dir(char *name)