Hi,

On Wed, Sep 15, 2021 at 7:16 PM Sandeep Gupta <gupta.sand...@gmail.com> wrote:
> I get following warnings and errors:
> Python/pytime.c:398:10: warning: implicit conversion from 'long' to 'double' 
> changes value from 9223372036854775807 to 9223372036854775808 
> [-Wimplicit-const-int-float-conver
> sion]
>    if (!_Py_InIntegralTypeRange(_PyTime_t, d)) {

This warning is tracked at: https://bugs.python.org/issue39277

I proposed a fix but i'm not sure that it's correct and so I never did
anything with this PR: https://github.com/python/cpython/pull/17933

> Python/bootstrap_hash.c:141:17: error: implicit declaration of function 
> 'getrandom' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
>            n = getrandom(dest, n, flags);
>                ^
> Python/bootstrap_hash.c:145:17: error: implicit declaration of function 
> 'getrandom' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
>            n = getrandom(dest, n, flags);

This code path should only be taken if HAVE_GETRANDOM macro is
defined. Is it defined in your pyconfig.h file?

Is the getrandom() function available in your libc?

configure.ac tries to build this code:
---
    #include <sys/random.h>

    int main() {
        char buffer[1];
        const size_t buflen = sizeof(buffer);
        const int flags = 0;
        /* ignore the result, Python checks for ENOSYS at runtime */
        (void)getrandom(buffer, buflen, flags);
        return 0;
    }
---

Maybe Android needs a different #include? Or a different test?

> Not sure if this is limitation of the platform or Python codebase needs fixes.

Enhancements are welcomed :-)

Victor
-- 
Night gathers, and now my watch begins. It shall not end until my death.
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/H35G7QNDUFNQS6AXMN76K3FRE63BXOXF/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to