From owner-freebsd-ports@FreeBSD.ORG Fri Apr 25 15:47:35 2014 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EC7CD8DF for ; Fri, 25 Apr 2014 15:47:35 +0000 (UTC) Received: from forward7l.mail.yandex.net (forward7l.mail.yandex.net [IPv6:2a02:6b8:0:1819::7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Certum Level IV CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A79BB13B5 for ; Fri, 25 Apr 2014 15:47:35 +0000 (UTC) Received: from smtp3h.mail.yandex.net (smtp3h.mail.yandex.net [84.201.186.20]) by forward7l.mail.yandex.net (Yandex) with ESMTP id 12FA4BC0F54; Fri, 25 Apr 2014 19:47:32 +0400 (MSK) Received: from smtp3h.mail.yandex.net (localhost [127.0.0.1]) by smtp3h.mail.yandex.net (Yandex) with ESMTP id 87EA31B43833; Fri, 25 Apr 2014 19:47:32 +0400 (MSK) Received: from 78.108.203.86.tel.ru (78.108.203.86.tel.ru [78.108.203.86]) by smtp3h.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id W0QxydeHL3-lW1ScRWI; Fri, 25 Apr 2014 19:47:32 +0400 (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client certificate not present) X-Yandex-Uniq: 5a887fc2-531b-4fb1-9fdf-2023334cb724 Message-ID: <535A8394.4060507@passap.ru> Date: Fri, 25 Apr 2014 19:47:32 +0400 From: Boris Samorodov Organization: =?UTF-8?B?0JfQkNCeICLQktCQ0KDQoiI=?= User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: Stefan Bethke , Robert Backhaus Subject: Re: foomatic-rip and foo2zjs References: <338BD4B8-F25A-4CC5-A5FA-451C48BB5A5C@lassitu.de> <535A4E09.5000006@passap.ru> In-Reply-To: X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Freebsd_mailinglist_PORTS X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Apr 2014 15:47:36 -0000 25.04.2014 19:35, Stefan Bethke пишет: > Am 25.04.2014 um 15:20 schrieb Robert Backhaus : > >> Anyway, here's a backtrace: - but the pointed line, 1200, just looks wrong - >> >> int fd = mkstemp (LOG_FILE "-XXXXXX.log"); - checked, edited, built - Yup, that's it. Here's the patch: >> >> --- foomaticrip.c.orig 2014-04-25 23:16:06.000000000 +1000 >> +++ foomaticrip.c 2014-04-25 23:16:47.000000000 +1000 >> @@ -1197,7 +1197,7 @@ >> debug = 1; >> >> if (debug) { >> - int fd = mkstemp (LOG_FILE "-XXXXXX.log"); >> + int fd = mkstemp ("LOG_FILE-XXXXXX.log"); >> if (fd != -1) >> logh = fdopen(fd, "w"); >> else > > Sorry, that patch does’t look right to me. LOG_FILE should be a define that get’s concatenated with the string literal. Since this is compile-time, I don’t see how this would lead to a runtime error, unless LOG_FILE was defined to some unusual value. You are right, the definition is at foomaticrip.h: ----- /* This is the location of the debug logfile (and also the copy of the * processed PostScript data) in case you have enabled debugging above. * The logfile will get the extension ".log", the PostScript data ".ps". */ #ifndef LOG_FILE #define LOG_FILE "/tmp/foomatic-rip" #endif ----- Hm, was LOG_FILE defined earlier? -- WBR, Boris Samorodov (bsam) FreeBSD Committer, http://www.FreeBSD.org The Power To Serve