diff options
author | Björn Esser <besser82@fedoraproject.org> | 2018-10-21 12:53:13 +0200 |
---|---|---|
committer | Björn Esser <besser82@fedoraproject.org> | 2018-10-21 15:50:07 +0200 |
commit | d32b170da3d4b65e9b23bb1c9a50e027ec090c5a (patch) | |
tree | 145facfe8d7a2d5c7263c5cdc8ee0757c3b8a4c5 | |
parent | 9787b0be83a077c8c1a4e9b460b6b6e3698002d4 (diff) | |
download | libxcrypt-d32b170da3d4b65e9b23bb1c9a50e027ec090c5a.tar.gz libxcrypt-d32b170da3d4b65e9b23bb1c9a50e027ec090c5a.tar.bz2 libxcrypt-d32b170da3d4b65e9b23bb1c9a50e027ec090c5a.zip |
Include crypt.h from crypt-port.h.
Since we have a guaranteed way to make sure all generated header
files are always present before any object file is compiled, we
can drop crypt-base.h and include the local version of crypt.h
through crypt-port.h.
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | LICENSING | 2 | ||||
-rw-r--r-- | Makefile.am | 10 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | crypt-gensalt-static.c | 1 | ||||
-rw-r--r-- | crypt-obsolete.h | 1 | ||||
-rw-r--r-- | crypt-port.h | 6 | ||||
-rw-r--r-- | crypt-private.h | 1 | ||||
-rw-r--r-- | crypt-static.c | 1 | ||||
-rw-r--r-- | crypt.h.in.in (renamed from crypt-base.h.in) | 0 | ||||
-rw-r--r-- | gen-crypt-h.awk | 2 | ||||
-rw-r--r-- | test-crypt-bcrypt.c | 1 | ||||
-rw-r--r-- | test-crypt-des.c | 1 | ||||
-rw-r--r-- | test-crypt-md5.c | 1 | ||||
-rw-r--r-- | test-crypt-nthash.c | 1 | ||||
-rw-r--r-- | test-crypt-pbkdf1-sha1.c | 1 | ||||
-rw-r--r-- | test-crypt-scrypt.c | 1 | ||||
-rw-r--r-- | test-crypt-sha256.c | 1 | ||||
-rw-r--r-- | test-crypt-sha512.c | 1 | ||||
-rw-r--r-- | test-crypt-sunmd5.c | 1 | ||||
-rw-r--r-- | test-crypt-yescrypt.c | 1 | ||||
-rw-r--r-- | test-des-obsolete.c | 1 | ||||
-rw-r--r-- | test-des-obsolete_r.c | 1 | ||||
-rw-r--r-- | test-gensalt.c | 1 |
24 files changed, 13 insertions, 28 deletions
@@ -19,7 +19,7 @@ /config.status /m4/config.sub /configure -/crypt-base.h +/crypt.h.in /m4/depcomp /m4/install-sh /libtool @@ -12,7 +12,7 @@ source tree. For specific licensing terms consult the files themselves. crypt.c, crypt-static.c, crypt-gensalt-static.c, crypt-port.h * Copyright Free Software Foundation, Inc.; LGPL (v2.1 or later): - crypt-base.h, crypt-obsolete.h, crypt-private.h + crypt.h, crypt-obsolete.h, crypt-private.h alg-md5.h, alg-md5.c, crypt-md5.c, alg-sha512.h, alg-sha512.c, test-crypt-badsalt.c, test-crypt-nonnull.c diff --git a/Makefile.am b/Makefile.am index acab882..498c48f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -14,7 +14,7 @@ TEST_EXTENSIONS = .sh EXTRA_DIST = \ LICENSING THANKS \ - crypt-base.h.in libcrypt.map.in libcrypt.minver \ + 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 @@ -24,7 +24,7 @@ notrans_dist_man3_MANS = \ notrans_dist_man5_MANS = crypt.5 nodist_include_HEADERS = crypt.h -nodist_noinst_HEADERS = crypt-hashes.h crypt-base.h +nodist_noinst_HEADERS = crypt-hashes.h noinst_HEADERS = \ alg-des.h alg-hmac-sha1.h alg-md4.h alg-md5.h \ alg-sha1.h alg-sha256.h alg-sha512.h \ @@ -80,7 +80,7 @@ CLEANFILES = Makefile.deps.T Makefile.deps \ DISTCLEANFILES = .deps/*.Plo # Empty target to have needed headers pre-generated before any other target. -Makefile.deps: crypt-hashes.h crypt-symbol-vers.h +Makefile.deps: crypt.h $(AM_V_GEN)LC_ALL=C echo "# Deps" > Makefile.deps.T $(AM_V_at)mv -f Makefile.deps.T Makefile.deps @@ -101,9 +101,9 @@ crypt-symbol-vers.h: libcrypt.map.in gen-vers.awk Makefile $(srcdir)/libcrypt.map.in > crypt-symbol-vers.h.T $(AM_V_at)mv -f crypt-symbol-vers.h.T crypt-symbol-vers.h -crypt.h: crypt-base.h gen-crypt-h.awk config.h +crypt.h: crypt.h.in crypt-hashes.h crypt-symbol-vers.h gen-crypt-h.awk config.h $(AM_V_GEN)LC_ALL=C $(AWK) \ - -f $(srcdir)/gen-crypt-h.awk config.h $(builddir)/crypt-base.h \ + -f $(srcdir)/gen-crypt-h.awk config.h $(builddir)/crypt.h.in \ > crypt.h.T $(AM_V_at)mv -f crypt.h.T crypt.h diff --git a/configure.ac b/configure.ac index 3ba313c..5da8aa8 100644 --- a/configure.ac +++ b/configure.ac @@ -11,8 +11,8 @@ AC_CONFIG_SRCDIR([crypt.c]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_FILES([ Makefile + crypt.h.in libxcrypt.pc - crypt-base.h ]) AM_INIT_AUTOMAKE diff --git a/crypt-gensalt-static.c b/crypt-gensalt-static.c index 14f271e..590ee83 100644 --- a/crypt-gensalt-static.c +++ b/crypt-gensalt-static.c @@ -15,7 +15,6 @@ <https://www.gnu.org/licenses/>. */ #include "crypt-port.h" -#include "crypt-base.h" /* The functions that use global state objects are isolated in their own files so that a statically-linked program that doesn't use them diff --git a/crypt-obsolete.h b/crypt-obsolete.h index d1acdea..4ecd969 100644 --- a/crypt-obsolete.h +++ b/crypt-obsolete.h @@ -19,7 +19,6 @@ #ifndef _CRYPT_OBSOLETE_H #define _CRYPT_OBSOLETE_H 1 -#include "crypt-base.h" /* These functions are obsolete and should never be used, but we have to keep providing them for binary backward compatibility. */ diff --git a/crypt-port.h b/crypt-port.h index f139efa..5f4d55f 100644 --- a/crypt-port.h +++ b/crypt-port.h @@ -44,8 +44,8 @@ #endif /* While actually compiling the library, suppress the __nonnull tags - on the functions in crypt-base.h, so that internal checks for NULL - are not deleted by the compiler. */ + on the functions in crypt.h, so that internal checks for NULL are + not deleted by the compiler. */ #undef __nonnull #define __nonnull(param) /* nothing */ @@ -292,4 +292,6 @@ _xcrypt_strcpy_or_abort (void *dst, const size_t d_size, #define libcperciva_SHA256_Buf _crypt_SHA256_Buf #endif +#include "crypt.h" + #endif /* crypt-port.h */ diff --git a/crypt-private.h b/crypt-private.h index 5e18030..306879d 100644 --- a/crypt-private.h +++ b/crypt-private.h @@ -20,7 +20,6 @@ #ifndef _CRYPT_PRIVATE_H #define _CRYPT_PRIVATE_H 1 -#include "crypt-base.h" /* Utility functions */ diff --git a/crypt-static.c b/crypt-static.c index fb9a953..d7598d1 100644 --- a/crypt-static.c +++ b/crypt-static.c @@ -15,7 +15,6 @@ <https://www.gnu.org/licenses/>. */ #include "crypt-port.h" -#include "crypt-base.h" /* The functions that use global state objects are isolated in their own files so that a statically-linked program that doesn't use them diff --git a/crypt-base.h.in b/crypt.h.in.in index 0d0ff5c..0d0ff5c 100644 --- a/crypt-base.h.in +++ b/crypt.h.in.in diff --git a/gen-crypt-h.awk b/gen-crypt-h.awk index 70fc5fa..8b3f4f5 100644 --- a/gen-crypt-h.awk +++ b/gen-crypt-h.awk @@ -1,4 +1,4 @@ -# Generation of crypt.h from crypt-base.h and config.h. +# Generation of crypt.h from crypt.h.in and config.h. # # Written by Zack Weinberg <zackw at panix.com> in 2017. # To the extent possible under law, Zack Weinberg has waived all diff --git a/test-crypt-bcrypt.c b/test-crypt-bcrypt.c index bf149b4..5cf90c1 100644 --- a/test-crypt-bcrypt.c +++ b/test-crypt-bcrypt.c @@ -15,7 +15,6 @@ */ #include "crypt-port.h" -#include "crypt-base.h" #include <errno.h> #include <stdio.h> diff --git a/test-crypt-des.c b/test-crypt-des.c index 1b5463e..f01fee7 100644 --- a/test-crypt-des.c +++ b/test-crypt-des.c @@ -1,5 +1,4 @@ #include "crypt-port.h" -#include "crypt-base.h" #include <stdio.h> diff --git a/test-crypt-md5.c b/test-crypt-md5.c index 3035c39..d42b529 100644 --- a/test-crypt-md5.c +++ b/test-crypt-md5.c @@ -1,5 +1,4 @@ #include "crypt-port.h" -#include "crypt-base.h" #if INCLUDE_md5 diff --git a/test-crypt-nthash.c b/test-crypt-nthash.c index 9bf7d28..b344d86 100644 --- a/test-crypt-nthash.c +++ b/test-crypt-nthash.c @@ -1,5 +1,4 @@ #include "crypt-port.h" -#include "crypt-base.h" #include <stdio.h> diff --git a/test-crypt-pbkdf1-sha1.c b/test-crypt-pbkdf1-sha1.c index 677e5bf..7a0c826 100644 --- a/test-crypt-pbkdf1-sha1.c +++ b/test-crypt-pbkdf1-sha1.c @@ -1,5 +1,4 @@ #include "crypt-port.h" -#include "crypt-base.h" #include <errno.h> #include <stdio.h> diff --git a/test-crypt-scrypt.c b/test-crypt-scrypt.c index df64774..0cf8da3 100644 --- a/test-crypt-scrypt.c +++ b/test-crypt-scrypt.c @@ -18,7 +18,6 @@ */ #include "crypt-port.h" -#include "crypt-base.h" #include <stdio.h> diff --git a/test-crypt-sha256.c b/test-crypt-sha256.c index 05135ff..9331d14 100644 --- a/test-crypt-sha256.c +++ b/test-crypt-sha256.c @@ -1,5 +1,4 @@ #include "crypt-port.h" -#include "crypt-base.h" #include <stdio.h> diff --git a/test-crypt-sha512.c b/test-crypt-sha512.c index bef271b..88c5643 100644 --- a/test-crypt-sha512.c +++ b/test-crypt-sha512.c @@ -1,5 +1,4 @@ #include "crypt-port.h" -#include "crypt-base.h" #include <stdio.h> diff --git a/test-crypt-sunmd5.c b/test-crypt-sunmd5.c index d0d85e3..88e8ecf 100644 --- a/test-crypt-sunmd5.c +++ b/test-crypt-sunmd5.c @@ -1,5 +1,4 @@ #include "crypt-port.h" -#include "crypt-base.h" #include <stdio.h> #include <stdlib.h> diff --git a/test-crypt-yescrypt.c b/test-crypt-yescrypt.c index da6b694..a635f94 100644 --- a/test-crypt-yescrypt.c +++ b/test-crypt-yescrypt.c @@ -17,7 +17,6 @@ */ #include "crypt-port.h" -#include "crypt-base.h" #include <stdio.h> diff --git a/test-des-obsolete.c b/test-des-obsolete.c index d5e3cc0..4588c75 100644 --- a/test-des-obsolete.c +++ b/test-des-obsolete.c @@ -7,7 +7,6 @@ */ #include "crypt-port.h" -#include "crypt-base.h" #include "crypt-obsolete.h" #include "test-des-cases.h" diff --git a/test-des-obsolete_r.c b/test-des-obsolete_r.c index d635b2a..9efd0fb 100644 --- a/test-des-obsolete_r.c +++ b/test-des-obsolete_r.c @@ -7,7 +7,6 @@ */ #include "crypt-port.h" -#include "crypt-base.h" #include "crypt-obsolete.h" #include "test-des-cases.h" diff --git a/test-gensalt.c b/test-gensalt.c index a6d3621..40fe66c 100644 --- a/test-gensalt.c +++ b/test-gensalt.c @@ -1,5 +1,4 @@ #include "crypt-port.h" -#include "crypt-base.h" #include <errno.h> #include <stdio.h> |