From cde86f7e7ed267f1fd7e12a1152e21c418398d31 Mon Sep 17 00:00:00 2001 From: thorpej Date: Tue, 1 Dec 1998 20:13:47 +0000 Subject: [PATCH] Warn about references to the old fts functions, and direct the user to include to generate the correct references. Suggestion from Christoph Badura. --- lib/libc/gen/__fts13.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/lib/libc/gen/__fts13.c b/lib/libc/gen/__fts13.c index b14a3dc5887f..f05b060b2cb1 100644 --- a/lib/libc/gen/__fts13.c +++ b/lib/libc/gen/__fts13.c @@ -1,4 +1,4 @@ -/* $NetBSD: __fts13.c,v 1.13 1998/11/12 16:19:42 christos Exp $ */ +/* $NetBSD: __fts13.c,v 1.14 1998/12/01 20:13:47 thorpej Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94"; #else -__RCSID("$NetBSD: __fts13.c,v 1.13 1998/11/12 16:19:42 christos Exp $"); +__RCSID("$NetBSD: __fts13.c,v 1.14 1998/12/01 20:13:47 thorpej Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -61,13 +61,6 @@ __weak_alias(fts_close,_fts_close); __weak_alias(fts_open,_fts_open); __weak_alias(fts_read,_fts_read); __weak_alias(fts_set,_fts_set); -#else -#error "XXX THESE ARE NOT RIGHT!" -__weak_alias(__fts_children13,____fts_children13); -__weak_alias(__fts_close13,____fts_close13); -__weak_alias(__fts_open13,____fts_open13); -__weak_alias(__fts_read13,____fts_read13); -__weak_alias(__fts_set13,____fts_set13); #endif /* __LIBC12_SOURCE__ */ #endif /* __weak_alias */ @@ -77,6 +70,19 @@ __weak_alias(__fts_set13,____fts_set13); #define STAT stat #endif +#ifdef __LIBC12_SOURCE__ +__warn_references(fts_children, + "warning: reference to compatibility fts_children(); include for correct reference") +__warn_references(fts_close, + "warning: reference to compatibility fts_close(); include for correct reference") +__warn_references(fts_open, + "warning: reference to compatibility fts_open(); include for correct reference") +__warn_references(fts_read, + "warning: reference to compatibility fts_read(); include for correct reference") +__warn_references(fts_set, + "warning: reference to compatibility fts_set(); include for correct reference") +#endif + static FTSENT *fts_alloc __P((FTS *, char *, size_t)); static FTSENT *fts_build __P((FTS *, int)); static void fts_lfree __P((FTSENT *));