view modules/signal-h @ 17074:d4ccb0388f18

fts: reduce two or more trailing slashes to just one, usually * lib/fts.c (fts_open): Upon initialization, if a name ends in two or more slashes, trim all but the final one. But if a name consists solely of two slashes, don't modify it. If it consists solely of three or more slashes, strip all but one. This is part of the solution to a minor problem with rm: it would print a bogus ELOOP diagnostic when failing to remove the slash-decorated name of a symlink-to-directory: $ mkdir d && ln -s d s && env rm -r s/ rm: cannot remove 's': Too many levels of symbolic links With the change below and a trivial don't-trim-trailing-slashes adjustment to remove.c, it does this: $ env rm -r s/ rm: cannot remove 's/': Not a directory Improved by: Eric Blake
author Jim Meyering <meyering@redhat.com>
date Tue, 04 Sep 2012 11:36:38 +0200
parents 51a803e5cfdc
children
line wrap: on
line source

Description:
A GNU-like <signal.h>.

Files:
lib/signal.in.h
m4/signal_h.m4

Depends-on:
include_next
snippet/arg-nonnull
snippet/c++defs
snippet/warn-on-use
extensions

configure.ac:
gl_SIGNAL_H

Makefile.am:
BUILT_SOURCES += signal.h

# We need the following in order to create <signal.h> when the system
# doesn't have a complete one.
signal.h: signal.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
	$(AM_V_GEN)rm -f $@-t $@ && \
	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
	  sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
	      -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
	      -e 's|@''NEXT_SIGNAL_H''@|$(NEXT_SIGNAL_H)|g' \
	      -e 's|@''GNULIB_PTHREAD_SIGMASK''@|$(GNULIB_PTHREAD_SIGMASK)|g' \
	      -e 's|@''GNULIB_RAISE''@|$(GNULIB_RAISE)|g' \
	      -e 's/@''GNULIB_SIGNAL_H_SIGPIPE''@/$(GNULIB_SIGNAL_H_SIGPIPE)/g' \
	      -e 's/@''GNULIB_SIGPROCMASK''@/$(GNULIB_SIGPROCMASK)/g' \
	      -e 's/@''GNULIB_SIGACTION''@/$(GNULIB_SIGACTION)/g' \
	      -e 's|@''HAVE_POSIX_SIGNALBLOCKING''@|$(HAVE_POSIX_SIGNALBLOCKING)|g' \
	      -e 's|@''HAVE_PTHREAD_SIGMASK''@|$(HAVE_PTHREAD_SIGMASK)|g' \
	      -e 's|@''HAVE_RAISE''@|$(HAVE_RAISE)|g' \
	      -e 's|@''HAVE_SIGSET_T''@|$(HAVE_SIGSET_T)|g' \
	      -e 's|@''HAVE_SIGINFO_T''@|$(HAVE_SIGINFO_T)|g' \
	      -e 's|@''HAVE_SIGACTION''@|$(HAVE_SIGACTION)|g' \
	      -e 's|@''HAVE_STRUCT_SIGACTION_SA_SIGACTION''@|$(HAVE_STRUCT_SIGACTION_SA_SIGACTION)|g' \
	      -e 's|@''HAVE_TYPE_VOLATILE_SIG_ATOMIC_T''@|$(HAVE_TYPE_VOLATILE_SIG_ATOMIC_T)|g' \
	      -e 's|@''HAVE_SIGHANDLER_T''@|$(HAVE_SIGHANDLER_T)|g' \
	      -e 's|@''REPLACE_PTHREAD_SIGMASK''@|$(REPLACE_PTHREAD_SIGMASK)|g' \
	      -e 's|@''REPLACE_RAISE''@|$(REPLACE_RAISE)|g' \
	      -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
	      -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
	      -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
	      < $(srcdir)/signal.in.h; \
	} > $@-t && \
	mv $@-t $@
MOSTLYCLEANFILES += signal.h signal.h-t

Include:
<signal.h>

License:
LGPLv2+

Maintainer:
all