From b1b1f3ded2e0150fbbbd26a6dd9ef3bc41714ecb Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 4 Jun 2016 02:40:04 +0000 Subject: des_tables.c: generation rule * defs/gmake.mk (missing/des_tables.c): move the recipe from common.mk. this is less common. * missing/crypt.c (init_des): if des_tables.c is empty, initialize DES tables at runtime. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- missing/crypt.c | 16 ++++++++++++---- missing/des_tables.c | 4 ++++ 2 files changed, 16 insertions(+), 4 deletions(-) (limited to 'missing') diff --git a/missing/crypt.c b/missing/crypt.c index 22be52fbf0..f523aa51e6 100644 --- a/missing/crypt.c +++ b/missing/crypt.c @@ -93,6 +93,15 @@ static char sccsid[] = "@(#)crypt.c 8.1 (Berkeley) 6/4/93"; # define INIT_DES 0 # endif #endif +#if !INIT_DES +# include "des_tables.c" +# ifdef HAVE_DES_TABLES +# define init_des() ((void)0) +# else +# undef INIT_DES +# define INIT_DES 1 +# endif +#endif /* * Convert twenty-four-bit long in host-order @@ -353,10 +362,6 @@ static des_tables_t des_tables[1]; STATIC void init_des(void); STATIC void init_perm(C_block perm[64/CHUNKBITS][1<