------------------------------------------------------------ revno: 12259 revision-id: squid3@treenet.co.nz-20120808072113-hu0t5h5i29u1eqsl parent: kinkie@squid-cache.org-20120807151208-0xmlesd0lsp9tz1d committer: Amos Jeffries branch nick: trunk timestamp: Wed 2012-08-08 19:21:13 +1200 message: Windows: provide POSIX ABI wrapper for mkdir() ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20120808072113-hu0t5h5i29u1eqsl # target_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # testament_sha1: 18af20ab12e5355b9e8fb57685bb2601c116818e # timestamp: 2012-08-08 07:51:38 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # base_revision_id: kinkie@squid-cache.org-20120807151208-\ # 0xmlesd0lsp9tz1d # # Begin patch === modified file 'compat/os/mswin.h' --- compat/os/mswin.h 2011-08-26 16:50:49 +0000 +++ compat/os/mswin.h 2012-08-08 07:21:13 +0000 @@ -97,7 +97,7 @@ #if defined(_MSC_VER) /* Microsoft C Compiler ONLY */ #define lseek _lseeki64 #define memccpy _memccpy -#define mkdir(p) _mkdir(p) +#define mkdir(p,F) _mkdir((p)) #define mktemp _mktemp #endif #define pclose _pclose === modified file 'src/fs/coss/store_dir_coss.cc' --- src/fs/coss/store_dir_coss.cc 2012-08-06 17:41:08 +0000 +++ src/fs/coss/store_dir_coss.cc 2012-08-08 07:21:13 +0000 @@ -899,14 +899,7 @@ if (::stat(path, &swap_sb) < 0) { debugs (47, 2, "COSS swap space space being allocated."); -#if _SQUID_MSWIN_ - - mkdir(path); -#else - mkdir(path, 0700); -#endif - } /* should check here for directories instead of files, and for file size === modified file 'src/fs/ufs/store_dir_ufs.cc' --- src/fs/ufs/store_dir_ufs.cc 2012-07-23 15:34:12 +0000 +++ src/fs/ufs/store_dir_ufs.cc 2012-08-08 07:21:13 +0000 @@ -509,14 +509,7 @@ } else { fatalf("Swap directory %s is not a directory.", aPath); } - -#if _SQUID_MSWIN_ - - } else if (0 == mkdir(aPath)) { -#else - } else if (0 == mkdir(aPath, 0755)) { -#endif debugs(47, (should_exist ? 1 : 3), aPath << " created"); created = 1; } else { @@ -1117,14 +1110,7 @@ if (dir_pointer == NULL) { if (errno == ENOENT) { debugs(36, 0, "storeDirClean: WARNING: Creating " << p1); -#if _SQUID_MSWIN_ - - if (mkdir(p1) == 0) -#else - if (mkdir(p1, 0777) == 0) -#endif - return 0; } === modified file 'src/ssl/certificate_db.cc' --- src/ssl/certificate_db.cc 2012-07-23 07:02:06 +0000 +++ src/ssl/certificate_db.cc 2012-08-08 07:21:13 +0000 @@ -286,18 +286,10 @@ std::string cert_full(db_path + "/" + cert_dir); std::string size_full(db_path + "/" + size_file); -#if _SQUID_MSWIN_ - if (mkdir(db_path.c_str())) -#else if (mkdir(db_path.c_str(), 0777)) -#endif throw std::runtime_error("Cannot create " + db_path); -#if _SQUID_MSWIN_ - if (mkdir(cert_full.c_str())) -#else if (mkdir(cert_full.c_str(), 0777)) -#endif throw std::runtime_error("Cannot create " + cert_full); std::ofstream size(size_full.c_str());