From owner-freebsd-bugs Wed May 31 20:20: 7 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 5DD2A37BF8A for ; Wed, 31 May 2000 20:20:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id UAA33189; Wed, 31 May 2000 20:20:00 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from symbion.srrc.usda.gov (symbion.srrc.usda.gov [199.133.86.40]) by hub.freebsd.org (Postfix) with ESMTP id B346337B509 for ; Wed, 31 May 2000 20:17:19 -0700 (PDT) (envelope-from gjohnson@nola.srrc.usda.gov) Received: (from glenn@localhost) by symbion.srrc.usda.gov (8.9.3/8.9.3) id WAA73146; Wed, 31 May 2000 22:17:18 -0500 (CDT) (envelope-from glenn) Message-Id: <200006010317.WAA73146@symbion.srrc.usda.gov> Date: Wed, 31 May 2000 22:17:18 -0500 (CDT) From: Glenn Johnson Reply-To: Glenn Johnson To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: gnu/18930: Fix libg2c mktemp() problem Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 18930 >Category: gnu >Synopsis: Fix mktemp() problem with libg2c >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed May 31 20:20:00 PDT 2000 >Closed-Date: >Last-Modified: >Originator: Glenn Johnson >Release: FreeBSD 4.0-STABLE i386 >Organization: >Environment: FreeBSD 4-STABLE. >Description: libg2c uses mktemp() and tempnam() which causes all Fortran programs linked with it to issue a warning upon linking and of course makes the resulting binaries susceptible to problems of mktemp(). >How-To-Repeat: Compile and link any Fortran program with FreeBSD 4. I do not know if this applies to CURRENT, but I suspect it does. >Fix: Apply the following patch in the /usr/src/contrib/libf2c/libI77 subdirectory. --- rawio.h.orig Wed May 31 18:05:12 2000 +++ rawio.h Wed May 31 18:05:22 2000 @@ -28,7 +28,7 @@ #endif #endif /*KR_HEADERS*/ -extern char *mktemp(char*); +extern char *mkstemp(char*); #ifdef __cplusplus } --- open.c.orig Wed May 31 18:05:30 2000 +++ open.c Wed May 31 18:05:59 2000 @@ -15,7 +15,7 @@ #ifdef KR_headers extern char *malloc(); #ifdef NON_ANSI_STDIO -extern char *mktemp(); +extern char *mkstemp(); #endif extern integer f_clos(); #else @@ -210,7 +210,7 @@ case 'S': b->uscrtch=1; #ifdef HAVE_TEMPNAM /* Allow use of TMPDIR preferentially. */ - s = tempnam (0, buf); + s = mkstemp (buf); if (strlen (s) >= sizeof (buf)) err (a->oerr, 132, "open"); (void) strcpy (buf, s); @@ -220,7 +220,7 @@ tmpnam(buf); #else (void) strcpy(buf,"tmp.FXXXXXX"); - (void) mktemp(buf); + (void) mkstemp(buf); #endif #endif /* ! defined (HAVE_TEMPNAM) */ goto replace; >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message