Subject: mkdtemp()?
To: None <>
From: Richard Rauch <>
List: tech-pkg
Date: 01/02/2004 19:57:03
I'm looking at making ...pkgsrc/archivers/arj build on current (and AMD64).
It has a bunch of warnings (some potentially serious, some just nuissances)
and one show-stopping build problem (it needs -fPIC passed to the compiler
for some of the .o files; I'm not sure if the -fPIC is a good idea for other
systems, but on NetBSD/amd64 it just won't build part of the package without
a strategic -fPIC.)

It is now building, though there are some trailing warnings I'm cleaning
up.  One is the replacement of tmpnam() for a directory name with
mkdtemp().  The NetBSD man-page for mkdtemp() says that this function
appeared in NetBSD 1.4.  Is this a non-portable function that should be
bracketed by some kind of #ifdef?  Or is it okay to assume that ~all
modern systems have it, and if someone has a problem, they can #ifdef
it later?

Thanks in advance.

  "I probably don't know what I'm talking about."