diff options
Diffstat (limited to 'elf/tst-stackguard1.c')
-rw-r--r-- | elf/tst-stackguard1.c | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/elf/tst-stackguard1.c b/elf/tst-stackguard1.c index cc95e227ea..8479d8c422 100644 --- a/elf/tst-stackguard1.c +++ b/elf/tst-stackguard1.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2016 Free Software Foundation, Inc. +/* Copyright (C) 2005-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2005. @@ -17,6 +17,7 @@ <http://www.gnu.org/licenses/>. */ #include <errno.h> +#include <getopt.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> @@ -185,12 +186,20 @@ do_test (void) #define CMDLINE_OPTIONS \ { "command", required_argument, NULL, OPT_COMMAND }, \ { "child", no_argument, NULL, OPT_CHILD }, -#define CMDLINE_PROCESS \ - case OPT_COMMAND: \ - command = optarg; \ - break; \ - case OPT_CHILD: \ - child = true; \ - break; -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" + +static void __attribute__((used)) +cmdline_process_function (int c) +{ + switch (c) + { + case OPT_COMMAND: + command = optarg; + break; + case OPT_CHILD: + child = true; + break; + } +} +#define CMDLINE_PROCESS cmdline_process_function + +#include <support/test-driver.c> |