Re: [gtk-list] Re: compiling gtk+ on solaris



On Wed, 22 Dec 1999 19:26:59 +0100, Drazen Kacar wrote:
> Erik Mouw wrote:
> 
>> Seems that my guess was right ;-). What about filing a bugreport to Sun?
>> In the mean time, you may try gcc's "-Wno-strict-prototypes" flag,
>> although this will certainly hide errors *you* made.
> 
> I think I've reported it about a month ago. The include files are taken
> directly from X/Open distribution and Sun is reluctant to change anything.

If that's true, those X/Open guys really have a strange ideas how portable
code should look like. Looking at X11/Xlib.h on a SGI O2 running IRIX 6.3
I see fully prototyped functions (for example XDoesBackingStore()):

  extern int XDoesBackingStore(
  #if NeedFunctionPrototypes
      Screen*             /* screen */    
  #endif
  );

Which is the same on a SuSE Linux 6.1 and a Debian 2.1 box. Does this mean
that SGI and XFree86 add ANSI compliant prototypes to each function, or
that Sun *removes* the prototypes?

> Although it's annoying when gcc compiles C program, it's not a real
> problem. But g++ (new versions) will refuse to compile those files.

And for valid reasons. The gcc team worked towards a *correct* C/C++
compiler implementation. Sometimes this means that previously assumed
correct C constructions fail with gcc 2.95.2, but my experience is that
all "sane coded" programs pass gcc 2.95.2 with no or little changes.

> I don't use gcc much, so i can ignore the problem for the time being,
> but I'd suggest to change the include files. The functions which cause
> problems are declared as:
> 
> foo(bar);
> 
> instead of:
> 
> int foo(bar)
> 
> So adding `int' in front of them shouldn't be a problem. And yes, it happens'
> in the newest X11R6.4 release.

I can't decide which is worse: Sun changing the include files or X/Open
*not* adding proper prototypes.


Erik
(who uses gcc every day)

-- 
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031,  2600 GA Delft, The Netherlands
Phone: +31-15-2785859  Fax: +31-15-2781843  Email J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]