Skip to content

Instantly share code, notes, and snippets.

@doctorlove
Created January 4, 2012 11:40
Show Gist options
  • Save doctorlove/1559691 to your computer and use it in GitHub Desktop.
Save doctorlove/1559691 to your computer and use it in GitHub Desktop.
diff -u -r -P ../mainline/src/lexer.cc ../patched/src/lexer.cc
--- ../mainline/src/lexer.cc 2012-01-04 10:38:52.271140300 +0000
+++ ../patched/src/lexer.cc 2012-01-04 10:39:04.833077500 +0000
@@ -19,6 +19,10 @@
#include "eval_env.h"
+#ifdef _WIN32
+ #define snprintf _snprintf
+#endif
+
bool Lexer::Error(const string& message, string* err) {
// Compute line/column.
int line = 1;
diff -u -r -P ../mainline/src/ninja.cc ../patched/src/ninja.cc
--- ../mainline/src/ninja.cc 2012-01-04 10:37:10.072594000 +0000
+++ ../patched/src/ninja.cc 2012-01-04 10:41:56.622256000 +0000
@@ -12,6 +12,17 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include "browse.h"
+#include "build.h"
+#include "build_log.h"
+#include "clean.h"
+#include "edit_distance.h"
+#include "graph.h"
+#include "graphviz.h"
+#include "parsers.h"
+#include "state.h"
+#include "util.h"
+
#include <errno.h>
#include <stdio.h>
#include <string.h>
@@ -32,17 +43,6 @@
#include <getopt.h>
#endif
-#include "browse.h"
-#include "build.h"
-#include "build_log.h"
-#include "clean.h"
-#include "edit_distance.h"
-#include "graph.h"
-#include "graphviz.h"
-#include "parsers.h"
-#include "state.h"
-#include "util.h"
-
namespace {
/// Print usage information.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment