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. 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 This is pretty interesting btw: https://lwn.net/Articles/507319/ (history of strlcpy and glibc). Barret -- 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.
