summaryrefslogtreecommitdiffstats
path: root/libmsi/where.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-12-05 10:22:03 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2012-12-06 20:30:34 +0100
commit4e9a5dc18988790284a8ea66742338f4662c508c (patch)
tree5a56b6ff5ea3ec62b02a3b977d97d2a0afe07551 /libmsi/where.c
parent1222609fc5d9c980c1da9fb839f86455047c7c91 (diff)
downloadmsitools-4e9a5dc18988790284a8ea66742338f4662c508c.tar.gz
msitools-4e9a5dc18988790284a8ea66742338f4662c508c.tar.xz
msitools-4e9a5dc18988790284a8ea66742338f4662c508c.zip
eliminate Windows dependencies
Diffstat (limited to 'libmsi/where.c')
-rw-r--r--libmsi/where.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/libmsi/where.c b/libmsi/where.c
index f389c58..c9231ed 100644
--- a/libmsi/where.c
+++ b/libmsi/where.c
@@ -22,16 +22,9 @@
#include <stdarg.h>
#include <assert.h>
-#include "windef.h"
-#include "winbase.h"
-#include "winerror.h"
#include "debug.h"
-#include "unicode.h"
#include "libmsi.h"
-#include "objbase.h"
-#include "objidl.h"
#include "msipriv.h"
-#include "winnls.h"
#include "query.h"
@@ -139,7 +132,7 @@ static unsigned add_row(LibmsiWhereView *wv, unsigned vals[])
wv->reorder_size = newsize;
}
- new = msi_alloc(FIELD_OFFSET( LibmsiRowEntry, values[wv->table_count] ));
+ new = msi_alloc(offsetof( LibmsiRowEntry, values[wv->table_count] ));
if (!new)
return LIBMSI_RESULT_OUTOFMEMORY;
@@ -921,7 +914,7 @@ static unsigned where_view_find_matching_rows( LibmsiView *view, unsigned col,
if (col == 0 || col > wv->col_count)
return LIBMSI_RESULT_INVALID_PARAMETER;
- for (i = PtrToUlong(*handle); i < wv->row_count; i++)
+ for (i = (uintptr_t)*handle; i < wv->row_count; i++)
{
if (view->ops->fetch_int( view, i, col, &row_value ) != LIBMSI_RESULT_SUCCESS)
continue;
@@ -929,7 +922,7 @@ static unsigned where_view_find_matching_rows( LibmsiView *view, unsigned col,
if (row_value == val)
{
*row = i;
- *handle = UlongToPtr(i + 1);
+ *handle = (MSIITERHANDLE)(uintptr_t)(i + 1);
return LIBMSI_RESULT_SUCCESS;
}
}