]> granicus.if.org Git - php/commitdiff
Fix build on Windows
authorKalle Sommer Nielsen <kalle@php.net>
Fri, 4 Sep 2015 15:49:48 +0000 (17:49 +0200)
committerKalle Sommer Nielsen <kalle@php.net>
Fri, 4 Sep 2015 15:49:48 +0000 (17:49 +0200)
ext/zip/lib/zip_source_win32a.c
ext/zip/lib/zip_source_win32handle.c
ext/zip/lib/zip_source_win32w.c

index c20e891b08c4d73691399c18c8f39bc34d67f1e7..e9786c473ebb615612ca880cfb863e95bd5a2305 100644 (file)
@@ -45,11 +45,11 @@ static int _win32_rename_temp_a(_zip_source_win32_read_file_t *ctx);
 static int _win32_remove_a(const void *fname);
 
 static _zip_source_win32_file_ops_t win32_ops_a = {
-    .op_strdup         = _win32_strdup_a,
-    .op_open           = _win32_open_a,
-    .op_create_temp    = _win32_create_temp_a,
-    .op_rename_temp    = _win32_rename_temp_a,
-    .op_remove         = _win32_remove_a
+    _win32_strdup_a,
+    _win32_open_a,
+    _win32_create_temp_a,
+    _win32_rename_temp_a,
+    _win32_remove_a
 };
 
 ZIP_EXTERN zip_source_t *
index dd17c021b3df2ca1450010094d0a8b81e351e48a..d195a119db1fca100b28daf58928195d58288198 100644 (file)
@@ -423,6 +423,7 @@ _win32_create_temp_file(_zip_source_win32_read_file_t *ctx)
     PSECURITY_ATTRIBUTES psa = NULL;
     DWORD len;
     BOOL success;
+       zip_uint32_t value;
 
     /*
     Read the DACL from the original file, so we can copy it to the temp file.
@@ -448,7 +449,7 @@ _win32_create_temp_file(_zip_source_win32_read_file_t *ctx)
        }
     }
 
-    zip_uint32_t value = GetTickCount();
+    value = GetTickCount();
     for (i = 0; i < 1024 && th == INVALID_HANDLE_VALUE; i++) {
        th = ctx->ops->op_create_temp(ctx, &temp, value + i, psa);
        if (th == INVALID_HANDLE_VALUE && GetLastError() != ERROR_FILE_EXISTS)
index 27cdf910e0540c2fc3a279664f2ecaa53d1de31e..34134561f13d226d643fc7b855ae6f75e7401e8a 100644 (file)
@@ -45,11 +45,11 @@ static int _win32_rename_temp_w(_zip_source_win32_read_file_t *ctx);
 static int _win32_remove_w(const void *fname);
 
 static _zip_source_win32_file_ops_t win32_ops_w = {
-    .op_strdup       = _win32_strdup_w,
-    .op_open         = _win32_open_w,
-    .op_create_temp  = _win32_create_temp_w,
-    .op_rename_temp  = _win32_rename_temp_w,
-    .op_remove       = _win32_remove_w
+    _win32_strdup_w,
+    _win32_open_w,
+    _win32_create_temp_w,
+    _win32_rename_temp_w,
+    _win32_remove_w
 };
 
 ZIP_EXTERN zip_source_t *