Update of /cvsroot/tmux/tmux
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv31388

Modified Files:
        Makefile.am configure.ac 
Added Files:
        osdep-hpux.c 
Log Message:
Support for HP-UX.

--- NEW FILE: osdep-hpux.c ---
/* $Id: osdep-hpux.c,v 1.1 2011/01/21 20:35:20 nicm Exp $ */

/*
 * Copyright (c) 2009 Nicholas Marriott <n...@users.sourceforge.net>
 *
 * Permission to use, copy, modify, and distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
 * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */

#include <sys/types.h>

#include <event.h>

#include "tmux.h"

char *
osdep_get_name(unused int fd, unused char *tty)
{
        return (NULL);
}

struct event_base *
osdep_event_init(void)
{
        return (event_init());
}

Index: configure.ac
===================================================================
RCS file: /cvsroot/tmux/tmux/configure.ac,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- configure.ac        10 Jan 2011 22:12:31 -0000      1.12
+++ configure.ac        21 Jan 2011 20:35:20 -0000      1.13
@@ -120,6 +120,47 @@
 # Look for networking libraries.
 AC_SEARCH_LIBS(inet_ntoa, nsl)
 AC_SEARCH_LIBS(socket, socket)
+AC_CHECK_LIB(xnet, socket)
+
+# Check for CMSG_DATA. Some platforms require _XOPEN_SOURCE_EXTENDED (for
+# example see xopen_networking(7) on HP-UX).
+XOPEN_DEFINES=
+AC_MSG_CHECKING(for CMSG_DATA)
+AC_EGREP_CPP(
+       yes,
+       [
+               #include <sys/socket.h>
+               #ifdef CMSG_DATA
+               yes
+               #endif
+       ],
+       found_cmsg_data=yes,
+       found_cmsg_data=no
+)
+AC_MSG_RESULT($found_cmsg_data)
+if test "x$found_cmsg_data" = xno; then
+       AC_MSG_CHECKING(if CMSG_DATA needs _XOPEN_SOURCE_EXTENDED)
+       AC_EGREP_CPP(
+               yes,
+               [
+                       #define _XOPEN_SOURCE 1
+                       #define _XOPEN_SOURCE_EXTENDED 1
+                       #include <sys/socket.h>
+                       #ifdef CMSG_DATA
+                       yes
+                       #endif
+               ],
+               found_cmsg_data=yes,
+               found_cmsg_data=no
+       )
+       AC_MSG_RESULT($found_cmsg_data)
+       if test "x$found_cmsg_data" = xyes; then
+               XOPEN_DEFINES="-D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED"
+       else
+               AC_MSG_ERROR("CMSG_DATA not found")
+       fi
+fi
+AC_SUBST(XOPEN_DEFINES)
 
 # Look for imsg in libutil. compat/imsg.c is linked by Makefile.am if missing.
 AC_SEARCH_LIBS(imsg_init, util, found_imsg_init=yes, found_imsg_init=no)
@@ -355,6 +396,10 @@
                AC_MSG_RESULT(sunos)
                PLATFORM=sunos
                ;;
+       *hpux*)
+               AC_MSG_RESULT(hpux)
+               PLATFORM=hpux
+               ;;
        *)
                AC_MSG_RESULT(unknown)
                PLATFORM=unknown
@@ -368,6 +413,7 @@
 AM_CONDITIONAL(IS_NETBSD, test "x$PLATFORM" = xnetbsd)
 AM_CONDITIONAL(IS_OPENBSD, test "x$PLATFORM" = xopenbsd)
 AM_CONDITIONAL(IS_SUNOS, test "x$PLATFORM" = xsunos)
+AM_CONDITIONAL(IS_HPUX, test "x$PLATFORM" = xhpux)
 AM_CONDITIONAL(IS_UNKNOWN, test "x$PLATFORM" = xunknown)
 
 # autoconf should create a Makefile. A shock!

Index: Makefile.am
===================================================================
RCS file: /cvsroot/tmux/tmux/Makefile.am,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- Makefile.am 7 Jan 2011 15:09:04 -0000       1.8
+++ Makefile.am 21 Jan 2011 20:35:20 -0000      1.9
@@ -12,6 +12,9 @@
        grep "^#found_debug=" configure
        find $(distdir) -name CVS -type d|xargs rm -Rf
 
+# Preprocessor flags.
+CPPFLAGS += @XOPEN_DEFINES@
+
 # glibc as usual does things ass-backwards and hides useful things by default,
 # so everyone has to add this.
 if IS_GLIBC


------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
tmux-cvs mailing list
tmux-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-cvs

Reply via email to