nanogui: [patch] windef.h enhancements for VxWorks


Previous by date: 10 Oct 2000 14:25:13 -0000 Re: Mozilla runs on Nano-X, Morten Rolland
Next by date: 10 Oct 2000 14:25:13 -0000 FLNX update, Jeff Moellmer
Previous in thread: 10 Oct 2000 14:25:13 -0000 Re: [patch] windef.h enhancements for VxWorks, Greg Haerr
Next in thread: 10 Oct 2000 14:25:13 -0000 Re: [patch] windef.h enhancements for VxWorks, Greg Haerr

Subject: Re: [patch] windef.h enhancements for VxWorks
From: Brent Thompson ####@####.####
Date: 10 Oct 2000 14:25:13 -0000
Message-Id: <39E325DF.6000907@nlc.com>

Greg,

Greg Haerr wrote:

>     I'm about to add some of your include file changes for
> VxWorks - but I'm wondering why every internal win32
> ..h file needs to be wrapped with a total #ifdef wrapper.
> These routines will never be included more than once
> if I wrap windows.h, so I'm thinking of leaving out
> the extraneous #ifdef wrappers.  OK?

Just from my experience, I like to wrap all of my
header files with #ifdef wrappers.  My habit.  I don't
see anything wrong with leaving them out (as the code
*did* compile just fine without them! ;-)

> : Here's the guts of the changes needed for the Microwindows
> : port to VxWorks.  There are some typedef conflicts between
> : the two systems (UCHAR/USHORT/ULONG/UINT/BOOL) which are
> : handled with proper timing of includes and ifdefs.
> 
> Also, I don't like including the vxWorks.h from within
> the win32-specific windefs.h.  Why is it needed in here?
> It isn't required to compile the mwin/*.c files is it?
> 
> I do agree that perhaps the UCHAR and USHORT stuff
> shouldn't be included if VXWORKS is #defined.

Well, the UCHAR/USHORT/ULONG/BOOL types are used
below in <windef.h>, so they need to be defined
somewhere before that.  It seems that, in Tornado/VxWorks,
the <vxWorks.h> header file will eventually be included
when any ANSI header file (like <stdio.h>, etc.) is
included, and that is where the type conflicts are.

So my solution was to use the VxWorks definitions first
(as I don't have *any* influence/control over #ifdef-ing
them to work with Microwindows).   If I include the
<vxWorks.h> file first, then make sure to include
<windows.h> (which includes <windef.h>) before including
any ANSI header files, things work.  It's a balancing
act, but I haven't found any easier way around these
type conflicts (but I am open to suggestions! :-)

BAT
-- 
Brent A. Thompson, Next Level Communications <www.nlc.com>
1776 22nd Street #100, West Des Moines, IA 50266-1444
EMail: ####@####.#### Phone: (515)991-3853


Previous by date: 10 Oct 2000 14:25:13 -0000 Re: Mozilla runs on Nano-X, Morten Rolland
Next by date: 10 Oct 2000 14:25:13 -0000 FLNX update, Jeff Moellmer
Previous in thread: 10 Oct 2000 14:25:13 -0000 Re: [patch] windef.h enhancements for VxWorks, Greg Haerr
Next in thread: 10 Oct 2000 14:25:13 -0000 Re: [patch] windef.h enhancements for VxWorks, Greg Haerr


Powered by ezmlm-browse 0.20.