Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-WM-Posted-At: avacado.atomice.net; Sat, 6 Jul 02 11:45:57 +0100 Message-ID: <004501c224da$4f4fb750$0100a8c0@advent02> From: "Chris January" To: References: <007401c224cf$457b64a0$fe0110ac AT lap> Subject: Re: /proc/uptime etc. - NtQuerySystemInformation() needs bigger structure Date: Sat, 6 Jul 2002 11:45:56 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 > >> --- 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? > > I had been using 20011002-1. I've now retried with 20020630-2, and that > just crashes out with a return code of 128, when cygwin1.dll tries to > dereference a null pointer. (Sorry, I didn't think to try to track down > exactly where until after I'd recompiled with 20011002-1.) > > >If you compiled Cygwin using just the 1.3.12 sources with no > >modifications, does /proc/uptime have any content? > > I'd not tried that before, under the naïve assumption that I'd just be > recreating the released binary. But I have now done so, and find that even > using an unmodified ntdll.h works correctly. > > Running both the original and my versions of cygwin1.dll through a > disassembler shows that the binary release is passing 0x2c as the structure > length, but that the newly-compiled one passes 0x30 (which is the effect I > was trying to achieve with the patch). Presumably the structure alignment > is different -- perhaps because it detected and compiled for i686 rather > than i386? That the binary release is passing a different structure size seems to be an artifact of Chris Faylor's compiler setup, AFICT. I think he's trying to sort it out - see his post in this same thread. Chris -- 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/