fixed portability

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4280 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2005-09-20 17:42:28 +00:00
parent 7c46651a0f
commit 64bdfbd620
3 changed files with 21 additions and 7 deletions

View file

@ -25,12 +25,26 @@
#include "checksum.h"
#ifdef _MSC_VER
# define FORCE_INLINE __forceinline
#else
# ifdef __GNUC__
# if __GNUC__ < 3
# define FORCE_INLINE inline
# else
# define FORCE_INLINE inline __attribute__ ((always_inline))
# endif
# else
# define FORCE_INLINE inline
# endif
#endif
/* ------------------------ CRC32 checksum calculation ----------------- */
UINT CRCTable[256];
BOOL bInitCRC = FALSE;
_inline void InitCRC() {
FORCE_INLINE void InitCRC() {
int i, j; unsigned long c;
for (c = i = 0; i < 256; c = ++i) {
for (j = 0; j < 8; j++) {