aboutsummaryrefslogtreecommitdiff
path: root/binutils/windres.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2007-07-05 09:51:30 +0000
committerNick Clifton <nickc@redhat.com>2007-07-05 09:51:30 +0000
commitc6998d15d5b97393ddd582037f6d6f00e7116237 (patch)
tree50cdc955de0f0ecc0e585b7f966fabeacf8f8f13 /binutils/windres.c
parent9b201bb5e5daa9b4f783e6ece9cbfbdbf9f1d6f4 (diff)
downloadgdb-c6998d15d5b97393ddd582037f6d6f00e7116237.zip
gdb-c6998d15d5b97393ddd582037f6d6f00e7116237.tar.gz
gdb-c6998d15d5b97393ddd582037f6d6f00e7116237.tar.bz2
* resrc.c: (read_rc_file): Add include path of user passed rc input file.
* windres.c: (windres_add_include_dir): New. (main): Use of windres_add_include_dir. * windres.h: (windres_add_include_dir): Add prototype.
Diffstat (limited to 'binutils/windres.c')
-rw-r--r--binutils/windres.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/binutils/windres.c b/binutils/windres.c
index da8e33f..05615c4 100644
--- a/binutils/windres.c
+++ b/binutils/windres.c
@@ -760,6 +760,20 @@ static const struct option long_options[] =
{0, no_argument, 0, 0}
};
+void
+windres_add_include_dir (const char *p)
+{
+ struct include_dir *n, **pp;
+
+ n = xmalloc (sizeof *n);
+ n->next = NULL;
+ n->dir = (char * ) p;
+
+ for (pp = &include_dirs; *pp != NULL; pp = &(*pp)->next)
+ ;
+ *pp = n;
+}
+
/* This keeps gcc happy when using -Wmissing-prototypes -Wstrict-prototypes. */
int main (int, char **);
@@ -926,17 +940,7 @@ main (int argc, char **argv)
preprocargs = n;
}
- {
- struct include_dir *n, **pp;
-
- n = (struct include_dir *) xmalloc (sizeof *n);
- n->next = NULL;
- n->dir = optarg;
-
- for (pp = &include_dirs; *pp != NULL; pp = &(*pp)->next)
- ;
- *pp = n;
- }
+ windres_add_include_dir (optarg);
break;