]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
maint: tweaks so syntax tests pass for previous commit
authorPádraig Brady <P@draigBrady.com>
Mon, 13 Feb 2017 02:05:37 +0000 (18:05 -0800)
committerPádraig Brady <P@draigBrady.com>
Mon, 13 Feb 2017 02:05:37 +0000 (18:05 -0800)
* src/force-link.h: Don't include headers already included by system.h
* src/force-link.c: Likewise.  Also include system.h and
explicitly mark extern functions as such.

src/force-link.c
src/force-link.h

index e0db07574901e452d63146c78a2204700092d65b..15ebb8c187f8ada532197d944e680dd98366896e 100644 (file)
    a window where B does not exist.  */
 
 #include <config.h>
+#include "system.h"
 
 #include "force-link.h"
 
-#include <dirname.h>
 #include <tempname.h>
 
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
 /* A basename pattern suitable for a temporary file.  It should work
    even on file systems like FAT that support only short names.
    "Cu" is short for "Coreutils" or for "Changeable unstable",
@@ -94,7 +89,7 @@ try_link (char *dest, void *arg)
    1 if successful and DSTNAME already existed,
    0 if successful and DSTNAME did not already exist, and
    -1 (setting errno) on failure.  */
-int
+extern int
 force_linkat (int srcdir, char const *srcname,
               int dstdir, char const *dstname, int flags, bool force)
 {
@@ -149,7 +144,7 @@ try_symlink (char *dest, void *arg)
    1 if successful and DSTNAME already existed,
    0 if successful and DSTNAME did not already exist, and
    -1 (setting errno) on failure.  */
-int
+extern int
 force_symlinkat (char const *srcname, int dstdir, char const *dstname,
                  bool force)
 {
index 2a690f680e228c25cad7e35b9a6ac33f6151a367..7ea3817de848acc1c987b90f26692365a55b945c 100644 (file)
@@ -1,3 +1,2 @@
-#include <stdbool.h>
 extern int force_linkat (int, char const *, int, char const *, int, bool);
 extern int force_symlinkat (char const *, int, char const *, bool);