From owner-freebsd-ports Wed Jul 10 11: 8:23 2002 Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 22AE737B400 for ; Wed, 10 Jul 2002 11:08:20 -0700 (PDT) Received: from relais.videotron.ca (relais.videotron.ca [24.201.245.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 65F2243E52 for ; Wed, 10 Jul 2002 11:08:19 -0700 (PDT) (envelope-from gagnon__s@videotron.ca) Received: from there ([66.130.176.194]) by relais.videotron.ca (Videotron-Netscape Messaging Server v4.15 MTA-PRD3) with SMTP id GZ1P1V01.0VD for ; Wed, 10 Jul 2002 14:08:19 -0400 Content-Type: text/plain; charset="iso-8859-1" From: Serge Gagnon To: ports@freebsd.org Subject: Port: editors/sam Date: Wed, 10 Jul 2002 14:12:14 -0400 X-Mailer: KMail [version 1.3.2] MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <20020710180819.65F2243E52@mx1.FreeBSD.org> Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org I got an error when I tried to start this editor : sam: panic: can't create buffer file Abort (core dumped) I searched a bit in the source of sam and find that : *** sam/unix.c Sun Jul 7 04:42:22 2002 --- unix.c Sun Jul 7 04:38:47 2002 *************** *** 148,163 **** newtmp(int i) { ! char *s; ! FILE *f; ! extern char *tempnam(const char*, const char*); ! ! s = tempnam(TMPDIR, "sam."); ! if (!s) ! return -1; ! f = fopen(s, "w+"); ! if (!f) ! return -1; ! unlink(s); ! return fileno(f); } --- 148,156 ---- newtmp(int i) { ! FILE *f; ! f = tmpfile(); ! if (f == 0) ! return -1; ! return fileno(f); } can fix it, but it is just a suggestion. It is to be tested on another box and to be revised by someone who really knows C programming on FreeBSD. I found these lines just above the originals and they were commented by the author. -- Serge Gagnon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message