aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/ctm
diff options
context:
space:
mode:
authorGarrett Wollman <wollman@FreeBSD.org>2002-09-21 01:28:41 +0000
committerGarrett Wollman <wollman@FreeBSD.org>2002-09-21 01:28:41 +0000
commit0d3bcc2e8068cb87817b732860cbde589ea25347 (patch)
treec2d8e348e30a733b07a594d611c3ba17a5b0e689 /usr.sbin/ctm
parent0c7fb5347cd38d724f34bacd8f4992a1ea9cc30d (diff)
downloadsrc-0d3bcc2e8068cb87817b732860cbde589ea25347.tar.gz
src-0d3bcc2e8068cb87817b732860cbde589ea25347.zip
Make the threatened fts(3) ABI fix. FTSENT now avoids the use of the struct
hack, thereby allowing future extensions to the structure (e.g., for extended attributes) without rebreaking the ABI. FTSENT now contains a pointer to the parent stream, which fts_compar() can then take advantage of, avoiding the undefined behavior previously warned about. As a consequence of this change, the prototype of the comparison function passed to fts_open() has changed to reflect the required amount of constness for its use. All callers in the tree are updated to use the correct prototype. Comparison functions can now make use of the new parent pointer to access the new stream-specific private data pointer, which is intended to assist creation of reentrant library routines which use fts(3) internally. Not objected to in spirit by: -arch
Notes
Notes: svn path=/head/; revision=103726
Diffstat (limited to 'usr.sbin/ctm')
-rw-r--r--usr.sbin/ctm/ctm_dequeue/ctm_dequeue.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ctm/ctm_dequeue/ctm_dequeue.c b/usr.sbin/ctm/ctm_dequeue/ctm_dequeue.c
index b5a1411adeb4..783fd3f4a1a6 100644
--- a/usr.sbin/ctm/ctm_dequeue/ctm_dequeue.c
+++ b/usr.sbin/ctm/ctm_dequeue/ctm_dequeue.c
@@ -53,7 +53,7 @@
#define DEFAULT_NUM 1 /* Default number of pieces mailed per run. */
-int fts_sort(const FTSENT **, const FTSENT **);
+int fts_sort(const FTSENT * const *, const FTSENT * const *);
int run_sendmail(int ifd);
int
@@ -156,7 +156,7 @@ main(int argc, char **argv)
}
int
-fts_sort(const FTSENT ** a, const FTSENT ** b)
+fts_sort(const FTSENT * const * a, const FTSENT * const * b)
{
if ((*a)->fts_info != FTS_F)
return(0);