fix floating-point include file use for NetBSD
Brought to you by:
johnston
|
From: <ivt...@li...> - 2000-01-10 23:43:18
|
Patch: ivtools-000111-johnston-006
For: ivtools-0.7.10
Author: joh...@us...
This is an intermediate patch to ivtools-0.7.10. To apply, cd to the
top-level directory of the ivtools source tree (the directory with src
and config subdirs), and apply like this:
patch -s <ThisFile
Summary of Changes:
- "include" file touchups for NetBSD. *All* the problems are related
to finding the right include file for floating point constants
(i.e. the largest floating point value), and macros to test if a
floating point is equal to infinity or NAN. If anyone knows how to
POSIX this (and if POSIX'ing it won't break SUN4 support), please do.
I'll probably take care of this when I have to do it for the other
BSD's.
Index: TopoFace/topoelt.c
diff -c TopoFace/topoelt.c:1.1 TopoFace/topoelt.c:1.2
*** TopoFace/topoelt.c:1.1 Tue Jan 11 03:24:59 2000
--- src/TopoFace/topoelt.c Tue Jan 11 03:24:59 2000
***************
*** 22,33 ****
#include <TopoFace/topoelt.h>
- #if !defined(__CYGWIN__)
- #include <values.h>
- #else
#include <math.h>
#define MAXFLOAT HUGE_VAL
- #endif
/****************************************************************************/
--- 22,29 ----
Index: ComTerp/comterp.c
diff -c ComTerp/comterp.c:1.3 ComTerp/comterp.c:1.4
*** ComTerp/comterp.c:1.3 Tue Jan 11 03:25:00 2000
--- src/ComTerp/comterp.c Tue Jan 11 03:25:00 2000
***************
*** 376,386 ****
return false;
} else {
offset--;
- if (curr.is_type(ComValue::BlankType)) {
- boolean status = skip_arg(topval, offset, tokcnt);
- tokcnt++;
- return status;
- }
tokcnt++;
if (curr.narg() || curr.nkey()) {
--- 376,381 ----
***************
*** 394,399 ****
--- 389,398 ----
if (subtokcnt) count++;
} else if (next.is_type(ComValue::CommandType) ||
next.is_type(ComValue::SymbolType)) {
+ skip_arg(topval, offset, subtokcnt);
+ tokcnt += subtokcnt;
+ } else if (next.is_type(ComValue::BlankType)) {
+ offset--;
skip_arg(topval, offset, subtokcnt);
tokcnt += subtokcnt;
} else {
Index: src_iv-2_6/rubrect.c
diff -c src_iv-2_6/rubrect.c:1.1 src_iv-2_6/rubrect.c:1.2
*** src_iv-2_6/rubrect.c:1.1 Tue Jan 11 03:25:03 2000
--- src/IV-2_6/rubrect.c Tue Jan 11 03:25:03 2000
***************
*** 35,41 ****
#if defined(__CYGWIN__)
#include <mingw32/float.h>
#else
! #include <values.h>
#endif
#endif
--- 35,42 ----
#if defined(__CYGWIN__)
#include <mingw32/float.h>
#else
! #include <math.h>
! #define MAXFLOAT HUGE_VAL
#endif
#endif
Index: src_x11/xwindow.c
diff -c src_x11/xwindow.c:1.1 src_x11/xwindow.c:1.2
*** src_x11/xwindow.c:1.1 Tue Jan 11 03:25:05 2000
--- src/IV-X11/xwindow.c Tue Jan 11 03:25:05 2000
***************
*** 62,68 ****
#include <stropts.h>
#include <sys/conf.h>
#endif
! #if !defined(__linux__) && !defined(__CYGWIN__)
/* no standard place for this */
extern "C" {
extern int ioctl(int, int, ...);
--- 62,68 ----
#include <stropts.h>
#include <sys/conf.h>
#endif
! #if !defined(__linux__) && !defined(__CYGWIN__) && !defined(__NetBSD__)
/* no standard place for this */
extern "C" {
extern int ioctl(int, int, ...);
Index: include_std/nan.h
diff -c include_std/nan.h:1.1 include_std/nan.h:1.2
*** include_std/nan.h:1.1 Tue Jan 11 03:25:27 2000
--- src/include/ivstd/nan.h Tue Jan 11 03:25:27 2000
***************
*** 3,9 ****
#if defined(__GLIBC__) && (__GLIBC__==2 && __GLIBC_MINOR__>0 || __GLIBC__>2)
#include <bits/nan.h>
! #elif !defined(__CYGWIN__)
#include_next <nan.h>
#else
#include <math.h>
--- 3,9 ----
#if defined(__GLIBC__) && (__GLIBC__==2 && __GLIBC_MINOR__>0 || __GLIBC__>2)
#include <bits/nan.h>
! #elif !defined(__CYGWIN__) && !defined(__NetBSD__)
#include_next <nan.h>
#else
#include <math.h>
|