From: Christopher Faylor <cgf@redhat.com>
To: gdb@sources.redhat.com
Subject: Re: [Mingw-users] Re: _WIN32?
Date: Sat, 05 May 2001 18:54:00 -0000 [thread overview]
Message-ID: <20010505215249.A6163@redhat.com> (raw)
In-Reply-To: <20010505225648.23019.qmail@web6404.mail.yahoo.com>
On Sun, May 06, 2001 at 08:56:48AM +1000, Danny Smith wrote:
>Please be patient. I have very little experience with multiplatform
>configurations, none with autoconfigury I am one of these folk:
>
>>>(don't worry we're working on it and will have something in the next
>>><<undeterminied>> timeframe, really we will) Windows.
>
>and I am getting a bit confused by some of this discussion, and what I
>should do. For me examples teach.
Possibly reading the gdb archives might be helpful, then.
It is difficult to rectify confusion if you are only making an assertion
of confusion without actually saying what you are confused about.
If you have a question during a discussion, then please ask it.
>Here is an example of what I would like to add:
>
>In event-loop.c, a clock is needed. Posix uses gettimeofday. Here is
>how I would provide that clock for w32:
>
>/* winbase.h definitions */ typedef struct _FILETIME { unsigned long
>dwLowDateTime; unsigned long dwHighDateTime; } FILETIME; void __stdcall
>GetSystemTimeAsFileTime(FILETIME*);
>
>/*time from 1 Jan 1601 to 1 Jan 1970 in 100ns units */ #define
>_W32_FT_OFFSET (116444736000000000LL)
>
>typedef union { long long ns100; /*time since 1 Jan 1601 in 100ns units
>*/ FILETIME ft; } w32_ftv;
>
>void nt_gettimeofday(struct timeval* p, struct timezone* tz /* IGNORED
>*/){ w32_ftv _now; GetSystemTimeAsFileTime( &(_now.ft) );
>p->tv_usec=(long)((_now.ns100 / 10LL) % 1000000LL ); p->tv_sec=
>(long)((_now.ns100-_W32_FT_OFFSET)/10000000LL); return;
>
>
>Now, how would you like me to put this into event-loop.c. An example
>please, either on this list or privately
I may be wrong but I don't believe that anyone wants to be involved in
telling you what to do step by step along the way.
Your first step is to visit the gdb web page at
http://sources.redhat.com/gdb/ and check out all of the information
there.
Once you are sure that you have mastered all of the intracies of
submitting patches that are outlined on this pages and the pages that it
references, you should start submitting patches in the proscribed
manner. People will then offer suggestions about your patches and
you will refine them based on your suggestions.
If I were you, I would encapsulate everything as much as possible.
Rather than make changes to 27 different gdb functions, create
compatibility functions and put them in win32-nat.c, controlled by a
defined (_WIN32) && !defined (__CYGWIN__) conditional. I think that it
is appropriate to use system-specific defines in something like
win32-nat.c. I wouldn't deny a patch which contained this kind of
change (modulo Andrew's oversight, of course).
I'm not sure what you are expecting from reading the above. If you are
implying that you will be including things like the definition for
FILETIME in gdb somewhere, that is clearly wrong. Your formatting is
also not GNU compliant. It will have to conform to the rest of gdb if
you want to get it accepted.
It looks like you could just name the function above gettimeofday and
that would satisfy gdb's gettimeofday requirement. You'll need to put
the prototypes for this function into something that is included by gdb,
though. I'm not sure what header file would be appropriate for that.
That is something that you'll have to research.
We were talking about the fact that there may be places in gdb which
are currently under _WIN32 control which should actually be under something
like FILESYSTEM_USES_COLON control, or something like that. Those are
the things that should be set in configure.host, IMO.
cgf
next prev parent reply other threads:[~2001-05-05 18:54 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-05 15:57 Danny Smith
2001-05-05 18:54 ` Christopher Faylor [this message]
2001-05-05 23:03 ` Eli Zaretskii
2001-05-05 23:02 ` Eli Zaretskii
2001-05-06 1:52 ` Danny Smith
[not found] <200105010009.RAA12115@tully.CS.Berkeley.EDU>
2001-05-03 1:24 ` Paul Hilfinger
2001-05-03 13:41 ` Andrew Cagney
2001-05-03 14:15 ` Danny Smith
2001-05-03 15:24 ` Andrew Cagney
2001-05-03 15:54 ` Christopher Faylor
2001-05-03 16:11 ` Andrew Cagney
2001-05-04 2:17 ` Eli Zaretskii
2001-05-04 2:19 ` Eli Zaretskii
2001-05-04 8:45 ` Christopher Faylor
2001-05-04 10:18 ` Eli Zaretskii
2001-05-04 12:04 ` Christopher Faylor
2001-05-07 9:08 ` Eli Zaretskii
2001-05-03 23:58 ` Paul Hilfinger
2001-05-04 9:04 ` Andrew Cagney
2001-05-04 0:20 ` Eli Zaretskii
-- strict thread matches above, loose matches on Subject: below --
2001-04-30 10:15 _WIN32? Christopher Faylor
2001-04-30 16:19 ` [Mingw-users] _WIN32? Danny Smith
2001-04-30 17:03 ` Christopher Faylor
2001-04-30 17:29 ` Danny Smith
2001-05-01 7:03 ` Kai Ruottu
2001-05-01 7:44 ` 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=20010505215249.A6163@redhat.com \
--to=cgf@redhat.com \
--cc=gdb@sources.redhat.com \
/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