[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master f3fa5d7: Merge from gnulib
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] master f3fa5d7: Merge from gnulib |
Date: |
Fri, 2 Dec 2016 05:57:20 +0000 (UTC) |
branch: master
commit f3fa5d7e229f88e6f83dc24757b33e9b17bf10ae
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>
Merge from gnulib
This incorporates:
2016-11-27 md4,md5,sha*: tune for recent glibc _STRING_INLINE_unaligned
2016-11-21 snippet/c++defs: Simplify _GL_CXXALIAS_* macros.
* build-aux/snippet/c++defs.h:
* lib/md5.c, lib/sha1.c, lib/sha256.c, lib/sha512.c:
Copy from gnulib.
---
build-aux/snippet/c++defs.h | 40 +++++++++++++++++++++++++---------------
lib/md5.c | 2 +-
lib/sha1.c | 2 +-
lib/sha256.c | 2 +-
lib/sha512.c | 2 +-
5 files changed, 29 insertions(+), 19 deletions(-)
diff --git a/build-aux/snippet/c++defs.h b/build-aux/snippet/c++defs.h
index d42ea25..2b819da 100644
--- a/build-aux/snippet/c++defs.h
+++ b/build-aux/snippet/c++defs.h
@@ -133,8 +133,11 @@
static const struct _gl_ ## func ## _wrapper \
{ \
typedef rettype (*type) parameters; \
- inline type rpl () const { return ::rpl_func; } \
- inline operator type () const { return rpl (); } \
+ \
+ inline operator type () const \
+ { \
+ return ::rpl_func; \
+ } \
} func = {}; \
} \
_GL_EXTERN_C int _gl_cxxalias_dummy
@@ -155,9 +158,11 @@
static const struct _gl_ ## func ## _wrapper \
{ \
typedef rettype (*type) parameters; \
- inline type rpl () const \
- { return reinterpret_cast<type>(::rpl_func); } \
- inline operator type () const { return rpl (); } \
+ \
+ inline operator type () const \
+ { \
+ return reinterpret_cast<type>(::rpl_func); \
+ } \
} func = {}; \
} \
_GL_EXTERN_C int _gl_cxxalias_dummy
@@ -183,10 +188,13 @@
static const struct _gl_ ## func ## _wrapper \
{ \
typedef rettype (*type) parameters; \
- inline type rpl () const { return ::func; } \
- inline operator type () const { return rpl (); } \
+ \
+ inline operator type () const \
+ { \
+ return ::func; \
+ } \
} func = {}; \
- } \
+ } \
_GL_EXTERN_C int _gl_cxxalias_dummy
#else
# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
@@ -205,9 +213,11 @@
static const struct _gl_ ## func ## _wrapper \
{ \
typedef rettype (*type) parameters; \
- inline type rpl () const \
- { return reinterpret_cast<type>(::func); } \
- inline operator type () const { return rpl (); }\
+ \
+ inline operator type () const \
+ { \
+ return reinterpret_cast<type>(::func); \
+ } \
} func = {}; \
} \
_GL_EXTERN_C int _gl_cxxalias_dummy
@@ -235,10 +245,10 @@
{ \
typedef rettype (*type) parameters; \
\
- inline type rpl () const \
- { return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); }\
- \
- inline operator type () const { return rpl (); } \
+ inline operator type () const \
+ { \
+ return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); \
+ } \
} func = {}; \
} \
_GL_EXTERN_C int _gl_cxxalias_dummy
diff --git a/lib/md5.c b/lib/md5.c
index 62d247e..cec62339 100644
--- a/lib/md5.c
+++ b/lib/md5.c
@@ -259,7 +259,7 @@ md5_process_bytes (const void *buffer, size_t len, struct
md5_ctx *ctx)
/* Process available complete blocks. */
if (len >= 64)
{
-#if !_STRING_ARCH_unaligned
+#if !(_STRING_ARCH_unaligned || _STRING_INLINE_unaligned)
# define UNALIGNED_P(p) ((uintptr_t) (p) % alignof (uint32_t) != 0)
if (UNALIGNED_P (buffer))
while (len > 64)
diff --git a/lib/sha1.c b/lib/sha1.c
index 45f1cbe..753c088 100644
--- a/lib/sha1.c
+++ b/lib/sha1.c
@@ -246,7 +246,7 @@ sha1_process_bytes (const void *buffer, size_t len, struct
sha1_ctx *ctx)
/* Process available complete blocks. */
if (len >= 64)
{
-#if !_STRING_ARCH_unaligned
+#if !(_STRING_ARCH_unaligned || _STRING_INLINE_unaligned)
# define UNALIGNED_P(p) ((uintptr_t) (p) % alignof (uint32_t) != 0)
if (UNALIGNED_P (buffer))
while (len > 64)
diff --git a/lib/sha256.c b/lib/sha256.c
index 0be8fd2..5251e8d 100644
--- a/lib/sha256.c
+++ b/lib/sha256.c
@@ -379,7 +379,7 @@ sha256_process_bytes (const void *buffer, size_t len,
struct sha256_ctx *ctx)
/* Process available complete blocks. */
if (len >= 64)
{
-#if !_STRING_ARCH_unaligned
+#if !(_STRING_ARCH_unaligned || _STRING_INLINE_unaligned)
# define UNALIGNED_P(p) ((uintptr_t) (p) % alignof (uint32_t) != 0)
if (UNALIGNED_P (buffer))
while (len > 64)
diff --git a/lib/sha512.c b/lib/sha512.c
index 5494dcb..71a7eca 100644
--- a/lib/sha512.c
+++ b/lib/sha512.c
@@ -387,7 +387,7 @@ sha512_process_bytes (const void *buffer, size_t len,
struct sha512_ctx *ctx)
/* Process available complete blocks. */
if (len >= 128)
{
-#if !_STRING_ARCH_unaligned
+#if !(_STRING_ARCH_unaligned || _STRING_INLINE_unaligned)
# define UNALIGNED_P(p) ((uintptr_t) (p) % alignof (u64) != 0)
if (UNALIGNED_P (buffer))
while (len > 128)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master f3fa5d7: Merge from gnulib,
Paul Eggert <=