summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2014-12-20 13:00:21 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2014-12-20 13:01:10 -0800
commit034a18049cbcc4b370052cb1fa28a81000a10849 (patch)
tree1a2cf37ef1803e029dbbeba138816f83c7368edb /modules
parentca6dede24b0172a01754909a8cda015bd8174c00 (diff)
downloadgnulib-034a18049cbcc4b370052cb1fa28a81000a10849.tar.gz
assure: new module
This works better than 'assert' when compiling with -DNDEBUG, as it avoids some compiler diagnostics in that case. Reported by Norihiro Tanaka in: http://lists.gnu.org/archive/html/bug-gnulib/2014-12/msg00215.html * MODULES.html.sh (func_all_modules): Add 'assure'. * lib/assure.h, modules/assure: New files. * lib/chdir-long.c, lib/cycle-check.c, lib/fchdir.c, lib/fts.c: * lib/poll.c, lib/savewd.c, lib/utimens.c, lib/xstrtol.c: Prefer 'assure' to 'assert'. * modules/chdir-long, modules/cycle-check, modules/fchdir: * modules/poll, modules/savewd, modules/utimens, modules/xstrtol: Depend on 'assure'.
Diffstat (limited to 'modules')
-rw-r--r--modules/assure20
-rw-r--r--modules/chdir-long1
-rw-r--r--modules/cycle-check1
-rw-r--r--modules/fchdir1
-rw-r--r--modules/poll1
-rw-r--r--modules/savewd1
-rw-r--r--modules/utimens1
-rw-r--r--modules/xstrtol1
8 files changed, 27 insertions, 0 deletions
diff --git a/modules/assure b/modules/assure
new file mode 100644
index 0000000000..3cfe1f874e
--- /dev/null
+++ b/modules/assure
@@ -0,0 +1,20 @@
+Description:
+Run-time assert-like macros.
+
+Files:
+lib/assure.h
+
+Depends-on:
+
+configure.ac:
+
+Makefile.am:
+
+Include:
+"assure.h"
+
+License:
+LGPLv2+
+
+Maintainer:
+Paul Eggert, Jim Meyering
diff --git a/modules/chdir-long b/modules/chdir-long
index 74d9c33f70..82d4e8bb42 100644
--- a/modules/chdir-long
+++ b/modules/chdir-long
@@ -11,6 +11,7 @@ Depends-on:
unistd
pathmax
chdir
+assure [test $gl_cv_have_arbitrary_file_name_length_limit = yes]
atexit [test $gl_cv_have_arbitrary_file_name_length_limit = yes]
fchdir [test $gl_cv_have_arbitrary_file_name_length_limit = yes]
fcntl-h [test $gl_cv_have_arbitrary_file_name_length_limit = yes]
diff --git a/modules/cycle-check b/modules/cycle-check
index 6a8618a41e..e8ef2caf7e 100644
--- a/modules/cycle-check
+++ b/modules/cycle-check
@@ -7,6 +7,7 @@ lib/cycle-check.h
m4/cycle-check.m4
Depends-on:
+assure
dev-ino
same-inode
stdbool
diff --git a/modules/fchdir b/modules/fchdir
index af6cfa5689..6e95e9a18a 100644
--- a/modules/fchdir
+++ b/modules/fchdir
@@ -7,6 +7,7 @@ m4/fchdir.m4
Depends-on:
unistd
+assure [test $HAVE_FCHDIR = 0]
chdir [test $HAVE_FCHDIR = 0]
close [test $HAVE_FCHDIR = 0]
dirent [test $HAVE_FCHDIR = 0]
diff --git a/modules/poll b/modules/poll
index 8fa88fd4d1..b1d928dd58 100644
--- a/modules/poll
+++ b/modules/poll
@@ -8,6 +8,7 @@ m4/poll.m4
Depends-on:
poll-h
alloca [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1]
+assure [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1]
select [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1]
sockets [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1]
sys_select [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1]
diff --git a/modules/savewd b/modules/savewd
index b7a9feefbb..a6c82672fb 100644
--- a/modules/savewd
+++ b/modules/savewd
@@ -7,6 +7,7 @@ lib/savewd.c
m4/savewd.m4
Depends-on:
+assure
chdir
dosname
errno
diff --git a/modules/utimens b/modules/utimens
index 8797774dcd..4aed50a1e1 100644
--- a/modules/utimens
+++ b/modules/utimens
@@ -9,6 +9,7 @@ m4/utimens.m4
m4/utimes.m4
Depends-on:
+assure
errno
extern-inline
fcntl-h
diff --git a/modules/xstrtol b/modules/xstrtol
index 66e53427eb..9c89aef089 100644
--- a/modules/xstrtol
+++ b/modules/xstrtol
@@ -9,6 +9,7 @@ lib/xstrtol-error.c
m4/xstrtol.m4
Depends-on:
+assure
exitfail
error
getopt-gnu