Hi

Try this to fix the dirfd thing.

I'll have to look at ssh's vsnprintf.

tmux will require a C99 compiler (or at least, some of the C99 features)
so if you want it to work on Tru64 you'll have to dig out one.

mdocml has the start of a man output mode now so when that is finished
we can use that to convert the manpage.


Index: configure.ac
===================================================================
--- configure.ac        (revision 2590)
+++ configure.ac        (working copy)
@@ -328,6 +328,7 @@
 AC_CHECK_FUNCS(
        [ \
                bzero \
+               dirfd \
                setproctitle \
                sysconf \
        ]
@@ -401,15 +402,6 @@
        AC_MSG_RESULT(no)
 fi
 
-# Look for /proc/$$/fd.
-AC_MSG_CHECKING(for /proc/\$\$/fd)
-if test -d /proc/$$/fd; then
-       AC_DEFINE(HAVE_DIRFD)
-       AC_MSG_RESULT(yes)
-else
-       AC_MSG_RESULT(no)
-fi
-
 # Figure out the platform for osdep-*.c and forkpty-*.c.
 AC_MSG_CHECKING(platform)
 case "$host_os" in


On Wed, Sep 21, 2011 at 08:39:49AM +1000, Peter Jeremy wrote:
> On 2011-Sep-21 01:04:28 +0530, Nicholas Marriott 
> <nicholas.marri...@gmail.com> wrote:
> >Can you do the inline change with an ifdef #define __inline inline?
> 
> That seems to work and would be more portable.
> 
> >Not sure about asprintf, there used to be another version too but I took
> >it out.
> 
> Passing a non-zero buffer length to vsnprintf() would seem to be the
> easiest fix, assuming a standards-compliant vsnprintf() (which isn't
> currently checked by the configure script).  OpenSSH uses a different
> approach to vasprintf() - allocating an initial buffer for vsnprintf()
> and then realloc()ing the buffer if it wasn't large enough.
> 
> OpenSSH and Samba both include [v]snprintf() implementations (which are
> basically identical).
> 
> >closefrom() came from OpenSSH, how does it deal with the dirfd() thing?
> 
> Both OpenSSH & tmux use a HAVE_DIRFD macro but the configure script
> test in tmux is broken - it sets HAVE_DIRFD if /proc/$$/fd exists -
> which is wrong.  I missed this on my initial reading of the code.
> 
> Another issue on Solaris is that the man page is written in mdoc, not
> man, which isn't supported.  My work-around was to format it on
> FreeBSD and install the preformatted page in the relevant cat1
> directory.  I'm not sure what the correct fix is here - re-writing
> the manpage in man seems pointless.
> 
> BTW, I've been looking at building tmux on HP Tru64 using the DEC C
> compiler but gave up because it is missing too many features in
> the code (variadic macros, inlining via a keyword, __func__) - none
> of which were picked up by the cenfigure script.
> 
> -- 
> Peter Jeremy



------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to