"various compile time fixes"

[email protected] Fri, 28 Jun 2002 12:50:40 -0700
Newsgroups gmane.comp.lib.ivtools.patches
Message-ID <[email protected]>
Patch:    ivtools-020628-johnston-055
For:      ivtools-1.0.4
Author:   [email protected]
Subject:  various compile time fixes
Requires: 

This is an intermediate patch to ivtools-1.0.4.  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 -p0 <ThisFile

Summary of Changes:

- various compile time fixes for Solaris and Cygwin.

Index: ComUtil/comutil.h
diff -c ComUtil/comutil.h:1.1 ComUtil/comutil.h:1.2
*** ComUtil/comutil.h:1.1	Fri Nov  2 13:04:39 2001
--- src/ComUtil/comutil.h	Fri Jun 28 12:46:09 2002
***************
*** 27,32 ****
--- 27,33 ----
  
  #include <ComUtil/comterp.err>
  #include <ComUtil/util.h>
+ #include <ctype.h>
  #include <stdio.h>
  
  /* ================================================================== */
Index: IVGlyph/textbuff.c
diff -c IVGlyph/textbuff.c:1.1 IVGlyph/textbuff.c:1.2
*** IVGlyph/textbuff.c:1.1	Fri Nov  2 13:05:31 2001
--- src/IVGlyph/textbuff.c	Fri Jun 28 12:46:16 2002
***************
*** 32,37 ****
--- 32,38 ----
  #include <OS/memory.h>
  #include <OS/string.h>
  
+ #include <ctype.h>
  #include <stdlib.h>
  #include <string.h>
  
Index: OverlayUnidraw/algebra3.h
diff -c OverlayUnidraw/algebra3.h:1.1 OverlayUnidraw/algebra3.h:1.2
*** OverlayUnidraw/algebra3.h:1.1	Fri Nov  2 13:07:02 2001
--- src/OverlayUnidraw/algebra3.h	Fri Jun 28 12:46:35 2002
***************
*** 29,34 ****
--- 29,35 ----
  #include <assert.h>
  //#include <yvals.h>
  #include <math.h>
+ #include <ctype.h>
  
  // this line defines a new type: pointer to a function which returns a
  // double and takes as argument a double
Index: OverlayUnidraw/ovimport.c
diff -c OverlayUnidraw/ovimport.c:1.7 OverlayUnidraw/ovimport.c:1.8
*** OverlayUnidraw/ovimport.c:1.7	Fri May 17 13:54:01 2002
--- src/OverlayUnidraw/ovimport.c	Fri Jun 28 12:46:35 2002
***************
*** 93,98 ****
--- 93,100 ----
  
  #include <Dispatch/iohandler.h>
  #include <Dispatch/dispatcher.h>
+ 
+ #include <ctype.h>
  #include <fstream.h>
  #include <string.h>
  #include <strstream.h>
Index: drawtool/main.c
diff -c drawtool/main.c:1.3 drawtool/main.c:1.4
*** drawtool/main.c:1.3	Wed Jan 30 14:12:10 2002
--- src/drawtool/main.c	Fri Jun 28 12:46:38 2002
***************
*** 202,214 ****
      { nil }
  };
  
  static char* usage =
  "Usage: drawtool [any idraw parameter] [-color5] [-dithermap] [-gray5] [-gray6] \n\
  [-gray7] [-nocolor6] [-opaque_off|-opoff] [-pagecols|-ncols n] \n\
  [-pagerows|-nrows n] [-panner_align|-pal tl|tc|tr|cl|c|cr|cl|bl|br|l|r|t|b|hc|vc] \n\
  [-panner_off|-poff] [-ptrloc] [-scribble_pointer|-scrpt ] \n\
  [-slider_off|-soff] [-toolbarloc|-tbl r|l ] [-zoomer_off|-zoff] [file]";
! 
  /*****************************************************************************/
  
  int main (int argc, char** argv) {
--- 202,223 ----
      { nil }
  };
  
+ 
+ #ifdef HAVE_ACE
  static char* usage =
  "Usage: drawtool [any idraw parameter] [-color5] [-dithermap] [-gray5] [-gray6] \n\
+ [-gray7] [-import port] [-nocolor6] [-opaque_off|-opoff] [-pagecols|-ncols n] \n\
+ [-pagerows|-nrows n] [-panner_align|-pal tl|tc|tr|cl|c|cr|cl|bl|br|l|r|t|b|hc|vc] \n\
+ [-panner_off|-poff] [-ptrloc] [-scribble_pointer|-scrpt ] \n\
+ [-slider_off|-soff] [-toolbarloc|-tbl r|l ] [-zoomer_off|-zoff] [file]";
+ #else
+ static char* usage =
+ "Usage: drawtool [any idraw parameter] [-color5] [-dithermap] [-gray5] [-gray6] \n\
  [-gray7] [-nocolor6] [-opaque_off|-opoff] [-pagecols|-ncols n] \n\
  [-pagerows|-nrows n] [-panner_align|-pal tl|tc|tr|cl|c|cr|cl|bl|br|l|r|t|b|hc|vc] \n\
  [-panner_off|-poff] [-ptrloc] [-scribble_pointer|-scrpt ] \n\
  [-slider_off|-soff] [-toolbarloc|-tbl r|l ] [-zoomer_off|-zoff] [file]";
! #endif
  /*****************************************************************************/
  
  int main (int argc, char** argv) {
Index: GraphUnidraw/graphcatalog.c
diff -c GraphUnidraw/graphcatalog.c:1.1 GraphUnidraw/graphcatalog.c:1.2
*** GraphUnidraw/graphcatalog.c:1.1	Fri Nov  2 13:07:13 2001
--- src/GraphUnidraw/graphcatalog.c	Fri Jun 28 12:46:41 2002
***************
*** 48,53 ****
--- 48,54 ----
  
  #include <InterViews/transformer.h>
  
+ #include <ctype.h>
  #include <stdio.h>
  #include <stream.h>
  #include <string.h>
Index: DrawServ/drawcatalog.c
diff -c DrawServ/drawcatalog.c:1.2 DrawServ/drawcatalog.c:1.3
*** DrawServ/drawcatalog.c:1.2	Wed Jan 30 14:12:17 2002
--- src/DrawServ/drawcatalog.c	Fri Jun 28 12:46:43 2002
***************
*** 33,38 ****
--- 33,39 ----
  #include <OverlayUnidraw/ovimport.h>
  #include <TopoFace/topoedge.h>
  #include <Attribute/paramlist.h>
+ #include <ctype.h>
  #include <iostream.h>
  #include <stdio.h>
  #include <string.h>
Index: include_iviv-2_6/minmax.h
diff -c include_iviv-2_6/minmax.h:1.1 include_iviv-2_6/minmax.h:1.2
*** include_iviv-2_6/minmax.h:1.1	Fri Nov  2 13:07:27 2001
--- src/include/IV-2_6/InterViews/minmax.h	Fri Jun 28 12:46:46 2002
***************
*** 59,65 ****
  
  #endif /* !defined(min) && !defined(max) */
  
! #if __GNUG__<3
  inline int round(double x) { return x > 0 ? int(x+0.5) : -int(-x+0.5); }
  #endif
  
--- 59,65 ----
  
  #endif /* !defined(min) && !defined(max) */
  
! #if __GNUG__<3 && 0 /* removed, used Math::round from now on */
  inline int round(double x) { return x > 0 ? int(x+0.5) : -int(-x+0.5); }
  #endif
  
Index: include_std/nan.h
diff -c include_std/nan.h:1.2 include_std/nan.h:1.3
*** include_std/nan.h:1.2	Wed Feb 20 11:54:20 2002
--- src/include/ivstd/nan.h	Fri Jun 28 12:46:51 2002
***************
*** 8,20 ****
  #else
  #include <math.h>
  #endif
  
  #if defined(__sun__) && defined(__svr4__) || defined(__CYGWIN__) || defined(__linux__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__APPLE__)
! #define isnanorinf(dval) (isnan(dval)||isinf(dval))
  #elif defined(__alpha)
  #define isnanorinf(dval) (IsNANorINF(dval))
  #else
! #define isnanorinf(dval) (dval==NAN /* || dval==INF */)
  #endif
  
  
--- 8,23 ----
  #else
  #include <math.h>
  #endif
+ #if defined(__sun__) && defined(__svr4__)
+ #include <ieeefp.h>
+ #endif
  
  #if defined(__sun__) && defined(__svr4__) || defined(__CYGWIN__) || defined(__linux__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__APPLE__)
! #define isnanorinf(dval) (!finite(dval))
  #elif defined(__alpha)
  #define isnanorinf(dval) (IsNANorINF(dval))
  #else
! #define isnanorinf(dval) (!finite(dval)) /* (dval==NAN || dval==INF ) */
  #endif
  
  
*** /dev/null	 Fri Jun 28 12:46:57 PDT 2002
--- patches/ivtools-020628-johnston-055
*************** patches/ivtools-020628-johnston-055
*** 0 ****
--- 1 ----
+ ivtools-020628-johnston-055


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Caffeinated soap. No kidding.
http://thinkgeek.com/sf