summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2006-01-25 22:57:52 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2006-01-25 22:57:52 (GMT)
commitb37bf640a61a47cfac23685230f8f8d3300eaba7 (patch)
tree2422722377140744b164ba9f68718ab8c55ae514 /unix
parent63173b73b75a6af2cf3b0d9fc2ef1bce828162f1 (diff)
downloadtcl-b37bf640a61a47cfac23685230f8f8d3300eaba7.zip
tcl-b37bf640a61a47cfac23685230f8f8d3300eaba7.tar.gz
tcl-b37bf640a61a47cfac23685230f8f8d3300eaba7.tar.bz2
Adapted version of FreeBSD port to reduce the amount of stuff they
have to do to build Tcl...
Diffstat (limited to 'unix')
-rw-r--r--unix/tclUnixInit.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c
index 3c65494..013f270 100644
--- a/unix/tclUnixInit.c
+++ b/unix/tclUnixInit.c
@@ -7,7 +7,7 @@
* Copyright (c) 1999 by Scriptics Corporation.
* All rights reserved.
*
- * RCS: @(#) $Id: tclUnixInit.c,v 1.61 2005/11/02 23:26:50 dkf Exp $
+ * RCS: @(#) $Id: tclUnixInit.c,v 1.62 2006/01/25 22:57:53 dkf Exp $
*/
#include "tclInt.h"
@@ -17,7 +17,7 @@
#include <langinfo.h>
#endif
#include <sys/resource.h>
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) && defined(__GNUC__)
# include <floatingpoint.h>
#endif
#if defined(__bsdi__)
@@ -387,7 +387,14 @@ TclpInitPlatform(void)
(void) signal(SIGPIPE, SIG_IGN);
#endif /* SIGPIPE */
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) && defined(__GNUC__)
+ /*
+ * Adjust the rounding mode to be more conventional. Note that FreeBSD
+ * only provides the __fpsetreg() used by the following two for the GNU
+ * Compiler. When using, say, Intel's icc they break. (Partially based on
+ * patch in BSD ports system from root@celsius.bychok.com)
+ */
+
fpsetround(FP_RN);
(void) fpsetmask(0L);
#endif