Merge "Add |opts| argument to android_fork_execvp_ext"
diff --git a/adb/device.py b/adb/device.py
index bc1364b..5b33ff2 100644
--- a/adb/device.py
+++ b/adb/device.py
@@ -112,7 +112,8 @@
_RETURN_CODE_PROBE_STRING = 'echo "{0}$?"'.format(_RETURN_CODE_DELIMITER)
# Maximum search distance from the output end to find the delimiter.
- _RETURN_CODE_SEARCH_LENGTH = len('{0}255\n'.format(_RETURN_CODE_DELIMITER))
+ # adb on Windows returns \r\n even if adbd returns \n.
+ _RETURN_CODE_SEARCH_LENGTH = len('{0}255\r\n'.format(_RETURN_CODE_DELIMITER))
def __init__(self, serial, product=None):
self.serial = serial
diff --git a/include/utils/Errors.h b/include/utils/Errors.h
index 06565ea..08ddcd2 100644
--- a/include/utils/Errors.h
+++ b/include/utils/Errors.h
@@ -58,7 +58,7 @@
ALREADY_EXISTS = -EEXIST,
DEAD_OBJECT = -EPIPE,
FAILED_TRANSACTION = (UNKNOWN_ERROR + 2),
-#if !defined(HAVE_MS_C_RUNTIME)
+#if !defined(_WIN32)
BAD_INDEX = -EOVERFLOW,
NOT_ENOUGH_DATA = -ENODATA,
WOULD_BLOCK = -EWOULDBLOCK,