Migrated from GPL version 2 to GPL version 3
[findutils.git] / lib / forcefindlib.c
blob40ea499a488ccaf732e4b9a15b14d347382c20c3
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 3 of the License, or
7 (at your option) 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, see <http://www.gnu.org/licenses/>.
19 /* Written by James Youngman. */
22 #include <config.h>
25 extern void forcefindlib(void); /* prevent GCC warning... */
29 /* forcefindlib
31 * This function exists only to be pulled into libfind.a by the
32 * FINDLIB_REPLACE_FUNCS macro in configure.in. We already have
33 * AC_REPLACE_FUNCS, but that adds to LIBOBJS, and that's a gnulib thing
34 * in the case of findutils. Hence we have out own library of replacement
35 * functions which aren't in gnulib (or aren't in it any more). An example
36 * of this is waitpid(). I develop on a system that doesn't
37 * lack waitpid, for example. Therefore FINDLIB_REPLACE_FUNCS(waitpid)
38 * never puts waitpid.o into FINDLIBOBJS. Hence, to ensure that these
39 * macros are tested every time, we use FINDLIB_REPLACE_FUNCS on a function
40 * that never exists anywhere, so always needs to be pulled in. That function
41 * is forcefindlib().
43 void
44 forcefindlib(void)
46 /* does nothing, exists only to ensure that FINDLIB_REPLACE_FUNCS works. */