[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-gawk] [PATCH 2/5] Rename getopt() on kLIBC
From: |
KO Myung-Hun |
Subject: |
[bug-gawk] [PATCH 2/5] Rename getopt() on kLIBC |
Date: |
Mon, 22 Sep 2014 17:38:06 +0900 |
kLIBC already has getopt() family. This causes a name clash.
---
getopt.h | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/getopt.h b/getopt.h
index da1a01f..4471bf5 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.
--
1.7.3.2
- [bug-gawk] [PATCH] OS/2 patches, KO Myung-Hun, 2014/09/22
- [bug-gawk] [PATCH 5/5] Remove *.dll and *.a as well at uninstallation, KO Myung-Hun, 2014/09/22
- [bug-gawk] [PATCH 2/5] Rename getopt() on kLIBC,
KO Myung-Hun <=
- [bug-gawk] [PATCH 3/5] Implement init_sockets() on EMX, KO Myung-Hun, 2014/09/22
- [bug-gawk] [PATCH 4/5] Add $(EXEEXT) to awk at installation/uninstallation, KO Myung-Hun, 2014/09/22
- [bug-gawk] [PATCH 1/5] Define _S_IFDIR and _S_IRWXU on EMX, KO Myung-Hun, 2014/09/22
- Re: [bug-gawk] [PATCH] OS/2 patches, Aharon Robbins, 2014/09/23