Commit 8c29dca6 by Philip Kelley

Fix some incorrect MSVC #ifdef's. Fixes #1305

parent a150cc87
...@@ -400,7 +400,7 @@ int git_path_fromurl(git_buf *local_path_out, const char *file_url) ...@@ -400,7 +400,7 @@ int git_path_fromurl(git_buf *local_path_out, const char *file_url)
if (offset >= len || file_url[offset] == '/') if (offset >= len || file_url[offset] == '/')
return error_invalid_local_file_uri(file_url); return error_invalid_local_file_uri(file_url);
#ifndef _MSC_VER #ifndef GIT_WIN32
offset--; /* A *nix absolute path starts with a forward slash */ offset--; /* A *nix absolute path starts with a forward slash */
#endif #endif
......
...@@ -238,7 +238,7 @@ const char* cl_git_path_url(const char *path) ...@@ -238,7 +238,7 @@ const char* cl_git_path_url(const char *path)
cl_git_pass(git_path_prettify_dir(&path_buf, path, NULL)); cl_git_pass(git_path_prettify_dir(&path_buf, path, NULL));
cl_git_pass(git_buf_puts(&url_buf, "file://")); cl_git_pass(git_buf_puts(&url_buf, "file://"));
#ifdef _MSC_VER #ifdef GIT_WIN32
/* /*
* A FILE uri matches the following format: file://[host]/path * A FILE uri matches the following format: file://[host]/path
* where "host" can be empty and "path" is an absolute path to the resource. * where "host" can be empty and "path" is an absolute path to the resource.
......
...@@ -324,7 +324,7 @@ static void check_fromurl(const char *expected_result, const char *input, int sh ...@@ -324,7 +324,7 @@ static void check_fromurl(const char *expected_result, const char *input, int sh
git_buf_free(&buf); git_buf_free(&buf);
} }
#ifdef _MSC_VER #ifdef GIT_WIN32
#define ABS_PATH_MARKER "" #define ABS_PATH_MARKER ""
#else #else
#define ABS_PATH_MARKER "/" #define ABS_PATH_MARKER "/"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment