[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU Inetutils branch, master, updated. inetutils-1_9_2-27-g139c19
From: |
Mats Erik Andersson |
Subject: |
[SCM] GNU Inetutils branch, master, updated. inetutils-1_9_2-27-g139c199 |
Date: |
Fri, 25 Jul 2014 14:48:22 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Inetutils ".
The branch, master has been updated
via 139c19958e5f069ff802bfa580832e52d4aeb357 (commit)
from 8c7a55e6eb1b2d18561e4669e0a7b5a4aa8219ac (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=139c19958e5f069ff802bfa580832e52d4aeb357
commit 139c19958e5f069ff802bfa580832e52d4aeb357
Author: Mats Erik Andersson <address@hidden>
Date: Tue Jul 22 20:42:22 2014 +0200
libls: Inconsistent options.
diff --git a/ChangeLog b/ChangeLog
index 926c36e..49916f7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,24 @@
+2014-07-22 Mats Erik Andersson <address@hidden>
+
+ libls: Inconsistent options.
+ The options '-l', '-m' and '-n' were not overruling each
+ other in the expected manner. Build `ls' from `libls' for
+ testing purposes, but do not install it.
+
+ * configure.ac (enable_libls): Set to `no' when testing
+ against `ac_cv_func_fchdir' fails. Publish with AC_SUBST.
+ [ENABLE_libls]: New variable.
+ * summary.sh.in (libls_BUILD, libls_PROPS, enable_libls):
+ Detect these; report whether `libls' is being built.
+
+ * libls/ls.c (ls_main) <'l' || 'm' || 'n'>: Reset missing
+ flags correctly, in order that '-l', '-m' and '-n' overrule
+ each other on the command line.
+
+ * tests/Makefile.am [ENABLE_libls] (noinst_PROGRAMS): Add `ls'.
+ [ENABLE_libls] (ls_LDADD): New variable.
+ * tests/ls.c: New file.
+
2014-07-17 Mats Erik Andersson <address@hidden>
Portability of canonical host name.
diff --git a/configure.ac b/configure.ac
index 135bff0..e1e4b08 100644
--- a/configure.ac
+++ b/configure.ac
@@ -220,9 +220,12 @@ if test "$enable_libls" = yes && test "$ac_cv_func_fchdir"
= yes ; then
else
LIBLS=''
libls_BUILD=''
+ enable_libls='no'
fi
AC_SUBST(LIBLS)
AC_SUBST(libls_BUILD)
+AC_SUBST(enable_libls)
+AM_CONDITIONAL([ENABLE_libls], test "$enable_libls" = yes)
# At least OpenSolaris is missing <protocols/talkd.h>.
AC_CHECK_HEADER(protocols/talkd.h, , ,
diff --git a/libls/fts.h b/libls/fts.h
index 0678789..a7179b5 100644
--- a/libls/fts.h
+++ b/libls/fts.h
@@ -92,8 +92,8 @@ typedef struct _ftsent
char *fts_path; /* root path */
int fts_errno; /* errno for this node */
int fts_symfd; /* fd for symlink */
- unsigned short fts_pathlen; /* strlen(fts_path) */
- unsigned short fts_namelen; /* strlen(fts_name) */
+ unsigned short fts_pathlen; /* strlen(fts_path) */
+ unsigned short fts_namelen; /* strlen(fts_name) */
ino_t fts_ino; /* inode */
dev_t fts_dev; /* device */
@@ -106,10 +106,10 @@ typedef struct _ftsent
# define FTS_D 1 /* preorder directory */
# define FTS_DC 2 /* directory that causes cycles */
# define FTS_DEFAULT 3 /* none of the above */
-# define FTS_DNR 4 /* unreadable directory */
-# define FTS_DOT 5 /* dot or dot-dot */
+# define FTS_DNR 4 /* unreadable directory */
+# define FTS_DOT 5 /* dot or dot-dot */
# define FTS_DP 6 /* postorder directory */
-# define FTS_ERR 7 /* error; errno is set */
+# define FTS_ERR 7 /* error; errno is set */
# define FTS_F 8 /* regular file */
# define FTS_INIT 9 /* initialized only */
# define FTS_NS 10 /* stat(2) failed */
@@ -117,17 +117,17 @@ typedef struct _ftsent
# define FTS_SL 12 /* symbolic link */
# define FTS_SLNONE 13 /* symbolic link without target */
# define FTS_W 14 /* whiteout object */
- unsigned short fts_info; /* user flags for FTSENT structure */
+ unsigned short fts_info; /* user flags for FTSENT structure */
# define FTS_DONTCHDIR 0x01 /* don't chdir .. to the parent */
# define FTS_SYMFOLLOW 0x02 /* followed a symlink to get here */
- unsigned short fts_flags; /* private flags for FTSENT structure */
+ unsigned short fts_flags; /* private flags for FTSENT structure */
# define FTS_AGAIN 1 /* read node again */
# define FTS_FOLLOW 2 /* follow symbolic link */
# define FTS_NOINSTR 3 /* no instructions */
# define FTS_SKIP 4 /* discard node */
- unsigned short fts_instr; /* fts_set() instructions */
+ unsigned short fts_instr; /* fts_set() instructions */
struct stat *fts_statp; /* stat(2) information */
char fts_name[1]; /* file name */
diff --git a/libls/ls.c b/libls/ls.c
index e837cd2..229f398 100644
--- a/libls/ls.c
+++ b/libls/ls.c
@@ -160,7 +160,7 @@ ls_main (int argc, char **argv)
switch (ch)
{
/*
- * The -1, -C and -l, -m and -x options all override each
+ * The options -1, -C, -l, -m, -n and -x all overrule each
* other so shell aliasing works right.
*/
case '1':
@@ -173,12 +173,12 @@ ls_main (int argc, char **argv)
break;
case 'l':
f_longform = 1;
+ f_numericonly = 0;
f_column = f_columnacross = f_singlecol = f_stream = 0;
break;
case 'm':
f_stream = 1;
- f_column = f_columnacross = f_singlecol = 0;
- f_singlecol = 0;
+ f_column = f_columnacross = f_longform = f_singlecol = 0;
break;
case 'x':
f_columnacross = 1;
@@ -187,7 +187,7 @@ ls_main (int argc, char **argv)
case 'n':
f_longform = 1;
f_numericonly = 1;
- f_column = f_singlecol = 0;
+ f_column = f_columnacross = f_singlecol = f_stream = 0;
break;
/* The -c and -u options override each other. */
case 'c':
diff --git a/summary.sh.in b/summary.sh.in
index fd30315..1bda7a7 100644
--- a/summary.sh.in
+++ b/summary.sh.in
@@ -32,6 +32,9 @@ address@hidden@
address@hidden@
ifconfig_PROPS="@ifconfig_PROPS@"
address@hidden@
address@hidden@
+libls_PROPS="@libls_PROPS@"
address@hidden@
address@hidden@
logger_PROPS="@logger_PROPS@"
address@hidden@
@@ -134,4 +137,8 @@ ${traceroute_BUILD:+ $traceroute_PROPS}
telnetd ${enable_telnetd}${telnetd_BUILD:+ $telnetd_PROPS}
tftpd ${enable_tftpd}
uucpd ${enable_uucpd}
+
+ Support:
+
+ libls ${enable_libls}
EOT
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 7ab0e53..014af85 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -30,6 +30,11 @@ if ENABLE_inetd
check_PROGRAMS += addrpeek tcpget
endif
+if ENABLE_libls
+noinst_PROGRAMS += ls
+ls_LDADD = $(LIBLS) $(iu_LIBRARIES)
+endif
+
dist_check_SCRIPTS = utmp.sh
if ENABLE_ping
dist_check_SCRIPTS += ping-localhost.sh
diff --git a/tests/ls.c b/tests/ls.c
new file mode 100644
index 0000000..d6e2766
--- /dev/null
+++ b/tests/ls.c
@@ -0,0 +1,27 @@
+/* ls - program buildable from libls
+ Copyright (C) 2014 Free Software Foundation, Inc.
+
+ This file is part of GNU Inetutils.
+
+ GNU Inetutils 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 of the License, or (at
+ your option) any later version.
+
+ GNU Inetutils 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/'. */
+
+#include "config.h"
+
+extern int ls_main (int, char **);
+
+int
+main (int argc, char *argv[])
+{
+ return ls_main(argc, argv);
+}
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 21 +++++++++++++++++++++
configure.ac | 3 +++
libls/fts.h | 16 ++++++++--------
libls/ls.c | 8 ++++----
summary.sh.in | 7 +++++++
tests/Makefile.am | 5 +++++
libtelnet/genget.h => tests/ls.c | 17 +++++++++++------
7 files changed, 59 insertions(+), 18 deletions(-)
copy libtelnet/genget.h => tests/ls.c (75%)
hooks/post-receive
--
GNU Inetutils
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU Inetutils branch, master, updated. inetutils-1_9_2-27-g139c199,
Mats Erik Andersson <=