summaryrefslogtreecommitdiff
path: root/testSchemas.c
diff options
context:
space:
mode:
authorAron Xu <aron@debian.org>2012-09-18 01:15:22 +0800
committerAron Xu <aron@debian.org>2012-09-18 01:15:22 +0800
commitf660f9d2924c7549bc87e7f9b4ece7c9727b3682 (patch)
tree816b3ef0e89d1601803b5dc1b90b50ade0567043 /testSchemas.c
parentd7372d053bbd1d58216fbb04d1771ffa4cc3e624 (diff)
downloadlibxml2-f660f9d2924c7549bc87e7f9b4ece7c9727b3682.tar.gz
Imported Upstream version 2.9.0upstream/2.9.0
Diffstat (limited to 'testSchemas.c')
-rw-r--r--testSchemas.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/testSchemas.c b/testSchemas.c
index 47f8b39..b98e631 100644
--- a/testSchemas.c
+++ b/testSchemas.c
@@ -49,7 +49,7 @@
static int debug = 0;
#endif
static int noout = 0;
-#ifdef HAVE_SYS_MMAN_H
+#ifdef HAVE_MMAP
static int memory = 0;
#endif
@@ -65,7 +65,7 @@ int main(int argc, char **argv) {
debug++;
else
#endif
-#ifdef HAVE_SYS_MMAN_H
+#ifdef HAVE_MMAP
if ((!strcmp(argv[i], "-memory")) || (!strcmp(argv[i], "--memory"))) {
memory++;
} else
@@ -80,12 +80,12 @@ int main(int argc, char **argv) {
if (schema == NULL) {
xmlSchemaParserCtxtPtr ctxt;
-#ifdef HAVE_SYS_MMAN_H
+#ifdef HAVE_MMAP
if (memory) {
int fd;
struct stat info;
const char *base;
- if (stat(argv[i], &info) < 0)
+ if (stat(argv[i], &info) < 0)
break;
if ((fd = open(argv[i], O_RDONLY)) < 0)
break;
@@ -164,7 +164,7 @@ int main(int argc, char **argv) {
printf("\t--debug : dump a debug tree of the in-memory document\n");
#endif
printf("\t--noout : do not print the result\n");
-#ifdef HAVE_SYS_MMAN_H
+#ifdef HAVE_MMAP
printf("\t--memory : test the schemas in memory parsing\n");
#endif
}