From aa79785ba315728117ca64603d6bc45b0d0cf07a Mon Sep 17 00:00:00 2001 From: Casper Hornstrup Date: Sun, 27 Nov 2005 12:57:35 +0000 Subject: [PATCH] Speed up compilation of advapi32 svn path=/trunk/; revision=19683 --- reactos/lib/advapi32/advapi32.h | 4 +- reactos/lib/advapi32/advapi32.xml | 60 +++++++++++++++----------- reactos/lib/advapi32/crypt/crypt.c | 15 +++++++ reactos/lib/advapi32/crypt/crypt.h | 2 + reactos/lib/advapi32/crypt/crypt_md4.c | 16 ------- reactos/lib/advapi32/crypt/crypt_md5.c | 16 ------- 6 files changed, 55 insertions(+), 58 deletions(-) diff --git a/reactos/lib/advapi32/advapi32.h b/reactos/lib/advapi32/advapi32.h index afb6d0c739b..9f3e0113989 100644 --- a/reactos/lib/advapi32/advapi32.h +++ b/reactos/lib/advapi32/advapi32.h @@ -5,6 +5,8 @@ * PURPOSE: Win32 Advanced API Libary Header * PROGRAMMER: Alex Ionescu (alex@relsoft.net) */ +#ifndef __ADVAPI32_H +#define __ADVAPI32_H /* INCLUDES ******************************************************************/ @@ -140,4 +142,4 @@ extern NTMARTA NtMartaStatic; DWORD CheckNtMartaPresent(VOID); -/* EOF */ +#endif /* __ADVAPI32_H */ diff --git a/reactos/lib/advapi32/advapi32.xml b/reactos/lib/advapi32/advapi32.xml index 87da64ff9e4..437b5e2285e 100644 --- a/reactos/lib/advapi32/advapi32.xml +++ b/reactos/lib/advapi32/advapi32.xml @@ -13,42 +13,52 @@ wine advapi32.h - crypt.c - crypt_des.c - crypt_lmhash.c - crypt_md4.c - crypt_md5.c - crypt_sha.c + + crypt.c + crypt_des.c + crypt_lmhash.c + crypt_md4.c + crypt_md5.c + crypt_sha.c + - dllmain.c - hwprofiles.c - logon.c - msi.c - shutdown.c - sysfunc.c + + dllmain.c + hwprofiles.c + logon.c + msi.c + shutdown.c + sysfunc.c + reg.c - ac.c - audit.c - lsa.c - misc.c - sec.c - sid.c - trustee.c + + ac.c + audit.c + lsa.c + misc.c + sec.c + sid.c + trustee.c + - eventlog.c - scm.c - sctrl.c - undoc.c + + eventlog.c + scm.c + sctrl.c + undoc.c + - privilege.c - token.c + + privilege.c + token.c + advapi32.rc diff --git a/reactos/lib/advapi32/crypt/crypt.c b/reactos/lib/advapi32/crypt/crypt.c index 54918c9b9bf..52a00a59517 100644 --- a/reactos/lib/advapi32/crypt/crypt.c +++ b/reactos/lib/advapi32/crypt/crypt.c @@ -32,6 +32,21 @@ #define NDEBUG #include +/* + * Note: this code is harmless on little-endian machines. + */ +VOID byteReverse(unsigned char *buf, unsigned longs) +{ + unsigned int t; + + do + { + t = (unsigned int)((unsigned)buf[3] << 8 | buf[2]) << 16 | + ((unsigned)buf[1] << 8 | buf[0]); + *(unsigned int *)buf = t; + buf += 4; + } while (--longs); +} HWND crypt_hWindow = 0; diff --git a/reactos/lib/advapi32/crypt/crypt.h b/reactos/lib/advapi32/crypt/crypt.h index e507602dfb6..9fca58b07b8 100644 --- a/reactos/lib/advapi32/crypt/crypt.h +++ b/reactos/lib/advapi32/crypt/crypt.h @@ -83,4 +83,6 @@ extern unsigned char *CRYPT_DESkey8to7( unsigned char *dst, const unsigned char extern unsigned char *CRYPT_DEShash( unsigned char *dst, const unsigned char *key, const unsigned char *src ); +extern VOID byteReverse(unsigned char *buf, unsigned longs); + #endif /* __WINE_CRYPT_H_ */ diff --git a/reactos/lib/advapi32/crypt/crypt_md4.c b/reactos/lib/advapi32/crypt/crypt_md4.c index c3a98c73b90..6b360b39b97 100644 --- a/reactos/lib/advapi32/crypt/crypt_md4.c +++ b/reactos/lib/advapi32/crypt/crypt_md4.c @@ -136,22 +136,6 @@ static VOID MD4Transform(unsigned int buf[4], const unsigned int in[16]) buf[3] += d; } -/* - * Note: this code is harmless on little-endian machines. - */ -static VOID byteReverse(unsigned char *buf, unsigned longs) -{ - unsigned int t; - - do - { - t = (unsigned int)((unsigned)buf[3] << 8 | buf[2]) << 16 | - ((unsigned)buf[1] << 8 | buf[0]); - *(unsigned int *)buf = t; - buf += 4; - } while (--longs); -} - /* * Start MD4 accumulation. Set bit count to 0 and buffer to mysterious * initialization constants. diff --git a/reactos/lib/advapi32/crypt/crypt_md5.c b/reactos/lib/advapi32/crypt/crypt_md5.c index 91d2e9eec37..b5f2f3c0824 100644 --- a/reactos/lib/advapi32/crypt/crypt_md5.c +++ b/reactos/lib/advapi32/crypt/crypt_md5.c @@ -146,22 +146,6 @@ static void MD5Transform(unsigned int buf[4], const unsigned int in[16]) buf[3] += d; } -/* - * Note: this code is harmless on little-endian machines. - */ -static VOID byteReverse(unsigned char *buf, unsigned longs) -{ - unsigned int t; - - do - { - t = (unsigned int)((unsigned)buf[3] << 8 | buf[2]) << 16 | - ((unsigned)buf[1] << 8 | buf[0]); - *(unsigned int *)buf = t; - buf += 4; - } while (--longs); -} - /* * Start MD5 accumulation. Set bit count to 0 and buffer to mysterious * initialization constants.