remove my @comco address
[gnulib.git] / lib / ftruncate.c
index 04156b7..1272ee7 100644 (file)
@@ -2,24 +2,12 @@
    This file is in the public domain.  */
 
 #ifdef HAVE_CONFIG_H
-#if defined (CONFIG_BROKETS)
-/* We use <config.h> instead of "config.h" so that a compilation
-   using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h
-   (which it would do because it found this file in $srcdir).  */
 #include <config.h>
-#else
-#include "config.h"
-#endif
 #endif
 
 #include <sys/types.h>
 #include <fcntl.h>
 
-#include <errno.h>
-#ifndef STDC_HEADERS
-extern int errno;
-#endif
-
 #ifdef F_CHSIZE
 
 int
@@ -36,7 +24,7 @@ ftruncate (fd, length)
 /* By William Kucharski <kucharsk@netcom.com>.  */
 
 #include <sys/stat.h>
-
+#include <errno.h>
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
@@ -96,6 +84,11 @@ ftruncate (fd, length)
 
 #else /* not F_CHSIZE nor F_FREESP nor HAVE_CHSIZE */
 
+#include <errno.h>
+#ifndef errno
+extern int errno;
+#endif
+
 int
 ftruncate (fd, length)
      int fd;