[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Compiling gawk on Tandem NSK/OSS
From: |
Matthew Woehlke |
Subject: |
Compiling gawk on Tandem NSK/OSS |
Date: |
Tue, 7 Nov 2006 13:35:36 -0800 |
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
- Compiling gawk on Tandem NSK/OSS,
Matthew Woehlke <=