summaryrefslogtreecommitdiff
path: root/src/preproc/pic
diff options
context:
space:
mode:
authorwl <wl>2005-03-17 08:29:14 +0000
committerwl <wl>2005-03-17 08:29:14 +0000
commit0b1eab072429cdd56e4288995144bdf1e0d0f4fc (patch)
tree5780812f4219df39053629dc71b347d1e2a42989 /src/preproc/pic
parent25d3cba657a3f82fa263bf2b61d43e134f0331ef (diff)
downloadgroff-0b1eab072429cdd56e4288995144bdf1e0d0f4fc.tar.gz
Add workaround for broken hypot() on Interix.
* src/libs/libgroff/hypot.c: New wrapper file for `hypot'. * src/libs/libgroff/Makefile.sub (OBJS): Add `hypot.o'. (CSRCS): Add `hypot.c'. * src/include/lib.h: Declare `groff_hypot'. * src/preproc/grn/hgraph.cpp: Don't declare `hypot'. Use `groff_hypot'. * src/preproc/pic/pic.h: Don't declare `hypot'. * src/preproc/pic/object.cpp (hypot): Use `groff_hypot'.
Diffstat (limited to 'src/preproc/pic')
-rw-r--r--src/preproc/pic/object.cpp4
-rw-r--r--src/preproc/pic/pic.h8
2 files changed, 3 insertions, 9 deletions
diff --git a/src/preproc/pic/object.cpp b/src/preproc/pic/object.cpp
index 1f70c45b..ad468461 100644
--- a/src/preproc/pic/object.cpp
+++ b/src/preproc/pic/object.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003, 2004
+/* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Written by James Clark (jjc@jclark.com)
@@ -202,7 +202,7 @@ double operator*(const position &a, const position &b)
double hypot(const position &a)
{
- return hypot(a.x, a.y);
+ return groff_hypot(a.x, a.y);
}
struct arrow_head_type {
diff --git a/src/preproc/pic/pic.h b/src/preproc/pic/pic.h
index 166e4e75..5b2db055 100644
--- a/src/preproc/pic/pic.h
+++ b/src/preproc/pic/pic.h
@@ -1,5 +1,5 @@
// -*- C++ -*-
-/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2003
+/* Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2003, 2005
Free Software Foundation, Inc.
Written by James Clark (jjc@jclark.com)
@@ -25,12 +25,6 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include <stdlib.h>
#include <errno.h>
-#ifdef NEED_DECLARATION_HYPOT
-extern "C" {
- double hypot(double, double);
-}
-#endif /* NEED_DECLARATION_HYPOT */
-
#ifdef NEED_DECLARATION_RAND
#undef rand
extern "C" {