aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--NEWS1
-rw-r--r--builtin.c11
-rw-r--r--eval.c35
-rw-r--r--floatcomp.c16
-rw-r--r--io.c6
6 files changed, 9 insertions, 65 deletions
diff --git a/ChangeLog b/ChangeLog
index 594875bf..50343df2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sat Dec 18 19:56:17 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * builtin.c, eval.c, floatcomp.c, io.c: Remove all the crufty
+ old code for #ifdef CRAY.
+
Thu Dec 16 11:06:50 2010 Arnold D. Robbins <arnold@skeeve.com>
Put strftime() default format into PROCINFO["strftime"].
diff --git a/NEWS b/NEWS
index ce152fe6..70afe103 100644
--- a/NEWS
+++ b/NEWS
@@ -83,6 +83,7 @@ Changes from 3.1.8 to 4.0.0
- Atari
- Amiga
- BeOS
+ - Cray
- Tandem (non-POSIX)
- MS-DOS with Microsoft Compiler
- MS-Windows with Microsoft Compiler
diff --git a/builtin.c b/builtin.c
index fc3a327d..3628d3c9 100644
--- a/builtin.c
+++ b/builtin.c
@@ -68,17 +68,6 @@ extern FILE *output_fp;
static NODE *sub_common(int nargs, long how_many, int backdigs);
-#ifdef _CRAY
-/* Force the standard C compiler to use the library math functions. */
-extern double exp(double);
-double (*Exp)(double) = exp;
-#define exp(x) (*Exp)(x)
-extern double log(double);
-double (*Log)(double) = log;
-#define log(x) (*Log)(x)
-#endif
-
-
#define POP_TWO_SCALARS(s1, s2) \
s2 = POP_SCALAR(); \
s1 = POP(); \
diff --git a/eval.c b/eval.c
index 3133cd85..433621b5 100644
--- a/eval.c
+++ b/eval.c
@@ -1478,9 +1478,6 @@ op_assign(OPCODE op)
NODE **lhs;
NODE *r = NULL;
AWKNUM x1, x2;
-#ifdef _CRAY
- long lx;
-#endif
#ifndef HAVE_FMOD
AWKNUM x;
#endif
@@ -1504,19 +1501,7 @@ op_assign(OPCODE op)
decr_sp();
fatal(_("division by zero attempted in `/='"));
}
-#ifdef _CRAY
- /* special case for integer division, put in for Cray */
- lx = x2;
- if (lx == 0) {
- r = *lhs = make_number(x1 / x2);
- break;
- }
- lx = (long) x1 / lx;
- if (lx * x1 == x2)
- r = *lhs = make_number((AWKNUM) lx);
- else
-#endif /* _CRAY */
- r = *lhs = make_number(x1 / x2);
+ r = *lhs = make_number(x1 / x2);
break;
case Op_assign_mod:
if (x2 == (AWKNUM) 0) {
@@ -1598,10 +1583,6 @@ r_interpret(INSTRUCTION *code)
NODE **lhs;
AWKNUM x, x1, x2;
int di, pre = FALSE;
-#ifdef _CRAY
- long lx;
- long lx2;
-#endif
Regexp *rp;
int currule = 0;
#if defined(GAWKDEBUG) || defined(ARRAYDEBUG)
@@ -1990,21 +1971,7 @@ quotient:
fatal(_("division by zero attempted"));
TOP_NUMBER(x1);
-#ifdef _CRAY
- /* special case for integer division, put in for Cray */
- lx2 = x2;
- if (lx2 == 0)
- x = x1 / x2;
- else {
- lx = (long) x1 / lx2;
- if (lx * x2 == x1)
- x = lx;
- else
- x = x1 / x2;
- }
-#else
x = x1 / x2;
-#endif
r = make_number(x);
REPLACE(r);
break;
diff --git a/floatcomp.c b/floatcomp.c
index ff6a4708..db1ed1e6 100644
--- a/floatcomp.c
+++ b/floatcomp.c
@@ -79,13 +79,7 @@ Please port the following code to your weird host;
AWKNUM
Floor(AWKNUM n)
{
- return floor(n
-#if 0
-#ifdef _CRAY
- * (1.0 + DBL_EPSILON)
-#endif
-#endif
- );
+ return floor(n);
}
/* Ceil --- do ceil(), also for Cray */
@@ -93,13 +87,7 @@ Floor(AWKNUM n)
AWKNUM
Ceil(AWKNUM n)
{
- return ceil(n
-#if 0
-#ifdef _CRAY
- * (1.0 + DBL_EPSILON)
-#endif
-#endif
- );
+ return ceil(n);
}
#ifdef HAVE_UINTMAX_T
diff --git a/io.c b/io.c
index 687c9eaf..2b2c8561 100644
--- a/io.c
+++ b/io.c
@@ -447,12 +447,6 @@ iop_close(IOBUF *iop)
iop->flag &= ~IOP_AT_EOF;
iop->flag |= IOP_CLOSED; /* there may be dangling pointers */
iop->dataend = NULL;
-#ifdef _CRAY
- /* Work around bug in UNICOS popen */
- if (iop->fd < 3)
- ret = 0;
- else
-#endif
/* Don't close standard files or else crufty code elsewhere will lose */
/* FIXME: *DO* close it. Just reopen on an invalid handle. */
if (iop->fd == fileno(stdin)