* 'port-osx' of https://github.com/rudimeier/util-linux:
  include: fix sys/sysinfo.h
  libblkid: don't include endian.h
  lib: fix ismounted includes for FreeBSD
  lib: remove unused variable
  lsns: use xcalloc()
  include: remove unused mntent.h
  include: check for sys/sysmacros.h
  lib: define LOGIN_NAME_MAX fallback
  include: provide MAP_ANONYMOUS on OSX
  lib: rename strmode() and setmode()
  tests: fix ts_option helpers
  build-sys: fix [g]libtoolize version for OSX
  build-sys: check linker support for version scripts
  build-sys: portable usage of find command
  travis: minor cleanup
This commit is contained in:
Karel Zak 2016-02-19 11:30:53 +01:00
commit 45c9a3d27f
36 changed files with 242 additions and 62 deletions

View File

@ -11,23 +11,14 @@ if [ ! -f "configure.ac" ]; then
return 1 || exit 1
fi
# some config settings
MAKE="make -j4"
## some config settings
# travis docs say we get 1.5 CPUs
MAKE="make -j2"
DUMP_CONFIG_LOG="short"
# We could test (exotic) out-of-tree build dirs using relative or abs paths.
# After sourcing this script we are living in build dir. Tasks for source dir
# have to use $SOURCE_DIR.
SOURCE_DIR="."
BUILD_DIR="."
CONFIGURE="$SOURCE_DIR/configure"
mkdir -p "$BUILD_DIR"
cd "$BUILD_DIR" || return 1 || exit 1
function configure_travis
function xconfigure
{
"$CONFIGURE" "$@"
./configure "$@"
err=$?
if [ "$DUMP_CONFIG_LOG" = "short" ]; then
grep -B1 -A10000 "^## Output variables" config.log | grep -v "_FALSE="
@ -41,7 +32,7 @@ function check_nonroot
{
local opts="$MAKE_CHECK_OPTS"
configure_travis \
xconfigure \
--disable-use-tty-group \
--with-python \
--enable-all-programs \
@ -56,7 +47,7 @@ function check_root
{
local opts="$MAKE_CHECK_OPTS --parallel=1"
configure_travis \
xconfigure \
--with-python \
--enable-all-programs \
|| return
@ -68,7 +59,7 @@ function check_root
function check_dist
{
configure_travis \
xconfigure \
|| return
$MAKE distcheck || return
}
@ -98,14 +89,12 @@ function travis_install_script
function travis_before_script
{
pushd "$SOURCE_DIR" || return
set -o xtrace
./autogen.sh
ret=$?
set +o xtrace
popd
return $ret
}
@ -142,10 +131,10 @@ function travis_after_script
local tmp
# find diff dir from check as well as from distcheck
diff_dir=$(find -type d -a -name "diff" | grep "tests/diff" | head -n 1)
diff_dir=$(find . -type d -name "diff" | grep "tests/diff" | head -n 1)
if [ -d "$diff_dir" ]; then
tmp=$(find "$diff_dir" -type f | sort)
echo -en "dump test diffs:\n${tmp}\n"
echo "$tmp" | xargs -r cat
echo "$tmp" | xargs cat
fi
}

View File

@ -19,6 +19,8 @@ branches:
- /^travis.*/
before_install:
# print some host info
- env | grep -v "encrypted" | LC_ALL=C sort
- $CC --version
- which $CC
# workaround clang not system wide, fail on sudo make install

View File

@ -75,7 +75,7 @@ if ! ($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1; then
echo
DIE=1
else
ltver=$($LIBTOOLIZE --version | awk '/^libtoolize/ { print $4 }')
ltver=$($LIBTOOLIZE --version | awk '/^[g]*libtoolize/ { print $4 }')
ltver=${ltver:-"none"}
test ${ltver##2.} = "$ltver" && {
echo

View File

@ -138,6 +138,9 @@ AC_SUBST([BSD_WARN_CFLAGS])
dnl libtool-2
LT_INIT
dnl check supported linker flags
AX_CHECK_VSCRIPT
m4_ifndef([PKG_PROG_PKG_CONFIG],
[m4_fatal([Could not locate the pkg-config autoconf
macros. These are usually located in /usr/share/aclocal/pkg.m4.
@ -155,11 +158,17 @@ bsd_os=no
AS_CASE([${host_os}],
[*linux*],
[linux_os=yes],
[*darwin*],
[darwin_os=yes],
[*bsd*],
[bsd_os=yes])
AM_CONDITIONAL([LINUX], [test "x$linux_os" = xyes])
AM_CONDITIONAL([DARWIN], [test "x$darwin_os" = xyes])
AM_CONDITIONAL([BSD], [test "x$bsd_os" = xyes])
AS_IF([test "x$darwin_os" = xyes], [
AC_DEFINE([_DARWIN_C_SOURCE], [1], [Enable MAP_ANON in sys/mman.h on Mac OS X])
])
dnl define ARCH_<NAME> conditionals
UL_SET_ARCH([I86], [i?86-*])
@ -228,6 +237,7 @@ AC_CHECK_HEADERS([ \
sys/ioccom.h \
sys/ioctl.h \
sys/mkdev.h \
sys/mount.h \
sys/param.h \
sys/prctl.h \
sys/queue.h \
@ -235,12 +245,14 @@ AC_CHECK_HEADERS([ \
sys/socket.h \
sys/sockio.h \
sys/stat.h \
sys/sysmacros.h \
sys/swap.h \
sys/syscall.h \
sys/time.h \
sys/timex.h \
sys/ttydefaults.h \
sys/types.h \
sys/ucred.h \
sys/un.h \
unistd.h \
])

View File

@ -49,7 +49,9 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>
#ifdef HAVE_SYS_SYSMACROS_H
#include <sys/sysmacros.h> /* for major, minor */
#endif
#include "cramfs.h"
#include "nls.h"

View File

@ -87,7 +87,6 @@
#include <ctype.h>
#include <stdlib.h>
#include <termios.h>
#include <mntent.h>
#include <sys/stat.h>
#include <signal.h>
#include <getopt.h>

View File

@ -64,7 +64,6 @@
#include <stdlib.h>
#include <termios.h>
#include <sys/stat.h>
#include <mntent.h>
#include <getopt.h>
#include <err.h>

View File

@ -14,7 +14,6 @@
#include <fcntl.h>
#include <stdlib.h>
#include <limits.h>
#include <mntent.h>
#include <sys/utsname.h>
#include <sys/stat.h>
#include <errno.h>

View File

@ -20,7 +20,9 @@
#include <string.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#ifdef HAVE_SYS_SYSMACROS_H
#include <sys/sysmacros.h>
#endif
#include <unistd.h>
#include "c.h"

View File

@ -355,4 +355,12 @@ static inline int xusleep(useconds_t usec)
*/
#define UL_GETPW_BUFSIZ (16 * 1024)
/*
* Darwin or other BSDs may only have MAP_ANON. To get it on Darwin we must
* define _DARWIN_C_SOURCE before including sys/mman.h. We do this in config.h.
*/
#if !defined MAP_ANONYMOUS && defined MAP_ANON
# define MAP_ANONYMOUS (MAP_ANON)
#endif
#endif /* UTIL_LINUX_C_H */

View File

@ -78,7 +78,7 @@ static inline char *strdup_to_offset(void *stru, size_t offset, const char *str)
#define strdup_to_struct_member(_s, _m, _str) \
strdup_to_offset((void *) _s, offsetof(__typeof__(*(_s)), _m), _str)
extern void strmode(mode_t mode, char *str);
extern void xstrmode(mode_t mode, char *str);
/* Options for size_to_human_string() */
enum

View File

@ -150,7 +150,6 @@ blkdev_get_size(int fd, unsigned long long *bytes)
int part = -1;
struct disklabel lab;
struct partition *pp;
char ch;
struct stat st;
if ((fstat(fd, &st) >= 0) &&

View File

@ -7,6 +7,10 @@
#include "c.h"
#include "idcache.h"
#ifndef LOGIN_NAME_MAX
#define LOGIN_NAME_MAX 256
#endif
struct identry *get_id(struct idcache *ic, unsigned long int id)
{
struct identry *ent;

View File

@ -18,9 +18,14 @@
#include <sys/stat.h>
#include <ctype.h>
#include <sys/param.h>
#ifdef __APPLE__
#include <sys/ucred.h>
#include <sys/mount.h>
#ifndef __linux__
# ifdef HAVE_SYS_UCRED_H
# include <sys/ucred.h>
# endif
# ifdef HAVE_SYS_MOUNT_H
# include <sys/mount.h>
# endif
#endif
#include "pathnames.h"

View File

@ -4,7 +4,9 @@
*/
#include <time.h>
#include <signal.h>
#ifdef HAVE_SYSINFO
#include <sys/sysinfo.h>
#endif
#include <sys/time.h>
#include "c.h"

View File

@ -425,7 +425,7 @@ void strtotimeval_or_err(const char *str, struct timeval *tv, const char *errmes
* Converts stat->st_mode to ls(1)-like mode string. The size of "str" must
* be 11 bytes.
*/
void strmode(mode_t mode, char *str)
void xstrmode(mode_t mode, char *str)
{
unsigned short i = 0;

View File

@ -5,7 +5,6 @@
*/
#include <time.h>
#include <signal.h>
#include <sys/sysinfo.h>
#include <sys/time.h>
#include "c.h"

View File

@ -129,7 +129,9 @@ endif
libblkid_la_LDFLAGS = \
$(SOLIB_LDFLAGS) \
-Wl,--version-script=$(top_srcdir)/libblkid/src/libblkid.sym \
if HAVE_VSCRIPT
$(VSCRIPT_LDFLAGS),$(top_srcdir)/libblkid/src/libblkid.sym \
endif
-version-info $(LIBBLKID_VERSION_INFO)
EXTRA_DIST += \

View File

@ -11,7 +11,6 @@
* (a DRBDmanage "cluster"); this file detects its control volume,
* which is replicated (via DRBD 9) on some of the nodes.
*/
#include <endian.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@ -21,6 +20,7 @@
#include <inttypes.h>
#include <stddef.h>
#include "bitops.h"
#include "superblocks.h"
struct drbdmanage_hdr {

View File

@ -48,7 +48,9 @@ libfdisk_la_DEPENDENCIES = \
libfdisk_la_LDFLAGS = \
$(SOLIB_LDFLAGS) \
-Wl,--version-script=$(top_srcdir)/libfdisk/src/libfdisk.sym \
if HAVE_VSCRIPT
$(VSCRIPT_LDFLAGS),$(top_srcdir)/libfdisk/src/libfdisk.sym \
endif
-version-info $(LIBFDISK_VERSION_INFO)
if BUILD_LIBBLKID

View File

@ -61,7 +61,9 @@ libmount_la_DEPENDENCIES = \
libmount_la_LDFLAGS = \
$(SOLIB_LDFLAGS) \
-Wl,--version-script=$(top_srcdir)/libmount/src/libmount.sym \
if HAVE_VSCRIPT
$(VSCRIPT_LDFLAGS),$(top_srcdir)/libmount/src/libmount.sym \
endif
-version-info $(LIBMOUNT_VERSION_INFO)
EXTRA_DIST += \

View File

@ -59,7 +59,7 @@ static int add_line_from_stat(struct libscols_table *tb,
err(EXIT_FAILURE, "failed to create output line");
/* MODE; local buffer, use scols_line_set_data() that calls strdup() */
strmode(mode, modbuf);
xstrmode(mode, modbuf);
if (scols_line_set_data(ln, COL_MODE, modbuf))
goto fail;

View File

@ -36,7 +36,9 @@ libsmartcols_la_DEPENDENCIES = \
libsmartcols_la_LDFLAGS = \
$(SOLIB_LDFLAGS) \
-Wl,--version-script=$(top_srcdir)/libsmartcols/src/libsmartcols.sym \
if HAVE_VSCRIPT
$(VSCRIPT_LDFLAGS),$(top_srcdir)/libsmartcols/src/libsmartcols.sym \
endif
-version-info $(LIBSMARTCOLS_VERSION_INFO)
EXTRA_DIST += \

View File

@ -37,7 +37,9 @@ libuuid_la_CFLAGS = \
libuuid_la_LDFLAGS = \
$(SOLIB_LDFLAGS) \
-Wl,--version-script=$(top_srcdir)/libuuid/src/libuuid.sym \
if HAVE_VSCRIPT
libuuid_la_LDFLAGS += $(VSCRIPT_LDFLAGS),$(top_srcdir)/libuuid/src/libuuid.sym \
endif
-version-info $(LIBUUID_VERSION_INFO)
EXTRA_DIST += libuuid/src/libuuid.sym

View File

@ -48,7 +48,9 @@
#include <utmp.h>
#include <stdlib.h>
#include <sys/syslog.h>
#ifdef HAVE_SYS_SYSMACROS_H
#include <sys/sysmacros.h>
#endif
#ifdef HAVE_LINUX_MAJOR_H
# include <linux/major.h>
#endif

142
m4/ax_check_vscript.m4 Normal file
View File

@ -0,0 +1,142 @@
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_check_vscript.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_CHECK_VSCRIPT
#
# DESCRIPTION
#
# Check whether the linker supports version scripts. Version scripts are
# used when building shared libraries to bind symbols to version nodes
# (helping to detect incompatibilities) or to limit the visibility of
# non-public symbols.
#
# Output:
#
# If version scripts are supported, VSCRIPT_LDFLAGS will contain the
# appropriate flag to pass to the linker. On GNU systems this would
# typically be "-Wl,--version-script", and on Solaris it would typically
# be "-Wl,-M".
#
# Two Automake conditionals are also set:
#
# HAVE_VSCRIPT is true if the linker supports version scripts with
# entries that use simple wildcards, like "local: *".
#
# HAVE_VSCRIPT_COMPLEX is true if the linker supports version scripts with
# pattern matching wildcards, like "global: Java_*".
#
# On systems that do not support symbol versioning, such as Mac OS X, both
# conditionals will be false. They will also be false if the user passes
# "--disable-symvers" on the configure command line.
#
# Example:
#
# configure.ac:
#
# AX_CHECK_VSCRIPT
#
# Makefile.am:
#
# if HAVE_VSCRIPT
# libfoo_la_LDFLAGS += $(VSCRIPT_LDFLAGS),@srcdir@/libfoo.map
# endif
#
# if HAVE_VSCRIPT_COMPLEX
# libbar_la_LDFLAGS += $(VSCRIPT_LDFLAGS),@srcdir@/libbar.map
# endif
#
# LICENSE
#
# Copyright (c) 2014 Kevin Cernekee <cernekee@gmail.com>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 1
# _AX_CHECK_VSCRIPT(flag, global-sym, action-if-link-succeeds, [junk-file=no])
AC_DEFUN([_AX_CHECK_VSCRIPT], [
AC_LANG_PUSH([C])
ax_check_vscript_save_flags="$LDFLAGS"
echo "V1 { global: $2; local: *; };" > conftest.map
AS_IF([test x$4 = xyes], [
echo "{" >> conftest.map
])
LDFLAGS="$LDFLAGS -Wl,$1,conftest.map"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[int show, hide;]], [])], [$3])
LDFLAGS="$ax_check_vscript_save_flags"
rm -f conftest.map
AC_LANG_POP([C])
]) dnl _AX_CHECK_VSCRIPT
AC_DEFUN([AX_CHECK_VSCRIPT], [
AC_ARG_ENABLE([symvers],
AS_HELP_STRING([--disable-symvers],
[disable library symbol versioning [default=auto]]),
[want_symvers=$enableval],
[want_symvers=yes]
)
AS_IF([test x$want_symvers = xyes], [
dnl First test --version-script and -M with a simple wildcard.
AC_CACHE_CHECK([linker version script flag], ax_cv_check_vscript_flag, [
ax_cv_check_vscript_flag=unsupported
_AX_CHECK_VSCRIPT([--version-script], [show], [
ax_cv_check_vscript_flag=--version-script
])
AS_IF([test x$ax_cv_check_vscript_flag = xunsupported], [
_AX_CHECK_VSCRIPT([-M], [show], [ax_cv_check_vscript_flag=-M])
])
dnl The linker may interpret -M (no argument) as "produce a load map."
dnl If "-M conftest.map" doesn't fail when conftest.map contains
dnl obvious syntax errors, assume this is the case.
AS_IF([test x$ax_cv_check_vscript_flag != xunsupported], [
_AX_CHECK_VSCRIPT([$ax_cv_check_vscript_flag], [show],
[ax_cv_check_vscript_flag=unsupported], [yes])
])
])
dnl If the simple wildcard worked, retest with a complex wildcard.
AS_IF([test x$ax_cv_check_vscript_flag != xunsupported], [
ax_check_vscript_flag=$ax_cv_check_vscript_flag
AC_CACHE_CHECK([if version scripts can use complex wildcards],
ax_cv_check_vscript_complex_wildcards, [
ax_cv_check_vscript_complex_wildcards=no
_AX_CHECK_VSCRIPT([$ax_cv_check_vscript_flag], [sh*], [
ax_cv_check_vscript_complex_wildcards=yes])
])
ax_check_vscript_complex_wildcards="$ax_cv_check_vscript_complex_wildcards"
], [
ax_check_vscript_flag=
ax_check_vscript_complex_wildcards=no
])
], [
AC_MSG_CHECKING([linker version script flag])
AC_MSG_RESULT([disabled])
ax_check_vscript_flag=
ax_check_vscript_complex_wildcards=no
])
AS_IF([test x$ax_check_vscript_flag != x], [
VSCRIPT_LDFLAGS="-Wl,$ax_check_vscript_flag"
AC_SUBST([VSCRIPT_LDFLAGS])
])
AM_CONDITIONAL([HAVE_VSCRIPT],
[test x$ax_check_vscript_flag != x])
AM_CONDITIONAL([HAVE_VSCRIPT_COMPLEX],
[test x$ax_check_vscript_complex_wildcards = xyes])
]) dnl AX_CHECK_VSCRIPT

View File

@ -911,7 +911,7 @@ static void set_scols_data(struct blkdev_cxt *cxt, int col, int id, struct libsc
char md[11];
if (!st_rc) {
strmode(cxt->st.st_mode, md);
xstrmode(cxt->st.st_mode, md);
str = xstrdup(md);
}
break;

View File

@ -44,10 +44,6 @@
#define MAXSYMLINKS 256
#endif
#ifndef LOGIN_NAME_MAX
#define LOGIN_NAME_MAX 256
#endif
#define NAMEI_NOLINKS (1 << 1)
#define NAMEI_MODES (1 << 2)
#define NAMEI_MNTS (1 << 3)
@ -288,7 +284,7 @@ print_namei(struct namei *nm, char *path)
return -1;
}
strmode(nm->st.st_mode, md);
xstrmode(nm->st.st_mode, md);
if (nm->mountpoint)
md[0] = 'D';

View File

@ -579,7 +579,7 @@ static void do_sem(int id, struct lsipc_control *ctl, struct libscols_table *tb)
xasprintf(&arg, "%#o", semdsp->sem_perm.mode & 0777);
else {
arg = xmalloc(11);
strmode(semdsp->sem_perm.mode & 0777, arg);
xstrmode(semdsp->sem_perm.mode & 0777, arg);
}
rc = scols_line_refer_data(ln, n, arg);
break;
@ -776,7 +776,7 @@ static void do_msg(int id, struct lsipc_control *ctl, struct libscols_table *tb)
xasprintf(&arg, "%#o", msgdsp->msg_perm.mode & 0777);
else {
arg = xmalloc(11);
strmode(msgdsp->msg_perm.mode & 0777, arg);
xstrmode(msgdsp->msg_perm.mode & 0777, arg);
rc = scols_line_refer_data(ln, n, arg);
}
break;
@ -928,7 +928,7 @@ static void do_shm(int id, struct lsipc_control *ctl, struct libscols_table *tb)
xasprintf(&arg, "%#o", shmdsp->shm_perm.mode & 0777);
else {
arg = xmalloc(11);
strmode(shmdsp->shm_perm.mode & 0777, arg);
xstrmode(shmdsp->shm_perm.mode & 0777, arg);
}
rc = scols_line_refer_data(ln, n, arg);
break;

View File

@ -233,7 +233,7 @@ static int read_process(struct lsns *ls, pid_t pid)
if (!dir)
return -errno;
p = calloc(1, sizeof(*p));
p = xcalloc(1, sizeof(*p));
if (!p) {
rc = -ENOMEM;
goto done;
@ -338,7 +338,7 @@ static int namespace_has_process(struct lsns_namespace *ns, pid_t pid)
static struct lsns_namespace *add_namespace(struct lsns *ls, int type, ino_t ino)
{
struct lsns_namespace *ns = calloc(1, sizeof(*ns));
struct lsns_namespace *ns = xcalloc(1, sizeof(*ns));
if (!ns)
return NULL;

View File

@ -158,13 +158,15 @@ function ts_has_option {
fi
# or just check the global command line options
echo -n $ALL | sed 's/ //g' | awk 'BEGIN { FS="="; RS="--" } /('$NAME'$|'$NAME'=)/ { print "yes" }'
if [[ $ALL =~ ([$' \t\n']|^)--$NAME([$'= \t\n']|$) ]]; then echo yes; fi
}
function ts_option_argument {
NAME="$1"
ALL="$2"
echo -n $ALL | sed 's/ //g' | awk 'BEGIN { FS="="; RS="--" } /'$NAME'=/ { print $2 }'
# last option wins!
echo "$ALL" | sed -n "s/.*[ \t\n]--$NAME=\([^ \t\n]*\).*/\1/p" | tail -n 1
}
function ts_init_core_env {

View File

@ -34,6 +34,13 @@ function num_cpus()
fi
}
function find_test_scripts()
{
local searchdir="$1"
find "$searchdir" -type f -regex ".*/[^\.~]*" \
\( -perm -u=x -o -perm -g=x -o -perm -o=x \)
}
while [ -n "$1" ]; do
case "$1" in
--force)
@ -117,7 +124,7 @@ if [ -n "$SUBTESTS" ]; then
# selected tests only
for s in $SUBTESTS; do
if [ -d "$top_srcdir/tests/ts/$s" ]; then
comps+=( $(find $top_srcdir/tests/ts/$s -type f -perm /a+x -regex ".*/[^\.~]*") )
comps+=( $(find_test_scripts "$top_srcdir/tests/ts/$s") ) || exit 1
else
echo "Unknown test component '$s'"
exit 1
@ -129,7 +136,7 @@ else
exit 1
fi
comps=( $(find $top_srcdir/tests/ts/ -type f -perm /a+x -regex ".*/[^\.~]*") )
comps=( $(find_test_scripts "$top_srcdir/tests/ts") ) || exit 1
fi
if [ -n "$EXCLUDETESTS" ]; then

View File

@ -32,7 +32,7 @@ for conf in $config_gen_dir/config-gen.d/*.conf; do
./configure $opts &> /dev/null
make -j &> /dev/null
bins=$(find . -type f -perm /a+x | sort)
bins=$(find . -type f \( -perm -u=x -o -perm -g=x -o -perm -o=x \) | sort)
for b in $bins; do
libs=$(readelf --dynamic $b 2> /dev/null | \
awk '/NEEDED/ { print $5 }' | \

View File

@ -66,7 +66,7 @@ fi
ts_cd "$IMAGE_SRC"
ts_log "list checksums from original data"
find -type f -exec md5sum {} \; | sort >> $TS_OUTPUT
find . -type f -exec md5sum {} \; | sort >> $TS_OUTPUT
echo >> $TS_OUTPUT
ts_log "create cramfs image"

View File

@ -81,7 +81,7 @@ static void fwd(void);
static void reverse(void);
static void initinfo(void);
static void outc(wint_t c, int width);
static void setmode(int newmode);
static void xsetmode(int newmode);
static void setcol(int newcol);
static void needcol(int col);
static void sig_handler(int signo);
@ -368,7 +368,7 @@ static void flushln(void)
for (i = 0; i < maxcol; i++) {
if (obuf[i].c_mode != lastmode) {
hadmodes++;
setmode(obuf[i].c_mode);
xsetmode(obuf[i].c_mode);
lastmode = obuf[i].c_mode;
}
if (obuf[i].c_char == '\0') {
@ -382,7 +382,7 @@ static void flushln(void)
i += obuf[i].c_width - 1;
}
if (lastmode != NORMAL) {
setmode(0);
xsetmode(0);
}
if (must_overstrike && hadmodes)
overstrike();
@ -560,11 +560,11 @@ static void outc(wint_t c, int width) {
}
}
static void setmode(int newmode)
static void xsetmode(int newmode)
{
if (!iflag) {
if (curmode != NORMAL && newmode != NORMAL)
setmode(NORMAL);
xsetmode(NORMAL);
switch (newmode) {
case NORMAL:
switch (curmode) {

View File

@ -70,7 +70,7 @@ remove_repeats()
cd $(git rev-parse --show-toplevel)
for I in $(
find -path './autom4te.cache' -prune -o -path './.libs' -prune -o -name '*[[:alpha:]].[1-8]' -print
find . -type f -name '*[[:alpha:]].[1-8]' |grep -v "autom4te.cache\|\.libs/"
); do
MAN_FILE=${I##*/}
MAN_LIST[${MAN_FILE%%.[0-9]}]=1