Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
620e3641
Commit
620e3641
authored
Mar 19, 2013
by
Kristján Valur Jónsson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
issue #9090 : Limit the fix to windows since getting a portable simple
time function on non-windows isn't quite simple.
parent
6ebc8f3f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletion
+20
-1
Modules/socketmodule.c
Modules/socketmodule.c
+20
-1
No files found.
Modules/socketmodule.c
View file @
620e3641
...
...
@@ -751,6 +751,14 @@ internal_select(PySocketSockObject *s, int writing)
}
END_SELECT_LOOP(s)
*/
#ifdef _WIN32
/* _PyTime_floattime is exported from timemodule.c which is a builtin on windows
* but not on linux. The problem we are fixing is mostly a windows problem so
* we leave it at that.
*/
#define HAVE_PYTIME_FLOATTIME
#endif
#ifdef HAVE_PYTIME_FLOATTIME
PyAPI_FUNC
(
double
)
_PyTime_floattime
(
void
);
/* defined in timemodule.c */
#define BEGIN_SELECT_LOOP(s) \
{ \
...
...
@@ -768,7 +776,18 @@ PyAPI_FUNC(double) _PyTime_floattime(void); /* defined in timemodule.c */
break; \
interval = deadline - _PyTime_floattime(); \
} \
} \
}
#else
#define BEGIN_SELECT_LOOP(s) \
{ \
double interval = s->sock_timeout; \
do { \
errno = 0; \
#define END_SELECT_LOOP(s) \
} while(0); \
}
#endif
/* Initialize a new socket object. */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment