Speed up compilation of advapi32

svn path=/trunk/; revision=19683
This commit is contained in:
Casper Hornstrup 2005-11-27 12:57:35 +00:00
parent 9bbfe7a86c
commit aa79785ba3
6 changed files with 55 additions and 58 deletions

View file

@ -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 */

View file

@ -13,42 +13,52 @@
<library>wine</library>
<pch>advapi32.h</pch>
<directory name="crypt">
<file>crypt.c</file>
<file>crypt_des.c</file>
<file>crypt_lmhash.c</file>
<file>crypt_md4.c</file>
<file>crypt_md5.c</file>
<file>crypt_sha.c</file>
<compilationunit name="crypt_unit.c">
<file>crypt.c</file>
<file>crypt_des.c</file>
<file>crypt_lmhash.c</file>
<file>crypt_md4.c</file>
<file>crypt_md5.c</file>
<file>crypt_sha.c</file>
</compilationunit>
</directory>
<directory name="misc">
<file>dllmain.c</file>
<file>hwprofiles.c</file>
<file>logon.c</file>
<file>msi.c</file>
<file>shutdown.c</file>
<file>sysfunc.c</file>
<compilationunit name="misc.c">
<file>dllmain.c</file>
<file>hwprofiles.c</file>
<file>logon.c</file>
<file>msi.c</file>
<file>shutdown.c</file>
<file>sysfunc.c</file>
</compilationunit>
</directory>
<directory name="reg">
<file>reg.c</file>
</directory>
<directory name="sec">
<file>ac.c</file>
<file>audit.c</file>
<file>lsa.c</file>
<file>misc.c</file>
<file>sec.c</file>
<file>sid.c</file>
<file>trustee.c</file>
<compilationunit name="sec_unit.c">
<file>ac.c</file>
<file>audit.c</file>
<file>lsa.c</file>
<file>misc.c</file>
<file>sec.c</file>
<file>sid.c</file>
<file>trustee.c</file>
</compilationunit>
</directory>
<directory name="service">
<file>eventlog.c</file>
<file>scm.c</file>
<file>sctrl.c</file>
<file>undoc.c</file>
<compilationunit name="service.c">
<file>eventlog.c</file>
<file>scm.c</file>
<file>sctrl.c</file>
<file>undoc.c</file>
</compilationunit>
</directory>
<directory name="token">
<file>privilege.c</file>
<file>token.c</file>
<compilationunit name="token_unit.c">
<file>privilege.c</file>
<file>token.c</file>
</compilationunit>
</directory>
<file>advapi32.rc</file>
</module>

View file

@ -32,6 +32,21 @@
#define NDEBUG
#include <debug.h>
/*
* 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;

View file

@ -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_ */

View file

@ -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.

View file

@ -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.