aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--Makefile.am6
-rw-r--r--Makefile.in6
-rw-r--r--extension/ChangeLog6
-rw-r--r--extension/Makefile.am2
-rw-r--r--extension/Makefile.in2
-rw-r--r--getopt.h15
-rw-r--r--io.c8
-rw-r--r--pc/ChangeLog6
-rw-r--r--pc/gawkmisc.pc4
10 files changed, 56 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 3049827a..543ddd49 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -86,6 +86,15 @@
more helpful - also used for unmatched [:, [., [=.
Thanks to Davide Brini for raising the issue.
+2014-10-12 KO Myung-Hun <komh78@gmail.com>
+
+ Fixes for OS/2:
+
+ * Makefile.am (install-exec-hook, uninstall-links): Use $(EXEEXT).
+ * getopt.h: Redefinitions if using KLIBC.
+ * io.c (_S_IFDIR, _S_IRWXU): Define if the more standard versions
+ are available.
+
2014-10-12 Arnold D. Robbins <arnold@skeeve.com>
* README: Remove Pat Rankin from VMS duties, per his request.
diff --git a/Makefile.am b/Makefile.am
index 3d1c8837..a1883780 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -157,14 +157,14 @@ RM = rm -f
install-exec-hook:
(cd $(DESTDIR)$(bindir); \
$(LN) gawk$(EXEEXT) gawk-$(VERSION)$(EXEEXT) 2>/dev/null ; \
- if [ ! -f awk ]; \
- then $(LN_S) gawk$(EXEEXT) awk; \
+ if [ ! -f awk$(EXEEXT) ]; \
+ then $(LN_S) gawk$(EXEEXT) awk$(EXEEXT); \
fi; exit 0)
# Undo the above when uninstalling
uninstall-links:
(cd $(DESTDIR)$(bindir); \
- if [ -f awk ] && cmp awk gawk$(EXEEXT) > /dev/null; then rm -f awk; fi ; \
+ if [ -f awk$(EXEEXT) ] && cmp awk$(EXEEXT) gawk$(EXEEXT) > /dev/null; then rm -f awk$(EXEEXT); fi ; \
rm -f gawk-$(VERSION)$(EXEEXT); exit 0)
uninstall-recursive: uninstall-links
diff --git a/Makefile.in b/Makefile.in
index 4d50757d..39143e2e 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1156,14 +1156,14 @@ uninstall-am: uninstall-binPROGRAMS uninstall-includeHEADERS
install-exec-hook:
(cd $(DESTDIR)$(bindir); \
$(LN) gawk$(EXEEXT) gawk-$(VERSION)$(EXEEXT) 2>/dev/null ; \
- if [ ! -f awk ]; \
- then $(LN_S) gawk$(EXEEXT) awk; \
+ if [ ! -f awk$(EXEEXT) ]; \
+ then $(LN_S) gawk$(EXEEXT) awk$(EXEEXT); \
fi; exit 0)
# Undo the above when uninstalling
uninstall-links:
(cd $(DESTDIR)$(bindir); \
- if [ -f awk ] && cmp awk gawk$(EXEEXT) > /dev/null; then rm -f awk; fi ; \
+ if [ -f awk$(EXEEXT) ] && cmp awk$(EXEEXT) gawk$(EXEEXT) > /dev/null; then rm -f awk$(EXEEXT); fi ; \
rm -f gawk-$(VERSION)$(EXEEXT); exit 0)
uninstall-recursive: uninstall-links
diff --git a/extension/ChangeLog b/extension/ChangeLog
index 3fee967f..51878ed5 100644
--- a/extension/ChangeLog
+++ b/extension/ChangeLog
@@ -1,3 +1,9 @@
+2014-10-12 KO Myung-Hun <komh78@gmail.com>
+
+ Fixes for OS/2:
+
+ * Makefile.am (uninstall-so): Remove *.dll and *.a, also.
+
2014-10-08 Arnold D. Robbins <arnold@skeeve.com>
* inplace.c (do_inplace_begin): Use a cast to void in front
diff --git a/extension/Makefile.am b/extension/Makefile.am
index e6678c54..d0769a5a 100644
--- a/extension/Makefile.am
+++ b/extension/Makefile.am
@@ -109,6 +109,8 @@ install-data-hook:
# Keep the uninstall check working:
uninstall-so:
$(RM) $(DESTDIR)$(pkgextensiondir)/*.so
+ $(RM) $(DESTDIR)$(pkgextensiondir)/*.dll
+ $(RM) $(DESTDIR)$(pkgextensiondir)/*.a
uninstall-recursive: uninstall-so
diff --git a/extension/Makefile.in b/extension/Makefile.in
index 46168e4e..945e5534 100644
--- a/extension/Makefile.in
+++ b/extension/Makefile.in
@@ -1240,6 +1240,8 @@ install-data-hook:
# Keep the uninstall check working:
uninstall-so:
$(RM) $(DESTDIR)$(pkgextensiondir)/*.so
+ $(RM) $(DESTDIR)$(pkgextensiondir)/*.dll
+ $(RM) $(DESTDIR)$(pkgextensiondir)/*.a
uninstall-recursive: uninstall-so
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.
diff --git a/io.c b/io.c
index 32caadfb..c584a0c2 100644
--- a/io.c
+++ b/io.c
@@ -110,6 +110,14 @@
#ifdef __EMX__
#include <process.h>
+
+#if !defined(_S_IFDIR) && defined(S_IFDIR)
+#define _S_IFDIR S_IFDIR
+#endif
+
+#if !defined(_S_IRWXU) && defined(S_IRWXU)
+#define _S_IRWXU S_IRWXU
+#endif
#endif
#ifndef ENFILE
diff --git a/pc/ChangeLog b/pc/ChangeLog
index 235f520c..e22cb01a 100644
--- a/pc/ChangeLog
+++ b/pc/ChangeLog
@@ -1,3 +1,9 @@
+2014-10-12 KO Myung-Hun <komh78@gmail.com>
+
+ Fixes for OS/2:
+
+ * gawkmisc.pc (init_sockets): Add additional checks for __EMX__.
+
2014-09-23 Scott Deifik <scottd.mail@sbcglobal.net>
* Makefile.tst: Sync with mainline.
diff --git a/pc/gawkmisc.pc b/pc/gawkmisc.pc
index 239f3f8f..fdd32e7e 100644
--- a/pc/gawkmisc.pc
+++ b/pc/gawkmisc.pc
@@ -850,12 +850,12 @@ w32_shutdown (int fd, int how)
#endif /* __MINGW32__ */
-#if defined(__DJGPP__) || defined(__MINGW32__)
+#if defined(__DJGPP__) || defined(__MINGW32__) || defined(__EMX__)
void
init_sockets(void)
{
-#ifdef HAVE_SOCKETS
+#if defined(HAVE_SOCKETS) && !defined(__EMX__)
WSADATA winsockData;
int errcode;