From fd0d93fd71b2c9f1f889bb2e2022a1119a2b52bd Mon Sep 17 00:00:00 2001
From: drh <drh@noemail.net>
Date: Sun, 7 Feb 2016 00:08:08 +0000
Subject: [PATCH] Add the sourcetest target to Makefile.msc.

FossilOrigin-Name: ab269e720552483c5617906837e294c1be3e0a57
---
 Makefile.msc  | 10 ++++++++--
 manifest      | 14 +++++++-------
 manifest.uuid |  2 +-
 tool/srcck1.c |  1 +
 4 files changed, 17 insertions(+), 10 deletions(-)

diff --git a/Makefile.msc b/Makefile.msc
index 3427b8177a..0ba00d89c7 100644
--- a/Makefile.msc
+++ b/Makefile.msc
@@ -1393,6 +1393,12 @@ $(SQLITE3EXE):	$(TOP)\src\shell.c $(SHELL_CORE_DEP) $(LIBRESOBJS) $(SHELL_CORE_S
 sqldiff.exe:	$(TOP)\tool\sqldiff.c $(SQLITE3C) $(SQLITE3H)
 	$(LTLINK) $(NO_WARN) $(TOP)\tool\sqldiff.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
 
+srcck1.exe:	$(TOP)\tool\srcck1.c
+	$(BCC) $(NO_WARN) -Fe$@ $(TOP)\tool\srcck1.c
+
+sourcetest:	srcck1.exe sqlite3.c
+	srcck1.exe sqlite3.c
+
 fuzzershell.exe:	$(TOP)\tool\fuzzershell.c $(SQLITE3C) $(SQLITE3H)
 	$(LTLINK) $(NO_WARN) $(FUZZERSHELL_COMPILE_OPTS) $(TOP)\tool\fuzzershell.c $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS)
 
@@ -1916,14 +1922,14 @@ fastfuzztest:	fuzzcheck.exe
 
 # Minimal testing that runs in less than 3 minutes (on a fast machine)
 #
-quicktest:	testfixture.exe
+quicktest:	testfixture.exe sourcetest
 	@set PATH=$(LIBTCLPATH);$(PATH)
 	.\testfixture.exe $(TOP)\test\extraquick.test $(TESTOPTS)
 
 # This is the common case.  Run many tests that do not take too long,
 # including fuzzcheck, sqlite3_analyzer, and sqldiff tests.
 #
-test:	$(TESTPROGS) fastfuzztest
+test:	$(TESTPROGS) sourcetest fastfuzztest
 	@set PATH=$(LIBTCLPATH);$(PATH)
 	.\testfixture.exe $(TOP)\test\veryquick.test $(TESTOPTS)
 
diff --git a/manifest b/manifest
index 9220387b53..3a81b43628 100644
--- a/manifest
+++ b/manifest
@@ -1,8 +1,8 @@
-C Add\sa\sutility\sprogram\sthat\slooks\sfor\sassert(),\sNEVER(),\sALWAYS(),\sand\ntestcase()\smacros\sthat\shave\sside-effects,\sand\sreports\serrors\swhen\sthey\sare\nfound.\s\sAlso\sfix\sa\sbug\sthat\sthis\sutility\sdetected\sas\sit\swas\sbeing\stested.
-D 2016-02-06T22:32:06.228
+C Add\sthe\ssourcetest\starget\sto\sMakefile.msc.
+D 2016-02-07T00:08:08.480
 F Makefile.in 0a957a57243a3d55e96b1514e22ffae5db9ea116
 F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
-F Makefile.msc 72b7858f02017611c3ac1ddc965251017fed0845
+F Makefile.msc a3f8092763bb5d0057f0f4feb6b7fcc19713e107
 F README.md 8ecc12493ff9f820cdea6520a9016001cb2e59b7
 F VERSION 866588d1edf0ccb5b0d33896974338f97564f719
 F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50
@@ -1416,7 +1416,7 @@ F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 7ce07da76b5e745783e703a834417d725b7d45fd
 F tool/split-sqlite3c.tcl d9be87f1c340285a3e081eb19b4a247981ed290c
 F tool/sqldiff.c 5a26205111e6fa856d9b1535b1637744dcdb930b
-F tool/srcck1.c 3119733530abcef14f1b0603c66207a342936263
+F tool/srcck1.c 0522865656ed7f89a8acdcfa6ba2d4f898f4e55c
 F tool/stack_usage.tcl f8e71b92cdb099a147dad572375595eae55eca43
 F tool/symbols-mingw.sh 4dbcea7e74768305384c9fd2ed2b41bbf9f0414d
 F tool/symbols.sh fec58532668296d7c7dc48be9c87f75ccdb5814f
@@ -1427,7 +1427,7 @@ F tool/vdbe_profile.tcl 246d0da094856d72d2c12efec03250d71639d19f
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b
 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 2f7778e64d93ef237e23ceac01ea9808df5cf2a1
-R e75f025e263d6165f7cd0bcd65f5ad12
+P b0b4624fc5d53bb0cc9fae7dad51984837d946ac
+R 08c9d9815def36a9ada11c24d7dc13cb
 U drh
-Z 663376736f9ceb33b8ce1b1cb94df97c
+Z 21cfff4994071e02bdb1eef8143a0ef4
diff --git a/manifest.uuid b/manifest.uuid
index 20460304dd..16127e2758 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-b0b4624fc5d53bb0cc9fae7dad51984837d946ac
\ No newline at end of file
+ab269e720552483c5617906837e294c1be3e0a57
\ No newline at end of file
diff --git a/tool/srcck1.c b/tool/srcck1.c
index cd4b4990b9..ae19fbebaa 100644
--- a/tool/srcck1.c
+++ b/tool/srcck1.c
@@ -22,6 +22,7 @@
 #include <stdlib.h>
 #include <ctype.h>
 #include <stdio.h>
+#include <string.h>
 
 /* Read the complete text of a file into memory.  Return a pointer to
 ** the result.  Panic if unable to read the file or allocate memory.