diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2014-10-12 13:49:11 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2014-11-11 23:14:10 +0200 |
commit | 0a050fa206e5d899f553b6ac492d389cb39591a2 (patch) | |
tree | f34f09369aed47f02088b95458c45f24cefbfed0 | |
parent | b4cf3cc470eb1200ec90fcc7ad5b2d069059cf7e (diff) | |
download | egawk-0a050fa206e5d899f553b6ac492d389cb39591a2.tar.gz egawk-0a050fa206e5d899f553b6ac492d389cb39591a2.tar.bz2 egawk-0a050fa206e5d899f553b6ac492d389cb39591a2.zip |
OS/2 fixes.
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | Makefile.am | 6 | ||||
-rw-r--r-- | Makefile.in | 6 | ||||
-rw-r--r-- | extension/ChangeLog | 6 | ||||
-rw-r--r-- | extension/Makefile.am | 2 | ||||
-rw-r--r-- | extension/Makefile.in | 2 | ||||
-rw-r--r-- | getopt.h | 15 | ||||
-rw-r--r-- | io.c | 8 | ||||
-rw-r--r-- | pc/ChangeLog | 6 | ||||
-rw-r--r-- | pc/gawkmisc.pc | 4 |
10 files changed, 56 insertions, 8 deletions
@@ -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 @@ -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. @@ -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; |