part 1 of cleaning up my little array macro library to be a formal API. also removed...
[blender.git] / source / blender / blenkernel / intern / packedFile.c
index 8c77ed92aa14c7b2417d8c93874a018591d1db32..0de97b9c703733efe9b158826466a0b40e75be12 100644 (file)
 #include "BKE_packedFile.h"
 #include "BKE_report.h"
 
+#ifdef _WIN32
+#define open _open
+#define close _close
+#define read _read
+#define write _write
+#endif
+
+
 int seekPackedFile(PackedFile *pf, int offset, int whence)
 {
        int oldseek = -1, seek = 0;
@@ -228,7 +236,7 @@ void packAll(Main *bmain, ReportList *reports)
 // attempt to create a function that generates an unique filename
 // this will work when all funtions in fileops.c understand relative filenames...
 
-char *find_new_name(char *name)
+static char *find_new_name(char *name)
 {
        char tempname[FILE_MAXDIR + FILE_MAXFILE];
        char *newname;
@@ -473,7 +481,7 @@ int unpackSound(ReportList *reports, bSound *sound, int how)
                        freePackedFile(sound->packedfile);
                        sound->packedfile = 0;
 
-                       sound_load(sound);
+                       sound_load(NULL, sound);
 
                        ret_value = RET_OK;
                }