delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Message-Id: | <5.1.1.6.2.20030319175830.00a020f0@mail.actron.com> |
X-Sender: | nsomos AT mail DOT actron DOT com |
Date: | Wed, 19 Mar 2003 18:17:48 -0500 |
To: | cygwin AT cygwin DOT com |
From: | Neil Somos <nsomos AT actron DOT com> |
Subject: | strange bug : select() always generate 10022 error |
Mime-Version: | 1.0 |
Compiling with -E can give some clues. The second case winds up producing some code like ... do { u_int __i;for (__i = 0; __i < ((fd_set *)(&fds))->fd_count ; __i++) { if (((fd_set *)(&fds))->fd_array[__i] == ((unsigned)s)) { break; }}if (__i == ((fd_set *)(&fds))->fd_count) { if (((fd_set *)(&fds))->fd_count < 64) { ((fd_set *)(&fds))->fd_array[__i] = ((unsigned)s); ((fd_set *)(&fds))->fd_count++; }}} while(0); while the first case produces code like ... (__extension__ (void)({ size_t __i; char *__tmp = (char *)&fds; for (__i = 0; __i < sizeof (*(&fds)); ++__i) *__tmp++ = 0; })); (Yes each of those are actually just one long line) If it is really important, then you can carefully track down the results of preprocessing in each case, and figure out what is being superceded by what else to cause this sort of effect. Although there are other differences, they are mainly just a name change and its effects. (fd_set versus _types_fd_set) The second case also winds up referencing SOCKET fd_array[64]; while the first one does not; This may be a clue. neal -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |