public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* _WIN32?
@ 2001-04-17 14:50 Andrew Cagney
  2001-04-17 14:59 ` _WIN32? Mo DeJong
                   ` (2 more replies)
  0 siblings, 3 replies; 33+ messages in thread
From: Andrew Cagney @ 2001-04-17 14:50 UTC (permalink / raw)
  To: GDB Discussion

Hello,

utils.c contains:

#if !defined (MPW) && !defined (_WIN32)
      /* No termcap under MPW, although might be cool to do something
         by looking at worksheet or console window sizes. */
      /* Initialize the screen height and width from termcap.  */

Given the ``!defined (MPW)'' bit is about to go, I'm wondering if the
!defined(_WIN32) is needed?

Hmm, actually, I'm puzzled.  Can anyone fill in the gaps?
	
	__GO32__	djgpp I think
	__CYGWIN__	ok - cygwin
	__CYGWIN32__	ok - old __CYGWIN__
	_WIN32
	_WIN32_WCE
	__MSDOS__

enjoy,
	Andrew

^ permalink raw reply	[flat|nested] 33+ messages in thread
[parent not found: <200105010009.RAA12115@tully.CS.Berkeley.EDU>]
* Re: [Mingw-users] Re: _WIN32?
@ 2001-05-05 15:57 Danny Smith
  2001-05-05 18:54 ` Christopher Faylor
  2001-05-05 23:02 ` Eli Zaretskii
  0 siblings, 2 replies; 33+ messages in thread
From: Danny Smith @ 2001-05-05 15:57 UTC (permalink / raw)
  To: gdb

>> 
>> You don't necessarily have to test for anything.  We could just add
>> a TERMINAL_DOES_BLAH conditional which was set only when gdb was being
>> run under cygwin, or djgpp, or (don't worry we're working on it and
>> will have something in the next <<undeterminied>> timeframe, really
>> we will) Windows.  You don't actually have to write an autoconf test
>> for this.
>
>I agree with that approach, but Andrew was talking about Autoconf.

So was I.  You could still do this in configure.in.  The alternatives are
having something like:

  #if defined (__CYGWIN__) || defined (__DJGPP__)
  # define FILENAME_CASE_INSENSITIVE
  #endif

of something like (in configure.host):

  case "$host_cpu" in

  i[3456]86-*-cygwin*)
	  gdb_host=cygwin
	  FILENAME_CASE_INSENSITIVE=1
	  ;;

  i[3456]86-*-msdosdjgpp*)
	  gdb_host=go32
	  FILENAME_CASE_INSENSITIVE=1
	  ;;
  esac

  AC_SUBST(FILENAME_CASE_INSENSITIVE)

cgf


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.

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

_____________________________________________________________________________
http://store.yahoo.com.au - Yahoo! Store
- It's time you had your business online!

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2001-05-07  9:08 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-17 14:50 _WIN32? Andrew Cagney
2001-04-17 14:59 ` _WIN32? Mo DeJong
2001-04-17 15:06 ` _WIN32? Christopher Faylor
2001-04-30 10:05   ` _WIN32? Andrew Cagney
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
2001-04-30 18:00       ` _WIN32? Andrew Cagney
2001-04-17 17:45 ` _WIN32? DJ Delorie
2001-04-18  2:17   ` _WIN32? Eli Zaretskii
     [not found] <200105010009.RAA12115@tully.CS.Berkeley.EDU>
2001-05-03  1:24 ` [Mingw-users] _WIN32? 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
2001-05-05 15:57 Danny Smith
2001-05-05 18:54 ` Christopher Faylor
2001-05-05 23:03   ` Eli Zaretskii
2001-05-05 23:02 ` Eli Zaretskii
2001-05-06  1:52   ` Danny Smith

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).