From owner-freebsd-ports Tue Jun 6 9:40: 5 2000 Delivered-To: freebsd-ports@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id B865D37B712 for ; Tue, 6 Jun 2000 09:40:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id JAA18782; Tue, 6 Jun 2000 09:40:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Date: Tue, 6 Jun 2000 09:40:02 -0700 (PDT) Message-Id: <200006061640.JAA18782@freefall.freebsd.org> To: freebsd-ports@FreeBSD.org Cc: From: mi@privatelabs.com Subject: Re: ports/19047: net/arpwatch patched to use tmpfile() instead of mktemp() Reply-To: mi@privatelabs.com Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR ports/19047; it has been noted by GNATS. From: mi@privatelabs.com To: Maxim Sobolev Cc: FreeBSD-gnats-submit@FreeBSD.org, arpwatch@ee.lbl.gov Subject: Re: ports/19047: net/arpwatch patched to use tmpfile() instead of mktemp() Date: Tue, 6 Jun 2000 12:34:37 -0400 (EDT) On 6 Jun, Maxim Sobolev wrote: = Mikhail Teterin wrote: = = > >Synopsis: net/arpwatch patched to use tmpfile() instead of mktemp() = = Why not mkstemp()? According to the tmpfile() man page, this function = may not be portable across platforms. So, probably, you have better = chances that your patches will be accepted by the authors of arpwatch = if you will use mkstemp() instead. Because I need FILE * instead of a file descriptor and because I think the name tmpfile is easier to understand then mkstemp. Also tmpfile will obey TMPDIR environment variable and it does not need the character template. I think, tmpfile is a better choice, although tmpfile(3) disagrees. All of this is hardly a big problem, but I believe the file looks nicer and easier to read this way. As far as the standards go, from tmpfile(3): STANDARDS The tmpfile() and tmpnam() functions conform to ISO 9899: 1990 (``ISO C''). So compatability should not be a problem... Yours, -mi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message