diff --git a/src/DynareMain.cc b/src/DynareMain.cc
index f9c35528335e29e934df638e6417429d8f870301..99b593d6901dbdef6a680f53f0e6cb08b81b83ed 100644
--- a/src/DynareMain.cc
+++ b/src/DynareMain.cc
@@ -53,7 +53,7 @@ void main2(stringstream &in, const string &basename, bool debug, bool clear_all,
            const boost::filesystem::path &dynareroot, bool onlymodel);
 
 void main1(const string &filename, const string &basename, istream &modfile, bool debug, bool save_macro, string &save_macro_file,
-           bool no_line_macro, bool no_empty_line_macro, const map<string, string> &defines, const vector<string> &path, stringstream &macro_output);
+           bool no_line_macro, bool no_empty_line_macro, const vector<pair<string, string>> &defines, const vector<string> &path, stringstream &macro_output);
 
 void
 usage()
@@ -151,7 +151,7 @@ main(int argc, char **argv)
   bool minimal_workspace = false;
   bool compute_xrefs = false;
   bool transform_unary_ops = false;
-  map<string, string> defines;
+  vector<pair<string, string>> defines;
   vector<string> path;
   FileOutputType output_mode{FileOutputType::none};
   JsonOutputPointType json{JsonOutputPointType::nojson};
@@ -269,9 +269,9 @@ main(int argc, char **argv)
 
           auto equal_index = s.find('=');
           if (equal_index != string::npos)
-            defines[s.substr(2, equal_index-2)] = s.substr(equal_index+1);
+            defines.emplace_back(s.substr(2, equal_index-2), s.substr(equal_index+1));
           else
-            defines[s.substr(2)] = "1";
+            defines.emplace_back(s.substr(2), "1");
         }
       else if (s.substr(0, 2) == "-I")
         {
diff --git a/src/DynareMain1.cc b/src/DynareMain1.cc
index 1ff3c3fc6c6b19e0a5c9d3cf6d335e7d07f05eea..41815a8ada0004097290b46c69588570295b69e4 100644
--- a/src/DynareMain1.cc
+++ b/src/DynareMain1.cc
@@ -28,7 +28,7 @@ bool compareNewline (int i, int j) {
 
 void
 main1(const string &filename, const string &basename, istream &modfile, bool debug, bool save_macro, string &save_macro_file,
-      bool no_line_macro, bool no_empty_line_macro, const map<string, string> &defines, const vector<string> &path, stringstream &macro_output)
+      bool no_line_macro, bool no_empty_line_macro, const vector<pair<string, string>> &defines, const vector<string> &path, stringstream &macro_output)
 {
   // Do macro processing
   MacroDriver m;
diff --git a/src/macro/MacroDriver.cc b/src/macro/MacroDriver.cc
index ef4e45bec83642bf48d4a595b292e0cb570a1d0e..a296d6d219fcf9d3fd9ddb4927f5bd09043f5a43 100644
--- a/src/macro/MacroDriver.cc
+++ b/src/macro/MacroDriver.cc
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008-2018 Dynare Team
+ * Copyright (C) 2008-2019 Dynare Team
  *
  * This file is part of Dynare.
  *
@@ -28,7 +28,7 @@
 
 void
 MacroDriver::parse(const string &file_arg, const string &basename_arg, istream &modfile,
-                   ostream &out, bool debug, bool no_line_macro_arg, map<string, string> defines,
+                   ostream &out, bool debug, bool no_line_macro_arg, const vector<pair<string, string>> &defines,
                    vector<string> path)
 {
   file = file_arg;
diff --git a/src/macro/MacroDriver.hh b/src/macro/MacroDriver.hh
index d1e3657b9c2f8a6504a89b8547a42d68a94e21d3..43dbc974e491eeedd7d8207f58766213179d1fa5 100644
--- a/src/macro/MacroDriver.hh
+++ b/src/macro/MacroDriver.hh
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008-2018 Dynare Team
+ * Copyright (C) 2008-2019 Dynare Team
  *
  * This file is part of Dynare.
  *
@@ -227,7 +227,7 @@ public:
   //! Starts parsing a file, returns output in out
   /*! \param no_line_macro should we omit the @#line statements ? */
   void parse(const string &file_arg, const string &basename_arg, istream &modfile, ostream &out, bool debug, bool no_line_macro_arg,
-             map<string, string> defines, vector<string> path);
+             const vector<pair<string, string>> &defines, vector<string> path);
 
   //! Name of main file being parsed
   string file;