Full_Name: Quanah Gibson-Mount Version: 2.4.21 OS: NA URL: ftp://ftp.openldap.org/incoming/ Submission from: (NULL) (75.111.45.108) The following if/elif clause in liblutil is wrong: #ifdef HAVE_SETSID (void) setsid(); #elif TIOCNOTTY if ( (sd = open( "/dev/tty", O_RDWR )) != -1 ) { (void) ioctl( sd, TIOCNOTTY, NULL ); (void) close( sd ); } #endif The elif should be #elif defined(TIOCNOTTY)
--On Monday, April 26, 2010 3:10 PM +0000 quanah@OpenLDAP.org wrote: > Full_Name: Quanah Gibson-Mount > Version: 2.4.21 > OS: NA > URL: ftp://ftp.openldap.org/incoming/ > Submission from: (NULL) (75.111.45.108) > > > The following if/elif clause in liblutil is wrong: Actually, the issue seems to be name changes in the header files under BSD. This causes TIOCNOTTY to end up being undefined. Here's the header information: kibi@kbsd:~$ grep TIOCNOTTY /usr/include/ -r /usr/include/sys/ttycom.h:#define TIOCNOTTY _IO('t', 113) /* void tty association */ kibi@kbsd:~$ grep ttycom.h -r /usr/include/ /usr/include/sys/tty.h:#include <sys/ttycom.h> /usr/include/bits/ioctls.h:#include <sys/ttycom.h> So we either need <bits/ioctls.h> or <sys/ttycom.h> to be included on this particular platform. My guess is the latter would be most appropriate. --Quanah -- Quanah Gibson-Mount Principal Software Engineer Zimbra, Inc -------------------- Zimbra :: the leader in open source messaging and collaboration
quanah@zimbra.com writes: > Actually, the issue seems to be name changes in the header files under BSD. > This causes TIOCNOTTY to end up being undefined. That would not give the error message shown in <http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg776021.html>: build/buildd-openldap_2.4.21-1-kfreebsd-amd64-VWAqZY/openldap-2.4.21/libraries/liblutil/detach.c:131:7: error: missing binary operator before token "long" Line 131 is "#elif TIOCNOTTY". There's no 'long' there is TIOCNOTTY is undefined, it'd just evaluate to #elif 0. So my guess is that TIOCNOTTY somewhere is defined to expand to an expression involving a (long) cast. -- Hallvard
--On Friday, April 30, 2010 1:23 PM +0000 h.b.furuseth@usit.uio.no wrote: > quanah@zimbra.com writes: >> Actually, the issue seems to be name changes in the header files under >> BSD. This causes TIOCNOTTY to end up being undefined. > > That would not give the error message shown in > <http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg776021. > html>: > > build/buildd-openldap_2.4.21-1-kfreebsd-amd64-VWAqZY/openldap-2.4.21/libr > aries/liblutil/detach.c:131:7: error: missing binary operator before > token "long" > > Line 131 is "#elif TIOCNOTTY". There's no 'long' there is TIOCNOTTY is > undefined, it'd just evaluate to #elif 0. So my guess is that TIOCNOTTY > somewhere is defined to expand to an expression involving a (long) cast. Apprently so. <http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg785259.html> --Quanah -- Quanah Gibson-Mount Principal Software Engineer Zimbra, Inc -------------------- Zimbra :: the leader in open source messaging and collaboration
changed notes changed state Open to Closed
--On Tuesday, May 25, 2010 6:37 PM +0000 quanah@zimbra.com wrote: > --On Friday, April 30, 2010 1:23 PM +0000 h.b.furuseth@usit.uio.no wrote: > >> quanah@zimbra.com writes: >>> Actually, the issue seems to be name changes in the header files under >>> BSD. This causes TIOCNOTTY to end up being undefined. >> >> That would not give the error message shown in >> <http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg776021. >> html>: >> >> build/buildd-openldap_2.4.21-1-kfreebsd-amd64-VWAqZY/openldap-2.4.21/libr >> aries/liblutil/detach.c:131:7: error: missing binary operator before >> token "long" >> >> Line 131 is "#elif TIOCNOTTY". There's no 'long' there is TIOCNOTTY is >> undefined, it'd just evaluate to #elif 0. So my guess is that TIOCNOTTY >> somewhere is defined to expand to an expression involving a (long) cast. > > Apprently so. > > <http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg785259. > html> Fixed by debian. --Quanah -- Quanah Gibson-Mount Principal Software Engineer Zimbra, Inc -------------------- Zimbra :: the leader in open source messaging and collaboration
quanah@zimbra.com writes: >>> Line 131 is "#elif TIOCNOTTY". There's no 'long' there is TIOCNOTTY is >>> undefined, it'd just evaluate to #elif 0. So my guess is that TIOCNOTTY >>> somewhere is defined to expand to an expression involving a (long) cast. >> >> Apprently so. >> >> <http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg785259. >> html> > > Fixed by debian. Which is nice, but doesn't help with older debian versions. I don't see what's wrong with changing our #elif to #elif defined like you originally suggested, though I remember there was some confused #elif discussion earlier. -- Hallvard
This problem is a generic problem of gcc version 4.4 and later. The new behaviour documented by GCC: http://gcc.gnu.org/gcc-4.4/porting_to.html I recommend importing the patch from http://www.openldap.org/its/index.cgi/Build?id=6832 More information: http://www.cyrius.com/journal/gcc/gcc-4.4-preprocessor-errors http://gcc.gnu.org/viewcvs?view=revision&revision=136209
mm@FreeBSD.org wrote: > This problem is a generic problem of gcc version 4.4 and later. You're replying to a closed ITS. Not much point to that. > The new behaviour documented by GCC: > http://gcc.gnu.org/gcc-4.4/porting_to.html > > I recommend importing the patch from > http://www.openldap.org/its/index.cgi/Build?id=6832 The patch from ITS#6832 is already in CVS. That's what the "fixed in HEAD" status means. There's really nothing left to say or do here. > More information: > http://www.cyrius.com/journal/gcc/gcc-4.4-preprocessor-errors > http://gcc.gnu.org/viewcvs?view=revision&revision=136209 -- -- Howard Chu CTO, Symas Corp. http://www.symas.com Director, Highland Sun http://highlandsun.com/hyc/ Chief Architect, OpenLDAP http://www.openldap.org/project/
Fixed by Debian, closing