This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: log2, log2f


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Yaakov (Cygwin/X) on 3/17/2009 7:50 PM:
> SUSv3 requires that log2 and log2f be defined as functions (at least)
> and may also be defined as macros.  Right now, though, these are only
> defined as macros, and besides being noncompliant, it also creates false
> negatives with configure AC_CHECK_FUNC[S] tests.
> 
> Here's my first attempt at a patch to define these as functions instead.

Your patch adds the functions (good) but deletes the macros.  SUSv3 (and
v4) allow these to be macros in addition to functions.  Since the body is
so trivial, maybe it is worth keeping the macro around to avoid the
penalty of an extra function call, with minimal impact to code size in the
common usage of log2?

- --
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAknA4+8ACgkQ84KuGfSFAYCGvACfac0voT/1G82zuJPiu10/SBWH
RVwAn1/dUw9zmXburF6POhXIutwlMo+w
=Wrcs
-----END PGP SIGNATURE-----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]