Welcome! Log In Create A New Profile

Advanced

[PATCH 2 of 2] Updated __ORDER_LITTLE_ENDIAN__ to match NGX standards and changed to uint32_t data type

Matthew Marangoni
February 03, 2018 11:42AM
# HG changeset patch
# User Matthew Marangoni <matthew.marangoni@gmail.com>
# Date 1517675878 28800
# Sat Feb 03 08:37:58 2018 -0800
# Node ID 4fe15c57e1d5c7fa4e2daa365f82fd00d0a1f6f4
# Parent e84b174c99ca39155e80dbb7458181e20190b70b
Updated __ORDER_LITTLE_ENDIAN__ to match NGX standards and changed to uint32_t data type

diff -r e84b174c99ca -r 4fe15c57e1d5 src/core/ngx_murmurhash.c
--- a/src/core/ngx_murmurhash.c Mon Jan 22 13:15:25 2018 -0800
+++ b/src/core/ngx_murmurhash.c Sat Feb 03 08:37:58 2018 -0800
@@ -16,8 +16,8 @@
h = 0 ^ len;

while (len >= 4) {
-#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
- k = *(u_int32_t*)data;
+#if (NGX_HAVE_LITTLE_ENDIAN)
+ k = *(uint32_t*)data;
#else
k = data[0];
k |= data[1] << 8;
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH 1 of 2] Optimized murmurhash performance

Matthew Marangoni 534 February 03, 2018 11:42AM

[PATCH 2 of 2] Updated __ORDER_LITTLE_ENDIAN__ to match NGX standards and changed to uint32_t data type

Matthew Marangoni 191 February 03, 2018 11:42AM

Re: [PATCH 2 of 2] Updated __ORDER_LITTLE_ENDIAN__ to match NGX standards and changed to uint32_t data type

Valentin V. Bartenev 200 February 03, 2018 08:22PM

Re: [PATCH 2 of 2] Updated __ORDER_LITTLE_ENDIAN__ to match NGX standards and changed to uint32_t data type

Matthew Marangoni 234 February 12, 2018 03:20PM

Re: [PATCH 2 of 2] Updated __ORDER_LITTLE_ENDIAN__ to match NGX standards and changed to uint32_t data type

Maxim Dounin 363 February 13, 2018 07:32AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 182
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready