From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Sep 21 07:05:10 2003 Return-Path: Delivered-To: freebsd-ports-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C8CE516A4B3; Sun, 21 Sep 2003 07:05:10 -0700 (PDT) Received: from mailout.informatik.tu-muenchen.de (mailout.informatik.tu-muenchen.de [131.159.0.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8561343FFD; Sun, 21 Sep 2003 07:05:09 -0700 (PDT) (envelope-from barner@in.tum.de) Received: by zi025.glhnet.mhn.de (Postfix, from userid 1000) id 50E153B400; Sun, 21 Sep 2003 16:05:07 +0200 (CEST) Date: Sun, 21 Sep 2003 16:05:07 +0200 From: Simon Barner To: Gerald Pfeifer Message-ID: <20030921140506.GA1815@zi025.glhnet.mhn.de> References: <200309211225.h8LCPeZi013371@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200309211225.h8LCPeZi013371@freefall.freebsd.org> User-Agent: Mutt/1.5.4i X-Virus-Scanned: by amavisd-new at informatik.tu-muenchen.de cc: freebsd-ports-bugs@FreeBSD.org Subject: Re: ports/56725: [patch, non-maintainer] web/webredirect: Fix build with gcc 2.95.4 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Sep 2003 14:05:11 -0000 Here is some more information, as requested via pm. With my comment in ports/www/webredirect/work/webredirect-0.3/incu/incu/log.hh I was referring to "Boring workaround..." comment from the author of the program, and I assumed that the log output would be broken on FreeBSD 4.x (and gcc 2.95.x). -----> log.hh <----- class Log : public std::ostringstream { public: Log(const LogGrade g = l_info) : grade(g) { using namespace std; if(grade < silence) setstate(ios::failbit); else (*this) << grade << ": "; } ~Log(); static void addDevice(LogDevice* dev); static void setTreshold(LogGrade t) { silence = t; } /** Boring workaround ... Without this, the first thing to get appended to * the Log gets broken. */ // Does not work with gcc 2.95.4, so people with have to live with // broken output :( #if !defined (__GNUC__) || __GNUC__ > 2 template std::ostream& operator << (const T& t) { return *((std::ostream*)(this)) << t; } #endif -----> log.hh <----- I tested the port on our lan, and the bug does not seem to occur: zi025# webredirect -d -t http://thor gives me the following output in /var/log/messages: (I killed it and restarted webredirect several times and successfully redirected from my own host `zi025' to our main server `thor'. [...] Sep 21 15:33:50 zi025 /kernel: cd9660: Joliet Extension (Level 3) Sep 21 15:42:13 zi025 webredirect: INFO: Starting webredirect 0.0.0.0.80 to http://www.leo.org Sep 21 15:44:54 zi025 webredirect: INFO: Starting webredirect 0.0.0.0.80 to http://www.leo.org/ Sep 21 15:44:54 zi025 webredirect: DEBUG: webredirect.cc:234: Main loop Sep 21 15:45:59 zi025 webredirect: INFO: Starting webredirect 0.0.0.0.80 to http://thor Sep 21 15:45:59 zi025 webredirect: DEBUG: webredirect.cc:234: Main loop Sep 21 15:46:27 zi025 webredirect: DEBUG: webredirect.cc:239: Select returned 1 Sep 21 15:46:27 zi025 webredirect: INFO: Got request from 10.151.4.25 on fd 5 Sep 21 15:46:27 zi025 webredirect: DEBUG: webredirect.cc:234: Main loop Sep 21 15:46:27 zi025 webredirect: DEBUG: webredirect.cc:239: Select returned 1 Sep 21 15:46:27 zi025 webredirect: DEBUG: webredirect.cc:51: Read 438 chars. Sep 21 15:46:27 zi025 webredirect: DEBUG: webredirect.cc:103: fd #5 says "GET / HTTP/1.1" Sep 21 15:46:27 zi025 webredirect: DEBUG: webredirect.cc:135: fd #5 requested / Sep 21 15:46:27 zi025 webredirect: DEBUG: webredirect.cc:103: fd #5 says "Host: zi025" Sep 21 15:46:27 zi025 webredirect: DEBUG: webredirect.cc:103: fd #5 says "User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4) Gecko/20030827 Galeon/1.3.9" Sep 21 15:46:27 zi025 webredirect: DEBUG: webredirect.cc:103: fd #5 says "Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1" Sep 21 15:46:27 zi025 webredirect: DEBUG: webredirect.cc:103: fd #5 says "Accept-Language: de,en;q=0.5" Sep 21 15:46:27 zi025 webredirect: DEBUG: webredirect.cc:103: fd #5 says "Accept-Encoding: gzip, deflate, compress;q=0.9" Sep 21 15:46:27 zi025 webredirect: DEBUG: webredirect.cc:103: fd #5 says "Accept-Charset: ISO-8859-15,utf-8;q=0.7,*;q=0.7" Sep 21 15:46:27 zi025 webredirect: DEBUG: webredirect.cc:103: fd #5 says "Keep-Alive: 300" Sep 21 15:46:27 zi025 webredirect: DEBUG: webredirect.cc:103: fd #5 says "Connection: keep-alive" Sep 21 15:46:27 zi025 webredirect: DEBUG: webredirect.cc:103: fd #5 says "" Sep 21 15:46:27 zi025 webredirect: DEBUG: webredirect.cc:90: Hang up on 5 Sep 21 15:46:27 zi025 webredirect: DEBUG: webredirect.cc:234: Main loop Sep 21 15:48:46 zi025 webredirect: INFO: Starting webredirect 0.0.0.0.80 to http://thor Sep 21 15:48:46 zi025 webredirect: DEBUG: webredirect.cc:234: Main loop [...] I hope, I provided enough information now, but if you still want to know something, just drop me a note. Regards, Simon