According to [EMAIL PROTECTED]:
> Thanks for your help.  I will try out the steps that you suggest.
> Yes I meant SunOs 5.5 aka Solaris 2.5.
> Actually the last time this came up was probably me.  I never found
> the solution to my issue but I really need to get this thing working soon.
> What does the code do if HAVE_MKSTEMP comes back negative?  Does it use
> an alternative mechanism?

Yes, if HAVE_MKSTEMP is undefined, it will use an alternate method
of generating a temporary file name using only the process ID as
the unique identifier in it.  This is less secure than mkstemp(),
but much better than what the "xmkstemp" replacement code in
http://mail.gnu.org/archive/html/bug-groff/2001-06/msg00077.html
appears to be doing, which is using a static file name.

As the compiler is complaining that mkstemp is used, but not declared,
it's pretty safe to assume that HAVE_MKSTEMP is defined on your system,
and therefore mkstemp() is in the C library.  The trick is to find
where it's declared, and make ExternalParser.cc include that file.

Alternatively, I guess you could manually undefine HAVE_MKSTEMP in
include/htconfig.h, and compile without the mkstemp() function.  The lack
of security in having predictable temporary file names may not be an
issue if this isn't a system used by "untrusted" users, or if you run
htdig with TMPDIR set to a directory to which only you have write access.

> Anyway, I'll check tonight when I have access and send a reply to the list.
> 
> Thanks again.
> Mike

Sounds good.

> --------------------------------------------------------
> Gilles Detillieux <[EMAIL PROTECTED]> wrote:
> >According to [EMAIL PROTECTED]:
> >> I am trying to compile htdig 3.1.6 on Solaris 5.5 and it is failing with:
> >> 
> >>   ExternalParser.cc:188: `mkstemp' undeclared (first use this function)
> >> 
> >> I believe my problem is similar to that reported at gnu.org
> >> (http://mail.gnu.org/archive/html/bug-groff/2001-06/msg00074.html).
> >> The problem being that mkstemp is not present on some systems.
> >> 
> >> Can somebody help me make the necessary changes to the code to get
> >> around this problem?  I believe something along the lines of what was
> >> done on this other project is probably what's required:
> >> http://mail.gnu.org/archive/html/bug-groff/2001-06/msg00077.html
> >
> >The "solution" proposed in that last message doesn't seem very wise to me.
> >The 3.1.6 configure script does check if your C library has mkstemp or
> >not, and sets HAVE_MKSTEMP accordingly, so I don't think it's a case
> >of your system not having the function.  It seems more a case of it not
> >being declared in any of the standard headers that htdig/ExternalParser.cc
> >includes.
> >
> >By Solaris 5.5, do you mean Solaris 2.5 (a.k.a. SunOS 5.5)?  I only
> >have access to Solaris 8 & 9 at our University, and on both of those,
> >mkstemp() is declared in stdlib.h, which htdig/ExternalParser.cc includes.
> >At least, it seems to be declared there, but with all the #ifdef's
> >it's hard to tell which declaration, if any will apply for an ht://Dig
> >compilation.
> >
> >I've never built ht://Dig on Solaris myself (never had the need to),
> >so I don't know how much help I can provide.  But for starters, I'd
> >suggest grepping for mkstemp in /usr/include/*.h to see where it's
> >declared, if at all, and doing a uname -r to see which SunOS version
> >you're running.  The whole issue of SunOS vs. Solaris version numbering
> >is rather confusing, but if I recall, SunOS 5.0 and up are Solaris 2.0
> >and up, and if you're above Solaris 2.6 (SunOS 5.6), then you just drop
> >the "2." (or "5.") part and use just 7, 8 or 9.
> >
> >Any other Solaris users out there able to lend a hand with this mkstemp
> >problem?  I don't know which Solaris versions have this problem, but it's
> >not the first time this has come up.

-- 
Gilles R. Detillieux              E-mail: <[EMAIL PROTECTED]>
Spinal Cord Research Centre       WWW:    http://www.scrc.umanitoba.ca/
Dept. Physiology, U. of Manitoba  Winnipeg, MB  R3E 3J7  (Canada)


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
ht://Dig general mailing list: <[EMAIL PROTECTED]>
ht://Dig FAQ: http://htdig.sourceforge.net/FAQ.html
List information (subscribe/unsubscribe, etc.)
https://lists.sourceforge.net/lists/listinfo/htdig-general

Reply via email to