diff -urN msitools-0.92-orig/tests/testdatabase.c msitools-0.92/tests/testdatabase.c
--- msitools-0.92-orig/tests/testdatabase.c	2013-02-06 17:43:05 -0500
+++ msitools-0.92/tests/testdatabase.c	2013-07-13 21:01:19 -0400
@@ -44,6 +44,10 @@
 #define O_BINARY 0
 #endif
 
+#ifndef F_OK
+#define F_OK 0
+#endif
+
 static const char *msifile = "winetest-db.msi";
 static const char *msifile2 = "winetst2-db.msi";
 static const char *mstfile = "winetst-db.mst";
@@ -2484,6 +2488,7 @@
 static void test_try_transform(void)
 {
 #ifdef _WIN32
+    GInputStream *in;
     LibmsiDatabase *hdb;
     LibmsiQuery *hquery;
     LibmsiRecord *hrec;
@@ -2581,7 +2586,7 @@
     sql = "select * from `MOO` where `NOO` = 3";
     r = do_query(hdb, sql, &hrec);
     ok(r == LIBMSI_RESULT_SUCCESS, "select query failed\n");
-    ok(hrec == NULL);
+    ok(hrec == NULL, "");
 
     /* check added stream */
     hrec = 0;
@@ -2590,7 +2595,7 @@
     ok(r == LIBMSI_RESULT_SUCCESS, "select query failed\n");
 
     /* check the contents of the stream */
-    in = libmsi_record_get_stream(rec, 1);
+    in = libmsi_record_get_stream(hrec, 1);
     ok(in, "Failed to get stream\n");
     sz = g_input_stream_read(in, buffer, sizeof(buffer), NULL, NULL);
     ok(!memcmp(buffer, "naengmyon", 9), "stream data was wrong\n");
@@ -2607,7 +2612,7 @@
     r = libmsi_query_execute(hquery, 0, NULL);
     ok(r, "query execute failed\n");
 
-    hrec = libmsi_query_fetch(query, NULL);
+    hrec = libmsi_query_fetch(hquery, NULL);
     ok(hrec, "Expected result\n");
 
     r = libmsi_record_get_int(hrec, 1);
@@ -2623,7 +2628,7 @@
 
     g_object_unref(hrec);
 
-    hrec = libmsi_query_fetch(query, NULL);
+    hrec = libmsi_query_fetch(hquery, NULL);
     ok(hrec, "Expected result\n");
 
     r = libmsi_record_get_int(hrec, 1);
@@ -4863,7 +4868,7 @@
     hdb = libmsi_database_new(msifile, LIBMSI_DB_FLAGS_CREATE, NULL, NULL);
     ok(hdb, "Expected LIBMSI_RESULT_SUCCESS, got %d\n", r);
 
-    r = libmsi_database_commit(hdb);
+    r = libmsi_database_commit(hdb, NULL);
     ok(r == LIBMSI_RESULT_SUCCESS, "Expected LIBMSI_RESULT_SUCCESS, got %d\n", r);
 
     g_object_unref(hdb);
@@ -5756,6 +5761,7 @@
 static void test_storages_table(void)
 {
 #ifdef _WIN32
+    GInputStream *in;
     LibmsiDatabase *hdb;
     LibmsiQuery *hquery;
     LibmsiRecord *hrec;
diff -urN msitools-0.92-orig/tests/testsuminfo.c msitools-0.92/tests/testsuminfo.c
--- msitools-0.92-orig/tests/testsuminfo.c	2013-01-21 11:16:41 -0500
+++ msitools-0.92/tests/testsuminfo.c	2013-07-13 21:17:52 -0400
@@ -48,7 +48,7 @@
     DeleteFile(msifile);
 
     /* just libmsi_database_new should not create a file */
-    hdb = libmsi_database_new(msifile, LIBMSI_DB_OPEN_CREATE, NULL);
+    hdb = libmsi_database_new(msifile, LIBMSI_DB_FLAGS_CREATE, NULL, NULL);
     ok(hdb, "libmsi_database_new failed\n");
 
     hsuminfo = libmsi_summary_info_new(hdb, 0, NULL);
@@ -70,11 +70,11 @@
 
     libmsi_summary_info_set_string(hsuminfo, LIBMSI_PROPERTY_TITLE, "Mike", &error);
     ok(error, "libmsi_summary_info_set_property wrong error\n");
-    g_clear_error(error);
+    g_clear_error(&error);
 
     libmsi_summary_info_set_int(hsuminfo, LIBMSI_PROPERTY_CODEPAGE, 1, &error);
     ok(error, "libmsi_summary_info_set_property wrong error\n");
-    g_clear_error(error);
+    g_clear_error(&error);
 
     g_object_unref(hsuminfo);
 
@@ -84,50 +84,50 @@
 
     libmsi_summary_info_set_string(hsuminfo, 0, NULL, &error);
     g_assert_error(error, LIBMSI_RESULT_ERROR, LIBMSI_RESULT_DATATYPE_MISMATCH);
-    g_clear_error(error);
+    g_clear_error(&error);
 
     libmsi_summary_info_set_string(hsuminfo, LIBMSI_PROPERTY_CODEPAGE, NULL, &error);
     g_assert_error(error, LIBMSI_RESULT_ERROR, LIBMSI_RESULT_DATATYPE_MISMATCH);
-    g_clear_error(error);
+    g_clear_error(&error);
 
     libmsi_summary_info_set_int(hsuminfo, LIBMSI_PROPERTY_TITLE, NULL, &error);
     g_assert_error(error, LIBMSI_RESULT_ERROR, LIBMSI_RESULT_DATATYPE_MISMATCH);
-    g_clear_error(error);
+    g_clear_error(&error);
 
     libmsi_summary_info_set_int(hsuminfo, LIBMSI_PROPERTY_AUTHOR, 0, &error);
     g_assert_error(error, LIBMSI_RESULT_ERROR, LIBMSI_RESULT_DATATYPE_MISMATCH);
-    g_clear_error(error);
+    g_clear_error(&error);
 
     libmsi_summary_info_set_int(hsuminfo, LIBMSI_PROPERTY_KEYWORDS, 0, &error);
     g_assert_error(error, LIBMSI_RESULT_ERROR, LIBMSI_RESULT_DATATYPE_MISMATCH);
-    g_clear_error(error);
+    g_clear_error(&error);
 
     libmsi_summary_info_set_filetime(hsuminfo, LIBMSI_PROPERTY_COMMENTS, 0, &error);
     g_assert_error(error, LIBMSI_RESULT_ERROR, LIBMSI_RESULT_DATATYPE_MISMATCH);
-    g_clear_error(error);
+    g_clear_error(&error);
 
     libmsi_summary_info_set_int(hsuminfo, LIBMSI_PROPERTY_TEMPLATE, 0, &error);
     g_assert_error(error, LIBMSI_RESULT_ERROR, LIBMSI_RESULT_DATATYPE_MISMATCH);
-    g_clear_error(error);
+    g_clear_error(&error);
 
     libmsi_summary_info_set_string(hsuminfo, LIBMSI_PROPERTY_LASTAUTHOR, NULL, &error);
     g_assert_error(error, LIBMSI_RESULT_ERROR, LIBMSI_RESULT_INVALID_PARAMETER);
-    g_clear_error(error);
+    g_clear_error(&error);
 
     libmsi_summary_info_set_int(hsuminfo, LIBMSI_PROPERTY_UUID, 0, &error);
     g_assert_error(error, LIBMSI_RESULT_ERROR, LIBMSI_RESULT_DATATYPE_MISMATCH);
-    g_clear_error(error);
+    g_clear_error(&error);
 
     libmsi_summary_info_set_string(hsuminfo, LIBMSI_PROPERTY_VERSION, NULL, &error);
     g_assert(error, LIBMSI_RESULT_ERROR, LIBMSI_RESULT_DATATYPE_MISMATCH);
-    g_clear_error(error);
+    g_clear_error(&error);
 
     libmsi_summary_info_set_string(hsuminfo, LIBMSI_PROPERTY_TITLE, "Mike", &error);
     ok(!error, "libmsi_summary_info_set_property failed\n");
 
     str = libmsi_summary_info_get_string(hsuminfo, LIBMSI_PROPERTY_TITLE, &error);
     ok(!error, "got error");
-    ok(!strcpy(str, "Mike"));
+    ok(!strcpy(str, "Mike"), "");
 
     libmsi_summary_info_set_string(hsuminfo, LIBMSI_PROPERTY_TITLE, "JungAh", &error);
     ok(!error, "libmsi_summary_info_set_property failed\n");
@@ -135,7 +135,7 @@
     g_object_unref(hsuminfo);
 
     /* try again with a higher update count */
-    hsuminfo = libmsi_summary_info_new(hdb, 10, NULl);
+    hsuminfo = libmsi_summary_info_new(hdb, 10, NULL);
     ok(hsuminfo, "libmsi_database_get_summary_info failed\n");
 
     libmsi_summary_info_set_string(hsuminfo, LIBMSI_PROPERTY_TITLE, "JungAh", &error);
@@ -154,26 +154,26 @@
     libmsi_summary_info_set_string(hsuminfo, LIBMSI_PROPERTY_AUTHOR, "Mike", &error);
     ok(!error, "libmsi_summary_info_set_property failed\n");
 
-    r = libmsi_summary_info_persist(hsuminfo);
+    r = libmsi_summary_info_persist(hsuminfo, NULL);
     ok(r, "libmsi_summary_info_persist failed\n");
 
-    libmsi_database_commit(hdb);
+    libmsi_database_commit(hdb, NULL);
 
     g_object_unref(hsuminfo);
 
     g_object_unref(hdb);
 
     /* reread, non-zero update count */
-    hdb = libmsi_database_new(msifile, LIBMSI_DB_OPEN_TRANSACT, NULL);
+    hdb = libmsi_database_new(msifile, LIBMSI_DB_FLAGS_TRANSACT, NULL, NULL);
     ok(hdb, "libmsi_database_new failed\n");
 
-    hsuminfo = libmsi_summary_info_new(hdb, 1, NULl);
+    hsuminfo = libmsi_summary_info_new(hdb, 1, NULL);
     ok(hsuminfo, "libmsi_database_get_summary_info failed\n");
 
     r = libmsi_summary_info_set_string(hsuminfo, LIBMSI_PROPERTY_AUTHOR, "Mike", error);
     ok(r == LIBMSI_RESULT_SUCCESS, "libmsi_summary_info_set_property wrong error\n");
 
-    r = libmsi_summary_info_persist(hsuminfo);
+    r = libmsi_summary_info_persist(hsuminfo, NULL);
     ok(r, "libmsi_summary_info_persist failed %u\n", r);
 
     g_object_unref(hsuminfo);
@@ -181,7 +181,7 @@
     /* now with zero update count */
     g_object_unref(hdb);
 
-    hdb = libmsi_database_new(msifile, LIBMSI_DB_OPEN_READONLY, NULL);
+    hdb = libmsi_database_new(msifile, LIBMSI_DB_FLAGS_READONLY, NULL, NULL);
     ok(hdb, "libmsi_database_new failed\n");
 
     hsuminfo = libmsi_summary_info_new(hdb, 0, NULL);
@@ -191,7 +191,7 @@
     todo_wine ok(error, "libmsi_summary_info_set_property wrong error\n");
     g_clear_error(&error);
 
-    r = libmsi_summary_info_persist(hsuminfo);
+    r = libmsi_summary_info_persist(hsuminfo, NULL);
     ok(!r, "libmsi_summary_info_persist wrong error %u\n", r);
 
     g_object_unref(hsuminfo);
@@ -317,6 +317,7 @@
 
 static void test_summary_binary(void)
 {
+    GArray *props = NULL;
     GError *error = NULL;
     LibmsiDatabase *hdb = 0;
     LibmsiSummaryInfo *hsuminfo = 0;
@@ -331,7 +332,7 @@
     ok( INVALID_FILE_ATTRIBUTES != GetFileAttributes(msifile), "file doesn't exist!\n");
 
     /* just libmsi_database_new should not create a file */
-    hdb = libmsi_database_new(msifile, LIBMSI_DB_OPEN_READONLY, NULl);
+    hdb = libmsi_database_new(msifile, LIBMSI_DB_FLAGS_READONLY, NULL, NULL);
     ok(hdb, "libmsi_database_new failed\n");
 
     hsuminfo = libmsi_summary_info_new(hdb, 0, NULL);
@@ -344,7 +345,7 @@
      * We can still read its type though...?
      */
     str = libmsi_summary_info_get_string(hsuminfo, LIBMSI_PROPERTY_LASTPRINTED, error);
-    ok(!error);
+    ok(!error, "");
     ok(!strcmp(str, "") || !strcmp(str, "7"),
         "Expected empty string or \"7\", got \"%s\"\n", str);
 
@@ -362,7 +363,7 @@
     ok(error, "libmsi_summary_info_set_property failed\n");
     g_clear_error(&error);
 
-    r = libmsi_summary_info_persist( hsuminfo );
+    r = libmsi_summary_info_persist( hsuminfo, NULL );
     ok(!r, "libmsi_summary_info_persist failed %u\n", r);
 
     g_object_unref( hsuminfo );
