X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=1.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org MIME-Version: 1.0 Date: Sun, 18 Mar 2012 12:46:15 -0400 Message-ID: Subject: Attempt to build aplus-fsf-4.22 (EnumTable) From: Tom Szczesny To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 The current issue that I am facing is with an EnumTable. (see code listing below). It exists in a file named aplus-fsf-4.22/src/cxsys/eponymous.c LEXABUG is not defined in Cygwin. As far as I can tell, it is not defined in Gentoo Linux either. The code builds OK in Gentoo Linux. In Cygwin, with LEXABUG not defined, I get: error: 'FIOCLEX' undeclared here (not in a function) In Cygwin, with LEXABUG defined, I get: error 'FIOCLEX" undeclared (first use in this function) FIOCLEX is not declared (or mentioned) anywhere else in the source code package. I will continue to research EnumTable structures in C, but I thouht someone might have a recommendation. listing of code fragment begins here: #ifndef LEXABUG static EnumTable IoctlEnums[] = { { FIOCLEX, "FIOCLEX", 0 }, { FIONCLEX, "FIONCLEX", 0 }, { FIONREAD, "FIONREAD", 0 }, { FIONBIO, "FIONBIO", 0 }, { FIOASYNC, "FIOASYNC", 0 }, { FIOSETOWN, "FIOSETOWN", 0 }, { FIOGETOWN, "FIOGETOWN", 0 }, { TIOCGPGRP, "TIOCGPGRP", 0 }, { TIOCSPGRP, "TIOCSPGRP", 0 }, { TIOCOUTQ, "TIOCOUTQ", 0 }, { TIOCSTI, "TIOCSTI", 0 }, { TIOCGWINSZ, "TIOCGWINSZ", 0 }, { TIOCSWINSZ, "TIOCSWINSZ", 0 }, { TIOCMGET, "TIOCMGET", 0 }, { TIOCMBIS, "TIOCMBIS", 0 }, { TIOCMBIC, "TIOCMBIC", 0 }, { TIOCMSET, "TIOCMSET", 0 }, { 0, (char *)0, 0 } }; #else static EnumTable IoctlEnums[] = { { 0, "FIOCLEX", 0 }, { 0, "FIONCLEX", 0 }, { 0, "FIONREAD", 0 }, { 0, "FIONBIO", 0 }, { 0, "FIOASYNC", 0 }, { 0, "FIOSETOWN", 0 }, { 0, "FIOGETOWN", 0 }, { 0, "TCGETS", 0 }, { 0, "TCSETS", 0 }, { 0, "TCSETSW", 0 }, { 0, "TCSETSF", 0 }, { 0, "TCXONC", 0 }, { 0, "TCFLSH", 0 }, { 0, "TIOCSCTTY", 0 }, { 0, "TIOCGPGRP", 0 }, { 0, "TIOCSPGRP", 0 }, { 0, "TIOCOUTQ", 0 }, { 0, "TIOCSTI", 0 }, { 0, "TIOCGWINSZ", 0 }, { 0, "TIOCSWINSZ", 0 }, { 0, "TIOCMGET", 0 }, { 0, "TIOCMBIS", 0 }, { 0, "TIOCMBIC", 0 }, { 0, "TIOCMSET", 0 }, { 0, "TIOCGSOFTCAR", 0 }, { 0, "TIOCSSOFTCAR", 0 }, { 0, (char *)0, 0 } }; int initIoctlTable(void) { EnumTable *EnumTablePtr = IoctlEnums; EnumTablePtr->value = FIOCLEX; EnumTablePtr ++; EnumTablePtr->value = FIONCLEX; EnumTablePtr ++; EnumTablePtr->value = FIONREAD; EnumTablePtr ++; EnumTablePtr->value = FIONBIO; EnumTablePtr ++; EnumTablePtr->value = FIOASYNC; EnumTablePtr ++; EnumTablePtr->value = FIOSETOWN; EnumTablePtr ++; EnumTablePtr->value = FIOGETOWN; EnumTablePtr ++; EnumTablePtr->value = TCGETS; EnumTablePtr ++; EnumTablePtr->value = TCSETS; EnumTablePtr ++; EnumTablePtr->value = TCSETSW; EnumTablePtr ++; EnumTablePtr->value = TCSETSF; EnumTablePtr ++; EnumTablePtr->value = TCXONC; EnumTablePtr ++; EnumTablePtr->value = TCFLSH; EnumTablePtr ++; EnumTablePtr->value = TIOCSCTTY; EnumTablePtr ++; EnumTablePtr->value = TIOCGPGRP; EnumTablePtr ++; EnumTablePtr->value = TIOCSPGRP; EnumTablePtr ++; EnumTablePtr->value = TIOCOUTQ; EnumTablePtr ++; EnumTablePtr->value = TIOCSTI; EnumTablePtr ++; EnumTablePtr->value = TIOCGWINSZ; EnumTablePtr ++; EnumTablePtr->value = TIOCSWINSZ; EnumTablePtr ++; EnumTablePtr->value = TIOCMGET; EnumTablePtr ++; EnumTablePtr->value = TIOCMBIS; EnumTablePtr ++; EnumTablePtr->value = TIOCMBIC; EnumTablePtr ++; EnumTablePtr->value = TIOCMSET; EnumTablePtr ++; EnumTablePtr->value = TIOCGSOFTCAR; EnumTablePtr ++; EnumTablePtr->value = TIOCSSOFTCAR; return 0; } #endif -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple