Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(216)

Side by Side Diff: nspr/pr/src/pthreads/ptio.c

Issue 407383002: Update to NSPR 4.10.7 Beta 3. (Closed) Base URL: http://src.chromium.org/svn/trunk/deps/third_party/nss
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « nspr/pr/src/misc/prsystem.c ('k') | nspr/pr/src/pthreads/ptsynch.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public 2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 5
6 /* 6 /*
7 ** File: ptio.c 7 ** File: ptio.c
8 ** Descritpion: Implemenation of I/O methods for pthreads 8 ** Descritpion: Implemenation of I/O methods for pthreads
9 */ 9 */
10 10
(...skipping 2836 matching lines...) Expand 10 before | Expand all | Expand 10 after
2847 data->value.linger.polarity = 2847 data->value.linger.polarity =
2848 (linger.l_onoff) ? PR_TRUE : PR_FALSE; 2848 (linger.l_onoff) ? PR_TRUE : PR_FALSE;
2849 data->value.linger.linger = 2849 data->value.linger.linger =
2850 PR_SecondsToInterval(linger.l_linger); 2850 PR_SecondsToInterval(linger.l_linger);
2851 break; 2851 break;
2852 } 2852 }
2853 case PR_SockOpt_Reuseaddr: 2853 case PR_SockOpt_Reuseaddr:
2854 case PR_SockOpt_Keepalive: 2854 case PR_SockOpt_Keepalive:
2855 case PR_SockOpt_NoDelay: 2855 case PR_SockOpt_NoDelay:
2856 case PR_SockOpt_Broadcast: 2856 case PR_SockOpt_Broadcast:
2857 case PR_SockOpt_Reuseport:
2857 { 2858 {
2858 PRIntn value; 2859 PRIntn value;
2859 length = sizeof(PRIntn); 2860 length = sizeof(PRIntn);
2860 rv = getsockopt( 2861 rv = getsockopt(
2861 fd->secret->md.osfd, level, name, (char*)&value, &length); 2862 fd->secret->md.osfd, level, name, (char*)&value, &length);
2862 PR_ASSERT((-1 == rv) || (sizeof(PRIntn) == length)); 2863 PR_ASSERT((-1 == rv) || (sizeof(PRIntn) == length));
2863 data->value.reuse_addr = (0 == value) ? PR_FALSE : PR_TRUE; 2864 data->value.reuse_addr = (0 == value) ? PR_FALSE : PR_TRUE;
2864 break; 2865 break;
2865 } 2866 }
2866 case PR_SockOpt_McastLoopback: 2867 case PR_SockOpt_McastLoopback:
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
2966 linger.l_onoff = data->value.linger.polarity; 2967 linger.l_onoff = data->value.linger.polarity;
2967 linger.l_linger = PR_IntervalToSeconds(data->value.linger.linger ); 2968 linger.l_linger = PR_IntervalToSeconds(data->value.linger.linger );
2968 rv = setsockopt( 2969 rv = setsockopt(
2969 fd->secret->md.osfd, level, name, (char*)&linger, sizeof(lin ger)); 2970 fd->secret->md.osfd, level, name, (char*)&linger, sizeof(lin ger));
2970 break; 2971 break;
2971 } 2972 }
2972 case PR_SockOpt_Reuseaddr: 2973 case PR_SockOpt_Reuseaddr:
2973 case PR_SockOpt_Keepalive: 2974 case PR_SockOpt_Keepalive:
2974 case PR_SockOpt_NoDelay: 2975 case PR_SockOpt_NoDelay:
2975 case PR_SockOpt_Broadcast: 2976 case PR_SockOpt_Broadcast:
2977 case PR_SockOpt_Reuseport:
2976 { 2978 {
2977 PRIntn value = (data->value.reuse_addr) ? 1 : 0; 2979 PRIntn value = (data->value.reuse_addr) ? 1 : 0;
2978 rv = setsockopt( 2980 rv = setsockopt(
2979 fd->secret->md.osfd, level, name, 2981 fd->secret->md.osfd, level, name,
2980 (char*)&value, sizeof(PRIntn)); 2982 (char*)&value, sizeof(PRIntn));
2981 #ifdef LINUX 2983 #ifdef LINUX
2982 /* for pt_LinuxSendFile */ 2984 /* for pt_LinuxSendFile */
2983 if (name == TCP_NODELAY && rv == 0) { 2985 if (name == TCP_NODELAY && rv == 0) {
2984 fd->secret->md.tcp_nodelay = value; 2986 fd->secret->md.tcp_nodelay = value;
2985 } 2987 }
(...skipping 2015 matching lines...) Expand 10 before | Expand all | Expand 10 after
5001 5003
5002 PR_IMPLEMENT(PRStatus) PR_GetFileInfo64UTF16(const PRUnichar *fn, PRFileInfo64 * info) 5004 PR_IMPLEMENT(PRStatus) PR_GetFileInfo64UTF16(const PRUnichar *fn, PRFileInfo64 * info)
5003 { 5005 {
5004 PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0); 5006 PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
5005 return PR_FAILURE; 5007 return PR_FAILURE;
5006 } 5008 }
5007 /* ================ UTF16 Interfaces ================================ */ 5009 /* ================ UTF16 Interfaces ================================ */
5008 #endif /* MOZ_UNICODE */ 5010 #endif /* MOZ_UNICODE */
5009 5011
5010 /* ptio.c */ 5012 /* ptio.c */
OLDNEW
« no previous file with comments | « nspr/pr/src/misc/prsystem.c ('k') | nspr/pr/src/pthreads/ptsynch.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698