Skip to content

Commit

Permalink
Mostly implemented crypt-tune-costs.
Browse files Browse the repository at this point in the history
Known bugs in the handling of logarithmic cost will be addressed later.
This patch will probably get shuffled to the end of the branch.
  • Loading branch information
zackw authored and besser82 committed Oct 25, 2018
1 parent 1b5216c commit 89d7468
Show file tree
Hide file tree
Showing 4 changed files with 757 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
/crypt.h
/crypt-hashes.h
/crypt-symbol-vers.h
/crypt-tune-costs
/libcrypt.map
/gen-des-tables
/test-alg-des
Expand Down
3 changes: 3 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ libcrypt_la_SOURCES = \

EXTRA_DIST += alg-yescrypt-platform.c

sbin_PROGRAMS = crypt-tune-costs
crypt_tune_costs_LDADD = libcrypt.la -lm

pkgconfig_DATA = libxcrypt.pc
# Install libcrypt.pc symlink to libxcrypt.pc file.
phony_targets = \
Expand Down
13 changes: 13 additions & 0 deletions crypt-port.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,19 @@
# define __GNUC_PREREQ__(ma, mi) __GNUC_PREREQ(ma, mi)
#endif

/* C2011 added a keyword _Noreturn with the same effect as
gcc's longstanding __attribute__ ((noreturn)) extension,
except that it is required to appear _before_ the function
type specifier (which must be 'void'). */
#if (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) >= 201112 || \
defined _Noreturn
# define NORETURN _Noreturn void
#elif defined __GNUC__ && __GNUC__ >= 3
# define NORETURN void __attribute__ ((noreturn))
#else
# define NORETURN void
#endif

/* While actually compiling the library, suppress the __nonnull tags
on the functions in crypt.h, so that internal checks for NULL are
not deleted by the compiler. */
Expand Down
Loading

0 comments on commit 89d7468

Please sign in to comment.