Re: getrandom not replaced

2022-12-25 Thread Po Lu
Paul Eggert writes: > I meant to use the compiler that is actually used to compile > lib/getrandom.c. You can deduce this with something like this: > > rm lib/getrandom.o; cd lib; make V=1 getrandom.o > > and replace '-c -o getrandom.o' with '-E' in the resulting command. > > >> #if 1 >> /* Fill

Re: getrandom not replaced

2022-12-25 Thread Paul Eggert
On 12/25/22 18:50, Po Lu wrote: Paul Eggert writes: What's the output of gcc -E? Which of armv7a-unknown-linux-android19-clang -E or gcc -E on the host do you mean? I meant to use the compiler that is actually used to compile lib/getrandom.c. You can deduce this with something like this:

Re: getrandom not replaced

2022-12-25 Thread Po Lu
Paul Eggert writes: > What's the output of gcc -E? Which of armv7a-unknown-linux-android19-clang -E or gcc -E on the host do you mean? > Also, it sounds like lib/sys/random.h wasn't generated correctly; > what's in that file? Here it is, thanks. /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /*

Re: getrandom not replaced

2022-12-25 Thread Paul Eggert
On 12/25/22 17:07, Po Lu wrote: ~/emacs-dev/emacs-android/lib/getrandom.c:112:1: warning: no previous prototype for function 'getrandom' [-Wmissing-prototypes] getrandom (void *buffer, size_t length, unsigned int flags) What's the output of gcc -E? Also, it sounds like lib/sys/random.h wasn't

Re: getrandom not replaced

2022-12-25 Thread Bruno Haible
Po Lu wrote: > I know Emacs doesn't usually cross compile Why cross-compile? Both the Terminal-IDE and the Termux app support native compilation. > Trying to build Emacs on Android results in the following problematic > gnulib.mk. Again, what is the Android API level that you are using? Bruno

Re: Android problem

2022-12-25 Thread Bruno Haible
Po Lu wrote: > Someone asked me to port Emacs to Android. Please be specific: Which Android API level are you using at compile-time? And which Android version at run-time? > In doing so noticed that the > fpending module no longer works there Please be specific: What do you mean by "not works"?

Android problem

2022-12-25 Thread Po Lu
Someone asked me to port Emacs to Android. In doing so noticed that the fpending module no longer works there, because struct FILE * is now: __BEGIN_DECLS /** The opaque structure implementing `FILE`. Do not make any assumptions about its content. */ struct __sFILE { #if defined(__LP64__) cha

[PATCH] largefile: sync from Autoconf master

2022-12-25 Thread Paul Eggert
* m4/largefile.m4 (gl_SET_LARGEFILE_SOURCE): Test whether AC_SYS_YEAR2038 is defined when this macro is defined, not when it is used, as we now define AC_SYS_YEAR2038 later. (_AC_SYS_LARGEFILE_MACRO_VALUE): Remove. (_AC_SYS_YEAR2038_TEST_CODE, _AC_SYS_YEAR2038_OPTIONS) (_AC_SYS_YEAR2038_PROBE, _AC_