Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 12 Feb 2013 11:22:34 -0600
From: "jfoug" <jfoug@....net>
To: <john-dev@...ts.openwall.com>
Subject: RE: strnlen function in formats.c

A better change, might be to put it in misc, and to use a unique name, that
will not impact any compiler's libs.

Something like size_t jstrnlen(const char *s, size_t max), building that as
a 'real' function in misc, and then changing the usages in format to use
that instead.

I am pretty sure the function I put into format.c is pretty fast, and
stable, it could simply be moved to misc.c and renamed.

Jim.

From: Erik Winkler
>Testing the latest Jumbo with on iMac G5 running MacOS 10.5 I get an error
regarding the strnlen function.  Apparently it does not exist on 10.5.  
>
>Undefined symbols:
>  "_strnlen", referenced from:
>      _fmt_self_test in formats.o
>      _fmt_self_test in formats.o
>ld: symbol(s) not found
>
>I corrected this by adding || (__APPLE__) to the if defined statement for
strnlen.  Probably only needs to be done for 10.5 and below, but I don't
have 10.6 available to test it.  The strnlen function is nonexistent or
broken >is some UNIX flavors, so maybe you want to think about making this a
permanent change.
>
>Regards,
>Erik

Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ