Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: gdb-patches@sourceware.org
Subject: Re: [RFA/win32] Avoid a couple of name collisions in win32-nat.c
Date: Thu, 08 Jan 2009 12:53:00 -0000	[thread overview]
Message-ID: <20090108125305.GA20220@adacore.com> (raw)
In-Reply-To: <20090107165734.GD31906@ednor.casa.cgf.cx>

> >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


  reply	other threads:[~2009-01-08 12:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-07 11:24 Joel Brobecker
2009-01-07 16:57 ` Christopher Faylor
2009-01-08 12:53   ` Joel Brobecker [this message]
2009-01-09 10:42   ` Joel Brobecker
2009-01-14  6:23     ` Joel Brobecker
2009-01-14 15:08       ` Christopher Faylor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090108125305.GA20220@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox