Date: Wed, 10 Jul 2002 14:12:14 -0400 From: Serge Gagnon <gagnon__s@videotron.ca> To: ports@freebsd.org Subject: Port: editors/sam Message-ID: <20020710180819.65F2243E52@mx1.FreeBSD.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020710180819.65F2243E52>