This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA/win32] Avoid a couple of name collisions in win32-nat.c


> >2009-01-07  Joel Brobecker  <brobecker@adacore.com>
> >
> >        * win32-nat.c (kernel32_DebugSetProcessKillOnExit): Renames
> >        DebugSetProcessKillOnExit.  Update all uses in this file.
> >        (kernel32_DebugActiveProcessStop): Renames DebugActiveProcessStop.
> >        Update all uses in this file.
> >
> >Tested on x86-windows.
> >
> >OK to apply?
> 
> Ah, should have read further.  I don't understand why this is now a
> problem.  What changed?

I think I understand what changed. In winbase.h, the functions
are defined conditionally:

    #if (_WIN32_WINNT >= 0x0501)
    WINBASEAPI BOOL WINAPI DebugBreakProcess(HANDLE);
    WINBASEAPI BOOL WINAPI DebugSetProcessKillOnExit(BOOL);
    #endif

Digging further, I found that _WIN32_WINNT is defined in windef.h:

    #ifndef WINVER
    #define WINVER 0x0400
    /*
     * If you need Win32 API features newer the Win95 and WinNT then you must
     * define WINVER before including windows.h or any other method of including
     * the windef.h header.
     */
    #endif
    #ifndef _WIN32_WINNT
    #define _WIN32_WINNT WINVER
    #endif

However, on the x86_64-windows MinGW headers that we have,
it's unconditionally defined.

I will look at the ones I missed.

-- 
Joel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]