diff options
author | Anas Nashif <anas.nashif@intel.com> | 2012-07-21 17:12:39 +0100 |
---|---|---|
committer | Anas Nashif <anas.nashif@intel.com> | 2012-07-23 10:19:53 +0100 |
commit | 3f1932e927ae070261a8d428d5c5f158c2f525ba (patch) | |
tree | 286e9acc48a43dd751e4112144eb7d4d6ba62533 /rmt | |
parent | f86053dd05b02441d0c27eb68524ae3c1cf0fe81 (diff) | |
download | cpio-3f1932e927ae070261a8d428d5c5f158c2f525ba.tar.gz cpio-3f1932e927ae070261a8d428d5c5f158c2f525ba.tar.bz2 cpio-3f1932e927ae070261a8d428d5c5f158c2f525ba.zip |
downgrade to 2.8 (GPLv2)
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Diffstat (limited to 'rmt')
-rw-r--r-- | rmt/Makefile.am | 6 | ||||
-rw-r--r-- | rmt/Makefile.in | 646 | ||||
-rw-r--r-- | rmt/rmt.c | 1168 |
3 files changed, 645 insertions, 1175 deletions
diff --git a/rmt/Makefile.am b/rmt/Makefile.am index 37f621a..b455212 100644 --- a/rmt/Makefile.am +++ b/rmt/Makefile.am @@ -4,10 +4,10 @@ EXTRA_PROGRAMS = rmt rmt_SOURCES = rmt.c -INCLUDES = -I$(top_srcdir)/gnu -I../ -I../gnu -I$(top_srcdir)/lib +INCLUDES = -I$(top_srcdir)/lib -I../ -I../lib -LDADD = ../gnu/libgnu.a $(LIBINTL) +LDADD = ../lib/lib$(PACKAGE).a $(LIBINTL) rmt_LDADD = $(LDADD) $(LIB_SETSOCKOPT) -rmt.o: ../gnu/configmake.h +rmt.o: ../lib/configmake.h diff --git a/rmt/Makefile.in b/rmt/Makefile.in index ef7c2b2..902d966 100644 --- a/rmt/Makefile.in +++ b/rmt/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.10a from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -38,130 +37,114 @@ EXTRA_PROGRAMS = rmt$(EXEEXT) subdir = rmt DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/am/flushleft.m4 \ - $(top_srcdir)/am/pack.m4 $(top_srcdir)/am/sysdep.m4 \ - $(top_srcdir)/m4/00gnulib.m4 $(top_srcdir)/m4/alloca.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/absolute-header.m4 \ + $(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/allocsa.m4 \ $(top_srcdir)/m4/argmatch.m4 $(top_srcdir)/m4/argp.m4 \ - $(top_srcdir)/m4/bison.m4 $(top_srcdir)/m4/chdir-long.m4 \ - $(top_srcdir)/m4/chown.m4 $(top_srcdir)/m4/clock_time.m4 \ - $(top_srcdir)/m4/close-stream.m4 $(top_srcdir)/m4/close.m4 \ - $(top_srcdir)/m4/closeout.m4 $(top_srcdir)/m4/codeset.m4 \ - $(top_srcdir)/m4/d-ino.m4 $(top_srcdir)/m4/dirent-safer.m4 \ - $(top_srcdir)/m4/dirent_h.m4 $(top_srcdir)/m4/dirfd.m4 \ + $(top_srcdir)/m4/bison.m4 \ + $(top_srcdir)/m4/canonicalize-lgpl.m4 \ + $(top_srcdir)/m4/chdir-long.m4 $(top_srcdir)/m4/chown.m4 \ + $(top_srcdir)/m4/clock_time.m4 \ + $(top_srcdir)/m4/close-stream.m4 $(top_srcdir)/m4/closeout.m4 \ + $(top_srcdir)/m4/d-ino.m4 $(top_srcdir)/m4/dirfd.m4 \ $(top_srcdir)/m4/dirname.m4 $(top_srcdir)/m4/dos.m4 \ $(top_srcdir)/m4/double-slash-root.m4 $(top_srcdir)/m4/dup2.m4 \ - $(top_srcdir)/m4/eealloc.m4 $(top_srcdir)/m4/environ.m4 \ - $(top_srcdir)/m4/errno_h.m4 $(top_srcdir)/m4/error.m4 \ + $(top_srcdir)/m4/eealloc.m4 $(top_srcdir)/m4/eoverflow.m4 \ + $(top_srcdir)/m4/error.m4 $(top_srcdir)/m4/exitfail.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/fchdir.m4 \ - $(top_srcdir)/m4/fclose.m4 $(top_srcdir)/m4/fcntl-o.m4 \ - $(top_srcdir)/m4/fcntl.m4 $(top_srcdir)/m4/fcntl_h.m4 \ - $(top_srcdir)/m4/fdopendir.m4 $(top_srcdir)/m4/fileblocks.m4 \ - $(top_srcdir)/m4/float_h.m4 $(top_srcdir)/m4/fnmatch.m4 \ - $(top_srcdir)/m4/fpending.m4 $(top_srcdir)/m4/fseeko.m4 \ + $(top_srcdir)/m4/fcntl-safer.m4 $(top_srcdir)/m4/fcntl_h.m4 \ + $(top_srcdir)/m4/fileblocks.m4 $(top_srcdir)/m4/float_h.m4 \ + $(top_srcdir)/m4/fnmatch.m4 $(top_srcdir)/m4/fpending.m4 \ $(top_srcdir)/m4/getcwd-abort-bug.m4 \ $(top_srcdir)/m4/getcwd-path-max.m4 $(top_srcdir)/m4/getcwd.m4 \ - $(top_srcdir)/m4/getdate.m4 $(top_srcdir)/m4/getdtablesize.m4 \ - $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/gettime.m4 $(top_srcdir)/m4/gettimeofday.m4 \ - $(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/gnulib-common.m4 \ + $(top_srcdir)/m4/getdate.m4 $(top_srcdir)/m4/getopt.m4 \ + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gettime.m4 \ + $(top_srcdir)/m4/gettimeofday.m4 \ + $(top_srcdir)/m4/gnulib-common.m4 \ $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/hash.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/include_next.m4 \ - $(top_srcdir)/m4/inline.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/inline.m4 \ $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttostr.m4 \ $(top_srcdir)/m4/inttypes-pri.m4 $(top_srcdir)/m4/inttypes.m4 \ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lchown.m4 \ $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \ - $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \ - $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lseek.m4 \ - $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/malloc.m4 \ - $(top_srcdir)/m4/malloca.m4 $(top_srcdir)/m4/mbrtowc.m4 \ - $(top_srcdir)/m4/mbsinit.m4 $(top_srcdir)/m4/mbsrtowcs.m4 \ - $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/memchr.m4 \ - $(top_srcdir)/m4/mempcpy.m4 $(top_srcdir)/m4/memrchr.m4 \ - $(top_srcdir)/m4/mkdir.m4 $(top_srcdir)/m4/mktime.m4 \ - $(top_srcdir)/m4/mmap-anon.m4 $(top_srcdir)/m4/mode_t.m4 \ - $(top_srcdir)/m4/multiarch.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/open.m4 $(top_srcdir)/m4/openat.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/longlong.m4 \ + $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/mbrtowc.m4 \ + $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mempcpy.m4 \ + $(top_srcdir)/m4/memrchr.m4 $(top_srcdir)/m4/mktime.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/onceonly_2_57.m4 \ + $(top_srcdir)/m4/openat.m4 $(top_srcdir)/m4/pathmax.m4 \ $(top_srcdir)/m4/paxutils.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/printf.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/quote.m4 $(top_srcdir)/m4/quotearg.m4 \ - $(top_srcdir)/m4/rawmemchr.m4 $(top_srcdir)/m4/realloc.m4 \ - $(top_srcdir)/m4/rmdir.m4 $(top_srcdir)/m4/rmt.m4 \ - $(top_srcdir)/m4/rtapelib.m4 $(top_srcdir)/m4/safe-read.m4 \ - $(top_srcdir)/m4/safe-write.m4 $(top_srcdir)/m4/save-cwd.m4 \ - $(top_srcdir)/m4/savedir.m4 $(top_srcdir)/m4/setenv.m4 \ - $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/sleep.m4 \ - $(top_srcdir)/m4/ssize_t.m4 $(top_srcdir)/m4/stat-time.m4 \ - $(top_srcdir)/m4/stat.m4 $(top_srcdir)/m4/stdarg.m4 \ - $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stddef_h.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/quote.m4 \ + $(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/readlink.m4 \ + $(top_srcdir)/m4/rmt.m4 $(top_srcdir)/m4/rtapelib.m4 \ + $(top_srcdir)/m4/safe-read.m4 $(top_srcdir)/m4/safe-write.m4 \ + $(top_srcdir)/m4/save-cwd.m4 $(top_srcdir)/m4/savedir.m4 \ + $(top_srcdir)/m4/setenv.m4 $(top_srcdir)/m4/size_max.m4 \ + $(top_srcdir)/m4/sleep.m4 $(top_srcdir)/m4/ssize_t.m4 \ + $(top_srcdir)/m4/stdarg.m4 $(top_srcdir)/m4/stdbool.m4 \ $(top_srcdir)/m4/stdint.m4 $(top_srcdir)/m4/stdint_h.m4 \ $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \ $(top_srcdir)/m4/stpcpy.m4 $(top_srcdir)/m4/strcase.m4 \ $(top_srcdir)/m4/strchrnul.m4 $(top_srcdir)/m4/strdup.m4 \ $(top_srcdir)/m4/strerror.m4 $(top_srcdir)/m4/string_h.m4 \ - $(top_srcdir)/m4/strings_h.m4 $(top_srcdir)/m4/strndup.m4 \ - $(top_srcdir)/m4/strnlen.m4 $(top_srcdir)/m4/strtol.m4 \ - $(top_srcdir)/m4/sys_stat_h.m4 $(top_srcdir)/m4/sys_time_h.m4 \ - $(top_srcdir)/m4/sysexits.m4 $(top_srcdir)/m4/system.m4 \ - $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/time_r.m4 \ - $(top_srcdir)/m4/timespec.m4 $(top_srcdir)/m4/tm_gmtoff.m4 \ + $(top_srcdir)/m4/strndup.m4 $(top_srcdir)/m4/strnlen.m4 \ + $(top_srcdir)/m4/strtol.m4 $(top_srcdir)/m4/sys_stat_h.m4 \ + $(top_srcdir)/m4/sys_time_h.m4 $(top_srcdir)/m4/sysexits.m4 \ + $(top_srcdir)/m4/system.m4 $(top_srcdir)/m4/time_h.m4 \ + $(top_srcdir)/m4/time_r.m4 $(top_srcdir)/m4/timespec.m4 \ + $(top_srcdir)/m4/tm_gmtoff.m4 $(top_srcdir)/m4/ulonglong.m4 \ $(top_srcdir)/m4/unistd-safer.m4 $(top_srcdir)/m4/unistd_h.m4 \ - $(top_srcdir)/m4/unlink.m4 $(top_srcdir)/m4/unlocked-io.m4 \ - $(top_srcdir)/m4/utimbuf.m4 $(top_srcdir)/m4/utimens.m4 \ - $(top_srcdir)/m4/utimes.m4 $(top_srcdir)/m4/vasnprintf.m4 \ - $(top_srcdir)/m4/version-etc.m4 $(top_srcdir)/m4/vsnprintf.m4 \ - $(top_srcdir)/m4/warn-on-use.m4 $(top_srcdir)/m4/wchar_h.m4 \ - $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wctype_h.m4 \ - $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/write.m4 \ + $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/utimbuf.m4 \ + $(top_srcdir)/m4/utimens.m4 $(top_srcdir)/m4/utimes.m4 \ + $(top_srcdir)/m4/vasnprintf.m4 $(top_srcdir)/m4/vsnprintf.m4 \ + $(top_srcdir)/m4/wchar.m4 $(top_srcdir)/m4/wchar_t.m4 \ + $(top_srcdir)/m4/wctype.m4 $(top_srcdir)/m4/wint_t.m4 \ $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/m4/xgetcwd.m4 \ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/m4/xstrndup.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d +mkinstalldirs = $(SHELL) $(top_srcdir)/build-aux/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(rmtdir)" +rmtPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(rmt_PROGRAMS) am_rmt_OBJECTS = rmt.$(OBJEXT) rmt_OBJECTS = $(am_rmt_OBJECTS) am__DEPENDENCIES_1 = -am__DEPENDENCIES_2 = ../gnu/libgnu.a $(am__DEPENDENCIES_1) +am__DEPENDENCIES_2 = ../lib/lib$(PACKAGE).a $(am__DEPENDENCIES_1) rmt_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles -am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(rmt_SOURCES) DIST_SOURCES = $(rmt_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABSOLUTE_DIRENT_H = @ABSOLUTE_DIRENT_H@ +ABSOLUTE_FCNTL_H = @ABSOLUTE_FCNTL_H@ +ABSOLUTE_FLOAT_H = @ABSOLUTE_FLOAT_H@ +ABSOLUTE_INTTYPES_H = @ABSOLUTE_INTTYPES_H@ +ABSOLUTE_STDINT_H = @ABSOLUTE_STDINT_H@ +ABSOLUTE_STDIO_H = @ABSOLUTE_STDIO_H@ +ABSOLUTE_STDLIB_H = @ABSOLUTE_STDLIB_H@ +ABSOLUTE_STRING_H = @ABSOLUTE_STRING_H@ +ABSOLUTE_SYSEXITS_H = @ABSOLUTE_SYSEXITS_H@ +ABSOLUTE_SYS_STAT_H = @ABSOLUTE_SYS_STAT_H@ +ABSOLUTE_SYS_TIME_H = @ABSOLUTE_SYS_TIME_H@ +ABSOLUTE_TIME_H = @ABSOLUTE_TIME_H@ +ABSOLUTE_UNISTD_H = @ABSOLUTE_UNISTD_H@ +ABSOLUTE_WCHAR_H = @ABSOLUTE_WCHAR_H@ +ABSOLUTE_WCTYPE_H = @ABSOLUTE_WCTYPE_H@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOM4TE = @AUTOM4TE@ @@ -183,291 +166,104 @@ DEFAULT_RMT_COMMAND = @DEFAULT_RMT_COMMAND@ DEFAULT_RMT_DIR = @DEFAULT_RMT_DIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DIRENT_H = @DIRENT_H@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ -EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ -ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ -ENOLINK_VALUE = @ENOLINK_VALUE@ -EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ -EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ -ERRNO_H = @ERRNO_H@ +EOVERFLOW = @EOVERFLOW@ EXEEXT = @EXEEXT@ +FCNTL_H = @FCNTL_H@ FLOAT_H = @FLOAT_H@ FNMATCH_H = @FNMATCH_H@ GETOPT_H = @GETOPT_H@ -GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ -GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ -GNULIB_ALPHASORT = @GNULIB_ALPHASORT@ -GNULIB_ATOLL = @GNULIB_ATOLL@ -GNULIB_BTOWC = @GNULIB_BTOWC@ -GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ -GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ GNULIB_CHOWN = @GNULIB_CHOWN@ -GNULIB_CLOSE = @GNULIB_CLOSE@ -GNULIB_DIRFD = @GNULIB_DIRFD@ -GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP2 = @GNULIB_DUP2@ -GNULIB_DUP3 = @GNULIB_DUP3@ -GNULIB_ENVIRON = @GNULIB_ENVIRON@ -GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ -GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ GNULIB_FCHDIR = @GNULIB_FCHDIR@ -GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ -GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ -GNULIB_FCLOSE = @GNULIB_FCLOSE@ -GNULIB_FCNTL = @GNULIB_FCNTL@ -GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@ GNULIB_FFLUSH = @GNULIB_FFLUSH@ -GNULIB_FOPEN = @GNULIB_FOPEN@ -GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ -GNULIB_FPURGE = @GNULIB_FPURGE@ -GNULIB_FPUTC = @GNULIB_FPUTC@ -GNULIB_FPUTS = @GNULIB_FPUTS@ -GNULIB_FREOPEN = @GNULIB_FREOPEN@ GNULIB_FSEEK = @GNULIB_FSEEK@ GNULIB_FSEEKO = @GNULIB_FSEEKO@ -GNULIB_FSTATAT = @GNULIB_FSTATAT@ -GNULIB_FSYNC = @GNULIB_FSYNC@ GNULIB_FTELL = @GNULIB_FTELL@ GNULIB_FTELLO = @GNULIB_FTELLO@ GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ -GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ -GNULIB_FWRITE = @GNULIB_FWRITE@ GNULIB_GETCWD = @GNULIB_GETCWD@ -GNULIB_GETDELIM = @GNULIB_GETDELIM@ -GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ -GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ -GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ -GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ -GNULIB_GETLINE = @GNULIB_GETLINE@ -GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ -GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ -GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ -GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ -GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_IMAXABS = @GNULIB_IMAXABS@ GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ -GNULIB_LCHMOD = @GNULIB_LCHMOD@ -GNULIB_LCHOWN = @GNULIB_LCHOWN@ -GNULIB_LINK = @GNULIB_LINK@ -GNULIB_LINKAT = @GNULIB_LINKAT@ GNULIB_LSEEK = @GNULIB_LSEEK@ -GNULIB_LSTAT = @GNULIB_LSTAT@ -GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ -GNULIB_MBRLEN = @GNULIB_MBRLEN@ -GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ GNULIB_MBSCHR = @GNULIB_MBSCHR@ GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ -GNULIB_MBSINIT = @GNULIB_MBSINIT@ GNULIB_MBSLEN = @GNULIB_MBSLEN@ GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ -GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ -GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ -GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ GNULIB_MBSSEP = @GNULIB_MBSSEP@ GNULIB_MBSSPN = @GNULIB_MBSSPN@ GNULIB_MBSSTR = @GNULIB_MBSSTR@ GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ -GNULIB_MEMCHR = @GNULIB_MEMCHR@ GNULIB_MEMMEM = @GNULIB_MEMMEM@ GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ -GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ -GNULIB_MKFIFO = @GNULIB_MKFIFO@ -GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ -GNULIB_MKNOD = @GNULIB_MKNOD@ -GNULIB_MKNODAT = @GNULIB_MKNODAT@ -GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ -GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ -GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ -GNULIB_MKTIME = @GNULIB_MKTIME@ -GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ -GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@ -GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ -GNULIB_OPEN = @GNULIB_OPEN@ -GNULIB_OPENAT = @GNULIB_OPENAT@ -GNULIB_PERROR = @GNULIB_PERROR@ -GNULIB_PIPE2 = @GNULIB_PIPE2@ -GNULIB_POPEN = @GNULIB_POPEN@ -GNULIB_PREAD = @GNULIB_PREAD@ -GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ -GNULIB_PUTC = @GNULIB_PUTC@ -GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ -GNULIB_PUTENV = @GNULIB_PUTENV@ -GNULIB_PUTS = @GNULIB_PUTS@ -GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ -GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ GNULIB_READLINK = @GNULIB_READLINK@ -GNULIB_READLINKAT = @GNULIB_READLINKAT@ -GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ -GNULIB_REALPATH = @GNULIB_REALPATH@ -GNULIB_REMOVE = @GNULIB_REMOVE@ -GNULIB_RENAME = @GNULIB_RENAME@ -GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ -GNULIB_RMDIR = @GNULIB_RMDIR@ -GNULIB_RPMATCH = @GNULIB_RPMATCH@ -GNULIB_SCANDIR = @GNULIB_SCANDIR@ -GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ -GNULIB_STAT = @GNULIB_STAT@ -GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@ GNULIB_STPCPY = @GNULIB_STPCPY@ GNULIB_STPNCPY = @GNULIB_STPNCPY@ GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ -GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ GNULIB_STRPBRK = @GNULIB_STRPBRK@ -GNULIB_STRPTIME = @GNULIB_STRPTIME@ GNULIB_STRSEP = @GNULIB_STRSEP@ -GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ -GNULIB_STRSTR = @GNULIB_STRSTR@ -GNULIB_STRTOD = @GNULIB_STRTOD@ GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ -GNULIB_STRTOLL = @GNULIB_STRTOLL@ -GNULIB_STRTOULL = @GNULIB_STRTOULL@ GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ -GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ -GNULIB_SYMLINK = @GNULIB_SYMLINK@ -GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ -GNULIB_TIMEGM = @GNULIB_TIMEGM@ -GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ -GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ -GNULIB_UNLINK = @GNULIB_UNLINK@ -GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ -GNULIB_UNSETENV = @GNULIB_UNSETENV@ -GNULIB_USLEEP = @GNULIB_USLEEP@ -GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ -GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ -GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ -GNULIB_VPRINTF = @GNULIB_VPRINTF@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ -GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ -GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ -GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ -GNULIB_WCTOB = @GNULIB_WCTOB@ -GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ -GNULIB_WRITE = @GNULIB_WRITE@ GREP = @GREP@ -HAVE_ALPHASORT = @HAVE_ALPHASORT@ -HAVE_ATOLL = @HAVE_ATOLL@ -HAVE_BTOWC = @HAVE_BTOWC@ -HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@ -HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ -HAVE_CHOWN = @HAVE_CHOWN@ -HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@ -HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ -HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ -HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ -HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ -HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ -HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ +HAVE_DECL_MKDIR = @HAVE_DECL_MKDIR@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ -HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@ HAVE_DECL_STRNCASECMP = @HAVE_DECL_STRNCASECMP@ HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@ HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@ -HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@ HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ -HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ -HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ -HAVE_DPRINTF = @HAVE_DPRINTF@ HAVE_DUP2 = @HAVE_DUP2@ -HAVE_DUP3 = @HAVE_DUP3@ -HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ -HAVE_FACCESSAT = @HAVE_FACCESSAT@ -HAVE_FCHMODAT = @HAVE_FCHMODAT@ -HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ -HAVE_FCNTL = @HAVE_FCNTL@ -HAVE_FDOPENDIR = @HAVE_FDOPENDIR@ -HAVE_FSTATAT = @HAVE_FSTATAT@ -HAVE_FSYNC = @HAVE_FSYNC@ +HAVE_FSEEKO = @HAVE_FSEEKO@ +HAVE_FTELLO = @HAVE_FTELLO@ HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ -HAVE_FUTIMENS = @HAVE_FUTIMENS@ -HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@ -HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ -HAVE_GETGROUPS = @HAVE_GETGROUPS@ -HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ -HAVE_GETLOGIN = @HAVE_GETLOGIN@ -HAVE_GETOPT_H = @HAVE_GETOPT_H@ -HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ -HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ -HAVE_GETUSERSHELL = @HAVE_GETUSERSHELL@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ +HAVE_IO_H = @HAVE_IO_H@ HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ -HAVE_LCHMOD = @HAVE_LCHMOD@ -HAVE_LCHOWN = @HAVE_LCHOWN@ -HAVE_LINK = @HAVE_LINK@ -HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ -HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@ -HAVE_MBRLEN = @HAVE_MBRLEN@ -HAVE_MBRTOWC = @HAVE_MBRTOWC@ -HAVE_MBSINIT = @HAVE_MBSINIT@ -HAVE_MBSLEN = @HAVE_MBSLEN@ -HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ -HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ HAVE_MEMPCPY = @HAVE_MEMPCPY@ -HAVE_MKDIRAT = @HAVE_MKDIRAT@ HAVE_MKDTEMP = @HAVE_MKDTEMP@ -HAVE_MKFIFO = @HAVE_MKFIFO@ -HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ -HAVE_MKNOD = @HAVE_MKNOD@ -HAVE_MKNODAT = @HAVE_MKNODAT@ -HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ -HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ -HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ -HAVE_OPENAT = @HAVE_OPENAT@ -HAVE_OS_H = @HAVE_OS_H@ -HAVE_PIPE2 = @HAVE_PIPE2@ -HAVE_PREAD = @HAVE_PREAD@ -HAVE_RANDOM_H = @HAVE_RANDOM_H@ -HAVE_RANDOM_R = @HAVE_RANDOM_R@ -HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READLINK = @HAVE_READLINK@ -HAVE_READLINKAT = @HAVE_READLINKAT@ -HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@ -HAVE_REALPATH = @HAVE_REALPATH@ -HAVE_RENAMEAT = @HAVE_RENAMEAT@ -HAVE_RPMATCH = @HAVE_RPMATCH@ -HAVE_SCANDIR = @HAVE_SCANDIR@ -HAVE_SETENV = @HAVE_SETENV@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@ HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@ @@ -478,63 +274,38 @@ HAVE_STPNCPY = @HAVE_STPNCPY@ HAVE_STRCASECMP = @HAVE_STRCASECMP@ HAVE_STRCASESTR = @HAVE_STRCASESTR@ HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ +HAVE_STRNDUP = @HAVE_STRNDUP@ HAVE_STRPBRK = @HAVE_STRPBRK@ HAVE_STRSEP = @HAVE_STRSEP@ -HAVE_STRTOD = @HAVE_STRTOD@ -HAVE_STRTOLL = @HAVE_STRTOLL@ -HAVE_STRTOULL = @HAVE_STRTOULL@ -HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ -HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ -HAVE_SYMLINK = @HAVE_SYMLINK@ -HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYSEXITS_H = @HAVE_SYSEXITS_H@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ -HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ -HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ -HAVE_UNLINKAT = @HAVE_UNLINKAT@ -HAVE_UNSETENV = @HAVE_UNSETENV@ HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ -HAVE_USLEEP = @HAVE_USLEEP@ -HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ HAVE_VASPRINTF = @HAVE_VASPRINTF@ -HAVE_VDPRINTF = @HAVE_VDPRINTF@ -HAVE_WCHAR_H = @HAVE_WCHAR_H@ -HAVE_WCHAR_T = @HAVE_WCHAR_T@ -HAVE_WCRTOMB = @HAVE_WCRTOMB@ -HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ -HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ HAVE_WINT_T = @HAVE_WINT_T@ HAVE__BOOL = @HAVE__BOOL@ -INCLUDE_NEXT = @INCLUDE_NEXT@ -INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ -INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +INTTYPES_H = @INTTYPES_H@ LDFLAGS = @LDFLAGS@ -LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@ -LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ +LIBCPIO_LIBDEPS = @LIBCPIO_LIBDEPS@ +LIBCPIO_LTLIBDEPS = @LIBCPIO_LTLIBDEPS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_SETSOCKOPT = @LIB_SETSOCKOPT@ -LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ -LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ -LOCALE_JA = @LOCALE_JA@ -LOCALE_ZH_CN = @LOCALE_ZH_CN@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ @@ -543,46 +314,6 @@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ -NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ -NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ -NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ -NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ -NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ -NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ -NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@ -NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ -NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ -NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ -NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ -NEXT_AS_FIRST_DIRECTIVE_STRINGS_H = @NEXT_AS_FIRST_DIRECTIVE_STRINGS_H@ -NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@ -NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H = @NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H@ -NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@ -NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@ -NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@ -NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@ -NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ -NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ -NEXT_DIRENT_H = @NEXT_DIRENT_H@ -NEXT_ERRNO_H = @NEXT_ERRNO_H@ -NEXT_FCNTL_H = @NEXT_FCNTL_H@ -NEXT_FLOAT_H = @NEXT_FLOAT_H@ -NEXT_GETOPT_H = @NEXT_GETOPT_H@ -NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ -NEXT_STDARG_H = @NEXT_STDARG_H@ -NEXT_STDDEF_H = @NEXT_STDDEF_H@ -NEXT_STDINT_H = @NEXT_STDINT_H@ -NEXT_STDIO_H = @NEXT_STDIO_H@ -NEXT_STDLIB_H = @NEXT_STDLIB_H@ -NEXT_STRINGS_H = @NEXT_STRINGS_H@ -NEXT_STRING_H = @NEXT_STRING_H@ -NEXT_SYSEXITS_H = @NEXT_SYSEXITS_H@ -NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ -NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ -NEXT_TIME_H = @NEXT_TIME_H@ -NEXT_UNISTD_H = @NEXT_UNISTD_H@ -NEXT_WCHAR_H = @NEXT_WCHAR_H@ -NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -592,138 +323,55 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ -PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@ PRIPTR_PREFIX = @PRIPTR_PREFIX@ PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ PU_RMT_PROG = @PU_RMT_PROG@ RANLIB = @RANLIB@ -REPLACE_BTOWC = @REPLACE_BTOWC@ -REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ REPLACE_CHOWN = @REPLACE_CHOWN@ -REPLACE_CLOSE = @REPLACE_CLOSE@ -REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ -REPLACE_DPRINTF = @REPLACE_DPRINTF@ -REPLACE_DUP = @REPLACE_DUP@ -REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_FCHDIR = @REPLACE_FCHDIR@ -REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ -REPLACE_FCLOSE = @REPLACE_FCLOSE@ -REPLACE_FCNTL = @REPLACE_FCNTL@ -REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ -REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ -REPLACE_FPURGE = @REPLACE_FPURGE@ -REPLACE_FREOPEN = @REPLACE_FREOPEN@ REPLACE_FSEEK = @REPLACE_FSEEK@ REPLACE_FSEEKO = @REPLACE_FSEEKO@ -REPLACE_FSTAT = @REPLACE_FSTAT@ -REPLACE_FSTATAT = @REPLACE_FSTATAT@ REPLACE_FTELL = @REPLACE_FTELL@ REPLACE_FTELLO = @REPLACE_FTELLO@ -REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ -REPLACE_GETDELIM = @REPLACE_GETDELIM@ -REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ -REPLACE_GETLINE = @REPLACE_GETLINE@ -REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ -REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ -REPLACE_LCHOWN = @REPLACE_LCHOWN@ -REPLACE_LINK = @REPLACE_LINK@ -REPLACE_LINKAT = @REPLACE_LINKAT@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ -REPLACE_LSTAT = @REPLACE_LSTAT@ -REPLACE_MBRLEN = @REPLACE_MBRLEN@ -REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ -REPLACE_MBSINIT = @REPLACE_MBSINIT@ -REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ -REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ -REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ -REPLACE_MEMCHR = @REPLACE_MEMCHR@ -REPLACE_MEMMEM = @REPLACE_MEMMEM@ -REPLACE_MKDIR = @REPLACE_MKDIR@ -REPLACE_MKFIFO = @REPLACE_MKFIFO@ -REPLACE_MKNOD = @REPLACE_MKNOD@ REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ -REPLACE_MKTIME = @REPLACE_MKTIME@ REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ -REPLACE_NULL = @REPLACE_NULL@ -REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ -REPLACE_OPEN = @REPLACE_OPEN@ -REPLACE_OPENAT = @REPLACE_OPENAT@ -REPLACE_OPENDIR = @REPLACE_OPENDIR@ -REPLACE_PERROR = @REPLACE_PERROR@ -REPLACE_POPEN = @REPLACE_POPEN@ -REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ -REPLACE_PUTENV = @REPLACE_PUTENV@ -REPLACE_READLINK = @REPLACE_READLINK@ -REPLACE_REALPATH = @REPLACE_REALPATH@ -REPLACE_REMOVE = @REPLACE_REMOVE@ -REPLACE_RENAME = @REPLACE_RENAME@ -REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ -REPLACE_RMDIR = @REPLACE_RMDIR@ -REPLACE_SETENV = @REPLACE_SETENV@ -REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ -REPLACE_STAT = @REPLACE_STAT@ -REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@ -REPLACE_STRCASESTR = @REPLACE_STRCASESTR@ -REPLACE_STRDUP = @REPLACE_STRDUP@ -REPLACE_STRERROR = @REPLACE_STRERROR@ -REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRPTIME = @REPLACE_STRPTIME@ -REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ -REPLACE_STRSTR = @REPLACE_STRSTR@ -REPLACE_STRTOD = @REPLACE_STRTOD@ -REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ -REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ -REPLACE_UNLINK = @REPLACE_UNLINK@ -REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ -REPLACE_UNSETENV = @REPLACE_UNSETENV@ -REPLACE_USLEEP = @REPLACE_USLEEP@ -REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ -REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ -REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ -REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ -REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ -REPLACE_WCTOB = @REPLACE_WCTOB@ -REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ -REPLACE_WRITE = @REPLACE_WRITE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ -STDARG_H = @STDARG_H@ STDBOOL_H = @STDBOOL_H@ -STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ STRIP = @STRIP@ SYSEXITS_H = @SYSEXITS_H@ +SYS_STAT_H = @SYS_STAT_H@ +SYS_TIME_H = @SYS_TIME_H@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ -UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ -UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@ -UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@ -UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ -UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WCHAR_H = @WCHAR_H@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ +WCTYPE_H = @WCTYPE_H@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ -XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ @@ -750,8 +398,6 @@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gl_LIBOBJS = @gl_LIBOBJS@ gl_LTLIBOBJS = @gl_LTLIBOBJS@ -gltests_LIBOBJS = @gltests_LIBOBJS@ -gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ @@ -777,14 +423,13 @@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ rmtdir = $(DEFAULT_RMT_DIR) rmt_PROGRAMS = @PU_RMT_PROG@ rmt_SOURCES = rmt.c -INCLUDES = -I$(top_srcdir)/gnu -I../ -I../gnu -I$(top_srcdir)/lib -LDADD = ../gnu/libgnu.a $(LIBINTL) +INCLUDES = -I$(top_srcdir)/lib -I../ -I../lib +LDADD = ../lib/lib$(PACKAGE).a $(LIBINTL) rmt_LDADD = $(LDADD) $(LIB_SETSOCKOPT) all: all-am @@ -794,14 +439,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits rmt/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnits rmt/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits rmt/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnits rmt/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -819,41 +464,26 @@ $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): install-rmtPROGRAMS: $(rmt_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(rmtdir)" || $(MKDIR_P) "$(DESTDIR)$(rmtdir)" - @list='$(rmt_PROGRAMS)'; test -n "$(rmtdir)" || list=; \ - for p in $$list; do echo "$$p $$p"; done | \ - sed 's/$(EXEEXT)$$//' | \ - while read p p1; do if test -f $$p; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(rmtdir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(rmtdir)$$dir" || exit $$?; \ - } \ - ; done + @list='$(rmt_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(rmtPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(rmtdir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(rmtPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(rmtdir)/$$f" || exit 1; \ + else :; fi; \ + done uninstall-rmtPROGRAMS: @$(NORMAL_UNINSTALL) - @list='$(rmt_PROGRAMS)'; test -n "$(rmtdir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(rmtdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(rmtdir)" && rm -f $$files + @list='$(rmt_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(rmtdir)/$$f'"; \ + rm -f "$(DESTDIR)$(rmtdir)/$$f"; \ + done clean-rmtPROGRAMS: -test -z "$(rmt_PROGRAMS)" || rm -f $(rmt_PROGRAMS) @@ -875,7 +505,7 @@ installcheck-rmtPROGRAMS: $(rmt_PROGRAMS) done; rm -f c$${pid}_.???; exit $$bad rmt$(EXEEXT): $(rmt_OBJECTS) $(rmt_DEPENDENCIES) @rm -f rmt$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(rmt_OBJECTS) $(rmt_LDADD) $(LIBS) + $(LINK) $(rmt_OBJECTS) $(rmt_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -886,17 +516,15 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rmt.Po@am__quote@ .c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` @@ -906,49 +534,45 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - set x; \ + tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique + $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -969,17 +593,13 @@ distdir: $(DISTFILES) if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done @@ -1010,7 +630,6 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -1031,8 +650,6 @@ dvi-am: html: html-am -html-am: - info: info-am info-am: @@ -1041,28 +658,18 @@ install-data-am: install-rmtPROGRAMS install-dvi: install-dvi-am -install-dvi-am: - install-exec-am: install-html: install-html-am -install-html-am: - install-info: install-info-am -install-info-am: - install-man: install-pdf: install-pdf-am -install-pdf-am: - install-ps: install-ps-am -install-ps-am: - installcheck-am: installcheck-rmtPROGRAMS maintainer-clean: maintainer-clean-am @@ -1100,8 +707,7 @@ uninstall-am: uninstall-rmtPROGRAMS ps ps-am tags uninstall uninstall-am uninstall-rmtPROGRAMS -rmt.o: ../gnu/configmake.h - +rmt.o: ../lib/configmake.h # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: @@ -1,32 +1,48 @@ -/* This file is part of GNU Paxutils. - Copyright (C) 2009 Free Software Foundation, Inc. - - 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 3, 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/>. */ +/* Remote connection server. + + Copyright (C) 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2003, 2004, + 2005, 2006 Free Software Foundation, Inc. + + 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, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +/* Copyright (C) 1983 Regents of the University of California. + All rights reserved. + + Redistribution and use in source and binary forms are permitted provided + that the above copyright notice and this paragraph are duplicated in all + such forms and that any documentation, advertising materials, and other + materials related to such distribution and use acknowledge that the + software was developed by the University of California, Berkeley. The + name of the University may not be used to endorse or promote products + derived from this software without specific prior written permission. + THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ #include "system.h" #include "system-ioctl.h" +#include <closeout.h> #include <configmake.h> -#include <argp.h> -#include <argp-version-etc.h> -#include <getopt.h> -#include <full-write.h> -#include <configmake.h> -#include <inttostr.h> -#include <error.h> -#include <progname.h> -#include <c-ctype.h> #include <safe-read.h> +#include <full-write.h> +#include <version-etc.h> +#define obstack_chunk_alloc malloc +#define obstack_chunk_free free +#include <obstack.h> +#include <getopt.h> +#include <sys/socket.h> #ifndef EXIT_FAILURE # define EXIT_FAILURE 1 @@ -35,778 +51,626 @@ # define EXIT_SUCCESS 0 #endif - -int dbglev; -FILE *dbgout; - -#define DEBUG(lev,msg) \ - do { if (dbgout && (lev) <= dbglev) fprintf (dbgout, "%s", msg); } while (0) -#define DEBUG1(lev, fmt, x) \ - do { if (dbgout && (lev) <= dbglev) fprintf (dbgout, fmt, x); } while (0) -#define DEBUG2(lev, fmt, x1, x2) \ - do \ - { \ - if (dbgout && (lev) <= dbglev) \ - fprintf (dbgout, fmt, x1, x2); \ - } \ - while (0) - -#define VDEBUG(lev, pfx, fmt, ap) \ - do \ - { \ - if (dbgout && (lev) <= dbglev) \ - { \ - fprintf (dbgout, "%s", pfx); \ - vfprintf (dbgout, fmt, ap); \ - } \ - } \ - while (0) - +/* Maximum size of a string from the requesting program. + It must hold enough for any integer, possibly with a sign. */ +#define STRING_SIZE (UINTMAX_STRSIZE_BOUND + 1) + +const char *program_name; + +/* File descriptor of the tape device, or negative if none open. */ +static int tape = -1; + +/* Buffer containing transferred data, and its allocated size. */ +static char *record_buffer; +static size_t allocated_size; + +/* Buffer for constructing the reply. */ +static char reply_buffer[BUFSIZ]; + +/* Obstack for arbitrary-sized strings */ +struct obstack string_stk; + +/* Debugging tools. */ + +static FILE *debug_file; + +#define DEBUG(File) \ + if (debug_file) fprintf(debug_file, File) + +#define DEBUG1(File, Arg) \ + if (debug_file) fprintf(debug_file, File, Arg) + +#define DEBUG2(File, Arg1, Arg2) \ + if (debug_file) fprintf(debug_file, File, Arg1, Arg2) - static void -trimnl (char *str) +report_error_message (const char *string) { - if (str) - { - size_t len = strlen (str); - if (len > 1 && str[len-1] == '\n') - str[len-1] = 0; - } + DEBUG1 ("rmtd: E 0 (%s)\n", string); + + sprintf (reply_buffer, "E0\n%s\n", string); + full_write (STDOUT_FILENO, reply_buffer, strlen (reply_buffer)); } - - -char *input_buf_ptr = NULL; -size_t input_buf_size = 0; +static void +report_numbered_error (int num) +{ + DEBUG2 ("rmtd: E %d (%s)\n", num, strerror (num)); + + sprintf (reply_buffer, "E%d\n%s\n", num, strerror (num)); + full_write (STDOUT_FILENO, reply_buffer, strlen (reply_buffer)); +} -char * -rmt_read (void) +static char * +get_string (void) { - ssize_t rc = getline (&input_buf_ptr, &input_buf_size, stdin); - if (rc > 0) + for (;;) { - DEBUG1 (10, "C: %s", input_buf_ptr); - trimnl (input_buf_ptr); - return input_buf_ptr; + char c; + if (safe_read (STDIN_FILENO, &c, 1) != 1) + exit (EXIT_SUCCESS); + + if (c == '\n') + break; + + obstack_1grow (&string_stk, c); } - DEBUG (10, "reached EOF"); - return NULL; + obstack_1grow (&string_stk, 0); + return obstack_finish (&string_stk); } -void -rmt_write (const char *fmt, ...) +static void +free_string (char *string) { - va_list ap; - va_start (ap, fmt); - vfprintf (stdout, fmt, ap); - VDEBUG (10, "S: ", fmt, ap); + obstack_free (&string_stk, string); } -void -rmt_reply (uintmax_t code) +static void +get_string_n (char *string) { - char buf[UINTMAX_STRSIZE_BOUND]; - rmt_write ("A%s\n", umaxtostr (code, buf)); -} + size_t counter; -void -rmt_error_message (int code, const char *msg) -{ - DEBUG1 (10, "S: E%d\n", code); - DEBUG1 (10, "S: %s\n", msg); - DEBUG1 (1, "error: %s\n", msg); - fprintf (stdout, "E%d\n%s\n", code, msg); -} + for (counter = 0; ; counter++) + { + if (safe_read (STDIN_FILENO, string + counter, 1) != 1) + exit (EXIT_SUCCESS); -void -rmt_error (int code) -{ - rmt_error_message (code, strerror (code)); -} + if (string[counter] == '\n') + break; - -char *record_buffer_ptr; -size_t record_buffer_size; + if (counter == STRING_SIZE - 1) + report_error_message (N_("Input string too long")); + } + string[counter] = '\0'; +} -static void -prepare_record_buffer (size_t size) +static long int +get_long (char const *string) { - if (size > record_buffer_size) + char *p; + long int n; + errno = 0; + n = strtol (string, &p, 10); + if (errno == ERANGE) + { + report_numbered_error (errno); + exit (EXIT_FAILURE); + } + if (!*string || *p) { - record_buffer_ptr = xrealloc (record_buffer_ptr, size); - record_buffer_size = size; + report_error_message (N_("Number syntax error")); + exit (EXIT_FAILURE); } + return n; } - - -int device_fd = -1; - -struct rmt_kw +static void +prepare_input_buffer (int fd, size_t size) { - char const *name; - size_t len; - int value; -}; + if (size <= allocated_size) + return; -#define RMT_KW(s,v) { #s, sizeof (#s) - 1, v } + if (record_buffer) + free (record_buffer); -int -xlat_kw (const char *s, const char *pfx, - struct rmt_kw const *kw, int *valp, const char **endp) -{ - size_t slen = strlen (s); + record_buffer = malloc (size); - if (pfx) + if (! record_buffer) { - size_t pfxlen = strlen (pfx); - if (slen > pfxlen && memcmp (s, pfx, pfxlen) == 0) - { - s += pfxlen; - slen -= pfxlen; - } + DEBUG (_("rmtd: Cannot allocate buffer space\n")); + + report_error_message (N_("Cannot allocate buffer space")); + exit (EXIT_FAILURE); /* exit status used to be 4 */ } - - for (; kw->name; kw++) + + allocated_size = size; + +#ifdef SO_RCVBUF + if (0 <= fd) { - if (slen >= kw->len - && memcmp (kw->name, s, kw->len) == 0 - && !(s[kw->len] && c_isalnum (s[kw->len]))) - { - *valp = kw->value; - *endp = s + kw->len; - return 0; - } + int isize = size < INT_MAX ? size : INT_MAX; + while (setsockopt (fd, SOL_SOCKET, SO_RCVBUF, + (char *) &isize, sizeof isize) + && 1024 < isize) + isize >>= 1; } - return 1; +#endif } -const char * -skip_ws (const char *s) +/* Decode OFLAG_STRING, which represents the 2nd argument to `open'. + OFLAG_STRING should contain an optional integer, followed by an optional + symbolic representation of an open flag using only '|' to separate its + components (e.g. "O_WRONLY|O_CREAT|O_TRUNC"). Prefer the symbolic + representation if available, falling back on the numeric + representation, or to zero if both formats are absent. + + This function should be the inverse of encode_oflag. The numeric + representation is not portable from one host to another, but it is + for backward compatibility with old-fashioned clients that do not + emit symbolic open flags. */ + +static int +decode_oflag (char const *oflag_string) { - while (*s && c_isblank (*s)) - s++; - return s; -} + char *oflag_num_end; + int numeric_oflag = strtol (oflag_string, &oflag_num_end, 10); + int symbolic_oflag = 0; -static struct rmt_kw const open_flag_kw[] = - { + oflag_string = oflag_num_end; + while (ISSPACE ((unsigned char) *oflag_string)) + oflag_string++; + + do + { + struct name_value_pair { char const *name; int value; }; + static struct name_value_pair const table[] = + { #ifdef O_APPEND - RMT_KW(APPEND, O_APPEND), + {"APPEND", O_APPEND}, #endif - RMT_KW(CREAT, O_CREAT), + {"CREAT", O_CREAT}, #ifdef O_DSYNC - RMT_KW(DSYNC, O_DSYNC), + {"DSYNC", O_DSYNC}, #endif - RMT_KW(EXCL, O_EXCL), + {"EXCL", O_EXCL}, #ifdef O_LARGEFILE - RMT_KW(LARGEFILE, O_LARGEFILE), + {"LARGEFILE", O_LARGEFILE}, /* LFS extension for opening large files */ #endif #ifdef O_NOCTTY - RMT_KW(NOCTTY, O_NOCTTY), + {"NOCTTY", O_NOCTTY}, #endif #if O_NONBLOCK - RMT_KW(NONBLOCK, O_NONBLOCK), + {"NONBLOCK", O_NONBLOCK}, #endif - RMT_KW(RDONLY, O_RDONLY), - RMT_KW(RDWR, O_RDWR), + {"RDONLY", O_RDONLY}, + {"RDWR", O_RDWR}, #ifdef O_RSYNC - RMT_KW(RSYNC, O_RSYNC), + {"RSYNC", O_RSYNC}, #endif #ifdef O_SYNC - RMT_KW(SYNC, O_SYNC), + {"SYNC", O_SYNC}, #endif - RMT_KW(TRUNC, O_TRUNC), - RMT_KW(WRONLY, O_WRONLY), - { NULL } - }; + {"TRUNC", O_TRUNC}, + {"WRONLY", O_WRONLY} + }; + struct name_value_pair const *t; + size_t s; + + if (*oflag_string++ != 'O' || *oflag_string++ != '_') + return numeric_oflag; + + for (t = table; + (strncmp (oflag_string, t->name, s = strlen (t->name)) != 0 + || (oflag_string[s] + && strchr ("ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789", + oflag_string[s]))); + t++) + if (t == table + sizeof table / sizeof *table - 1) + return numeric_oflag; + + symbolic_oflag |= t->value; + oflag_string += s; + } + while (*oflag_string++ == '|'); -int -decode_open_flag (const char *mstr, int *pmode) + return symbolic_oflag; +} + +static struct option const long_opts[] = { - int mode = 0; + {"help", no_argument, 0, 'h'}, + {"version", no_argument, 0, 'v'}, + {0, 0, 0, 0} +}; - while (mstr) - { - int v; - const char *p; +/* In-line localization is used only if --help or --version are + locally used. Otherwise, the localization burden lies with tar. */ +static void +i18n_setup () +{ + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); +} - mstr = skip_ws (mstr); - if (*mstr == 0) - break; - else if (c_isdigit (*mstr)) - v = strtol (mstr, (char**) &p, 10); - else if (xlat_kw (mstr, "O_", open_flag_kw, &v, &p)) - { - rmt_error_message (EINVAL, "invalid open mode"); - return 1; - } +static void usage (int) __attribute__ ((noreturn)); - mode |= v; - - if (*p && c_isblank (*p)) - p = skip_ws (p); - if (*p == 0) - break; - else if (*p == '|') - { - /* FIXMEL - if (p[1] == 0) - rmt_error_message (EINVAL, "invalid open mode"); - */ - mstr = p + 1; - } - else - { - rmt_error_message (EINVAL, "invalid open mode"); - return 1; - } +static void +usage (int status) +{ + i18n_setup (); + + if (status != EXIT_SUCCESS) + fprintf (stderr, _("Try `%s --help' for more information.\n"), + program_name); + else + { + printf (_("\ +Usage: %s [OPTION]\n\ +Manipulate a tape drive, accepting commands from a remote process.\n\ +\n\ + --version Output version info.\n\ + --help Output this help.\n"), + program_name); + printf (_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); + close_stdout (); } - *pmode = mode; - return 0; + + exit (status); } - -/* Syntax - ------ - O<device>\n<flags>\n - - Function - -------- - Opens the <device> with given <flags>. If a device had already been opened, - it is closed before opening the new one. - - Arguments - --------- - <device> - name of the device to open. - <flags> - flags for open(2): a decimal number, or any valid O_* constant - from fcntl.h (the initial O_ may be omitted), or a bitwise or (using '|') - of any number of these, e.g.: - - 576 - 64|512 - CREAT|TRUNC - - Reply - ----- - A0\n on success, E<errno>\n<msg>\n on error. - - Extensions - ---------- - The BSD version allows only decimal number as <flags>. -*/ - static void -open_device (char *str) +respond (long int status) { - char *device = xstrdup (str); - char *flag_str; - int flag; - - flag_str = rmt_read (); - if (!flag_str) - { - DEBUG (1, "unexpected EOF"); - exit (EXIT_FAILURE); - } - if (decode_open_flag (flag_str, &flag) == 0) - { - if (device_fd >= 0) - close (device_fd); + DEBUG1 ("rmtd: A %ld\n", status); - device_fd = open (device, flag, MODE_RW); - if (device_fd < 0) - rmt_error (errno); - else - rmt_reply (0); - } - free (device); + sprintf (reply_buffer, "A%ld\n", status); + full_write (STDOUT_FILENO, reply_buffer, strlen (reply_buffer)); } + -/* Syntax - ------ - C[<device>]\n - - Function - -------- - Close the currently open device. - - Arguments - --------- - Any arguments are silently ignored. - - Reply - ----- - A0\n on success, E<errno>\n<msg>\n on error. -*/ + +static void +open_device (void) +{ + char *device_string = get_string (); + char *oflag_string = get_string (); + + DEBUG2 ("rmtd: O %s %s\n", device_string, oflag_string); + + if (tape >= 0) + close (tape); + + tape = open (device_string, decode_oflag (oflag_string), MODE_RW); + if (tape < 0) + report_numbered_error (errno); + else + respond (0); + free_string (device_string); + free_string (oflag_string); +} + static void -close_device () +close_device (void) { - if (close (device_fd) < 0) - rmt_error (errno); + free_string (get_string ()); /* discard */ + DEBUG ("rmtd: C\n"); + + if (close (tape) < 0) + report_numbered_error (errno); else { - device_fd = -1; - rmt_reply (0); + tape = -1; + respond (0); } } - -/* Syntax - ------ - L<whence>\n<offset>\n - - Function - -------- - Perform an lseek(2) on the currently open device with the specified - parameters. - - Arguments - --------- - <whence> - Where to measure offset from. Valid values are: - 0, SET, SEEK_SET to seek from the file beginning, - 1, CUR, SEEK_CUR to seek from the current location in file, - 2, END, SEEK_END to seek from the file end. - Reply - ----- - A<offset>\n on success. The <offset> is the new offset in file. - E<errno>\n<msg>\n on error. - - Extensions - ---------- - The BSD version allows only 0,1,2 as <whence>. -*/ - -static struct rmt_kw const seek_whence_kw[] = - { - RMT_KW(SET, SEEK_SET), - RMT_KW(CUR, SEEK_CUR), - RMT_KW(END, SEEK_END), - { NULL } - }; - -void -lseek_device (const char *str) + +static void +lseek_device (void) { - char *p; + char count_string[STRING_SIZE]; + char position_string[STRING_SIZE]; + off_t count = 0; + int negative; int whence; - off_t off; - uintmax_t n; - - if (str[0] && str[1] == 0) - { - switch (str[0]) - { - case '0': - whence = SEEK_SET; - break; + char *p; - case '1': - whence = SEEK_CUR; - break; + get_string_n (count_string); + get_string_n (position_string); + DEBUG2 ("rmtd: L %s %s\n", count_string, position_string); - case '2': - whence = SEEK_END; - break; + /* Parse count_string, taking care to check for overflow. + We can't use standard functions, + since off_t might be longer than long. */ - default: - rmt_error_message (EINVAL, N_("Seek direction out of range")); - return; + for (p = count_string; *p == ' ' || *p == '\t'; p++) + ; + + negative = *p == '-'; + p += negative || *p == '+'; + + for (; *p; p++) + { + int digit = *p - '0'; + if (9 < (unsigned) digit) + { + report_error_message (N_("Seek offset error")); + exit (EXIT_FAILURE); + } + else + { + off_t c10 = 10 * count; + off_t nc = negative ? c10 - digit : c10 + digit; + if (c10 / 10 != count || (negative ? c10 < nc : nc < c10)) + { + report_error_message (N_("Seek offset out of range")); + exit (EXIT_FAILURE); + } + count = nc; } } - else if (xlat_kw (str, "SEEK_", seek_whence_kw, &whence, (const char **) &p)) + + switch (get_long (position_string)) { - rmt_error_message (EINVAL, N_("Invalid seek direction")); - return; + case 0: + whence = SEEK_SET; + break; + + case 1: + whence = SEEK_CUR; + break; + + case 2: + whence = SEEK_END; + break; + + default: + report_error_message (N_("Seek direction out of range")); + exit (EXIT_FAILURE); } - str = rmt_read (); - n = off = strtoumax (str, &p, 10); - if (*p) + count = lseek (tape, count, whence); + if (count < 0) + report_numbered_error (errno); + else { - rmt_error_message (EINVAL, N_("Invalid seek offset")); - return; + /* Convert count back to string for reply. + We can't use sprintf, since off_t might be longer + than long. */ + p = count_string + sizeof count_string; + *--p = '\0'; + do + *--p = '0' + (int) (count % 10); + while ((count /= 10) != 0); + + DEBUG1 ("rmtd: A %s\n", p); + + sprintf (reply_buffer, "A%s\n", p); + full_write (STDOUT_FILENO, reply_buffer, strlen (reply_buffer)); } - - if (n != off || errno == ERANGE) +} + +static void +write_device (void) +{ + char count_string[STRING_SIZE]; + size_t size; + size_t counter; + size_t status = 0; + + get_string_n (count_string); + size = get_long (count_string); + DEBUG1 ("rmtd: W %s\n", count_string); + + prepare_input_buffer (STDIN_FILENO, size); + for (counter = 0; counter < size; counter += status) { - rmt_error_message (EINVAL, N_("Seek offset out of range")); - return; - } + status = safe_read (STDIN_FILENO, &record_buffer[counter], + size - counter); + if (status == SAFE_READ_ERROR || status == 0) + { + DEBUG (_("rmtd: Premature eof\n")); - off = lseek (device_fd, off, whence); - if (off < 0) - rmt_error (errno); + report_error_message (N_("Premature end of file")); + exit (EXIT_FAILURE); /* exit status used to be 2 */ + } + } + status = full_write (tape, record_buffer, size); + if (status != size) + report_numbered_error (errno); else - rmt_reply (off); + respond (status); } - -/* Syntax - ------ - R<count>\n - - Function - -------- - Read <count> bytes of data from the current device. - - Arguments - --------- - <count> - number of bytes to read. - - Reply - ----- - On success: A<rdcount>\n, followed by <rdcount> bytes of data read from - the device. - On error: E<errno>\n<msg>\n -*/ - -void -read_device (const char *str) + +static void +read_device (void) { - char *p; + char count_string[STRING_SIZE]; size_t size; - uintmax_t n; size_t status; - - n = size = strtoumax (str, &p, 10); - if (*p) - { - rmt_error_message (EINVAL, N_("Invalid byte count")); - return; - } - - if (n != size || errno == ERANGE) - { - rmt_error_message (EINVAL, N_("Byte count out of range")); - return; - } - prepare_record_buffer (size); - status = safe_read (device_fd, record_buffer_ptr, size); + get_string_n (count_string); + DEBUG1 ("rmtd: R %s\n", count_string); + + size = get_long (count_string); + prepare_input_buffer (-1, size); + status = safe_read (tape, record_buffer, size); if (status == SAFE_READ_ERROR) - rmt_error (errno); + report_numbered_error (errno); else { - rmt_reply (status); - full_write (STDOUT_FILENO, record_buffer_ptr, status); + sprintf (reply_buffer, "A%lu\n", (unsigned long int) status); + full_write (STDOUT_FILENO, reply_buffer, strlen (reply_buffer)); + full_write (STDOUT_FILENO, record_buffer, status); } } - -/* Syntax - ------ - W<count>\n followed by <count> bytes of input data. - - Function - -------- - Write data onto the current device. - - Arguments - --------- - <count> - number of bytes. - - Reply - ----- - On success: A<wrcount>\n, where <wrcount> is number of bytes actually - written. - On error: E<errno>\n<msg>\n -*/ - -void -write_device (const char *str) + +static void +mtioctop (void) { - char *p; - size_t size; - uintmax_t n; - size_t status; - - n = size = strtoumax (str, &p, 10); - if (*p) - { - rmt_error_message (EINVAL, N_("Invalid byte count")); - return; - } - - if (n != size || errno == ERANGE) - { - rmt_error_message (EINVAL, N_("Byte count out of range")); - return; - } + char operation_string[STRING_SIZE]; + char count_string[STRING_SIZE]; - prepare_record_buffer (size); - if (fread (record_buffer_ptr, size, 1, stdin) != 1) - { - if (feof (stdin)) - rmt_error_message (EIO, N_("Premature eof")); - else - rmt_error (errno); - return; - } + get_string_n (operation_string); + get_string_n (count_string); + DEBUG2 ("rmtd: I %s %s\n", operation_string, count_string); - status = full_write (device_fd, record_buffer_ptr, size); - if (status != size) - rmt_error (errno); - else - rmt_reply (status); -} - -/* Syntax - ------ - I<opcode>\n<count>\n - - Function - -------- - Perform a MTIOCOP ioctl(2) command using the specified paramedters. - - Arguments - --------- - <opcode> - MTIOCOP operation code. - <count> - mt_count. - - Reply - ----- - On success: A0\n - On error: E<errno>\n<msg>\n -*/ - -void -iocop_device (const char *str) -{ - char *p; - long opcode; - off_t count; - uintmax_t n; - - opcode = strtol (str, &p, 10); - if (*p) - { - rmt_error_message (EINVAL, N_("Invalid operation code")); - return; - } - str = rmt_read (); - n = count = strtoumax (str, &p, 10); - if (*p) - { - rmt_error_message (EINVAL, N_("Invalid byte count")); - return; - } - - if (n != count || errno == ERANGE) - { - rmt_error_message (EINVAL, N_("Byte count out of range")); - return; - } - #ifdef MTIOCTOP { struct mtop mtop; + const char *p; + off_t count = 0; + int negative; + + /* Parse count_string, taking care to check for overflow. + We can't use standard functions, + since off_t might be longer than long. */ + + for (p = count_string; *p == ' ' || *p == '\t'; p++) + ; + + negative = *p == '-'; + p += negative || *p == '+'; + + for (;;) + { + int digit = *p++ - '0'; + if (9 < (unsigned) digit) + break; + else + { + off_t c10 = 10 * count; + off_t nc = negative ? c10 - digit : c10 + digit; + if (c10 / 10 != count + || (negative ? c10 < nc : nc < c10)) + { + report_error_message (N_("Seek offset out of range")); + exit (EXIT_FAILURE); + } + count = nc; + } + } mtop.mt_count = count; if (mtop.mt_count != count) { - rmt_error_message (EINVAL, N_("Byte count out of range")); - return; + report_error_message (N_("Seek offset out of range")); + exit (EXIT_FAILURE); } + mtop.mt_op = get_long (operation_string); - mtop.mt_op = opcode; - if (ioctl (device_fd, MTIOCTOP, (char *) &mtop) < 0) - rmt_error (errno); - else - rmt_reply (0); + if (ioctl (tape, MTIOCTOP, (char *) &mtop) < 0) + { + report_numbered_error (errno); + return; + } } -#else - rmt_error_message (ENOSYS, N_("Operation not supported")); #endif + respond (0); } - -/* Syntax - ------ - S\n - - Function - -------- - Return the status of the open device, as obtained with a MTIOCGET - ioctl call. - - Arguments - --------- - None - - Reply - ----- - On success: A<count>\n followed by <count> bytes of data. - On error: E<errno>\n<msg>\n -*/ - -void -status_device (const char *str) + +static void +status_device (void) { - if (*str) - { - rmt_error_message (EINVAL, N_("Unexpected arguments")); - return; - } + DEBUG ("rmtd: S\n"); + #ifdef MTIOCGET { - struct mtget mtget; + struct mtget operation; - if (ioctl (device_fd, MTIOCGET, (char *) &mtget) < 0) - rmt_error (errno); + if (ioctl (tape, MTIOCGET, (char *) &operation) < 0) + report_numbered_error (errno); else { - rmt_reply (sizeof (mtget)); - full_write (STDOUT_FILENO, (char *) &mtget, sizeof (mtget)); + respond (sizeof operation); + full_write (STDOUT_FILENO, (char *) &operation, sizeof operation); } } -#else - rmt_error_message (ENOSYS, N_("Operation not supported")); #endif } - - - -const char *argp_program_version = "rmt (" PACKAGE_NAME ") " VERSION; -const char *argp_program_bug_address = "<" PACKAGE_BUGREPORT ">"; -static char const doc[] = N_("Manipulate a tape drive, accepting commands from a remote process"); +int +main (int argc, char **argv) +{ + char command; -enum { - DEBUG_FILE_OPTION = 256 -}; + program_name = argv[0]; -static struct argp_option options[] = { - { "debug", 'd', N_("NUMBER"), 0, - N_("set debug level"), 0 }, - { "debug-file", DEBUG_FILE_OPTION, N_("FILE"), 0, - N_("set debug output file name"), 0 }, - { NULL } -}; + obstack_init (&string_stk); -static error_t -parse_opt (int key, char *arg, struct argp_state *state) -{ - switch (key) + switch (getopt_long (argc, argv, "", long_opts, NULL)) { - case 'd': - dbglev = strtol (arg, NULL, 0); - break; - - case DEBUG_FILE_OPTION: - dbgout = fopen (arg, "w"); - if (!dbgout) - error (EXIT_FAILURE, errno, _("cannot open %s"), arg); - break; - - case ARGP_KEY_FINI: - if (dbglev) - { - if (!dbgout) - dbgout = stderr; - } - else if (dbgout) - dbglev = 1; - break; - default: - return ARGP_ERR_UNKNOWN; - } - return 0; -} - -static struct argp argp = { - options, - parse_opt, - NULL, - doc, - NULL, - NULL, - NULL -}; + usage (EXIT_FAILURE); -static const char *rmt_authors[] = { - "Sergey Poznyakoff", - NULL -}; + case 'h': + usage (EXIT_SUCCESS); - -void -xalloc_die (void) -{ - rmt_error (ENOMEM); - exit (EXIT_FAILURE); -} + case 'v': + i18n_setup (); + version_etc (stdout, "rmt", PACKAGE_NAME, PACKAGE_VERSION, + "John Gilmore", "Jay Fenlason", (char *) NULL); + close_stdout (); + return EXIT_SUCCESS; - -int -main (int argc, char **argv) -{ - char *buf; - int idx; - int stop = 0; - - set_program_name (argv[0]); - argp_version_setup ("rmt", rmt_authors); - - if (isatty (STDOUT_FILENO)) - { - setlocale (LC_ALL, ""); - bindtextdomain (PACKAGE, LOCALEDIR); - textdomain (PACKAGE); + case -1: + break; } - - if (argp_parse (&argp, argc, argv, ARGP_IN_ORDER, &idx, NULL)) - exit (EXIT_FAILURE); - if (idx != argc) + + if (optind < argc) { - if (idx != argc - 1) - error (EXIT_FAILURE, 0, _("too many arguments")); - dbgout = fopen (argv[idx], "w"); - if (!dbgout) - error (EXIT_FAILURE, errno, _("cannot open %s"), argv[idx]); - dbglev = 1; + if (optind != argc - 1) + usage (EXIT_FAILURE); + debug_file = fopen (argv[optind], "w"); + if (debug_file == 0) + { + report_numbered_error (errno); + return EXIT_FAILURE; + } + setbuf (debug_file, 0); } - - while (!stop && (buf = rmt_read ()) != NULL) + + while (1) { - switch (buf[0]) + errno = 0; + + if (safe_read (STDIN_FILENO, &command, 1) != 1) + return EXIT_SUCCESS; + + switch (command) { + case 'O': + open_device (); + break; + case 'C': close_device (); - stop = 1; - break; - - case 'I': - iocop_device (buf + 1); break; - + case 'L': - lseek_device (buf + 1); + lseek_device (); break; - - case 'O': - open_device (buf + 1); + + case 'W': + write_device (); break; - + case 'R': - read_device (buf + 1); + read_device (); break; - - case 'S': - status_device (buf + 1); + + case 'I': + mtioctop (); break; - - case 'W': - write_device (buf + 1); + + case 'S': + status_device (); break; - + default: - DEBUG1 (1, "garbage input %s\n", buf); - rmt_error_message (EINVAL, N_("Garbage command")); + DEBUG1 ("rmtd: Garbage command %c\n", command); + report_error_message (N_("Garbage command")); return EXIT_FAILURE; /* exit status used to be 3 */ - } + } } - if (device_fd >= 0) - close_device (); - free (input_buf_ptr); - free (record_buffer_ptr); - return EXIT_SUCCESS; } |