{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/corefx/issues/16036","repository_url":"https://api.github.com/repos/dotnet/corefx","labels_url":"https://api.github.com/repos/dotnet/corefx/issues/16036/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/16036/comments","events_url":"https://api.github.com/repos/dotnet/corefx/issues/16036/events","html_url":"https://github.com/dotnet/corefx/issues/16036","id":206867037,"number":16036,"title":"Do we need #if BIGENDIAN?","user":{"login":"danmosemsft","id":6385855,"avatar_url":"https://avatars.githubusercontent.com/u/6385855?v=3","gravatar_id":"","url":"https://api.github.com/users/danmosemsft","html_url":"https://github.com/danmosemsft","followers_url":"https://api.github.com/users/danmosemsft/followers","following_url":"https://api.github.com/users/danmosemsft/following{/other_user}","gists_url":"https://api.github.com/users/danmosemsft/gists{/gist_id}","starred_url":"https://api.github.com/users/danmosemsft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danmosemsft/subscriptions","organizations_url":"https://api.github.com/users/danmosemsft/orgs","repos_url":"https://api.github.com/users/danmosemsft/repos","events_url":"https://api.github.com/users/danmosemsft/events{/privacy}","received_events_url":"https://api.github.com/users/danmosemsft/received_events","type":"User","site_admin":false},"labels":[{"id":178058848,"url":"https://api.github.com/repos/dotnet/corefx/labels/area-System.Net","name":"area-System.Net","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-02-10T18:10:13Z","updated_at":"2017-02-10T18:10:51Z","closed_at":null,"body":"These came over from desktop and we apparently never define it.\r\n\r\n```\r\nSearching 11694 files for \"#if.*BIGENDIAN\" (regex)\r\n\r\nC:\\git\\corefx\\src\\Common\\src\\System\\Net\\ByteOrder.cs:\r\n   11          public static ushort HostToNetwork(this ushort host)\r\n   12          {\r\n   13: #if BIGENDIAN\r\n   14              return host;\r\n   15  #else\r\n   ..\r\n   20          public static uint HostToNetwork(this uint host)\r\n   21          {\r\n   22: #if BIGENDIAN\r\n   23              return host;\r\n   24  #else\r\n   ..\r\n   50          public static uint NetworkBytesToNetworkUInt32(this byte[] bytes, int index)\r\n   51          {\r\n   52: #if BIGENDIAN\r\n   53              return unchecked((uint)(bytes[index + 3] | (bytes[index + 2] << 8) | (bytes[index + 1] << 16) | (bytes[index] << 24)));\r\n   54  #else\r\n   ..\r\n   59          public static void NetworkToNetworkBytes(this uint host, byte[] bytes, int index)\r\n   60          {\r\n   61: #if BIGENDIAN\r\n   62              bytes[index] = (byte)(host >> 24);\r\n   63              bytes[index + 1] = (byte)(host >> 16);\r\n\r\nC:\\git\\corefx\\src\\Common\\src\\System\\Net\\SocketAddressPal.Windows.cs:\r\n   23          public static unsafe void SetAddressFamily(byte[] buffer, AddressFamily family)\r\n   24          {\r\n   25: #if BIGENDIAN\r\n   26              buffer[0] = unchecked((byte)((int)family >> 8));\r\n   27              buffer[1] = unchecked((byte)((int)family));\r\n\r\nC:\\git\\corefx\\src\\System.Net.NameResolution\\src\\System\\Net\\NameResolutionPal.Windows.cs:\r\n   80                  //\r\n   81                  IPAddressToAdd = Marshal.ReadInt32(nativePointer);\r\n   82: #if BIGENDIAN\r\n   83                  // IP addresses from native code are always a byte array\r\n   84                  // converted to int.  We need to convert the address into\r\n   ..\r\n  175              int addressAsInt = unchecked((int)address.GetAddress());\r\n  176  \r\n  177: #if BIGENDIAN\r\n  178              // TODO #2891: above code needs testing for BIGENDIAN.\r\n  179  \r\n\r\nC:\\git\\corefx\\src\\System.Net.Primitives\\src\\System\\Net\\IPAddress.cs:\r\n  357          public static long HostToNetworkOrder(long host)\r\n  358          {\r\n  359: #if BIGENDIAN\r\n  360              return host;\r\n  361  #else\r\n  ...\r\n  367          public static int HostToNetworkOrder(int host)\r\n  368          {\r\n  369: #if BIGENDIAN\r\n  370              return host;\r\n  371  #else\r\n  ...\r\n  377          public static short HostToNetworkOrder(short host)\r\n  378          {\r\n  379: #if BIGENDIAN\r\n  380              return host;\r\n  381  #else\r\n\r\nC:\\git\\corefx\\src\\System.Net.Sockets\\src\\System\\Net\\Sockets\\SocketPal.Windows.cs:\r\n  520              }\r\n  521  \r\n  522: #if BIGENDIAN\r\n  523              ipmr.MulticastAddress = (int) (((uint) ipmr.MulticastAddress << 24) |\r\n  524                                             (((uint) ipmr.MulticastAddress & 0x0000FF00) << 8) |\r\n  ...\r\n  625              }\r\n  626  \r\n  627: #if BIGENDIAN\r\n  628              ipmr.MulticastAddress = (int) (((uint) ipmr.MulticastAddress << 24) |\r\n  629                                             (((uint) ipmr.MulticastAddress & 0x0000FF00) << 8) |\r\n\r\n12 matches across 5 files\r\n```"},"comment":{"url":"https://api.github.com/repos/dotnet/corefx/issues/comments/279021013","html_url":"https://github.com/dotnet/corefx/issues/16036#issuecomment-279021013","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/16036","id":279021013,"user":{"login":"danmosemsft","id":6385855,"avatar_url":"https://avatars.githubusercontent.com/u/6385855?v=3","gravatar_id":"","url":"https://api.github.com/users/danmosemsft","html_url":"https://github.com/danmosemsft","followers_url":"https://api.github.com/users/danmosemsft/followers","following_url":"https://api.github.com/users/danmosemsft/following{/other_user}","gists_url":"https://api.github.com/users/danmosemsft/gists{/gist_id}","starred_url":"https://api.github.com/users/danmosemsft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danmosemsft/subscriptions","organizations_url":"https://api.github.com/users/danmosemsft/orgs","repos_url":"https://api.github.com/users/danmosemsft/repos","events_url":"https://api.github.com/users/danmosemsft/events{/privacy}","received_events_url":"https://api.github.com/users/danmosemsft/received_events","type":"User","site_admin":false},"created_at":"2017-02-10T18:10:51Z","updated_at":"2017-02-10T18:10:51Z","body":"@CIPop @davidsh "}}
{"actor":{"display_login":"danmosemsft"}}