🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.interviews
Article #684

(none)

#684
From: REGI's
Date: Thu, 15 Oct 1992 12:18
104 lines
4143 bytes
>X-Envelope-to: comp-windows-interviews@shelby.stanford.edu
>X-VMS-To: IN::"comp-windows-interviews@shelby.stanford.edu"

1
15-OCT-1992 20:13:26.07
   1 00:00:00.00
16-OCT-1992 20:13:26.07
daemon@interviews.Stanford.EDU
juando@cnm.us.es

Received: from interviews.Stanford.EDU by ESEVVX.CICA.ES ; 12-OCT-1992 20:13:16.58
Received: by interviews.Stanford.EDU (5.57/Ultrix3.0-C)
	id AA10804; Mon, 12 Oct 92 12:14:29 PDT
Received: by interviews.Stanford.EDU (5.57/Ultrix3.0-C)
	id AA10128; Mon, 12 Oct 92 12:09:47 PDT
Received: by lurch.Stanford.EDU (5.57/Ultrix2.4-C)
	id AA29076; Mon, 12 Oct 92 12:07:50 PDT
Received: by shelby.Stanford.EDU (5.57/Ultrix3.0-C)
	id AA17149; Mon, 12 Oct 92 12:03:54 -0700
Date: Mon, 12 Oct 1992 18:41:50 GMT
From: erekosse@usl.edu (Erekosse, Magelord of Amber Keep)
Organization: The Company of the Amber Gryphon
Subject: X11 header problem w/c++ in Ultrix 4.2A
Message-Id: <1992Oct12.184150.12908@usl.edu>
Sender: owner-comp-windows-interviews@shelby.stanford.edu
To: comp-windows-interviews@shelby.stanford.edu


Has anyone else run into a problem using DEC's X11 headers with C++
code?  I don't seem to run into the problem using the unsupported
MIT headers or the headers from the vanilla X11R4 release.  I think
the problem lies in the transfer of several declarations from Xutil.h
to Xlib.h (see the following excerpts):

Xlib.h (DEC's)
----------------------------
/*
 *  ICCCM stuff
 */
extern int XWMGeometry(
#if NeedFunctionPrototypes
    Display*            /* display */,
    int                 /* screen_number */,
    const char*         /* user_geometry */,
    const char*         /* default_geometry */,
    unsigned int        /* border_width */,
    XSizeHints*         /* hints */,
    int*                /* x_return */,
    int*                /* y_return */,
    int*                /* width_return */,
    int*                /* height_return */,
    int*                /* gravity_return */
#endif
);

...
...
...

-----------------------------

These ICCCM definition appear in the Xutil.h header in the unsupported
and the X11R4 files.  The central problem, I think, is the use of the
XSizeHints* in this situation.  XSizeHints* is declared in Xutil.h; however,
DEC's Intrinsics.h header includes Xlib.h before Xutil.h.  The problem does
not exist unless we use the C++ compiler thus requiring prototyping.  It
seems that trying to use DEC's header in their current form will not work.

Intrinsic.h (DEC's)
----------------------------
#ifdef VMS
/* MIN and MAX get defined vis <sys/types.h> on Unix */
#define MIN(a,b) (((a)<(b))?(a):(b))
#define MAX(a,b) (((a)>(b))?(a):(b))
#include        <DECw$Include:Xlib.h>
#include        <DECw$Include:Xresource.h>
#include        <DECw$Include:Xos.h>
#include        <DECw$Include:Xutil.h>
#else
#include        <X11/Xlib.h>
#ifndef DEC_BUG_FIX
#include        <X11/Xutil.h>
#endif
#include        <X11/Xresource.h>
#include        <X11/Xos.h>
#ifdef DEC_BUG_FIX
#include        <X11/Xutil.h>
#endif
#endif /* VMS */
---------------------------

This problem arose while attempting to compile interviews.  Interviews
compiles fine as long as I use either the unsupported mit or X11R4 includes,
libs, and configs.  The compilation error was a result of including Xlib.h
without having XSizeHints* declared yet.

Anyone have any ideas as to why DEC moved these ICCCM declarations out of the
Xutil.h header and into the Xlib.h header?

                           David Kerven
			   dsk@usl.edu

Member (good standing) Nonsequitur Society of America: 
              We may not make sense, but we have outstanding parties!
Technical Details
Message-ID: <01GPZ911Z8UO0001ZZ@esevvx.cica.es>
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!ESEVVX.CICA.ES!NUNEZ

Show Full Headers
Complete Article Headers
Newsgroups: comp.windows.interviews
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!ESEVVX.CICA.ES!NUNEZ
From: NUNEZ@ESEVVX.CICA.ES (REGI's)
Subject: (none)
Message-ID: <01GPZ911Z8UO0001ZZ@esevvx.cica.es>
X-Unparsable-Date: Thu, 15 Oct 1992 13: 14:00 UTC+0100
Sender: news@shelby.stanford.edu (USENET News System)
Organization: Internet-USENET Gateway at Stanford University
Date: Thu, 15 Oct 1992 12:18:34 GMT
Lines: 104