summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2011-03-10 08:44:13 +0100
committerJim Meyering <meyering@redhat.com>2011-03-27 09:19:46 +0200
commitdf2831fbdf3e61181a96324852e0a2a0fc6ae79a (patch)
treefb5e71b0119ec999b4569aada91cd23d9bfda784
parent8b78759a8b4cb4e3e04c79547642423e904514d6 (diff)
downloadpatch-df2831fbdf3e61181a96324852e0a2a0fc6ae79a.tar.gz
maint: remove now-unneeded macro definitions
* bootstrap.conf (gnulib_modules): Include gnulib's signal module, so that signal.h guarantees definition of certain macros. * src/util.c (SIG_BLOCK, SIG_UNBLOCK, SIG_SETMASK): Remove definition. Now, gnulib guarantees that these are defined. * src/common.h (SIZE_MAX): Likewise. * cfg.mk (local-checks-to-skip): Enable the sc_prohibit_always-defined_macros check, now that it passes.
-rw-r--r--bootstrap.conf1
-rw-r--r--cfg.mk1
-rw-r--r--src/common.h3
-rw-r--r--src/util.c9
4 files changed, 1 insertions, 13 deletions
diff --git a/bootstrap.conf b/bootstrap.conf
index a42d485..607ad1a 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -49,6 +49,7 @@ realloc
rename
rmdir
setenv
+signal
ssize_t
stat-time
stdbool
diff --git a/cfg.mk b/cfg.mk
index 3d0f355..11f335b 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -26,7 +26,6 @@ local-checks-to-skip = \
sc_file_system \
sc_immutable_NEWS \
sc_obsolete_symbols \
- sc_prohibit_always-defined_macros \
sc_prohibit_always_true_header_tests \
sc_prohibit_magic_number_exit \
sc_prohibit_strcmp \
diff --git a/src/common.h b/src/common.h
index 5597540..43919b8 100644
--- a/src/common.h
+++ b/src/common.h
@@ -39,9 +39,6 @@
#elif HAVE_STDINT_H
# include <stdint.h>
#endif
-#ifndef SIZE_MAX
-#define SIZE_MAX ((size_t) -1)
-#endif
#include <ctype.h>
/* CTYPE_DOMAIN (C) is nonzero if the unsigned char C can safely be given
diff --git a/src/util.c b/src/util.c
index f1187ff..6950842 100644
--- a/src/util.c
+++ b/src/util.c
@@ -1094,15 +1094,6 @@ static int const sigs[] = {
#endif
#define sigaddset(s, sig) (*(s) |= sigmask (sig))
#define sigismember(s, sig) ((*(s) & sigmask (sig)) != 0)
-#ifndef SIG_BLOCK
-#define SIG_BLOCK 0
-#endif
-#ifndef SIG_UNBLOCK
-#define SIG_UNBLOCK (SIG_BLOCK + 1)
-#endif
-#ifndef SIG_SETMASK
-#define SIG_SETMASK (SIG_BLOCK + 2)
-#endif
#define sigprocmask(how, n, o) \
((how) == SIG_BLOCK \
? ((o) ? *(o) = sigblock (*(n)) : sigblock (*(n))) \