summaryrefslogtreecommitdiff
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
commit948418aae54882521254aeeded7150524fd3f777 (patch)
tree172461fa9be23afcedd5eaec0b6c80c3d8da0d53 /binutils/windres.c
parent819a89bc3f828a3c4bd3b949cef8acebf8e816af (diff)
downloadbinutils-redhat-948418aae54882521254aeeded7150524fd3f777.tar.gz
* 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 da8e33f39a..05615c432c 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;