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
f1c19031
Commit
f1c19031
authored
Sep 10, 2019
by
Benjamin Peterson
Committed by
T. Wouters
Sep 10, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-38068: Clean up gettimeofday configure logic. (GH-15775)
Assume gettimeofday exists and takes two arguments.
parent
c8dfa733
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1 addition
and
59 deletions
+1
-59
Python/pytime.c
Python/pytime.c
+0
-4
Python/thread_pthread.h
Python/thread_pthread.h
+1
-8
configure
configure
+0
-31
configure.ac
configure.ac
+0
-9
pyconfig.h.in
pyconfig.h.in
+0
-7
No files found.
Python/pytime.c
View file @
f1c19031
...
...
@@ -718,11 +718,7 @@ pygettimeofday(_PyTime_t *tp, _Py_clock_info_t *info, int raise)
#else
/* HAVE_CLOCK_GETTIME */
/* test gettimeofday() */
#ifdef GETTIMEOFDAY_NO_TZ
err
=
gettimeofday
(
&
tv
);
#else
err
=
gettimeofday
(
&
tv
,
(
struct
timezone
*
)
NULL
);
#endif
if
(
err
)
{
if
(
raise
)
{
PyErr_SetFromErrno
(
PyExc_OSError
);
...
...
Python/thread_pthread.h
View file @
f1c19031
...
...
@@ -97,17 +97,10 @@
#endif
/* We assume all modern POSIX systems have gettimeofday() */
#ifdef GETTIMEOFDAY_NO_TZ
#define GETTIMEOFDAY(ptv) gettimeofday(ptv)
#else
#define GETTIMEOFDAY(ptv) gettimeofday(ptv, (struct timezone *)NULL)
#endif
#define MICROSECONDS_TO_TIMESPEC(microseconds, ts) \
do { \
struct timeval tv; \
GETTIMEOFDAY(&tv
); \
gettimeofday(&tv, NULL
); \
tv.tv_usec += microseconds % 1000000; \
tv.tv_sec += microseconds / 1000000; \
tv.tv_sec += tv.tv_usec / 1000000; \
...
...
configure
View file @
f1c19031
...
...
@@ -12735,37 +12735,6 @@ if ac_fn_c_try_compile "$LINENO"; then :
$as_echo
"#define SETPGRP_HAVE_ARG 1"
>>
confdefs.h
fi
rm
-f
core conftest.err conftest.
$ac_objext
conftest.
$ac_ext
fi
done
for
ac_func
in
gettimeofday
do
:
ac_fn_c_check_func
"
$LINENO
"
"gettimeofday"
"ac_cv_func_gettimeofday"
if
test
"x
$ac_cv_func_gettimeofday
"
=
xyes
;
then
:
cat
>>
confdefs.h
<<
_ACEOF
#define HAVE_GETTIMEOFDAY 1
_ACEOF
cat
confdefs.h -
<<
_ACEOF
>conftest.
$ac_ext
/* end confdefs.h. */
#include <sys/time.h>
int
main ()
{
gettimeofday((struct timeval*)0,(struct timezone*)0);
;
return 0;
}
_ACEOF
if
ac_fn_c_try_compile
"
$LINENO
"
;
then
:
else
$as_echo
"#define GETTIMEOFDAY_NO_TZ 1"
>>
confdefs.h
fi
rm
-f
core conftest.err conftest.
$ac_objext
conftest.
$ac_ext
...
...
configure.ac
View file @
f1c19031
...
...
@@ -3865,15 +3865,6 @@ AC_CHECK_FUNCS(setpgrp,
[AC_DEFINE(SETPGRP_HAVE_ARG, 1, [Define if setpgrp() must be called as setpgrp(0, 0).])],
[])
)
AC_CHECK_FUNCS(gettimeofday,
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/time.h>]],
[[gettimeofday((struct timeval*)0,(struct timezone*)0);]])],
[],
[AC_DEFINE(GETTIMEOFDAY_NO_TZ, 1,
[Define if gettimeofday() does not have second (timezone) argument
This is the case on Motorola V4 (R40V4.2)])
])
)
# We search for both crypt and crypt_r as one or the other may be defined
# This gets us our -lcrypt in LIBS when required on the target platform.
...
...
pyconfig.h.in
View file @
f1c19031
...
...
@@ -44,10 +44,6 @@
/* Define if getpgrp() must be called as getpgrp(0). */
#undef GETPGRP_HAVE_ARG
/* Define if gettimeofday() does not have second (timezone) argument This is
the case on Motorola V4 (R40V4.2) */
#undef GETTIMEOFDAY_NO_TZ
/* Define to 1 if you have the `accept4' function. */
#undef HAVE_ACCEPT4
...
...
@@ -510,9 +506,6 @@
/* Define to 1 if you have the `getspnam' function. */
#undef HAVE_GETSPNAM
/* Define to 1 if you have the `gettimeofday' function. */
#undef HAVE_GETTIMEOFDAY
/* Define to 1 if you have the `getwd' function. */
#undef HAVE_GETWD
...
...
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