2013-01-08 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / file-find.h
blobb188e12dde2f561f85e823037cae062b6ed5b277
1 /* Prototypes and data structures used for implementing functions for
2 finding files relative to GCC binaries.
3 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998,
4 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011, 2012
5 Free Software Foundation, Inc.
7 This file is part of GCC.
9 GCC is free software; you can redistribute it and/or modify it under
10 the terms of the GNU General Public License as published by the Free
11 Software Foundation; either version 3, or (at your option) any later
12 version.
14 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
15 WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 for more details.
19 You should have received a copy of the GNU General Public License
20 along with GCC; see the file COPYING3. If not see
21 <http://www.gnu.org/licenses/>. */
23 #ifndef GCC_FILE_FIND_H
24 #define GCC_FILE_FIND_H
26 /* Structure to hold all the directories in which to search for files to
27 execute. */
29 struct prefix_list
31 const char *prefix; /* String to prepend to the path. */
32 struct prefix_list *next; /* Next in linked list. */
35 struct path_prefix
37 struct prefix_list *plist; /* List of prefixes to try */
38 int max_len; /* Max length of a prefix in PLIST */
39 const char *name; /* Name of this list (used in config stuff) */
42 extern void find_file_set_debug (bool);
43 extern char *find_a_file (struct path_prefix *, const char *);
44 extern void add_prefix (struct path_prefix *, const char *);
45 extern void prefix_from_env (const char *, struct path_prefix *);
46 extern void prefix_from_string (const char *, struct path_prefix *);
48 #endif /* GCC_FILE_FIND_H */