[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
problems with xgraph
- To: [email protected]
- Subject: problems with xgraph
- From: Insung Jung <[email protected]>
- Date: Mon, 07 Sep 1998 22:29:22 +0900
- Organization: CC lab., School of Computing, SoongSil Univ.
Dear sir.
I have a problem with building xgraph as follows.
-------------------------------
#144 cherry:/root/ns/xgraph%xmkmf
mv -f Makefile Makefile.bak
imake -DUseInstalled -I/usr/local/X11R6.3/lib/X11/config
#145 cherry:/root/ns/xgraph%make
gcc -O2 -I/usr/local/X11R6.3/include -Dsun -DSVR4 -c xgraph.c
In file included from xgraph.c:23:
xgraph.h:163: conflicting types for `sprintf'
/usr/include/stdio.h:177: previous declaration of `sprintf'
xgraph.c: In function `main':
xgraph.c:109: warning: passing arg 1 of `XSetErrorHandler' from
incompatible pointer type
xgraph.c: At top level:
xgraph.c:699: warning: type mismatch with previous implicit declaration
xgraph.c:645: warning: previous implicit declaration of `NewWindow'
xgraph.c:699: warning: `NewWindow' was previously implicitly declared to
return `int'
-------------------------------------------------
To solve the above problem, I have already been applied the following
patch to Imakefile, xgraph.h as described at
http://www-mash.cs.berkeley.edu/ns/ns-problems.html
-------------------------------------------------
diff -u xgraph-/Imakefile xgraph/Imakefile
--- xgraph-/Imakefile Tue Jun 11 12:14:13 1991
+++ xgraph/Imakefile Tue Jun 10 11:21:06 1997
@@ -30,10 +30,10 @@
SYS_LIBRARIES = -lm
SRCS = xgraph.c xgX.c hard_devices.c dialog.c hpgl.c \
ps.c idraw.c xtb.c st.c params.c alloc.c draw.c \
- init.c read.c tgif.c
+ init.c read.c tgif.c derivative.c
OBJS = xgraph.o xgX.o hard_devices.o dialog.o hpgl.o \
ps.o idraw.o xtb.o st.o params.o alloc.o draw.o \
- init.o read.o tgif.o
+ init.o read.o tgif.o derivative.o
ComplexProgramTarget(xgraph)
diff -u xgraph-/xgraph.h xgraph/xgraph.h
--- xgraph-/xgraph.h Tue Oct 12 09:53:50 1993
+++ xgraph/xgraph.h Tue Jun 10 11:45:58 1997
@@ -28,6 +28,8 @@
#define HARDCOPY_IN_PROGRESS 0x01
/* Portability */
+#include <math.h> /* try to get MAXFLOAT */
+
#ifdef CRAY
#undef MAXFLOAT
#define MAXFLOAT 10.e300
@@ -144,7 +146,17 @@
/* To make lint happy */
extern char *Malloc();
extern char *Realloc();
-#ifdef _AIX370
+extern void Free();
+#ifdef _POSIX_SOURCE
+/*
+ * Get definitions from headers.
+ */
+#include <stdio.h> /* sprintf */
+#include <string.h> /* str* */
+#include <unistd.h> /* exit, abort */
+#include <stdlib.h> /* atof */
+#else /* ! _POSIX_SOURCE */
+#if defined(_AIX370)
extern int sprintf();
#else
extern char *sprintf();
@@ -154,8 +166,8 @@
extern char *rindex();
extern char *index();
extern void exit();
-extern void Free();
extern double atof();
extern void abort();
+#endif /* _POSIX_SOURCE */
#endif /* _XGRAPH_H_ */
----------------------------------------
How can i fix ? Is it possible ?
My configuration is as follows
-----------------
Workstation : Sun, Ultra 1/140
OS : Solaris 2.5.1
X : X11 6.3
Your helps are really appreciated.
Insung
--
^^ ^^
E) [email protected]
C) 011 756 7439
O) +82 02 820 0689
H) +82 02 826 8219
-- InSung Jung
-- o Computer Communication Lab,
- _/[._ Dept of Comp Sci, SoongSil Univ
(_)>(_) Seoul, Korea
------------