#include <errno.h>
#include <math.h>
#include <stdarg.h> /* va_arg */
-#include <libgen.h>
#include "xbt/misc.h"
#include "xbt/log.h"
#include "xbt/str.h"
+#include "xbt/file.h"
#include "xbt/dict.h"
#include "surf/surfxml_parse.h"
#include "surf/surf_private.h"
if (!surf_parsed_filename_stack)
surf_parsed_filename_stack = xbt_dynar_new(sizeof(char *), &xbt_free_ref);
+
surf_parsed_filename = xbt_strdup(file);
- char *dir = dirname(surf_parsed_filename);
+ char *dir = xbt_dirname(file);
xbt_dynar_push(surf_path, &dir);
surf_file_to_parse = surf_fopen(file, "r");