#ifndef WIN32_NATIVE
/* Some configuration files' definitions for the LOAD_AVE_CVT macro
(like sparc.h's) use macros like FSCALE, defined here. */
+#ifdef HAVE_GTK
+/* I hate GTK */
+#undef MIN
+#undef MAX
+#endif /* HAVE_GTK */
#include <sys/param.h>
#endif
In that case, use ordinary stat instead. */
#ifndef S_IFLNK
-#define lstat stat
+#define lstat xemacs_stat
#endif
-#if !S_IRUSR
+#ifndef S_IRUSR
# if S_IREAD
# define S_IRUSR S_IREAD
# else
# endif
#endif
-#if !S_IWUSR
+#ifndef S_IWUSR
# if S_IWRITE
# define S_IWUSR S_IWRITE
# else
# endif
#endif
-#if !S_IXUSR
+#ifndef S_IXUSR
# if S_IEXEC
# define S_IXUSR S_IEXEC
# else
#endif
/* The following definitions are needed under Windows, at least */
-#ifndef X_OK
-# define X_OK 1
-#endif
-
#ifndef R_OK
# define R_OK 4
#endif
+/* Under native Windows, there is no concept of execute permission,
+ so redefine execute permissions to be the same as read permission */
+#ifndef X_OK
+# ifdef WIN32_NATIVE
+# define X_OK R_OK
+# else
+# define X_OK 1
+# endif
+#endif
+
#ifndef W_OK
# define W_OK 2
#endif