[PATCH 1/2] Remove ancient GCC string inlines
Mike Frysinger
vapier@gentoo.org
Sat Feb 20 08:11:00 GMT 2016
On 19 Feb 2016 17:17, Wilco Dijkstra wrote:
> --- a/string/bits/string2.h
> +++ b/string/bits/string2.h
> @@ -51,25 +51,6 @@
> # include <endian.h>
> # include <bits/types.h>
>
> -# if __BYTE_ORDER == __LITTLE_ENDIAN
> -# define __STRING2_SMALL_GET16(src, idx) \
> - (((const unsigned char *) (const char *) (src))[idx + 1] << 8 \
> - | ((const unsigned char *) (const char *) (src))[idx])
> -# define __STRING2_SMALL_GET32(src, idx) \
> - (((((const unsigned char *) (const char *) (src))[idx + 3] << 8 \
> - | ((const unsigned char *) (const char *) (src))[idx + 2]) << 8 \
> - | ((const unsigned char *) (const char *) (src))[idx + 1]) << 8 \
> - | ((const unsigned char *) (const char *) (src))[idx])
> -# else
> -# define __STRING2_SMALL_GET16(src, idx) \
> - (((const unsigned char *) (const char *) (src))[idx] << 8 \
> - | ((const unsigned char *) (const char *) (src))[idx + 1])
> -# define __STRING2_SMALL_GET32(src, idx) \
> - (((((const unsigned char *) (const char *) (src))[idx] << 8 \
> - | ((const unsigned char *) (const char *) (src))[idx + 1]) << 8 \
> - | ((const unsigned char *) (const char *) (src))[idx + 2]) << 8 \
> - | ((const unsigned char *) (const char *) (src))[idx + 3])
> -# endif
endian.h is no longer needed to be included, and the comment above it too.
although these inline macros don't have __GNUC_PREREQ around them.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20160220/3142be6c/attachment.sig>
More information about the Libc-alpha
mailing list