Question on GNU C -- Openwin compatibility

Lars P. Fischer fischer at iesd.auc.dk
Wed Jan 9 11:26:34 AEST 1991


>>>>> On 30 Dec 90 01:04:00 GMT, hista at jetson.uh.edu said:

> I am having some rather crazy problems with my recently installed GNU C
> compiler on the Sun4 platform. ...

> when it comes down to files with inbuilt headers calling the xview
> libraries, it messes up like mad.

The header files for XView version 2 are set up to provide K&R C, ANSI C,
or C++. Unfortunately, the ANSI C version has syntax errors (!).  The
problem is this: When using a variabel number of arguments for a function
in ANSI C, you use the ellipsis notation, ie

  int printf (char*, ...);

XView make use of this a lot. For some functions, XView does not want to
tell anything about the arguments, hence

  int shhhh (...);

BUT this is illegal. "...there must be at least one named argument;...",
(K&R, 2.ed., p 155). To do that, one must say

  int shhhh ( );

That's an "old-style" declaration, with no type checking at all.  Below is
a patch for XView that fix the problem. save this article and go to
..../openwin/include/xview and say

   patch -p1 < xview.patch

If it complains about a reverse patch, just say "y" (I always mess up the
diff command. Sorry).

Happy Hacking!

Lars Fischer,  fischer at iesd.auc.dk

[[Ed's Note: Placed in archives - and I'll even update the index :) -bdg]]

FTP:	Hostname : titan.rice.edu (128.42.1.30)
	Directory: sun-source
	Filename : xview.patch
	Filesize : 8314 bytes

Archive Server Address: archive-server at rice.edu
Archive Server Command: send sun-source xview.patch



More information about the Comp.sys.sun mailing list