From 0a050fa206e5d899f553b6ac492d389cb39591a2 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Sun, 12 Oct 2014 13:49:11 +0300 Subject: OS/2 fixes. --- getopt.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'getopt.h') diff --git a/getopt.h b/getopt.h index da1a01ff..4471bf54 100644 --- a/getopt.h +++ b/getopt.h @@ -48,6 +48,21 @@ extern "C" { #endif +#ifdef __KLIBC__ +/* OS/2 kLIBC has already getopt(). So to avoid name clash, rename + them here. */ + +# define optarg gawk_optarg +# define optind gawk_optind +# define opterr gawk_opterr +# define optopt gawk_optopt + +# define getopt gawk_getopt +# define getopt_long gawk_getopt_long +# define getopt_long_only gawk_getopt_long_only +#endif + + /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. -- cgit v1.2.3