cvsimport
[findutils.git] / lib / forcefindlib.c
blob23671f3207868e4d64b17ba5b095030dc04760c8
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
17 USA.
20 /* Written by James Youngman. */
23 #include <config.h>
26 extern void forcefindlib(void); /* prevent GCC warning... */
30 /* forcefindlib
32 * This function exists only to be pulled into libfind.a by the
33 * FINDLIB_REPLACE_FUNCS macro in configure.in. We already have
34 * AC_REPLACE_FUNCS, but that adds to LIBOBJS, and that's a gnulib thing
35 * in the case of findutils. Hence we have out own library of replacement
36 * functions which aren't in gnulib (or aren't in it any more). An example
37 * of this is waitpid(). I develop on a system that doesn't
38 * lack waitpid, for example. Therefore FINDLIB_REPLACE_FUNCS(waitpid)
39 * never puts waitpid.o into FINDLIBOBJS. Hence, to ensure that these
40 * macros are tested every time, we use FINDLIB_REPLACE_FUNCS on a function
41 * that never exists anywhere, so always needs to be pulled in. That function
42 * is forcefindlib().
44 void
45 forcefindlib(void)
47 /* does nothing, exists only to ensure that FINDLIB_REPLACE_FUNCS works. */