[ros-kernel] w32api bug?

Mark IJbema mark at ijbema.xs4all.nl
Sat Jan 24 11:21:39 CET 2004


On Fri, Jan 23, 2004 at 08:53:20PM -0600, Vizzini wrote:
> I had a build problem with rosrtl that turned out to look a lot like a
> w32api bug from the cvs on sources.redhat.com.  I was getting a
> double-definition for REFIID due to what looks like a typo in
> basetyps.h.  I don't know if anyone else is having this, but here's a
> trivial patch just in case.  
> 
> This is not the right solution - if it's a typo, it should be fixed.   I
> just added a define.

I had the same problem.

> Index: basetyps.h
> ===================================================================
> RCS file: /cvs/src/src/winsup/w32api/include/basetyps.h,v
> retrieving revision 1.8
> diff -u -r1.8 basetyps.h
> --- basetyps.h	1 Jul 2003 23:37:00 -0000	1.8
> +++ basetyps.h	24 Jan 2004 02:16:30 -0000
> @@ -141,6 +141,7 @@
>  #endif
>  #define _REFGUID_DEFINED

I think the following line is the error. there was no REFGIID defined.

> #define _REFGIID_DEFINED

The full context:

#if defined (__cplusplus) && !defined (CINTERFACE)
#define REFGUID const GUID&
#define REFIID const IID&
#define REFCLSID const CLSID&
#else
#define REFGUID const GUID* const
#define REFIID const IID* const
#define REFCLSID const CLSID* const
#endif
#define _REFGUID_DEFINED
#define _REFGIID_DEFINED
#define _REFCLSID_DEFINED
#endif

so _REFGUID_DEFINED refers to REFGUID, which is defined,
_REFCLSID_DEFINED refers to REFCLSID but where does _REFGIID_DEFINED
refer to? So i think instead of adding a line you merely should remove
the G from _REFGIID_DEFINED and change it to REFIID defined. Else you
could get weird errors later (when some REFGIID wasn't defined, because
_REFGIID_DEFINED was set, but REFGIID wasn't)

> +#define _REFIID_DEFINED
>  #define _REFCLSID_DEFINED
>  #endif
>  #ifndef GUID_SECTION

Mark


More information about the Ros-kernel mailing list