X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=src%2Fsysfile.h;h=d9d3deb3af51177110ca29492498b243989ac1fd;hp=f5f749038a08e1b5ea63c936b6a5eaab52943994;hb=566b3d194e2d5c783808ac39437bd7e1a28b1c5c;hpb=762383636a99307282c2d93d26c35c046ec24da1 diff --git a/src/sysfile.h b/src/sysfile.h index f5f7490..d9d3deb 100644 --- a/src/sysfile.h +++ b/src/sysfile.h @@ -51,6 +51,13 @@ Boston, MA 02111-1307, USA. */ #include #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 #endif @@ -168,10 +175,10 @@ Boston, MA 02111-1307, USA. */ 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 @@ -179,7 +186,7 @@ Boston, MA 02111-1307, USA. */ # endif #endif -#if !S_IWUSR +#ifndef S_IWUSR # if S_IWRITE # define S_IWUSR S_IWRITE # else @@ -187,7 +194,7 @@ Boston, MA 02111-1307, USA. */ # endif #endif -#if !S_IXUSR +#ifndef S_IXUSR # if S_IEXEC # define S_IXUSR S_IEXEC # else @@ -254,14 +261,20 @@ Boston, MA 02111-1307, USA. */ #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 @@ -439,24 +452,13 @@ int sys_fstat (int fd, struct stat *buf); #endif #if defined (ENCAPSULATE_FSTAT) && !defined (DONT_ENCAPSULATE) # undef fstat -/* Need to use arguments to avoid messing with struct stat */ -# define fstat(fd, buf) sys_fstat (fd, buf) +# define fstat sys_fstat #endif #if !defined (ENCAPSULATE_FSTAT) && defined (DONT_ENCAPSULATE) # define sys_fstat fstat #endif -#ifdef ENCAPSULATE_STAT -int sys_stat (const char *path, struct stat *buf); -#endif -#if defined (ENCAPSULATE_STAT) && !defined (DONT_ENCAPSULATE) -# undef stat -/* Need to use arguments to avoid messing with struct stat */ -# define stat(path, buf) sys_stat (path, buf) -#endif -#if !defined (ENCAPSULATE_STAT) && defined (DONT_ENCAPSULATE) -# define sys_stat stat -#endif +int xemacs_stat (const char *path, struct stat *buf); /* encapsulations: file-manipulation calls */