This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: [PATCH 1/2] Remove ancient GCC string inlines


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

Attachment: signature.asc
Description: Digital signature


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