2012-12-01 Alessandro Fanfarillo <alessandro.fanfarillo@gmail.com>
[official-gcc.git] / gcc / file-find.h
blob4c0182a5eda13d2a3d09a7120bca626ab5a1c332
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
6 This file is part of GCC.
8 GCC is free software; you can redistribute it and/or modify it under
9 the terms of the GNU General Public License as published by the Free
10 Software Foundation; either version 3, or (at your option) any later
11 version.
13 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
14 WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 for more details.
18 You should have received a copy of the GNU General Public License
19 along with GCC; see the file COPYING3. If not see
20 <http://www.gnu.org/licenses/>. */
22 #ifndef GCC_FILE_FIND_H
23 #define GCC_FILE_FIND_H
25 /* Structure to hold all the directories in which to search for files to
26 execute. */
28 struct prefix_list
30 const char *prefix; /* String to prepend to the path. */
31 struct prefix_list *next; /* Next in linked list. */
34 struct path_prefix
36 struct prefix_list *plist; /* List of prefixes to try */
37 int max_len; /* Max length of a prefix in PLIST */
38 const char *name; /* Name of this list (used in config stuff) */
41 extern void find_file_set_debug (bool);
42 extern char *find_a_file (struct path_prefix *, const char *);
43 extern void add_prefix (struct path_prefix *, const char *);
44 extern void prefix_from_env (const char *, struct path_prefix *);
45 extern void prefix_from_string (const char *, struct path_prefix *);
47 #endif /* GCC_FILE_FIND_H */