This commit is contained in:
kaetemi 2013-07-28 18:04:13 +02:00
commit 19efd6fba8
2 changed files with 21 additions and 16 deletions

View file

@ -34,8 +34,8 @@ ENDIF(MSVC)
MACRO(PCH_SET_COMPILE_FLAGS _target) MACRO(PCH_SET_COMPILE_FLAGS _target)
SET(PCH_FLAGS) SET(PCH_FLAGS)
SET(PCH_ARCHS) SET(PCH_ARCHS)
SET(_FLAGS)
SET(FLAGS)
LIST(APPEND _FLAGS ${CMAKE_CXX_FLAGS}) LIST(APPEND _FLAGS ${CMAKE_CXX_FLAGS})
STRING(TOUPPER "${CMAKE_BUILD_TYPE}" _UPPER_BUILD) STRING(TOUPPER "${CMAKE_BUILD_TYPE}" _UPPER_BUILD)
@ -81,10 +81,15 @@ MACRO(PCH_SET_COMPILE_FLAGS _target)
LIST(APPEND _FLAGS " ${_directory_flags}") LIST(APPEND _FLAGS " ${_directory_flags}")
LIST(APPEND _FLAGS " ${_directory_definitions}") LIST(APPEND _FLAGS " ${_directory_definitions}")
STRING(REGEX REPLACE " +" " " _FLAGS ${_FLAGS})
# Format definitions # Format definitions
IF(MSVC)
# Fix path with space
SEPARATE_ARGUMENTS(_FLAGS UNIX_COMMAND "${_FLAGS}")
ELSE(MSVC)
STRING(REGEX REPLACE " +" " " _FLAGS ${_FLAGS})
SEPARATE_ARGUMENTS(_FLAGS) SEPARATE_ARGUMENTS(_FLAGS)
ENDIF(MSVC)
IF(CLANG) IF(CLANG)
# Determining all architectures and get common flags # Determining all architectures and get common flags

View file

@ -79,6 +79,10 @@ static char rz_sccsid[] = "@(#)crypt.c 8.1 (Berkeley) 6/4/93";
#include <limits.h> #include <limits.h>
#define RZ__PASSWORD_EFMT1 '-' #define RZ__PASSWORD_EFMT1 '-'
#if DEBUG_CRYPT
void prtab(char *s, unsigned char *t, int num_rows);
#endif
/* /*
* UNIX password, and DES, encryption. * UNIX password, and DES, encryption.
* By Tom Truscott, trt@rti.rti.org, * By Tom Truscott, trt@rti.rti.org,
@ -785,7 +789,7 @@ int rz_des_cipher(const char *in, char *out, long salt, int num_iter) {
} }
perm[i] = (unsigned char) k; perm[i] = (unsigned char) k;
} }
#ifdef DEBUG #ifdef DEBUG_CRYPT
prtab("pc1tab", perm, 8); prtab("pc1tab", perm, 8);
#endif #endif
rz_init_perm(PC1ROT, perm, 8, 8); rz_init_perm(PC1ROT, perm, 8, 8);
@ -809,7 +813,7 @@ int rz_des_cipher(const char *in, char *out, long salt, int num_iter) {
if ((k%28) <= j) k -= 28; if ((k%28) <= j) k -= 28;
perm[i] = pc2inv[k]; perm[i] = pc2inv[k];
} }
#ifdef DEBUG #ifdef DEBUG_CRYPT
prtab("pc2tab", perm, 8); prtab("pc2tab", perm, 8);
#endif #endif
rz_init_perm(PC2ROT[j], perm, 8, 8); rz_init_perm(PC2ROT[j], perm, 8, 8);
@ -833,7 +837,7 @@ int rz_des_cipher(const char *in, char *out, long salt, int num_iter) {
perm[i*8+j] = (unsigned char) k; perm[i*8+j] = (unsigned char) k;
} }
} }
#ifdef DEBUG #ifdef DEBUG_CRYPT
prtab("ietab", perm, 8); prtab("ietab", perm, 8);
#endif #endif
rz_init_perm(IE3264, perm, 4, 8); rz_init_perm(IE3264, perm, 4, 8);
@ -850,7 +854,7 @@ int rz_des_cipher(const char *in, char *out, long salt, int num_iter) {
} }
perm[k-1] = i+1; perm[k-1] = i+1;
} }
#ifdef DEBUG #ifdef DEBUG_CRYPT
prtab("cftab", perm, 8); prtab("cftab", perm, 8);
#endif #endif
rz_init_perm(CF6464, perm, 8, 8); rz_init_perm(CF6464, perm, 8, 8);
@ -959,12 +963,8 @@ int rz_encrypt(register char *block, int flag) {
return (0); return (0);
} }
#ifdef DEBUG #ifdef DEBUG_CRYPT
STATIC void prtab(char *s, unsigned char *t, int num_rows)
prtab(s, t, num_rows)
char *s;
unsigned char *t;
int num_rows;
{ {
register int i, j; register int i, j;