- /* for "bla" includes first try current dir
- * TODO: this isn't correct, should be the directory of the source file
- */
+ /* put dirname of current input on obstack */
+ const char *filename = input.position.input_name;
+ const char *last_slash = strrchr(filename, '/');
+ if (last_slash != NULL) {
+ size_t len = last_slash - filename;
+ obstack_grow(&symbol_obstack, filename, len + 1);
+ obstack_grow0(&symbol_obstack, headername, headername_len);
+ char *complete_path = obstack_finish(&symbol_obstack);
+ headername = identify_string(complete_path);
+ }
+