XEmacs 21.2.28 "Hermes".
[chise/xemacs-chise.git.1] / src / sysfile.h
index e421d79..932a503 100644 (file)
@@ -20,6 +20,9 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: Not really in FSF. */
 
+#ifndef INCLUDED_sysfile_h_
+#define INCLUDED_sysfile_h_
+
 #include <errno.h>
 
 #ifndef WINDOWSNT
@@ -203,10 +206,6 @@ Boston, MA 02111-1307, USA.  */
 #define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
 #endif
 
-#if !defined (USG)  && !defined (WINDOWSNT)
-# define HAVE_FSYNC
-#endif
-
 #ifndef MAXPATHLEN
 /* in 4.1, param.h fails to define this. */
 #define MAXPATHLEN 1024
@@ -380,6 +379,18 @@ int sys_readlink (CONST char *path, char *buf, size_t bufsiz);
 # define sys_readlink readlink
 #endif
 
+#ifdef ENCAPSULATE_FSTAT
+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)
+#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
@@ -470,3 +481,5 @@ int sys_execvp (CONST char *, char * CONST *);
 #if !defined (ENCAPSULATE_EXECVP) && defined (DONT_ENCAPSULATE)
 # define sys_execvp execvp
 #endif
+
+#endif /* INCLUDED_sysfile_h_ */