------------------------------------------------------------ revno: 12604 revision-id: squid3@treenet.co.nz-20130909060659-7dgp3vyvrzte2elz parent: squid3@treenet.co.nz-20130908220521-ml7j5notql4veufq committer: Amos Jeffries branch nick: 3.3 timestamp: Mon 2013-09-09 00:06:59 -0600 message: Windows: provide mkdir() wrapper ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20130909060659-7dgp3vyvrzte2elz # target_branch: http://bzr.squid-cache.org/bzr/squid3/3.3 # testament_sha1: 1f01a66b185bd6d0c9cdec86fe35eaa5d04e4938 # timestamp: 2013-09-09 06:07:06 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/3.3 # base_revision_id: squid3@treenet.co.nz-20130908220521-\ # ml7j5notql4veufq # # Begin patch === modified file 'compat/os/mswin.h' --- compat/os/mswin.h 2012-09-01 14:24:50 +0000 +++ compat/os/mswin.h 2013-09-09 06:06:59 +0000 @@ -103,6 +103,9 @@ #define mkdir(p,F) _mkdir((p)) #define mktemp _mktemp #endif +#if _SQUID_MINGW_ +#define mkdir(p,F) mkdir((p)) +#endif #define pclose _pclose #define pipe WIN32_pipe #define popen _popen === modified file 'src/fs/coss/store_dir_coss.cc' --- src/fs/coss/store_dir_coss.cc 2012-10-04 11:10:17 +0000 +++ src/fs/coss/store_dir_coss.cc 2013-09-09 06:06:59 +0000 @@ -901,14 +901,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/UFSSwapDir.cc' --- src/fs/ufs/UFSSwapDir.cc 2013-01-02 03:44:55 +0000 +++ src/fs/ufs/UFSSwapDir.cc 2013-09-09 06:06:59 +0000 @@ -574,14 +574,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 ? DBG_IMPORTANT : 3), aPath << " created"); created = 1; } else { @@ -1306,14 +1299,7 @@ if (dir_pointer == NULL) { if (errno == ENOENT) { debugs(36, DBG_CRITICAL, HERE << "WARNING: Creating " << p1); -#if _SQUID_MSWIN_ - - if (mkdir(p1) == 0) -#else - if (mkdir(p1, 0777) == 0) -#endif - return 0; }