projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Include config.h.
[gnulib.git]
/
lib
/
ftruncate.c
diff --git
a/lib/ftruncate.c
b/lib/ftruncate.c
index
04156b7
..
1272ee7
100644
(file)
--- a/
lib/ftruncate.c
+++ b/
lib/ftruncate.c
@@
-2,24
+2,12
@@
This file is in the public domain. */
#ifdef HAVE_CONFIG_H
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>
#include <config.h>
-#else
-#include "config.h"
-#endif
#endif
#include <sys/types.h>
#include <fcntl.h>
#endif
#include <sys/types.h>
#include <fcntl.h>
-#include <errno.h>
-#ifndef STDC_HEADERS
-extern int errno;
-#endif
-
#ifdef F_CHSIZE
int
#ifdef F_CHSIZE
int
@@
-36,7
+24,7
@@
ftruncate (fd, length)
/* By William Kucharski <kucharsk@netcom.com>. */
#include <sys/stat.h>
/* By William Kucharski <kucharsk@netcom.com>. */
#include <sys/stat.h>
-
+#include <errno.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#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 */
#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;
int
ftruncate (fd, length)
int fd;