bug-readline
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-readline] configure / linker error for setpwent in complete.c (syst


From: Gerd Hofmann
Subject: [Bug-readline] configure / linker error for setpwent in complete.c (systems without getpwent(), setpwent() and endpwent())
Date: Sat, 8 Sep 2012 18:00:01 +0200

Hello,

I'm currently working on a psql (postgresql client) port for the Android platform.
For this I'm using the Google ndk toolchain that compiles against boinc library.
I've added readline support for auto completion to the build (readline v6.2 release).
The configure script of readline correctly recognizes the lack of getpwent functions.
But in the source code I found an inconsistency in the HAVE_GETPWENT checks (one missing #if defined HAVE_GETPWENT - #endif test) in complete.c.

The configure script of postgresql tests the readline library and fails with the following error (from config.log):

configure:8424: arm-linux-androideabi-gcc -o conftest -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wformat-security -fno-strict-aliasing -fwrapv -I/export/home/geho/Projects/Android/postgresql/inst//data/local/include -D_GNU_SOURCE  -I/export/home/geho/Projects/Android/postgresql/inst//data/local/include -L/export/home/geho/Projects/Android/postgresql/inst//data/local/lib  -L/export/home/geho/Projects/Android/postgresql/inst//data/local/lib conftest.c -lreadline -lncurses -lm  >&5
/export/home/geho/Projects/Android/postgresql/inst//data/local/lib/libreadline.so: undefined reference to `setpwent'
collect2: ld returned 1 exit status

In the code of complete.c in function rl_username_completion_function (text, state) there is one missing test macro for HAVE_GETPWENT.
I could fix this issue with the attached patch.

I would appreciate if you could include this fix in the official source tree of readline.

Best Regards,
Gerd

--
Gerd Hofmann
Adam-Kraft-Str. 3
DE 90419 Nuernberg



Attachment: readline-6.2-complete.c.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]