]> pd.if.org Git - zpackage/blobdiff - zpm-addfile.c
fix compile process for elf programs
[zpackage] / zpm-addfile.c
index 99f914ca3d2c6226cafc3179292a9fd6a007066b..f96d00279592690a682f4ccb12d2fef3626fda37 100644 (file)
@@ -1,6 +1,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include "zpm.h"
+#include "sqlite/sqlite3.h"
 
 int main(int ac, char **av){
        struct zpm pkg;
@@ -12,10 +13,16 @@ int main(int ac, char **av){
                return 1;
        }
 
+#if 0
+       i = sqlite3_config(SQLITE_CONFIG_MMAP_SIZE,98222080);
+       if (i != SQLITE_OK) {
+               exit(3);
+       }
+#endif
        if (zpm_open(&pkg, av[1])) {
                zpm_begin(&pkg);
                for (i=2; i<ac; i++) {
-                       if (zpm_import(&pkg, av[2], 0, hash)) {
+                       if (zpm_import(&pkg, av[i], 0, hash)) {
                                fprintf(stdout, "%s\n", hash);
        //                      zpm_addtopackage(&pkg, hash, 0);
                                //fprintf(stdout, "%s %s\n", hash, av[2]);