Re: [PATCH v1] Port ndbm

Vaibhav Gupta <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <CAP+cEOPN=f9DX-WpgiVNnjmHU_zW-A7E+44ij7OAAqDOs09N2g@mail.gmail.com>
On Fri, Jul 26, 2019, 2:31 PM Richard Earnshaw (lists) <
[email protected]> wrote:

>
>
> On 24/07/2019 17:49, Corinna Vinschen wrote:
> > On Jul 24 10:47, Joel Sherrill wrote:
> >> On Wed, Jul 24, 2019 at 2:23 AM Corinna Vinschen <[email protected]>
> >> wrote:
> >>
> >>> On Jul 10 14:25, Vaibhav Gupta wrote:
> >>>> ---
> >>>>   newlib/libc/include/ndbm.h     |  93 ++++++++++++++
> >>>>   newlib/libc/search/Makefile.am |   1 +
> >>>>   newlib/libc/search/ndbm.c      | 217
> +++++++++++++++++++++++++++++++++
> >>>>   3 files changed, 311 insertions(+)
> >>>>   create mode 100644 newlib/libc/include/ndbm.h
> >>>>   create mode 100644 newlib/libc/search/ndbm.c
> >>>
> >>> Pushed.
> >>>
> >>
> >> Thank you.
> >>
> >> It touched a Makefile.am. Doesn't something need to be regenerated?
> >
> > Oh, right.  Done.
> >
> >
> > Corinna
> >
>
> I'm now seeing a build error on arm-eabi (though interestingly, not
> AArch64):
>
> /work/rearnsha/scratch/nightly/arm/trunk/./gcc/xgcc
> -B/work/rearnsha/scratch/nightly/arm/trunk/./gcc/ -nostdinc
> -B/work/rearnsha/scratch/nightly/arm/trunk/arm-eabi/thumb/newlib/
> -isystem
> /work/rearnsha/scratch/nightly/arm/trunk/arm-eabi/thumb/newlib/targ-include
>
> -isystem
> /work/rearnsha/gnusrc/nightly/gcc-cross/trunk/newlib/libc/include
> -B/work/rearnsha/scratch/nightly/arm/trunk/arm-eabi/thumb/libgloss/arm
> -L/work/rearnsha/scratch/nightly/arm/trunk/arm-eabi/thumb/libgloss/libnosys
>
> -L/work/rearnsha/gnusrc/nightly/gcc-cross/trunk/libgloss/arm
> -B/work/rearnsha/scratch/nightly/arm/trunk/testinstall/arm-eabi/bin/
> -B/work/rearnsha/scratch/nightly/arm/trunk/testinstall/arm-eabi/lib/
> -isystem
> /work/rearnsha/scratch/nightly/arm/trunk/testinstall/arm-eabi/include
> -isystem
> /work/rearnsha/scratch/nightly/arm/trunk/testinstall/arm-eabi/sys-include
> -L/work/rearnsha/scratch/nightly/arm/trunk/./ld  -mthumb
> -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\"
> -DPACKAGE_VERSION=\"3.1.0\" -DPACKAGE_STRING=\"newlib\ 3.1.0\"
> -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I.
> -I/work/rearnsha/gnusrc/nightly/gcc-cross/trunk/newlib/libc/search
> -fno-builtin -D_COMPILING_NEWLIB -DARM_RDI_MONITOR -DHAVE_INIT_FINI
> -g -O2  -mthumb -c -o lib_a-ndbm.o `test -f 'ndbm.c' || echo
> '/work/rearnsha/gnusrc/nightly/gcc-cross/trunk/newlib/libc/search/'`ndbm.c
> /work/rearnsha/gnusrc/nightly/gcc-cross/trunk/newlib/libc/search/ndbm.c:
> In function ‘dbm_open’:
> /work/rearnsha/gnusrc/nightly/gcc-cross/trunk/newlib/libc/search/ndbm.c:67:12:
>
> error: ‘MAXPATHLEN’ undeclared (first use in this function)
>     67 |  char path[MAXPATHLEN];
>        |            ^~~~~~~~~~
>
> Does this file need to include sys/param.h?
>
Yah. sys/param.h has the macro definition of MAXPATHLEN
.
I guess ndbm.c has included it.

Vaibhav Gupta

>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.