1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
Subject: fix declarations
From: Marc Kleine-Budde <mkl@pengutronix.de>
This patch fixes these errors:
test.c:129: error: static declaration of 'eaccess' follows non-static declaration
/usr/include/unistd.h:268: error: previous declaration of 'eaccess' was here
tee.c:34: error: conflicting types for 'tee'
/usr/include/bits/fcntl.h:233: error: previous declaration of 'tee' was here
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
src/tee.c | 6 +++---
src/test.c | 10 +++++-----
2 files changed, 8 insertions(+), 8 deletions(-)
Index: coreutils-5.2.1/src/test.c
===================================================================
--- coreutils-5.2.1.orig/src/test.c
+++ coreutils-5.2.1/src/test.c
@@ -125,7 +125,7 @@ test_syntax_error (char const *format, c
/* Do the same thing access(2) does, but use the effective uid and gid. */
static int
-eaccess (char const *file, int mode)
+_eaccess (char const *file, int mode)
{
static int have_ids;
static uid_t uid, euid;
@@ -158,7 +158,7 @@ eaccess (char const *file, int mode)
return result;
}
#else
-# define eaccess(F, M) euidaccess (F, M)
+# define _eaccess(F, M) euidaccess (F, M)
#endif
/* Increment our position in the argument list. Check that we're not
@@ -623,17 +623,17 @@ unary_operator (void)
case 'r': /* file is readable? */
unary_advance ();
- value = -1 != eaccess (argv[pos - 1], R_OK);
+ value = -1 != _eaccess (argv[pos - 1], R_OK);
return (TRUE == value);
case 'w': /* File is writable? */
unary_advance ();
- value = -1 != eaccess (argv[pos - 1], W_OK);
+ value = -1 != _eaccess (argv[pos - 1], W_OK);
return (TRUE == value);
case 'x': /* File is executable? */
unary_advance ();
- value = -1 != eaccess (argv[pos - 1], X_OK);
+ value = -1 != _eaccess (argv[pos - 1], X_OK);
return (TRUE == value);
case 'O': /* File is owned by you? */
Index: coreutils-5.2.1/src/tee.c
===================================================================
--- coreutils-5.2.1.orig/src/tee.c
+++ coreutils-5.2.1/src/tee.c
@@ -31,7 +31,7 @@
#define AUTHORS "Mike Parker", "Richard M. Stallman", "David MacKenzie"
-static int tee (int nfiles, const char **files);
+static int _tee (int nfiles, const char **files);
/* If nonzero, append to output files rather than truncating them. */
static int append;
@@ -146,7 +146,7 @@ main (int argc, char **argv)
/* Do *not* warn if tee is given no file arguments.
POSIX requires that it work when given no arguments. */
- errs = tee (argc - optind, (const char **) &argv[optind]);
+ errs = _tee (argc - optind, (const char **) &argv[optind]);
if (close (STDIN_FILENO) != 0)
error (EXIT_FAILURE, errno, _("standard input"));
@@ -158,7 +158,7 @@ main (int argc, char **argv)
Return 0 if successful, 1 if any errors occur. */
static int
-tee (int nfiles, const char **files)
+_tee (int nfiles, const char **files)
{
FILE **descriptors;
char buffer[BUFSIZ];
|