document locate -S
[findutils.git] / lib / forcefindlib.c
blobbabada1ad67c903aae96eebac1b53670d40ac7ae
1 /* Ensures that the FINDLIB_REPLACE_FUNCS macro in configure.in works
2 Copyright (C) 2004 Free Software Foundation, Inc.
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option)
7 any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
17 USA.
20 /* Written by James Youngman. */
23 #ifdef HAVE_CONFIG_H
24 #include <config.h>
25 #endif
27 /* forcefindlib
29 * This function exists only to be pulled into libfind.a by the
30 * FINDLIB_REPLACE_FUNCS macro in configure.in. We already have
31 * AC_REPLACE_FUNCS, but that adds to LIBOBJS, and that's a gnulib thing
32 * in the case of findutils. Hence we have out own library of replacement
33 * functions which aren't in gnulib (or aren't in it any more). An example
34 * of this is waitpid(). I develop on a system that doesn't
35 * lack waitpid, for example. Therefore FINDLIB_REPLACE_FUNCS(waitpid)
36 * never puts waitpid.o into FINDLIBOBJS. Hence, to ensure that these
37 * macros are tested every time, we use FINDLIB_REPLACE_FUNCS on a function
38 * that never exists anywhere, so always needs to be pulled in. That function
39 * is forcefindlib().
41 void
42 forcefindlib(void)
44 /* does nothing, exists only to ensure that FINDLIB_REPLACE_FUNCS works. */