maint: tweaks so syntax tests pass for previous commit

* 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.
This commit is contained in:
Pádraig Brady committed 2017-02-12 18:05:37 -08:00
1 parent 376967889e
commit bd4bb42d65
2 files changed
+3 -9

No files matched your search

+3 -8
View File
@@ -24,17 +24,12 @@
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)
{
-1
View 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);