113 lines
3.5 KiB
Diff
113 lines
3.5 KiB
Diff
From a32ce8344554128320ba3a7757260c8632db8b3e Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
|
|
Date: Mon, 21 Jan 2019 14:55:34 +0100
|
|
Subject: [PATCH] Add generated C++-guards to <xcrypt.h>.
|
|
|
|
---
|
|
.gitignore | 1 +
|
|
Makefile.am | 32 ++++++++++++++++++++------------
|
|
NEWS | 1 +
|
|
xcrypt.h => xcrypt.h.in | 4 ++++
|
|
4 files changed, 26 insertions(+), 12 deletions(-)
|
|
rename xcrypt.h => xcrypt.h.in (98%)
|
|
|
|
diff --git a/Makefile.am b/Makefile.am
|
|
index 907e80e..2a53aaa 100644
|
|
--- a/Makefile.am
|
|
+++ b/Makefile.am
|
|
@@ -19,9 +19,10 @@ TEST_EXTENSIONS = .sh
|
|
|
|
EXTRA_DIST = \
|
|
LICENSING THANKS \
|
|
- crypt.h.in.in libcrypt.map.in libcrypt.minver \
|
|
- gen-map.awk gen-vers.awk gen-crypt-h.awk \
|
|
- gen-hashes.awk sel-hashes.awk hashes.lst
|
|
+ crypt.h.in.in xcrypt.h.in libcrypt.map.in \
|
|
+ libcrypt.minver gen-map.awk gen-vers.awk \
|
|
+ gen-crypt-h.awk gen-hashes.awk sel-hashes.awk \
|
|
+ hashes.lst
|
|
|
|
notrans_dist_man3_MANS = \
|
|
crypt.3 crypt_r.3 crypt_ra.3 crypt_rn.3 \
|
|
@@ -40,9 +41,9 @@ noinst_HEADERS = \
|
|
crypt-obsolete.h crypt-port.h test-des-cases.h
|
|
|
|
if ENABLE_XCRYPT_COMPAT_FILES
|
|
-include_HEADERS = xcrypt.h
|
|
+nodist_include_HEADERS += xcrypt.h
|
|
else
|
|
-noinst_HEADERS += xcrypt.h
|
|
+nodist_noinst_HEADERS += xcrypt.h
|
|
endif
|
|
|
|
|
|
@@ -98,12 +99,13 @@ CLEANFILES = Makefile.deps.T Makefile.deps \
|
|
libcrypt.map libcrypt.map.T \
|
|
crypt-symbol-vers.h crypt-symbol-vers.h.T \
|
|
crypt-hashes.h crypt-hashes.h.T \
|
|
- crypt.h crypt.h.T *.gcda *.gcno
|
|
+ crypt.h crypt.h.T xcrypt.h xcrypt.h.T \
|
|
+ *.gcda *.gcno
|
|
|
|
DISTCLEANFILES = .deps/*.Plo
|
|
|
|
# Empty target to have needed headers pre-generated before any other target.
|
|
-Makefile.deps: crypt.h
|
|
+Makefile.deps: xcrypt.h
|
|
$(AM_V_GEN)LC_ALL=C echo "# Deps" > Makefile.deps.T
|
|
$(AM_V_at)mv -f Makefile.deps.T Makefile.deps
|
|
|
|
@@ -115,6 +117,12 @@ libcrypt.map: libcrypt.map.in gen-map.awk Makefile
|
|
-f $(srcdir)/gen-map.awk $(srcdir)/libcrypt.map.in > libcrypt.map.T
|
|
$(AM_V_at)mv -f libcrypt.map.T libcrypt.map
|
|
|
|
+crypt-hashes.h: hashes.lst gen-hashes.awk Makefile
|
|
+ $(AM_V_GEN)LC_ALL=C $(AWK) -f $(srcdir)/gen-hashes.awk \
|
|
+ -v ENABLED_HASHES=$(hashes_enabled) \
|
|
+ $(srcdir)/hashes.lst > crypt-hashes.h.T
|
|
+ $(AM_V_at)mv -f crypt-hashes.h.T crypt-hashes.h
|
|
+
|
|
crypt-symbol-vers.h: libcrypt.map.in gen-vers.awk Makefile
|
|
$(AM_V_GEN)LC_ALL=C $(AWK) \
|
|
-v SYMVER_MIN=$(SYMVER_MIN) \
|
|
@@ -134,11 +142,11 @@ crypt.h: crypt.h.in crypt-hashes.h crypt-symbol-vers.h gen-crypt-h.awk config.h
|
|
$(SED) -i -e "s/@DEFAULT_PREFIX_ENABLED@/0/g" crypt.h.T
|
|
$(AM_V_at)mv -f crypt.h.T crypt.h
|
|
|
|
-crypt-hashes.h: hashes.lst gen-hashes.awk Makefile
|
|
- $(AM_V_GEN)LC_ALL=C $(AWK) -f $(srcdir)/gen-hashes.awk \
|
|
- -v ENABLED_HASHES=$(hashes_enabled) \
|
|
- $(srcdir)/hashes.lst > crypt-hashes.h.T
|
|
- $(AM_V_at)mv -f crypt-hashes.h.T crypt-hashes.h
|
|
+xcrypt.h: crypt.h
|
|
+ $(AM_V_GEN)LC_ALL=C $(AWK) \
|
|
+ -f $(srcdir)/gen-crypt-h.awk config.h $(srcdir)/xcrypt.h.in \
|
|
+ > xcrypt.h.T
|
|
+ $(AM_V_at)mv -f xcrypt.h.T xcrypt.h
|
|
|
|
install_exec_hook_targets =
|
|
|
|
diff --git a/xcrypt.h b/xcrypt.h.in
|
|
similarity index 98%
|
|
rename from xcrypt.h
|
|
rename to xcrypt.h.in
|
|
index f1d4d48..332722c 100644
|
|
--- a/xcrypt.h
|
|
+++ b/xcrypt.h.in
|
|
@@ -22,6 +22,8 @@
|
|
|
|
#include <crypt.h>
|
|
|
|
+/*HEADER*/
|
|
+
|
|
/* Those are kept for code compatibility with older versions
|
|
(v3.1.1 and earlier) of libxcrypt.
|
|
We intentionally declare these functions using macros here,
|
|
@@ -52,4 +54,6 @@ extern char * __REDIRECT_NTH (xcrypt_gensalt_r, (const char *__prefix,
|
|
# endif
|
|
#endif
|
|
|
|
+/*TRAILER*/
|
|
+
|
|
#endif /* xcrypt.h */
|