On Thu, Jun 2, 2016 at 7:04 PM, barret rhoden <[email protected]> wrote:

> On 2016-06-02 at 18:26 Dan Cross wrote:
> > On Thu, Jun 2, 2016 at 6:24 PM, barret rhoden <[email protected]>
> wrote:
> >
> > > Hi -
> > >
> > > On 2016-06-02 at 17:30 Dan Cross wrote:
> > > > Add an Akaros-only sysdeps/akaros/bits/{stdlib,string}-akaros.h
> > > > with prototypes for reallocarray and strlcpy and strlcat
> respectively.
> > > > Modify sysdeps/stdlib.h and sysdeps/string.h to include those
> headers,
> > > > respectively.  Modify Makefile and Versions to export these
> functions.
> > >
> > > Do we need some sort of #defines to advertise these functions, such as
> > > HAVE_STRLCAT, so that other projects don't try to implement their own
> > > version?
> > >
> >
> > No; these are usually detected by e.g. autotools. For example, the BSD
> > projects don't define such symbols.
>
> Sounds good.  If something pops up with these in the future, we might
> be able to use #ifdef __USE_BSD.  That's what was done in an earlier
> glibc patch for strlcpy.
> (https://www.sourceware.org/ml/libc-alpha/2000-08/msg00052.html)
>
> Oh, any thoughts about these two:
>
> > --- a/tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/stdlib.h
> > +++ b/tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/stdlib.h
> > @@ -33,6 +33,10 @@
> >
> >  __BEGIN_DECLS
> >
> > +#ifdef __ros__
> > +#include <bits/stdlib-akaros.h>
> > +#endif
> > +
>
> We shouldn't need the ifdef __ros__ around it, since the header is in
> our sysdeps and should only be built for our system.
>

Ah yes! I put those in as a form of "executable documentation". I figured
if someone ever wanted to see what changes we made for Akaros, they need
only look between the #ifdef __ros__ and #endif. Of course, the name of the
file we #include is a dead giveaway, but one could imagine other changes
potentially creeping in over time.

and here:
>
> > --- a/tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/string.h
> > +++ b/tools/compilers/gcc-glibc/glibc-2.19-akaros/sysdeps/akaros/string.h
> > @@ -31,6 +31,10 @@ __BEGIN_DECLS
> >  #define      __need_NULL
> >  #include <stddef.h>
> >
> > +#ifdef __ros__
> > +#include <bits/string-akaros.h>
> > +#endif
>

Same.

This is pretty interesting btw:
>
> https://lwn.net/Articles/507319/
>
> (history of strlcpy and glibc).


"Reactions among core glibc contributors on the topic of including
strlcpy() and strlcat() have been varied over the years. Christoph
Hellwig's early patch was rejected in the then-primary maintainer's
inimitable style (1 and 2). But reactions from other glibc developers have
been more nuanced, ..."

Ah, Ulrich....

(I'll have to go through the rest later. I'm trying to chase down a toddler
and get her to eat spaghetti....)

-- 
You received this message because you are subscribed to the Google Groups 
"Akaros" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to