Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Fri, 5 Jul 2002 16:02:07 -0400
From: Christopher Faylor <cgf@redhat.com>
To: cygwin@cygwin.com
Subject: Re: /proc/uptime etc. - NtQuerySystemInformation() needs bigger structure
Message-ID: <20020705200207.GA11696@redhat.com>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <E17QTq3-0004vt-0X@anchor-post-33.mail.demon.net> <004f01c22449$91da71a0$0100a8c0@advent02>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <004f01c22449$91da71a0$0100a8c0@advent02>
User-Agent: Mutt/1.3.23.1i

On Fri, Jul 05, 2002 at 06:29:51PM +0100, Chris January wrote:
>> --- winsup/cygwin/ntdll.h.old 2002-05-30 21:21:04.000000000 +0100
>> +++ winsup/cygwin/ntdll.h     2002-07-05 11:15:52.000000000 +0100
>> @@ -58,6 +58,7 @@ typedef struct _SYSTEM_PROCESSOR_TIMES
>>    LARGE_INTEGER DpcTime;
>>    LARGE_INTEGER InterruptTime;
>>    ULONG InterruptCount;
>> +  ULONG Unused;
>>  } SYSTEM_PROCESSOR_TIMES, *PSYSTEM_PROCESSOR_TIMES;
>>
>>  typedef LONG KPRIORITY;
>
>I will look at this patch tonight, but I would be grateful if you could
>answer the following questions:
>What version of binutils are you using?
>If you compiled Cygwin using just the 1.3.12 sources with no modifications,
>does /proc/uptime have any content?

I think this is a symptom of the fact that gcc uses different alignment
than msvc.  If you add a __attribute__ ((aligned (8))) to the structure
it should "fix" the problem.

This is one thing that was fixed by the -fnative-struct gcc option which
is, unfortunately, not available in gcc 3.1.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

