summaryrefslogtreecommitdiffstats
path: root/gnu
diff options
context:
space:
mode:
authorjb <jb@FreeBSD.org>1998-05-12 23:07:07 +0000
committerjb <jb@FreeBSD.org>1998-05-12 23:07:07 +0000
commitd8437c430248c67583205bd04a850564ef7fe3a6 (patch)
tree4eab320253cc6aa0bd9781c8c74ca4312640294c /gnu
parentb36a8f56fb554921f6050cc7672dd0e3353b5af8 (diff)
downloadFreeBSD-src-d8437c430248c67583205bd04a850564ef7fe3a6.zip
FreeBSD-src-d8437c430248c67583205bd04a850564ef7fe3a6.tar.gz
This code casts double -> int -> char *. Ugh. Take a punt and change the
int to a long so that no bits are thrown away on alpha and hope for the best.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/perl/perl/doio.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/gnu/usr.bin/perl/perl/doio.c b/gnu/usr.bin/perl/perl/doio.c
index 0ace377..d940ef8 100644
--- a/gnu/usr.bin/perl/perl/doio.c
+++ b/gnu/usr.bin/perl/perl/doio.c
@@ -1,4 +1,4 @@
-/* $RCSfile: doio.c,v $$Revision: 1.3 $$Date: 1995/05/30 05:03:00 $
+/* $RCSfile: doio.c,v $$Revision: 1.4 $$Date: 1996/12/03 21:56:13 $
*
* Copyright (c) 1991, Larry Wall
*
@@ -6,6 +6,14 @@
* License or the Artistic License, as specified in the README file.
*
* $Log: doio.c,v $
+ * Revision 1.4 1996/12/03 21:56:13 nate
+ * Added support for '-T' and '-B' (text and binary) file recognition by
+ * peeking inside of Chris Torek's stdio library internals. This is
+ * similar to the code used for other systems, but didn't work on CT's new
+ * implementation.
+ *
+ * Submitted by: Gary Kline <kline@tera.com>
+ *
* Revision 1.3 1995/05/30 05:03:00 rgrimes
* Remove trailing whitespace.
*
@@ -763,12 +771,9 @@ STR *argstr;
s[argstr->str_cur] = 17; /* a little sanity check here */
}
else {
- retval = (int)str_gnum(argstr);
-#ifdef DOSISH
- s = (char*)(long)retval; /* ouch */
-#else
- s = (char*)retval; /* ouch */
-#endif
+ long lretval = (long)str_gnum(argstr);
+ retval = (int) lretval;
+ s = (char*)lretval; /* ouch */
}
#ifndef lint
OpenPOWER on IntegriCloud