summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1996-02-24 18:27:11 +0000
committerJim Meyering <jim@meyering.net>1996-02-24 18:27:11 +0000
commitb12057e3bd372f6cf1829e42ddc4424b050c8f24 (patch)
tree5adb286dc800bee3ef97d5caf1fef21d46a91908
parent34e1cf83047b4faebfa18a403c7756fccc42f5bd (diff)
downloadcoreutils-b12057e3bd372f6cf1829e42ddc4424b050c8f24.tar.xz
__P-protect forward declarations.
(main): Protoize function definition.
-rw-r--r--src/test.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/test.c b/src/test.c
index 4d35ebb9f..512ccfb5e 100644
--- a/src/test.c
+++ b/src/test.c
@@ -70,8 +70,8 @@ extern int errno;
# define member(c, s) ((c) ? (strchr ((s), (c)) ? 1 : 0) : 0)
#endif /* !member */
-extern gid_t getgid (void), getegid (void);
-extern uid_t geteuid (void);
+extern gid_t getegid ();
+extern uid_t geteuid ();
#if !defined (R_OK)
#define R_OK 4
@@ -130,8 +130,8 @@ static int or __P ((void));
#define NO_RETURN_ATTRIBUTE /* empty */
#endif
-static void test_syntax_error (char *format, char *arg) NO_RETURN_ATTRIBUTE;
-static void beyond (void) NO_RETURN_ATTRIBUTE;
+static void test_syntax_error __P ((char *format, char *arg)) NO_RETURN_ATTRIBUTE;
+static void beyond __P ((void)) NO_RETURN_ATTRIBUTE;
static void
test_syntax_error (char *format, char *arg)
@@ -1041,6 +1041,10 @@ INTEGER may also be -l STRING, which evaluates to the length of STRING.\n\
}
#endif /* TEST_STANDALONE */
+#if !defined (TEST_STANDALONE)
+# define main test_command
+#endif
+
/*
* [:
* '[' expr ']'
@@ -1048,13 +1052,7 @@ INTEGER may also be -l STRING, which evaluates to the length of STRING.\n\
* test expr
*/
int
-#if defined (TEST_STANDALONE)
-main (margc, margv)
-#else
-test_command (margc, margv)
-#endif /* !TEST_STANDALONE */
- int margc;
- char **margv;
+main (int margc, char **margv)
{
int value;