Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Commit

Permalink
Merge in 'release/2.1' changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dotnet-bot committed Aug 8, 2019
2 parents 432be46 + 8716f1a commit d3fd4ab
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/Native/Unix/System.Native/pal_networking.c
Original file line number Diff line number Diff line change
Expand Up @@ -2173,7 +2173,7 @@ static int32_t TryChangeSocketEventRegistrationInner(

assert(currentEvents != newEvents);

int32_t changes = currentEvents ^ newEvents;
int32_t changes = (int32_t)(currentEvents ^ newEvents);
int8_t readChanged = (changes & SocketEvents_SA_READ) != 0;
int8_t writeChanged = (changes & SocketEvents_SA_WRITE) != 0;

Expand Down Expand Up @@ -2235,7 +2235,7 @@ static int32_t WaitForSocketEventsInner(int32_t port, struct SocketEvent* buffer
struct kevent evt = events[i];
memset(&buffer[i], 0, sizeof(struct SocketEvent));
buffer[i].Data = GetSocketEventData(evt.udata);
buffer[i].Events = GetSocketEvents(GetKeventFilter(evt.filter), GetKeventFlags(evt.flags));
buffer[i].Events = (int32_t)(GetSocketEvents(GetKeventFilter(evt.filter), GetKeventFlags(evt.flags)));
}

*count = numEvents;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ public void NativeName(string name, string expected)
[Theory]
[InlineData("en-US", new string[] { "United States" })]
[InlineData("US", new string[] { "United States" })]
[InlineData("zh-CN", new string[] { "China", "People's Republic of China" })]
[InlineData("CN", new string[] { "China", "People's Republic of China" })]
[InlineData("zh-CN", new string[] { "China", "People's Republic of China", "China mainland" })]
[InlineData("CN", new string[] { "China", "People's Republic of China", "China mainland" })]
public void EnglishName(string name, string[] expected)
{
string result = new RegionInfo(name).EnglishName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3062,15 +3062,6 @@ private static string getCheckFailureMsg(string propertyName)

private static string GetAmString(DateTimeFormat dateTimeFormat)
{
var dcjsSettings = new DataContractJsonSerializerSettings() { DateTimeFormat = dateTimeFormat };
var dcjs = new DataContractJsonSerializer(typeof(DateTime), dcjsSettings);
using (var ms = new MemoryStream())
{
dcjs.WriteObject(ms, new DateTime());
ms.Position = 0;
string output = new StreamReader(ms).ReadToEnd();
string actualam = output.Contains("a.m.") ? "a.m." : "a. m.";
return actualam;
}
return ((CultureInfo)dateTimeFormat.FormatProvider).DateTimeFormat.AMDesignator;
}
}

0 comments on commit d3fd4ab

Please sign in to comment.