Update to xconsole 1.0.6

This commit is contained in:
matthieu 2013-07-21 13:56:59 +00:00
parent ed83098627
commit d493922f59
10 changed files with 615 additions and 146 deletions

View File

@ -1,3 +1,80 @@
commit f4ba22c10b9b1bd175fa39d25118bf904ba82eec
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Thu Jul 18 21:24:07 2013 -0700
xconsole 1.0.6
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit ba74b1a1dfa5d3411817e0c436b378945c410ec7
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sun Apr 21 14:01:12 2013 -0700
Use fstat() on the fd from open(), instead of stat() on the same pathname
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 73be08929d1d418370ae235e5261e64f72054cbf
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sun Apr 21 13:56:23 2013 -0700
Fix file leak if fdopen() fails
Reported by parfait 1.1:
File Descriptor Leak: Leaked File Descriptor fd
at line 313 of xconsole.c in function 'OpenConsole'.
fd initialized at line 285 with open
fd leaks when fd != -1 at line 287.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 22a09b77093970423e721ebd8004a593d5f88a21
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sun Feb 24 08:14:32 2013 -0800
unifdef -ULynx
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 676edb80c54ac5ace45e641a3dde17751a3ab224
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sun Feb 24 08:13:14 2013 -0800
unifdef -UISC
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 9567b4e2b70552963189ac90a3ff91c351cd482a
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sun Feb 24 08:12:31 2013 -0800
unifdef -Uultrix
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 78492fd74051af9d717ec07503a7173858793528
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sun Feb 24 08:07:47 2013 -0800
config: Add missing AC_CONFIG_SRCDIR
Regroup AC statements under the Autoconf initialization section.
Regroup AM statements under the Automake initialization section.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 2831823f608c1906211d5c55a098f48c8fad1a37
Author: Niclas Zeising <zeising@daemonic.se>
Date: Wed Jan 16 01:30:20 2013 +0100
Fix build on FreeBSD
libutil.h is needed on FreeBSD to get the definition of openpty(), add a
configure check for this include, and include it in xconsole.c if it
exists.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit cc0cf84461cfe2c31ddce34863c6433183e8a55d
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sat Jan 12 16:24:44 2013 -0800

View File

@ -1,4 +1,4 @@
# Makefile.in generated by automake 1.12.5 from Makefile.am.
# Makefile.in generated by automake 1.12.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2012 Free Software Foundation, Inc.
@ -80,7 +80,7 @@ subdir = .
DIST_COMMON = README $(am__configure_deps) $(dist_appdefault_DATA) \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/config.h.in $(top_srcdir)/configure AUTHORS COPYING \
ChangeLog INSTALL NEWS config.guess config.sub depcomp \
ChangeLog INSTALL NEWS compile config.guess config.sub depcomp \
install-sh missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
@ -283,6 +283,8 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@

View File

@ -1,4 +1,4 @@
# generated automatically by aclocal 1.12.5 -*- Autoconf -*-
# generated automatically by aclocal 1.12.6 -*- Autoconf -*-
# Copyright (C) 1996-2012 Free Software Foundation, Inc.
@ -20,6 +20,7 @@ If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
# serial 1 (pkg-config-0.24)
#
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
#
@ -46,8 +47,12 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.])
# ----------------------------------
AC_DEFUN([PKG_PROG_PKG_CONFIG],
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
fi
@ -60,7 +65,6 @@ if test -n "$PKG_CONFIG"; then
AC_MSG_RESULT([no])
PKG_CONFIG=""
fi
fi[]dnl
])# PKG_PROG_PKG_CONFIG
@ -69,34 +73,32 @@ fi[]dnl
# Check to see whether a particular set of modules exists. Similar
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
#
#
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
# this or PKG_CHECK_MODULES is called, or make sure to call
# PKG_CHECK_EXISTS manually
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
# only at the first occurence in configure.ac, so if the first place
# it's called might be skipped (such as if it is within an "if", you
# have to call PKG_CHECK_EXISTS manually
# --------------------------------------------------------------
AC_DEFUN([PKG_CHECK_EXISTS],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
if test -n "$PKG_CONFIG" && \
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
m4_ifval([$2], [$2], [:])
m4_default([$2], [:])
m4_ifvaln([$3], [else
$3])dnl
fi])
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
# ---------------------------------------------
m4_define([_PKG_CONFIG],
[if test -n "$PKG_CONFIG"; then
if test -n "$$1"; then
pkg_cv_[]$1="$$1"
else
PKG_CHECK_EXISTS([$3],
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
[pkg_failed=yes])
fi
else
pkg_failed=untried
[if test -n "$$1"; then
pkg_cv_[]$1="$$1"
elif test -n "$PKG_CONFIG"; then
PKG_CHECK_EXISTS([$3],
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes ],
[pkg_failed=yes])
else
pkg_failed=untried
fi[]dnl
])# _PKG_CONFIG
@ -138,16 +140,17 @@ and $1[]_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.])
if test $pkg_failed = yes; then
AC_MSG_RESULT([no])
_PKG_SHORT_ERRORS_SUPPORTED
if test $_pkg_short_errors_supported = yes; then
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
else
$1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
ifelse([$4], , [AC_MSG_ERROR(dnl
m4_default([$4], [AC_MSG_ERROR(
[Package requirements ($2) were not met:
$$1_PKG_ERRORS
@ -155,28 +158,67 @@ $$1_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
_PKG_TEXT
])],
[AC_MSG_RESULT([no])
$4])
_PKG_TEXT])[]dnl
])
elif test $pkg_failed = untried; then
ifelse([$4], , [AC_MSG_FAILURE(dnl
AC_MSG_RESULT([no])
m4_default([$4], [AC_MSG_FAILURE(
[The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
_PKG_TEXT
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
[$4])
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
])
else
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
AC_MSG_RESULT([yes])
ifelse([$3], , :, [$3])
$3
fi[]dnl
])# PKG_CHECK_MODULES
# PKG_INSTALLDIR(DIRECTORY)
# -------------------------
# Substitutes the variable pkgconfigdir as the location where a module
# should install pkg-config .pc files. By default the directory is
# $libdir/pkgconfig, but the default can be changed by passing
# DIRECTORY. The user can override through the --with-pkgconfigdir
# parameter.
AC_DEFUN([PKG_INSTALLDIR],
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
m4_pushdef([pkg_description],
[pkg-config installation directory @<:@]pkg_default[@:>@])
AC_ARG_WITH([pkgconfigdir],
[AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
[with_pkgconfigdir=]pkg_default)
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
m4_popdef([pkg_default])
m4_popdef([pkg_description])
]) dnl PKG_INSTALLDIR
# PKG_NOARCH_INSTALLDIR(DIRECTORY)
# -------------------------
# Substitutes the variable noarch_pkgconfigdir as the location where a
# module should install arch-independent pkg-config .pc files. By
# default the directory is $datadir/pkgconfig, but the default can be
# changed by passing DIRECTORY. The user can override through the
# --with-noarch-pkgconfigdir parameter.
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
m4_pushdef([pkg_description],
[pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
AC_ARG_WITH([noarch-pkgconfigdir],
[AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
[with_noarch_pkgconfigdir=]pkg_default)
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
m4_popdef([pkg_default])
m4_popdef([pkg_description])
]) dnl PKG_NOARCH_INSTALLDIR
# Copyright (C) 2002-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
@ -192,7 +234,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.12'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
m4_if([$1], [1.12.5], [],
m4_if([$1], [1.12.6], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@ -208,7 +250,7 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.12.5])dnl
[AM_AUTOMAKE_VERSION([1.12.6])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
@ -1237,7 +1279,7 @@ dnl DEALINGS IN THE SOFTWARE.
# See the "minimum version" comment for each macro you use to see what
# version you require.
m4_defun([XORG_MACROS_VERSION],[
m4_define([vers_have], [1.17])
m4_define([vers_have], [1.16.2])
m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
m4_if(m4_cmp(maj_have, maj_needed), 0,,

347
app/xconsole/compile Normal file
View File

@ -0,0 +1,347 @@
#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.
scriptversion=2012-10-14.11; # UTC
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
nl='
'
# We need space, tab and new line, in precisely that order. Quoting is
# there to prevent tools from complaining about whitespace usage.
IFS=" "" $nl"
file_conv=
# func_file_conv build_file lazy
# Convert a $build file to $host form and store it in $file
# Currently only supports Windows hosts. If the determined conversion
# type is listed in (the comma separated) LAZY, no conversion will
# take place.
func_file_conv ()
{
file=$1
case $file in
/ | /[!/]*) # absolute file, and not a UNC file
if test -z "$file_conv"; then
# lazily determine how to convert abs files
case `uname -s` in
MINGW*)
file_conv=mingw
;;
CYGWIN*)
file_conv=cygwin
;;
*)
file_conv=wine
;;
esac
fi
case $file_conv/,$2, in
*,$file_conv,*)
;;
mingw/*)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
cygwin/*)
file=`cygpath -m "$file" || echo "$file"`
;;
wine/*)
file=`winepath -w "$file" || echo "$file"`
;;
esac
;;
esac
}
# func_cl_dashL linkdir
# Make cl look for libraries in LINKDIR
func_cl_dashL ()
{
func_file_conv "$1"
if test -z "$lib_path"; then
lib_path=$file
else
lib_path="$lib_path;$file"
fi
linker_opts="$linker_opts -LIBPATH:$file"
}
# func_cl_dashl library
# Do a library search-path lookup for cl
func_cl_dashl ()
{
lib=$1
found=no
save_IFS=$IFS
IFS=';'
for dir in $lib_path $LIB
do
IFS=$save_IFS
if $shared && test -f "$dir/$lib.dll.lib"; then
found=yes
lib=$dir/$lib.dll.lib
break
fi
if test -f "$dir/$lib.lib"; then
found=yes
lib=$dir/$lib.lib
break
fi
if test -f "$dir/lib$lib.a"; then
found=yes
lib=$dir/lib$lib.a
break
fi
done
IFS=$save_IFS
if test "$found" != yes; then
lib=$lib.lib
fi
}
# func_cl_wrapper cl arg...
# Adjust compile command to suit cl
func_cl_wrapper ()
{
# Assume a capable shell
lib_path=
shared=:
linker_opts=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
eat=1
case $2 in
*.o | *.[oO][bB][jJ])
func_file_conv "$2"
set x "$@" -Fo"$file"
shift
;;
*)
func_file_conv "$2"
set x "$@" -Fe"$file"
shift
;;
esac
;;
-I)
eat=1
func_file_conv "$2" mingw
set x "$@" -I"$file"
shift
;;
-I*)
func_file_conv "${1#-I}" mingw
set x "$@" -I"$file"
shift
;;
-l)
eat=1
func_cl_dashl "$2"
set x "$@" "$lib"
shift
;;
-l*)
func_cl_dashl "${1#-l}"
set x "$@" "$lib"
shift
;;
-L)
eat=1
func_cl_dashL "$2"
;;
-L*)
func_cl_dashL "${1#-L}"
;;
-static)
shared=false
;;
-Wl,*)
arg=${1#-Wl,}
save_ifs="$IFS"; IFS=','
for flag in $arg; do
IFS="$save_ifs"
linker_opts="$linker_opts $flag"
done
IFS="$save_ifs"
;;
-Xlinker)
eat=1
linker_opts="$linker_opts $2"
;;
-*)
set x "$@" "$1"
shift
;;
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
func_file_conv "$1"
set x "$@" -Tp"$file"
shift
;;
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
func_file_conv "$1" mingw
set x "$@" "$file"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -n "$linker_opts"; then
linker_opts="-link$linker_opts"
fi
exec "$@" $linker_opts
exit 1
}
eat=
case $1 in
'')
echo "$0: No command. Try '$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: compile [--help] [--version] PROGRAM [ARGS]
Wrapper for compilers which do not understand '-c -o'.
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
arguments, and rename the output as expected.
If you are trying to build a whole package this is not the
right script to run: please start by reading the file 'INSTALL'.
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "compile $scriptversion"
exit $?
;;
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
func_cl_wrapper "$@" # Doesn't return...
;;
esac
ofile=
cfile=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
# So we strip '-o arg' only if arg is an object.
eat=1
case $2 in
*.o | *.obj)
ofile=$2
;;
*)
set x "$@" -o "$2"
shift
;;
esac
;;
*.c)
cfile=$1
set x "$@" "$1"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -z "$ofile" || test -z "$cfile"; then
# If no '-o' option was seen then we might have been invoked from a
# pattern rule where we don't need one. That is ok -- this is a
# normal compilation that the losing compiler can handle. If no
# '.c' file was seen then we are probably linking. That is also
# ok.
exec "$@"
fi
# Name of file we expect compiler to create.
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
# Create the lock directory.
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
while true; do
if mkdir "$lockdir" >/dev/null 2>&1; then
break
fi
sleep 1
done
# FIXME: race condition here if user kills between mkdir and trap.
trap "rmdir '$lockdir'; exit 1" 1 2 15
# Run the compile.
"$@"
ret=$?
if test -f "$cofile"; then
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
elif test -f "${cofile}bj"; then
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
fi
rmdir "$lockdir"
exit $ret
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:

View File

@ -15,6 +15,9 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <libutil.h> header file. */
#undef HAVE_LIBUTIL_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H

View File

@ -4,7 +4,7 @@
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011, 2012 Free Software Foundation, Inc.
timestamp='2012-10-10'
timestamp='2012-12-06'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@ -1026,7 +1026,11 @@ case $basic_machine in
basic_machine=i586-unknown
os=-pw32
;;
rdos)
rdos | rdos64)
basic_machine=x86_64-pc
os=-rdos
;;
rdos32)
basic_machine=i386-pc
os=-rdos
;;

137
app/xconsole/configure vendored
View File

@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for xconsole 1.0.5.
# Generated by GNU Autoconf 2.69 for xconsole 1.0.6.
#
# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
#
@ -581,11 +581,12 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='xconsole'
PACKAGE_TARNAME='xconsole'
PACKAGE_VERSION='1.0.5'
PACKAGE_STRING='xconsole 1.0.5'
PACKAGE_VERSION='1.0.6'
PACKAGE_STRING='xconsole 1.0.6'
PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
PACKAGE_URL=''
ac_unique_file="Makefile.am"
# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
@ -662,6 +663,8 @@ build_vendor
build_cpu
build
INSTALL_CMD
PKG_CONFIG_LIBDIR
PKG_CONFIG_PATH
PKG_CONFIG
CHANGELOG_CMD
STRICT_CFLAGS
@ -773,6 +776,8 @@ LIBS
CPPFLAGS
CPP
PKG_CONFIG
PKG_CONFIG_PATH
PKG_CONFIG_LIBDIR
XCONSOLE_CFLAGS
XCONSOLE_LIBS
APPDEFS_CFLAGS
@ -1317,7 +1322,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures xconsole 1.0.5 to adapt to many kinds of systems.
\`configure' configures xconsole 1.0.6 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1387,7 +1392,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of xconsole 1.0.5:";;
short | recursive ) echo "Configuration of xconsole 1.0.6:";;
esac
cat <<\_ACEOF
@ -1431,6 +1436,10 @@ Some influential environment variables:
you have headers in a nonstandard directory <include dir>
CPP C preprocessor
PKG_CONFIG path to pkg-config utility
PKG_CONFIG_PATH
directories to add to pkg-config's search path
PKG_CONFIG_LIBDIR
path overriding pkg-config's built-in search path
XCONSOLE_CFLAGS
C compiler flags for XCONSOLE, overriding pkg-config
XCONSOLE_LIBS
@ -1506,7 +1515,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
xconsole configure 1.0.5
xconsole configure 1.0.6
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@ -1921,7 +1930,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by xconsole $as_me 1.0.5, which was
It was created by xconsole $as_me 1.0.6, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@ -2269,6 +2278,11 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_config_headers="$ac_config_headers config.h"
# Initialize Automake
am__api_version='1.12'
ac_aux_dir=
@ -2745,7 +2759,7 @@ fi
# Define the identity of the package.
PACKAGE='xconsole'
VERSION='1.0.5'
VERSION='1.0.6'
cat >>confdefs.h <<_ACEOF
@ -4410,6 +4424,11 @@ fi
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
@ -4522,7 +4541,6 @@ $as_echo "yes" >&6; }
$as_echo "no" >&6; }
PKG_CONFIG=""
fi
fi
# Make sure we can run config.sub.
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
@ -10481,55 +10499,52 @@ AM_BACKSLASH='\'
ac_config_headers="$ac_config_headers config.h"
# Checks for pkg-config packages
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XCONSOLE" >&5
$as_echo_n "checking for XCONSOLE... " >&6; }
if test -n "$PKG_CONFIG"; then
if test -n "$XCONSOLE_CFLAGS"; then
pkg_cv_XCONSOLE_CFLAGS="$XCONSOLE_CFLAGS"
else
if test -n "$PKG_CONFIG" && \
if test -n "$XCONSOLE_CFLAGS"; then
pkg_cv_XCONSOLE_CFLAGS="$XCONSOLE_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xaw7 xmu xt >= 1.0 x11 xproto >= 7.0.17\""; } >&5
($PKG_CONFIG --exists --print-errors "xaw7 xmu xt >= 1.0 x11 xproto >= 7.0.17") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_XCONSOLE_CFLAGS=`$PKG_CONFIG --cflags "xaw7 xmu xt >= 1.0 x11 xproto >= 7.0.17" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
fi
else
pkg_failed=untried
else
pkg_failed=untried
fi
if test -n "$PKG_CONFIG"; then
if test -n "$XCONSOLE_LIBS"; then
pkg_cv_XCONSOLE_LIBS="$XCONSOLE_LIBS"
else
if test -n "$PKG_CONFIG" && \
if test -n "$XCONSOLE_LIBS"; then
pkg_cv_XCONSOLE_LIBS="$XCONSOLE_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xaw7 xmu xt >= 1.0 x11 xproto >= 7.0.17\""; } >&5
($PKG_CONFIG --exists --print-errors "xaw7 xmu xt >= 1.0 x11 xproto >= 7.0.17") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_XCONSOLE_LIBS=`$PKG_CONFIG --libs "xaw7 xmu xt >= 1.0 x11 xproto >= 7.0.17" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
fi
else
pkg_failed=untried
else
pkg_failed=untried
fi
if test $pkg_failed = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
@ -10537,9 +10552,9 @@ else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
XCONSOLE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xaw7 xmu xt >= 1.0 x11 xproto >= 7.0.17"`
XCONSOLE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "xaw7 xmu xt >= 1.0 x11 xproto >= 7.0.17" 2>&1`
else
XCONSOLE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xaw7 xmu xt >= 1.0 x11 xproto >= 7.0.17"`
XCONSOLE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "xaw7 xmu xt >= 1.0 x11 xproto >= 7.0.17" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$XCONSOLE_PKG_ERRORS" >&5
@ -10553,9 +10568,10 @@ installed software in a non-standard prefix.
Alternatively, you may set the environment variables XCONSOLE_CFLAGS
and XCONSOLE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
" "$LINENO" 5
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
@ -10566,14 +10582,14 @@ Alternatively, you may set the environment variables XCONSOLE_CFLAGS
and XCONSOLE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See \`config.log' for more details" "$LINENO" 5; }
else
XCONSOLE_CFLAGS=$pkg_cv_XCONSOLE_CFLAGS
XCONSOLE_LIBS=$pkg_cv_XCONSOLE_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
:
fi
@ -10581,46 +10597,46 @@ pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for APPDEFS" >&5
$as_echo_n "checking for APPDEFS... " >&6; }
if test -n "$PKG_CONFIG"; then
if test -n "$APPDEFS_CFLAGS"; then
pkg_cv_APPDEFS_CFLAGS="$APPDEFS_CFLAGS"
else
if test -n "$PKG_CONFIG" && \
if test -n "$APPDEFS_CFLAGS"; then
pkg_cv_APPDEFS_CFLAGS="$APPDEFS_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xt\""; } >&5
($PKG_CONFIG --exists --print-errors "xt") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_APPDEFS_CFLAGS=`$PKG_CONFIG --cflags "xt" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
fi
else
pkg_failed=untried
else
pkg_failed=untried
fi
if test -n "$PKG_CONFIG"; then
if test -n "$APPDEFS_LIBS"; then
pkg_cv_APPDEFS_LIBS="$APPDEFS_LIBS"
else
if test -n "$PKG_CONFIG" && \
if test -n "$APPDEFS_LIBS"; then
pkg_cv_APPDEFS_LIBS="$APPDEFS_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xt\""; } >&5
($PKG_CONFIG --exists --print-errors "xt") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_APPDEFS_LIBS=`$PKG_CONFIG --libs "xt" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
fi
else
pkg_failed=untried
else
pkg_failed=untried
fi
if test $pkg_failed = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
@ -10628,9 +10644,9 @@ else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
APPDEFS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xt"`
APPDEFS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "xt" 2>&1`
else
APPDEFS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xt"`
APPDEFS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "xt" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$APPDEFS_PKG_ERRORS" >&5
@ -10644,9 +10660,10 @@ installed software in a non-standard prefix.
Alternatively, you may set the environment variables APPDEFS_CFLAGS
and APPDEFS_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
" "$LINENO" 5
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
@ -10657,14 +10674,14 @@ Alternatively, you may set the environment variables APPDEFS_CFLAGS
and APPDEFS_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See \`config.log' for more details" "$LINENO" 5; }
else
APPDEFS_CFLAGS=$pkg_cv_APPDEFS_CFLAGS
APPDEFS_LIBS=$pkg_cv_APPDEFS_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
:
fi
xt_appdefaultdir=`$PKG_CONFIG --variable=appdefaultdir xt`
@ -10742,7 +10759,7 @@ if test "x$HAS_OPENPTY" = "xyes" ; then
$as_echo "#define HAS_OPENPTY 1" >>confdefs.h
for ac_header in util.h pty.h
for ac_header in util.h libutil.h pty.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@ -11494,7 +11511,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by xconsole $as_me 1.0.5, which was
This file was extended by xconsole $as_me 1.0.6, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -11560,7 +11577,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
xconsole config.status 1.0.5
xconsole config.status 1.0.6
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
@ -11689,8 +11706,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
for ac_config_target in $ac_config_targets
do
case $ac_config_target in
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
"config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;

View File

@ -21,11 +21,16 @@ dnl PERFORMANCE OF THIS SOFTWARE.
dnl
dnl Process this file with autoconf to create configure.
# Initialize Autoconf
AC_PREREQ([2.60])
AC_INIT([xconsole],
[1.0.5],
[1.0.6],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
[xconsole])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([config.h])
# Initialize Automake
AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE
@ -35,8 +40,6 @@ m4_ifndef([XORG_MACROS_VERSION],
XORG_MACROS_VERSION(1.8)
XORG_DEFAULT_OPTIONS
AC_CONFIG_HEADERS([config.h])
# Checks for pkg-config packages
PKG_CHECK_MODULES(XCONSOLE, xaw7 xmu xt >= 1.0 x11 xproto >= 7.0.17)
@ -53,7 +56,7 @@ AC_CHECK_FUNC(openpty, [HAS_OPENPTY="yes"])
if test "x$HAS_OPENPTY" = "xyes" ; then
AC_DEFINE([HAS_OPENPTY], 1,
[Define to 1 if you have the 'openpty' function.])
AC_CHECK_HEADERS([util.h pty.h], [break])
AC_CHECK_HEADERS([util.h libutil.h pty.h], [break])
fi
# Privilege separation when running as root

View File

@ -1,4 +1,4 @@
# Makefile.in generated by automake 1.12.5 from Makefile.am.
# Makefile.in generated by automake 1.12.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2012 Free Software Foundation, Inc.
@ -171,6 +171,8 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@

View File

@ -69,6 +69,9 @@ extern char *_XawTextGetSTRING(TextWidget ctx, XawTextPosition left,
# ifdef HAVE_UTIL_H
# include <util.h>
# endif
# ifdef HAVE_LIBUTIL_H
# include <libutil.h>
# endif
# ifdef HAVE_PTY_H
# include <pty.h>
# endif
@ -81,11 +84,6 @@ extern int priv_openpty(int *, int *);
extern int priv_set_console(int);
#endif
/* Fix ISC brain damage. When using gcc fdopen isn't declared in <stdio.h>. */
#if defined(ISC) && __STDC__ && !defined(ISC30)
extern FILE *fdopen(int, char const *);
#endif
static void inputReady(XtPointer w, int *source, XtInputId *id);
static long TextLength(Widget w);
static void TextReplace(Widget w, int start, int end, XawTextBlock *block);
@ -152,11 +150,6 @@ static XrmOptionDescRec options[] = {
{"-saveLines", "*saveLines", XrmoptionSepArg, NULL},
};
#ifdef ultrix
#define USE_FILE
#define FILE_NAME "/dev/xcons"
#endif
#ifdef linux
#define USE_FILE
@ -189,7 +182,7 @@ static XrmOptionDescRec options[] = {
# include <sys/strredir.h>
# endif
# endif
# if defined(TIOCCONS) || defined(SRIOCSREDIR) || defined(Lynx)
# if defined(TIOCCONS) || defined(SRIOCSREDIR)
# define USE_PTY
static int tty_fd, pty_fd;
static char ttydev[64], ptydev[64];
@ -231,16 +224,6 @@ static int child_pid;
#endif /* !__hpux */
#endif /* !PTYCHAR2 */
#ifdef Lynx
static void
RestoreConsole(void)
{
int fd;
if ((fd = open("/dev/con", O_RDONLY)) >= 0)
newconsole(fd);
}
#endif
static void
OpenConsole(void)
{
@ -250,7 +233,7 @@ OpenConsole(void)
if (!strcmp (app_resources.file, "console"))
{
/* must be owner and have read/write permission */
#if !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(Lynx)
#if !defined(__NetBSD__) && !defined(__OpenBSD__)
struct stat sbuf;
# if !defined (linux)
if (!stat("/dev/console", &sbuf) &&
@ -279,7 +262,6 @@ OpenConsole(void)
input = fdopen (pty_fd, "r");
# endif
# else
# ifndef Lynx
int consfd = open("/dev/console", O_RDONLY);
if (consfd >= 0)
{
@ -287,15 +269,6 @@ OpenConsole(void)
input = fdopen (pty_fd, "r");
close(consfd);
}
# else
if (newconsole(tty_fd) < 0)
perror("newconsole");
else
{
input = fdopen (pty_fd, "r");
atexit(RestoreConsole);
}
# endif
# endif
}
#endif /* USE_PTY */
@ -316,20 +289,23 @@ OpenConsole(void)
}
else
{
struct stat sbuf;
regularFile = FALSE;
if (access(app_resources.file, R_OK) == 0)
{
int fd = open (app_resources.file,
O_RDONLY | O_NONBLOCK | O_NOCTTY);
if (fd != -1)
if (fd != -1) {
input = fdopen (fd, "r");
if (input)
if (!stat(app_resources.file, &sbuf) &&
S_ISREG( sbuf.st_mode ) )
regularFile = TRUE;
if (input) {
struct stat sbuf;
if ((fstat(fd, &sbuf) == 0) && S_ISREG(sbuf.st_mode))
regularFile = TRUE;
}
else
close(fd);
}
}
}
if (!input)
@ -947,10 +923,6 @@ get_pty(int *pty, int *tty, char *ttydev, char *ptydev)
#endif
#endif
#ifdef ISC
#define NO_READAHEAD
#endif
static FILE *
osm_pipe(void)
{