[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Compiling gawk on Tandem NSK/OSS
From: |
Aharon Robbins |
Subject: |
Re: Compiling gawk on Tandem NSK/OSS |
Date: |
Sat, 13 Jan 2007 22:39:03 +0200 |
Greetings. Now that autoconf 2.61 will define _TANDEM_SOURCE for us,
I have incorporated a modified version of this patch that should let
gawk build out of the box on a Tandem system. The patches will show
up in the gawk CVS archive shortly.
I didn't do anything about the library; if you can add a shell snippet
to configure.ac to do the trick and send me a patch relative to the current
CVS, that will help.
Thanks!
Arnold
> Date: Tue, 07 Nov 2006 13:35:36 -0800
> From: Matthew Woehlke <address@hidden>
> Subject: Compiling gawk on Tandem NSK/OSS
> To: address@hidden
>
> I am trying to build gawk 3.1.5 on Tandem NSK/OSS. To get this to work,
> I had to apply the following patch:
>
> ==== BEGIN patch
> --- gawk-3.1.5/awk.h 2005-07-26 11:07:43.000000000 -0700
> +++ gawk-3.1.5-oss/awk.h 2006-11-07 11:47:38.000000000 -0800
> @@ -41,6 +41,9 @@
> #define _GNU_SOURCE 1 /* enable GNU extensions */
> #endif /* _GNU_SOURCE */
>
> +#define _TANDEM_SOURCE
> +#define _XOPEN_SOURCE_EXTENDED 1
> +
> #include <stdio.h>
> #include <assert.h>
> #ifdef HAVE_LIMITS_H
> diff -ru gawk-3.1.5/awklib/eg/lib/pwcat.c
> gawk-3.1.5-oss/awklib/eg/lib/pwcat.c
> --- gawk-3.1.5/awklib/eg/lib/pwcat.c 2005-07-26 10:52:51.000000000
> -0700
> +++ gawk-3.1.5-oss/awklib/eg/lib/pwcat.c 2006-11-07
> 12:50:27.000000000 -0800
> @@ -12,6 +12,7 @@
> #include <config.h>
> #endif
>
> +#define _TANDEM_SOURCE
> #include <stdio.h>
> #include <pwd.h>
>
> diff -ru gawk-3.1.5/io.c gawk-3.1.5-oss/io.c
> --- gawk-3.1.5/io.c 2005-07-26 11:07:43.000000000 -0700
> +++ gawk-3.1.5-oss/io.c 2006-11-07 11:44:27.000000000 -0800
> @@ -51,7 +51,10 @@
> #include <socket.h>
> #endif /* HAVE_SYS_SOCKET_H */
> #ifdef HAVE_NETINET_IN_H
> +#define _TANDEM_SOURCE
> #include <netinet/in.h>
> +#include <arpa/inet.h>
> +#include <netdb.h>
> #else
> #include <in.h>
> #endif /* HAVE_NETINET_IN_H */
> ==== END patch
>
> ...and I also had to add '-lzrldsrl' to LIBS (this is NSK's '-ldl').
> Yhings might work better with '-D_TANDEM_SOURCE' in CFLAGS (headers on
> tandem just plain Don't Work on tandem unless _TANDEM_SOURCE is defined
> - lots of things are omitted that shouldn't be), but I like OOTB builds
> to work :-). For _XOPEN_SOURCE_EXTENDED, I had to define this so that
> netdb.h would declare getservbyname, although this looks like a bug in
> the preprocessor conditions of netdb.h. arpa/inet.h is needed for at
> least ntohs (probably relatives as well); this is not defined in any
> other header being included.
>
> --
> Matthew
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Compiling gawk on Tandem NSK/OSS,
Aharon Robbins <=