Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-ID: <37544AE1.AFE086C@cisco.com> Date: Tue, 01 Jun 1999 14:04:33 -0700 From: "Ashish C. Nagre" Reply-To: ashishcn AT cisco DOT com Organization: Cisco Systems X-Mailer: Mozilla 4.03 [en] (WinNT; U) MIME-Version: 1.0 To: Corinna Vinschen , cygwin AT sourceware DOT cygnus DOT com Subject: Re: ioctl() SOS -- Please help References: <374C9D2B DOT CBDD1EC4 AT cisco DOT com> <374CA453 DOT 6E07EFD1 AT vinschen DOT de> <374D85CF DOT AC0FFED3 AT cisco DOT com> <374D9F8D DOT 3F370DF3 AT vinschen DOT de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hello, I was trying to debug (using gdb) the application that I am trying to port from UNIX to NT. I have made a strange observation, when the following call is made: ioctl(fd, SIOCGIFFLAGS, (char *)&ifr) The value returned in the member ifr.ifr_ifru.ifru_flags is different when I just run the executable compared to when I run it in the debugger. ifr.ifr_ifru.ifru_flags = 34 (executable) ifr.ifr_ifru.ifru_flags = 99 (in gdb) As a result, the following condition (ifr.ifr_ifru.ifru_flags & 0x1) ---> indicates that interface is up always returns TRUE (correctly) in the gdb but returns FALSE (erroneously) as the executable. Why are the flags returned with different values ? Is there a bug in the command ? Thanks for your help. Regards, Ashish Corinna Vinschen wrote: > > "Ashish C. Nagre" wrote: > > [...] > > My question is should I overwrite the cygwin1.dll with the new dll that > > I got like you asked me to or should I copy it somewhere and just add > > the new dll in the PATH (using set PATH etc.) > > Overwrite it. To have more than one of this DLLs in the PATH is a > no no! > > > Because, even though now I have the dll and the source, I don't know how > > to get my code which makes the ioctl() calls to work with these new > > files. > > After you have copied the new DLL over the old one, you only have to > copy > winsup/include/asm/socket.h to the according directory in your include > path. > > This would have been easier, if you had taken my DLL, which I mentioned > in the first mail, too. It contains exactly the needed files. > > Regards, > Corinna > > -- > new mail address: > mailto:corinna AT vinschen DOT de -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com